Fix for MCP names update
Fix liquid render breaking texture binds
This commit is contained in:
parent
027a7006ff
commit
e80d50e767
28 changed files with 90 additions and 90 deletions
|
@ -198,7 +198,7 @@ public class BuildCraftBuilders {
|
|||
new BptBlockStairs(Block.stairsStoneBrick.blockID);
|
||||
|
||||
new BptBlockDoor(Block.doorWood.blockID, new ItemStack(Item.doorWood));
|
||||
new BptBlockDoor(Block.doorSteel.blockID, new ItemStack(Item.doorSteel));
|
||||
new BptBlockDoor(Block.doorIron.blockID, new ItemStack(Item.doorIron));
|
||||
|
||||
new BptBlockBed(Block.bed.blockID);
|
||||
|
||||
|
|
|
@ -224,7 +224,7 @@ public class BuildCraftFactory {
|
|||
|
||||
if (allowMining) {
|
||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(miningWellBlock, 1), new Object[] { "ipi", "igi", "iPi", Character.valueOf('p'), Item.redstone,
|
||||
Character.valueOf('i'), Item.ingotIron, Character.valueOf('g'), BuildCraftCore.ironGearItem, Character.valueOf('P'), Item.pickaxeSteel });
|
||||
Character.valueOf('i'), Item.ingotIron, Character.valueOf('g'), BuildCraftCore.ironGearItem, Character.valueOf('P'), Item.pickaxeIron });
|
||||
|
||||
CoreProxy.proxy.addCraftingRecipe(
|
||||
new ItemStack(quarryBlock),
|
||||
|
|
|
@ -116,11 +116,11 @@ public class BlockArchitect extends BlockContainer {
|
|||
if (l == 1)
|
||||
return blockTextureTopArchitect;
|
||||
|
||||
return getBlockTextureFromSideAndMetadata(l, m);
|
||||
return getIcon(l, m);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getBlockTextureFromSideAndMetadata(int i, int j) {
|
||||
public Icon getIcon(int i, int j) {
|
||||
if (j == 0 && i == 3)
|
||||
return blockTextureFront;
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public class BlockBlueprintLibrary extends BlockContainer {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Icon getBlockTextureFromSideAndMetadata(int i, int j) {
|
||||
public Icon getIcon(int i, int j) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
case 1:
|
||||
|
|
|
@ -50,7 +50,7 @@ public class BlockBuilder extends BlockContainer {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Icon getBlockTextureFromSideAndMetadata(int i, int j) {
|
||||
public Icon getIcon(int i, int j) {
|
||||
if (j == 0 && i == 3)
|
||||
return blockTextureFront;
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public class BlockFiller extends BlockContainer {
|
|||
int m = iblockaccess.getBlockMetadata(i, j, k);
|
||||
|
||||
if (iblockaccess == null)
|
||||
return getBlockTextureFromSideAndMetadata(i, m);
|
||||
return getIcon(i, m);
|
||||
|
||||
TileEntity tile = iblockaccess.getBlockTileEntity(i, j, k);
|
||||
|
||||
|
@ -79,11 +79,11 @@ public class BlockFiller extends BlockContainer {
|
|||
return textureSides;
|
||||
}
|
||||
|
||||
return getBlockTextureFromSideAndMetadata(l, m);
|
||||
return getIcon(l, m);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Icon getBlockTextureFromSideAndMetadata(int i, int j) {
|
||||
public Icon getIcon(int i, int j) {
|
||||
if (i == 0 || i == 1)
|
||||
return textureTopOn;
|
||||
else
|
||||
|
|
|
@ -33,7 +33,7 @@ public class ItemBptBluePrint extends ItemBptBase {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void updateIcons(IconRegister par1IconRegister)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
cleanBlueprint = par1IconRegister.registerIcon("buildcraft:blueprint_clean");
|
||||
usedBlueprint = par1IconRegister.registerIcon("buildcraft:blueprint_used");
|
||||
|
|
|
@ -14,16 +14,16 @@ public class ItemBptTemplate extends ItemBptBase {
|
|||
@Override
|
||||
public Icon getIconFromDamage(int i) {
|
||||
if (i == 0)
|
||||
return iconIndex;
|
||||
return itemIcon;
|
||||
else
|
||||
return usedTemplate;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void updateIcons(IconRegister par1IconRegister)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
iconIndex = par1IconRegister.registerIcon("buildcraft:template_clean");
|
||||
itemIcon = par1IconRegister.registerIcon("buildcraft:template_clean");
|
||||
usedTemplate = par1IconRegister.registerIcon("buildcraft:template_used");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,17 +28,17 @@ public class ItemBuildCraft extends Item {
|
|||
public String getItemDisplayName(ItemStack itemstack) {
|
||||
return StringUtil.localize(getUnlocalizedName(itemstack));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Item setUnlocalizedName(String par1Str) {
|
||||
iconName = par1Str;
|
||||
return super.setUnlocalizedName(par1Str);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void updateIcons(IconRegister par1IconRegister)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.iconIndex = par1IconRegister.registerIcon("buildcraft:" + iconName);
|
||||
this.itemIcon = par1IconRegister.registerIcon("buildcraft:" + iconName);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ public class ItemRedstoneChipset extends ItemBuildCraft {
|
|||
private static String[] chipsetNames = { "redstone_red", "redstone_iron", "redstone_gold", "redstone_diamond", "redstone_pulsating" };
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void updateIcons(IconRegister par1IconRegister)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
icons = new Icon[chipsetNames.length];
|
||||
int i = 0;
|
||||
|
|
|
@ -63,27 +63,27 @@ public class RenderingEntityBlocks implements ISimpleBlockRenderingHandler {
|
|||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1F, 0.0F);
|
||||
renderer.renderBottomFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(0, metadata));
|
||||
renderer.renderBottomFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
renderer.renderTopFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(1, metadata));
|
||||
renderer.renderTopFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, -1F);
|
||||
renderer.renderEastFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(2, metadata));
|
||||
renderer.renderEastFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
renderer.renderWestFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(3, metadata));
|
||||
renderer.renderWestFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(-1F, 0.0F, 0.0F);
|
||||
renderer.renderNorthFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(4, metadata));
|
||||
renderer.renderNorthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, metadata));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||
renderer.renderSouthFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(5, metadata));
|
||||
renderer.renderSouthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, metadata));
|
||||
tessellator.draw();
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
|
|
@ -29,7 +29,7 @@ public class BlockOilFlowing extends BlockFluid implements ILiquid {
|
|||
int numAdjacentSources = 0;
|
||||
boolean isOptimalFlowDirection[] = new boolean[4];
|
||||
int flowCost[] = new int[4];
|
||||
|
||||
|
||||
public BlockOilFlowing(int i, Material material) {
|
||||
super(i, material);
|
||||
|
||||
|
@ -209,7 +209,7 @@ public class BlockOilFlowing extends BlockFluid implements ILiquid {
|
|||
|
||||
private boolean blockBlocksFlow(World world, int i, int j, int k) {
|
||||
int l = world.getBlockId(i, j, k);
|
||||
if (l == Block.doorWood.blockID || l == Block.doorSteel.blockID || l == Block.signPost.blockID || l == Block.ladder.blockID || l == Block.reed.blockID)
|
||||
if (l == Block.doorWood.blockID || l == Block.doorIron.blockID || l == Block.signPost.blockID || l == Block.ladder.blockID || l == Block.reed.blockID)
|
||||
return true;
|
||||
if (l == 0)
|
||||
return false;
|
||||
|
@ -262,11 +262,11 @@ public class BlockOilFlowing extends BlockFluid implements ILiquid {
|
|||
public boolean isBlockReplaceable(World world, int i, int j, int k) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister iconRegister){
|
||||
this.theIcon = new Icon[] {iconRegister.registerIcon("buildcraft:oil"), iconRegister.registerIcon("buildcraft:oil_flow")};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ public class ItemBucketOil extends ItemBucket {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void updateIcons(IconRegister par1IconRegister)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
this.iconIndex = par1IconRegister.registerIcon("buildcraft:oil_bucket");
|
||||
this.itemIcon = par1IconRegister.registerIcon("buildcraft:oil_bucket");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public class BlockAutoWorkbench extends BlockBuildCraft {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Icon getBlockTextureFromSideAndMetadata(int i, int j) {
|
||||
public Icon getIcon(int i, int j) {
|
||||
if (i == 1 || i == 0)
|
||||
return topTexture;
|
||||
else
|
||||
|
|
|
@ -38,7 +38,7 @@ public class BlockMiningWell extends BlockMachineRoot {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Icon getBlockTextureFromSideAndMetadata(int i, int j) {
|
||||
public Icon getIcon(int i, int j) {
|
||||
if (j == 0 && i == 3)
|
||||
return textureFront;
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ public class BlockPump extends BlockContainer {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Icon getBlockTextureFromSideAndMetadata(int i, int j) {
|
||||
public Icon getIcon(int i, int j) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
return textureBottom;
|
||||
|
|
|
@ -58,7 +58,7 @@ public class BlockQuarry extends BlockMachineRoot {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Icon getBlockTextureFromSideAndMetadata(int i, int j) {
|
||||
public Icon getIcon(int i, int j) {
|
||||
// If no metadata is set, then this is an icon.
|
||||
if (j == 0 && i == 3)
|
||||
return textureFront;
|
||||
|
|
|
@ -63,7 +63,7 @@ public class BlockTank extends BlockContainer {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) {
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
switch(par1){
|
||||
case 0:
|
||||
case 1:
|
||||
|
@ -72,7 +72,7 @@ public class BlockTank extends BlockContainer {
|
|||
return textureBottomSide;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings({ "all" })
|
||||
public Icon getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l) {
|
||||
switch (l) {
|
||||
|
|
|
@ -65,7 +65,7 @@ public class BlockAssemblyTable extends BlockContainer {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Icon getBlockTextureFromSideAndMetadata(int i, int j) {
|
||||
public Icon getIcon(int i, int j) {
|
||||
int s = i > 1 ? 2 : i;
|
||||
return icons[j][s];
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public class BlockLaser extends BlockContainer {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Icon getBlockTextureFromSideAndMetadata(int i, int j) {
|
||||
public Icon getIcon(int i, int j) {
|
||||
if (i == ForgeDirection.values()[j].getOpposite().ordinal())
|
||||
return textureBottom;
|
||||
else if (i == j)
|
||||
|
|
|
@ -142,32 +142,32 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
|
|||
Tessellator tessellator = Tessellator.instance;
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1F, 0.0F);
|
||||
renderblocks.renderBottomFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(0, i));
|
||||
renderblocks.renderBottomFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, i));
|
||||
tessellator.draw();
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
renderblocks.renderTopFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(1, i));
|
||||
renderblocks.renderTopFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, i));
|
||||
tessellator.draw();
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, -1F);
|
||||
renderblocks.renderEastFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(2, i));
|
||||
renderblocks.renderEastFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, i));
|
||||
tessellator.draw();
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
renderblocks.renderWestFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(3, i));
|
||||
renderblocks.renderWestFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, i));
|
||||
tessellator.draw();
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(-1F, 0.0F, 0.0F);
|
||||
renderblocks.renderNorthFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(4, i));
|
||||
renderblocks.renderNorthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, i));
|
||||
tessellator.draw();
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||
renderblocks.renderSouthFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(5, i));
|
||||
renderblocks.renderSouthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, i));
|
||||
tessellator.draw();
|
||||
}
|
||||
|
||||
|
@ -179,13 +179,13 @@ public class SiliconRenderBlock implements ISimpleBlockRenderingHandler {
|
|||
/*
|
||||
* @Override public void handlePacket(Packet230ModLoader packet) { switch (PacketIds.values()[packet.packetType]) { case AssemblyTableSelect: GuiScreen
|
||||
* screen = ModLoader.getMinecraftInstance().currentScreen;
|
||||
*
|
||||
*
|
||||
* if (screen instanceof GuiAssemblyTable) { GuiAssemblyTable gui = (GuiAssemblyTable) screen; SelectionMessage message = new SelectionMessage();
|
||||
*
|
||||
*
|
||||
* TileAssemblyTable.selectionMessageWrapper.updateFromPacket(message, packet);
|
||||
*
|
||||
*
|
||||
* gui.handleSelectionMessage (message); }
|
||||
*
|
||||
*
|
||||
* break; } }
|
||||
*/
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ public class BlockGenericPipe extends BlockContainer {
|
|||
public Part hitPart;
|
||||
public MovingObjectPosition movingObjectPosition;
|
||||
}
|
||||
|
||||
|
||||
private static Random rand = new Random();
|
||||
|
||||
private boolean skippedFirstIconRegister;
|
||||
|
@ -908,13 +908,13 @@ public class BlockGenericPipe extends BlockContainer {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getBlockTextureFromSideAndMetadata(int par1, int par2) {
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
return BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.Stripes);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Spawn a digging particle effect in the world, this is a wrapper around
|
||||
* EffectRenderer.addBlockHitEffects to allow the block more control over
|
||||
|
@ -932,10 +932,10 @@ public class BlockGenericPipe extends BlockContainer {
|
|||
int x = target.blockX;
|
||||
int y = target.blockY;
|
||||
int z = target.blockZ;
|
||||
|
||||
|
||||
Pipe pipe = getPipe(worldObj, x, y, z);
|
||||
if (pipe == null) return false;
|
||||
|
||||
|
||||
Icon icon = pipe.getIconProvider().getIcon(pipe.getIconIndexForItem());
|
||||
|
||||
int sideHit = target.sideHit;
|
||||
|
@ -971,7 +971,7 @@ public class BlockGenericPipe extends BlockContainer {
|
|||
}
|
||||
|
||||
EntityDiggingFX fx = new EntityDiggingFX(worldObj, px, py, pz, 0.0D, 0.0D, 0.0D, block, sideHit, worldObj.getBlockMetadata(x, y, z), Minecraft.getMinecraft().renderEngine);
|
||||
fx.func_94052_a(Minecraft.getMinecraft().renderEngine, icon);
|
||||
fx.setParticleIcon(Minecraft.getMinecraft().renderEngine, icon);
|
||||
effectRenderer.addEffect(fx.func_70596_a(x, y, z).multiplyVelocity(0.2F).multipleParticleScaleBy(0.6F));
|
||||
return true;
|
||||
}
|
||||
|
@ -995,9 +995,9 @@ public class BlockGenericPipe extends BlockContainer {
|
|||
public boolean addBlockDestroyEffects(World worldObj, int x, int y, int z, int meta, EffectRenderer effectRenderer) {
|
||||
Pipe pipe = getPipe(worldObj, x, y, z);
|
||||
if (pipe == null) return false;
|
||||
|
||||
|
||||
Icon icon = pipe.getIconProvider().getIcon(pipe.getIconIndexForItem());
|
||||
|
||||
|
||||
byte its = 4;
|
||||
for (int i = 0; i < its; ++i) {
|
||||
for (int j = 0; j < its; ++j) {
|
||||
|
@ -1007,7 +1007,7 @@ public class BlockGenericPipe extends BlockContainer {
|
|||
double pz = z + (k + 0.5D) / (double) its;
|
||||
int random = rand.nextInt(6);
|
||||
EntityDiggingFX fx = new EntityDiggingFX(worldObj, px, py, pz, px - x - 0.5D, py - y - 0.5D, pz - z - 0.5D, BuildCraftTransport.genericPipeBlock, random, meta, Minecraft.getMinecraft().renderEngine);
|
||||
fx.func_94052_a(Minecraft.getMinecraft().renderEngine, icon);
|
||||
fx.setParticleIcon(Minecraft.getMinecraft().renderEngine, icon);
|
||||
effectRenderer.addEffect(fx.func_70596_a(x, y, z));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -150,11 +150,11 @@ public class ItemFacade extends ItemBuildCraft {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void updateIcons(IconRegister par1IconRegister)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
// NOOP
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getSpriteNumber()
|
||||
|
|
|
@ -24,7 +24,7 @@ public class ItemGate extends ItemBuildCraft {
|
|||
public static final int Gate_Gold_Or = 4;
|
||||
public static final int Gate_Diamond_And = 5;
|
||||
public static final int Gate_Diamond_Or = 6;
|
||||
|
||||
|
||||
public static final int Autarchic_Gate = 7;
|
||||
public static final int Autarchic_Gate_Iron_And = 8;
|
||||
public static final int Autarchic_Gate_Iron_Or = 9;
|
||||
|
@ -32,14 +32,14 @@ public class ItemGate extends ItemBuildCraft {
|
|||
public static final int Autarchic_Gate_Gold_Or = 11;
|
||||
public static final int Autarchic_Gate_Diamond_And = 12;
|
||||
public static final int Autarchic_Gate_Diamond_Or = 13;
|
||||
|
||||
|
||||
public static final int MAX = 14;
|
||||
|
||||
|
||||
private int series;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private Icon[] icons;
|
||||
|
||||
|
||||
public ItemGate(int i, int series) {
|
||||
super(i);
|
||||
|
||||
|
@ -112,23 +112,23 @@ public class ItemGate extends ItemBuildCraft {
|
|||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void updateIcons(IconRegister iconRegister)
|
||||
public void registerIcons(IconRegister iconRegister)
|
||||
{
|
||||
|
||||
|
||||
for (IAction action : ActionManager.actions){
|
||||
if (action == null) continue;
|
||||
IIconProvider ip = action.getIconProvider();
|
||||
if (ip == null) throw new RuntimeException("Action " + action.getClass().toString() + " does not return an IIconProvider. This is not a buildcraft bug!");
|
||||
ip.registerIcons(iconRegister);
|
||||
}
|
||||
|
||||
|
||||
for (ITrigger trigger : ActionManager.triggers){
|
||||
if (trigger == null) continue;
|
||||
IIconProvider ip = trigger.getIconProvider();
|
||||
if (ip == null) throw new RuntimeException("Trigger " + trigger.getClass().toString() + " does not return an IIconProvider. This is not a buildcraft bug!");
|
||||
ip.registerIcons(iconRegister);
|
||||
}
|
||||
|
||||
|
||||
icons = new Icon[ItemGate.MAX];
|
||||
icons[ItemGate.Gate] = iconRegister.registerIcon("buildcraft:gate");
|
||||
icons[ItemGate.Gate_Iron_And] = iconRegister.registerIcon("buildcraft:gate_iron_and");
|
||||
|
@ -137,7 +137,7 @@ public class ItemGate extends ItemBuildCraft {
|
|||
icons[ItemGate.Gate_Gold_Or] = iconRegister.registerIcon("buildcraft:gate_gold_or");
|
||||
icons[ItemGate.Gate_Diamond_And] = iconRegister.registerIcon("buildcraft:gate_diamond_and");
|
||||
icons[ItemGate.Gate_Diamond_Or] = iconRegister.registerIcon("buildcraft:gate_diamond_or");
|
||||
|
||||
|
||||
icons[ItemGate.Autarchic_Gate] = iconRegister.registerIcon("buildcraft:autarchic_gate");
|
||||
icons[ItemGate.Autarchic_Gate_Iron_And] = iconRegister.registerIcon("buildcraft:autarchic_gate_iron_and");
|
||||
icons[ItemGate.Autarchic_Gate_Iron_Or] = iconRegister.registerIcon("buildcraft:autarchic_gate_iron_or");
|
||||
|
@ -146,6 +146,6 @@ public class ItemGate extends ItemBuildCraft {
|
|||
icons[ItemGate.Autarchic_Gate_Diamond_And] = iconRegister.registerIcon("buildcraft:autarchic_gate_diamond_and");
|
||||
icons[ItemGate.Autarchic_Gate_Diamond_Or] = iconRegister.registerIcon("buildcraft:autarchic_gate_diamond_or");
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe {
|
|||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIconProvider iconProvider;
|
||||
|
||||
|
||||
private int pipeIconIndex;
|
||||
|
||||
protected ItemPipe(int i) {
|
||||
|
@ -91,29 +91,29 @@ public class ItemPipe extends ItemBuildCraft implements IItemPipe {
|
|||
} else
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setPipesIcons(IIconProvider iconProvider){
|
||||
this.iconProvider = iconProvider;
|
||||
}
|
||||
|
||||
|
||||
public void setPipeIconIndex(int index){
|
||||
this.pipeIconIndex = index;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int par1) {
|
||||
return iconProvider.getIcon(pipeIconIndex);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void updateIcons(IconRegister par1IconRegister)
|
||||
public void registerIcons(IconRegister par1IconRegister)
|
||||
{
|
||||
// NOOP
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getSpriteNumber() {
|
||||
|
|
|
@ -35,27 +35,27 @@ public class FacadeItemRenderer implements IItemRenderer {
|
|||
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, -1F, 0.0F);
|
||||
render.renderBottomFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(0, decodedMeta));
|
||||
render.renderBottomFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(0, decodedMeta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 1.0F, 0.0F);
|
||||
render.renderTopFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(1, decodedMeta));
|
||||
render.renderTopFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(1, decodedMeta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, -1F);
|
||||
render.renderEastFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(2, decodedMeta));
|
||||
render.renderEastFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(2, decodedMeta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(0.0F, 0.0F, 1.0F);
|
||||
render.renderWestFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(3, decodedMeta));
|
||||
render.renderWestFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(3, decodedMeta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(-1F, 0.0F, 0.0F);
|
||||
render.renderNorthFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(4, decodedMeta));
|
||||
render.renderNorthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(4, decodedMeta));
|
||||
tessellator.draw();
|
||||
tessellator.startDrawingQuads();
|
||||
tessellator.setNormal(1.0F, 0.0F, 0.0F);
|
||||
render.renderSouthFace(block, 0.0D, 0.0D, 0.0D, block.getBlockTextureFromSideAndMetadata(5, decodedMeta));
|
||||
render.renderSouthFace(block, 0.0D, 0.0D, 0.0D, block.getIcon(5, decodedMeta));
|
||||
tessellator.draw();
|
||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glPopMatrix();
|
||||
|
@ -63,7 +63,7 @@ public class FacadeItemRenderer implements IItemRenderer {
|
|||
// Render StructurePipe
|
||||
block = BuildCraftTransport.genericPipeBlock;
|
||||
Icon textureID = BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.PipeStructureCobblestone); // Structure pipe
|
||||
|
||||
|
||||
block.setBlockBounds(Utils.pipeMinPos, Utils.pipeMinPos, Utils.pipeMinPos, Utils.pipeMaxPos, Utils.pipeMaxPos, Utils.pipeMaxPos - 1F / 16F);
|
||||
block.setBlockBoundsForItemRender();
|
||||
render.setRenderBoundsFromBlock(block);
|
||||
|
|
|
@ -81,11 +81,11 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
|||
|
||||
float minSize = Utils.pipeMinPos;
|
||||
float maxSize = Utils.pipeMaxPos;
|
||||
|
||||
|
||||
PipeRenderState state = renderState.getRenderState();
|
||||
IIconProvider icons = renderState.getPipeIcons();
|
||||
if (icons == null) return;
|
||||
|
||||
|
||||
|
||||
state.currentTexture = icons.getIcon(state.textureMatrix.getTextureIndex(ForgeDirection.UNKNOWN));
|
||||
block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize);
|
||||
|
@ -138,7 +138,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
|||
|
||||
if (state.wireMatrix.hasWire(WireColor.Red)) {
|
||||
state.currentTexture = BuildCraftTransport.instance.wireIconProvider.getIcon(state.wireMatrix.getWireIconIndex(WireColor.Red));
|
||||
|
||||
|
||||
pipeWireRender(renderblocks, block, state, Utils.pipeMinPos, Utils.pipeMaxPos, Utils.pipeMinPos, IPipe.WireColor.Red, x, y, z);
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ public class PipeWorldRenderer implements ISimpleBlockRenderingHandler {
|
|||
|
||||
for (ForgeDirection direction : ForgeDirection.VALID_DIRECTIONS) {
|
||||
if (state.facadeMatrix.isConnected(direction)) {
|
||||
state.currentTexture = Block.blocksList[state.facadeMatrix.getFacadeBlockId(direction)].getBlockTextureFromSideAndMetadata(direction.ordinal(), state.facadeMatrix.getFacadeMetaId(direction));
|
||||
state.currentTexture = Block.blocksList[state.facadeMatrix.getFacadeBlockId(direction)].getIcon(direction.ordinal(), state.facadeMatrix.getFacadeMetaId(direction));
|
||||
|
||||
// Hollow facade
|
||||
if (state.pipeConnectionMatrix.isConnected(direction)) {
|
||||
|
|
|
@ -296,7 +296,7 @@ public class RenderPipe extends TileEntitySpecialRenderer {
|
|||
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(angleY[i], 0, 1, 0);
|
||||
GL11.glRotatef(angleZ[i], 0, 0, 1);
|
||||
|
@ -373,7 +373,7 @@ public class RenderPipe extends TileEntitySpecialRenderer {
|
|||
break;
|
||||
default:
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(liquid.canonical().getTextureSheet());
|
||||
GL11.glCallList(list);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue