From aa0b4219f64b3d3dd125695e30171ae8b67aa942 Mon Sep 17 00:00:00 2001 From: pahimar Date: Mon, 26 Nov 2012 13:30:01 -0500 Subject: [PATCH] Clean up, and realizing I don't have to send custom sound packets --- ee3_client/ee3/client/core/ClientProxy.java | 35 ++++++++++++------- .../core/helper/TransmutationHelper.java | 1 - .../ee3/common/network/PacketKeyPressed.java | 1 - .../ee3/common/network/PacketTileUpdate.java | 1 - 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/ee3_client/ee3/client/core/ClientProxy.java b/ee3_client/ee3/client/core/ClientProxy.java index 0c79072e..0addd2c9 100644 --- a/ee3_client/ee3/client/core/ClientProxy.java +++ b/ee3_client/ee3/client/core/ClientProxy.java @@ -40,32 +40,38 @@ public class ClientProxy extends CommonProxy { @Override public void registerKeyBindingHandler() { + KeyBindingRegistry.registerKeyBinding(new KeyBindingHandler()); } - + @Override public void registerRenderTickHandler() { + TickRegistry.registerTickHandler(new RenderTickHandler(), Side.CLIENT); } - + @Override public void registerDrawBlockHighlightHandler() { + MinecraftForge.EVENT_BUS.register(new DrawBlockHighlightHandler()); } @Override public void setKeyBinding(String name, int value) { + KeyBindingHelper.addKeyBinding(name, value); KeyBindingHelper.addIsRepeating(false); } @Override public void registerSoundHandler() { + MinecraftForge.EVENT_BUS.register(new SoundHandler()); } @Override public void initCustomRarityTypes() { + EnumHelperClient.addRarity(JUNK, COLOR_JUNK, DISPLAY_NAME_JUNK); EnumHelperClient.addRarity(NORMAL, COLOR_NORMAL, DISPLAY_NAME_NORMAL); EnumHelperClient.addRarity(UNCOMMON, COLOR_UNCOMMON, DISPLAY_NAME_UNCOMMON); @@ -77,31 +83,34 @@ public class ClientProxy extends CommonProxy { @Override public EnumRarity getCustomRarityType(String customRarity) { + for (EnumRarity rarity : EnumRarity.class.getEnumConstants()) { if (rarity.name().equals(customRarity)) return rarity; } return EnumRarity.common; } - + @Override public void initRenderingAndTextures() { - RenderIds.calcinatorRenderId = RenderingRegistry.getNextAvailableRenderId(); - - MinecraftForgeClient.preloadTexture(Reference.SPRITE_SHEET_LOCATION + Reference.BLOCK_SPRITE_SHEET); + + RenderIds.calcinatorRenderId = RenderingRegistry.getNextAvailableRenderId(); + + MinecraftForgeClient.preloadTexture(Reference.SPRITE_SHEET_LOCATION + Reference.BLOCK_SPRITE_SHEET); MinecraftForgeClient.preloadTexture(Reference.SPRITE_SHEET_LOCATION + Reference.ITEM_SPRITE_SHEET); - + FMLClientHandler.instance().getClient().renderEngine.registerTextureFX(new TextureRedWaterFX()); FMLClientHandler.instance().getClient().renderEngine.registerTextureFX(new TextureRedWaterFlowFX()); - + MinecraftForgeClient.registerItemRenderer(BlockIds.CALCINATOR, new RenderItemCalcinator()); } - + @Override public void initTileEntities() { - super.initTileEntities(); - - ClientRegistry.bindTileEntitySpecialRenderer(TileCalcinator.class, new RenderCalcinator()); - + + super.initTileEntities(); + + ClientRegistry.bindTileEntitySpecialRenderer(TileCalcinator.class, new RenderCalcinator()); } + } diff --git a/ee3_common/ee3/common/core/helper/TransmutationHelper.java b/ee3_common/ee3/common/core/helper/TransmutationHelper.java index 4f5d022b..1de1667e 100644 --- a/ee3_common/ee3/common/core/helper/TransmutationHelper.java +++ b/ee3_common/ee3/common/core/helper/TransmutationHelper.java @@ -38,7 +38,6 @@ public class TransmutationHelper { if (nextItem != null) { if (Block.blocksList[nextItem.itemID] != null) { world.setBlockAndMetadataWithNotify(x, y, z, nextItem.itemID, nextItem.getItemDamage()); - // TODO Send the sound event to everyone around the player, and not just play the sound on the current client world.playSoundAtEntity(player, Sounds.TRANSMUTE, 0.5F, 1.0F); return true; } diff --git a/ee3_common/ee3/common/network/PacketKeyPressed.java b/ee3_common/ee3/common/network/PacketKeyPressed.java index f7978b4d..23607a27 100644 --- a/ee3_common/ee3/common/network/PacketKeyPressed.java +++ b/ee3_common/ee3/common/network/PacketKeyPressed.java @@ -38,7 +38,6 @@ public class PacketKeyPressed extends PacketEE { this.key = key; } - @Override public void writeData(DataOutputStream data) throws IOException { data.writeUTF(key); } diff --git a/ee3_common/ee3/common/network/PacketTileUpdate.java b/ee3_common/ee3/common/network/PacketTileUpdate.java index 3e8a6838..9d6b367f 100644 --- a/ee3_common/ee3/common/network/PacketTileUpdate.java +++ b/ee3_common/ee3/common/network/PacketTileUpdate.java @@ -52,7 +52,6 @@ public class PacketTileUpdate extends PacketEE { this.player = player; } - @Override public void writeData(DataOutputStream data) throws IOException { data.writeInt(x); data.writeInt(y);