diff options
66 files changed, 1228 insertions, 145 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java index feb2ea275d..baea21c3c3 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java @@ -300,6 +300,9 @@ public enum GregtechItemList implements GregtechItemContainer { //Air Intake hatch Hatch_Air_Intake, + + //XL Turbine Rotor Hatch + Hatch_Turbine_Rotor, //Custom Fluid Hatches Hatch_Input_Cryotheum, diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java new file mode 100644 index 0000000000..d4d2fcacd7 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java @@ -0,0 +1,60 @@ +package gtPlusPlus.xmod.gregtech.api.gui.hatches; + +import gregtech.api.gui.GT_Container_1by1; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.items.GT_MetaGenerated_Tool; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.ItemStack; + +public class CONTAINER_1by1_Turbine extends GT_Container_1by1 { + + public CONTAINER_1by1_Turbine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) { + super(aInventoryPlayer, aTileEntity); + } + + @Override + public void addSlots(InventoryPlayer aInventoryPlayer) { + addSlotToContainer(new SlotTurbine(mTileEntity, 0, 80, 35)); + } + + @Override + public int getShiftClickSlotCount() { + return 0; + } + + @Override + public boolean canDragIntoSlot(Slot par1Slot) { + return false; + } + + public class SlotTurbine extends Slot { + public SlotTurbine(final IInventory inventory, final int x, final int y, final int z) { + super(inventory, x, y, z); + } + @Override + public boolean isItemValid(final ItemStack itemstack) { + /*if (itemstack.getItem() instanceof GT_MetaGenerated_Tool) { + if (itemstack.getItemDamage() >= 170 && itemstack.getItemDamage() <= 176) { + return true; + } + }*/ + return false; + } + @Override + public int getSlotStackLimit() { + return 1; + } + @Override + public boolean canTakeStack(EntityPlayer p_82869_1_) { + return false; + } + @Override + public void putStack(ItemStack p_75215_1_) { + // TODO Auto-generated method stub + super.putStack(p_75215_1_); + } + } +} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java new file mode 100644 index 0000000000..5623f0e224 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java @@ -0,0 +1,36 @@ +package gtPlusPlus.xmod.gregtech.api.gui.hatches; + +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import net.minecraft.entity.player.InventoryPlayer; + +import static gregtech.api.enums.GT_Values.RES_PATH_GUI; + +import gregtech.api.gui.GT_GUIContainerMetaTile_Machine; + +public class GUI_1by1_Turbine extends GT_GUIContainerMetaTile_Machine { + + private final String mName; + + public GUI_1by1_Turbine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) { + super(new CONTAINER_1by1_Turbine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "1by1.png"); + mName = aName; + } + + public GUI_1by1_Turbine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) { + super(new CONTAINER_1by1_Turbine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + aBackground + "1by1.png"); + mName = aName; + } + + @Override + protected void drawGuiContainerForegroundLayer(int par1, int par2) { + fontRendererObj.drawString(mName, 8, 4, 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) { + super.drawGuiContainerBackgroundLayer(par1, par2, par3); + int x = (width - xSize) / 2; + int y = (height - ySize) / 2; + drawTexturedModalRect(x, y, 0, 0, xSize, ySize); + } +} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java new file mode 100644 index 0000000000..d022bb60ce --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Turbine.java @@ -0,0 +1,315 @@ +package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations; + +import gregtech.api.GregTech_API; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.MetaTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Utility; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.BlockPos; +import gtPlusPlus.core.util.Utils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_1by1_Turbine; +import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_1by1_Turbine; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine.LargeTurbineTextureHandler; +import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines.GregtechMetaTileEntity_LargerTurbineBase; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class GT_MetaTileEntity_Hatch_Turbine extends GT_MetaTileEntity_Hatch { + + public boolean mHasController = false; + public boolean mUsingAnimation = true; + private String mControllerLocation; + + public GT_MetaTileEntity_Hatch_Turbine(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 16, new String[]{ + "Turbine Rotor holder for XL Turbines"}); + } + + public GT_MetaTileEntity_Hatch_Turbine(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 1, aDescription, aTextures); + } + + public GT_MetaTileEntity_Hatch_Turbine(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 1, aDescription, aTextures); + } + + @Override + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, getFrontFacingTurbineTexture()}; + } + + @Override + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[]{aBaseTexture, getFrontFacingTurbineTexture()}; + } + + @Override + public boolean isSimpleMachine() { + return true; + } + + @Override + public boolean isFacingValid(byte aFacing) { + return aFacing > 1; + } + + @Override + public boolean isAccessAllowed(EntityPlayer aPlayer) { + return true; + } + + @Override + public boolean isValidSlot(int aIndex) { + return false; + } + + @Override + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Hatch_Turbine(mName, mTier, mDescriptionArray, mTextures); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) return true; + //aBaseMetaTileEntity.openGUI(aPlayer); + PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Using Animations? "+usingAnimations()); + PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Has Controller? "+this.mHasController); + if (mHasController) { + PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Controller Location: "+BlockPos.generateBlockPos(mControllerLocation).getLocationString()); + PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Controller Active? "+this.isControllerActive()); + } + PlayerUtils.messagePlayer(aPlayer, "[Turbine Assembly Data] Is Active? "+this.getBaseMetaTileEntity().isActive()); + return true; + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + switch (mTier) { + default: + return new CONTAINER_1by1_Turbine(aPlayerInventory, aBaseMetaTileEntity); + } + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + switch (mTier) { + default: + return new GUI_1by1_Turbine(aPlayerInventory, aBaseMetaTileEntity, "Turbine Rotor Hatch"); + } + } + + @Override + public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { + return false; + } + + @Override + public int getInventoryStackLimit() { + return 1; + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("mHasController", mHasController); + aNBT.setBoolean("mUsingAnimation", mUsingAnimation); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mHasController = aNBT.getBoolean("mHasController"); + mUsingAnimation = aNBT.getBoolean("mUsingAnimation"); + } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + this.mUsingAnimation = Utils.invertBoolean(mUsingAnimation); + if (this.mUsingAnimation) { + PlayerUtils.messagePlayer(aPlayer, "Using Animated Turbine Texture."); + } + else { + PlayerUtils.messagePlayer(aPlayer, "Using Static Turbine Texture."); + } + PlayerUtils.messagePlayer(aPlayer, "Has Controller: "+this.mHasController); + if (mHasController) { + PlayerUtils.messagePlayer(aPlayer, "Controller Location: "+this.mControllerLocation); + } + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (this.mHasController) { + if (aTick % 20 == 0) { + if (isControllerActive()) { + this.getBaseMetaTileEntity().setActive(true); + } + else { + this.getBaseMetaTileEntity().setActive(false); + } + } + } + else if (!this.mHasController && this.mControllerLocation != null) { + //Weird Invalid State + if (setController(BlockPos.generateBlockPos(mControllerLocation))) { + //Valid + } + } + else { + //No Controller + } + } + + public boolean isControllerActive() { + GregtechMetaTileEntity_LargerTurbineBase x = getController(); + if (x != null) { + Logger.INFO("Checking Status of Controller."); + return x.isMachineRunning(); + } + Logger.INFO("Status of Controller failed, controller is null."); + return false; + } + + public GregtechMetaTileEntity_LargerTurbineBase getController() { + if (this.mHasController && this.mControllerLocation != null && this.mControllerLocation.length() > 0) { + BlockPos p = BlockPos.generateBlockPos(mControllerLocation); + if (p != null) { + //Logger.INFO(p.getLocationString()); + IGregTechTileEntity tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntity(p.xPos, p.yPos, + p.zPos); + if (tTileEntity != null && tTileEntity.getMetaTileEntity() instanceof GregtechMetaTileEntity_LargerTurbineBase) { + return (GregtechMetaTileEntity_LargerTurbineBase) tTileEntity.getMetaTileEntity(); + } + else { + if (tTileEntity == null) { + Logger.INFO("Controller MTE is null, somehow?"); + } + else { + Logger.INFO("Controller is a different MTE to expected"); + } + } + } + } + //Logger.INFO("Failed to Get Controller."); + return null; + } + + public boolean canSetNewController() { + if ((mControllerLocation != null && mControllerLocation.length() > 0) || this.mHasController) { + return false; + } + return true; + } + + public boolean setController(BlockPos aPos) { + clearController(); + if (canSetNewController()) { + mControllerLocation = aPos.getUniqueIdentifier(); + mHasController = true; + Logger.INFO("Successfully injected controller into this Turbine Assembly Hatch."); + } + return mHasController; + } + + public void clearController() { + this.mControllerLocation = null; + this.mHasController = false; + } + + public boolean usingAnimations() { + return mUsingAnimation; + } + + private ITexture getFrontFacingTurbineTexture() { + if (!mHasController) { + return this.getBaseMetaTileEntity().isActive() ? new GT_RenderedTexture(LargeTurbineTextureHandler.frontFaceHPActive_4) : new GT_RenderedTexture(LargeTurbineTextureHandler.frontFace_4 ); + } + else { + if (usingAnimations()) { + if (isControllerActive()) { + return getController().frontFaceActive; + } + } + return getController().frontFace; + } + } + + @Override + public long getMinimumStoredEU() { + return 0; + } + + @Override + public boolean isItemValidForSlot(int aIndex, ItemStack aStack) { + return false; + } + + @Override + public int[] getAccessibleSlotsFromSide(int aSide) { + return new int[] {}; + } + + @Override + public boolean canInsertItem(int aIndex, ItemStack aStack, int aSide) { + return false; + } + + @Override + public boolean onWrenchRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, + float aZ) { + // TODO Auto-generated method stub + return super.onWrenchRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ); + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, + float aY, float aZ) { + //Do Super + boolean aSuper = super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); + // Do Things + if (this.getBaseMetaTileEntity().isServerSide()) { + ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); + if (tCurrentItem != null) { + if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList)) { + if (mControllerLocation != null && mControllerLocation.length() > 0) { + if (setController(BlockPos.generateBlockPos(mControllerLocation))) { + if (GT_ModHandler.damageOrDechargeItem(tCurrentItem, 1, 1000, aPlayer)) { + String tChat = "Trying to Reset linked Controller"; + IGregTechTileEntity g = this.getBaseMetaTileEntity(); + GT_Utility.sendChatToPlayer(aPlayer, tChat); + GT_Utility.sendSoundToPlayers(g.getWorld(), GregTech_API.sSoundList.get(101), 1.0F, -1, + g.getXCoord(), g.getYCoord(), g.getZCoord()); + } + } + } + } + } + } + return aSuper; + } + + public void setActive(boolean b) { + this.getBaseMetaTileEntity().setActive(b); + } + + + + + +}
\ No newline at end of file diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java index c53ad80737..5641ba0c3f 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java @@ -22,17 +22,23 @@ import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.metatileentity.MetaTileEntity; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase; import gregtech.api.objects.GT_ItemStack; +import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import gregtech.api.util.GT_Recipe; import gregtech.api.util.GT_Recipe.GT_Recipe_Map; import gregtech.api.util.GT_Utility; import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.BlockPos; import gtPlusPlus.core.lib.CORE; import gtPlusPlus.core.lib.LoadedMods; import gtPlusPlus.core.recipe.common.CI; @@ -505,7 +511,12 @@ GT_MetaTileEntity_MultiBlockBase { } log("Error generating recipe, returning null."); return null; - + } + + public boolean isMachineRunning() { + boolean aRunning = this.getBaseMetaTileEntity().isActive(); + Logger.INFO("Queried Multiblock is currently running: "+aRunning); + return aRunning; } @Override @@ -638,10 +649,41 @@ GT_MetaTileEntity_MultiBlockBase { } return b; } + + + public <E> boolean addToMachineListInternal(ArrayList<E> aList, final IMetaTileEntity aTileEntity, + final int aBaseCasingIndex) { + if (aList.isEmpty()) { + if (aTileEntity instanceof GT_MetaTileEntity_Hatch) { + Logger.INFO("Adding " + aTileEntity.getInventoryName() + " at " + new BlockPos(aTileEntity.getBaseMetaTileEntity()).getLocationString()); + updateTexture(aTileEntity, aBaseCasingIndex); + return aList.add((E) aTileEntity); + } + } else { + IGregTechTileEntity aCur = aTileEntity.getBaseMetaTileEntity(); + BlockPos aCurPos = new BlockPos(aCur); + boolean aExists = false; + for (E m : aList) { + IGregTechTileEntity b = ((IMetaTileEntity) m).getBaseMetaTileEntity(); + BlockPos aPos = new BlockPos(b); + if (b != null && aPos != null) { + if (aCurPos.equals(aPos)) { + Logger.INFO("Found Duplicate "+b.getInventoryName()+" at " + aPos.getLocationString()); + return false; + } + } + } + if (aTileEntity instanceof GT_MetaTileEntity_Hatch) { + Logger.INFO("Adding " + aCur.getInventoryName() + " at " + aCurPos.getLocationString()); + updateTexture(aTileEntity, aBaseCasingIndex); + return aList.add((E) aTileEntity); + } + } + return false; + } @Override - public boolean addToMachineList(final IGregTechTileEntity aTileEntity, - final int aBaseCasingIndex) { + public boolean addToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { if (aTileEntity == null) { return false; } @@ -649,65 +691,71 @@ GT_MetaTileEntity_MultiBlockBase { if (aMetaTileEntity == null) { return false; } - + + //Use this to determine the correct value, then update the hatch texture after. + boolean aDidAdd = false; + + //Handle Custom Hustoms if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBattery) { log("Found GT_MetaTileEntity_Hatch_InputBattery"); - updateTexture(aTileEntity, aBaseCasingIndex); - return this.mChargeHatches.add( - (GT_MetaTileEntity_Hatch_InputBattery) aMetaTileEntity); + aDidAdd = addToMachineListInternal(mChargeHatches, aMetaTileEntity, aBaseCasingIndex); } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBattery) { + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBattery) { log("Found GT_MetaTileEntity_Hatch_OutputBattery"); - updateTexture(aTileEntity, aBaseCasingIndex); - return this.mDischargeHatches.add( - (GT_MetaTileEntity_Hatch_OutputBattery) aMetaTileEntity); + aDidAdd = addToMachineListInternal(mDischargeHatches, aMetaTileEntity, aBaseCasingIndex); } - if (LoadedMods.TecTech){ - if (isThisHatchMultiDynamo(aMetaTileEntity)) { - log("Found isThisHatchMultiDynamo"); - updateTexture(aTileEntity, aBaseCasingIndex); - return this.mMultiDynamoHatches.add( - (GT_MetaTileEntity_Hatch) aMetaTileEntity); - } + + //Handle TT Multi-A Dynamos + else if (LoadedMods.TecTech && isThisHatchMultiDynamo(aMetaTileEntity)) { + log("Found isThisHatchMultiDynamo"); + aDidAdd = addToMachineListInternal(mMultiDynamoHatches, aMetaTileEntity, aBaseCasingIndex); + } + + //Handle Fluid Hatches using seperate logic + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) + aDidAdd = addFluidInputToMachineList(aMetaTileEntity, aBaseCasingIndex); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) + aDidAdd = addToMachineListInternal(mOutputHatches, aMetaTileEntity, aBaseCasingIndex); + + //Process Remaining hatches using Vanilla GT Logic + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) + aDidAdd = addToMachineListInternal(mInputBusses, aMetaTileEntity, aBaseCasingIndex); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) + aDidAdd = addToMachineListInternal(mOutputBusses, aMetaTileEntity, aBaseCasingIndex); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) + aDidAdd = addToMachineListInternal(mEnergyHatches, aMetaTileEntity, aBaseCasingIndex); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) + aDidAdd = addToMachineListInternal(mDynamoHatches, aMetaTileEntity, aBaseCasingIndex); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) + aDidAdd = addToMachineListInternal(mMaintenanceHatches, aMetaTileEntity, aBaseCasingIndex); + else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) + aDidAdd = addToMachineListInternal(mMufflerHatches, aMetaTileEntity, aBaseCasingIndex); + + //return super.addToMachineList(aTileEntity, aBaseCasingIndex); + return aDidAdd; + } + + - } - return super.addToMachineList(aTileEntity, aBaseCasingIndex); + @Override + public boolean addMaintenanceToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + return addToMachineList(aTileEntity, aBaseCasingIndex); } - public boolean addChargeableToMachineList(final IGregTechTileEntity aTileEntity, - final int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBattery) { - updateTexture(aTileEntity, aBaseCasingIndex); - return this.mChargeHatches.add( - (GT_MetaTileEntity_Hatch_InputBattery) aMetaTileEntity); - } - return false; + @Override + public boolean addMufflerToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + return addToMachineList(aTileEntity, aBaseCasingIndex); } - public boolean addDischargeableInputToMachineList( - final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { - if (aTileEntity == null) { - return false; - } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBattery) { - updateTexture(aTileEntity, aBaseCasingIndex); - return this.mDischargeHatches.add( - (GT_MetaTileEntity_Hatch_OutputBattery) aMetaTileEntity); - } - return false; + @Override + public boolean addInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + return addToMachineList(aTileEntity, aBaseCasingIndex); } + @Override + public boolean addOutputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) { + return addToMachineList(aTileEntity, aBaseCasingIndex); + } public boolean addFluidInputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { if (aTileEntity == null) { @@ -717,25 +765,17 @@ GT_MetaTileEntity_MultiBlockBase { if (aMetaTileEntity == null) { return false; } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { - updateTexture(aTileEntity, aBaseCasingIndex); - ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = this.getRecipeMap(); - return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity); - } - return false; + return addFluidInputToMachineList(aMetaTileEntity, aBaseCasingIndex); } - public boolean addFluidOutputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) { + public boolean addFluidInputToMachineList(final IMetaTileEntity aTileEntity, final int aBaseCasingIndex) { if (aTileEntity == null) { return false; } - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - if (aMetaTileEntity == null) { - return false; - } - if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) { - updateTexture(aTileEntity, aBaseCasingIndex); - return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity); + final IMetaTileEntity aMetaTileEntity = aTileEntity; + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) { + ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = this.getRecipeMap(); + return addToMachineListInternal(mInputHatches, aMetaTileEntity, aBaseCasingIndex); } return false; } @@ -808,9 +848,22 @@ GT_MetaTileEntity_MultiBlockBase { @SuppressWarnings("deprecation") public boolean updateTexture(final IGregTechTileEntity aTileEntity, int aCasingID){ + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + return updateTexture(aMetaTileEntity, aCasingID); + } + + /** + * Enable Texture Casing Support if found in GT 5.09 + */ + + @SuppressWarnings("deprecation") + public boolean updateTexture(final IMetaTileEntity aTileEntity, int aCasingID){ try { //gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch.updateTexture(int) - final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + final IMetaTileEntity aMetaTileEntity = aTileEntity; if (aMetaTileEntity == null) { return false; } @@ -828,7 +881,7 @@ GT_MetaTileEntity_MultiBlockBase { log("Bad Method Call for updateTexture."); if (GT_MetaTileEntity_Hatch.class.isInstance(aMetaTileEntity)){ if (aCasingID <= Byte.MAX_VALUE) { - ((GT_MetaTileEntity_Hatch) aTileEntity.getMetaTileEntity()).mMachineBlock = (byte) aCasingID; + ((GT_MetaTileEntity_Hatch) aTileEntity).mMachineBlock = (byte) aCasingID; log("Good Method Call for updateTexture. Used fallback method of setting mMachineBlock as casing id was <= 128."); return true; } @@ -1120,6 +1173,35 @@ GT_MetaTileEntity_MultiBlockBase { return mRecipeResult; } } + + + + + + + /** + * Custom Tool Handling + */ + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX, + float aY, float aZ) { + //Do Super + boolean aSuper = super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ); + // Do Things + if (this.getBaseMetaTileEntity().isServerSide()) { + ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem(); + if (tCurrentItem != null) { + if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList)) { + + } + } + } + return aSuper; + } + + + diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java index f47e1d5b72..b3366df96b 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java @@ -2,7 +2,9 @@ package gtPlusPlus.xmod.gregtech.common.blocks; import net.minecraft.item.ItemStack; import net.minecraft.util.IIcon; - +import net.minecraft.world.IBlockAccess; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; import gregtech.api.enums.TAE; import gregtech.api.enums.Textures; import gregtech.api.objects.GT_CopiedBlockTexture; @@ -11,6 +13,7 @@ import gregtech.common.blocks.GT_Material_Casings; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine.LargeTurbineTextureHandler; public class GregtechMetaCasingBlocks4 @@ -53,10 +56,24 @@ extends GregtechMetaCasingBlocksAbstract { GregtechItemList.Casing_CuttingFactoryFrame.set(new ItemStack(this, 1, 13)); GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 14)); GregtechItemList.Casing_PLACEHOLDER_TreeFarmer.set(new ItemStack(this, 1, 15));*/ - } + } + private static final LargeTurbineTextureHandler mTurbineTextures = new LargeTurbineTextureHandler(); + + @Override + @SideOnly(Side.CLIENT) + public IIcon getIcon(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide) { + final GregtechMetaCasingBlocks4 i = this; + return mTurbineTextures.handleCasingsGT(aWorld, xCoord, yCoord, zCoord, aSide, i); + } + @Override - public IIcon getIcon(final int aSide, final int aMeta) { //Texture ID's. case 0 == ID[57] + public IIcon getIcon(final int aSide, final int aMeta) { + return getStaticIcon((byte) aSide, (byte) aMeta); + } + + public static IIcon getStaticIcon(final byte aSide, final byte aMeta) { + //Texture ID's. case 0 == ID[57] if ((aMeta >= 0) && (aMeta < 16)) { switch (aMeta) { //Centrifuge @@ -81,15 +98,18 @@ extends GregtechMetaCasingBlocksAbstract { case 6: return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); + //Vanadium Radox Battery case 7: return TexturesGtBlock.Casing_Redox_1.getIcon(); //Power Sub-Station Casing case 8: - return TexturesGtBlock.Casing_Machine_Metal_Sheet_A.getIcon(); + return TexturesGtBlock.Casing_Machine_Simple_Top.getIcon(); //Cyclotron Coil case 9: - return TexturesGtBlock.Overlay_Machine_Cyber_A.getIcon(); + return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon(); + + //Cyclotron External Casing case 10: return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon(); @@ -110,15 +130,6 @@ extends GregtechMetaCasingBlocksAbstract { case 14: return TexturesGtBlock.Casing_Material_RedSteel.getIcon(); case 15: - if (aSide <2) { - if (aSide == 1) { - return TexturesGtBlock.Casing_Machine_Podzol.getIcon(); - } - return TexturesGtBlock.Casing_Machine_Acacia_Log.getIcon(); - } - else { - return TexturesGtBlock.Casing_Machine_Farm_Manager.getIcon(); - } default: return TexturesGtBlock.Overlay_UU_Matter.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 2e05d08bb1..5f49528724 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java @@ -524,6 +524,10 @@ public class TexturesGtBlock { + public static Object Casing_Material_Turbine; + + + } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java new file mode 100644 index 0000000000..188b6ed4f6 --- /dev/null +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/turbine/LargeTurbineTextureHandler.java @@ -0,0 +1,310 @@ +package gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine; + +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.IIcon; +import net.minecraft.world.IBlockAccess; + +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Turbine; +import gtPlusPlus.xmod.gregtech.common.blocks.GregtechMetaCasingBlocks4; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; + +public class LargeTurbineTextureHandler { + + /** + * LP Turbines + */ + private static CustomIcon aTex1_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1"); + private static CustomIcon aTex1 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_1"); + private static CustomIcon aTex2_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2"); + private static CustomIcon aTex2 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_2"); + private static CustomIcon aTex3_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3"); + private static CustomIcon aTex3 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_3"); + private static CustomIcon aTex4_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4"); + private static CustomIcon aTex4 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_4"); + private static CustomIcon aTex5_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5"); + private static CustomIcon aTex5 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_5"); + private static CustomIcon aTex6_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6"); + private static CustomIcon aTex6 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_6"); + private static CustomIcon aTex7_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7"); + private static CustomIcon aTex7 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_7"); + private static CustomIcon aTex8_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8"); + private static CustomIcon aTex8 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_8"); + private static CustomIcon aTex9_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9"); + private static CustomIcon aTex9 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_LP_9"); + + private static CustomIcon frontFace_0 = (aTex1); + private static CustomIcon frontFaceActive_0 = (aTex1_Active); + private static CustomIcon frontFace_1 = (aTex2); + private static CustomIcon frontFaceActive_1 = (aTex2_Active); + private static CustomIcon frontFace_2 = (aTex3); + private static CustomIcon frontFaceActive_2 = (aTex3_Active); + private static CustomIcon frontFace_3 = (aTex4); + private static CustomIcon frontFaceActive_3 = (aTex4_Active); + public static CustomIcon frontFace_4 = (aTex5); + public static CustomIcon frontFaceActive_4 = (aTex5_Active); + private static CustomIcon frontFace_5 = (aTex6); + private static CustomIcon frontFaceActive_5 = (aTex6_Active); + private static CustomIcon frontFace_6 = (aTex7); + private static CustomIcon frontFaceActive_6 = (aTex7_Active); + private static CustomIcon frontFace_7 = (aTex8); + private static CustomIcon frontFaceActive_7 = (aTex8_Active); + private static CustomIcon frontFace_8 = (aTex9); + private static CustomIcon frontFaceActive_8 = (aTex9_Active); + + CustomIcon[] OVERLAY_LP_TURBINE = new CustomIcon[]{ + frontFace_0, + frontFace_1, + frontFace_2, + frontFace_3, + frontFace_4, + frontFace_5, + frontFace_6, + frontFace_7, + frontFace_8 + }; + + CustomIcon[] OVERLAY_LP_TURBINE_ACTIVE = new CustomIcon[]{ + frontFaceActive_0, + frontFaceActive_1, + frontFaceActive_2, + frontFaceActive_3, + frontFaceActive_4, + frontFaceActive_5, + frontFaceActive_6, + frontFaceActive_7, + frontFaceActive_8 + }; + + + /** + * HP Turbines + */ + private static CustomIcon aTexHP1_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1"); + private static CustomIcon aTexHP1 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_1"); + private static CustomIcon aTexHP2_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2"); + private static CustomIcon aTexHP2 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_2"); + private static CustomIcon aTexHP3_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3"); + private static CustomIcon aTexHP3 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_3"); + private static CustomIcon aTexHP4_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4"); + private static CustomIcon aTexHP4 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_4"); + private static CustomIcon aTexHP5_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5"); + private static CustomIcon aTexHP5 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_5"); + private static CustomIcon aTexHP6_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6"); + private static CustomIcon aTexHP6 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_6"); + private static CustomIcon aTexHP7_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7"); + private static CustomIcon aTexHP7 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_7"); + private static CustomIcon aTexHP8_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8"); + private static CustomIcon aTexHP8 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_8"); + private static CustomIcon aTexHP9_Active = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9"); + private static CustomIcon aTexHP9 = new CustomIcon("iconsets/BigTurbine/LARGE_TURBINE_HP_9"); + + private static CustomIcon frontFaceHP_0 = (aTexHP1); + private static CustomIcon frontFaceHPActive_0 = (aTexHP1_Active); + private static CustomIcon frontFaceHP_1 = (aTexHP2); + private static CustomIcon frontFaceHPActive_1 = (aTexHP2_Active); + private static CustomIcon frontFaceHP_2 = (aTexHP3); + private static CustomIcon frontFaceHPActive_2 = (aTexHP3_Active); + private static CustomIcon frontFaceHP_3 = (aTexHP4); + private static CustomIcon frontFaceHPActive_3 = (aTexHP4_Active); + public static CustomIcon frontFaceHP_4 = (aTexHP5); + public static CustomIcon frontFaceHPActive_4 = (aTexHP5_Active); + private static CustomIcon frontFaceHP_5 = (aTexHP6); + private static CustomIcon frontFaceHPActive_5 = (aTexHP6_Active); + private static CustomIcon frontFaceHP_6 = (aTexHP7); + private static CustomIcon frontFaceHPActive_6 = (aTexHP7_Active); + private static CustomIcon frontFaceHP_7 = (aTexHP8); + private static CustomIcon frontFaceHPActive_7 = (aTexHP8_Active); + private static CustomIcon frontFaceHP_8 = (aTexHP9); + private static CustomIcon frontFaceHPActive_8 = (aTexHP9_Active); + + CustomIcon[] OVERLAY_HP_TURBINE = new CustomIcon[]{ + frontFaceHP_0, + frontFaceHP_1, + frontFaceHP_2, + frontFaceHP_3, + frontFaceHP_4, + frontFaceHP_5, + frontFaceHP_6, + frontFaceHP_7, + frontFaceHP_8 + }; + + CustomIcon[] OVERLAY_HP_TURBINE_ACTIVE = new CustomIcon[]{ + frontFaceHPActive_0, + frontFaceHPActive_1, + frontFaceHPActive_2, + frontFaceHPActive_3, + frontFaceHPActive_4, + frontFaceHPActive_5, + frontFaceHPActive_6, + frontFaceHPActive_7, + frontFaceHPActive_8 + }; + + + + public IIcon handleCasingsGT(final IBlockAccess aWorld, final int xCoord, final int yCoord, final int zCoord, final int aSide, final GregtechMetaCasingBlocks4 thisBlock) { + final int tMeta = aWorld.getBlockMetadata(xCoord, yCoord, zCoord); + + //7 - shaft + //8 LP + //9 HP + + CustomIcon[] mGetCurrentTextureSet = null, mGetCurrentTextureSet_ACTIVE = null; + + + if (tMeta <= 6 || tMeta >= 10) { + return GregtechMetaCasingBlocks4.getStaticIcon((byte) aSide, (byte) tMeta); + } + else { + if (tMeta == 8) { + mGetCurrentTextureSet = OVERLAY_LP_TURBINE; + mGetCurrentTextureSet_ACTIVE = OVERLAY_LP_TURBINE_ACTIVE; + } + else if (tMeta == 9) { + mGetCurrentTextureSet = OVERLAY_HP_TURBINE; + mGetCurrentTextureSet_ACTIVE = OVERLAY_HP_TURBINE_ACTIVE; + } + if (mGetCurrentTextureSet == null || mGetCurrentTextureSet_ACTIVE == null) { + return GregtechMetaCasingBlocks4.getStaticIcon((byte) aSide, (byte) tMeta); + } + + + + if ((aSide == 2) || (aSide == 3)) { + TileEntity tTileEntity; + IMetaTileEntity tMetaTileEntity; + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[0].getIcon(); + } + return mGetCurrentTextureSet[0].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[3].getIcon(); + } + return mGetCurrentTextureSet[3].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 3 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[6].getIcon(); + } + return mGetCurrentTextureSet[6].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[1].getIcon(); + } + return mGetCurrentTextureSet[1].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[7].getIcon(); + } + return mGetCurrentTextureSet[7].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[8].getIcon(); + } + return mGetCurrentTextureSet[8].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[5].getIcon(); + } + return mGetCurrentTextureSet[5].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord + (aSide == 2 ? 1 : -1), yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[2].getIcon(); + } + return mGetCurrentTextureSet[2].getIcon(); + } + } else if ((aSide == 4) || (aSide == 5)) { + TileEntity tTileEntity; + Object tMetaTileEntity; + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[0].getIcon(); + } + return mGetCurrentTextureSet[0].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[3].getIcon(); + } + return mGetCurrentTextureSet[3].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 4 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[6].getIcon(); + } + return mGetCurrentTextureSet[6].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[1].getIcon(); + } + return mGetCurrentTextureSet[1].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[7].getIcon(); + } + return mGetCurrentTextureSet[7].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord + 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[8].getIcon(); + } + return mGetCurrentTextureSet[8].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[5].getIcon(); + } + return mGetCurrentTextureSet[5].getIcon(); + } + if ((null != (tTileEntity = aWorld.getTileEntity(xCoord, yCoord - 1, zCoord + (aSide == 5 ? 1 : -1)))) && ((tTileEntity instanceof IGregTechTileEntity)) && (((IGregTechTileEntity) tTileEntity).getFrontFacing() == aSide) && (null != (tMetaTileEntity = ((IGregTechTileEntity) tTileEntity).getMetaTileEntity())) && ((tMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine))) { + if (isUsingAnimatedTexture(tTileEntity)) { + return mGetCurrentTextureSet_ACTIVE[2].getIcon(); + } + return mGetCurrentTextureSet[2].getIcon(); + } + } + } + return GregtechMetaCasingBlocks4.getStaticIcon((byte) aSide, (byte) tMeta); + } + + public boolean isUsingAnimatedTexture(TileEntity tTileEntity) { + boolean aVal = true; + /*IGregTechTileEntity aTile; + if (tTileEntity instanceof IGregTechTileEntity) { + aTile = (IGregTechTileEntity) tTileEntity; + if (aTile != null) { + final IMetaTileEntity aMetaTileEntity = aTile.getMetaTileEntity(); + if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine) { + aVal = ((GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity).isControllerActive(); + Logger.INFO("Returning "+aVal+" as Rotor Assembly controller status"); + } + } + } */ + return aVal; + } + + public GT_MetaTileEntity_Hatch_Turbine isTurbineHatch(final IGregTechTileEntity aTileEntity) { + if (aTileEntity != null) { + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity != null && aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine) { + return (GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity; + } + } + return null; + } + +} diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java index e57fbed1f8..c244831f6f 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_SHSteam.java @@ -3,12 +3,8 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.t import java.util.ArrayList; import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gtPlusPlus.core.block.ModBlocks; @@ -33,14 +29,9 @@ public class GT_MTE_LargeTurbine_SHSteam extends GregtechMetaTileEntity_LargerTu super(aName); } - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TI_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_TI5) : Textures.BlockIcons.CASING_BLOCKS[getTAE()]}; - } - public String[] getDescription() { if (mCasingName.toLowerCase().contains(".name")) { - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 7); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 9); } return new String[]{ "Controller Block for the XL High Pressure Steam Turbine", @@ -62,7 +53,7 @@ public class GT_MTE_LargeTurbine_SHSteam extends GregtechMetaTileEntity_LargerTu @Override public Block getCasingBlock() { - return GregTech_API.sBlockCasings4; + return ModBlocks.blockCasings4Misc; } @Override @@ -111,7 +102,7 @@ public class GT_MTE_LargeTurbine_SHSteam extends GregtechMetaTileEntity_LargerTu totalFlow += flow; // track total input used if (!achievement) { try { - GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam"); + GT_Mod.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam"); } catch (Exception e) { } achievement = true; diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java index 27b5f9a774..0d667575c5 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GT_MTE_LargeTurbine_Steam.java @@ -5,13 +5,8 @@ import static gtPlusPlus.core.lib.CORE.RANDOM; import java.util.ArrayList; import gregtech.GT_Mod; -import gregtech.api.GregTech_API; -import gregtech.api.enums.TAE; -import gregtech.api.enums.Textures; -import gregtech.api.interfaces.ITexture; import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; -import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_Utility; import gtPlusPlus.core.block.ModBlocks; @@ -37,14 +32,9 @@ public class GT_MTE_LargeTurbine_Steam extends GregtechMetaTileEntity_LargerTurb super(aName); } - @Override - public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { - return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? aActive ? new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ST_ACTIVE5) : new GT_RenderedTexture(Textures.BlockIcons.LARGETURBINE_ST5) : Textures.BlockIcons.CASING_BLOCKS[getTAE()]}; - } - public String[] getDescription() { if (mCasingName.toLowerCase().contains(".name")) { - mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 7); + mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 8); } return new String[]{ "Controller Block for the XL Steam Turbine", @@ -66,7 +56,7 @@ public class GT_MTE_LargeTurbine_Steam extends GregtechMetaTileEntity_LargerTurb @Override public Block getCasingBlock() { - return GregTech_API.sBlockCasings4; + return ModBlocks.blockCasings4Misc; } @Override @@ -121,7 +111,7 @@ public class GT_MTE_LargeTurbine_Steam extends GregtechMetaTileEntity_LargerTurb remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches totalFlow += flow; // track total input used if (!achievement) { - GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam"); + GT_Mod.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam"); achievement = true; } }else if(fluidName.equals("ic2.fluidSuperheatedSteam")){ diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java index ea27472236..54f16e1944 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/turbines/GregtechMetaTileEntity_LargerTurbineBase.java @@ -4,19 +4,31 @@ import java.util.ArrayList; import gregtech.api.GregTech_API; import gregtech.api.enums.TAE; +import gregtech.api.enums.Textures; import gregtech.api.gui.GT_GUIContainer_MultiMachine; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; import gregtech.api.interfaces.tileentity.IGregTechTileEntity; import gregtech.api.items.GT_MetaGenerated_Tool; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo; import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler; +import gregtech.api.objects.GT_RenderedTexture; import gregtech.api.util.GT_Utility; import gregtech.common.items.GT_MetaGenerated_Tool_01; import gtPlusPlus.api.objects.Logger; +import gtPlusPlus.api.objects.minecraft.BlockPos; import gtPlusPlus.core.block.ModBlocks; +import gtPlusPlus.core.util.Utils; import gtPlusPlus.core.util.minecraft.ItemUtils; +import gtPlusPlus.core.util.minecraft.PlayerUtils; +import gtPlusPlus.core.util.sys.KeyboardUtils; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Turbine; import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon; +import gtPlusPlus.xmod.gregtech.common.blocks.textures.turbine.LargeTurbineTextureHandler; import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -35,16 +47,27 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM private final int mCasingTextureID; public static String mCasingName; + + public ArrayList<GT_MetaTileEntity_Hatch_Turbine> mTurbineRotorHatches = new ArrayList<GT_MetaTileEntity_Hatch_Turbine>(); public GregtechMetaTileEntity_LargerTurbineBase(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, getCasingMeta()); mCasingTextureID = getTAE(); + GT9_5_Active = getCasingMeta() == 8 ? LargeTurbineTextureHandler.frontFaceActive_4 : LargeTurbineTextureHandler.frontFaceHPActive_4; + GT9_5 = getCasingMeta() == 8 ? LargeTurbineTextureHandler.frontFace_4 : LargeTurbineTextureHandler.frontFaceHP_4; + frontFaceActive = new GT_RenderedTexture(GT9_5_Active); + frontFace = new GT_RenderedTexture(GT9_5); + } public GregtechMetaTileEntity_LargerTurbineBase(String aName) { super(aName); mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, getCasingMeta()); mCasingTextureID = getTAE(); + GT9_5_Active = getCasingMeta() == 8 ? LargeTurbineTextureHandler.frontFaceActive_4 : LargeTurbineTextureHandler.frontFaceHPActive_4; + GT9_5 = getCasingMeta() == 8 ? LargeTurbineTextureHandler.frontFace_4 : LargeTurbineTextureHandler.frontFaceHP_4; + frontFaceActive = new GT_RenderedTexture(GT9_5_Active); + frontFace = new GT_RenderedTexture(GT9_5); } public final int getTAE() { @@ -67,23 +90,40 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM @Override public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) { return checkMachine2(aBaseMetaTileEntity, aStack); - } - public boolean checkMachine2(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) { - int depth = 1; //9 high //7x7 + this.mDynamoHatches.clear(); - for (int i=0;i>=-9;i--) { + this.mTurbineRotorHatches.clear(); + this.mMaintenanceHatches.clear(); + this.mMufflerHatches.clear(); + this.mInputHatches.clear(); + this.mOutputHatches.clear(); + + for (int i=0;i>-9;i--) { if (!getLayer(i)) { Logger.INFO("Bad Layer: "+(+i)); return false; } - } - if (mMaintenanceHatches.size() != 1 || mDynamoHatches.size() < 1 || mMufflerHatches.size() < 4) { - Logger.INFO("Bad Hatches"); + } + + Logger.INFO("Hatches | Found "+mTurbineRotorHatches.size()+" Rotor Assemblies, "+12+" are required."); + Logger.INFO("Hatches | Found "+mMaintenanceHatches.size()+" Maint. hatches, "+1+" are required."); + Logger.INFO("Hatches | Found "+mDynamoHatches.size()+" Dynamos, "+1+" or more are required."); + Logger.INFO("Hatches | Found "+mMufflerHatches.size()+" Mufflers, "+4+" are required."); + Logger.INFO("Hatches | Found "+mInputHatches.size()+" Input Hatches, "+1+" or more are required."); + Logger.INFO("Hatches | Found "+mOutputHatches.size()+" Output Hatches, "+1+" ore more are required."); + + if (mTurbineRotorHatches.size() != 12 || + mMaintenanceHatches.size() != 1 || + mDynamoHatches.size() < 1 || + mMufflerHatches.size() != 4 || + mInputHatches.size() < 1 || + mOutputHatches.size() < 1 + ) { return false; } Logger.INFO("Built Structure"); @@ -92,7 +132,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM public boolean getLayer(int aY) { - if (aY == 0 || aY == 2 || aY == 3 || aY == 5 || aY == 6 || aY == 8) { + if (aY == 0 || aY == -2 || aY == -3 || aY == -5 || aY == -6 || aY == -8) { return checkNormalLayer(aY); } else { @@ -107,21 +147,27 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM for (int z = -3; z <= 3; z++) { tBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); tMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); - IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); + IGregTechTileEntity tTileEntity; if (aY == 0 && x == 0 && z == 0) { - Logger.INFO("GOOD 1"); - continue; - } - - else if (tBlock == getCasingBlock() && tMeta == getCasingMeta()) { - Logger.INFO("GOOD 0"); continue; - } else if (this.addToMachineList(tTileEntity, this.mCasingTextureID)) { - Logger.INFO("GOOD 2"); + } + else if ((x == 0 && z == -3) || (x == 0 && z == 3) || (x == 3 && z == 0) || (x == -3 && z == 0) || + ((aY == 0) && (x == 0 && z == -2) || (x == 0 && z == 2) || (x == 2 && z == 0) || (x == -2 && z == 0))) { + tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); + if (this.addToMachineList(tTileEntity, this.mCasingTextureID)) { + Logger.INFO("Added Hatch at offset "+x+", "+aY+", "+z+" | Type: "+tTileEntity.getInventoryName()); + continue; + } + } + else if (isValidCasingBlock(tBlock, tMeta)) { continue; - } else { - Logger.INFO("BAD 1"); + } else { + if (tBlock != null) { + log("Offset: "+x+", "+aY+", "+z); + log("Found "+tBlock.getLocalizedName()+" with Meta "+tMeta); + log("Expected "+getCasingBlock().getLocalizedName()+" with Meta "+getCasingMeta()); + } return false; } } @@ -139,7 +185,8 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM } } - public boolean checkTurbineLayerX(int aY) { + public boolean checkTurbineLayerX(int aY) { + Logger.INFO("checking X"); Block tBlock; int tMeta; for (int x = -3; x <= 3; x++) { @@ -147,14 +194,30 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM tBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); tMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); - if (x == 0 || z == 0) { + if ((x == 0 && z == -3) || (x == 0 && z == 3) || (x == 3 && z == 0) || (x == -3 && z == 0) || + ((aY == 0) && (x == 0 && z == -2) || (x == 0 && z == 2) || (x == 2 && z == 0) || (x == -2 && z == 0))) { IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); if (this.addToMachineList(tTileEntity, this.mCasingTextureID)) { + Logger.INFO("Added Hatch at offset "+x+", "+aY+", "+z+" | Type: "+tTileEntity.getInventoryName()); continue; - } - } + } + } + if (x == -2 || x == 2) { + + //Find Hatches on the ends + if (z == -3 || z == 3) { + IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); + if (this.addTurbineHatch(tTileEntity, this.mCasingTextureID)) { + log("Found x axis Turbine Assembly at Offset: "+x+", "+aY+", "+z); + continue; + } + else { + log("Missing x axis Turbine Assembly at Offset: "+x+", "+aY+", "+z); + } + } + if (isValidTurbineBlock(tBlock, tMeta)) { continue; } @@ -176,6 +239,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM } public boolean checkTurbineLayerZ(int aY) { + Logger.INFO("checking Z"); Block tBlock; int tMeta; for (int x = -3; x <= 3; x++) { @@ -183,14 +247,29 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM tBlock = this.getBaseMetaTileEntity().getBlockOffset(x, aY, z); tMeta = this.getBaseMetaTileEntity().getMetaIDOffset(x, aY, z); - if (x == 0 || z == 0) { + if ((x == 0 && z == -3) || (x == 0 && z == 3) || (x == 3 && z == 0) || (x == -3 && z == 0) || + ((aY == 0) && (x == 0 && z == -2) || (x == 0 && z == 2) || (x == 2 && z == 0) || (x == -2 && z == 0))) { IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); if (this.addToMachineList(tTileEntity, this.mCasingTextureID)) { + Logger.INFO("Added Hatch at offset "+x+", "+aY+", "+z+" | Type: "+tTileEntity.getInventoryName()); continue; - } + } } if (z == -2 || z == 2) { + + //Find Hatches on the ends + if (x == -3 || x == 3) { + IGregTechTileEntity tTileEntity = this.getBaseMetaTileEntity().getIGregTechTileEntityOffset(x, aY, z); + if (this.addTurbineHatch(tTileEntity, this.mCasingTextureID)) { + log("Found z axis Turbine Assembly at Offset: "+x+", "+aY+", "+z); + continue; + } + else { + log("Missing z axis Turbine Assembly at Offset: "+x+", "+aY+", "+z); + } + } + if (isValidTurbineBlock(tBlock, tMeta)) { continue; } @@ -218,7 +297,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM if (Block.isEqualTo(aBlock, getCasingBlock()) && (int) aMeta == (int) getCasingMeta()) { return true; } - Logger.INFO("Found "+(aBlock != null ? aBlock.getLocalizedName() : "Air") + " With Meta "+aMeta+", Expected "+getCasingBlock().getLocalizedName()+" With Meta "+getCasingMeta()); + log("Found "+(aBlock != null ? aBlock.getLocalizedName() : "Air") + " With Meta "+aMeta+", Expected "+getCasingBlock().getLocalizedName()+" With Meta "+getCasingMeta()); return false; } @@ -226,7 +305,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM if (aBlock == getCasingBlock() && aMeta == getCasingMetaTurbine()) { return true; } - Logger.INFO("Found "+(aBlock != null ? aBlock.getLocalizedName() : "Air") + "With Meta "+aMeta); + log("Found "+(aBlock != null ? aBlock.getLocalizedName() : "Air") + " With Meta "+aMeta+", Expected "+getCasingBlock().getLocalizedName()+" With Meta "+getCasingMetaTurbine()); return false; } @@ -243,16 +322,6 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM public abstract byte getCasingTextureIndex(); @Override - public void saveNBTData(NBTTagCompound aNBT) { - super.saveNBTData(aNBT); - } - - @Override - public void loadNBTData(NBTTagCompound aNBT) { - super.loadNBTData(aNBT); - } - - @Override public boolean checkRecipe(ItemStack aStack) { if((counter&7)==0 && (aStack==null || !(aStack.getItem() instanceof GT_MetaGenerated_Tool) || aStack.getItemDamage() < 170 || aStack.getItemDamage() >179)) { stopMachine(); @@ -266,7 +335,7 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM baseEff = GT_Utility.safeInt((long)((5F + ((GT_MetaGenerated_Tool) aStack.getItem()).getToolCombatDamage(aStack)) * 1000F)); optFlow = GT_Utility.safeInt((long)Math.max(Float.MIN_NORMAL, ((GT_MetaGenerated_Tool) aStack.getItem()).getToolStats(aStack).getSpeedMultiplier() - * ((GT_MetaGenerated_Tool) aStack.getItem()).getPrimaryMaterial(aStack).mToolSpeed + * GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mToolSpeed * 50)); if(optFlow<=0 || baseEff<=0){ stopMachine();//in case the turbine got removed @@ -276,6 +345,9 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM counter++; } } + else { + Logger.INFO("Did not find any valid input fluids."); + } int newPower = fluidIntoPower(tFluids, optFlow, baseEff); // How much the turbine should be producing with this flow int difference = newPower - this.mEUt; // difference between current output and new output @@ -287,8 +359,9 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM if (Math.abs(difference) > maxChangeAllowed) { // If this difference is too big, use the maximum allowed change int change = maxChangeAllowed * (difference > 0 ? 1 : -1); // Make the change positive or negative. this.mEUt += change; // Apply the change - } else + } else { this.mEUt = newPower; + } if (this.mEUt <= 0) { //stopMachine(); @@ -404,4 +477,156 @@ public abstract class GregtechMetaTileEntity_LargerTurbineBase extends GregtechM return 16; } + + @Override + public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) { + if (!KeyboardUtils.isShiftKeyDown()) { + super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ); + } + else { + this.mIsAnimated = Utils.invertBoolean(mIsAnimated); + if (this.mIsAnimated) { + PlayerUtils.messagePlayer(aPlayer, "Using Animated Turbine Texture."); + } + else { + PlayerUtils.messagePlayer(aPlayer, "Using Static Turbine Texture."); + } + if (mTurbineRotorHatches.size() > 0) { + for (GT_MetaTileEntity_Hatch_Turbine h : mTurbineRotorHatches) { + if (h != null) { + h.mUsingAnimation = mIsAnimated; + } + } + } + } + } + + @Override + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setBoolean("mIsAnimated", mIsAnimated); + } + + @Override + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + mIsAnimated = aNBT.getBoolean("mIsAnimated"); + } + + private boolean mIsAnimated = true; + public ITexture frontFace; + public ITexture frontFaceActive; + private CustomIcon GT9_5_Active; + private CustomIcon GT9_5; + + public boolean usingAnimations() { + return mIsAnimated; + } + + @Override + public final ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[1][aColorIndex + 1], aFacing == aSide ? getFrontFacingTurbineTexture(aActive) : Textures.BlockIcons.CASING_BLOCKS[getTAE()]}; + } + + protected ITexture getFrontFacingTurbineTexture(boolean isActive) { + if (usingAnimations()) { + if (isActive) { + return frontFaceActive; + } + } + return frontFace; + } + + public boolean addTurbineHatch(final IGregTechTileEntity aTileEntity, + final int aBaseCasingIndex) { + if (aTileEntity == null) { + return false; + } + final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); + if (aMetaTileEntity == null) { + return false; + } + if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Turbine) { + log("Found GT_MetaTileEntity_Hatch_Turbine"); + updateTexture(aTileEntity, aBaseCasingIndex); + GT_MetaTileEntity_Hatch_Turbine aTurbineHatch = (GT_MetaTileEntity_Hatch_Turbine) aMetaTileEntity; + IGregTechTileEntity g = this.getBaseMetaTileEntity(); + if (aTurbineHatch.setController(new BlockPos(g.getXCoord(), g.getYCoord(), g.getZCoord(), g.getWorld()))) { + Logger.INFO("Injected Controller into Turbine Assembly."); + return this.mTurbineRotorHatches.add(aTurbineHatch); + } + else { + Logger.INFO("Failed to inject controller into Turbine Assembly Hatch."); + } + } + return false; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (aBaseMetaTileEntity.isServerSide()) { + if (mUpdate == 0 || this.mStartUpCheck == 0) { + this.mTurbineRotorHatches.clear(); + } + } + if (aTick % 20 == 0 || this.getBaseMetaTileEntity().hasWorkJustBeenEnabled()) { + enableAllTurbineHatches(); + } + + } + @Override + public void startProcess() { + super.startProcess(); + enableAllTurbineHatches(); + } + @Override + public void onMachineBlockUpdate() { + super.onMachineBlockUpdate(); + } + @Override + public boolean onRunningTick(ItemStack aStack) { + return super.onRunningTick(aStack); + } + @Override + public void stopMachine() { + super.stopMachine(); + disableAllTurbineHatches(); + } + @Override + public void onRemoval() { + super.onRemoval(); + for (GT_MetaTileEntity_Hatch_Turbine h : this.mTurbineRotorHatches) { + h.clearController(); + } + disableAllTurbineHatches(); + this.mTurbineRotorHatches.clear(); + } + + public boolean enableAllTurbineHatches() { + return updateTurbineHatches(this.isMachineRunning()) > 0; + } + public boolean disableAllTurbineHatches() { + return updateTurbineHatches(false) > 0; + } + + private Long mLastHatchUpdate; + public int updateTurbineHatches(boolean aState) { + int aUpdated = 0; + if (mLastHatchUpdate == null) { + mLastHatchUpdate = System.currentTimeMillis()/1000; + } + if (this.mTurbineRotorHatches.isEmpty() || ((System.currentTimeMillis()/1000)-mLastHatchUpdate) <= 2) { + return 0; + } + for (GT_MetaTileEntity_Hatch_Turbine h : this.mTurbineRotorHatches) { + h.setActive(aState); + aUpdated++; + } + + mLastHatchUpdate = System.currentTimeMillis()/1000; + return aUpdated; + } + + } diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLargeTurbinesAndHeatExchanger.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLargeTurbinesAndHeatExchanger.java index 6f2e5c2e11..a8e43f8a51 100644 --- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLargeTurbinesAndHeatExchanger.java +++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLargeTurbinesAndHeatExchanger.java @@ -2,6 +2,7 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech; import gtPlusPlus.api.objects.Logger; import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList; +import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Turbine; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines.GT_MTE_LargeTurbine_SHSteam; import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines.GT_MTE_LargeTurbine_Steam; @@ -18,6 +19,7 @@ public class GregtechLargeTurbinesAndHeatExchanger { private static void run1() { GregtechItemList.Large_Steam_Turbine.set(new GT_MTE_LargeTurbine_Steam(865, "multimachine.largerturbine", "XL Turbo Steam Turbine").getStackForm(1L)); GregtechItemList.Large_HPSteam_Turbine.set(new GT_MTE_LargeTurbine_SHSteam(866, "multimachine.largerhpturbine", "XL Turbo HP Steam Turbine").getStackForm(1L)); - + GregtechItemList.Hatch_Turbine_Rotor.set(new GT_MetaTileEntity_Hatch_Turbine(30010, "hatch.turbine", "Rotor Assembly", 8).getStackForm(1L)); + } }
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_1.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_1.png Binary files differnew file mode 100644 index 0000000000..2780ffe2dd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_1.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_2.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_2.png Binary files differnew file mode 100644 index 0000000000..c3ca19138c --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_2.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_3.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_3.png Binary files differnew file mode 100644 index 0000000000..d04b15cd89 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_3.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_4.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_4.png Binary files differnew file mode 100644 index 0000000000..d8ec997508 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_4.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_5.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_5.png Binary files differnew file mode 100644 index 0000000000..3466822e04 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_5.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_6.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_6.png Binary files differnew file mode 100644 index 0000000000..853e88b189 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_6.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_7.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_7.png Binary files differnew file mode 100644 index 0000000000..3979e4ae76 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_7.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_8.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_8.png Binary files differnew file mode 100644 index 0000000000..503022d656 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_8.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_9.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_9.png Binary files differnew file mode 100644 index 0000000000..e1ae9fafb0 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_9.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.png Binary files differnew file mode 100644 index 0000000000..7b14db3bda --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_1.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.png Binary files differnew file mode 100644 index 0000000000..0f2f90201b --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_2.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.png Binary files differnew file mode 100644 index 0000000000..84f6f55c22 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_3.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.png Binary files differnew file mode 100644 index 0000000000..5690b9b72a --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_4.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.png Binary files differnew file mode 100644 index 0000000000..49e957bc1f --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_5.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.png Binary files differnew file mode 100644 index 0000000000..403bd112c7 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_6.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.png Binary files differnew file mode 100644 index 0000000000..2c5541ec6d --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_7.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.png Binary files differnew file mode 100644 index 0000000000..d45103eade --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_8.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.png Binary files differnew file mode 100644 index 0000000000..3712f39fdd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_HP_ACTIVE_9.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_1.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_1.png Binary files differnew file mode 100644 index 0000000000..719aad5646 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_1.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_2.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_2.png Binary files differnew file mode 100644 index 0000000000..855132c0b3 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_2.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_3.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_3.png Binary files differnew file mode 100644 index 0000000000..3354bbe815 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_3.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_4.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_4.png Binary files differnew file mode 100644 index 0000000000..16e4db14ad --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_4.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_5.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_5.png Binary files differnew file mode 100644 index 0000000000..3466822e04 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_5.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_6.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_6.png Binary files differnew file mode 100644 index 0000000000..f332bb77e5 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_6.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_7.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_7.png Binary files differnew file mode 100644 index 0000000000..b6576c39e4 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_7.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_8.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_8.png Binary files differnew file mode 100644 index 0000000000..2c11681fcd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_8.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_9.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_9.png Binary files differnew file mode 100644 index 0000000000..0d3178a481 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_9.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.png Binary files differnew file mode 100644 index 0000000000..1554102eda --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_1.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.png Binary files differnew file mode 100644 index 0000000000..b47579c346 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_2.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.png Binary files differnew file mode 100644 index 0000000000..2d703ee0dd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_3.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.png Binary files differnew file mode 100644 index 0000000000..c4911816f8 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_4.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.png Binary files differnew file mode 100644 index 0000000000..49e957bc1f --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_5.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.png Binary files differnew file mode 100644 index 0000000000..8f5aeb87c0 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_6.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.png Binary files differnew file mode 100644 index 0000000000..3feeb71c81 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_7.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.png Binary files differnew file mode 100644 index 0000000000..fef556c0ff --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_8.png diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.PNG.mcmeta b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.PNG.mcmeta new file mode 100644 index 0000000000..d746756cbd --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.PNG.mcmeta @@ -0,0 +1,3 @@ +{ + "animation":{} +}
\ No newline at end of file diff --git a/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.png b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.png Binary files differnew file mode 100644 index 0000000000..b413175061 --- /dev/null +++ b/src/resources/assets/miscutils/textures/blocks/iconsets/BigTurbine/LARGE_TURBINE_LP_ACTIVE_9.png |