diff options
7 files changed, 66 insertions, 8 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java index 9878df799d..dd930e798c 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java @@ -1,7 +1,10 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; +import java.lang.reflect.Field; + import gregtech.api.enums.Materials; import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; import gregtech.api.interfaces.IIconContainer; import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; @@ -9,6 +12,7 @@ import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; +import gtPlusPlus.core.util.reflect.ReflectionUtils; import net.minecraft.item.ItemStack; import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.fluids.FluidStack; @@ -51,13 +55,11 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In } public ITexture[] getTexturesActive(final ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_FRONT_ACTIVE) }; + return new ITexture[] { aBaseTexture, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE_ACTIVE) }; } public ITexture[] getTexturesInactive(final ITexture aBaseTexture) { - return new ITexture[] { aBaseTexture, - new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_FRONT) }; + return new ITexture[] { aBaseTexture, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_SIDE) }; } public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, @@ -149,4 +151,53 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In return mTempMod + mLockedStack.getLocalizedName(); } + @Override + public boolean doesFillContainers() { + return false; + } + + @Override + public ITexture[][][] getTextureSet(ITexture[] aTextures) { + // TODO Auto-generated method stub + return super.getTextureSet(aTextures); + } + + private Field F1, F2; + + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + byte a1 = 0, a2 = 0; + try { + if (F1 == null) { + F1 = ReflectionUtils.getField(getClass(), "actualTexture"); + } + if (F2 == null) { + F2 = ReflectionUtils.getField(getClass(), "mTexturePage"); + } + + if (F1 != null) { + a1 = F1.getByte(this); + } + if (F2 != null) { + a2 = F2.getByte(this); + } + } + catch (NoSuchFieldException | IllegalArgumentException | IllegalAccessException n) {} + + int textureIndex = a1 | a2 << 7; + byte texturePointer = (byte) (a1 & 127); + + if (aSide == 1 || aSide == 0) { + ITexture g = textureIndex > 0 ? BlockIcons.casingTexturePages[a2][texturePointer] : BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]; + + return new ITexture[] {g, new GT_RenderedTexture((IIconContainer) Textures.BlockIcons.NAQUADAH_REACTOR_FLUID_TOP_ACTIVE) }; + } + + return aSide != aFacing ? + (textureIndex > 0 ? new ITexture[] { BlockIcons.casingTexturePages[a2][texturePointer] } : new ITexture[] { BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1] }) + : (textureIndex > 0 ? (aActive ? this.getTexturesActive(BlockIcons.casingTexturePages[a2][texturePointer]) : this.getTexturesInactive(BlockIcons.casingTexturePages[a2][texturePointer])) + : (aActive ? this.getTexturesActive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]) : this.getTexturesInactive(BlockIcons.MACHINE_CASINGS[this.mTier][aColorIndex + 1]))); + } + } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java index 7373ef4bba..289424ab1b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java @@ -67,7 +67,7 @@ extends GregtechMetaCasingBlocksAbstract { return TexturesGtBlock.TEXTURE_TECH_C.getIcon(); //Coke Oven Casing Tier 1 case 2: - return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A.getIcon(); + return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon(); //Coke Oven Casing Tier 2 case 3: return TexturesGtBlock.Casing_Material_Grisium.getIcon(); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java index 5d76f26a82..db5e8eacaa 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -385,6 +385,7 @@ public class TexturesGtBlock { public static final CustomIcon TEXTURE_METAL_PANEL_E = new CustomIcon("metro/TEXTURE_METAL_PANEL_E"); public static final CustomIcon TEXTURE_MAGIC_PANEL_A = new CustomIcon("metro/TEXTURE_MAGIC_A"); public static final CustomIcon TEXTURE_ORGANIC_PANEL_A = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A"); + public static final CustomIcon TEXTURE_ORGANIC_PANEL_A_GLOWING = new CustomIcon("metro/TEXTURE_ORGANIC_PANEL_A_GLOWING"); public static final CustomIcon TEXTURE_STONE_BIRD_A = new CustomIcon("metro/TEXTURE_STONE_BIRD_A"); public static final CustomIcon TEXTURE_STONE_BIRD_A_LEFT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_LEFT"); public static final CustomIcon TEXTURE_STONE_BIRD_A_RIGHT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_RIGHT"); diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java index 1a79ce15ec..918c827136 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_LargeNaqReactor.java @@ -187,7 +187,7 @@ public class GregtechMTE_LargeNaqReactor extends GregtechMeta_MultiBlockBase { } tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 1, i); - if (!this.addEnergyInputToMachineList(tTileEntity, TAE.getIndexFromPage(3, 0))) { + if (!this.addDynamoToMachineList(tTileEntity, TAE.getIndexFromPage(3, 0))) { if (aBaseMetaTileEntity.getBlockOffset(xDir, 1, i) != getCasing(4)) { return false; } @@ -261,7 +261,7 @@ public class GregtechMTE_LargeNaqReactor extends GregtechMeta_MultiBlockBase { } tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, 1, zDir); - if (!this.addEnergyInputToMachineList(tTileEntity, TAE.getIndexFromPage(3, 0))) { + if (!this.addDynamoToMachineList(tTileEntity, TAE.getIndexFromPage(3, 0))) { if (aBaseMetaTileEntity.getBlockOffset(i, 1, zDir) != getCasing(4)) { return false; } diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png.mcmeta index 3a720fb53a..0285ac2f3b 100644 --- a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png.mcmeta +++ b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_MAGIC_A.png.mcmeta @@ -1,6 +1,6 @@ { "animation":{ - "frametime":3, + "frametime":2, "frames": [0, 2, 3, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0] } }
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png Binary files differnew file mode 100644 index 0000000000..f74f752743 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png.mcmeta b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png.mcmeta new file mode 100644 index 0000000000..ba9119c7ad --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_ORGANIC_PANEL_A_GLOWING.png.mcmeta @@ -0,0 +1,6 @@ +{ + "animation":{ + "frametime":1, + "frames": [0, 2, 3, 3, 4, 5, 6, 7, 7, 6, 5, 4, 3, 2, 1, 0] + } +}
\ No newline at end of file |