From a4435994e727262bba7be9482c032c0edf3bec5a Mon Sep 17 00:00:00 2001 From: DarkGuardsman Date: Mon, 8 Jul 2013 03:14:00 -0400 Subject: [PATCH] Init update to 1.6 Mostly done but just a few textures refs too go --- .../client/render/RenderArmbot.java | 8 ++++--- .../client/render/RenderConveyorBelt.java | 16 +++++++++---- .../client/render/RenderCraneController.java | 4 +++- .../client/render/RenderCraneFrame.java | 4 +++- .../client/render/RenderCrate.java | 4 ++-- .../client/render/RenderManipulator.java | 7 ++++-- .../client/render/RenderRejector.java | 4 +++- .../common/armbot/TileEntityArmbot.java | 13 +++++----- .../common/imprinter/ContainerImprinter.java | 4 ++-- .../common/imprinter/ItemImprinter.java | 2 +- .../common/imprinter/TileEntityImprinter.java | 6 ++--- .../imprinter/prefab/BlockImprintable.java | 3 ++- .../common/machine/BlockAssembly.java | 24 ------------------- .../common/machine/BlockCrate.java | 2 +- .../common/machine/BlockTurntable.java | 3 ++- .../common/machine/TileEntityCrate.java | 4 ++-- .../machine/belt/BlockConveyorBelt.java | 22 +++++++---------- .../machine/crane/BlockCraneController.java | 7 +++--- .../machine/detector/BlockDetector.java | 8 +++---- .../machine/encoder/TileEntityEncoder.java | 2 +- 20 files changed, 67 insertions(+), 80 deletions(-) diff --git a/src/minecraft/assemblyline/client/render/RenderArmbot.java b/src/minecraft/assemblyline/client/render/RenderArmbot.java index 3b694206..27249f15 100644 --- a/src/minecraft/assemblyline/client/render/RenderArmbot.java +++ b/src/minecraft/assemblyline/client/render/RenderArmbot.java @@ -1,10 +1,11 @@ package assemblyline.client.render; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.RenderEngine; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.client.resources.ResourceLocation; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -42,8 +43,9 @@ public class RenderArmbot extends TileEntitySpecialRenderer } } } + ResourceLocation name = new ResourceLocation(AssemblyLine.MODEL_TEXTURES_PATH + ":" + TEXTURE); + func_110628_a(name); - this.bindTextureByName(AssemblyLine.MODEL_TEXTURES_PATH + TEXTURE); GL11.glPushMatrix(); GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); GL11.glScalef(1.0F, -1F, -1F); @@ -56,7 +58,7 @@ public class RenderArmbot extends TileEntitySpecialRenderer handPosition.add(0.5); handPosition.add(new Vector3(x, y, z)); RenderItem renderItem = ((RenderItem) RenderManager.instance.getEntityClassRenderObject(EntityItem.class)); - RenderEngine renderEngine = Minecraft.getMinecraft().renderEngine; + TextureManager renderEngine = Minecraft.getMinecraft().renderEngine; for (ItemStack itemStack : ((TileEntityArmbot) tileEntity).getGrabbedItems()) { diff --git a/src/minecraft/assemblyline/client/render/RenderConveyorBelt.java b/src/minecraft/assemblyline/client/render/RenderConveyorBelt.java index 77680801..a3946dfd 100644 --- a/src/minecraft/assemblyline/client/render/RenderConveyorBelt.java +++ b/src/minecraft/assemblyline/client/render/RenderConveyorBelt.java @@ -1,6 +1,7 @@ package assemblyline.client.render; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.client.resources.ResourceLocation; import net.minecraft.tileentity.TileEntity; import org.lwjgl.opengl.GL11; @@ -10,6 +11,7 @@ import assemblyline.client.model.ModelConveyorBelt; import assemblyline.common.AssemblyLine; import assemblyline.common.machine.belt.TileEntityConveyorBelt; import assemblyline.common.machine.belt.TileEntityConveyorBelt.SlantType; +import assemblyline.common.machine.crane.TileEntityCraneController; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -51,7 +53,9 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer if (slantType == SlantType.UP) { - this.bindTextureByName(AssemblyLine.MODEL_TEXTURES_PATH + "slantedbelt/frame" + frame + ".png"); + ResourceLocation name = new ResourceLocation(AssemblyLine.MODEL_TEXTURES_PATH + ":" + "slantedbelt/frame" + frame + ".png"); + func_110628_a(name); + GL11.glTranslatef(0f, 0.8f, -0.8f); GL11.glRotatef(180f, 0f, 1f, 1f); boolean slantAdjust = false; @@ -71,7 +75,8 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer } else if (slantType == SlantType.DOWN) { - this.bindTextureByName(AssemblyLine.MODEL_TEXTURES_PATH + "slantedbelt/frame" + frame + ".png"); + ResourceLocation name = new ResourceLocation(AssemblyLine.MODEL_TEXTURES_PATH + ":" + "slantedbelt/frame" + frame + ".png"); + func_110628_a(name); GL11.glRotatef(180f, 0f, 1f, 0f); boolean slantAdjust = false; TileEntity test = tileEntity.worldObj.getBlockTileEntity(tileEntity.xCoord - tileEntity.getDirection().offsetX, tileEntity.yCoord, tileEntity.zCoord - tileEntity.getDirection().offsetZ); @@ -91,7 +96,8 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer } else { - this.bindTextureByName(AssemblyLine.MODEL_TEXTURES_PATH + "belt/frame" + frame + ".png"); + ResourceLocation name = new ResourceLocation(AssemblyLine.MODEL_TEXTURES_PATH + ":" + "belt/frame" + frame + ".png"); + func_110628_a(name); GL11.glRotatef(180, 0f, 1f, 0f); GL11.glTranslatef(0f, -0.68f, 0f); MODEL.render(0.0625f, (float) Math.toRadians(tileEntity.wheelRotation), tileEntity.getIsLastBelt(), tileEntity.getIsFirstBelt(), false, false); @@ -114,8 +120,8 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer GL11.glRotatef(90f, 0f, 1f, 0f); break; } - - this.bindTextureByName(AssemblyLine.MODEL_TEXTURES_PATH + "belt/frame" + frame + ".png"); + ResourceLocation name = new ResourceLocation(AssemblyLine.MODEL_TEXTURES_PATH + ":" + "belt/frame" + frame + ".png"); + func_110628_a(name); MODEL.render(0.0625F, (float) Math.toRadians(tileEntity.wheelRotation), tileEntity.getIsLastBelt(), tileEntity.getIsFirstBelt(), false, true); } diff --git a/src/minecraft/assemblyline/client/render/RenderCraneController.java b/src/minecraft/assemblyline/client/render/RenderCraneController.java index 227982ec..d6207324 100644 --- a/src/minecraft/assemblyline/client/render/RenderCraneController.java +++ b/src/minecraft/assemblyline/client/render/RenderCraneController.java @@ -6,6 +6,7 @@ import static org.lwjgl.opengl.GL11.glPopMatrix; import static org.lwjgl.opengl.GL11.glPushMatrix; import static org.lwjgl.opengl.GL11.glRotatef; import static org.lwjgl.opengl.GL11.glTranslated; +import net.minecraft.client.resources.ResourceLocation; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.ForgeDirection; import assemblyline.client.model.ModelCraneController; @@ -24,7 +25,8 @@ public class RenderCraneController extends RenderImprintable { if (tileEntity != null && tileEntity instanceof TileEntityCraneController) { - this.bindTextureByName(AssemblyLine.MODEL_TEXTURES_PATH + (((TileEntityCraneController) tileEntity).isCraneValid() ? TEXTURE_VALID : TEXTURE)); + ResourceLocation name = new ResourceLocation(AssemblyLine.MODEL_TEXTURES_PATH + ":" + (((TileEntityCraneController) tileEntity).isCraneValid() ? TEXTURE_VALID : TEXTURE)); + func_110628_a(name); ForgeDirection front = ForgeDirection.getOrientation(tileEntity.worldObj.getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord)); ForgeDirection right = CraneHelper.rotateClockwise(front); float angle = 0f; diff --git a/src/minecraft/assemblyline/client/render/RenderCraneFrame.java b/src/minecraft/assemblyline/client/render/RenderCraneFrame.java index c599a91e..3a35baf7 100644 --- a/src/minecraft/assemblyline/client/render/RenderCraneFrame.java +++ b/src/minecraft/assemblyline/client/render/RenderCraneFrame.java @@ -7,6 +7,7 @@ import static org.lwjgl.opengl.GL11.glPushMatrix; import static org.lwjgl.opengl.GL11.glRotatef; import static org.lwjgl.opengl.GL11.glTranslated; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; +import net.minecraft.client.resources.ResourceLocation; import net.minecraft.tileentity.TileEntity; import net.minecraftforge.common.ForgeDirection; import assemblyline.client.model.ModelCraneRail; @@ -41,7 +42,8 @@ public class RenderCraneFrame extends TileEntitySpecialRenderer boolean renderFoot = tileEntity.worldObj.isBlockSolidOnSide(tX, tY - 1, tZ, ForgeDirection.UP); if ((renderLeft && renderRight) || (renderFront && renderBack)) renderFoot = false; - this.bindTextureByName(AssemblyLine.MODEL_TEXTURES_PATH + TEXTURE); + ResourceLocation name = new ResourceLocation(AssemblyLine.MODEL_TEXTURES_PATH + ":" + TEXTURE); + func_110628_a(name); glPushMatrix(); glTranslated(x + 0.5, y + 1.5, z + 0.5); glRotatef(180f, 0f, 0f, 1f); diff --git a/src/minecraft/assemblyline/client/render/RenderCrate.java b/src/minecraft/assemblyline/client/render/RenderCrate.java index 92baa34f..3c37dd68 100644 --- a/src/minecraft/assemblyline/client/render/RenderCrate.java +++ b/src/minecraft/assemblyline/client/render/RenderCrate.java @@ -4,9 +4,9 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.RenderBlocks; -import net.minecraft.client.renderer.RenderEngine; import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.entity.item.EntityItem; import net.minecraft.item.ItemStack; @@ -82,7 +82,7 @@ public class RenderCrate extends TileEntitySpecialRenderer GL11.glScalef(0.6f * scale, 0.6f * scale, 0); GL11.glRotatef(180, 0, 0, 1); - RenderEngine renderEngine = Minecraft.getMinecraft().renderEngine; + TextureManager renderEngine = Minecraft.getMinecraft().renderEngine; GL11.glDisable(2896); if (!ForgeHooksClient.renderInventoryItem(this.renderBlocks, renderEngine, itemStack, true, 0.0F, 0.0F, 0.0F)) diff --git a/src/minecraft/assemblyline/client/render/RenderManipulator.java b/src/minecraft/assemblyline/client/render/RenderManipulator.java index 556c6083..7828154b 100644 --- a/src/minecraft/assemblyline/client/render/RenderManipulator.java +++ b/src/minecraft/assemblyline/client/render/RenderManipulator.java @@ -1,5 +1,6 @@ package assemblyline.client.render; +import net.minecraft.client.resources.ResourceLocation; import net.minecraft.tileentity.TileEntity; import org.lwjgl.opengl.GL11; @@ -22,11 +23,13 @@ public class RenderManipulator extends RenderImprintable if (tileEntity.isOutput()) { - this.bindTextureByName(AssemblyLine.MODEL_TEXTURES_PATH + "manipulator1.png"); + ResourceLocation name = new ResourceLocation(AssemblyLine.MODEL_TEXTURES_PATH + ":manipulator1.png"); + func_110628_a(name); } else { - this.bindTextureByName(AssemblyLine.MODEL_TEXTURES_PATH + "manipulator2.png"); + ResourceLocation name = new ResourceLocation(AssemblyLine.MODEL_TEXTURES_PATH + ":manipulator2.png"); + func_110628_a(name); } if (face == 2) diff --git a/src/minecraft/assemblyline/client/render/RenderRejector.java b/src/minecraft/assemblyline/client/render/RenderRejector.java index 32e47b3e..eecca35d 100644 --- a/src/minecraft/assemblyline/client/render/RenderRejector.java +++ b/src/minecraft/assemblyline/client/render/RenderRejector.java @@ -1,5 +1,6 @@ package assemblyline.client.render; +import net.minecraft.client.resources.ResourceLocation; import net.minecraft.tileentity.TileEntity; import org.lwjgl.opengl.GL11; @@ -22,7 +23,8 @@ public class RenderRejector extends RenderImprintable { pos = 8; } - bindTextureByName(AssemblyLine.MODEL_TEXTURES_PATH + "rejector.png"); + ResourceLocation name = new ResourceLocation(AssemblyLine.MODEL_TEXTURES_PATH + ":rejector.png"); + func_110628_a(name); GL11.glPushMatrix(); GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); GL11.glScalef(1.0F, -1F, -1F); diff --git a/src/minecraft/assemblyline/common/armbot/TileEntityArmbot.java b/src/minecraft/assemblyline/common/armbot/TileEntityArmbot.java index dcc22a0c..7ae5ca49 100644 --- a/src/minecraft/assemblyline/common/armbot/TileEntityArmbot.java +++ b/src/minecraft/assemblyline/common/armbot/TileEntityArmbot.java @@ -902,12 +902,6 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock, return false; } - @Override - public boolean isStackValidForSlot(int i, ItemStack itemstack) - { - return false; - } - @Override public double getWattLoad() { @@ -917,4 +911,11 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock, } return .1; } + + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) + { + // TODO Auto-generated method stub + return false; + } } diff --git a/src/minecraft/assemblyline/common/imprinter/ContainerImprinter.java b/src/minecraft/assemblyline/common/imprinter/ContainerImprinter.java index 46e4c00c..582e24c4 100644 --- a/src/minecraft/assemblyline/common/imprinter/ContainerImprinter.java +++ b/src/minecraft/assemblyline/common/imprinter/ContainerImprinter.java @@ -69,9 +69,9 @@ public class ContainerImprinter extends Container implements ISlotWatcher } @Override - public void onCraftGuiClosed(EntityPlayer par1EntityPlayer) + public void onContainerClosed(EntityPlayer par1EntityPlayer) { - super.onCraftGuiClosed(par1EntityPlayer); + super.onContainerClosed(par1EntityPlayer); this.tileEntity.closeChest(); } diff --git a/src/minecraft/assemblyline/common/imprinter/ItemImprinter.java b/src/minecraft/assemblyline/common/imprinter/ItemImprinter.java index f9bbe882..5ff37ae3 100644 --- a/src/minecraft/assemblyline/common/imprinter/ItemImprinter.java +++ b/src/minecraft/assemblyline/common/imprinter/ItemImprinter.java @@ -47,7 +47,7 @@ public class ItemImprinter extends Item { String stringName = EntityList.getEntityString(entity); // TODO add to filter - player.sendChatToPlayer("Target: " + stringName); + //player.sendChatToPlayer("Target: " + stringName); return true; } return false; diff --git a/src/minecraft/assemblyline/common/imprinter/TileEntityImprinter.java b/src/minecraft/assemblyline/common/imprinter/TileEntityImprinter.java index 2e6cc4cf..03fcfd1a 100644 --- a/src/minecraft/assemblyline/common/imprinter/TileEntityImprinter.java +++ b/src/minecraft/assemblyline/common/imprinter/TileEntityImprinter.java @@ -515,7 +515,7 @@ public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInv } @Override - public boolean isStackValidForSlot(int i, ItemStack itemstack) + public boolean isItemValidForSlot(int i, ItemStack itemstack) { return true; } @@ -542,13 +542,13 @@ public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInv @Override public boolean canInsertItem(int slot, ItemStack itemstack, int side) { - return this.isStackValidForSlot(slot, itemstack); + return this.isItemValidForSlot(slot, itemstack); } @Override public boolean canExtractItem(int slot, ItemStack itemstack, int side) { - return this.isStackValidForSlot(slot, itemstack); + return this.isItemValidForSlot(slot, itemstack); } @Override diff --git a/src/minecraft/assemblyline/common/imprinter/prefab/BlockImprintable.java b/src/minecraft/assemblyline/common/imprinter/prefab/BlockImprintable.java index cc44505a..4f1da402 100644 --- a/src/minecraft/assemblyline/common/imprinter/prefab/BlockImprintable.java +++ b/src/minecraft/assemblyline/common/imprinter/prefab/BlockImprintable.java @@ -3,6 +3,7 @@ package assemblyline.common.imprinter.prefab; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -113,7 +114,7 @@ public abstract class BlockImprintable extends BlockAssembly } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLiving par5EntityLiving, ItemStack stack) + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase par5EntityLiving, ItemStack stack) { int angle = MathHelper.floor_double((par5EntityLiving.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; int change = 2; diff --git a/src/minecraft/assemblyline/common/machine/BlockAssembly.java b/src/minecraft/assemblyline/common/machine/BlockAssembly.java index d11e2be7..13fdd400 100644 --- a/src/minecraft/assemblyline/common/machine/BlockAssembly.java +++ b/src/minecraft/assemblyline/common/machine/BlockAssembly.java @@ -29,30 +29,6 @@ public class BlockAssembly extends BlockAdvanced this.setCreativeTab(TabAssemblyLine.INSTANCE); } - @Override - public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer entityPlayer, int side, float hitX, float hitY, float hitZ) - { - ItemStack stack = entityPlayer.getHeldItem(); - TileEntity ent = world.getBlockTileEntity(x, y, z); - if (!world.isRemote && stack != null && stack.itemID == Item.stick.itemID && ent instanceof TileEntityAssembly && entityPlayer != null) - { - TileEntityAssembly asm = (TileEntityAssembly) ent; - String output = "Debug>>>"; - output += "Channel:" + (asm.getTileNetwork() != null ? asm.getTileNetwork().toString() : "Error") + "|"; - entityPlayer.sendChatToPlayer(output); - output = "Debug>>>"; - output += "Powered:" + asm.running + " "; - if (asm.getTileNetwork() instanceof NetworkAssembly) - { - output += ElectricityDisplay.getDisplaySimple(((NetworkAssembly) asm.getTileNetwork()).getCurrentBattery(), ElectricUnit.WATT, 2); - output += "/"; - output += ElectricityDisplay.getDisplaySimple(((NetworkAssembly) asm.getTileNetwork()).getMaxBattery(), ElectricUnit.WATT, 2); - } - entityPlayer.sendChatToPlayer(output); - } - return super.onBlockActivated(world, x, y, z, entityPlayer, side, hitX, hitY, hitZ); - } - @SideOnly(Side.CLIENT) @Override public void registerIcons(IconRegister iconReg) diff --git a/src/minecraft/assemblyline/common/machine/BlockCrate.java b/src/minecraft/assemblyline/common/machine/BlockCrate.java index e6f9ec2d..295a3b6e 100644 --- a/src/minecraft/assemblyline/common/machine/BlockCrate.java +++ b/src/minecraft/assemblyline/common/machine/BlockCrate.java @@ -330,7 +330,7 @@ public class BlockCrate extends BlockAssembly */ public static ItemStack addStackToCrate(TileEntityCrate tileEntity, ItemStack itemStack) { - if (itemStack == null || itemStack.getItem().isDamageable() && itemStack.getItem().getItemDamageFromStack(itemStack) > 0) + if (itemStack == null || itemStack.getItem().isDamageable() && itemStack.getItem().getDamage(itemStack) > 0) { return itemStack; } diff --git a/src/minecraft/assemblyline/common/machine/BlockTurntable.java b/src/minecraft/assemblyline/common/machine/BlockTurntable.java index b6d6553f..958a1b08 100644 --- a/src/minecraft/assemblyline/common/machine/BlockTurntable.java +++ b/src/minecraft/assemblyline/common/machine/BlockTurntable.java @@ -6,6 +6,7 @@ import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -84,7 +85,7 @@ public class BlockTurntable extends BlockAssembly } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLiving par5EntityLiving, ItemStack stack) + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase par5EntityLiving, ItemStack stack) { int metadata = determineOrientation(world, x, y, z, (EntityPlayer) par5EntityLiving); world.setBlockMetadataWithNotify(x, y, z, metadata, 3); diff --git a/src/minecraft/assemblyline/common/machine/TileEntityCrate.java b/src/minecraft/assemblyline/common/machine/TileEntityCrate.java index 3f6ab5b6..7c698174 100644 --- a/src/minecraft/assemblyline/common/machine/TileEntityCrate.java +++ b/src/minecraft/assemblyline/common/machine/TileEntityCrate.java @@ -417,7 +417,7 @@ public class TileEntityCrate extends TileEntityAdvanced implements ITier, IInven } @Override - public boolean isStackValidForSlot(int slot, ItemStack itemstack) + public boolean isItemValidForSlot(int slot, ItemStack itemstack) { if (slot >= this.getSlotCount()) { @@ -447,7 +447,7 @@ public class TileEntityCrate extends TileEntityAdvanced implements ITier, IInven @Override public boolean canInsertItem(int slot, ItemStack itemstack, int side) { - return this.isStackValidForSlot(slot, itemstack); + return this.isItemValidForSlot(slot, itemstack); } @Override diff --git a/src/minecraft/assemblyline/common/machine/belt/BlockConveyorBelt.java b/src/minecraft/assemblyline/common/machine/belt/BlockConveyorBelt.java index 56b4af10..9c2a82e5 100644 --- a/src/minecraft/assemblyline/common/machine/belt/BlockConveyorBelt.java +++ b/src/minecraft/assemblyline/common/machine/belt/BlockConveyorBelt.java @@ -4,6 +4,7 @@ import java.util.List; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; @@ -15,22 +16,19 @@ import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; import universalelectricity.core.UniversalElectricity; import assemblyline.client.render.BlockRenderingHandler; -import assemblyline.common.TabAssemblyLine; import assemblyline.common.machine.BlockAssembly; import assemblyline.common.machine.belt.TileEntityConveyorBelt.SlantType; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -/** - * The block for the actual conveyor belt! +/** The block for the actual conveyor belt! * - * @author Calclavia, DarkGuardsman - */ + * @author Calclavia, DarkGuardsman */ public class BlockConveyorBelt extends BlockAssembly { public BlockConveyorBelt(int id) { - super(id, UniversalElectricity.machine,"conveyorBelt"); + super(id, UniversalElectricity.machine, "conveyorBelt"); this.setBlockBounds(0, 0, 0, 1, 0.3f, 1); } @@ -81,7 +79,7 @@ public class BlockConveyorBelt extends BlockAssembly @Override public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) { - + TileEntity t = world.getBlockTileEntity(x, y, z); if (t != null && t instanceof TileEntityConveyorBelt) @@ -168,7 +166,7 @@ public class BlockConveyorBelt extends BlockAssembly } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLiving par5EntityLiving, ItemStack stack) + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase par5EntityLiving, ItemStack stack) { super.onBlockPlacedBy(world, x, y, z, par5EntityLiving, stack); int angle = MathHelper.floor_double((par5EntityLiving.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; @@ -238,9 +236,7 @@ public class BlockConveyorBelt extends BlockAssembly return true; } - /** - * Moves the entity if the conductor is powered. - */ + /** Moves the entity if the conductor is powered. */ @Override public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) { @@ -327,9 +323,7 @@ public class BlockConveyorBelt extends BlockAssembly } } - /** - * Returns the TileEntity used by this block. - */ + /** Returns the TileEntity used by this block. */ @Override public TileEntity createNewTileEntity(World var1) { diff --git a/src/minecraft/assemblyline/common/machine/crane/BlockCraneController.java b/src/minecraft/assemblyline/common/machine/crane/BlockCraneController.java index dbc73ae2..61758da5 100644 --- a/src/minecraft/assemblyline/common/machine/crane/BlockCraneController.java +++ b/src/minecraft/assemblyline/common/machine/crane/BlockCraneController.java @@ -1,13 +1,12 @@ package assemblyline.common.machine.crane; -import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; import universalelectricity.core.UniversalElectricity; import assemblyline.client.render.BlockRenderingHandler; -import assemblyline.common.TabAssemblyLine; import assemblyline.common.machine.BlockAssembly; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -16,7 +15,7 @@ public class BlockCraneController extends BlockAssembly { public BlockCraneController(int id) { - super(id, UniversalElectricity.machine,"craneController"); + super(id, UniversalElectricity.machine, "craneController"); } @Override @@ -32,7 +31,7 @@ public class BlockCraneController extends BlockAssembly } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLiving entity, ItemStack stack) + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) { int rot = (int) Math.min(((entity.rotationYaw + 315f) % 360f) / 90f, 3); switch (rot) diff --git a/src/minecraft/assemblyline/common/machine/detector/BlockDetector.java b/src/minecraft/assemblyline/common/machine/detector/BlockDetector.java index 29a0e63f..978dd28d 100644 --- a/src/minecraft/assemblyline/common/machine/detector/BlockDetector.java +++ b/src/minecraft/assemblyline/common/machine/detector/BlockDetector.java @@ -1,7 +1,7 @@ package assemblyline.common.machine.detector; import net.minecraft.client.renderer.texture.IconRegister; -import net.minecraft.entity.EntityLiving; +import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; @@ -17,9 +17,7 @@ import assemblyline.common.imprinter.prefab.BlockImprintable; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -/** - * @author Briman0094 - */ +/** @author Briman0094 */ public class BlockDetector extends BlockImprintable { Icon eye_red; @@ -31,7 +29,7 @@ public class BlockDetector extends BlockImprintable } @Override - public void onBlockPlacedBy(World world, int x, int y, int z, EntityLiving entity, ItemStack stack) + public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase entity, ItemStack stack) { int angle = MathHelper.floor_double((entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; int change = 2; diff --git a/src/minecraft/assemblyline/common/machine/encoder/TileEntityEncoder.java b/src/minecraft/assemblyline/common/machine/encoder/TileEntityEncoder.java index 77750b35..2c26c93f 100644 --- a/src/minecraft/assemblyline/common/machine/encoder/TileEntityEncoder.java +++ b/src/minecraft/assemblyline/common/machine/encoder/TileEntityEncoder.java @@ -209,7 +209,7 @@ public class TileEntityEncoder extends TileEntityAdvanced implements IPacketRece } @Override - public boolean isStackValidForSlot(int i, ItemStack itemstack) + public boolean isItemValidForSlot(int i, ItemStack itemstack) { // TODO Auto-generated method stub return false;