From 7a3fc461d0db89c513f1507711710acc335a1095 Mon Sep 17 00:00:00 2001 From: DarkGuardsman Date: Thu, 11 Jul 2013 04:40:07 -0400 Subject: [PATCH] removed all update errors from MC1.6 --- src/minecraft/dark/core/api/INetworkPart.java | 2 +- .../helpers/FluidRestrictionHandler.java | 6 +----- .../core/tile/network/NetworkTileEntities.java | 2 +- .../dark/helpers/PlayerMsgHelper.java | 2 +- src/minecraft/dark/library/effects/FXBeam.java | 7 +++++-- .../dark/library/gui/GuiGlobalList.java | 18 +++++++++--------- .../dark/library/machine/BlockMachine.java | 5 +++++ .../machine/TileEntityElectricMachine.java | 10 +++++----- .../machine/TileEntityRunnableMachine.java | 4 ++-- 9 files changed, 30 insertions(+), 26 deletions(-) diff --git a/src/minecraft/dark/core/api/INetworkPart.java b/src/minecraft/dark/core/api/INetworkPart.java index bcdeba56..3029770a 100644 --- a/src/minecraft/dark/core/api/INetworkPart.java +++ b/src/minecraft/dark/core/api/INetworkPart.java @@ -15,7 +15,7 @@ public interface INetworkPart extends ITileConnector /** * Update the connection this tile has to other tiles */ - public void updateNetworkConnections(); + public void refresh(); /** * Gets the networkPart's primary network diff --git a/src/minecraft/dark/core/hydraulic/helpers/FluidRestrictionHandler.java b/src/minecraft/dark/core/hydraulic/helpers/FluidRestrictionHandler.java index fa5b30d5..ce536f52 100644 --- a/src/minecraft/dark/core/hydraulic/helpers/FluidRestrictionHandler.java +++ b/src/minecraft/dark/core/hydraulic/helpers/FluidRestrictionHandler.java @@ -4,10 +4,6 @@ import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidRegistry.FluidRegisterEvent; -import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.liquids.LiquidDictionary; -import net.minecraftforge.liquids.LiquidDictionary.LiquidRegisterEvent; -import net.minecraftforge.liquids.LiquidStack; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; @@ -78,6 +74,6 @@ public class FluidRestrictionHandler { return true; } - return FluidRestrictionHandler.hasRestrictedStack(color.ordinal()) && FluidRestrictionHandler.getStackForColor(color).isEqual(stack); + return FluidRestrictionHandler.hasRestrictedStack(color.ordinal()) && FluidRestrictionHandler.getStackForColor(color).equals(stack); } } diff --git a/src/minecraft/dark/core/tile/network/NetworkTileEntities.java b/src/minecraft/dark/core/tile/network/NetworkTileEntities.java index 755c6e76..47cae84a 100644 --- a/src/minecraft/dark/core/tile/network/NetworkTileEntities.java +++ b/src/minecraft/dark/core/tile/network/NetworkTileEntities.java @@ -112,7 +112,7 @@ public abstract class NetworkTileEntities while (it.hasNext()) { INetworkPart conductor = it.next(); - conductor.updateNetworkConnections(); + conductor.refresh(); } } catch (Exception e) diff --git a/src/minecraft/dark/helpers/PlayerMsgHelper.java b/src/minecraft/dark/helpers/PlayerMsgHelper.java index 97f32ff4..3f41b86e 100644 --- a/src/minecraft/dark/helpers/PlayerMsgHelper.java +++ b/src/minecraft/dark/helpers/PlayerMsgHelper.java @@ -37,7 +37,7 @@ public class PlayerMsgHelper while (it.hasNext() && canSee) { EntityPlayer player = it.next(); - if (world.rayTraceBlocks(loc.toVec3(), new Vector3(player).add(new Vector3(0, player.getEyeHeight(), 0)).toVec3()) != null) + if (world.rayTraceBlocks_do_do(loc.toVec3(), new Vector3(player).add(new Vector3(0, player.getEyeHeight(), 0)).toVec3(), canSee, canSee) != null) { it.remove(); } diff --git a/src/minecraft/dark/library/effects/FXBeam.java b/src/minecraft/dark/library/effects/FXBeam.java index 79097489..fbecf3b0 100644 --- a/src/minecraft/dark/library/effects/FXBeam.java +++ b/src/minecraft/dark/library/effects/FXBeam.java @@ -5,6 +5,7 @@ import java.awt.Color; import net.minecraft.client.Minecraft; import net.minecraft.client.particle.EntityFX; import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.resources.ResourceLocation; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase; import net.minecraft.util.MathHelper; @@ -12,6 +13,8 @@ import net.minecraft.world.World; import org.lwjgl.opengl.GL11; +import cpw.mods.fml.client.FMLClientHandler; + import universalelectricity.core.vector.Vector3; import dark.core.DarkMain; @@ -145,7 +148,7 @@ public class FXBeam extends EntityFX op = 0.5F - (4 - (this.particleMaxAge - this.particleAge)) * 0.1F; } - Minecraft.getMinecraft().renderEngine.bindTexture(this.texture); + FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation(this.texture)); GL11.glTexParameterf(3553, 10242, 10497.0F); GL11.glTexParameterf(3553, 10243, 10497.0F); @@ -207,6 +210,6 @@ public class FXBeam extends EntityFX tessellator.startDrawingQuads(); this.prevSize = size; - Minecraft.getMinecraft().renderEngine.bindTexture("/particles.png"); + FMLClientHandler.instance().getClient().renderEngine.func_110577_a(new ResourceLocation("/particles.png")); } } \ No newline at end of file diff --git a/src/minecraft/dark/library/gui/GuiGlobalList.java b/src/minecraft/dark/library/gui/GuiGlobalList.java index 2096a002..f3609944 100644 --- a/src/minecraft/dark/library/gui/GuiGlobalList.java +++ b/src/minecraft/dark/library/gui/GuiGlobalList.java @@ -7,8 +7,8 @@ import java.util.List; import java.util.Map.Entry; import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.resources.ResourceLocation; import net.minecraft.entity.player.EntityPlayer; @@ -24,7 +24,7 @@ import dark.core.api.IScroll; import dark.library.access.UserAccess; @SideOnly(Side.CLIENT) -public class GuiGlobalList extends GuiScreen implements IScroll +public class GuiGlobalList extends GuiContainer implements IScroll { EntityPlayer player; private GuiTextField stringInput; @@ -34,7 +34,7 @@ public class GuiGlobalList extends GuiScreen implements IScroll public GuiGlobalList(EntityPlayer player) { - super(); + super(new ContainerFake(null)); this.player = player; } @@ -122,23 +122,23 @@ public class GuiGlobalList extends GuiScreen implements IScroll } @Override - protected void drawForegroundLayer(int x, int y, float var1) + protected void drawGuiContainerForegroundLayer(int x, int y) { String title = "Global Access Interface"; - this.fontRenderer.drawString("\u00a77" + title, this.xSize / 2 - title.length() * 3, 4, 4210752); + this.fontRenderer.drawString("\u00a77" + title, this.width / 2 - title.length() * 3, 4, 4210752); } @Override - protected void drawBackgroundLayer(int x, int y, float var1) + protected void drawGuiContainerBackgroundLayer(float f, int i, int j) { ResourceLocation name = new ResourceLocation(DarkMain.GUI_DIRECTORY + ":gui_access_base.png"); this.mc.renderEngine.func_110577_a(name); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - int containerWidth = (this.width - this.xSize) / 2; - int containerHeight = (this.height - this.ySize) / 2; - this.drawTexturedModalRect(containerWidth, containerHeight, 0, 0, this.xSize, this.ySize); + int containerWidth = (this.width - this.width) / 2; + int containerHeight = (this.height - this.height) / 2; + this.drawTexturedModalRect(containerWidth, containerHeight, 0, 0, this.width, this.height); } diff --git a/src/minecraft/dark/library/machine/BlockMachine.java b/src/minecraft/dark/library/machine/BlockMachine.java index f81b8ee6..06ca03da 100644 --- a/src/minecraft/dark/library/machine/BlockMachine.java +++ b/src/minecraft/dark/library/machine/BlockMachine.java @@ -25,6 +25,7 @@ public class BlockMachine extends BlockAdvanced implements ITileEntityProvider public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) { super.breakBlock(par1World, par2, par3, par4, par5, par6); + this.dropEntireInventory(par1World, par2, par3, par4, par5, par6); par1World.removeBlockTileEntity(par2, par3, par4); } @@ -44,5 +45,9 @@ public class BlockMachine extends BlockAdvanced implements ITileEntityProvider // TODO Auto-generated method stub return null; } + + public void dropEntireInventory(World par1World, int x, int y, int z, int par5, int par6) + { + } } diff --git a/src/minecraft/dark/library/machine/TileEntityElectricMachine.java b/src/minecraft/dark/library/machine/TileEntityElectricMachine.java index a53543ed..9c00f591 100644 --- a/src/minecraft/dark/library/machine/TileEntityElectricMachine.java +++ b/src/minecraft/dark/library/machine/TileEntityElectricMachine.java @@ -24,9 +24,9 @@ public abstract class TileEntityElectricMachine extends TileEntityAdvanced imple /** Remaining ticks of time to remain disabled */ protected int ticksDisabled = 0; /** Max energy storage limit */ - protected int maxEnergy; + protected float maxEnergy; /** Energy needed to run per tick regardless of function */ - protected int tickEnergy; + protected float tickEnergy; /** Should this machine run without power */ @@ -36,10 +36,10 @@ public abstract class TileEntityElectricMachine extends TileEntityAdvanced imple private IPowerProvider powerProvider; - public TileEntityElectricMachine(int maxEnergy, int tickEnergy) + public TileEntityElectricMachine(float d, float d2) { - this.maxEnergy = maxEnergy; - this.tickEnergy = tickEnergy; + this.maxEnergy = d; + this.tickEnergy = d2; } @Override diff --git a/src/minecraft/dark/library/machine/TileEntityRunnableMachine.java b/src/minecraft/dark/library/machine/TileEntityRunnableMachine.java index 936f66ea..3a9b96d7 100644 --- a/src/minecraft/dark/library/machine/TileEntityRunnableMachine.java +++ b/src/minecraft/dark/library/machine/TileEntityRunnableMachine.java @@ -8,9 +8,9 @@ import dark.core.PowerSystems; public class TileEntityRunnableMachine extends TileEntityElectricMachine { - public TileEntityRunnableMachine(int tickEnergy) + public TileEntityRunnableMachine(float d) { - super(tickEnergy * 2, tickEnergy); + super(d * 2, d); } /** Forge Ore Directory name of the item to toggle power */