replaced MinecraftForgeClient.bindTexture with ForgeHooksClient.bindTexture
This commit is contained in:
parent
175ba6f1e5
commit
e93c37f1a3
12 changed files with 42 additions and 27 deletions
|
@ -15,6 +15,7 @@ import net.minecraft.src.IBlockAccess;
|
|||
import net.minecraft.src.Render;
|
||||
import net.minecraft.src.Tessellator;
|
||||
import net.minecraft.src.World;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
@ -88,7 +89,7 @@ public class RenderEntityBlock extends Render {
|
|||
GL11.glRotatef(entity.rotationZ, 0, 0, 1);
|
||||
GL11.glTranslatef(iBase, jBase, kBase);
|
||||
|
||||
MinecraftForgeClient.bindTexture(DefaultProps.TEXTURE_BLOCKS);
|
||||
ForgeHooksClient.bindTexture(DefaultProps.TEXTURE_BLOCKS, 0);
|
||||
|
||||
int lightX, lightY, lightZ;
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import net.minecraft.src.Entity;
|
|||
import net.minecraft.src.ModelBase;
|
||||
import net.minecraft.src.ModelRenderer;
|
||||
import net.minecraft.src.Render;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
@ -43,7 +44,7 @@ public class RenderLaser extends Render {
|
|||
GL11.glRotatef((float) laser.angleZ, 0, 1, 0);
|
||||
GL11.glRotatef((float) laser.angleY, 0, 0, 1);
|
||||
|
||||
MinecraftForgeClient.bindTexture(laser.getTexture());
|
||||
ForgeHooksClient.bindTexture(laser.getTexture(), 0);
|
||||
|
||||
float factor = (float) (1.0 / 16.0);
|
||||
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
package buildcraft.core;
|
||||
|
||||
import net.minecraft.src.Block;
|
||||
import net.minecraft.src.Entity;
|
||||
import net.minecraft.src.ModelBase;
|
||||
import net.minecraft.src.ModelRenderer;
|
||||
import net.minecraft.src.Render;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
@ -35,7 +37,7 @@ public class RenderRobot extends Render {
|
|||
GL11.glDisable(2896 /* GL_LIGHTING */);
|
||||
GL11.glTranslated(x, y, z);
|
||||
|
||||
MinecraftForgeClient.bindTexture(DefaultProps.TEXTURE_PATH_ENTITIES + "/robot.png");
|
||||
ForgeHooksClient.bindTexture(DefaultProps.TEXTURE_PATH_ENTITIES + "/robot.png", 0);
|
||||
|
||||
float factor = (float) (1.0 / 16.0);
|
||||
|
||||
|
|
|
@ -9,7 +9,9 @@
|
|||
|
||||
package buildcraft.core;
|
||||
|
||||
import net.minecraft.src.Block;
|
||||
import net.minecraft.src.RenderEngine;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import cpw.mods.fml.client.FMLTextureFX;
|
||||
|
||||
|
@ -44,7 +46,7 @@ public class TextureLiquidsFX extends FMLTextureFX {
|
|||
|
||||
@Override
|
||||
public void bindImage(RenderEngine renderengine) {
|
||||
MinecraftForgeClient.bindTexture(texture);
|
||||
ForgeHooksClient.bindTexture(texture, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -13,6 +13,7 @@ import net.minecraft.src.Block;
|
|||
import net.minecraft.src.InventoryPlayer;
|
||||
import net.minecraft.src.Item;
|
||||
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
@ -59,10 +60,10 @@ public class GuiCombustionEngine extends GuiEngine {
|
|||
int liquidImgIndex = 0;
|
||||
|
||||
if (liquidId < Block.blocksList.length && Block.blocksList[liquidId] != null) {
|
||||
MinecraftForgeClient.bindTexture(Block.blocksList[liquidId].getTextureFile());
|
||||
ForgeHooksClient.bindTexture(Block.blocksList[liquidId].getTextureFile(), 0);
|
||||
liquidImgIndex = Block.blocksList[liquidId].blockIndexInTexture;
|
||||
} else if (Item.itemsList[liquidId] != null) {
|
||||
MinecraftForgeClient.bindTexture(Item.itemsList[liquidId].getTextureFile());
|
||||
ForgeHooksClient.bindTexture(Item.itemsList[liquidId].getTextureFile(), 0);
|
||||
liquidImgIndex = Item.itemsList[liquidId].getIconFromDamage(0);
|
||||
} else {
|
||||
return;
|
||||
|
|
|
@ -13,6 +13,7 @@ import net.minecraft.src.ModelBase;
|
|||
import net.minecraft.src.ModelRenderer;
|
||||
import net.minecraft.src.TileEntity;
|
||||
import net.minecraft.src.TileEntitySpecialRenderer;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
@ -149,7 +150,7 @@ public class RenderEngine extends TileEntitySpecialRenderer implements IInventor
|
|||
|
||||
float factor = (float) (1.0 / 16.0);
|
||||
|
||||
MinecraftForgeClient.bindTexture(baseTexture);
|
||||
ForgeHooksClient.bindTexture(baseTexture, 0);
|
||||
|
||||
box.render(factor);
|
||||
|
||||
|
@ -157,7 +158,7 @@ public class RenderEngine extends TileEntitySpecialRenderer implements IInventor
|
|||
movingBox.render(factor);
|
||||
GL11.glTranslatef(-translate[0] * translatefact, -translate[1] * translatefact, -translate[2] * translatefact);
|
||||
|
||||
MinecraftForgeClient.bindTexture(DefaultProps.TEXTURE_PATH_BLOCKS + "/chamber.png");
|
||||
ForgeHooksClient.bindTexture(DefaultProps.TEXTURE_PATH_BLOCKS + "/chamber.png", 0);
|
||||
|
||||
float chamberf = 2F / 16F;
|
||||
|
||||
|
@ -186,7 +187,7 @@ public class RenderEngine extends TileEntitySpecialRenderer implements IInventor
|
|||
break;
|
||||
}
|
||||
|
||||
MinecraftForgeClient.bindTexture(texture);
|
||||
ForgeHooksClient.bindTexture(texture, 0);
|
||||
|
||||
trunk.render(factor);
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import net.minecraft.src.ModelRenderer;
|
|||
import net.minecraft.src.Tessellator;
|
||||
import net.minecraft.src.TileEntity;
|
||||
import net.minecraft.src.TileEntitySpecialRenderer;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
@ -54,10 +55,10 @@ public class RenderHopper extends TileEntitySpecialRenderer implements IInventor
|
|||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
|
||||
GL11.glTranslated(x, y, z);
|
||||
MinecraftForgeClient.bindTexture(DefaultProps.TEXTURE_PATH_BLOCKS + "/hopper.png");
|
||||
ForgeHooksClient.bindTexture(DefaultProps.TEXTURE_PATH_BLOCKS + "/hopper.png", 0);
|
||||
top.render((float) (1.0 / 16.0));
|
||||
bottom.render((float) (1.0 / 16.0));
|
||||
MinecraftForgeClient.bindTexture(DefaultProps.TEXTURE_PATH_BLOCKS + "/hopper_middle.png");
|
||||
ForgeHooksClient.bindTexture(DefaultProps.TEXTURE_PATH_BLOCKS + "/hopper_middle.png", 0);
|
||||
middle.render(Tessellator.instance, 1F / 16F);
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
|
|
|
@ -20,6 +20,7 @@ import net.minecraft.src.TileEntity;
|
|||
import net.minecraft.src.TileEntitySpecialRenderer;
|
||||
import net.minecraft.src.World;
|
||||
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
@ -175,7 +176,7 @@ public class RenderRefinery extends TileEntitySpecialRenderer implements IInvent
|
|||
GL11.glRotatef(angle, 0, 1, 0);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
|
||||
MinecraftForgeClient.bindTexture(DefaultProps.TEXTURE_PATH_BLOCKS + "/refinery.png");
|
||||
ForgeHooksClient.bindTexture(DefaultProps.TEXTURE_PATH_BLOCKS + "/refinery.png", 0);
|
||||
GL11.glTranslatef(-4F * factor, 0, -4F * factor);
|
||||
tank.render(factor);
|
||||
GL11.glTranslatef(4F * factor, 0, 4F * factor);
|
||||
|
@ -251,9 +252,10 @@ public class RenderRefinery extends TileEntitySpecialRenderer implements IInvent
|
|||
|
||||
public void setTextureFor(int liquidId) {
|
||||
if (liquidId < Block.blocksList.length && Block.blocksList[liquidId] != null) {
|
||||
MinecraftForgeClient.bindTexture(Block.blocksList[liquidId].getTextureFile());
|
||||
ForgeHooksClient.bindTexture(Block.blocksList[liquidId].getTextureFile(), 0);
|
||||
} else {
|
||||
MinecraftForgeClient.bindTexture(Item.itemsList[liquidId].getTextureFile());
|
||||
ForgeHooksClient.bindTexture(Item.itemsList[liquidId].getTextureFile(), 0);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,11 +18,13 @@ import net.minecraft.src.TileEntity;
|
|||
import net.minecraft.src.TileEntitySpecialRenderer;
|
||||
import net.minecraft.src.World;
|
||||
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import buildcraft.api.liquids.LiquidStack;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.RenderEntityBlock;
|
||||
import buildcraft.core.RenderEntityBlock.BlockInterface;
|
||||
|
||||
|
@ -83,9 +85,9 @@ public class RenderTank extends TileEntitySpecialRenderer {
|
|||
GL11.glDisable(2896 /* GL_LIGHTING */);
|
||||
|
||||
if (liquid.itemID < Block.blocksList.length && Block.blocksList[liquid.itemID] != null) {
|
||||
MinecraftForgeClient.bindTexture(Block.blocksList[liquid.itemID].getTextureFile());
|
||||
ForgeHooksClient.bindTexture(Block.blocksList[liquid.itemID].getTextureFile(), 0);
|
||||
} else {
|
||||
MinecraftForgeClient.bindTexture(Item.itemsList[liquid.itemID].getTextureFile());
|
||||
ForgeHooksClient.bindTexture(Item.itemsList[liquid.itemID].getTextureFile(), 0);
|
||||
}
|
||||
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
|
|
|
@ -11,6 +11,7 @@ import net.minecraft.src.Block;
|
|||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.RenderBlocks;
|
||||
import net.minecraft.src.Tessellator;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
|
@ -30,7 +31,7 @@ public class FacadeItemRenderer implements IItemRenderer {
|
|||
|
||||
//Render Facade
|
||||
GL11.glPushMatrix();
|
||||
MinecraftForgeClient.bindTexture(block.getTextureFile());
|
||||
ForgeHooksClient.bindTexture(block.getTextureFile(), 0);
|
||||
block.setBlockBounds(0F, 0F, 1F - 1F/16F, 1F, 1F, 1F);
|
||||
GL11.glTranslatef(translateX, translateY, translateZ);
|
||||
|
||||
|
@ -63,7 +64,7 @@ public class FacadeItemRenderer implements IItemRenderer {
|
|||
|
||||
|
||||
//Render StructurePipe
|
||||
MinecraftForgeClient.bindTexture(DefaultProps.TEXTURE_BLOCKS);
|
||||
ForgeHooksClient.bindTexture(DefaultProps.TEXTURE_BLOCKS, 0);
|
||||
block = BuildCraftTransport.genericPipeBlock;
|
||||
int textureID = 7 * 16 + 13; //Structure pipe
|
||||
block.setBlockBounds(Utils.pipeMinPos, Utils.pipeMinPos, Utils.pipeMinPos, Utils.pipeMaxPos, Utils.pipeMaxPos, Utils.pipeMaxPos - 1F/16F);
|
||||
|
|
|
@ -20,6 +20,7 @@ import net.minecraft.src.Item;
|
|||
import net.minecraft.src.ItemBlock;
|
||||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.RenderBlocks;
|
||||
import net.minecraftforge.client.ForgeHooksClient;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
|
||||
public class PipeWorldRenderer {
|
||||
|
@ -81,8 +82,8 @@ public class PipeWorldRenderer {
|
|||
float minSize = Utils.pipeMinPos;
|
||||
float maxSize = Utils.pipeMaxPos;
|
||||
|
||||
MinecraftForgeClient.bindTexture(state.getTextureFile());
|
||||
|
||||
ForgeHooksClient.bindTexture(state.getTextureFile(), 0);
|
||||
|
||||
state.currentTextureIndex = state.textureMatrix.getTextureIndex(Orientations.Unknown);
|
||||
block.setBlockBounds(minSize, minSize, minSize, maxSize, maxSize, maxSize);
|
||||
renderblocks.renderStandardBlock(block, x, y, z);
|
||||
|
@ -125,8 +126,8 @@ public class PipeWorldRenderer {
|
|||
|
||||
block.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
MinecraftForgeClient.bindTexture(DefaultProps.TEXTURE_BLOCKS);
|
||||
|
||||
ForgeHooksClient.bindTexture(DefaultProps.TEXTURE_BLOCKS, 0);
|
||||
|
||||
if (state.wireMatrix.hasWire(WireColor.Red)) {
|
||||
state.currentTextureIndex = state.wireMatrix.getTextureIndex(WireColor.Red);
|
||||
pipeWireRender(renderblocks, block, state, Utils.pipeMinPos, Utils.pipeMaxPos,
|
||||
|
@ -176,7 +177,7 @@ public class PipeWorldRenderer {
|
|||
|
||||
for (Orientations direction : Orientations.dirs()){
|
||||
if (state.facadeMatrix.isConnected(direction)){
|
||||
MinecraftForgeClient.bindTexture(state.facadeMatrix.getTextureFile(direction));
|
||||
ForgeHooksClient.bindTexture(state.facadeMatrix.getTextureFile(direction), 0);
|
||||
state.currentTextureIndex = state.facadeMatrix.getTextureIndex(direction);
|
||||
|
||||
//Hollow facade
|
||||
|
@ -230,7 +231,7 @@ public class PipeWorldRenderer {
|
|||
zeroState[2][0] = Utils.pipeMinPos;
|
||||
zeroState[2][1] = Utils.pipeMaxPos;
|
||||
|
||||
MinecraftForgeClient.bindTexture(DefaultProps.TEXTURE_BLOCKS);
|
||||
ForgeHooksClient.bindTexture(DefaultProps.TEXTURE_BLOCKS, 0);
|
||||
state.currentTextureIndex = 7 * 16 + 13; // Structure Pipe
|
||||
|
||||
for (Orientations direction : Orientations.dirs()){
|
||||
|
|
|
@ -263,7 +263,7 @@ public class RenderPipe extends TileEntitySpecialRenderer {
|
|||
GL11.glPushMatrix();
|
||||
GL11.glDisable(2896 /* GL_LIGHTING */);
|
||||
|
||||
MinecraftForgeClient.bindTexture(DefaultProps.TEXTURE_BLOCKS);
|
||||
ForgeHooksClient.bindTexture(DefaultProps.TEXTURE_BLOCKS, 0);
|
||||
|
||||
GL11.glTranslatef((float) x + 0.5F, (float) y + 0.5F, (float) z + 0.5F);
|
||||
|
||||
|
@ -382,9 +382,9 @@ public class RenderPipe extends TileEntitySpecialRenderer {
|
|||
return null;
|
||||
|
||||
if (liquidId < Block.blocksList.length && Block.blocksList[liquidId] != null) {
|
||||
MinecraftForgeClient.bindTexture(Block.blocksList[liquidId].getTextureFile());
|
||||
ForgeHooksClient.bindTexture(Block.blocksList[liquidId].getTextureFile(), 0);
|
||||
} else {
|
||||
MinecraftForgeClient.bindTexture(Item.itemsList[liquidId].getTextureFile());
|
||||
ForgeHooksClient.bindTexture(Item.itemsList[liquidId].getTextureFile(), 0);
|
||||
}
|
||||
return getDisplayLiquidLists(liquidId, stack.itemMeta, world);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue