Advertisement
DarkMorford

Untitled

Sep 19th, 2014
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.37 KB | None | 0 0
  1. package com.example.examplemod;
  2.  
  3. import com.xcompwiz.mystcraft.api.MystAPI;
  4. import com.xcompwiz.mystcraft.api.internals.BlockCategory;
  5. import com.xcompwiz.mystcraft.api.internals.BlockDescriptor;
  6. import com.xcompwiz.mystcraft.api.symbol.IAgeSymbol;
  7. import com.xcompwiz.mystcraft.api.symbol.words.WordData;
  8. import cpw.mods.fml.common.FMLLog;
  9. import cpw.mods.fml.common.Mod;
  10. import cpw.mods.fml.common.Mod.EventHandler;
  11. import cpw.mods.fml.common.event.FMLInitializationEvent;
  12. import net.minecraft.block.Block;
  13.  
  14. @Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION, dependencies = "required-after:Mystcraft")
  15. public class ExampleMod
  16. {
  17.     public static final String MODID = "examplemod";
  18.     public static final String VERSION = "1.0";
  19.  
  20.     @EventHandler
  21.     public void init(FMLInitializationEvent event)
  22.     {
  23.         FMLLog.info("Adding new page to Mystcraft");
  24.  
  25.         BlockDescriptor theBlock = new BlockDescriptor((short) Block.bookShelf.blockID);
  26.         theBlock.setUsable(BlockCategory.STRUCTURE, true);
  27.         theBlock.setUsable(BlockCategory.SOLID, true);
  28.  
  29.         IAgeSymbol bookshelf = MystAPI.symbolFact.createSymbol(theBlock, WordData.Intelligence, 1.0f);
  30.         boolean registered = MystAPI.symbol.registerSymbol(bookshelf);
  31.         if (registered)
  32.             FMLLog.info("Page registered successfully");
  33.         else
  34.             FMLLog.warning("Failed to register page!");
  35.     }
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement