fix graphics bugs, new pipe plug/structure pipe/robot station textures
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 279 B |
After Width: | Height: | Size: 211 B |
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 278 B |
Before Width: | Height: | Size: 341 B After Width: | Height: | Size: 281 B |
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 1.9 KiB |
|
@ -33,47 +33,6 @@ public class RobotStationPluggable extends PipePluggable implements IPipePluggab
|
|||
public class RobotStationPluggableRenderer implements IPipePluggableRenderer {
|
||||
private float zFightOffset = 1 / 4096.0F;
|
||||
|
||||
private void robotStationPartRender(RenderBlocks renderblocks, RobotStationState state,
|
||||
ForgeDirection side, ITextureStates blockStateMachine, int x, int y, int z,
|
||||
float xStart, float xEnd, float yStart, float yEnd, float zStart,
|
||||
float zEnd) {
|
||||
|
||||
float[][] zeroState = new float[3][2];
|
||||
// X START - END
|
||||
zeroState[0][0] = xStart + zFightOffset;
|
||||
zeroState[0][1] = xEnd - zFightOffset;
|
||||
// Y START - END
|
||||
zeroState[1][0] = yStart;
|
||||
zeroState[1][1] = yEnd;
|
||||
// Z START - END
|
||||
zeroState[2][0] = zStart + zFightOffset;
|
||||
zeroState[2][1] = zEnd - zFightOffset;
|
||||
|
||||
switch (state) {
|
||||
case None:
|
||||
case Available:
|
||||
blockStateMachine.getTextureState().set(BuildCraftTransport.instance.pipeIconProvider
|
||||
.getIcon(PipeIconProvider.TYPE.PipeRobotStation.ordinal()));
|
||||
break;
|
||||
case Reserved:
|
||||
blockStateMachine.getTextureState().set(BuildCraftTransport.instance.pipeIconProvider
|
||||
.getIcon(PipeIconProvider.TYPE.PipeRobotStationReserved.ordinal()));
|
||||
break;
|
||||
case Linked:
|
||||
blockStateMachine.getTextureState().set(BuildCraftTransport.instance.pipeIconProvider
|
||||
.getIcon(PipeIconProvider.TYPE.PipeRobotStationLinked.ordinal()));
|
||||
break;
|
||||
}
|
||||
|
||||
float[][] rotated = MatrixTranformations.deepClone(zeroState);
|
||||
MatrixTranformations.transform(rotated, side);
|
||||
|
||||
renderblocks.setRenderBounds(rotated[0][0], rotated[1][0],
|
||||
rotated[2][0], rotated[0][1], rotated[1][1],
|
||||
rotated[2][1]);
|
||||
renderblocks.renderStandardBlock(blockStateMachine.getBlock(), x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderPluggable(RenderBlocks renderblocks, IPipe pipe, ForgeDirection side, PipePluggable pipePluggable, ITextureStates blockStateMachine, int renderPass, int x, int y, int z) {
|
||||
if (renderPass != 0) {
|
||||
|
@ -82,47 +41,6 @@ public class RobotStationPluggable extends PipePluggable implements IPipePluggab
|
|||
|
||||
RobotStationState state = ((RobotStationPluggable) pipePluggable).renderState;
|
||||
|
||||
//float width = 0.075F;
|
||||
|
||||
robotStationPartRender (renderblocks, state, side, blockStateMachine, x, y, z,
|
||||
0.45F, 0.55F,
|
||||
0.0F, 0.224F,
|
||||
0.45F, 0.55F);
|
||||
|
||||
|
||||
/*pipeRobotStationPartRender (renderblocks, block, state, x, y, z,
|
||||
0.25F, 0.75F,
|
||||
0.025F, 0.224F,
|
||||
0.25F, 0.25F + width);
|
||||
|
||||
pipeRobotStationPartRender (renderblocks, block, state, x, y, z,
|
||||
0.25F, 0.75F,
|
||||
0.025F, 0.224F,
|
||||
0.75F - width, 0.75F);
|
||||
|
||||
pipeRobotStationPartRender (renderblocks, block, state, x, y, z,
|
||||
0.25F, 0.25F + width,
|
||||
0.025F, 0.224F,
|
||||
0.25F + width, 0.75F - width);
|
||||
|
||||
pipeRobotStationPartRender (renderblocks, block, state, x, y, z,
|
||||
0.75F - width, 0.75F,
|
||||
0.025F, 0.224F,
|
||||
0.25F + width, 0.75F - width);*/
|
||||
|
||||
float[][] zeroState = new float[3][2];
|
||||
|
||||
|
||||
// X START - END
|
||||
zeroState[0][0] = 0.25F + zFightOffset;
|
||||
zeroState[0][1] = 0.75F - zFightOffset;
|
||||
// Y START - END
|
||||
zeroState[1][0] = 0.225F;
|
||||
zeroState[1][1] = 0.251F;
|
||||
// Z START - END
|
||||
zeroState[2][0] = 0.25F + zFightOffset;
|
||||
zeroState[2][1] = 0.75F - zFightOffset;
|
||||
|
||||
switch(state) {
|
||||
case None:
|
||||
case Available:
|
||||
|
@ -139,6 +57,18 @@ public class RobotStationPluggable extends PipePluggable implements IPipePluggab
|
|||
break;
|
||||
}
|
||||
|
||||
|
||||
float[][] zeroState = new float[3][2];
|
||||
// X START - END
|
||||
zeroState[0][0] = 0.4325F;
|
||||
zeroState[0][1] = 0.5675F;
|
||||
// Y START - END
|
||||
zeroState[1][0] = 0F;
|
||||
zeroState[1][1] = 0.1875F + zFightOffset;
|
||||
// Z START - END
|
||||
zeroState[2][0] = 0.4325F;
|
||||
zeroState[2][1] = 0.5675F;
|
||||
|
||||
float[][] rotated = MatrixTranformations.deepClone(zeroState);
|
||||
MatrixTranformations.transform(rotated, side);
|
||||
|
||||
|
@ -146,9 +76,27 @@ public class RobotStationPluggable extends PipePluggable implements IPipePluggab
|
|||
rotated[2][0], rotated[0][1], rotated[1][1],
|
||||
rotated[2][1]);
|
||||
renderblocks.renderStandardBlock(blockStateMachine.getBlock(), x, y, z);
|
||||
|
||||
// X START - END
|
||||
zeroState[0][0] = 0.25F;
|
||||
zeroState[0][1] = 0.75F;
|
||||
// Y START - END
|
||||
zeroState[1][0] = 0.1875F;
|
||||
zeroState[1][1] = 0.25F + zFightOffset;
|
||||
// Z START - END
|
||||
zeroState[2][0] = 0.25F;
|
||||
zeroState[2][1] = 0.75F;
|
||||
|
||||
rotated = MatrixTranformations.deepClone(zeroState);
|
||||
MatrixTranformations.transform(rotated, side);
|
||||
|
||||
renderblocks.setRenderBounds(rotated[0][0], rotated[1][0],
|
||||
rotated[2][0], rotated[0][1], rotated[1][1],
|
||||
rotated[2][1]);
|
||||
renderblocks.renderStandardBlock(blockStateMachine.getBlock(), x, y, z);
|
||||
}
|
||||
}
|
||||
public static enum RobotStationState {
|
||||
public enum RobotStationState {
|
||||
None,
|
||||
Available,
|
||||
Reserved,
|
||||
|
|
|
@ -94,6 +94,7 @@ public class RenderLaserTable implements ISimpleBlockRenderingHandler {
|
|||
renderer.renderStandardBlock(block, xPos, yPos, zPos);
|
||||
}
|
||||
block.getTextureState().pushArray();
|
||||
block.setRenderMask(0x3F);
|
||||
}
|
||||
|
||||
private void renderAssemblyTable(RenderBlocks renderer, boolean isInv, int x, int y, int z, BlockBuildCraft block) {
|
||||
|
|
|
@ -137,13 +137,14 @@ public class PipeIconProvider implements IIconProvider {
|
|||
PipeLens("pipeLens"),
|
||||
PipeFilter("pipeFilter"),
|
||||
PipeLensOverlay("pipeLensOverlay"),
|
||||
PipePlug("pipePlug"),
|
||||
//
|
||||
TransparentFacade("transparent_facade"),
|
||||
Transparent("core:misc/transparent"),
|
||||
//
|
||||
PipePowerAdapterTop("pipePowerAdapterTop"),
|
||||
/* PipePowerAdapterTop("pipePowerAdapterTop"),
|
||||
PipePowerAdapterSide("pipePowerAdapterSide"),
|
||||
PipePowerAdapterBottom("pipePowerAdapterBottom"),
|
||||
PipePowerAdapterBottom("pipePowerAdapterBottom"), */
|
||||
//
|
||||
ItemBox("itemBox");
|
||||
public static final TYPE[] VALUES = values();
|
||||
|
|
|
@ -51,14 +51,18 @@ public class LensPluggable extends PipePluggable {
|
|||
zeroState[2][1] = 0.8125F;
|
||||
|
||||
if (renderPass == 1) {
|
||||
blockStateMachine.setRenderMask(1 << side.ordinal() | (1 << (side.ordinal() ^ 1)));
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
zeroState[i][0] += zFightOffset;
|
||||
zeroState[i][1] -= zFightOffset;
|
||||
}
|
||||
blockStateMachine.getTextureState().set(BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.PipeLensOverlay.ordinal()));
|
||||
((FakeBlock) blockStateMachine).setColor(ColorUtils.getRGBColor(15 - ((LensPluggable) pipePluggable).color));
|
||||
|
||||
blockStateMachine.setRenderAllSides();
|
||||
} else {
|
||||
if (((LensPluggable) pipe).isFilter) {
|
||||
if (((LensPluggable) pipePluggable).isFilter) {
|
||||
blockStateMachine.getTextureState().set(BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.PipeFilter.ordinal()));
|
||||
} else {
|
||||
blockStateMachine.getTextureState().set(BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.PipeLens.ordinal()));
|
||||
|
|
|
@ -40,7 +40,7 @@ public class PlugPluggable extends PipePluggable {
|
|||
zeroState[2][0] = 0.25F + zFightOffset;
|
||||
zeroState[2][1] = 0.75F - zFightOffset;
|
||||
|
||||
blockStateMachine.getTextureState().set(BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.PipeStructureCobblestone.ordinal())); // Structure Pipe
|
||||
blockStateMachine.getTextureState().set(BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.PipePlug.ordinal())); // Structure Pipe
|
||||
|
||||
float[][] rotated = MatrixTranformations.deepClone(zeroState);
|
||||
MatrixTranformations.transform(rotated, side);
|
||||
|
@ -58,7 +58,6 @@ public class PlugPluggable extends PipePluggable {
|
|||
zeroState[2][0] = 0.25F + 0.125F / 2;
|
||||
zeroState[2][1] = 0.75F - 0.125F / 2;
|
||||
|
||||
blockStateMachine.getTextureState().set(BuildCraftTransport.instance.pipeIconProvider.getIcon(PipeIconProvider.TYPE.PipeStructureCobblestone.ordinal())); // Structure Pipe
|
||||
rotated = MatrixTranformations.deepClone(zeroState);
|
||||
MatrixTranformations.transform(rotated, side);
|
||||
|
||||
|
|
|
@ -200,6 +200,7 @@ public class PipeRendererWorld implements ISimpleBlockRenderingHandler {
|
|||
stateHost.setRenderMask((mask & 0x15) << 1 | (mask & 0x2a) >> 1); // pairwise swapped mask
|
||||
renderblocks.setRenderBounds(dim[5], dim[3], dim[4], dim[2], dim[0], dim[1]);
|
||||
renderblocks.renderStandardBlock(stateHost, x, y, z);
|
||||
stateHost.setRenderAllSides();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|