BlockGenericPipe now returns proper pipe icon, might help WAILA icon rendering
This commit is contained in:
parent
93df0d82be
commit
fb1c7a5561
2 changed files with 5 additions and 3 deletions
|
@ -111,6 +111,7 @@ public class BlockGenericPipe extends BlockBuildCraft {
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean skippedFirstIconRegister;
|
private boolean skippedFirstIconRegister;
|
||||||
|
private ItemPipe itemPipe;
|
||||||
|
|
||||||
/* Defined subprograms ************************************************* */
|
/* Defined subprograms ************************************************* */
|
||||||
public BlockGenericPipe() {
|
public BlockGenericPipe() {
|
||||||
|
@ -1130,6 +1131,9 @@ public class BlockGenericPipe extends BlockBuildCraft {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IIcon getIcon(int side, int meta) {
|
public IIcon getIcon(int side, int meta) {
|
||||||
return PipeIconProvider.TYPE.PipeItemsStone.getIcon();
|
if (itemPipe == null) {
|
||||||
|
itemPipe = (ItemPipe) Item.getItemFromBlock(this);
|
||||||
|
}
|
||||||
|
return itemPipe.getIconFromDamage(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,9 +11,7 @@ package buildcraft.transport.render;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
|
||||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||||
|
|
Loading…
Reference in a new issue