Visualize fluid pipe input restriction
|
@ -103,7 +103,9 @@ public class Textures {
|
||||||
OVERLAY_FRONT_PROCESSING_ARRAY, OVERLAY_FRONT_OIL_DRILL_ACTIVE, OVERLAY_FRONT_OIL_DRILL, OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE, OVERLAY_FRONT_DIESEL_ENGINE, OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE,
|
OVERLAY_FRONT_PROCESSING_ARRAY, OVERLAY_FRONT_OIL_DRILL_ACTIVE, OVERLAY_FRONT_OIL_DRILL, OVERLAY_FRONT_DIESEL_ENGINE_ACTIVE, OVERLAY_FRONT_DIESEL_ENGINE, OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE,
|
||||||
OVERLAY_FRONT_PYROLYSE_OVEN, OVERLAY_FRONT_OIL_CRACKER_ACTIVE, OVERLAY_FRONT_OIL_CRACKER, OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE, OVERLAY_FRONT_DISTILLATION_TOWER,
|
OVERLAY_FRONT_PYROLYSE_OVEN, OVERLAY_FRONT_OIL_CRACKER_ACTIVE, OVERLAY_FRONT_OIL_CRACKER, OVERLAY_FRONT_DISTILLATION_TOWER_ACTIVE, OVERLAY_FRONT_DISTILLATION_TOWER,
|
||||||
OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE, OVERLAY_FRONT_ASSEMBLY_LINE, OVERLAY_FRONT_ORE_DRILL_ACTIVE, OVERLAY_FRONT_ORE_DRILL, OVERLAY_TOP_CLEANROOM_ACTIVE, OVERLAY_TOP_CLEANROOM,
|
OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE, OVERLAY_FRONT_ASSEMBLY_LINE, OVERLAY_FRONT_ORE_DRILL_ACTIVE, OVERLAY_FRONT_ORE_DRILL, OVERLAY_TOP_CLEANROOM_ACTIVE, OVERLAY_TOP_CLEANROOM,
|
||||||
OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR, OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE;
|
OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR, OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE,
|
||||||
|
PIPE_RESTRICTOR_UP, PIPE_RESTRICTOR_DOWN, PIPE_RESTRICTOR_LEFT, PIPE_RESTRICTOR_RIGHT, PIPE_RESTRICTOR_NU, PIPE_RESTRICTOR_ND, PIPE_RESTRICTOR_NL, PIPE_RESTRICTOR_NR,
|
||||||
|
PIPE_RESTRICTOR_UD, PIPE_RESTRICTOR_UL, PIPE_RESTRICTOR_UR, PIPE_RESTRICTOR_DL, PIPE_RESTRICTOR_DR, PIPE_RESTRICTOR_LR;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Icon for Fresh CFoam
|
* Icon for Fresh CFoam
|
||||||
|
|
|
@ -87,27 +87,63 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity{
|
||||||
return new GT_MetaPipeEntity_Fluid(mName, mThickNess, mMaterial, mCapacity, mHeatResistance, mGasProof, mPipeAmount);
|
return new GT_MetaPipeEntity_Fluid(mName, mThickNess, mMaterial, mCapacity, mHeatResistance, mGasProof, mPipeAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected static final byte[][] sRestrictionArray = new byte[][]{
|
||||||
|
{2, 3, 5, 4},
|
||||||
|
{2, 3, 4, 5},
|
||||||
|
{1, 0, 4, 5},
|
||||||
|
{1, 0, 4, 5},
|
||||||
|
{1, 0, 2, 3},
|
||||||
|
{1, 0, 2, 3}};
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) {
|
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aConnections, byte aColorIndex, boolean aConnected, boolean aRedstone) {
|
||||||
if (aConnected) {
|
float tThickNess = getThickNess();
|
||||||
float tThickNess = getThickNess();
|
if (mDisableInput == 0) return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
|
||||||
if (tThickNess < 0.124F)
|
byte tMask = 0;
|
||||||
return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
|
if (aSide >= 0 && aSide < 6) for (byte i = 0; i < 4; i++) if ((mDisableInput & (1 << sRestrictionArray[aSide][i])) != 0) tMask |= 1 << i;
|
||||||
if (tThickNess < 0.374F)//0.375
|
return new ITexture[]{aConnected ? getBaseTexture(tThickNess, mPipeAmount, mMaterial, aColorIndex) : new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa)), getRestrictorTexture(tMask)};
|
||||||
return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
|
}
|
||||||
if (tThickNess < 0.499F)//0.500
|
|
||||||
return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
|
protected static final ITexture getBaseTexture(float aThickNess, int aPipeAmount, Materials aMaterial, byte aColorIndex) {
|
||||||
if (tThickNess < 0.749F)//0.750
|
if (aPipeAmount >= 9) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeNonuple.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa));
|
||||||
return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
|
if (aPipeAmount >= 4) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeQuadruple.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa));
|
||||||
if (tThickNess < 0.874F)//0.825
|
if (aThickNess < 0.124F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa));
|
||||||
return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
|
if (aThickNess < 0.374F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeTiny.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa));
|
||||||
if (mPipeAmount == 4)
|
if (aThickNess < 0.499F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeSmall.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa));
|
||||||
return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeQuadruple.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
|
if (aThickNess < 0.749F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeMedium.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa));
|
||||||
if (mPipeAmount == 9)
|
if (aThickNess < 0.874F) return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeLarge.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa));
|
||||||
return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeNonuple.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
|
return new GT_RenderedTexture(aMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, aMaterial.mRGBa));
|
||||||
return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipeHuge.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
|
}
|
||||||
}
|
|
||||||
return new ITexture[]{new GT_RenderedTexture(mMaterial.mIconSet.mTextures[OrePrefixes.pipe.mTextureIndex], Dyes.getModulation(aColorIndex, mMaterial.mRGBa))};
|
protected static final ITexture getRestrictorTexture(byte aMask) {
|
||||||
|
switch (aMask) {
|
||||||
|
case 1: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_UP);
|
||||||
|
case 2: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_DOWN);
|
||||||
|
case 3: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_UD);
|
||||||
|
case 4: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_LEFT);
|
||||||
|
case 5: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_UL);
|
||||||
|
case 6: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_DL);
|
||||||
|
case 7: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_NR);
|
||||||
|
case 8: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_RIGHT);
|
||||||
|
case 9: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_UR);
|
||||||
|
case 10: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_DR);
|
||||||
|
case 11: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_NL);
|
||||||
|
case 12: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_LR);
|
||||||
|
case 13: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_ND);
|
||||||
|
case 14: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR_NU);
|
||||||
|
case 15: return new GT_RenderedTexture(Textures.BlockIcons.PIPE_RESTRICTOR);
|
||||||
|
default: return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onValueUpdate(byte aValue) {
|
||||||
|
mDisableInput = aValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public byte getUpdateData() {
|
||||||
|
return mDisableInput;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1659,7 +1659,7 @@ public class GT_Loader_MetaTileEntities implements Runnable {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void generateFluidMultiPipes(Materials aMaterial, String name, String displayName, int startID, int baseCapacity, int heatCapacity, boolean gasProof){
|
private static void generateFluidMultiPipes(Materials aMaterial, String name, String displayName, int startID, int baseCapacity, int heatCapacity, boolean gasProof){
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.pipeQuadruple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID, "GT_Pipe_" + name + "_Quadruple", "Quadruple " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity, heatCapacity, gasProof, 4).getStackForm(1L));
|
GT_OreDictUnificator.registerOre(OrePrefixes.pipeQuadruple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID, "GT_Pipe_" + name + "_Quadruple", "Quadruple " + displayName + " Fluid Pipe", 0.9F, aMaterial, baseCapacity, heatCapacity, gasProof, 4).getStackForm(1L));
|
||||||
GT_OreDictUnificator.registerOre(OrePrefixes.pipeNonuple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 1, "GT_Pipe_" + name + "_Nonuple", "Nonuple " + displayName + " Fluid Pipe", 0.875F, aMaterial, baseCapacity / 3, heatCapacity, gasProof, 9).getStackForm(1L));
|
GT_OreDictUnificator.registerOre(OrePrefixes.pipeNonuple.get(aMaterial), new GT_MetaPipeEntity_Fluid(startID + 1, "GT_Pipe_" + name + "_Nonuple", "Nonuple " + displayName + " Fluid Pipe", 0.9F, aMaterial, baseCapacity / 3, heatCapacity, gasProof, 9).getStackForm(1L));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
After Width: | Height: | Size: 410 B |
After Width: | Height: | Size: 309 B |
After Width: | Height: | Size: 406 B |
After Width: | Height: | Size: 316 B |
After Width: | Height: | Size: 428 B |
After Width: | Height: | Size: 499 B |
After Width: | Height: | Size: 493 B |
After Width: | Height: | Size: 498 B |
After Width: | Height: | Size: 499 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 408 B |
After Width: | Height: | Size: 398 B |
After Width: | Height: | Size: 302 B |
After Width: | Height: | Size: 408 B |