Fixed last PR and removed unneeded Textures
This commit is contained in:
parent
437a870ab0
commit
62f374e40d
2 changed files with 42 additions and 55 deletions
|
@ -20,7 +20,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
|
||||
public class BlockHopper extends BlockBuildCraft {
|
||||
|
||||
private static icons[3];
|
||||
private static Icon icon;
|
||||
|
||||
public BlockHopper(int blockId) {
|
||||
super(blockId, Material.iron);
|
||||
|
@ -52,13 +52,15 @@ public class BlockHopper extends BlockBuildCraft {
|
|||
super.onBlockActivated(world, x, y, z, entityplayer, par6, par7, par8, par9);
|
||||
|
||||
// Drop through if the player is sneaking
|
||||
if (entityplayer.isSneaking())
|
||||
if (entityplayer.isSneaking()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (entityplayer.getCurrentEquippedItem() != null) {
|
||||
if (entityplayer.getCurrentEquippedItem().getItem() instanceof IItemPipe)
|
||||
if (entityplayer.getCurrentEquippedItem().getItem() instanceof IItemPipe) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!CoreProxy.proxy.isRenderWorld(world)) {
|
||||
entityplayer.openGui(BuildCraftFactory.instance, GuiIds.HOPPER, world, x, y, z);
|
||||
|
@ -75,20 +77,13 @@ public class BlockHopper extends BlockBuildCraft {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
icons = new Icon[3];
|
||||
icons[0] = par1IconRegister.registerIcon("buildcraft:hopperBottom");
|
||||
icons[1] = par1IconRegister.registerIcon("buildcraft:hopperTop");
|
||||
icons[2] = par1IconRegister.registerIcon("buildcraft:hopperSide");
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
icon = par1IconRegister.registerIcon("buildcraft:hopperBottom");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(int par1, int par2)
|
||||
{
|
||||
if (par1 < 2) return icons[par2];
|
||||
return icons[3];
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
return icon;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
/**
|
||||
* Copyright (c) SpaceToad, 2011
|
||||
* http://www.mod-buildcraft.com
|
||||
* Copyright (c) SpaceToad, 2011 http://www.mod-buildcraft.com
|
||||
*
|
||||
* BuildCraft is distributed under the terms of the Minecraft Mod Public
|
||||
* License 1.0, or MMPL. Please check the contents of the license located in
|
||||
* BuildCraft is distributed under the terms of the Minecraft Mod Public License
|
||||
* 1.0, or MMPL. Please check the contents of the license located in
|
||||
* http://www.mod-buildcraft.com/MMPL-1.0.txt
|
||||
*/
|
||||
|
||||
package buildcraft.factory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -36,7 +34,8 @@ import cpw.mods.fml.relauncher.Side;
|
|||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockRefinery extends BlockContainer {
|
||||
private static Icon[] icons;
|
||||
|
||||
private static Icon icon;
|
||||
|
||||
public BlockRefinery(int i) {
|
||||
super(i, Material.iron);
|
||||
|
@ -81,8 +80,9 @@ public class BlockRefinery extends BlockContainer {
|
|||
@Override
|
||||
public boolean onBlockActivated(World world, int i, int j, int k, EntityPlayer entityplayer, int par6, float par7, float par8, float par9) {
|
||||
// Drop through if the player is sneaking
|
||||
if (entityplayer.isSneaking())
|
||||
if (entityplayer.isSneaking()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Item equipped = entityplayer.getCurrentEquippedItem() != null ? entityplayer.getCurrentEquippedItem().getItem() : null;
|
||||
if (equipped instanceof IToolWrench && ((IToolWrench) equipped).canWrench(entityplayer, i, j, k)) {
|
||||
|
@ -138,21 +138,13 @@ public class BlockRefinery extends BlockContainer {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
icons = new Icon[6];
|
||||
icons[ForgeDirection.DOWN.ordinal()] = par1IconRegister.registerIcon("buildcraft:refineryBottom");
|
||||
icons[ForgeDirection.UP.ordinal()] = par1IconRegister.registerIcon("buildcraft:refineryTop");
|
||||
icons[ForgeDirection.NORTH.ordinal()] = par1IconRegister.registerIcon("buildcraft:refineryFront");
|
||||
icons[ForgeDirection.SOUTH.ordinal()] = par1IconRegister.registerIcon("buildcraft:refineryBack");
|
||||
icons[ForgeDirection.EAST.ordinal()] = par1IconRegister.registerIcon("buildcraft:refineryEast");
|
||||
icons[ForgeDirection.WEST.ordinal()] = par1IconRegister.registerIcon("buildcraft:refineryWest");
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
icon = par1IconRegister.registerIcon("buildcraft:refineryBack");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(int par1, int par2)
|
||||
{
|
||||
return icons[par1];
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
return icon;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue