diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2014-04-15 22:41:43 +0300 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2014-04-15 22:41:43 +0300 |
| commit | 4b8b13b34d7a8fd0ee7c7b13f11be9c2bf3b5d18 (patch) | |
| tree | b49bc483d576ec3abeb2e18523e4511ecce353d3 /eclipse/Jewelrycraft/common/darkknight/jewelrycraft/JewelrycraftMod.java | |
| parent | 86398ed60db321f86e8d98f191107fdac2c93760 (diff) | |
More 1.7 stuff
Diffstat (limited to 'eclipse/Jewelrycraft/common/darkknight/jewelrycraft/JewelrycraftMod.java')
| -rw-r--r-- | eclipse/Jewelrycraft/common/darkknight/jewelrycraft/JewelrycraftMod.java | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/JewelrycraftMod.java b/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/JewelrycraftMod.java index 8565586..f6672ee 100644 --- a/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/JewelrycraftMod.java +++ b/eclipse/Jewelrycraft/common/darkknight/jewelrycraft/JewelrycraftMod.java @@ -6,18 +6,22 @@ package darkknight.jewelrycraft; -import ibxm.Player; - +import java.io.File; +import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.logging.Logger; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; -import net.minecraft.server.MinecraftServer; +import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.gen.structure.MapGenStructureIO; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.fluids.FluidContainerRegistry; +import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData; +import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.oredict.OreDictionary; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; @@ -30,11 +34,10 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.VillagerRegistry; -import cpw.mods.fml.relauncher.Side; -import cpw.mods.fml.relauncher.SideOnly; import darkknight.jewelrycraft.block.BlockList; import darkknight.jewelrycraft.config.ConfigHandler; import darkknight.jewelrycraft.container.GuiHandler; +import darkknight.jewelrycraft.events.BucketHandler; import darkknight.jewelrycraft.events.EntityEventHandler; import darkknight.jewelrycraft.item.ItemList; import darkknight.jewelrycraft.lib.Reference; @@ -69,13 +72,17 @@ public class JewelrycraftMod }; public static CreativeTabs rings = new CreativeTabRings("Rings"); public static CreativeTabs necklaces = new CreativeTabNecklaces("Necklaces"); + public static CreativeTabs liquids = new CreativeTabLiquids("Liquids"); + + public static File liquidsConf; + public static NBTTagCompound saveData; @EventHandler - public void preInit(FMLPreInitializationEvent e) + public void preInit(FMLPreInitializationEvent e) throws IOException { ConfigHandler.preInit(e); - ItemList.preInit(e); BlockList.preInit(e); + ItemList.preInit(e); CraftingRecipes.preInit(e); OreDictionary.registerOre("ingotShadow", new ItemStack(ItemList.shadowIngot)); OreDictionary.registerOre("oreShadow", new ItemStack(BlockList.shadowOre)); @@ -89,12 +96,13 @@ public class JewelrycraftMod } catch (Throwable e2) { - logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.6.4"); + logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.7.2"); } - MinecraftForge.EVENT_BUS.register(new EntityEventHandler()); + MinecraftForge.EVENT_BUS.register(new EntityEventHandler()); + MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE); + BucketHandler.INSTANCE.buckets.put(BlockList.moltenMetal, ItemList.bucket); proxy.registerRenderers(); - ModMetadata metadata = e.getModMetadata(); List<String> authorList = new ArrayList<String>(); @@ -104,6 +112,9 @@ public class JewelrycraftMod metadata.autogenerated = false; metadata.authorList = authorList; metadata.url = "https://github.com/sor1n/Modjam-Mod"; + + liquidsConf = new File(e.getModConfigurationDirectory(), "JLP.cfg"); + if(!liquidsConf.exists() && !liquidsConf.createNewFile()); } @EventHandler |
