From 4326ff3c647e6393ba38bd3e49a4309a940c5094 Mon Sep 17 00:00:00 2001 From: Progwml6 Date: Thu, 30 Jan 2014 04:47:45 -0500 Subject: [PATCH] fix moar things --- .../tinker/{sound => sounds}/frypan_hit.ogg | Bin .../{sound => sounds}/launcher_clank.ogg | Bin .../tinker/{sound => sounds}/little_saw.ogg | Bin resources/sounds.json | 20 ++++++++ src/main/java/tconstruct/TConstruct.java | 2 +- .../java/tconstruct/client/TClientEvents.java | 13 ++--- .../tconstruct/client/TClientTickHandler.java | 44 ++++++++--------- .../block/BlockRenderCastingChannel.java | 2 +- .../client/block/PaneConnectedRender.java | 2 +- .../tconstruct/client/block/PaneRender.java | 46 +++++++++--------- .../client/block/SlimeChannelRender.java | 4 +- .../client/block/TankAirRender.java | 6 +-- src/main/java/tconstruct/common/TRecipes.java | 2 +- .../java/tconstruct/common/TimeTicker.java | 43 ---------------- 14 files changed, 82 insertions(+), 102 deletions(-) rename resources/assets/tinker/{sound => sounds}/frypan_hit.ogg (100%) rename resources/assets/tinker/{sound => sounds}/launcher_clank.ogg (100%) rename resources/assets/tinker/{sound => sounds}/little_saw.ogg (100%) create mode 100644 resources/sounds.json delete mode 100644 src/main/java/tconstruct/common/TimeTicker.java diff --git a/resources/assets/tinker/sound/frypan_hit.ogg b/resources/assets/tinker/sounds/frypan_hit.ogg similarity index 100% rename from resources/assets/tinker/sound/frypan_hit.ogg rename to resources/assets/tinker/sounds/frypan_hit.ogg diff --git a/resources/assets/tinker/sound/launcher_clank.ogg b/resources/assets/tinker/sounds/launcher_clank.ogg similarity index 100% rename from resources/assets/tinker/sound/launcher_clank.ogg rename to resources/assets/tinker/sounds/launcher_clank.ogg diff --git a/resources/assets/tinker/sound/little_saw.ogg b/resources/assets/tinker/sounds/little_saw.ogg similarity index 100% rename from resources/assets/tinker/sound/little_saw.ogg rename to resources/assets/tinker/sounds/little_saw.ogg diff --git a/resources/sounds.json b/resources/sounds.json new file mode 100644 index 00000000000..fba310c2824 --- /dev/null +++ b/resources/sounds.json @@ -0,0 +1,20 @@ +{ + "frypan_hit": { + "category": "neutral", + "sounds": [ + "frypan_hit" + ] + }, + "little_saw": { + "category": "neutral", + "sounds": [ + "little_saw" + ] + }, + "frypan_hit": { + "category": "neutral", + "sounds": [ + "launcher_clank" + ] + } +} \ No newline at end of file diff --git a/src/main/java/tconstruct/TConstruct.java b/src/main/java/tconstruct/TConstruct.java index 8c4528c2356..e8bfaa7bdf4 100644 --- a/src/main/java/tconstruct/TConstruct.java +++ b/src/main/java/tconstruct/TConstruct.java @@ -157,7 +157,7 @@ public void init (FMLInitializationEvent event) } DimensionBlacklist.getBadBimensions(); - GameRegistry.registerWorldGenerator(new SlimeIslandGen(TRepo.slimePool), 2); + GameRegistry.registerWorldGenerator(new SlimeIslandGen(TRepo.slimePool,2), 2); PluginController.getController().init(); diff --git a/src/main/java/tconstruct/client/TClientEvents.java b/src/main/java/tconstruct/client/TClientEvents.java index 28e973f86f4..dbd1f5a7d16 100644 --- a/src/main/java/tconstruct/client/TClientEvents.java +++ b/src/main/java/tconstruct/client/TClientEvents.java @@ -49,11 +49,12 @@ public void onSound (SoundLoadEvent event) initSounds = true; try { - SoundManager soundmanager = event.manager; - soundmanager.addSound("tinker:frypan_hit.ogg"); - soundmanager.addSound("tinker:little_saw.ogg"); + /* SoundManager soundmanager = event.manager; + soundmanager.addSound("tinker:frypan_hit.ogg"); + soundmanager.addSound("tinker:little_saw.ogg"); soundmanager.addSound("tinker:launcher_clank.ogg"); TConstruct.logger.info("Successfully loaded sounds."); + */ } catch (Exception e) { @@ -71,7 +72,7 @@ public void onSound (SoundLoadEvent event) public void preStitch (TextureStitchEvent.Pre event) { TextureMap register = event.map; - if (register.textureType == 0) + if (register.getTextureType() == 0) { stillIcons[0] = register.registerIcon("tinker:liquid_pigiron"); flowIcons[0] = register.registerIcon("tinker:liquid_pigiron"); @@ -81,11 +82,11 @@ public void preStitch (TextureStitchEvent.Pre event) @SubscribeEvent public void postStitch (TextureStitchEvent.Post event) { - if (event.map.textureType == 0) + if (event.map.getTextureType() == 0) { for (int i = 0; i < TRepo.fluidBlocks.length; i++) { - TRepo.fluids[i].setIcons(TRepo.fluidBlocks[i].getIcon(0, 0), TRepo.fluidBlocks[i].getIcon(2, 0)); + TRepo.fluids[i].setIcons(TRepo.fluidBlocks[i].func_149691_a(0, 0), TRepo.fluidBlocks[i].func_149691_a(2, 0)); } TRepo.pigIronFluid.setIcons(stillIcons[0], flowIcons[0]); } diff --git a/src/main/java/tconstruct/client/TClientTickHandler.java b/src/main/java/tconstruct/client/TClientTickHandler.java index 5c734d45add..914ed0f9352 100644 --- a/src/main/java/tconstruct/client/TClientTickHandler.java +++ b/src/main/java/tconstruct/client/TClientTickHandler.java @@ -10,38 +10,38 @@ import tconstruct.TConstruct; import tconstruct.common.TContent; import tconstruct.common.TRepo; -import cpw.mods.fml.common.ITickHandler; -import cpw.mods.fml.common.TickType; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent; +import cpw.mods.fml.common.gameevent.TickEvent.Phase; +import cpw.mods.fml.common.gameevent.TickEvent.Type; -public class TClientTickHandler implements ITickHandler +public class TClientTickHandler { Minecraft mc = Minecraft.getMinecraft(); - //TControls controlInstance = ((TProxyClient)TConstruct.proxy).controlInstance; - @Override - public void tickEnd (EnumSet type, Object... tickData) - { - TRepo.oreBerry.setGraphicsLevel(Blocks.leaves.graphicsLevel); - TRepo.oreBerrySecond.setGraphicsLevel(Blocks.leaves.graphicsLevel); - TRepo.slimeLeaves.setGraphicsLevel(Blocks.leaves.graphicsLevel); - /*if (mc.thePlayer != null && !mc.thePlayer.isAirBorne) - controlInstance.landOnGround();*/ - } - - @Override - public EnumSet ticks () + //TControls controlInstance = ((TProxyClient)TConstruct.proxy).controlInstance; + public TClientTickHandler() { - return EnumSet.of(TickType.RENDER); } - @Override - public void tickStart (EnumSet type, Object... tickData) + @SubscribeEvent + public void onTick (ClientTickEvent event) { + + if (event.phase.equals(Phase.END) && event.type.equals(Type.RENDER)) + { + TRepo.oreBerry.setGraphicsLevel(Blocks.leaves.graphicsLevel); + TRepo.oreBerrySecond.setGraphicsLevel(Blocks.leaves.graphicsLevel); + TRepo.slimeLeaves.setGraphicsLevel(Blocks.leaves.graphicsLevel); + /*if (mc.thePlayer != null && !mc.thePlayer.isAirBorne) + controlInstance.landOnGround();*/ + } } - @Override - public String getLabel () + /* @Override + public EnumSet ticks () { - return null; + return EnumSet.of(TickType.RENDER); } +*/ } diff --git a/src/main/java/tconstruct/client/block/BlockRenderCastingChannel.java b/src/main/java/tconstruct/client/block/BlockRenderCastingChannel.java index cafdd95a99d..e2360c6b2e7 100644 --- a/src/main/java/tconstruct/client/block/BlockRenderCastingChannel.java +++ b/src/main/java/tconstruct/client/block/BlockRenderCastingChannel.java @@ -312,7 +312,7 @@ public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block private void renderLiquidPart (IBlockAccess world, int x, int y, int z, Block block, RenderBlocks renderer, CastingChannelLogic logic) { FluidStack liquid = logic.liquid; - int color = block.colorMultiplier(world, x, y, z); + int color = block.func_149720_d(world, x, y, z); float red = (color >> 16 & 0xFF) / 255.0F; float green = (color >> 8 & 0xFF) / 255.0F; float blue = (color & 0xFF) / 255.0F; diff --git a/src/main/java/tconstruct/client/block/PaneConnectedRender.java b/src/main/java/tconstruct/client/block/PaneConnectedRender.java index a68e470f2d6..7760598a234 100644 --- a/src/main/java/tconstruct/client/block/PaneConnectedRender.java +++ b/src/main/java/tconstruct/client/block/PaneConnectedRender.java @@ -79,7 +79,7 @@ public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block renderer.func_147784_q(block, x, y, z); } - renderer.clearOverrideBlockTexture(); + renderer.func_147771_a(); renderer.field_147837_f = false; return true; diff --git a/src/main/java/tconstruct/client/block/PaneRender.java b/src/main/java/tconstruct/client/block/PaneRender.java index 075945e5e4c..6a8ee44dd2a 100644 --- a/src/main/java/tconstruct/client/block/PaneRender.java +++ b/src/main/java/tconstruct/client/block/PaneRender.java @@ -9,6 +9,7 @@ import net.minecraft.client.renderer.Tessellator; import net.minecraft.util.IIcon; import net.minecraft.world.IBlockAccess; +import net.minecraftforge.common.util.ForgeDirection; import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler; import cpw.mods.fml.client.registry.RenderingRegistry; @@ -56,9 +57,9 @@ public static boolean renderPaneInWorld (RenderBlocks renderblocks, IBlockAccess { int l = iblockaccess.getHeight(); Tessellator tessellator = Tessellator.instance; - tessellator.setBrightness(pane.getMixedBrightnessForBlock(iblockaccess, x, y, z)); + tessellator.setBrightness(pane.func_149677_c(iblockaccess, x, y, z)); float f = 1.0F; - int i1 = pane.colorMultiplier(iblockaccess, x, y, z); + int i1 = pane.func_149720_d(iblockaccess, x, y, z); float f1 = (float) (i1 >> 16 & 0xff) / 255F; float f2 = (float) (i1 >> 8 & 0xff) / 255F; float f3 = (float) (i1 & 0xff) / 255F; @@ -76,8 +77,8 @@ public static boolean renderPaneInWorld (RenderBlocks renderblocks, IBlockAccess boolean flag1 = false; IIcon icon; IIcon icon1; - int meta = iblockaccess.func_147439_aMetadata(x, y, z); - icon = renderblocks.func_147439_aIconFromSideAndMetadata(pane, 0, meta); + int meta = iblockaccess.getBlockMetadata(x, y, z); + icon = renderblocks.func_147787_a(pane, 0, meta); icon1 = pane.getSideTextureIndex(meta); meta = icon.getIconWidth(); @@ -127,10 +128,11 @@ public static boolean renderPaneInWorld (RenderBlocks renderblocks, IBlockAccess double xMidUp = (double) x + 0.5D + 0.0625D; double zMidDown = ((double) z + 0.5D) - 0.0625D; double zMidUp = (double) z + 0.5D + 0.0625D; - boolean west = pane.canConnectTo(iblockaccess.func_147439_a(x, y, z - 1)); - boolean east = pane.canConnectTo(iblockaccess.func_147439_a(x, y, z + 1)); - boolean south = pane.canConnectTo(iblockaccess.func_147439_a(x - 1, y, z)); - boolean north = pane.canConnectTo(iblockaccess.func_147439_a(x + 1, y, z)); + boolean west = pane.canConnectTo(iblockaccess, x, y, z - 1, ForgeDirection.NORTH); + boolean east = pane.canConnectTo(iblockaccess, x, y, z + 1, ForgeDirection.SOUTH); + boolean south = pane.canConnectTo(iblockaccess, x - 1, y, z, ForgeDirection.EAST); + boolean north = pane.canConnectTo(iblockaccess, x + 1, y, z, ForgeDirection.WEST); + boolean renderAbove = pane.func_149646_a(iblockaccess, x, y + 1, z, 1); boolean renderBelow = pane.func_149646_a(iblockaccess, x, y - 1, z, 0); if ((!south || !north) && (south || north || west || east)) @@ -184,14 +186,14 @@ else if (!south && north) tessellator.addVertexWithUV(xMid, y + 0, zMidUp, d6, d9); tessellator.addVertexWithUV(xMid, y + 1, zMidUp, d6, d7); } - if (renderAbove || y < l - 1 && iblockaccess.isAirBlock(x + 1, y + 1, z)) + if (renderAbove || y < l - 1 && WorldHelper.isAirBlock(iblockaccess, x + 1, y + 1, z)) { tessellator.addVertexWithUV(xMid, (double) (y + 1) + 0.01D, zMidUp, d6, d7); tessellator.addVertexWithUV(xTop, (double) (y + 1) + 0.01D, zMidUp, d6, d8); tessellator.addVertexWithUV(xTop, (double) (y + 1) + 0.01D, zMidDown, d5, d8); tessellator.addVertexWithUV(xMid, (double) (y + 1) + 0.01D, zMidDown, d5, d7); } - if (renderBelow || y > 1 && iblockaccess.isAirBlock(x + 1, y - 1, z)) + if (renderBelow || y > 1 && WorldHelper.isAirBlock(iblockaccess, x + 1, y - 1, z)) { tessellator.addVertexWithUV(xMid, (double) y - 0.01D, zMidUp, d6, d7); tessellator.addVertexWithUV(xTop, (double) y - 0.01D, zMidUp, d6, d8); @@ -219,14 +221,14 @@ else if (!south && north) } else { - if (y < l - 1 && iblockaccess.isAirBlock(x - 1, y + 1, z)) + if (y < l - 1 && WorldHelper.isAirBlock(iblockaccess, x - 1, y + 1, z)) { tessellator.addVertexWithUV(xBot, (double) (y + 1) + 0.01D, zMidUp, d6, d8); tessellator.addVertexWithUV(xMid, (double) (y + 1) + 0.01D, zMidUp, d6, d9); tessellator.addVertexWithUV(xMid, (double) (y + 1) + 0.01D, zMidDown, d5, d9); tessellator.addVertexWithUV(xBot, (double) (y + 1) + 0.01D, zMidDown, d5, d8); } - if (y < l - 1 && iblockaccess.isAirBlock(x + 1, y + 1, z)) + if (y < l - 1 && WorldHelper.isAirBlock(iblockaccess, x + 1, y + 1, z)) { tessellator.addVertexWithUV(xMid, (double) (y + 1) + 0.01D, zMidUp, d6, d7); tessellator.addVertexWithUV(xTop, (double) (y + 1) + 0.01D, zMidUp, d6, d8); @@ -243,14 +245,14 @@ else if (!south && north) } else { - if (y > 1 && iblockaccess.isAirBlock(x - 1, y - 1, z)) + if (y > 1 && WorldHelper.isAirBlock(iblockaccess, x - 1, y - 1, z)) { tessellator.addVertexWithUV(xBot, (double) y - 0.01D, zMidUp, d6, d8); tessellator.addVertexWithUV(xMid, (double) y - 0.01D, zMidUp, d6, d9); tessellator.addVertexWithUV(xMid, (double) y - 0.01D, zMidDown, d5, d9); tessellator.addVertexWithUV(xBot, (double) y - 0.01D, zMidDown, d5, d8); } - if (y > 1 && iblockaccess.isAirBlock(x + 1, y - 1, z)) + if (y > 1 && WorldHelper.isAirBlock(iblockaccess, x + 1, y - 1, z)) { tessellator.addVertexWithUV(xMid, (double) y - 0.01D, zMidUp, d6, d7); tessellator.addVertexWithUV(xTop, (double) y - 0.01D, zMidUp, d6, d8); @@ -278,14 +280,14 @@ else if (!south && north) tessellator.addVertexWithUV(xMidUp, y + 0, zMid, d6, d9); tessellator.addVertexWithUV(xMidUp, y + 1, zMid, d6, d7); } - if (renderAbove || y < l - 1 && iblockaccess.isAirBlock(x, y + 1, z - 1)) + if (renderAbove || y < l - 1 && WorldHelper.isAirBlock(iblockaccess, x, y + 1, z - 1)) { tessellator.addVertexWithUV(xMidDown, y + 1, zBot, d6, d7); tessellator.addVertexWithUV(xMidDown, y + 1, zMid, d6, d8); tessellator.addVertexWithUV(xMidUp, y + 1, zMid, d5, d8); tessellator.addVertexWithUV(xMidUp, y + 1, zBot, d5, d7); } - if (renderBelow || y > 1 && iblockaccess.isAirBlock(x, y - 1, z - 1)) + if (renderBelow || y > 1 && WorldHelper.isAirBlock(iblockaccess, x, y - 1, z - 1)) { tessellator.addVertexWithUV(xMidDown, y, zBot, d6, d7); tessellator.addVertexWithUV(xMidDown, y, zMid, d6, d8); @@ -310,14 +312,14 @@ else if (!west && east) tessellator.addVertexWithUV(xMidDown, y + 0, zMid, d6, d9); tessellator.addVertexWithUV(xMidDown, y + 1, zMid, d6, d7); } - if (renderAbove || y < l - 1 && iblockaccess.isAirBlock(x, y + 1, z + 1)) + if (renderAbove || y < l - 1 && WorldHelper.isAirBlock(iblockaccess, x, y + 1, z + 1)) { tessellator.addVertexWithUV(xMidDown, y + 1, zMid, d5, d8); tessellator.addVertexWithUV(xMidDown, y + 1, zTop, d5, d9); tessellator.addVertexWithUV(xMidUp, y + 1, zTop, d6, d9); tessellator.addVertexWithUV(xMidUp, y + 1, zMid, d6, d8); } - if (renderBelow || y > 1 && iblockaccess.isAirBlock(x, y - 1, z + 1)) + if (renderBelow || y > 1 && WorldHelper.isAirBlock(iblockaccess, x, y - 1, z + 1)) { tessellator.addVertexWithUV(xMidDown, y, zMid, d5, d8); tessellator.addVertexWithUV(xMidDown, y, zTop, d5, d9); @@ -345,14 +347,14 @@ else if (!west && east) } else { - if (y < l - 1 && iblockaccess.isAirBlock(x, y + 1, z - 1)) + if (y < l - 1 && WorldHelper.isAirBlock(iblockaccess, x, y + 1, z - 1)) { tessellator.addVertexWithUV(xMidDown, y + 1, zBot, d6, d7); tessellator.addVertexWithUV(xMidDown, y + 1, zMid, d6, d8); tessellator.addVertexWithUV(xMidUp, y + 1, zMid, d5, d8); tessellator.addVertexWithUV(xMidUp, y + 1, zBot, d5, d7); } - if (y < l - 1 && iblockaccess.isAirBlock(x, y + 1, z + 1)) + if (y < l - 1 && WorldHelper.isAirBlock(iblockaccess, x, y + 1, z + 1)) { tessellator.addVertexWithUV(xMidDown, y + 1, zMid, d5, d8); tessellator.addVertexWithUV(xMidDown, y + 1, zTop, d5, d9); @@ -373,14 +375,14 @@ else if (!west && east) } else { - if (y > 1 && iblockaccess.isAirBlock(x, y - 1, z - 1)) + if (y > 1 && WorldHelper.isAirBlock(iblockaccess, x, y - 1, z - 1)) { tessellator.addVertexWithUV(xMidDown, y, zBot, d6, d7); tessellator.addVertexWithUV(xMidDown, y, zMid, d6, d8); tessellator.addVertexWithUV(xMidUp, y, zMid, d5, d8); tessellator.addVertexWithUV(xMidUp, y, zBot, d5, d7); } - if (y > 1 && iblockaccess.isAirBlock(x, y - 1, z + 1)) + if (y > 1 && WorldHelper.isAirBlock(iblockaccess, x, y - 1, z + 1)) { tessellator.addVertexWithUV(xMidDown, y, zMid, d5, d8); tessellator.addVertexWithUV(xMidDown, y, zTop, d5, d9); diff --git a/src/main/java/tconstruct/client/block/SlimeChannelRender.java b/src/main/java/tconstruct/client/block/SlimeChannelRender.java index f1a41735600..fea18d85a39 100644 --- a/src/main/java/tconstruct/client/block/SlimeChannelRender.java +++ b/src/main/java/tconstruct/client/block/SlimeChannelRender.java @@ -74,11 +74,11 @@ public boolean renderRotatedBlock (Block block, int x, int y, int z, IBlockAcces u3 = iconStill.getInterpolatedU(8.0F + (zFlow - xFlow) * 16.0F); v3 = iconStill.getInterpolatedV(8.0F + (-zFlow - xFlow) * 16.0F); } - int color = block.colorMultiplier(world, x, y, z); + int color = block.func_149720_d(world, x, y, z); float red = (color >> 16 & 255) / 255.0F; float green = (color >> 8 & 255) / 255.0F; float blue = (color & 255) / 255.0F; - tessellator.setBrightness(block.getMixedBrightnessForBlock(world, x, y, z)); + tessellator.setBrightness(block.func_149677_c(world, x, y, z)); tessellator.setColorOpaque_F(LIGHT_Y_POS * red, LIGHT_Y_POS * green, LIGHT_Y_POS * blue); tessellator.addVertexWithUV(x + 0, y + 0.5, z + 0, u2, v2); diff --git a/src/main/java/tconstruct/client/block/TankAirRender.java b/src/main/java/tconstruct/client/block/TankAirRender.java index 7ecb82e8938..89e15cb27ce 100644 --- a/src/main/java/tconstruct/client/block/TankAirRender.java +++ b/src/main/java/tconstruct/client/block/TankAirRender.java @@ -36,9 +36,9 @@ public boolean renderWorldBlock (IBlockAccess world, int x, int y, int z, Block if (item.getItem() instanceof ItemBlock) { Block inv = BlockUtils.getBlockFromItemStack(item); - renderer.setOverrideBlockTexture(inv.func_149691_a(1, item.getItemDamage())); - renderer.renderBlockByRenderType(inv, x, y, z); - renderer.clearOverrideBlockTexture(); + renderer.func_147757_a(inv.func_149691_a(1, item.getItemDamage())); + renderer.func_147805_b(inv, x, y, z); + renderer.func_147771_a(); } } else if (logic.hasFluids()) diff --git a/src/main/java/tconstruct/common/TRecipes.java b/src/main/java/tconstruct/common/TRecipes.java index a7687e79974..52a6e0d0cc0 100644 --- a/src/main/java/tconstruct/common/TRecipes.java +++ b/src/main/java/tconstruct/common/TRecipes.java @@ -508,7 +508,7 @@ protected static void addRecipesForCraftingTable () GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 2, 1), Items.clay_ball, Blocks.sand, Blocks.gravel); GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 8, 1), new ItemStack(Blocks.clay, 1, Short.MAX_VALUE), Blocks.sand, Blocks.sand, Blocks.sand, Blocks.sand, Blocks.gravel, Blocks.gravel, Blocks.gravel, Blocks.gravel); - GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 2, 6), Items.netherStalkSeeds, Blocks.soul_sand, Blocks.gravel); + GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 2, 6), Items.nether_wart, Blocks.soul_sand, Blocks.gravel); // Graveyard Soil Recipes GameRegistry.addShapelessRecipe(new ItemStack(TRepo.craftedSoil, 1, 3), Blocks.dirt, Items.rotten_flesh, new ItemStack(Items.dye, 1, 15)); // Silky Cloth Recipes diff --git a/src/main/java/tconstruct/common/TimeTicker.java b/src/main/java/tconstruct/common/TimeTicker.java deleted file mode 100644 index 80515eaaca0..00000000000 --- a/src/main/java/tconstruct/common/TimeTicker.java +++ /dev/null @@ -1,43 +0,0 @@ -package tconstruct.common; - -import java.util.EnumSet; - -import cpw.mods.fml.common.ITickHandler; -import cpw.mods.fml.common.TickType; -import tconstruct.TConstruct; - -public class TimeTicker implements ITickHandler -{ - public static long time = 0; - public static int tickParts = 0; - public static int seconds = 0; - public static int minutes = 0; - - @Override - public void tickStart (EnumSet type, Object... tickData) - { - TConstruct.logger.info("Tick"); - time++; - tickParts = (int) (time % 20); - seconds = (int) (time / 20); - minutes = (int) (time / 1200); - } - - @Override - public void tickEnd (EnumSet type, Object... tickData) - { - } - - @Override - public EnumSet ticks () - { - return EnumSet.of(TickType.WORLD); - } - - @Override - public String getLabel () - { - return null; - } - -}