From 89d0c5a37a6b982d30a24350492fe8d7acb0d63c Mon Sep 17 00:00:00 2001 From: Alkalus Date: Sat, 7 Oct 2017 17:11:52 +1000 Subject: $ Fixed Textures further on the Industrial Centrifuge. $ Fixed the issue where two textures would become Fusion Reactor casings. Fixed thanks to @Technus --- .../multi/GregtechMetaTileEntity_IndustrialCentrifuge.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/Java/gtPlusPlus/xmod/gregtech/common/tileentities') diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java index 460965de05..ac288eb3ab 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/GregtechMetaTileEntity_IndustrialCentrifuge.java @@ -76,7 +76,12 @@ extends GregtechMeta_MultiBlockBase { @Override public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[TAE.GTPP_INDEX(0)][aColorIndex + 1], aFacing == aSide ? aActive ? frontFaceActive : frontFace : Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(0)]}; + try { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[TAE.GTPP_INDEX(0)][aColorIndex + 1], aFacing == aSide ? aActive ? frontFaceActive : frontFace : Textures.BlockIcons.CASING_BLOCKS[TAE.GTPP_INDEX(0)]}; + } + catch (Throwable t){ + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[0][aColorIndex + 1], aFacing == aSide ? aActive ? frontFaceActive : frontFace : Textures.BlockIcons.CASING_BLOCKS[0]}; + } } @@ -164,9 +169,9 @@ extends GregtechMeta_MultiBlockBase { this.mEUt = (-this.mEUt); } this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime); - + ItemStack mNewOutputs[] = new ItemStack[tRecipe.mOutputs.length]; - + for (int i = 0; i < tRecipe.mOutputs.length; i++){ if (this.getBaseMetaTileEntity().getRandomNumber(7500) < tRecipe.getOutputChance(i)){ //Utils.LOG_INFO("Adding a bonus output | "+tRecipe.getOutputChance(i)); @@ -177,7 +182,7 @@ extends GregtechMeta_MultiBlockBase { mNewOutputs[i] = null; } } - + this.mOutputItems = mNewOutputs; this.mOutputFluids = new FluidStack[] { tRecipe.getFluidOutput(0) }; updateSlots(); -- cgit