Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.examplemod;
- import com.xcompwiz.mystcraft.api.MystAPI;
- import com.xcompwiz.mystcraft.api.internals.BlockCategory;
- import com.xcompwiz.mystcraft.api.internals.BlockDescriptor;
- import com.xcompwiz.mystcraft.api.symbol.IAgeSymbol;
- import com.xcompwiz.mystcraft.api.symbol.words.WordData;
- import cpw.mods.fml.common.FMLLog;
- import cpw.mods.fml.common.Mod;
- import cpw.mods.fml.common.Mod.EventHandler;
- import cpw.mods.fml.common.event.FMLInitializationEvent;
- import net.minecraft.block.Block;
- @Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION, dependencies = "required-after:Mystcraft")
- public class ExampleMod
- {
- public static final String MODID = "examplemod";
- public static final String VERSION = "1.0";
- @EventHandler
- public void init(FMLInitializationEvent event)
- {
- FMLLog.info("Adding new page to Mystcraft");
- BlockDescriptor theBlock = new BlockDescriptor((short) Block.bookShelf.blockID);
- theBlock.setUsable(BlockCategory.STRUCTURE, true);
- theBlock.setUsable(BlockCategory.SOLID, true);
- IAgeSymbol bookshelf = MystAPI.symbolFact.createSymbol(theBlock, WordData.Intelligence, 1.0f);
- boolean registered = MystAPI.symbol.registerSymbol(bookshelf);
- if (registered)
- FMLLog.info("Page registered successfully");
- else
- FMLLog.warning("Failed to register page!");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement