From 66882d5d6cdf3b8879f76b11e0e64429f7e9019e Mon Sep 17 00:00:00 2001 From: OnyxDarkKnight Date: Sat, 4 Jan 2014 20:33:12 +0200 Subject: Fixed --- common/darkknight/jewelrycraft/JewelrycraftMod.java | 13 ++----------- common/darkknight/jewelrycraft/client/ClientProxy.java | 3 +++ 2 files changed, 5 insertions(+), 11 deletions(-) (limited to 'common') diff --git a/common/darkknight/jewelrycraft/JewelrycraftMod.java b/common/darkknight/jewelrycraft/JewelrycraftMod.java index 4da9b18..f432797 100644 --- a/common/darkknight/jewelrycraft/JewelrycraftMod.java +++ b/common/darkknight/jewelrycraft/JewelrycraftMod.java @@ -9,7 +9,6 @@ import net.minecraft.network.NetLoginHandler; import net.minecraft.network.packet.NetHandler; import net.minecraft.network.packet.Packet1Login; import net.minecraft.server.MinecraftServer; -import net.minecraft.util.ResourceLocation; import net.minecraft.world.gen.structure.MapGenStructureIO; import net.minecraftforge.oredict.OreDictionary; import cpw.mods.fml.common.Mod; @@ -27,8 +26,6 @@ import cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler; import cpw.mods.fml.common.network.Player; 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.client.JewelryCraftClient; import darkknight.jewelrycraft.config.ConfigHandler; @@ -78,16 +75,9 @@ public class JewelrycraftMod implements IConnectionHandler BlockList.preInit(e); CraftingRecipes.preInit(e); JewelrycraftUtil.addMetals(); - registerVillagers(); - proxy.registerRenderers(); - } - - @SideOnly(Side.CLIENT) - public void registerVillagers() - { + VillagerRegistry.instance().registerVillagerId(3000); VillagerRegistry.instance().registerVillageTradeHandler(3000, new JCTrades()); - VillagerRegistry.instance().registerVillagerSkin(3000, new ResourceLocation("jewelrycraft", "textures/entities/jeweler.png")); VillagerRegistry.instance().registerVillageCreationHandler(new VillageJewelryHandler()); try { @@ -98,6 +88,7 @@ public class JewelrycraftMod implements IConnectionHandler logger.severe("Error registering Jewelrycraft Structures with Vanilla Minecraft: this is expected in versions earlier than 1.6.4"); } + proxy.registerRenderers(); } @EventHandler diff --git a/common/darkknight/jewelrycraft/client/ClientProxy.java b/common/darkknight/jewelrycraft/client/ClientProxy.java index 3362dd3..2becba5 100644 --- a/common/darkknight/jewelrycraft/client/ClientProxy.java +++ b/common/darkknight/jewelrycraft/client/ClientProxy.java @@ -1,6 +1,8 @@ package darkknight.jewelrycraft.client; +import net.minecraft.util.ResourceLocation; import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.common.registry.VillagerRegistry; import darkknight.jewelrycraft.CommonProxy; import darkknight.jewelrycraft.renders.TileEntityDisplayerRender; import darkknight.jewelrycraft.renders.TileEntityJewelrsCraftingTableRender; @@ -20,5 +22,6 @@ public class ClientProxy extends CommonProxy ClientRegistry.bindTileEntitySpecialRenderer(TileEntityMolder.class, new TileEntityMolderRender()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityJewelrsCraftingTable.class, new TileEntityJewelrsCraftingTableRender()); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityDisplayer.class, new TileEntityDisplayerRender()); + VillagerRegistry.instance().registerVillagerSkin(3000, new ResourceLocation("jewelrycraft", "textures/entities/jeweler.png")); } } -- cgit v1.2.3