mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-10-26 14:25:20 +00:00
Cache Tessellator#instance in local var (#802)
This commit is contained in:
1 parent
5063cd9d99
commit
b2ce7e5514
16 files changed
+122
-105
No files matched your search
@@ -50,43 +50,44 @@ public class RenderBlockAssembler extends BaseBlockRender<BlockMolecularAssemble
|
||||
renderer.setOverrideBlockTexture(blk.getIcon(0, 0));
|
||||
|
||||
this.setInvRenderBounds(renderer, 2, 14, 0, 14, 16, 2);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, Tessellator.instance, 0xffffff, renderer);
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, tess, 0xffffff, renderer);
|
||||
|
||||
this.setInvRenderBounds(renderer, 0, 14, 2, 2, 16, 14);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, Tessellator.instance, 0xffffff, renderer);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, tess, 0xffffff, renderer);
|
||||
|
||||
this.setInvRenderBounds(renderer, 2, 0, 14, 14, 2, 16);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, Tessellator.instance, 0xffffff, renderer);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, tess, 0xffffff, renderer);
|
||||
|
||||
this.setInvRenderBounds(renderer, 14, 0, 2, 16, 2, 14);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, Tessellator.instance, 0xffffff, renderer);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, tess, 0xffffff, renderer);
|
||||
|
||||
this.setInvRenderBounds(renderer, 0, 0, 0, 16, 2, 2);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, Tessellator.instance, 0xffffff, renderer);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, tess, 0xffffff, renderer);
|
||||
|
||||
this.setInvRenderBounds(renderer, 0, 2, 0, 2, 16, 2);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, Tessellator.instance, 0xffffff, renderer);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, tess, 0xffffff, renderer);
|
||||
|
||||
this.setInvRenderBounds(renderer, 0, 0, 2, 2, 2, 16);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, Tessellator.instance, 0xffffff, renderer);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, tess, 0xffffff, renderer);
|
||||
|
||||
this.setInvRenderBounds(renderer, 0, 14, 14, 16, 16, 16);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, Tessellator.instance, 0xffffff, renderer);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, tess, 0xffffff, renderer);
|
||||
|
||||
this.setInvRenderBounds(renderer, 14, 0, 14, 16, 14, 16);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, Tessellator.instance, 0xffffff, renderer);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, tess, 0xffffff, renderer);
|
||||
|
||||
this.setInvRenderBounds(renderer, 14, 14, 0, 16, 16, 14);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, Tessellator.instance, 0xffffff, renderer);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, tess, 0xffffff, renderer);
|
||||
|
||||
this.setInvRenderBounds(renderer, 14, 2, 0, 16, 14, 2);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, Tessellator.instance, 0xffffff, renderer);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, tess, 0xffffff, renderer);
|
||||
|
||||
this.setInvRenderBounds(renderer, 0, 2, 14, 2, 14, 16);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, Tessellator.instance, 0xffffff, renderer);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, tess, 0xffffff, renderer);
|
||||
|
||||
this.setInvRenderBounds(renderer, 1, 1, 1, 15, 15, 15);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, Tessellator.instance, 0xffffff, renderer);
|
||||
this.renderInvBlock(EnumSet.allOf(ForgeDirection.class), blk, is, tess, 0xffffff, renderer);
|
||||
|
||||
renderer.setOverrideBlockTexture(null);
|
||||
}
|
||||
|
||||
@@ -115,8 +115,9 @@ public class RenderBlockController extends BaseBlockRender<BlockController, Tile
|
||||
final boolean out = renderer.renderStandardBlock(blk, x, y, z);
|
||||
|
||||
if (lights != null) {
|
||||
Tessellator.instance.setColorOpaque_F(1.0f, 1.0f, 1.0f);
|
||||
Tessellator.instance.setBrightness(14 << 20 | 14 << 4);
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.setColorOpaque_F(1.0f, 1.0f, 1.0f);
|
||||
tess.setBrightness(14 << 20 | 14 << 4);
|
||||
renderer.renderFaceXNeg(blk, x, y, z, lights.getIcon());
|
||||
renderer.renderFaceXPos(blk, x, y, z, lights.getIcon());
|
||||
renderer.renderFaceYNeg(blk, x, y, z, lights.getIcon());
|
||||
|
||||
@@ -209,6 +209,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
if (color != null) {
|
||||
i.setTexture(color);
|
||||
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
if (!emitsLight) {
|
||||
if (color == ExtraBlockTextures.BlockCraftingMonitorFit_Light.getIcon()) {
|
||||
final int b = w.getLightBrightnessForSkyBlocks(
|
||||
@@ -220,11 +221,11 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
final TileCraftingMonitorTile sr = blk.getTileEntity(w, x, y, z);
|
||||
final AEColor col = sr.getColor();
|
||||
|
||||
Tessellator.instance.setBrightness(b);
|
||||
Tessellator.instance.setColorOpaque_I(col.whiteVariant);
|
||||
tess.setBrightness(b);
|
||||
tess.setColorOpaque_I(col.whiteVariant);
|
||||
i.renderFace(x, y, z, color, side, renderer);
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(col.mediumVariant);
|
||||
tess.setColorOpaque_I(col.mediumVariant);
|
||||
i.renderFace(
|
||||
x,
|
||||
y,
|
||||
@@ -233,7 +234,7 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
side,
|
||||
renderer);
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(col.blackVariant);
|
||||
tess.setColorOpaque_I(col.blackVariant);
|
||||
i.renderFace(
|
||||
x,
|
||||
y,
|
||||
@@ -249,12 +250,12 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
final TileCraftingMonitorTile sr = blk.getTileEntity(w, x, y, z);
|
||||
final AEColor col = sr.getColor();
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(col.whiteVariant);
|
||||
Tessellator.instance.setBrightness(13 << 20 | 13 << 4);
|
||||
tess.setColorOpaque_I(col.whiteVariant);
|
||||
tess.setBrightness(13 << 20 | 13 << 4);
|
||||
i.renderFace(x, y, z, color, side, renderer);
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(col.mediumVariant);
|
||||
Tessellator.instance.setBrightness(13 << 20 | 13 << 4);
|
||||
tess.setColorOpaque_I(col.mediumVariant);
|
||||
tess.setBrightness(13 << 20 | 13 << 4);
|
||||
i.renderFace(
|
||||
x,
|
||||
y,
|
||||
@@ -263,8 +264,8 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
side,
|
||||
renderer);
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(col.blackVariant);
|
||||
Tessellator.instance.setBrightness(13 << 20 | 13 << 4);
|
||||
tess.setColorOpaque_I(col.blackVariant);
|
||||
tess.setBrightness(13 << 20 | 13 << 4);
|
||||
i.renderFace(
|
||||
x,
|
||||
y,
|
||||
@@ -273,8 +274,8 @@ public class RenderBlockCraftingCPU<B extends BlockCraftingUnit, T extends TileC
|
||||
side,
|
||||
renderer);
|
||||
} else {
|
||||
Tessellator.instance.setColorOpaque_F(1.0f, 1.0f, 1.0f);
|
||||
Tessellator.instance.setBrightness(13 << 20 | 13 << 4);
|
||||
tess.setColorOpaque_F(1.0f, 1.0f, 1.0f);
|
||||
tess.setBrightness(13 << 20 | 13 << 4);
|
||||
i.renderFace(x, y, z, color, side, renderer);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,17 +250,18 @@ public class RenderBlockWireless extends BaseBlockRender<BlockWireless, TileWire
|
||||
// ExtraTextures.BlockChargerInside.getIcon(), r, r );
|
||||
this.renderBlockBounds(renderer, 5, 5, 0, 11, 11, 1, fdx, fdy, fdz);
|
||||
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
if (this.hasChan) {
|
||||
final int l = 14;
|
||||
Tessellator.instance.setBrightness(l << 20 | l << 4);
|
||||
Tessellator.instance.setColorOpaque_I(AEColor.Transparent.blackVariant);
|
||||
tess.setBrightness(l << 20 | l << 4);
|
||||
tess.setColorOpaque_I(AEColor.Transparent.blackVariant);
|
||||
} else if (this.hasPower) {
|
||||
final int l = 9;
|
||||
Tessellator.instance.setBrightness(l << 20 | l << 4);
|
||||
Tessellator.instance.setColorOpaque_I(AEColor.Transparent.whiteVariant);
|
||||
tess.setBrightness(l << 20 | l << 4);
|
||||
tess.setColorOpaque_I(AEColor.Transparent.whiteVariant);
|
||||
} else {
|
||||
Tessellator.instance.setBrightness(0);
|
||||
Tessellator.instance.setColorOpaque_I(0x000000);
|
||||
tess.setBrightness(0);
|
||||
tess.setColorOpaque_I(0x000000);
|
||||
}
|
||||
|
||||
if (ForgeDirection.UP != fdz.getOpposite()) {
|
||||
|
||||
@@ -336,16 +336,16 @@ public class RenderDrive extends BaseBlockRender<BlockDrive, TileDrive> {
|
||||
}
|
||||
|
||||
if (stat == 1) {
|
||||
Tessellator.instance.setColorOpaque_I(0x00ff00);
|
||||
tess.setColorOpaque_I(0x00ff00);
|
||||
}
|
||||
if (stat == 2) {
|
||||
Tessellator.instance.setColorOpaque_I(0x00aaff);
|
||||
tess.setColorOpaque_I(0x00aaff);
|
||||
}
|
||||
if (stat == 3) {
|
||||
Tessellator.instance.setColorOpaque_I(0xffaa00);
|
||||
tess.setColorOpaque_I(0xffaa00);
|
||||
}
|
||||
if (stat == 4) {
|
||||
Tessellator.instance.setColorOpaque_I(0xff0000);
|
||||
tess.setColorOpaque_I(0xff0000);
|
||||
}
|
||||
|
||||
switch (forward.offsetX + forward.offsetY * 2 + forward.offsetZ * 3) {
|
||||
|
||||
@@ -40,17 +40,18 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest> {
|
||||
@Override
|
||||
public void renderInventory(final BlockChest block, final ItemStack is, final RenderBlocks renderer,
|
||||
final ItemRenderType type, final Object[] obj) {
|
||||
Tessellator.instance.setBrightness(0);
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.setBrightness(0);
|
||||
|
||||
renderer.overrideBlockTexture = ExtraBlockTextures.getMissing();
|
||||
this.renderInvBlock(EnumSet.of(ForgeDirection.SOUTH), block, is, Tessellator.instance, 0x000000, renderer);
|
||||
this.renderInvBlock(EnumSet.of(ForgeDirection.SOUTH), block, is, tess, 0x000000, renderer);
|
||||
|
||||
renderer.overrideBlockTexture = ExtraBlockTextures.MEChest.getIcon();
|
||||
this.renderInvBlock(
|
||||
EnumSet.of(ForgeDirection.UP),
|
||||
block,
|
||||
is,
|
||||
Tessellator.instance,
|
||||
tess,
|
||||
this.adjustBrightness(AEColor.Transparent.whiteVariant, 0.7),
|
||||
renderer);
|
||||
|
||||
@@ -89,8 +90,9 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest> {
|
||||
}
|
||||
|
||||
int b = world.getLightBrightnessForSkyBlocks(x + forward.offsetX, y + forward.offsetY, z + forward.offsetZ, 0);
|
||||
Tessellator.instance.setBrightness(b);
|
||||
Tessellator.instance.setColorOpaque_I(0xffffff);
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.setBrightness(b);
|
||||
tess.setColorOpaque_I(0xffffff);
|
||||
|
||||
final FlippableIcon flippableIcon = new FlippableIcon(
|
||||
new OffsetIcon(ExtraBlockTextures.MEStorageCellTextures.getIcon(), offsetU, offsetV));
|
||||
@@ -115,18 +117,18 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest> {
|
||||
b = 15 << 20 | 15 << 4;
|
||||
}
|
||||
|
||||
Tessellator.instance.setBrightness(b);
|
||||
tess.setBrightness(b);
|
||||
if (stat == 1) {
|
||||
Tessellator.instance.setColorOpaque_I(0x00ff00);
|
||||
tess.setColorOpaque_I(0x00ff00);
|
||||
}
|
||||
if (stat == 2) {
|
||||
Tessellator.instance.setColorOpaque_I(0x00aaff);
|
||||
tess.setColorOpaque_I(0x00aaff);
|
||||
}
|
||||
if (stat == 3) {
|
||||
Tessellator.instance.setColorOpaque_I(0xffaa00);
|
||||
tess.setColorOpaque_I(0xffaa00);
|
||||
}
|
||||
if (stat == 4) {
|
||||
Tessellator.instance.setColorOpaque_I(0xff0000);
|
||||
tess.setColorOpaque_I(0xff0000);
|
||||
}
|
||||
this.selectFace(renderer, west, up, forward, 9, 10, 11, 12);
|
||||
this.renderFace(x, y, z, imb, ExtraBlockTextures.White.getIcon(), renderer, forward);
|
||||
@@ -137,22 +139,22 @@ public class RenderMEChest extends BaseBlockRender<BlockChest, TileChest> {
|
||||
b = 15 << 20 | 15 << 4;
|
||||
}
|
||||
|
||||
Tessellator.instance.setBrightness(b);
|
||||
Tessellator.instance.setColorOpaque_I(0xffffff);
|
||||
tess.setBrightness(b);
|
||||
tess.setColorOpaque_I(0xffffff);
|
||||
renderer.setRenderBounds(0, 0, 0, 1, 1, 1);
|
||||
|
||||
final ICellHandler ch = AEApi.instance().registries().cell().getHandler(sp.getStorageType());
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(sp.getColor().whiteVariant);
|
||||
tess.setColorOpaque_I(sp.getColor().whiteVariant);
|
||||
IIcon ico = ch == null ? null : ch.getTopTexture_Light();
|
||||
this.renderFace(x, y, z, imb, ico == null ? ExtraBlockTextures.MEChest.getIcon() : ico, renderer, up);
|
||||
|
||||
if (ico != null) {
|
||||
Tessellator.instance.setColorOpaque_I(sp.getColor().mediumVariant);
|
||||
tess.setColorOpaque_I(sp.getColor().mediumVariant);
|
||||
ico = ch == null ? null : ch.getTopTexture_Medium();
|
||||
this.renderFace(x, y, z, imb, ico == null ? ExtraBlockTextures.MEChest.getIcon() : ico, renderer, up);
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(sp.getColor().blackVariant);
|
||||
tess.setColorOpaque_I(sp.getColor().blackVariant);
|
||||
ico = ch == null ? null : ch.getTopTexture_Dark();
|
||||
this.renderFace(x, y, z, imb, ico == null ? ExtraBlockTextures.MEChest.getIcon() : ico, renderer, up);
|
||||
}
|
||||
|
||||
@@ -71,6 +71,7 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
|
||||
final IDefinitions definitions = AEApi.instance().definitions();
|
||||
final IBlocks blocks = definitions.blocks();
|
||||
final IParts parts = definitions.parts();
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
|
||||
for (final Block linkBlock : blocks.quantumLink().maybeBlock().asSet()) {
|
||||
if (tqb.getBlockType() == linkBlock) {
|
||||
@@ -155,9 +156,9 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
|
||||
CORNER_POWERED_RENDER_MAX,
|
||||
CORNER_POWERED_RENDER_MAX);
|
||||
|
||||
Tessellator.instance.setColorOpaque_F(1.0F, 1.0F, 1.0F);
|
||||
tess.setColorOpaque_F(1.0F, 1.0F, 1.0F);
|
||||
final int bn = 15;
|
||||
Tessellator.instance.setBrightness(bn << 20 | bn << 4);
|
||||
tess.setBrightness(bn << 20 | bn << 4);
|
||||
for (final ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
|
||||
this.renderFace(
|
||||
x,
|
||||
@@ -206,9 +207,9 @@ public class RenderQNB extends BaseBlockRender<BlockQuantumBase, TileQuantumBrid
|
||||
CENTER_POWERED_RENDER_MAX,
|
||||
CENTER_POWERED_RENDER_MAX);
|
||||
|
||||
Tessellator.instance.setColorOpaque_F(1.0F, 1.0F, 1.0F);
|
||||
tess.setColorOpaque_F(1.0F, 1.0F, 1.0F);
|
||||
final int bn = 15;
|
||||
Tessellator.instance.setBrightness(bn << 20 | bn << 4);
|
||||
tess.setBrightness(bn << 20 | bn << 4);
|
||||
for (final ForgeDirection side : ForgeDirection.VALID_DIRECTIONS) {
|
||||
this.renderFace(
|
||||
x,
|
||||
|
||||
@@ -107,8 +107,9 @@ public class RenderSpatialPylon extends BaseBlockRender<BlockSpatialPylon, TileS
|
||||
|
||||
if ((displayBits & TileSpatialPylon.DISPLAY_POWERED_ENABLED) == TileSpatialPylon.DISPLAY_POWERED_ENABLED) {
|
||||
final int bn = 15;
|
||||
Tessellator.instance.setBrightness(bn << 20 | bn << 4);
|
||||
Tessellator.instance.setColorOpaque_I(0xffffff);
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.setBrightness(bn << 20 | bn << 4);
|
||||
tess.setColorOpaque_I(0xffffff);
|
||||
|
||||
for (final ForgeDirection d : ForgeDirection.VALID_DIRECTIONS) {
|
||||
this.renderFace(
|
||||
|
||||
@@ -36,14 +36,15 @@ public class RendererSecurity extends BaseBlockRender<BlockSecurity, TileSecurit
|
||||
public void renderInventory(final BlockSecurity block, final ItemStack is, final RenderBlocks renderer,
|
||||
final ItemRenderType type, final Object[] obj) {
|
||||
renderer.overrideBlockTexture = ExtraBlockTextures.getMissing();
|
||||
this.renderInvBlock(EnumSet.of(ForgeDirection.SOUTH), block, is, Tessellator.instance, 0x000000, renderer);
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
this.renderInvBlock(EnumSet.of(ForgeDirection.SOUTH), block, is, tess, 0x000000, renderer);
|
||||
|
||||
renderer.overrideBlockTexture = ExtraBlockTextures.MEChest.getIcon();
|
||||
this.renderInvBlock(
|
||||
EnumSet.of(ForgeDirection.UP),
|
||||
block,
|
||||
is,
|
||||
Tessellator.instance,
|
||||
tess,
|
||||
this.adjustBrightness(AEColor.Transparent.whiteVariant, 0.7),
|
||||
renderer);
|
||||
|
||||
@@ -69,22 +70,23 @@ public class RendererSecurity extends BaseBlockRender<BlockSecurity, TileSecurit
|
||||
b = 15 << 20 | 15 << 4;
|
||||
}
|
||||
|
||||
Tessellator.instance.setBrightness(b);
|
||||
Tessellator.instance.setColorOpaque_I(0xffffff);
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.setBrightness(b);
|
||||
tess.setColorOpaque_I(0xffffff);
|
||||
renderer.setRenderBounds(0, 0, 0, 1, 1, 1);
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(sp.getColor().whiteVariant);
|
||||
tess.setColorOpaque_I(sp.getColor().whiteVariant);
|
||||
IIcon ico = sp.isActive() ? ExtraBlockTextures.BlockMESecurityOn_Light.getIcon()
|
||||
: ExtraBlockTextures.MEChest.getIcon();
|
||||
this.renderFace(x, y, z, imb, ico, renderer, up);
|
||||
|
||||
if (sp.isActive()) {
|
||||
Tessellator.instance.setColorOpaque_I(sp.getColor().mediumVariant);
|
||||
tess.setColorOpaque_I(sp.getColor().mediumVariant);
|
||||
ico = sp.isActive() ? ExtraBlockTextures.BlockMESecurityOn_Medium.getIcon()
|
||||
: ExtraBlockTextures.MEChest.getIcon();
|
||||
this.renderFace(x, y, z, imb, ico, renderer, up);
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(sp.getColor().blackVariant);
|
||||
tess.setColorOpaque_I(sp.getColor().blackVariant);
|
||||
ico = sp.isActive() ? ExtraBlockTextures.BlockMESecurityOn_Dark.getIcon()
|
||||
: ExtraBlockTextures.MEChest.getIcon();
|
||||
this.renderFace(x, y, z, imb, ico, renderer, up);
|
||||
|
||||
@@ -468,8 +468,9 @@ public class FacadePart implements IFacadePart, IBoxProvider {
|
||||
instance.setInvColor(0xffffff);
|
||||
}
|
||||
|
||||
Tessellator.instance.setBrightness(15 << 20 | 15 << 4);
|
||||
Tessellator.instance.setColorOpaque_F(1, 1, 1);
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.setBrightness(15 << 20 | 15 << 4);
|
||||
tess.setColorOpaque_F(1, 1, 1);
|
||||
instance.setTexture(
|
||||
blk.getIcon(this.side.ordinal(), ib.getMetadata(randomItem.getItemDamage())));
|
||||
|
||||
|
||||
@@ -67,17 +67,18 @@ public abstract class PartBasicState extends AEBasePart implements IPowerChannel
|
||||
}
|
||||
|
||||
public void setColors(final boolean hasChan, final boolean hasPower) {
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
if (hasChan) {
|
||||
final int l = 14;
|
||||
Tessellator.instance.setBrightness(l << 20 | l << 4);
|
||||
Tessellator.instance.setColorOpaque_I(this.getColor().blackVariant);
|
||||
tess.setBrightness(l << 20 | l << 4);
|
||||
tess.setColorOpaque_I(this.getColor().blackVariant);
|
||||
} else if (hasPower) {
|
||||
final int l = 9;
|
||||
Tessellator.instance.setBrightness(l << 20 | l << 4);
|
||||
Tessellator.instance.setColorOpaque_I(this.getColor().whiteVariant);
|
||||
tess.setBrightness(l << 20 | l << 4);
|
||||
tess.setColorOpaque_I(this.getColor().whiteVariant);
|
||||
} else {
|
||||
Tessellator.instance.setBrightness(0);
|
||||
Tessellator.instance.setColorOpaque_I(0x000000);
|
||||
tess.setBrightness(0);
|
||||
tess.setColorOpaque_I(0x000000);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -399,9 +399,10 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void renderInventory(final IPartRenderHelper rh, final RenderBlocks renderer) {
|
||||
rh.setTexture(this.getItemStack().getIconIndex());
|
||||
Tessellator.instance.startDrawingQuads();
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
this.renderTorchAtAngle(0, -0.5, 0);
|
||||
Tessellator.instance.draw();
|
||||
tess.draw();
|
||||
// rh.setBounds( 7, 7, 10, 9, 9, 15 );
|
||||
// rh.renderInventoryBox( renderer );
|
||||
}
|
||||
|
||||
@@ -590,6 +590,7 @@ public class PartCable extends AEBasePart implements IPartCable {
|
||||
rh.setFacesToRender(EnumSet.complementOf(EnumSet.of(of)));
|
||||
|
||||
boolean isGlass = false;
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
if (ghh != null && partHost != null
|
||||
&& ghh.getCableConnectionType(of.getOpposite()) == AECableType.GLASS
|
||||
&& partHost.getPart(of.getOpposite()) == null
|
||||
@@ -622,12 +623,12 @@ public class PartCable extends AEBasePart implements IPartCable {
|
||||
ico.setFlip(false, true);
|
||||
}
|
||||
|
||||
Tessellator.instance.setBrightness(15 << 20 | 15 << 4);
|
||||
Tessellator.instance.setColorOpaque_I(myColor.blackVariant);
|
||||
tess.setBrightness(15 << 20 | 15 << 4);
|
||||
tess.setColorOpaque_I(myColor.blackVariant);
|
||||
rh.setTexture(firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon);
|
||||
this.renderAllFaces((AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer);
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(myColor.whiteVariant);
|
||||
tess.setColorOpaque_I(myColor.whiteVariant);
|
||||
rh.setTexture(secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon);
|
||||
this.renderAllFaces((AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer);
|
||||
|
||||
@@ -664,12 +665,12 @@ public class PartCable extends AEBasePart implements IPartCable {
|
||||
final IIcon firstIcon = new TaughtIcon(this.getChannelTex(channels, false).getIcon(), -0.2f);
|
||||
final IIcon secondIcon = new TaughtIcon(this.getChannelTex(channels, true).getIcon(), -0.2f);
|
||||
|
||||
Tessellator.instance.setBrightness(15 << 20 | 15 << 4);
|
||||
Tessellator.instance.setColorOpaque_I(myColor.blackVariant);
|
||||
tess.setBrightness(15 << 20 | 15 << 4);
|
||||
tess.setColorOpaque_I(myColor.blackVariant);
|
||||
rh.setTexture(firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon);
|
||||
this.renderAllFaces((AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer);
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(myColor.whiteVariant);
|
||||
tess.setColorOpaque_I(myColor.whiteVariant);
|
||||
rh.setTexture(secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon);
|
||||
this.renderAllFaces((AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer);
|
||||
|
||||
|
||||
@@ -150,6 +150,7 @@ public class PartCableSmart extends PartCable {
|
||||
|
||||
boolean hasBuses = false;
|
||||
final IPartHost ph = this.getHost();
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
for (final ForgeDirection of : EnumSet.complementOf(this.getConnections())) {
|
||||
final IPart bp = ph.getPart(of);
|
||||
if (bp instanceof IGridHost) {
|
||||
@@ -187,12 +188,12 @@ public class PartCableSmart extends PartCable {
|
||||
if (ico != null) ico.setFlip(false, true);
|
||||
}
|
||||
|
||||
Tessellator.instance.setBrightness(15 << 20 | 15 << 4);
|
||||
Tessellator.instance.setColorOpaque_I(this.getCableColor().blackVariant);
|
||||
tess.setBrightness(15 << 20 | 15 << 4);
|
||||
tess.setColorOpaque_I(this.getCableColor().blackVariant);
|
||||
rh.setTexture(firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon);
|
||||
this.renderAllFaces((AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer);
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(this.getCableColor().whiteVariant);
|
||||
tess.setColorOpaque_I(this.getCableColor().whiteVariant);
|
||||
rh.setTexture(secondIcon, secondIcon, secondIcon, secondIcon, secondIcon, secondIcon);
|
||||
this.renderAllFaces((AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer);
|
||||
|
||||
@@ -238,8 +239,8 @@ public class PartCableSmart extends PartCable {
|
||||
renderer.uvRotateBottom = 0;
|
||||
renderer.uvRotateSouth = 3;
|
||||
renderer.uvRotateEast = 3;
|
||||
Tessellator.instance.setBrightness(15 << 20 | 15 << 4);
|
||||
Tessellator.instance.setColorOpaque_I(this.getCableColor().blackVariant);
|
||||
tess.setBrightness(15 << 20 | 15 << 4);
|
||||
tess.setColorOpaque_I(this.getCableColor().blackVariant);
|
||||
rh.setTexture(
|
||||
firstTaughtIcon,
|
||||
firstTaughtIcon,
|
||||
@@ -248,7 +249,7 @@ public class PartCableSmart extends PartCable {
|
||||
firstOffsetIcon,
|
||||
firstOffsetIcon);
|
||||
this.renderAllFaces((AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer);
|
||||
Tessellator.instance.setColorOpaque_I(this.getCableColor().whiteVariant);
|
||||
tess.setColorOpaque_I(this.getCableColor().whiteVariant);
|
||||
rh.setTexture(
|
||||
secondTaughtIcon,
|
||||
secondTaughtIcon,
|
||||
@@ -271,14 +272,14 @@ public class PartCableSmart extends PartCable {
|
||||
ico.setFlip(false, true);
|
||||
renderer.setRenderBounds(0, 5 / 16.0, 5 / 16.0, 16 / 16.0, 11 / 16.0, 11 / 16.0);
|
||||
rh.renderBlockCurrentBounds(x, y, z, renderer);
|
||||
Tessellator.instance.setBrightness(15 << 20 | 15 << 4);
|
||||
tess.setBrightness(15 << 20 | 15 << 4);
|
||||
FlippableIcon fpA = new FlippableIcon(firstTaughtIcon);
|
||||
FlippableIcon fpB = new FlippableIcon(secondTaughtIcon);
|
||||
fpA = new FlippableIcon(firstTaughtIcon);
|
||||
fpB = new FlippableIcon(secondTaughtIcon);
|
||||
fpA.setFlip(true, false);
|
||||
fpB.setFlip(true, false);
|
||||
Tessellator.instance.setColorOpaque_I(this.getCableColor().blackVariant);
|
||||
tess.setColorOpaque_I(this.getCableColor().blackVariant);
|
||||
rh.setTexture(
|
||||
firstOffsetIcon,
|
||||
firstOffsetIcon,
|
||||
@@ -287,7 +288,7 @@ public class PartCableSmart extends PartCable {
|
||||
firstTaughtIcon,
|
||||
fpA);
|
||||
this.renderAllFaces((AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer);
|
||||
Tessellator.instance.setColorOpaque_I(this.getCableColor().whiteVariant);
|
||||
tess.setColorOpaque_I(this.getCableColor().whiteVariant);
|
||||
rh.setTexture(
|
||||
secondOffsetIcon,
|
||||
secondOffsetIcon,
|
||||
@@ -306,8 +307,8 @@ public class PartCableSmart extends PartCable {
|
||||
renderer.uvRotateWest = 1;
|
||||
renderer.setRenderBounds(5 / 16.0, 5 / 16.0, 0, 11 / 16.0, 11 / 16.0, 16 / 16.0);
|
||||
rh.renderBlockCurrentBounds(x, y, z, renderer);
|
||||
Tessellator.instance.setBrightness(15 << 20 | 15 << 4);
|
||||
Tessellator.instance.setColorOpaque_I(this.getCableColor().blackVariant);
|
||||
tess.setBrightness(15 << 20 | 15 << 4);
|
||||
tess.setColorOpaque_I(this.getCableColor().blackVariant);
|
||||
rh.setTexture(
|
||||
firstOffsetIcon,
|
||||
firstOffsetIcon,
|
||||
@@ -316,7 +317,7 @@ public class PartCableSmart extends PartCable {
|
||||
firstOffsetIcon,
|
||||
firstOffsetIcon);
|
||||
this.renderAllFaces((AEBaseBlock) rh.getBlock(), x, y, z, rh, renderer);
|
||||
Tessellator.instance.setColorOpaque_I(this.getCableColor().whiteVariant);
|
||||
tess.setColorOpaque_I(this.getCableColor().whiteVariant);
|
||||
rh.setTexture(
|
||||
secondOffsetIcon,
|
||||
secondOffsetIcon,
|
||||
|
||||
@@ -88,21 +88,22 @@ public abstract class AbstractPartDisplay extends AbstractPartReporting {
|
||||
rh.setBounds(2, 2, 14, 14, 14, 16);
|
||||
rh.renderBlock(x, y, z, renderer);
|
||||
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
if (this.getLightLevel() > 0) {
|
||||
final int l = 13;
|
||||
Tessellator.instance.setBrightness(l << 20 | l << 4);
|
||||
tess.setBrightness(l << 20 | l << 4);
|
||||
}
|
||||
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = this
|
||||
.getSpin();
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(this.getColor().whiteVariant);
|
||||
tess.setColorOpaque_I(this.getColor().whiteVariant);
|
||||
rh.renderFace(x, y, z, this.getFrontBright().getIcon(), ForgeDirection.SOUTH, renderer);
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(this.getColor().mediumVariant);
|
||||
tess.setColorOpaque_I(this.getColor().mediumVariant);
|
||||
rh.renderFace(x, y, z, this.getFrontDark().getIcon(), ForgeDirection.SOUTH, renderer);
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(this.getColor().blackVariant);
|
||||
tess.setColorOpaque_I(this.getColor().blackVariant);
|
||||
rh.renderFace(x, y, z, this.getFrontColored().getIcon(), ForgeDirection.SOUTH, renderer);
|
||||
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
@@ -126,15 +127,15 @@ public abstract class AbstractPartDisplay extends AbstractPartReporting {
|
||||
|
||||
if (hasChan) {
|
||||
final int l = 14;
|
||||
Tessellator.instance.setBrightness(l << 20 | l << 4);
|
||||
Tessellator.instance.setColorOpaque_I(this.getColor().blackVariant);
|
||||
tess.setBrightness(l << 20 | l << 4);
|
||||
tess.setColorOpaque_I(this.getColor().blackVariant);
|
||||
} else if (hasPower) {
|
||||
final int l = 9;
|
||||
Tessellator.instance.setBrightness(l << 20 | l << 4);
|
||||
Tessellator.instance.setColorOpaque_I(this.getColor().whiteVariant);
|
||||
tess.setBrightness(l << 20 | l << 4);
|
||||
tess.setColorOpaque_I(this.getColor().whiteVariant);
|
||||
} else {
|
||||
Tessellator.instance.setBrightness(0);
|
||||
Tessellator.instance.setColorOpaque_I(0x000000);
|
||||
tess.setBrightness(0);
|
||||
tess.setColorOpaque_I(0x000000);
|
||||
}
|
||||
|
||||
final IIcon sideStatusLightTexture = CableBusTextures.PartMonitorSidesStatusLights.getIcon();
|
||||
|
||||
@@ -104,12 +104,13 @@ public abstract class AbstractPartPanel extends AbstractPartReporting {
|
||||
rh.setBounds(2, 2, 14, 14, 14, 16);
|
||||
rh.renderBlock(x, y, z, renderer);
|
||||
|
||||
final Tessellator tess = Tessellator.instance;
|
||||
if (this.getLightLevel() > 0) {
|
||||
final int l = 13;
|
||||
Tessellator.instance.setBrightness(l << 20 | l << 4);
|
||||
tess.setBrightness(l << 20 | l << 4);
|
||||
}
|
||||
|
||||
Tessellator.instance.setColorOpaque_I(this.getBrightnessColor());
|
||||
tess.setColorOpaque_I(this.getBrightnessColor());
|
||||
rh.renderFace(x, y, z, this.getFrontBright().getIcon(), ForgeDirection.SOUTH, renderer);
|
||||
|
||||
rh.setBounds(4, 4, 13, 12, 12, 14);
|
||||
|
||||
Reference in new issue
Block a user