Init update to 1.6

Mostly done but just a few textures refs too go
This commit is contained in:
DarkGuardsman 2013-07-08 03:14:00 -04:00
parent e1e5a4461f
commit a4435994e7
20 changed files with 67 additions and 80 deletions

View file

@ -1,10 +1,11 @@
package assemblyline.client.render; package assemblyline.client.render;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.RenderEngine;
import net.minecraft.client.renderer.entity.RenderItem; import net.minecraft.client.renderer.entity.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager; 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.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.resources.ResourceLocation;
import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; 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.glPushMatrix();
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
GL11.glScalef(1.0F, -1F, -1F); GL11.glScalef(1.0F, -1F, -1F);
@ -56,7 +58,7 @@ public class RenderArmbot extends TileEntitySpecialRenderer
handPosition.add(0.5); handPosition.add(0.5);
handPosition.add(new Vector3(x, y, z)); handPosition.add(new Vector3(x, y, z));
RenderItem renderItem = ((RenderItem) RenderManager.instance.getEntityClassRenderObject(EntityItem.class)); RenderItem renderItem = ((RenderItem) RenderManager.instance.getEntityClassRenderObject(EntityItem.class));
RenderEngine renderEngine = Minecraft.getMinecraft().renderEngine; TextureManager renderEngine = Minecraft.getMinecraft().renderEngine;
for (ItemStack itemStack : ((TileEntityArmbot) tileEntity).getGrabbedItems()) for (ItemStack itemStack : ((TileEntityArmbot) tileEntity).getGrabbedItems())
{ {

View file

@ -1,6 +1,7 @@
package assemblyline.client.render; package assemblyline.client.render;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.resources.ResourceLocation;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
@ -10,6 +11,7 @@ import assemblyline.client.model.ModelConveyorBelt;
import assemblyline.common.AssemblyLine; import assemblyline.common.AssemblyLine;
import assemblyline.common.machine.belt.TileEntityConveyorBelt; import assemblyline.common.machine.belt.TileEntityConveyorBelt;
import assemblyline.common.machine.belt.TileEntityConveyorBelt.SlantType; import assemblyline.common.machine.belt.TileEntityConveyorBelt.SlantType;
import assemblyline.common.machine.crane.TileEntityCraneController;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -51,7 +53,9 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer
if (slantType == SlantType.UP) 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.glTranslatef(0f, 0.8f, -0.8f);
GL11.glRotatef(180f, 0f, 1f, 1f); GL11.glRotatef(180f, 0f, 1f, 1f);
boolean slantAdjust = false; boolean slantAdjust = false;
@ -71,7 +75,8 @@ public class RenderConveyorBelt extends TileEntitySpecialRenderer
} }
else if (slantType == SlantType.DOWN) 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); GL11.glRotatef(180f, 0f, 1f, 0f);
boolean slantAdjust = false; boolean slantAdjust = false;
TileEntity test = tileEntity.worldObj.getBlockTileEntity(tileEntity.xCoord - tileEntity.getDirection().offsetX, tileEntity.yCoord, tileEntity.zCoord - tileEntity.getDirection().offsetZ); 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 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.glRotatef(180, 0f, 1f, 0f);
GL11.glTranslatef(0f, -0.68f, 0f); GL11.glTranslatef(0f, -0.68f, 0f);
MODEL.render(0.0625f, (float) Math.toRadians(tileEntity.wheelRotation), tileEntity.getIsLastBelt(), tileEntity.getIsFirstBelt(), false, false); 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); GL11.glRotatef(90f, 0f, 1f, 0f);
break; break;
} }
ResourceLocation name = new ResourceLocation(AssemblyLine.MODEL_TEXTURES_PATH + ":" + "belt/frame" + frame + ".png");
this.bindTextureByName(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); MODEL.render(0.0625F, (float) Math.toRadians(tileEntity.wheelRotation), tileEntity.getIsLastBelt(), tileEntity.getIsFirstBelt(), false, true);
} }

View file

@ -6,6 +6,7 @@ import static org.lwjgl.opengl.GL11.glPopMatrix;
import static org.lwjgl.opengl.GL11.glPushMatrix; import static org.lwjgl.opengl.GL11.glPushMatrix;
import static org.lwjgl.opengl.GL11.glRotatef; import static org.lwjgl.opengl.GL11.glRotatef;
import static org.lwjgl.opengl.GL11.glTranslated; import static org.lwjgl.opengl.GL11.glTranslated;
import net.minecraft.client.resources.ResourceLocation;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import assemblyline.client.model.ModelCraneController; import assemblyline.client.model.ModelCraneController;
@ -24,7 +25,8 @@ public class RenderCraneController extends RenderImprintable
{ {
if (tileEntity != null && tileEntity instanceof TileEntityCraneController) 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 front = ForgeDirection.getOrientation(tileEntity.worldObj.getBlockMetadata(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord));
ForgeDirection right = CraneHelper.rotateClockwise(front); ForgeDirection right = CraneHelper.rotateClockwise(front);
float angle = 0f; float angle = 0f;

View file

@ -7,6 +7,7 @@ import static org.lwjgl.opengl.GL11.glPushMatrix;
import static org.lwjgl.opengl.GL11.glRotatef; import static org.lwjgl.opengl.GL11.glRotatef;
import static org.lwjgl.opengl.GL11.glTranslated; import static org.lwjgl.opengl.GL11.glTranslated;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.client.resources.ResourceLocation;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import assemblyline.client.model.ModelCraneRail; 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); boolean renderFoot = tileEntity.worldObj.isBlockSolidOnSide(tX, tY - 1, tZ, ForgeDirection.UP);
if ((renderLeft && renderRight) || (renderFront && renderBack)) if ((renderLeft && renderRight) || (renderFront && renderBack))
renderFoot = false; renderFoot = false;
this.bindTextureByName(AssemblyLine.MODEL_TEXTURES_PATH + TEXTURE); ResourceLocation name = new ResourceLocation(AssemblyLine.MODEL_TEXTURES_PATH + ":" + TEXTURE);
func_110628_a(name);
glPushMatrix(); glPushMatrix();
glTranslated(x + 0.5, y + 1.5, z + 0.5); glTranslated(x + 0.5, y + 1.5, z + 0.5);
glRotatef(180f, 0f, 0f, 1f); glRotatef(180f, 0f, 0f, 1f);

View file

@ -4,9 +4,9 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.OpenGlHelper; import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderBlocks; 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.RenderItem;
import net.minecraft.client.renderer.entity.RenderManager; 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.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItem;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -82,7 +82,7 @@ public class RenderCrate extends TileEntitySpecialRenderer
GL11.glScalef(0.6f * scale, 0.6f * scale, 0); GL11.glScalef(0.6f * scale, 0.6f * scale, 0);
GL11.glRotatef(180, 0, 0, 1); GL11.glRotatef(180, 0, 0, 1);
RenderEngine renderEngine = Minecraft.getMinecraft().renderEngine; TextureManager renderEngine = Minecraft.getMinecraft().renderEngine;
GL11.glDisable(2896); GL11.glDisable(2896);
if (!ForgeHooksClient.renderInventoryItem(this.renderBlocks, renderEngine, itemStack, true, 0.0F, 0.0F, 0.0F)) if (!ForgeHooksClient.renderInventoryItem(this.renderBlocks, renderEngine, itemStack, true, 0.0F, 0.0F, 0.0F))

View file

@ -1,5 +1,6 @@
package assemblyline.client.render; package assemblyline.client.render;
import net.minecraft.client.resources.ResourceLocation;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
@ -22,11 +23,13 @@ public class RenderManipulator extends RenderImprintable
if (tileEntity.isOutput()) 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 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) if (face == 2)

View file

@ -1,5 +1,6 @@
package assemblyline.client.render; package assemblyline.client.render;
import net.minecraft.client.resources.ResourceLocation;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL11;
@ -22,7 +23,8 @@ public class RenderRejector extends RenderImprintable
{ {
pos = 8; 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.glPushMatrix();
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F); GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
GL11.glScalef(1.0F, -1F, -1F); GL11.glScalef(1.0F, -1F, -1F);

View file

@ -902,12 +902,6 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
return false; return false;
} }
@Override
public boolean isStackValidForSlot(int i, ItemStack itemstack)
{
return false;
}
@Override @Override
public double getWattLoad() public double getWattLoad()
{ {
@ -917,4 +911,11 @@ public class TileEntityArmbot extends TileEntityAssembly implements IMultiBlock,
} }
return .1; return .1;
} }
@Override
public boolean isItemValidForSlot(int i, ItemStack itemstack)
{
// TODO Auto-generated method stub
return false;
}
} }

View file

@ -69,9 +69,9 @@ public class ContainerImprinter extends Container implements ISlotWatcher
} }
@Override @Override
public void onCraftGuiClosed(EntityPlayer par1EntityPlayer) public void onContainerClosed(EntityPlayer par1EntityPlayer)
{ {
super.onCraftGuiClosed(par1EntityPlayer); super.onContainerClosed(par1EntityPlayer);
this.tileEntity.closeChest(); this.tileEntity.closeChest();
} }

View file

@ -47,7 +47,7 @@ public class ItemImprinter extends Item
{ {
String stringName = EntityList.getEntityString(entity); String stringName = EntityList.getEntityString(entity);
// TODO add to filter // TODO add to filter
player.sendChatToPlayer("Target: " + stringName); //player.sendChatToPlayer("Target: " + stringName);
return true; return true;
} }
return false; return false;

View file

@ -515,7 +515,7 @@ public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInv
} }
@Override @Override
public boolean isStackValidForSlot(int i, ItemStack itemstack) public boolean isItemValidForSlot(int i, ItemStack itemstack)
{ {
return true; return true;
} }
@ -542,13 +542,13 @@ public class TileEntityImprinter extends TileEntityAdvanced implements ISidedInv
@Override @Override
public boolean canInsertItem(int slot, ItemStack itemstack, int side) public boolean canInsertItem(int slot, ItemStack itemstack, int side)
{ {
return this.isStackValidForSlot(slot, itemstack); return this.isItemValidForSlot(slot, itemstack);
} }
@Override @Override
public boolean canExtractItem(int slot, ItemStack itemstack, int side) public boolean canExtractItem(int slot, ItemStack itemstack, int side)
{ {
return this.isStackValidForSlot(slot, itemstack); return this.isItemValidForSlot(slot, itemstack);
} }
@Override @Override

View file

@ -3,6 +3,7 @@ package assemblyline.common.imprinter.prefab;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -113,7 +114,7 @@ public abstract class BlockImprintable extends BlockAssembly
} }
@Override @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 angle = MathHelper.floor_double((par5EntityLiving.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
int change = 2; int change = 2;

View file

@ -29,30 +29,6 @@ public class BlockAssembly extends BlockAdvanced
this.setCreativeTab(TabAssemblyLine.INSTANCE); 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) @SideOnly(Side.CLIENT)
@Override @Override
public void registerIcons(IconRegister iconReg) public void registerIcons(IconRegister iconReg)

View file

@ -330,7 +330,7 @@ public class BlockCrate extends BlockAssembly
*/ */
public static ItemStack addStackToCrate(TileEntityCrate tileEntity, ItemStack itemStack) 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; return itemStack;
} }

View file

@ -6,6 +6,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
@ -84,7 +85,7 @@ public class BlockTurntable extends BlockAssembly
} }
@Override @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); int metadata = determineOrientation(world, x, y, z, (EntityPlayer) par5EntityLiving);
world.setBlockMetadataWithNotify(x, y, z, metadata, 3); world.setBlockMetadataWithNotify(x, y, z, metadata, 3);

View file

@ -417,7 +417,7 @@ public class TileEntityCrate extends TileEntityAdvanced implements ITier, IInven
} }
@Override @Override
public boolean isStackValidForSlot(int slot, ItemStack itemstack) public boolean isItemValidForSlot(int slot, ItemStack itemstack)
{ {
if (slot >= this.getSlotCount()) if (slot >= this.getSlotCount())
{ {
@ -447,7 +447,7 @@ public class TileEntityCrate extends TileEntityAdvanced implements ITier, IInven
@Override @Override
public boolean canInsertItem(int slot, ItemStack itemstack, int side) public boolean canInsertItem(int slot, ItemStack itemstack, int side)
{ {
return this.isStackValidForSlot(slot, itemstack); return this.isItemValidForSlot(slot, itemstack);
} }
@Override @Override

View file

@ -4,6 +4,7 @@ import java.util.List;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem; import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@ -15,22 +16,19 @@ import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.UniversalElectricity; import universalelectricity.core.UniversalElectricity;
import assemblyline.client.render.BlockRenderingHandler; import assemblyline.client.render.BlockRenderingHandler;
import assemblyline.common.TabAssemblyLine;
import assemblyline.common.machine.BlockAssembly; import assemblyline.common.machine.BlockAssembly;
import assemblyline.common.machine.belt.TileEntityConveyorBelt.SlantType; import assemblyline.common.machine.belt.TileEntityConveyorBelt.SlantType;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; 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 class BlockConveyorBelt extends BlockAssembly
{ {
public BlockConveyorBelt(int id) public BlockConveyorBelt(int id)
{ {
super(id, UniversalElectricity.machine,"conveyorBelt"); super(id, UniversalElectricity.machine, "conveyorBelt");
this.setBlockBounds(0, 0, 0, 1, 0.3f, 1); this.setBlockBounds(0, 0, 0, 1, 0.3f, 1);
} }
@ -81,7 +79,7 @@ public class BlockConveyorBelt extends BlockAssembly
@Override @Override
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity) public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB par5AxisAlignedBB, List par6List, Entity par7Entity)
{ {
TileEntity t = world.getBlockTileEntity(x, y, z); TileEntity t = world.getBlockTileEntity(x, y, z);
if (t != null && t instanceof TileEntityConveyorBelt) if (t != null && t instanceof TileEntityConveyorBelt)
@ -168,7 +166,7 @@ public class BlockConveyorBelt extends BlockAssembly
} }
@Override @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); super.onBlockPlacedBy(world, x, y, z, par5EntityLiving, stack);
int angle = MathHelper.floor_double((par5EntityLiving.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3; 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; return true;
} }
/** /** Moves the entity if the conductor is powered. */
* Moves the entity if the conductor is powered.
*/
@Override @Override
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity) 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 @Override
public TileEntity createNewTileEntity(World var1) public TileEntity createNewTileEntity(World var1)
{ {

View file

@ -1,13 +1,12 @@
package assemblyline.common.machine.crane; package assemblyline.common.machine.crane;
import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.UniversalElectricity; import universalelectricity.core.UniversalElectricity;
import assemblyline.client.render.BlockRenderingHandler; import assemblyline.client.render.BlockRenderingHandler;
import assemblyline.common.TabAssemblyLine;
import assemblyline.common.machine.BlockAssembly; import assemblyline.common.machine.BlockAssembly;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
@ -16,7 +15,7 @@ public class BlockCraneController extends BlockAssembly
{ {
public BlockCraneController(int id) public BlockCraneController(int id)
{ {
super(id, UniversalElectricity.machine,"craneController"); super(id, UniversalElectricity.machine, "craneController");
} }
@Override @Override
@ -32,7 +31,7 @@ public class BlockCraneController extends BlockAssembly
} }
@Override @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); int rot = (int) Math.min(((entity.rotationYaw + 315f) % 360f) / 90f, 3);
switch (rot) switch (rot)

View file

@ -1,7 +1,7 @@
package assemblyline.common.machine.detector; package assemblyline.common.machine.detector;
import net.minecraft.client.renderer.texture.IconRegister; 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.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; 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.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
/** /** @author Briman0094 */
* @author Briman0094
*/
public class BlockDetector extends BlockImprintable public class BlockDetector extends BlockImprintable
{ {
Icon eye_red; Icon eye_red;
@ -31,7 +29,7 @@ public class BlockDetector extends BlockImprintable
} }
@Override @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 angle = MathHelper.floor_double((entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
int change = 2; int change = 2;

View file

@ -209,7 +209,7 @@ public class TileEntityEncoder extends TileEntityAdvanced implements IPacketRece
} }
@Override @Override
public boolean isStackValidForSlot(int i, ItemStack itemstack) public boolean isItemValidForSlot(int i, ItemStack itemstack)
{ {
// TODO Auto-generated method stub // TODO Auto-generated method stub
return false; return false;