fix: apparatus rendering

closes #2
This commit is contained in:
LordMZTE 2023-05-27 14:54:06 +02:00
parent 7e65f0d606
commit b0237e5d1e
Signed by: LordMZTE
GPG Key ID: B64802DC33A64FF6
20 changed files with 823 additions and 911 deletions

View File

@ -2,7 +2,6 @@ package net.anvilcraft.thaummach.blocks;
import java.util.Random;
import cpw.mods.fml.common.FMLCommonHandler;
import net.anvilcraft.thaummach.AuraUtils;
import net.anvilcraft.thaummach.GuiID;
import net.anvilcraft.thaummach.ITileGui;
@ -20,7 +19,6 @@ import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient;
public abstract class BlockApparatus extends BlockContainer {
protected int currentPass;
@ -134,17 +132,6 @@ public abstract class BlockApparatus extends BlockContainer {
super.breakBlock(world, x, y, z, block, meta);
}
@Override
public boolean canRenderInPass(int n) {
this.currentPass = n;
return true;
}
@Override
public int getRenderBlockPass() {
return this.currentPass;
}
@Override
public void onPostBlockPlaced(World world, int x, int y, int z, int meta) {
world.setBlockMetadataWithNotify(x, y, z, meta, 3);

View File

@ -31,71 +31,65 @@ public abstract class AbstractTankApparatusRenderer<Apparatus extends BlockAppar
BlockApparatus block = (BlockApparatus) block_;
float w1;
float w2;
if (block.getRenderBlockPass() == 0 || inv) {
w1 = 0.0625F;
w2 = 0.125F;
IIcon t1 = this.getBottomIcon((Apparatus) block);
IIcon t2 = this.getSideIcon((Apparatus) block);
w1 = 0.0625F;
w2 = 0.125F;
IIcon t1 = this.getBottomIcon((Apparatus) block);
IIcon t2 = this.getSideIcon((Apparatus) block);
rb.setRenderBounds(w1, 0.0F, w1, 1.0F - w1, 1.0F, 1.0F - w1);
if (inv) {
BlockRenderer.drawFaces(rb, block, t1, t1, t2, t2, t2, t2, false);
} else {
rb.setRenderBounds(w1, 0.0F, w1, 1.0F - w1, 1.0F, 1.0F - w1);
if (inv) {
BlockRenderer.drawFaces(rb, block, t1, t1, t2, t2, t2, t2, false);
} else {
rb.renderStandardBlock(block, i, j, k);
}
if (!inv) {
rb.overrideBlockTexture = this.getBottomIcon((Apparatus) block);
TileConduitTank tc = (TileConduitTank) w.getTileEntity(i, j, k);
HelperLocation loc = new HelperLocation(tc);
loc.facing = ForgeDirection.WEST;
TileEntity te = loc.getConnectableTile(w);
if (te != null && tc.getConnectable(loc.facing)
&& !(te instanceof TileConduitTank)) {
rb.setRenderBounds(0.0F, 0.5F - w2, 0.5F - w2, w1, 0.5F + w2, 0.5F + w2);
rb.renderStandardBlock(block, i, j, k);
}
if (!inv) {
rb.overrideBlockTexture = this.getBottomIcon((Apparatus) block);
TileConduitTank tc = (TileConduitTank) w.getTileEntity(i, j, k);
HelperLocation loc = new HelperLocation(tc);
loc.facing = ForgeDirection.WEST;
TileEntity te = loc.getConnectableTile(w);
if (te != null && tc.getConnectable(loc.facing)
&& !(te instanceof TileConduitTank)) {
rb.setRenderBounds(
0.0F, 0.5F - w2, 0.5F - w2, w1, 0.5F + w2, 0.5F + w2
);
rb.renderStandardBlock(block, i, j, k);
}
loc = new HelperLocation(tc);
loc.facing = ForgeDirection.EAST;
te = loc.getConnectableTile(w);
if (te != null && tc.getConnectable(loc.facing)
&& !(te instanceof TileConduitTank)) {
rb.setRenderBounds(
1.0F - w1, 0.5F - w2, 0.5F - w2, 1.0F, 0.5F + w2, 0.5F + w2
);
rb.renderStandardBlock(block, i, j, k);
}
loc = new HelperLocation(tc);
loc.facing = ForgeDirection.EAST;
te = loc.getConnectableTile(w);
if (te != null && tc.getConnectable(loc.facing)
&& !(te instanceof TileConduitTank)) {
rb.setRenderBounds(
1.0F - w1, 0.5F - w2, 0.5F - w2, 1.0F, 0.5F + w2, 0.5F + w2
);
rb.renderStandardBlock(block, i, j, k);
}
loc = new HelperLocation(tc);
loc.facing = ForgeDirection.NORTH;
te = loc.getConnectableTile(w);
if (te != null && tc.getConnectable(loc.facing)
&& !(te instanceof TileConduitTank)) {
rb.setRenderBounds(0.5F - w2, 0.5F - w2, 0.0F, 0.5F + w2, 0.5F + w2, w1);
rb.renderStandardBlock(block, i, j, k);
}
loc = new HelperLocation(tc);
loc.facing = ForgeDirection.NORTH;
te = loc.getConnectableTile(w);
if (te != null && tc.getConnectable(loc.facing)
&& !(te instanceof TileConduitTank)) {
rb.setRenderBounds(
0.5F - w2, 0.5F - w2, 0.0F, 0.5F + w2, 0.5F + w2, w1
);
rb.renderStandardBlock(block, i, j, k);
}
loc = new HelperLocation(tc);
loc.facing = ForgeDirection.SOUTH;
te = loc.getConnectableTile(w);
if (te != null && tc.getConnectable(loc.facing)
&& !(te instanceof TileConduitTank)) {
rb.setRenderBounds(
0.5F - w2, 0.5F - w2, 1.0F - w1, 0.5F + w2, 0.5F + w2, 1.0F
);
rb.renderStandardBlock(block, i, j, k);
}
loc = new HelperLocation(tc);
loc.facing = ForgeDirection.SOUTH;
te = loc.getConnectableTile(w);
if (te != null && tc.getConnectable(loc.facing)
&& !(te instanceof TileConduitTank)) {
rb.setRenderBounds(
0.5F - w2, 0.5F - w2, 1.0F - w1, 0.5F + w2, 0.5F + w2, 1.0F
);
rb.renderStandardBlock(block, i, j, k);
}
}
rb.overrideBlockTexture = null;
if (block.getRenderBlockPass() == 0 && !inv) {
if (!inv) {
w1 = 0.003F;
w2 = 0.0625F;
TileConduitTank tc = (TileConduitTank) w.getTileEntity(i, j, k);

View File

@ -1,7 +1,6 @@
package net.anvilcraft.thaummach.render.apparatus.apparati.fragile;
import dev.tilera.auracore.api.HelperLocation;
import dev.tilera.auracore.api.machine.IConnection;
import net.anvilcraft.thaummach.blocks.BlockApparatusFragile;
import net.anvilcraft.thaummach.render.apparatus.IApparatusRenderer;
import net.anvilcraft.thaummach.tiles.TileConduit;
@ -41,55 +40,51 @@ public class ConduitApparatusRenderer implements IApparatusRenderer {
boolean visible = false;
total = Math.min(tc.pureVis + tc.taintedVis, tc.maxVis);
hfill = (1.0F - wq * 2.0F) * (total / tc.maxVis);
if (block.getRenderBlockPass() == 0) {
rb.overrideBlockTexture = block.iconConduit;
rb.setRenderBounds(w6, w6, w6, w6 + w4, w6 + w4, w6 + w4);
rb.renderStandardBlock(block, x, y, z);
visible = tc.pureVis + tc.taintedVis >= 0.1F;
if (visible) {
b = Math.min(1.0F, tc.pureVis / (tc.taintedVis + tc.pureVis));
tessellator.setBrightness(20 + (int) (b * 210.0F));
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
rb.setRenderBounds(wq, wq, wq, 1.0F - wq, wq + hfill, 1.0F - wq);
rb.overrideBlockTexture = null;
rb.renderFaceXNeg(
block, (double) x, (double) y, (double) z, block.iconTcubeanim
);
rb.renderFaceXPos(
block, (double) x, (double) y, (double) z, block.iconTcubeanim
);
rb.renderFaceYNeg(
block, (double) x, (double) y, (double) z, block.iconTcubeanim
);
rb.renderFaceYPos(
block, (double) x, (double) y, (double) z, block.iconTcubeanim
);
rb.renderFaceZNeg(
block, (double) x, (double) y, (double) z, block.iconTcubeanim
);
rb.renderFaceZPos(
block, (double) x, (double) y, (double) z, block.iconTcubeanim
);
if (/*!Config.lowGfx && Config.pipedrips && */ Minecraft
.getMinecraft()
.theWorld.rand.nextInt(50)
== 1
&& w.isAirBlock(x, y - 1, z)
&& tc.pureVis + tc.taintedVis > 3.5F) {
// TODO: FXDrip
//FXDrip obj = new FXDrip(
// w,
// (double) ((float) x + w6 + w.rand.nextFloat() * w4),
// (double) ((float) y + w6 - 0.05F),
// (double) ((float) z + w6 + w.rand.nextFloat() * w4)
//);
//obj.func_40097_b(
// (0.4F + w.rand.nextFloat() * 0.2F) * (b + 0.1F),
// 0.0F,
// (0.8F + w.rand.nextFloat() * 0.2F) * (b + 0.1F)
//);
//ModLoader.getMinecraftInstance().effectRenderer.addEffect(obj);
}
rb.overrideBlockTexture = block.iconConduit;
rb.setRenderBounds(w6, w6, w6, w6 + w4, w6 + w4, w6 + w4);
rb.renderStandardBlock(block, x, y, z);
visible = tc.pureVis + tc.taintedVis >= 0.1F;
if (visible) {
b = Math.min(1.0F, tc.pureVis / (tc.taintedVis + tc.pureVis));
tessellator.setBrightness(20 + (int) (b * 210.0F));
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
rb.setRenderBounds(wq, wq, wq, 1.0F - wq, wq + hfill, 1.0F - wq);
rb.overrideBlockTexture = null;
rb.renderFaceXNeg(
block, (double) x, (double) y, (double) z, block.iconTcubeanim
);
rb.renderFaceXPos(
block, (double) x, (double) y, (double) z, block.iconTcubeanim
);
rb.renderFaceYNeg(
block, (double) x, (double) y, (double) z, block.iconTcubeanim
);
rb.renderFaceYPos(
block, (double) x, (double) y, (double) z, block.iconTcubeanim
);
rb.renderFaceZNeg(
block, (double) x, (double) y, (double) z, block.iconTcubeanim
);
rb.renderFaceZPos(
block, (double) x, (double) y, (double) z, block.iconTcubeanim
);
if (/*!Config.lowGfx && Config.pipedrips && */ Minecraft.getMinecraft()
.theWorld.rand.nextInt(50)
== 1
&& w.isAirBlock(x, y - 1, z) && tc.pureVis + tc.taintedVis > 3.5F) {
// TODO: FXDrip
//FXDrip obj = new FXDrip(
// w,
// (double) ((float) x + w6 + w.rand.nextFloat() * w4),
// (double) ((float) y + w6 - 0.05F),
// (double) ((float) z + w6 + w.rand.nextFloat() * w4)
//);
//obj.func_40097_b(
// (0.4F + w.rand.nextFloat() * 0.2F) * (b + 0.1F),
// 0.0F,
// (0.8F + w.rand.nextFloat() * 0.2F) * (b + 0.1F)
//);
//ModLoader.getMinecraftInstance().effectRenderer.addEffect(obj);
}
}
@ -100,63 +95,53 @@ public class ConduitApparatusRenderer implements IApparatusRenderer {
TileEntity te = loc.getConnectableTile(w);
if (te != null) {
if (block.getRenderBlockPass() == 0) {
switch (loc.facing.getOpposite().ordinal()) {
case 0:
rb.setRenderBounds(
w6, w6 + w4, w6, w6 + w4, 1.0F, w6 + w4
);
rb.renderStandardBlock(block, x, y, z);
break;
case 1:
rb.setRenderBounds(w6, 0.0F, w6, w6 + w4, w6, w6 + w4);
rb.renderStandardBlock(block, x, y, z);
break;
case 2:
rb.setRenderBounds(
w6, w6, w6 + w4, w6 + w4, w6 + w4, 1.0F
);
rb.renderStandardBlock(block, x, y, z);
break;
case 3:
rb.setRenderBounds(w6, w6, 0.0F, w6 + w4, w6 + w4, w6);
rb.renderStandardBlock(block, x, y, z);
break;
case 4:
rb.setRenderBounds(
w6 + w4, w6, w6, 1.0F, w6 + w4, w6 + w4
);
rb.renderStandardBlock(block, x, y, z);
break;
case 5:
rb.setRenderBounds(0.0F, w6, w6, w6, w6 + w4, w6 + w4);
rb.renderStandardBlock(block, x, y, z);
}
switch (loc.facing.getOpposite().ordinal()) {
case 0:
rb.setRenderBounds(w6, w6 + w4, w6, w6 + w4, 1.0F, w6 + w4);
rb.renderStandardBlock(block, x, y, z);
break;
case 1:
rb.setRenderBounds(w6, 0.0F, w6, w6 + w4, w6, w6 + w4);
rb.renderStandardBlock(block, x, y, z);
break;
case 2:
rb.setRenderBounds(w6, w6, w6 + w4, w6 + w4, w6 + w4, 1.0F);
rb.renderStandardBlock(block, x, y, z);
break;
case 3:
rb.setRenderBounds(w6, w6, 0.0F, w6 + w4, w6 + w4, w6);
rb.renderStandardBlock(block, x, y, z);
break;
case 4:
rb.setRenderBounds(w6 + w4, w6, w6, 1.0F, w6 + w4, w6 + w4);
rb.renderStandardBlock(block, x, y, z);
break;
case 5:
rb.setRenderBounds(0.0F, w6, w6, w6, w6 + w4, w6 + w4);
rb.renderStandardBlock(block, x, y, z);
}
if (visible) {
rb.overrideBlockTexture = null;
tessellator.setBrightness(20 + (int) (b * 210.0F));
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
renderConduitVis(
w,
rb,
x,
y,
z,
block,
loc.facing.getOpposite().ordinal(),
hfill
);
rb.overrideBlockTexture = block.iconConduitExtension;
}
if (visible) {
rb.overrideBlockTexture = null;
tessellator.setBrightness(20 + (int) (b * 210.0F));
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
renderConduitVis(
w,
rb,
x,
y,
z,
block,
loc.facing.getOpposite().ordinal(),
hfill
);
rb.overrideBlockTexture = block.iconConduitExtension;
}
}
}
} else {
rb.setRenderBounds(w6, 0.0F, w6, w6 + w4, 1.0F, w6 + w4);
BlockRenderer.drawFaces(
rb, block, block.iconConduitInventory, false
);
BlockRenderer.drawFaces(rb, block, block.iconConduitInventory, false);
}
rb.overrideBlockTexture = null;

View File

@ -1,7 +1,6 @@
package net.anvilcraft.thaummach.render.apparatus.apparati.fragile;
import dev.tilera.auracore.api.HelperLocation;
import dev.tilera.auracore.api.machine.IConnection;
import net.anvilcraft.thaummach.blocks.BlockApparatusFragile;
import net.anvilcraft.thaummach.render.apparatus.IApparatusRenderer;
import net.anvilcraft.thaummach.tiles.TileConduitValveAdvanced;
@ -41,48 +40,42 @@ public class ConduitValveAdvancedApparatusRenderer implements IApparatusRenderer
float total = 0.0F;
float hfill = 0.0F;
boolean visible = false;
if (block.getRenderBlockPass() == 0) {
switch (tc.setting) {
case 0:
rb.overrideBlockTexture = block.iconValveAdvancedOff;
break;
case 1:
rb.overrideBlockTexture = block.iconValveAdvancedOnVis;
break;
case 2:
rb.overrideBlockTexture = block.iconValveAdvancedOnTaint;
}
switch (tc.setting) {
case 0:
rb.overrideBlockTexture = block.iconValveAdvancedOff;
break;
case 1:
rb.overrideBlockTexture = block.iconValveAdvancedOnVis;
break;
case 2:
rb.overrideBlockTexture = block.iconValveAdvancedOnTaint;
}
rb.setRenderBounds(w4, w4, w4, 1.0F - w4, 1.0F - w4, 1.0F - w4);
rb.renderStandardBlock(block, i, j, k);
rb.overrideBlockTexture = block.iconConduitExtension;
} else {
visible = tc.pureVis + tc.taintedVis >= 0.1F;
if (visible) {
b = Math.min(
1.0F, tc.pureVis / (tc.taintedVis + tc.pureVis)
);
total = Math.min(tc.pureVis + tc.taintedVis, tc.maxVis);
hfill = (1.0F - wq * 2.0F) * (total / tc.maxVis);
tessellator.setBrightness(20 + (int) (b * 210.0F));
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
if (Minecraft.getMinecraft().theWorld.rand.nextInt(50) == 1
&& w.isAirBlock(i, j - 1, k)
&& tc.pureVis + tc.taintedVis > 3.5F) {
// TODO: WTF
//FXDrip obj = new FXDrip(
// w,
// (double) ((float) i + w4 + w.rand.nextFloat() * w6),
// (double) ((float) j + w4 - 0.05F),
// (double) ((float) k + w4 + w.rand.nextFloat() * w6)
//);
//obj.func_40097_b(
// (0.4F + w.rand.nextFloat() * 0.2F) * (b + 0.1F),
// 0.0F,
// (0.8F + w.rand.nextFloat() * 0.2F) * (b + 0.1F)
//);
//ModLoader.getMinecraftInstance().effectRenderer.addEffect(obj);
}
rb.setRenderBounds(w4, w4, w4, 1.0F - w4, 1.0F - w4, 1.0F - w4);
rb.renderStandardBlock(block, i, j, k);
rb.overrideBlockTexture = block.iconConduitExtension;
visible = tc.pureVis + tc.taintedVis >= 0.1F;
if (visible) {
b = Math.min(1.0F, tc.pureVis / (tc.taintedVis + tc.pureVis));
total = Math.min(tc.pureVis + tc.taintedVis, tc.maxVis);
hfill = (1.0F - wq * 2.0F) * (total / tc.maxVis);
tessellator.setBrightness(20 + (int) (b * 210.0F));
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
if (Minecraft.getMinecraft().theWorld.rand.nextInt(50) == 1
&& w.isAirBlock(i, j - 1, k) && tc.pureVis + tc.taintedVis > 3.5F) {
// TODO: WTF
//FXDrip obj = new FXDrip(
// w,
// (double) ((float) i + w4 + w.rand.nextFloat() * w6),
// (double) ((float) j + w4 - 0.05F),
// (double) ((float) k + w4 + w.rand.nextFloat() * w6)
//);
//obj.func_40097_b(
// (0.4F + w.rand.nextFloat() * 0.2F) * (b + 0.1F),
// 0.0F,
// (0.8F + w.rand.nextFloat() * 0.2F) * (b + 0.1F)
//);
//ModLoader.getMinecraftInstance().effectRenderer.addEffect(obj);
}
}
@ -92,60 +85,47 @@ public class ConduitValveAdvancedApparatusRenderer implements IApparatusRenderer
TileEntity te = loc.getConnectableTile(w);
if (te != null) {
if (block.getRenderBlockPass() == 0) {
switch (dir) {
case 0:
rb.setRenderBounds(
w6, 1.0F - w4, w6, 1.0F - w6, 1.0F, 1.0F - w6
);
rb.renderStandardBlock(block, i, j, k);
break;
case 1:
rb.setRenderBounds(
w6, 0.0F, w6, 1.0F - w6, w6, 1.0F - w6
);
rb.renderStandardBlock(block, i, j, k);
break;
case 2:
rb.setRenderBounds(
w6, w6, 1.0F - w4, 1.0F - w6, 1.0F - w6, 1.0F
);
rb.renderStandardBlock(block, i, j, k);
break;
case 3:
rb.setRenderBounds(
w6, w6, 0.0F, 1.0F - w6, 1.0F - w6, w4
);
rb.renderStandardBlock(block, i, j, k);
break;
case 4:
rb.setRenderBounds(
1.0F - w4, w6, w6, 1.0F, 1.0F - w6, 1.0F - w6
);
rb.renderStandardBlock(block, i, j, k);
break;
case 5:
rb.setRenderBounds(
0.0F, w6, w6, w4, 1.0F - w6, 1.0F - w6
);
rb.renderStandardBlock(block, i, j, k);
}
} else if (visible && (((IConnection)te).getPureVis() + ((IConnection)te).getTaintedVis() > 0.1F || !((IConnection)te).isVisConduit())) {
ConduitApparatusRenderer.renderConduitVis(
w, rb, i, j, k, block, dir, hfill
);
switch (dir) {
case 0:
rb.setRenderBounds(
w6, 1.0F - w4, w6, 1.0F - w6, 1.0F, 1.0F - w6
);
rb.renderStandardBlock(block, i, j, k);
break;
case 1:
rb.setRenderBounds(w6, 0.0F, w6, 1.0F - w6, w6, 1.0F - w6);
rb.renderStandardBlock(block, i, j, k);
break;
case 2:
rb.setRenderBounds(
w6, w6, 1.0F - w4, 1.0F - w6, 1.0F - w6, 1.0F
);
rb.renderStandardBlock(block, i, j, k);
break;
case 3:
rb.setRenderBounds(w6, w6, 0.0F, 1.0F - w6, 1.0F - w6, w4);
rb.renderStandardBlock(block, i, j, k);
break;
case 4:
rb.setRenderBounds(
1.0F - w4, w6, w6, 1.0F, 1.0F - w6, 1.0F - w6
);
rb.renderStandardBlock(block, i, j, k);
break;
case 5:
rb.setRenderBounds(0.0F, w6, w6, w4, 1.0F - w6, 1.0F - w6);
rb.renderStandardBlock(block, i, j, k);
}
ConduitApparatusRenderer.renderConduitVis(
w, rb, i, j, k, block, dir, hfill
);
}
}
} else {
rb.setRenderBounds(w6, 0.0F, w6, 1.0F - w6, 1.0F, 1.0F - w6);
BlockRenderer.drawFaces(
rb, block, block.iconConduitInventory, false
);
BlockRenderer.drawFaces(rb, block, block.iconConduitInventory, false);
rb.setRenderBounds(w4, w4, w4, 1.0F - w4, 1.0F - w4, 1.0F - w4);
BlockRenderer.drawFaces(
rb, block, block.iconValveAdvancedOff, false
);
BlockRenderer.drawFaces(rb, block, block.iconValveAdvancedOff, false);
}
rb.overrideBlockTexture = null;

View File

@ -39,39 +39,35 @@ public class ConduitValveApparatusRenderer implements IApparatusRenderer {
float total = 0.0F;
float hfill = 0.0F;
boolean visible = tc.pureVis + tc.taintedVis >= 0.1F;
if (block.getRenderBlockPass() == 0) {
if (tc.open) {
rb.overrideBlockTexture = block.iconValveOn;
} else {
rb.overrideBlockTexture = block.iconValveOff;
}
rb.setRenderBounds(w4, w4, w4, 1.0F - w4, 1.0F - w4, 1.0F - w4);
rb.renderStandardBlock(block, i, j, k);
rb.overrideBlockTexture = block.iconConduitExtension;
if (tc.open) {
rb.overrideBlockTexture = block.iconValveOn;
} else {
if (visible) {
total = Math.min(tc.pureVis + tc.taintedVis, tc.maxVis);
hfill = (1.0F - wq * 2.0F) * (total / tc.maxVis);
tessellator.setBrightness(20 + (int) (b * 210.0F));
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
if (Minecraft.getMinecraft().theWorld.rand.nextInt(50) == 1
&& w.isAirBlock(i, j - 1, k)
&& tc.pureVis + tc.taintedVis > 3.5F) {
// TODO: FXDrip
//FXDrip obj = new FXDrip(
// w,
// (double) ((float) i + w4 + w.rand.nextFloat() * w6),
// (double) ((float) j + w4 - 0.05F),
// (double) ((float) k + w4 + w.rand.nextFloat() * w6)
//);
//obj.func_40097_b(
// (0.4F + w.rand.nextFloat() * 0.2F) * (b + 0.1F),
// 0.0F,
// (0.8F + w.rand.nextFloat() * 0.2F) * (b + 0.1F)
//);
//ModLoader.getMinecraftInstance().effectRenderer.addEffect(obj);
}
rb.overrideBlockTexture = block.iconValveOff;
}
rb.setRenderBounds(w4, w4, w4, 1.0F - w4, 1.0F - w4, 1.0F - w4);
rb.renderStandardBlock(block, i, j, k);
rb.overrideBlockTexture = block.iconConduitExtension;
if (visible) {
total = Math.min(tc.pureVis + tc.taintedVis, tc.maxVis);
hfill = (1.0F - wq * 2.0F) * (total / tc.maxVis);
tessellator.setBrightness(20 + (int) (b * 210.0F));
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
if (Minecraft.getMinecraft().theWorld.rand.nextInt(50) == 1
&& w.isAirBlock(i, j - 1, k) && tc.pureVis + tc.taintedVis > 3.5F) {
// TODO: FXDrip
//FXDrip obj = new FXDrip(
// w,
// (double) ((float) i + w4 + w.rand.nextFloat() * w6),
// (double) ((float) j + w4 - 0.05F),
// (double) ((float) k + w4 + w.rand.nextFloat() * w6)
//);
//obj.func_40097_b(
// (0.4F + w.rand.nextFloat() * 0.2F) * (b + 0.1F),
// 0.0F,
// (0.8F + w.rand.nextFloat() * 0.2F) * (b + 0.1F)
//);
//ModLoader.getMinecraftInstance().effectRenderer.addEffect(obj);
}
}
@ -151,9 +147,7 @@ public class ConduitValveApparatusRenderer implements IApparatusRenderer {
}
} else {
rb.setRenderBounds(w6, 0.0F, w6, 1.0F - w6, 1.0F, 1.0F - w6);
BlockRenderer.drawFaces(
rb, block, block.iconConduitInventory, false
);
BlockRenderer.drawFaces(rb, block, block.iconConduitInventory, false);
rb.setRenderBounds(w4, w4, w4, 1.0F - w4, 1.0F - w4, 1.0F - w4);
BlockRenderer.drawFaces(rb, block, block.iconValveOn, false);
}

View File

@ -31,57 +31,55 @@ public class FilterApparatusRenderer implements IApparatusRenderer {
float w4 = 0.25F;
float w3 = 0.1875F;
float w2 = 0.125F;
if (block.getRenderBlockPass() == 0 || inv) {
rb.setRenderBounds(w2, 0.0F, w2, 1.0F - w2, w3, 1.0F - w2);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconFilterBottom,
block.iconFilterBottom,
block.iconFilterSide,
block.iconFilterSide,
block.iconFilterSide,
block.iconFilterSide,
false
);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(w2, 0.0F, w2, 1.0F - w2, w3, 1.0F - w2);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconFilterBottom,
block.iconFilterBottom,
block.iconFilterSide,
block.iconFilterSide,
block.iconFilterSide,
block.iconFilterSide,
false
);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(w2, 1.0F - w3, w2, 1.0F - w2, 1.0F, 1.0F - w2);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconFilterBottom,
block.iconFilterBottom,
block.iconFilterSide,
block.iconFilterSide,
block.iconFilterSide,
block.iconFilterSide,
false
);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(w2, 1.0F - w3, w2, 1.0F - w2, 1.0F, 1.0F - w2);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconFilterBottom,
block.iconFilterBottom,
block.iconFilterSide,
block.iconFilterSide,
block.iconFilterSide,
block.iconFilterSide,
false
);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(w3, w3, w3, 1.0F - w3, 1.0F - w3, 1.0F - w3);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconFilterBottom,
block.iconFilterBottom,
block.iconFilterSide,
block.iconFilterSide,
block.iconFilterSide,
block.iconFilterSide,
false
);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(w3, w3, w3, 1.0F - w3, 1.0F - w3, 1.0F - w3);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconFilterBottom,
block.iconFilterBottom,
block.iconFilterSide,
block.iconFilterSide,
block.iconFilterSide,
block.iconFilterSide,
false
);
} else {
rb.renderStandardBlock(block, x, y, z);
}
if (!inv) {
@ -93,17 +91,13 @@ public class FilterApparatusRenderer implements IApparatusRenderer {
float total = 0.0F;
float hfill = 0.0F;
boolean visible = false;
if (block.getRenderBlockPass() != 0) {
visible = tc.pureVis + tc.taintedVis >= 0.1F;
if (visible) {
b = Math.min(
1.0F, tc.pureVis / (tc.taintedVis + tc.pureVis)
);
total = Math.min(tc.pureVis + tc.taintedVis, tc.maxVis);
hfill = (1.0F - wq * 2.0F) * (total / tc.maxVis);
tessellator.setBrightness(20 + (int) (b * 210.0F));
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
}
visible = tc.pureVis + tc.taintedVis >= 0.1F;
if (visible) {
b = Math.min(1.0F, tc.pureVis / (tc.taintedVis + tc.pureVis));
total = Math.min(tc.pureVis + tc.taintedVis, tc.maxVis);
hfill = (1.0F - wq * 2.0F) * (total / tc.maxVis);
tessellator.setBrightness(20 + (int) (b * 210.0F));
tessellator.setColorOpaque_F(1.0F, 1.0F, 1.0F);
}
for (int dir = 2; dir < 6; ++dir) {
@ -124,34 +118,27 @@ public class FilterApparatusRenderer implements IApparatusRenderer {
TileEntity te = loc.getConnectableTile(w);
if (te != null && tc.getConnectable(loc.facing)) {
if (block.getRenderBlockPass() == 0) {
rb.overrideBlockTexture = block.iconConduitConnection;
switch (dir) {
case 2:
rb.setRenderBounds(
w6, w6, 1.0F - w3, w6 + w4, w6 + w4, 1.0F
);
rb.renderStandardBlock(block, x, y, z);
break;
case 3:
rb.setRenderBounds(w6, w6, 0.0F, w6 + w4, w6 + w4, w3);
rb.renderStandardBlock(block, x, y, z);
break;
case 4:
rb.setRenderBounds(
1.0F - w3, w6, w6, 1.0F, w6 + w4, w6 + w4
);
rb.renderStandardBlock(block, x, y, z);
break;
case 5:
rb.setRenderBounds(0.0F, w6, w6, w3, w6 + w4, w6 + w4);
rb.renderStandardBlock(block, x, y, z);
}
} else if (visible && (((IConnection)te).getPureVis() + ((IConnection)te).getTaintedVis() > 0.1F || !((IConnection)te).isVisConduit())) {
ConduitApparatusRenderer.renderConduitVis(
w, rb, x, y, z, block, dir, hfill
);
rb.overrideBlockTexture = block.iconConduitConnection;
switch (dir) {
case 2:
rb.setRenderBounds(w6, w6, 1.0F - w3, w6 + w4, w6 + w4, 1.0F);
rb.renderStandardBlock(block, x, y, z);
break;
case 3:
rb.setRenderBounds(w6, w6, 0.0F, w6 + w4, w6 + w4, w3);
rb.renderStandardBlock(block, x, y, z);
break;
case 4:
rb.setRenderBounds(1.0F - w3, w6, w6, 1.0F, w6 + w4, w6 + w4);
rb.renderStandardBlock(block, x, y, z);
break;
case 5:
rb.setRenderBounds(0.0F, w6, w6, w3, w6 + w4, w6 + w4);
rb.renderStandardBlock(block, x, y, z);
}
ConduitApparatusRenderer.renderConduitVis(
w, rb, x, y, z, block, dir, hfill
);
}
}
}

View File

@ -22,23 +22,21 @@ public class PurifierApparatusRenderer implements IApparatusRenderer {
boolean inv
) {
BlockApparatusFragile block = (BlockApparatusFragile) block_;
if (block.getRenderBlockPass() == 0 || inv) {
rb.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconPurifierTop,
block.iconPurifierTop,
block.iconPurifierFront,
block.iconPurifierFront,
block.iconPurifierSide,
block.iconPurifierSide,
false
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconPurifierTop,
block.iconPurifierTop,
block.iconPurifierFront,
block.iconPurifierFront,
block.iconPurifierSide,
block.iconPurifierSide,
false
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.overrideBlockTexture = null;

View File

@ -23,7 +23,7 @@ public class ArcaneFurnaceApparatusRenderer implements IApparatusRenderer {
boolean inv
) {
BlockApparatusMetal block = (BlockApparatusMetal) block_;
if (block.getRenderBlockPass() == 0 && !inv) {
if (!inv) {
float w3 = 0.1875F;
rb.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
rb.renderStandardBlock(block, i, j, k);
@ -62,7 +62,7 @@ public class ArcaneFurnaceApparatusRenderer implements IApparatusRenderer {
(double) ((float) (k + 1) - w3),
block.iconArcaneFurnaceInside
);
} else if (inv) {
} else {
rb.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
BlockRenderer.drawFaces(
rb,

View File

@ -24,100 +24,98 @@ public class BoreApparatusRenderer implements IApparatusRenderer {
boolean inv
) {
BlockApparatusMetal block = (BlockApparatusMetal) block_;
if (block.getRenderBlockPass() == 0 || inv) {
boolean b1 = false;
boolean b2 = false;
boolean b3 = false;
if (!inv) {
TileBore te = (TileBore) w.getTileEntity(i, j, k);
if (te.orientation == 0 || te.orientation == 1) {
b1 = true;
}
if (te.orientation == 4 || te.orientation == 5) {
b2 = true;
}
if (te.orientation == 2 || te.orientation == 3) {
b3 = true;
}
boolean b1 = false;
boolean b2 = false;
boolean b3 = false;
if (!inv) {
TileBore te = (TileBore) w.getTileEntity(i, j, k);
if (te.orientation == 0 || te.orientation == 1) {
b1 = true;
}
float t2x = 0.125F;
float t4x = 0.25F;
IIcon t1 = block.iconGenerator3;
IIcon t2 = block.iconGenerator2;
IIcon tx = block.iconGenerator3;
rb.overrideBlockTexture = tx;
rb.setRenderBounds(t2x, t2x, t2x, 1.0F - t2x, 1.0F - t2x, 1.0F - t2x);
if (inv) {
BlockRenderer.drawFaces(rb, block, t1, true);
} else {
rb.renderStandardBlock(block, i, j, k);
if (te.orientation == 4 || te.orientation == 5) {
b2 = true;
}
if (b1) {
tx = t2;
} else {
tx = t1;
if (te.orientation == 2 || te.orientation == 3) {
b3 = true;
}
}
rb.overrideBlockTexture = tx;
rb.setRenderBounds(t4x, 0.0F, t4x, 1.0F - t4x, t2x, 1.0F - t4x);
if (inv) {
BlockRenderer.drawFaces(rb, block, tx, true);
} else {
rb.renderStandardBlock(block, i, j, k);
}
float t2x = 0.125F;
float t4x = 0.25F;
IIcon t1 = block.iconGenerator3;
IIcon t2 = block.iconGenerator2;
IIcon tx = block.iconGenerator3;
rb.overrideBlockTexture = tx;
rb.setRenderBounds(t2x, t2x, t2x, 1.0F - t2x, 1.0F - t2x, 1.0F - t2x);
if (inv) {
BlockRenderer.drawFaces(rb, block, t1, true);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(t4x, 1.0F - t2x, t4x, 1.0F - t4x, 1.0F, 1.0F - t4x);
if (inv) {
BlockRenderer.drawFaces(rb, block, tx, true);
} else {
rb.renderStandardBlock(block, i, j, k);
}
if (b1) {
tx = t2;
} else {
tx = t1;
}
if (b2) {
tx = t2;
} else {
tx = t1;
}
rb.overrideBlockTexture = tx;
rb.setRenderBounds(t4x, 0.0F, t4x, 1.0F - t4x, t2x, 1.0F - t4x);
if (inv) {
BlockRenderer.drawFaces(rb, block, tx, true);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.overrideBlockTexture = tx;
rb.setRenderBounds(0.0F, t4x, t4x, t2x, 1.0F - t4x, 1.0F - t4x);
if (inv) {
BlockRenderer.drawFaces(rb, block, tx, true);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(t4x, 1.0F - t2x, t4x, 1.0F - t4x, 1.0F, 1.0F - t4x);
if (inv) {
BlockRenderer.drawFaces(rb, block, tx, true);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(1.0F - t2x, t4x, t4x, 1.0F, 1.0F - t4x, 1.0F - t4x);
if (inv) {
BlockRenderer.drawFaces(rb, block, tx, true);
} else {
rb.renderStandardBlock(block, i, j, k);
}
if (b2) {
tx = t2;
} else {
tx = t1;
}
if (b3) {
tx = t2;
} else {
tx = t1;
}
rb.overrideBlockTexture = tx;
rb.setRenderBounds(0.0F, t4x, t4x, t2x, 1.0F - t4x, 1.0F - t4x);
if (inv) {
BlockRenderer.drawFaces(rb, block, tx, true);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.overrideBlockTexture = tx;
rb.setRenderBounds(t4x, t4x, 0.0F, 1.0F - t4x, 1.0F - t4x, t2x);
if (inv) {
BlockRenderer.drawFaces(rb, block, tx, true);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(1.0F - t2x, t4x, t4x, 1.0F, 1.0F - t4x, 1.0F - t4x);
if (inv) {
BlockRenderer.drawFaces(rb, block, tx, true);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(t4x, t4x, 1.0F - t2x, 1.0F - t4x, 1.0F - t4x, 1.0F);
if (inv) {
BlockRenderer.drawFaces(rb, block, tx, true);
} else {
rb.renderStandardBlock(block, i, j, k);
}
if (b3) {
tx = t2;
} else {
tx = t1;
}
rb.overrideBlockTexture = tx;
rb.setRenderBounds(t4x, t4x, 0.0F, 1.0F - t4x, 1.0F - t4x, t2x);
if (inv) {
BlockRenderer.drawFaces(rb, block, tx, true);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(t4x, t4x, 1.0F - t2x, 1.0F - t4x, 1.0F - t4x, 1.0F);
if (inv) {
BlockRenderer.drawFaces(rb, block, tx, true);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.overrideBlockTexture = null;

View File

@ -29,14 +29,11 @@ public class CrucibleApparatusRenderer implements IApparatusRenderer {
BlockApparatusMetal block = (BlockApparatusMetal) block_;
MetaVals md = MetaVals.get(meta);
IIcon[] icons = getIcons(block, md);
if (block.getRenderBlockPass() == 0 && !inv) {
if (!inv) {
rb.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
rb.renderStandardBlock(block, i, j, k);
} else if (inv &&
(md == MetaVals.NORMAL_CRUCIBLE
|| md == MetaVals.EYES_CRUCIBLE
|| md == MetaVals.THAUMIUM_CRUCIBLE)
) {
} else if ((md == MetaVals.NORMAL_CRUCIBLE || md == MetaVals.EYES_CRUCIBLE
|| md == MetaVals.THAUMIUM_CRUCIBLE)) {
rb.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
BlockRenderer.drawFaces(
rb,
@ -49,7 +46,7 @@ public class CrucibleApparatusRenderer implements IApparatusRenderer {
icons[5],
true
);
} else if (inv && md == MetaVals.SOUL_CRUCIBLE) {
} else if (md == MetaVals.SOUL_CRUCIBLE) {
rb.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
BlockRenderer.drawFaces(
rb,
@ -88,75 +85,73 @@ public class CrucibleApparatusRenderer implements IApparatusRenderer {
f5 = 0.123F;
if (!inv) {
if (block.getRenderBlockPass() == 0) {
rb.renderFaceXPos(
block, (double) ((float) i - 1.0F + f5), (double) j, (double) k, c
);
rb.renderFaceXNeg(
block, (double) ((float) i + 1.0F - f5), (double) j, (double) k, c
);
rb.renderFaceZPos(
block, (double) i, (double) j, (double) ((float) k - 1.0F + f5), c
);
rb.renderFaceZNeg(
block, (double) i, (double) j, (double) ((float) k + 1.0F - f5), c
);
rb.renderFaceXPos(
block, (double) ((float) i - 1.0F + f5), (double) j, (double) k, c
);
rb.renderFaceXNeg(
block, (double) ((float) i + 1.0F - f5), (double) j, (double) k, c
);
rb.renderFaceZPos(
block, (double) i, (double) j, (double) ((float) k - 1.0F + f5), c
);
rb.renderFaceZNeg(
block, (double) i, (double) j, (double) ((float) k + 1.0F - f5), c
);
rb.renderFaceYPos(
block, (double) i, (double) ((float) j - 1.0F + 0.25F), (double) k, c1
);
rb.renderFaceYNeg(
block, (double) i, (double) ((float) j + 1.0F - 0.75F), (double) k, c1
);
TileCrucible tc = (TileCrucible) w.getTileEntity(i, j, k);
float tvis = tc.pureVis + tc.taintedVis;
if (tvis > 0.1F) {
float h = Math.min(tvis, tc.maxVis);
float level = 0.75F * (h / tc.maxVis);
if (tc.maxVis == tvis) {
level = (float) ((double) level - 0.001);
}
float b = Math.min(1.0F, tc.pureVis / (tc.taintedVis + tc.pureVis));
tessellator.setBrightness(20 + (int) (b * 210.0F));
rb.renderFaceYPos(
block, (double) i, (double) ((float) j - 1.0F + 0.25F), (double) k, c1
block,
(double) i,
(double) ((float) j + 0.25F + level - 1.0F),
(double) k,
block.iconTcubeanim
);
rb.renderFaceYNeg(
block, (double) i, (double) ((float) j + 1.0F - 0.75F), (double) k, c1
);
TileCrucible tc = (TileCrucible) w.getTileEntity(i, j, k);
float tvis = tc.pureVis + tc.taintedVis;
if (tvis > 0.1F) {
float h = Math.min(tvis, tc.maxVis);
float level = 0.75F * (h / tc.maxVis);
if (tc.maxVis == tvis) {
level = (float) ((double) level - 0.001);
}
float b = Math.min(1.0F, tc.pureVis / (tc.taintedVis + tc.pureVis));
tessellator.setBrightness(20 + (int) (b * 210.0F));
rb.renderFaceYPos(
block,
(double) i,
(double) ((float) j + 0.25F + level - 1.0F),
(double) k,
block.iconTcubeanim
);
if (tvis > tc.maxVis) {
// TODO: WTF
//rb.renderSouthFace(
// block,
// (double) i,
// (double) j,
// (double) k,
// mod_ThaumCraft.visDripFX
//);
//rb.renderNorthFace(
// block,
// (double) i,
// (double) j,
// (double) k,
// mod_ThaumCraft.visDripFX
//);
//rb.renderWestFace(
// block,
// (double) i,
// (double) j,
// (double) k,
// mod_ThaumCraft.visDripFX
//);
//rb.renderEastFace(
// block,
// (double) i,
// (double) j,
// (double) k,
// mod_ThaumCraft.visDripFX
//);
}
if (tvis > tc.maxVis) {
// TODO: WTF
//rb.renderSouthFace(
// block,
// (double) i,
// (double) j,
// (double) k,
// mod_ThaumCraft.visDripFX
//);
//rb.renderNorthFace(
// block,
// (double) i,
// (double) j,
// (double) k,
// mod_ThaumCraft.visDripFX
//);
//rb.renderWestFace(
// block,
// (double) i,
// (double) j,
// (double) k,
// mod_ThaumCraft.visDripFX
//);
//rb.renderEastFace(
// block,
// (double) i,
// (double) j,
// (double) k,
// mod_ThaumCraft.visDripFX
//);
}
}
}

View File

@ -24,64 +24,62 @@ public class CrystallizerApparatusRenderer implements IApparatusRenderer {
) {
BlockApparatusMetal block = (BlockApparatusMetal) block_;
float w2 = 0.125F;
if (block.getRenderBlockPass() == 0 || inv) {
rb.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F + w2, 1.0F);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconCrystallizerBottom,
block.iconCrystallizerTop,
block.iconCrystallizerSide,
block.iconCrystallizerSide,
block.iconCrystallizerSide,
block.iconCrystallizerSide,
true
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F + w2, 1.0F);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconCrystallizerBottom,
block.iconCrystallizerTop,
block.iconCrystallizerSide,
block.iconCrystallizerSide,
block.iconCrystallizerSide,
block.iconCrystallizerSide,
true
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
// TODO: no inside in inventory
if (!inv) {
float w3 = 0.1875F;
rb.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F + w2, 1.0F);
rb.renderFaceXPos(
block,
(double) ((float) (i - 1) + w3),
(double) j,
(double) k,
block.iconArcaneFurnaceInside
);
rb.renderFaceXNeg(
block,
(double) ((float) (i + 1) - w3),
(double) j,
(double) k,
block.iconArcaneFurnaceInside
);
rb.renderFaceZPos(
block,
(double) i,
(double) j,
(double) ((float) (k - 1) + w3),
block.iconArcaneFurnaceInside
);
rb.renderFaceZNeg(
block,
(double) i,
(double) j,
(double) ((float) (k + 1) - w3),
block.iconArcaneFurnaceInside
);
rb.renderFaceYPos(
block,
(double) i,
(double) ((float) j - 0.49F),
(double) k,
block.iconArcaneFurnaceInside
);
}
// TODO: no inside in inventory
if (!inv) {
float w3 = 0.1875F;
rb.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F + w2, 1.0F);
rb.renderFaceXPos(
block,
(double) ((float) (i - 1) + w3),
(double) j,
(double) k,
block.iconArcaneFurnaceInside
);
rb.renderFaceXNeg(
block,
(double) ((float) (i + 1) - w3),
(double) j,
(double) k,
block.iconArcaneFurnaceInside
);
rb.renderFaceZPos(
block,
(double) i,
(double) j,
(double) ((float) (k - 1) + w3),
block.iconArcaneFurnaceInside
);
rb.renderFaceZNeg(
block,
(double) i,
(double) j,
(double) ((float) (k + 1) - w3),
block.iconArcaneFurnaceInside
);
rb.renderFaceYPos(
block,
(double) i,
(double) ((float) j - 0.49F),
(double) k,
block.iconArcaneFurnaceInside
);
}
rb.overrideBlockTexture = null;

View File

@ -25,67 +25,59 @@ public class GeneratorApparatusRenderer implements IApparatusRenderer {
BlockApparatusMetal block = (BlockApparatusMetal) block_;
float w2 = 0.125F;
float w4 = 0.25F;
if (block.getRenderBlockPass() == 0 || inv) {
rb.setRenderBounds(w4, 0.0F, w4, 1.0F - w4, w2, 1.0F - w4);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconGenerator1, true);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(w4, 1.0F - w2, w4, 1.0F - w4, 1.0F, 1.0F - w4);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconGenerator1, true);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(
1.0F - w2, 0.5F - w4, 0.5F - w4, 1.0F, 0.5F + w4, 0.5F + w4
);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconGenerator1, true);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(0.0F, 0.5F - w4, 0.5F - w4, w2, 0.5F + w4, 0.5F + w4);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconGenerator1, true);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(
0.5F - w4, 0.5F - w4, 1.0F - w2, 0.5F + w4, 0.5F + w4, 1.0F
);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconGenerator1, true);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(0.5F - w4, 0.5F - w4, 0.0F, 0.5F + w4, 0.5F + w4, w2);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconGenerator1, true);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(w4, 0.0F, w4, 1.0F - w4, w2, 1.0F - w4);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconGenerator1, true);
} else {
rb.renderStandardBlock(block, x, y, z);
}
if (block.getRenderBlockPass() == 1 || inv) {
rb.overrideBlockTexture = null;
rb.setRenderBounds(w2, w2, w2, 1.0F - w2, 1.0F - w2, 1.0F - w2);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconGenerator4, true);
} else {
rb.renderFaceYNeg(block, x, y, z, block.iconGenerator4);
rb.renderFaceYPos(block, x, y, z, block.iconGenerator4);
rb.renderFaceXNeg(block, x, y, z, block.iconGenerator4);
rb.renderFaceXPos(block, x, y, z, block.iconGenerator4);
rb.renderFaceZNeg(block, x, y, z, block.iconGenerator4);
rb.renderFaceZPos(block, x, y, z, block.iconGenerator4);
}
rb.setRenderBounds(w4, 1.0F - w2, w4, 1.0F - w4, 1.0F, 1.0F - w4);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconGenerator1, true);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(1.0F - w2, 0.5F - w4, 0.5F - w4, 1.0F, 0.5F + w4, 0.5F + w4);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconGenerator1, true);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(0.0F, 0.5F - w4, 0.5F - w4, w2, 0.5F + w4, 0.5F + w4);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconGenerator1, true);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(0.5F - w4, 0.5F - w4, 1.0F - w2, 0.5F + w4, 0.5F + w4, 1.0F);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconGenerator1, true);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(0.5F - w4, 0.5F - w4, 0.0F, 0.5F + w4, 0.5F + w4, w2);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconGenerator1, true);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.overrideBlockTexture = null;
rb.setRenderBounds(w2, w2, w2, 1.0F - w2, 1.0F - w2, 1.0F - w2);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconGenerator4, true);
} else {
rb.renderFaceYNeg(block, x, y, z, block.iconGenerator4);
rb.renderFaceYPos(block, x, y, z, block.iconGenerator4);
rb.renderFaceXNeg(block, x, y, z, block.iconGenerator4);
rb.renderFaceXPos(block, x, y, z, block.iconGenerator4);
rb.renderFaceZNeg(block, x, y, z, block.iconGenerator4);
rb.renderFaceZPos(block, x, y, z, block.iconGenerator4);
}
rb.overrideBlockTexture = null;

View File

@ -24,94 +24,92 @@ public class SoulBrazierApparatusRenderer implements IApparatusRenderer {
) {
BlockApparatusMetal block = (BlockApparatusMetal) block_;
if (block.getRenderBlockPass() == 0 || inv) {
float t4 = 0.25F;
float t2 = 0.125F;
float t6 = 0.375F;
rb.setRenderBounds(t2, 0.5F, t6, t4, 1.0F, 1.0F - t6);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
true
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
float t4 = 0.25F;
float t2 = 0.125F;
float t6 = 0.375F;
rb.setRenderBounds(t2, 0.5F, t6, t4, 1.0F, 1.0F - t6);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
true
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(t6, 0.5F, t2, 1.0F - t6, 1.0F, t4);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
true
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(t6, 0.5F, t2, 1.0F - t6, 1.0F, t4);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
true
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(1.0F - t4, 0.5F, t6, 1.0F - t2, 1.0F, 1.0F - t6);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
true
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(1.0F - t4, 0.5F, t6, 1.0F - t2, 1.0F, 1.0F - t6);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
true
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(t6, 0.5F, 1.0F - t4, 1.0F - t6, 1.0F, 1.0F - t2);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
true
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(t6, 0.5F, 1.0F - t4, 1.0F - t6, 1.0F, 1.0F - t2);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
true
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(t4, 0.0F, t4, 1.0F - t4, 0.5F + t4, 1.0F - t4);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
true
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(t4, 0.0F, t4, 1.0F - t4, 0.5F + t4, 1.0F - t4);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
block.iconSoulBrazierBottom,
true
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.overrideBlockTexture = null;

View File

@ -36,7 +36,7 @@ public class VoidChestApparatusRenderer implements IApparatusRenderer {
block.iconVoidChestSide,
true
);
} else if (block.getRenderBlockPass() == 0) {
} else {
rb.renderStandardBlock(block, x, y, z);
}
}

View File

@ -26,7 +26,6 @@ public class VoidInterfaceApparatusRenderer implements IApparatusRenderer {
float t3x = 0.1875F;
float t4x = 0.25F;
BlockApparatusMetal block = (BlockApparatusMetal) block_;
if (block.getRenderBlockPass() == 0 || inv) {
rb.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, t3x, 1.0F);
if (inv) {
BlockRenderer.drawFaces(
@ -77,7 +76,6 @@ public class VoidInterfaceApparatusRenderer implements IApparatusRenderer {
} else {
rb.renderStandardBlock(block, x, y, z);
}
}
rb.setRenderBounds(t1x, t3x, t1x, 1.0F - t1x, 0.5F - t4x, 1.0F - t1x);
if (!inv) {

View File

@ -28,89 +28,79 @@ public class CondenserApparatusRenderer implements IApparatusRenderer {
float w4 = 0.25F;
float w3 = 0.1875F;
float w2 = 0.125F;
if (block.getRenderBlockPass() == 0 || inv) {
rb.setRenderBounds(w3, 1.0F - w4, w3, 1.0F - w3, 1.0F, 1.0F - w3);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconCondenserTop,
block.iconCondenserTop,
block.iconCondenserSide,
block.iconCondenserSide,
block.iconCondenserSide,
block.iconCondenserSide,
false
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(w3, 1.0F - w4, w3, 1.0F - w3, 1.0F, 1.0F - w3);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconCondenserTop,
block.iconCondenserTop,
block.iconCondenserSide,
block.iconCondenserSide,
block.iconCondenserSide,
block.iconCondenserSide,
false
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(w3, 0.0F, w3, 1.0F - w3, w4, 1.0F - w3);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconCondenserTop,
block.iconCondenserTop,
block.iconCondenserSide,
block.iconCondenserSide,
block.iconCondenserSide,
block.iconCondenserSide,
false
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(w3, 0.0F, w3, 1.0F - w3, w4, 1.0F - w3);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconCondenserTop,
block.iconCondenserTop,
block.iconCondenserSide,
block.iconCondenserSide,
block.iconCondenserSide,
block.iconCondenserSide,
false
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.overrideBlockTexture = block.iconCondenserPart;
rb.setRenderBounds(0.5F - w2, w2, 0.0F, 0.5F + w2, 1.0F - w2, 1.0F);
if (inv) {
BlockRenderer.drawFaces(
rb, block, block.iconCondenserPart, false
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.overrideBlockTexture = block.iconCondenserPart;
rb.setRenderBounds(0.5F - w2, w2, 0.0F, 0.5F + w2, 1.0F - w2, 1.0F);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconCondenserPart, false);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(0.0F, w2, 0.5F - w2, 1.0F, 1.0F - w2, 0.5F + w2);
if (inv) {
BlockRenderer.drawFaces(
rb, block, block.iconCondenserPart, false
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(0.0F, w2, 0.5F - w2, 1.0F, 1.0F - w2, 0.5F + w2);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconCondenserPart, false);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(0.5F - w2, w2, 0.0F, 0.5F + w2, 1.0F - w2, 1.0F);
if (inv) {
BlockRenderer.drawFaces(
rb, block, block.iconCondenserPart, false
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(0.5F - w2, w2, 0.0F, 0.5F + w2, 1.0F - w2, 1.0F);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconCondenserPart, false);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(0.0F, w2, 0.5F - w2, 1.0F, 1.0F - w2, 0.5F + w2);
if (inv) {
BlockRenderer.drawFaces(
rb, block, block.iconCondenserPart, false
);
} else {
rb.renderStandardBlock(block, i, j, k);
}
rb.setRenderBounds(0.0F, w2, 0.5F - w2, 1.0F, 1.0F - w2, 0.5F + w2);
if (inv) {
BlockRenderer.drawFaces(rb, block, block.iconCondenserPart, false);
} else {
rb.renderStandardBlock(block, i, j, k);
}
if (!inv) {
TileCondenser tc = (TileCondenser) w.getTileEntity(i, j, k);
if (tc != null && tc.hasUpgrade((byte) 0)) {
rb.overrideBlockTexture = null;
rb.setRenderBounds(w4, w4, w4, 1.0F - w4, 1.0F - w4, 1.0F - w4);
if (!inv) {
TileCondenser tc = (TileCondenser) w.getTileEntity(i, j, k);
if (tc != null && tc.hasUpgrade((byte) 0)) {
rb.overrideBlockTexture = null;
rb.setRenderBounds(w4, w4, w4, 1.0F - w4, 1.0F - w4, 1.0F - w4);
rb.renderFaceXNeg(block, i, j, k, block.iconCondenserSpeedUpgrade);
rb.renderFaceXPos(block, i, j, k, block.iconCondenserSpeedUpgrade);
rb.renderFaceZNeg(block, i, j, k, block.iconCondenserSpeedUpgrade);
rb.renderFaceZPos(block, i, j, k, block.iconCondenserSpeedUpgrade);
}
rb.renderFaceXNeg(block, i, j, k, block.iconCondenserSpeedUpgrade);
rb.renderFaceXPos(block, i, j, k, block.iconCondenserSpeedUpgrade);
rb.renderFaceZNeg(block, i, j, k, block.iconCondenserSpeedUpgrade);
rb.renderFaceZPos(block, i, j, k, block.iconCondenserSpeedUpgrade);
}
}

View File

@ -25,77 +25,74 @@ public class RepairerApparatusRenderer implements IApparatusRenderer {
boolean inv
) {
BlockApparatusWood block = (BlockApparatusWood) block_;
if (block.getRenderBlockPass() == 0 || inv) {
rb.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconRestorerBottom,
block.iconRestorerBottom,
block.iconRestorerBottom,
block.iconRestorerBottom,
block.iconRestorerBottom,
block.iconRestorerBottom,
false
);
} else {
rb.renderStandardBlock(block, x, y, z);
}
rb.setRenderBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
if (inv) {
BlockRenderer.drawFaces(
rb,
block,
block.iconRestorerBottom,
block.iconRestorerBottom,
block.iconRestorerBottom,
block.iconRestorerBottom,
block.iconRestorerBottom,
block.iconRestorerBottom,
false
);
} else {
rb.renderStandardBlock(block, x, y, z);
}
if (!inv) {
rb.renderFaceYPos(
block,
(double) x,
(double) ((float) y - 1.0F + 0.425F),
(double) z,
block.iconRestorerBottom
);
rb.renderFaceYNeg(
block,
(double) x,
(double) ((float) (y + 1) - 0.425F),
(double) z,
block.iconRestorerBottom
);
rb.renderFaceXPos(
block,
(double) ((float) (x - 1) + 0.425F),
(double) y,
(double) z,
block.iconRestorerBottom
);
rb.renderFaceXNeg(
block,
(double) ((float) (x + 1) - 0.425F),
(double) y,
(double) z,
block.iconRestorerBottom
);
rb.renderFaceZPos(
block,
(double) x,
(double) y,
(double) ((float) (z - 1) + 0.425F),
block.iconRestorerBottom
);
rb.renderFaceZNeg(
block,
(double) x,
(double) y,
(double) ((float) (z + 1) - 0.425F),
block.iconRestorerBottom
);
} else {
rb.setRenderBounds(0.01F, 0.01F, 0.01F, 0.99F, 0.99F, 0.99F);
BlockRenderer.drawFaces(
rb,
block,
((BlockApparatusMetal) TMBlocks.apparatusMetal)
.iconArcaneFurnaceInside,
false
);
}
if (!inv) {
rb.renderFaceYPos(
block,
(double) x,
(double) ((float) y - 1.0F + 0.425F),
(double) z,
block.iconRestorerBottom
);
rb.renderFaceYNeg(
block,
(double) x,
(double) ((float) (y + 1) - 0.425F),
(double) z,
block.iconRestorerBottom
);
rb.renderFaceXPos(
block,
(double) ((float) (x - 1) + 0.425F),
(double) y,
(double) z,
block.iconRestorerBottom
);
rb.renderFaceXNeg(
block,
(double) ((float) (x + 1) - 0.425F),
(double) y,
(double) z,
block.iconRestorerBottom
);
rb.renderFaceZPos(
block,
(double) x,
(double) y,
(double) ((float) (z - 1) + 0.425F),
block.iconRestorerBottom
);
rb.renderFaceZNeg(
block,
(double) x,
(double) y,
(double) ((float) (z + 1) - 0.425F),
block.iconRestorerBottom
);
} else {
rb.setRenderBounds(0.01F, 0.01F, 0.01F, 0.99F, 0.99F, 0.99F);
BlockRenderer.drawFaces(
rb,
block,
((BlockApparatusMetal) TMBlocks.apparatusMetal).iconArcaneFurnaceInside,
false
);
}
rb.overrideBlockTexture = null;

View File

@ -6,16 +6,14 @@ import net.minecraft.entity.Entity;
import org.lwjgl.opengl.GL11;
public class ModelGenCore extends ModelBase {
private ModelRenderer cube;
private ModelRenderer cube = new ModelRenderer(this, "cube");
private ModelRenderer outer = new ModelRenderer(this, "glass");
public ModelGenCore(float f) {
this.outer.setTextureOffset(0, 0).addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8);
this.cube = new ModelRenderer(this, "cube");
this.cube.setTextureOffset(32, 0).addBox(-4.0F, -4.0F, -4.0F, 8, 8, 8);
}
@Override
public void
render(Entity e, float f, float f1, float f2, float f3, float f4, float f5) {
GL11.glPushMatrix();

View File

@ -61,10 +61,10 @@ public class TileCondenserRenderer extends TileEntitySpecialRenderer {
new ResourceLocation("thaumcraft", "textures/models/crystal.png")
);
GL11.glEnable(2977);
GL11.glEnable(3042);
GL11.glEnable(0xba1);
GL11.glEnable(0xbe2);
GL11.glPushMatrix();
GL11.glEnable(32826);
GL11.glEnable(0x803a);
GL11.glBlendFunc(770, 771);
Color c = new Color(CrystalColors.getColorForShard(condenser.currentType));
GL11.glColor4f(
@ -81,9 +81,9 @@ public class TileCondenserRenderer extends TileEntitySpecialRenderer {
this.model.render();
GL11.glScalef(1.0F, 1.0F, 1.0F);
GL11.glPopMatrix();
GL11.glDisable(32826);
GL11.glDisable(0x803a);
GL11.glPopMatrix();
GL11.glDisable(3042);
GL11.glDisable(0xbe2);
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
if (condenser.hasUpgrade((byte) 1)) {
this.drawDisk(

View File

@ -1,7 +1,12 @@
package net.anvilcraft.thaummach.render.tile;
import net.anvilcraft.thaummach.TMBlocks;
import net.anvilcraft.thaummach.blocks.BlockApparatusMetal;
import net.anvilcraft.thaummach.render.model.ModelGenCore;
import net.anvilcraft.thaummach.tiles.TileGenerator;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
@ -18,6 +23,10 @@ public class TileGeneratorRenderer extends TileEntitySpecialRenderer {
this.modelLoaded = 1;
}
BlockApparatusMetal block = (BlockApparatusMetal) TMBlocks.apparatusMetal;
GL11.glEnable(0xbe2);
GL11.glBlendFunc(0x302, 0x303);
float f2 = gen.rotation + f;
GL11.glPushMatrix();
GL11.glTranslatef((float) x + 0.5F, (float) y + 1.3F, (float) z + 0.5F);
@ -27,6 +36,20 @@ public class TileGeneratorRenderer extends TileEntitySpecialRenderer {
f3 += f3 * f3;
this.model.render(null, 0.0F, f2 * 1.0F, f3 * 0.01F, 0.0F, 0.0F, 0.0625F);
GL11.glPopMatrix();
this.bindTexture(TextureMap.locationBlocksTexture);
float w2 = 0.125F;
Tessellator.instance.startDrawingQuads();
RenderBlocks rb = RenderBlocks.getInstance();
rb.setRenderBounds(w2, w2, w2, 1.0f - w2, 1.0f - w2, 1.0f - w2);
rb.renderFaceYNeg(block, x, y, z, block.iconGenerator4);
rb.renderFaceYPos(block, x, y, z, block.iconGenerator4);
rb.renderFaceXNeg(block, x, y, z, block.iconGenerator4);
rb.renderFaceXPos(block, x, y, z, block.iconGenerator4);
rb.renderFaceZNeg(block, x, y, z, block.iconGenerator4);
rb.renderFaceZPos(block, x, y, z, block.iconGenerator4);
Tessellator.instance.draw();
GL11.glDisable(0xbe2);
}
@Override