From 1185424fa7c692f9932623b965a99392d969e3c5 Mon Sep 17 00:00:00 2001 From: Shawn Buckley Date: Wed, 21 Oct 2015 20:46:52 -0400 Subject: Move source files --- .../basic/GT_MetaTileEntity_Boxinator.java | 115 +++++++ .../basic/GT_MetaTileEntity_Disassembler.java | 71 ++++ .../basic/GT_MetaTileEntity_Massfabricator.java | 83 +++++ .../basic/GT_MetaTileEntity_MonsterRepellent.java | 79 +++++ .../basic/GT_MetaTileEntity_PotionBrewer.java | 165 +++++++++ .../machines/basic/GT_MetaTileEntity_Printer.java | 71 ++++ .../machines/basic/GT_MetaTileEntity_Pump.java | 380 +++++++++++++++++++++ .../basic/GT_MetaTileEntity_Replicator.java | 125 +++++++ .../basic/GT_MetaTileEntity_RockBreaker.java | 88 +++++ .../machines/basic/GT_MetaTileEntity_Scanner.java | 221 ++++++++++++ .../basic/GT_MetaTileEntity_Teleporter.java | 340 ++++++++++++++++++ 11 files changed, 1738 insertions(+) create mode 100644 src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java create mode 100644 src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java (limited to 'src/main/java/gregtech/common/tileentities/machines/basic') diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java new file mode 100644 index 0000000000..23b9d74fb7 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Boxinator.java @@ -0,0 +1,115 @@ +package gregtech.common.tileentities.machines.basic; + +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +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.objects.GT_RenderedTexture; +import gregtech.api.util.GT_ModHandler; +import gregtech.api.util.GT_Recipe; +import gregtech.api.util.GT_Recipe.GT_Recipe_Map; +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; +import net.minecraft.item.crafting.CraftingManager; + +public class GT_MetaTileEntity_Boxinator + extends GT_MetaTileEntity_BasicMachine +{ + public GT_MetaTileEntity_Boxinator(int aID, String aName, String aNameRegional, int aTier) + { + super(aID, aName, aNameRegional, aTier, 1, "Puts things into Boxes", 2, 1, "Packager.png", "", new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_BOXINATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_BOXINATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_BOXINATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_BOXINATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_BOXINATOR) }); + } + + public GT_MetaTileEntity_Boxinator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) + { + super(aName, aTier, 1, aDescription, aTextures, 2, 1, aGUIName, aNEIName); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) + { + return new GT_MetaTileEntity_Boxinator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + } + + public GT_Recipe.GT_Recipe_Map getRecipeList() + { + return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes; + } + + public int checkRecipe() + { + int tCheck = super.checkRecipe(); + if (tCheck != 0) { + return tCheck; + } + if ((GT_Utility.isStackValid(getInputAt(0))) && (GT_Utility.isStackValid(getInputAt(1))) && (GT_Utility.getContainerItem(getInputAt(0), true) == null)) + { + if ((ItemList.Schematic_1by1.isStackEqual(getInputAt(1))) && (getInputAt(0).stackSize >= 1)) + { + this.mOutputItems[0] = GT_ModHandler.getRecipeOutput(new ItemStack[] { getInputAt(0) }); + if (this.mOutputItems[0] != null) { + if (canOutput(new ItemStack[] { this.mOutputItems[0] })) + { + getInputAt(0).stackSize -= 1; + this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1)); + this.mMaxProgresstime = (16 / (1 << this.mTier - 1)); + return 2; + } + } + return 0; + } + if ((ItemList.Schematic_2by2.isStackEqual(getInputAt(1))) && (getInputAt(0).stackSize >= 4)) + { + this.mOutputItems[0] = GT_ModHandler.getRecipeOutput(new ItemStack[] { getInputAt(0), getInputAt(0), null, getInputAt(0), getInputAt(0) }); + if (this.mOutputItems[0] != null) { + if (canOutput(new ItemStack[] { this.mOutputItems[0] })) + { + getInputAt(0).stackSize -= 4; + this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1)); + this.mMaxProgresstime = (32 / (1 << this.mTier - 1)); + return 2; + } + } + return 0; + } + if ((ItemList.Schematic_3by3.isStackEqual(getInputAt(1))) && (getInputAt(0).stackSize >= 9)) + { + this.mOutputItems[0] = GT_ModHandler.getRecipeOutput(new ItemStack[] { getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0), getInputAt(0) }); + if (this.mOutputItems[0] != null) { + if (canOutput(new ItemStack[] { this.mOutputItems[0] })) + { + getInputAt(0).stackSize -= 9; + this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1)); + this.mMaxProgresstime = (64 / (1 << this.mTier - 1)); + return 2; + } + } + return 0; + } + } + return 0; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) + { + if (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) + { + if ((ItemList.Schematic_1by1.isStackEqual(getInputAt(1))) || (ItemList.Schematic_2by2.isStackEqual(getInputAt(1))) || (ItemList.Schematic_3by3.isStackEqual(getInputAt(1)))) { + if(GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.findRecipe(getBaseMetaTileEntity(), true, gregtech.api.enums.GT_Values.V[this.mTier], null, new ItemStack[] { GT_Utility.copyAmount(64L, new Object[] { aStack }), getInputAt(1) }) != null){return true;} + if(ItemList.Schematic_1by1.isStackEqual(getInputAt(1))&>_ModHandler.getRecipeOutput(new ItemStack[] { aStack })!=null)return true; + if(ItemList.Schematic_2by2.isStackEqual(getInputAt(1))&>_ModHandler.getRecipeOutput(new ItemStack[] { aStack, aStack, null, aStack, aStack })!=null){return true;} + if(ItemList.Schematic_3by3.isStackEqual(getInputAt(1))&&(GT_ModHandler.getRecipeOutput(new ItemStack[] { aStack,aStack,aStack,aStack,aStack,aStack,aStack,aStack,aStack })!=null)){return true;} + }else{return GT_Recipe.GT_Recipe_Map.sBoxinatorRecipes.containsInput(aStack);} + } + return false; + } +} + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + * Qualified Name: gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Boxinator + * JD-Core Version: 0.7.0.1 + */ \ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java new file mode 100644 index 0000000000..1a5d8e1a6d --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Disassembler.java @@ -0,0 +1,71 @@ +package gregtech.common.tileentities.machines.basic; + +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +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.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Utility; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; + +public class GT_MetaTileEntity_Disassembler + extends GT_MetaTileEntity_BasicMachine +{ + public GT_MetaTileEntity_Disassembler(int aID, String aName, String aNameRegional, int aTier) + { + super(aID, aName, aNameRegional, aTier, 1, "Disassembles Machines at " + (50 + 10 * aTier) + "% Efficiency", 1, 9, "Disassembler.png", "", new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_DISASSEMBLER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_DISASSEMBLER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_DISASSEMBLER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_DISASSEMBLER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_DISASSEMBLER) }); + } + + public GT_MetaTileEntity_Disassembler(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) + { + super(aName, aTier, 1, aDescription, aTextures, 1, 9, aGUIName, aNEIName); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) + { + return new GT_MetaTileEntity_Disassembler(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + } + + public int checkRecipe() + { + if ((getInputAt(0) != null) && (isOutputEmpty())) + { + NBTTagCompound tNBT = getInputAt(0).getTagCompound(); + if (tNBT != null) + { + tNBT = tNBT.getCompoundTag("GT.CraftingComponents"); + if (tNBT != null) + { + getInputAt(0).stackSize -= 1; + this.mEUt = (16 * (1 << this.mTier - 1) * (1 << this.mTier - 1)); + this.mMaxProgresstime = 80; + for (int i = 0; i < this.mOutputItems.length; i++) { + if (getBaseMetaTileEntity().getRandomNumber(100) < 50 + 10 * this.mTier) + { + this.mOutputItems[i] = GT_Utility.loadItem(tNBT, "Ingredient." + i); + if (this.mOutputItems[i] != null) { + this.mMaxProgresstime *= 1.7; + } + } + } + return 2; + } + } + } + return 0; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) + { + return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (aStack.getTagCompound() != null) && (aStack.getTagCompound().getCompoundTag("GT.CraftingComponents") != null); + } +} + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + * Qualified Name: gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Disassembler + * JD-Core Version: 0.7.0.1 + */ \ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java new file mode 100644 index 0000000000..07337cd305 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Massfabricator.java @@ -0,0 +1,83 @@ +package gregtech.common.tileentities.machines.basic; + +import gregtech.api.enums.ConfigCategories; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +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.objects.GT_RenderedTexture; +import gregtech.api.util.GT_Config; +import net.minecraftforge.fluids.FluidStack; + +public class GT_MetaTileEntity_Massfabricator + extends GT_MetaTileEntity_BasicMachine +{ + public static int sUUAperUUM = 1; + public static int sUUASpeedBonus = 4; + public static int sDurationMultiplier = 3215; + public static boolean sRequiresUUA = false; + + public GT_MetaTileEntity_Massfabricator(int aID, String aName, String aNameRegional, int aTier) + { + super(aID, aName, aNameRegional, aTier, 1, "UUM = Matter * Fabrication Squared", 1, 1, "Massfabricator.png", "", new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_MASSFAB), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_MASSFAB), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_MASSFAB_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_MASSFAB), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_MASSFAB) }); + } + + public GT_MetaTileEntity_Massfabricator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) + { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) + { + return new GT_MetaTileEntity_Massfabricator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + } + + public void onConfigLoad(GT_Config aConfig) + { + super.onConfigLoad(aConfig); + sDurationMultiplier = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUM_Duration_Multiplier", sDurationMultiplier); + sUUAperUUM = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_per_UUM", sUUAperUUM); + sUUASpeedBonus = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_Speed_Bonus", sUUASpeedBonus); + sRequiresUUA = aConfig.get(ConfigCategories.machineconfig, "Massfabricator.UUA_Requirement", sRequiresUUA); + Materials.UUAmplifier.mChemicalFormula = ("Mass Fabricator Eff/Speed Bonus: x" + sUUASpeedBonus); + } + + public int checkRecipe() + { + FluidStack tFluid = getDrainableStack(); + if ((tFluid == null) || (tFluid.amount < getCapacity())) + { + this.mOutputFluid = Materials.UUMatter.getFluid(1L); + this.mEUt = ((int)gregtech.api.enums.GT_Values.V[this.mTier]); + this.mMaxProgresstime = (sDurationMultiplier / (1 << this.mTier - 1)); + if (((tFluid = getFillableStack()) != null) && (tFluid.amount >= sUUAperUUM) && (tFluid.isFluidEqual(Materials.UUAmplifier.getFluid(1L)))) + { + tFluid.amount -= sUUAperUUM; + this.mMaxProgresstime /= sUUASpeedBonus; + return 2; + } + return (sRequiresUUA) || (ItemList.Circuit_Integrated.isStackEqual(getInputAt(0), true, true)) ? 1 : 2; + } + return 0; + } + + public boolean isFluidInputAllowed(FluidStack aFluid) + { + return aFluid.isFluidEqual(Materials.UUAmplifier.getFluid(1L)); + } + + public int getCapacity() + { + return Math.max(sUUAperUUM, 1000); + } +} + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + * Qualified Name: gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Massfabricator + * JD-Core Version: 0.7.0.1 + */ \ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java new file mode 100644 index 0000000000..871835020d --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MonsterRepellent.java @@ -0,0 +1,79 @@ +package gregtech.common.tileentities.machines.basic; + +import static gregtech.api.enums.GT_Values.V; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.eventhandler.Event; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.event.entity.living.LivingSpawnEvent; +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.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock; +import gregtech.api.objects.GT_RenderedTexture; +import gregtech.api.util.GT_SpawnEventHandler; + +public class GT_MetaTileEntity_MonsterRepellent extends GT_MetaTileEntity_TieredMachineBlock { + + public int mRange = 16; + + public GT_MetaTileEntity_MonsterRepellent(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 0, "Reprells nasty Creatures. Range: "+(4 + (12*aTier))+" unpowered / "+(16 + (48*aTier))+" powered"); + } + + public GT_MetaTileEntity_MonsterRepellent(String aName, int aTier, int aInvSlotCount, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, aInvSlotCount, aDescription, aTextures); + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_MonsterRepellent(this.mName, this.mTier, this.mInventory.length, this.mDescription, this.mTextures); + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1], (aSide != 1) ? null : aActive ? new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER_ACTIVE) : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TELEPORTER) }; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) { + if (aBaseMetaTileEntity.isAllowedToWork() && aBaseMetaTileEntity.isServerSide()) { + int[] tCoords = new int[]{aBaseMetaTileEntity.getXCoord(),aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord(),aBaseMetaTileEntity.getWorld().provider.dimensionId}; + if((aTimer%600 == 0)&&!GT_SpawnEventHandler.mobReps.contains(tCoords)){ + GT_SpawnEventHandler.mobReps.add(tCoords); + } + if(aBaseMetaTileEntity.isUniversalEnergyStored(getMinimumStoredEU()) && aBaseMetaTileEntity.decreaseStoredEnergyUnits(1 << (this.mTier*2), false)){ + mRange = 16 + (48*mTier); + }else{ + mRange = 4 + (12*mTier); + }} + } + + @Override + public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) { + int[] tCoords = new int[]{aBaseMetaTileEntity.getXCoord(),aBaseMetaTileEntity.getYCoord(),aBaseMetaTileEntity.getZCoord(),aBaseMetaTileEntity.getWorld().provider.dimensionId}; + GT_SpawnEventHandler.mobReps.add(tCoords); + } + + @Override + public void onRemoval() { + int[] tCoords = new int[]{this.getBaseMetaTileEntity().getXCoord(),this.getBaseMetaTileEntity().getYCoord(),this.getBaseMetaTileEntity().getZCoord(),this.getBaseMetaTileEntity().getWorld().provider.dimensionId}; + GT_SpawnEventHandler.mobReps.remove(tCoords); + } + @Override public boolean isSimpleMachine() {return false;} + @Override public boolean isFacingValid(byte aFacing) {return true;} + @Override public boolean isEnetInput() {return true;} + @Override public boolean isInputFacing(byte aSide) {return true;} + @Override public boolean isTeleporterCompatible() {return false;} + @Override public long getMinimumStoredEU() {return 512;} + @Override public long maxEUStore() {return 512+V[mTier]*50;} + @Override public long maxEUInput() {return V[mTier];} + @Override public long maxAmperesIn() {return 2;} + @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 ITexture[][][] getTextureSet(ITexture[] aTextures) {return null;} + @Override public void saveNBTData(NBTTagCompound aNBT) {} + @Override public void loadNBTData(NBTTagCompound aNBT) {} + } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java new file mode 100644 index 0000000000..5064b50cb5 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_PotionBrewer.java @@ -0,0 +1,165 @@ +package gregtech.common.tileentities.machines.basic; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +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.objects.GT_RenderedTexture; +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 net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.Fluid; +import net.minecraftforge.fluids.FluidRegistry; +import net.minecraftforge.fluids.FluidStack; + +public class GT_MetaTileEntity_PotionBrewer + extends GT_MetaTileEntity_BasicMachine +{ + public GT_MetaTileEntity_PotionBrewer(int aID, String aName, String aNameRegional, int aTier) + { + super(aID, aName, aNameRegional, aTier, 1, "Brewing your Drinks", 1, 0, "PotionBrewer.png", "", new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_POTIONBREWER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_POTIONBREWER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_POTIONBREWER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_POTIONBREWER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_POTIONBREWER) }); + } + + public GT_MetaTileEntity_PotionBrewer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) + { + super(aName, aTier, 1, aDescription, aTextures, 1, 0, aGUIName, aNEIName); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) + { + return new GT_MetaTileEntity_PotionBrewer(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + } + + public GT_Recipe.GT_Recipe_Map getRecipeList() + { + return GT_Recipe.GT_Recipe_Map.sBrewingRecipes; + } + + public int checkRecipe() + { + int tCheck = super.checkRecipe(); + if (tCheck != 0) { + return tCheck; + } + FluidStack aFluid = getFillableStack(); + if ((getDrainableStack() == null) && (aFluid != null) && (getInputAt(0) != null)) + { + String tInputName = aFluid.getFluid().getName(); + if (tInputName.startsWith("potion.")) + { + tInputName = tInputName.replaceFirst("potion.", ""); + int tFirstDot = tInputName.indexOf('.') + 1; + String tModifier = tFirstDot <= 0 ? "" : tInputName.substring(tFirstDot); + if (!tModifier.isEmpty()) { + tInputName = tInputName.replaceFirst("." + tModifier, ""); + } + if (GT_Utility.areStacksEqual(new ItemStack(Items.fermented_spider_eye, 1, 0), getInputAt(0))) + { + if (tInputName.equals("poison")) { + return setOutput("potion.damage" + tModifier); + } + if (tInputName.equals("health")) { + return setOutput("potion.damage" + tModifier); + } + if (tInputName.equals("waterbreathing")) { + return setOutput("potion.damage" + tModifier); + } + if (tInputName.equals("nightvision")) { + return setOutput("potion.invisibility" + tModifier); + } + if (tInputName.equals("fireresistance")) { + return setOutput("potion.slowness" + tModifier); + } + if (tInputName.equals("speed")) { + return setOutput("potion.slowness" + tModifier); + } + if (tInputName.equals("strength")) { + return setOutput("potion.weakness" + tModifier); + } + if (tInputName.equals("regen")) { + return setOutput("potion.poison" + tModifier); + } + return setOutput("potion.weakness"); + } + if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glowstone, 1L), getInputAt(0))) + { + if (!tModifier.startsWith("strong")) { + return setOutput("potion." + tInputName + ".strong" + (tModifier.isEmpty() ? "" : new StringBuilder().append(".").append(tModifier).toString())); + } + if (tModifier.startsWith("long")) { + return setOutput("potion." + tInputName + tModifier.replaceFirst("long", "")); + } + return setOutput("potion.thick"); + } + if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L), getInputAt(0))) + { + if (!tModifier.startsWith("long")) { + return setOutput("potion." + tInputName + ".long" + (tModifier.isEmpty() ? "" : new StringBuilder().append(".").append(tModifier).toString())); + } + if (tModifier.startsWith("strong")) { + return setOutput("potion." + tInputName + tModifier.replaceFirst("strong", "")); + } + return setOutput("potion.mundane"); + } + if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Gunpowder, 1L), getInputAt(0))) + { + if (!tInputName.endsWith(".splash")) { + return setOutput("potion." + tInputName + ".splash"); + } + return setOutput("potion.mundane"); + } + } + } + return 0; + } + + private final int setOutput(String aFluidName) + { + this.mOutputFluid = FluidRegistry.getFluidStack(aFluidName, 750); + if (this.mOutputFluid == null) + { + this.mOutputFluid = FluidRegistry.getFluidStack("potion.mundane", getFillableStack().amount); + getInputAt(0).stackSize -= 1; + getFillableStack().amount = 0; + this.mEUt = (4 * (1 << this.mTier - 1) * (1 << this.mTier - 1)); + this.mMaxProgresstime = (128 / (1 << this.mTier - 1)); + return 2; + } + if (getFillableStack().amount < 750) { + return 0; + } + getInputAt(0).stackSize -= 1; + getFillableStack().amount -= 750; + this.mEUt = (4 * (1 << this.mTier - 1) * (1 << this.mTier - 1)); + this.mMaxProgresstime = (128 / (1 << this.mTier - 1)); + return 2; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) + { + return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); + } + + public boolean isFluidInputAllowed(FluidStack aFluid) + { + return (aFluid.getFluid().getName().startsWith("potion.")) || (super.isFluidInputAllowed(aFluid)); + } + + public int getCapacity() + { + return 750; + } +} + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + * Qualified Name: gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_PotionBrewer + * JD-Core Version: 0.7.0.1 + */ \ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java new file mode 100644 index 0000000000..bf10c5143e --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Printer.java @@ -0,0 +1,71 @@ +package gregtech.common.tileentities.machines.basic; + +import gregtech.api.enums.OrePrefixes; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine; +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 java.util.ArrayList; + +import net.minecraft.item.ItemStack; + +public class GT_MetaTileEntity_Printer + extends GT_MetaTileEntity_BasicMachine +{ + public GT_MetaTileEntity_Printer(int aID, String aName, String aNameRegional, int aTier) + { + super(aID, aName, aNameRegional, aTier, 1, "It can copy Books and paint Stuff", 1, 1, "Printer.png", GT_Recipe.GT_Recipe_Map.sPrinterRecipes.mNEIName, new ITexture[0]); + } + + public GT_MetaTileEntity_Printer(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) + { + super(aName, aTier, 1, aDescription, aTextures, 2, 2, aGUIName, aNEIName); + } + + public int checkRecipe() + { + if (getOutputAt(0) != null) + { + this.mOutputBlocked += 1; + } + else if ((GT_Utility.isStackValid(getInputAt(0))) && (getInputAt(0).stackSize > 0) && + (GT_Utility.isStackInvalid(getSpecialSlot())) && + (OrePrefixes.block.contains(getInputAt(0)))) + { + ArrayList tList = GT_OreDictUnificator.getOres(GT_OreDictUnificator.getAssociation(getInputAt(0))); + if (tList.size() > 1) + { + tList.add(tList.get(0)); + int i = 0; + for (int j = tList.size() - 1; i < j; i++) { + if (GT_Utility.areStacksEqual(getInputAt(0), (ItemStack)tList.get(i))) + { + this.mOutputItems[0] = GT_Utility.copyAmount(1L, new Object[] { tList.get(i + 1) }); + this.mEUt = (1 * (1 << this.mTier - 1) * (1 << this.mTier - 1)); + this.mMaxProgresstime = (32 / (1 << this.mTier - 1)); + getInputAt(0).stackSize -= 1; + return 2; + } + } + } + } + this.mMaxProgresstime = 0; + return 0; + } + + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) + { + return null; + } +} + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + * Qualified Name: gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Printer + * JD-Core Version: 0.7.0.1 + */ \ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java new file mode 100644 index 0000000000..40020ef435 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java @@ -0,0 +1,380 @@ +package gregtech.common.tileentities.machines.basic; + +import static gregtech.api.enums.GT_Values.V; + +import java.util.ArrayList; +import java.util.Iterator; + +import net.minecraft.block.Block; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.world.ChunkPosition; +import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.IFluidBlock; +import gregtech.api.enums.Textures; +import gregtech.api.gui.GT_Container_BasicTank; +import gregtech.api.gui.GT_GUIContainer_BasicTank; +import gregtech.api.interfaces.ITexture; +import gregtech.api.interfaces.metatileentity.IMetaTileEntity; +import gregtech.api.interfaces.tileentity.IGregTechTileEntity; +import gregtech.api.metatileentity.BaseTileEntity; +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; + +public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { + + public ArrayList mPumpList = new ArrayList(); + public int mPumpTimer = 0; + public int mPumpCountBelow = 0; + public Block mPumpedBlock1 = null; + public Block mPumpedBlock2 = null; + + public GT_MetaTileEntity_Pump(int aID, String aName, String aNameRegional, int aTier) { + super(aID, aName, aNameRegional, aTier, 3, "The best way of emptying Oceans!"); + } + + public GT_MetaTileEntity_Pump(String aName, int aTier, String aDescription, ITexture[][][] aTextures) { + super(aName, aTier, 3, aDescription,aTextures); + } + + @Override + public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) { + return new GT_MetaTileEntity_Pump(this.mName, this.mTier, this.mDescription, this.mTextures); + } + + public void saveNBTData(NBTTagCompound aNBT) { + super.saveNBTData(aNBT); + aNBT.setString("mPumpedBlock1", this.mPumpedBlock1 == null ? "" : this.mPumpedBlock1.getUnlocalizedName()); + aNBT.setString("mPumpedBlock2", this.mPumpedBlock2 == null ? "" : this.mPumpedBlock2.getUnlocalizedName()); + } + + public void loadNBTData(NBTTagCompound aNBT) { + super.loadNBTData(aNBT); + this.mPumpedBlock1 = Block.getBlockFromName(aNBT.getString("mPumpedBlock1")); + this.mPumpedBlock2 = Block.getBlockFromName(aNBT.getString("mPumpedBlock2")); + } + + @Override + public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_Container_BasicTank(aPlayerInventory, aBaseMetaTileEntity); + } + + @Override + public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) { + return new GT_GUIContainer_BasicTank(aPlayerInventory, aBaseMetaTileEntity, getLocalName()); + } + @Override + public boolean doesFillContainers() { + return true; + } + @Override + public boolean doesEmptyContainers() { + return false; + } + @Override + public boolean canTankBeFilled() { + return false; + } + @Override + public boolean canTankBeEmptied() { + return true; + } + @Override + public boolean displaysItemStack() { + return true; + } + @Override + public boolean displaysStackSize() { + return false; + } + + @Override + public boolean isFluidInputAllowed(FluidStack aFluid) { + return false; + } + + @Override + public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { + super.onPostTick(aBaseMetaTileEntity, aTick); + if (getBaseMetaTileEntity().isServerSide()) { + this.mPumpTimer -= 1; + if ((getBaseMetaTileEntity() instanceof BaseTileEntity)) { + ((BaseTileEntity) getBaseMetaTileEntity()).ignoreUnloadedChunks = false; + } + this.doTickProfilingInThisTick = true; + this.mPumpCountBelow = 0; + IGregTechTileEntity tTileEntity; + for (int i = 1; (i < 21) && ((tTileEntity = getBaseMetaTileEntity().getIGregTechTileEntityAtSideAndDistance((byte) 0, i)) != null) + && (tTileEntity.getMetaTileEntity() != null) && ((tTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Pump)); i++) { + getBaseMetaTileEntity().setActive(tTileEntity.isActive()); + this.mPumpCountBelow += 1; + ((GT_MetaTileEntity_Pump) tTileEntity.getMetaTileEntity()).mPumpTimer -= 1; + } + if (this.mPumpCountBelow <= 0) { + if ((getBaseMetaTileEntity().isAllowedToWork()) && (getBaseMetaTileEntity().isUniversalEnergyStored(16*((int)Math.pow(4, this.mTier)))) + && ((this.mFluid == null) || (this.mFluid.amount + 1000 <= getCapacity()))) { + boolean tMovedOneDown = false; + if ((this.mPumpList.isEmpty()) && (getBaseMetaTileEntity().getTimer() % 100L == 0L)) { + tMovedOneDown = moveOneDown(); + } + if ((GT_Utility.isBlockInvalid(this.mPumpedBlock1)) || (GT_Utility.isBlockInvalid(this.mPumpedBlock2))) { + getFluidAt(getBaseMetaTileEntity().getXCoord(), getYOfPumpHead() - 1, getBaseMetaTileEntity().getZCoord()); + if ((GT_Utility.isBlockInvalid(this.mPumpedBlock1)) || (GT_Utility.isBlockInvalid(this.mPumpedBlock2))) { + getFluidAt(getBaseMetaTileEntity().getXCoord(), getYOfPumpHead(), getBaseMetaTileEntity().getZCoord() + 1); + } + if ((GT_Utility.isBlockInvalid(this.mPumpedBlock1)) || (GT_Utility.isBlockInvalid(this.mPumpedBlock2))) { + getFluidAt(getBaseMetaTileEntity().getXCoord(), getYOfPumpHead(), getBaseMetaTileEntity().getZCoord() - 1); + } + if ((GT_Utility.isBlockInvalid(this.mPumpedBlock1)) || (GT_Utility.isBlockInvalid(this.mPumpedBlock2))) { + getFluidAt(getBaseMetaTileEntity().getXCoord() + 1, getYOfPumpHead(), getBaseMetaTileEntity().getZCoord()); + } + if ((GT_Utility.isBlockInvalid(this.mPumpedBlock1)) || (GT_Utility.isBlockInvalid(this.mPumpedBlock2))) { + getFluidAt(getBaseMetaTileEntity().getXCoord() - 1, getYOfPumpHead(), getBaseMetaTileEntity().getZCoord()); + } + } else if (getYOfPumpHead() < getBaseMetaTileEntity().getYCoord()) { + if ((tMovedOneDown) || ((this.mPumpList.isEmpty()) && (getBaseMetaTileEntity().getTimer() % 200L == 100L)) || (getBaseMetaTileEntity().getTimer() % 72000L == 100L)) { + this.mPumpList.clear(); + int y = getBaseMetaTileEntity().getYCoord() - 1; + for (int yHead = getYOfPumpHead(); (this.mPumpList.isEmpty()) && (y >= yHead); y--) { + scanForFluid(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord(), this.mPumpList, getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord(), 10*((int)Math.pow(1.6, this.mTier))); + } + } + if ((!tMovedOneDown) && (this.mPumpTimer <= 0)) { + while ((!this.mPumpList.isEmpty()) + && (!consumeFluid(((ChunkPosition) this.mPumpList.get(this.mPumpList.size() - 1)).chunkPosX, + ((ChunkPosition) this.mPumpList.get(this.mPumpList.size() - 1)).chunkPosY, + ((ChunkPosition) this.mPumpList.remove(this.mPumpList.size() - 1)).chunkPosZ))) { + } + this.mPumpTimer = 160/((int)Math.pow(2, this.mTier)); + } + } + } + getBaseMetaTileEntity().setActive(!this.mPumpList.isEmpty()); + } + } + } + + private boolean moveOneDown() { + if ((this.mInventory[0] == null) || (this.mInventory[0].stackSize < 1) + || (!GT_Utility.areStacksEqual(this.mInventory[0], GT_ModHandler.getIC2Item("miningPipe", 1L)))) { + return false; + } + int yHead = getYOfPumpHead(); + if (yHead <= 0) { + return false; + } + if ((!consumeFluid(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord()))&& (!getBaseMetaTileEntity().getAir(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord()))) { + + return false; + } + if (!(getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord(),GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))))) { + return false; + } + if (yHead != getBaseMetaTileEntity().getYCoord()) { + getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord(), yHead, getBaseMetaTileEntity().getZCoord(),GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L))); + } + getBaseMetaTileEntity().decrStackSize(0, 1); + return true; + } + + private int getYOfPumpHead() { + int y = getBaseMetaTileEntity().getYCoord() - 1; + while (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord()) == GT_Utility + .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L))) { + y--; + } + if (y == getBaseMetaTileEntity().getYCoord() - 1) { + if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord()) != GT_Utility + .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))) { + return y + 1; + } + } else if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord()) != GT_Utility + .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))&&this.mInventory[0] != null&&this.mInventory[0].stackSize>0&>_Utility.areStacksEqual(this.mInventory[0], GT_ModHandler.getIC2Item("miningPipe", 1L))) { + getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord(), + GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))); + getBaseMetaTileEntity().decrStackSize(0, 1); + + } + return y; + } + + private void scanForFluid(int aX, int aY, int aZ, ArrayList aList, int mX, int mZ, int mDist) { + doTickProfilingInThisTick = false; + ArrayList tList1 = new ArrayList(); + ArrayList tList2 = new ArrayList(); + tList1.add(new ChunkPosition(aX, aY, aZ)); + while(!tList1.isEmpty()) + { + Iterator i$ = tList1.iterator(); + do + { + if(!i$.hasNext()) + break; + ChunkPosition tPos = (ChunkPosition)i$.next(); + if(tPos.chunkPosX < mX + mDist) + addToFirstListIfFluidAndNotAlreadyAddedToAnyOfTheLists(tPos.chunkPosX + 1, tPos.chunkPosY, tPos.chunkPosZ, tList2, aList); + if(tPos.chunkPosX > mX - mDist) + addToFirstListIfFluidAndNotAlreadyAddedToAnyOfTheLists(tPos.chunkPosX - 1, tPos.chunkPosY, tPos.chunkPosZ, tList2, aList); + if(tPos.chunkPosZ < mZ + mDist) + addToFirstListIfFluidAndNotAlreadyAddedToAnyOfTheLists(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ + 1, tList2, aList); + if(tPos.chunkPosZ > mZ - mDist) + addToFirstListIfFluidAndNotAlreadyAddedToAnyOfTheLists(tPos.chunkPosX, tPos.chunkPosY, tPos.chunkPosZ - 1, tList2, aList); + addToFirstListIfFluidAndNotAlreadyAddedToAnyOfTheLists(tPos.chunkPosX, tPos.chunkPosY + 1, tPos.chunkPosZ, tList2, aList); + ChunkPosition tCoordinate = new ChunkPosition(aX, aY + 1, aZ); + if(tPos.chunkPosX == mX && tPos.chunkPosZ == mZ && tPos.chunkPosY < getBaseMetaTileEntity().getYCoord() && !aList.contains(tCoordinate) && !tList2.contains(tCoordinate)) + tList2.add(tCoordinate); + } while(true); + aList.addAll(tList2); + tList1 = tList2; + tList2 = new ArrayList(); + } + for(int y = getBaseMetaTileEntity().getYCoord(); y >= aY; y--) + aList.remove(new ChunkPosition(aX, y, aZ)); + } + + private boolean addToFirstListIfFluidAndNotAlreadyAddedToAnyOfTheLists(int aX, int aY, int aZ, ArrayList aList1, + ArrayList aList2) { + ChunkPosition tCoordinate = new ChunkPosition(aX, aY, aZ); + if ((!aList1.contains(tCoordinate)) && (!aList2.contains(tCoordinate))) { + Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ); + if ((this.mPumpedBlock1 == aBlock) || (this.mPumpedBlock2 == aBlock)) { + aList1.add(tCoordinate); + return true; + } + } + return false; + } + + private void getFluidAt(int aX, int aY, int aZ) { + Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ); + if (GT_Utility.isBlockValid(aBlock)) { + if ((aBlock == Blocks.water) || (aBlock == Blocks.flowing_water)) { + this.mPumpedBlock1 = Blocks.water; + this.mPumpedBlock2 = Blocks.flowing_water; + return; + } + if ((aBlock == Blocks.lava) || (aBlock == Blocks.flowing_lava)) { + this.mPumpedBlock1 = Blocks.lava; + this.mPumpedBlock2 = Blocks.flowing_lava; + return; + } + if ((aBlock instanceof IFluidBlock)) { + this.mPumpedBlock1 = aBlock; + this.mPumpedBlock2 = aBlock; + return; + } + } + this.mPumpedBlock1 = null; + this.mPumpedBlock2 = null; + } + + private boolean consumeFluid(int aX, int aY, int aZ) { + Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ); + int aMeta = getBaseMetaTileEntity().getMetaID(aX, aY, aZ); + if ((GT_Utility.isBlockValid(aBlock)) && ((this.mPumpedBlock1 == aBlock) || (this.mPumpedBlock2 == aBlock))) { + if ((aBlock == Blocks.water) || (aBlock == Blocks.flowing_water)) { + if (aMeta == 0) { + if (this.mFluid == null) { + getBaseMetaTileEntity().decreaseStoredEnergyUnits(16*((int)Math.pow(4, this.mTier)), true); + this.mFluid = GT_ModHandler.getWater(1000L); + } else if (GT_ModHandler.isWater(this.mFluid)) { + getBaseMetaTileEntity().decreaseStoredEnergyUnits(16*((int)Math.pow(4, this.mTier)), true); + this.mFluid.amount += 1000; + } else { + return false; + } + } else { + getBaseMetaTileEntity().decreaseStoredEnergyUnits(4*((int)Math.pow(4, this.mTier)), true); + } + } + if ((aBlock == Blocks.lava) || (aBlock == Blocks.flowing_lava)) { + if (aMeta == 0) { + if (this.mFluid == null) { + getBaseMetaTileEntity().decreaseStoredEnergyUnits(16*((int)Math.pow(4, this.mTier)), true); + this.mFluid = GT_ModHandler.getLava(1000L); + } else if (GT_ModHandler.isLava(this.mFluid)) { + getBaseMetaTileEntity().decreaseStoredEnergyUnits(16*((int)Math.pow(4, this.mTier)), true); + this.mFluid.amount += 1000; + } else { + return false; + } + } else { + getBaseMetaTileEntity().decreaseStoredEnergyUnits(4*((int)Math.pow(4, this.mTier)), true); + } + } + if ((aBlock instanceof IFluidBlock)) { + if (this.mFluid == null) { + this.mFluid = ((IFluidBlock) aBlock).drain(getBaseMetaTileEntity().getWorld(), aX, aY, aZ, true); + getBaseMetaTileEntity().decreaseStoredEnergyUnits(this.mFluid == null ? 1000 : this.mFluid.amount, true); + }else if(this.mFluid.isFluidEqual(((IFluidBlock) aBlock).drain(getBaseMetaTileEntity().getWorld(), aX, aY, aZ, false))){ + this.getBaseMetaTileEntity().getWorld().setBlockToAir( aX, aY, aZ); + this.mFluid.amount += 1000; + getBaseMetaTileEntity().decreaseStoredEnergyUnits(16*((int)Math.pow(4, this.mTier)), true); + }else { + return false; + } + } + getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ,Blocks.air,0,2); + return true; + } + return false; + } + + @Override + public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) { + if (aBaseMetaTileEntity.isClientSide()) return true; + aBaseMetaTileEntity.openGUI(aPlayer); + return true; + } + + + @Override public boolean isSimpleMachine() {return false;} + @Override public boolean isOverclockerUpgradable() {return false;} + @Override public boolean isTransformerUpgradable() {return false;} + @Override public boolean isElectric() {return true;} + @Override public boolean isFacingValid(byte aFacing) {return true;} + @Override public boolean isEnetInput() {return true;} + @Override public boolean isInputFacing(byte aSide) {return true;} + @Override public boolean isOutputFacing(byte aSide) {return false;} + @Override public boolean isTeleporterCompatible() {return false;} + @Override public long getMinimumStoredEU() {return V[mTier]*16;} + @Override public long maxEUStore() {return V[mTier]*64;} + @Override public long maxEUInput() {return V[mTier];} + @Override public long maxSteamStore() {return maxEUStore();} + @Override public long maxAmperesIn() {return 2;} + @Override public int getStackDisplaySlot() {return 2;} + @Override public boolean isAccessAllowed(EntityPlayer aPlayer) {return true;} + + + @Override + public int getCapacity() { + return 16000*this.mTier; + } + @Override + public int getTankPressure() { + return 100; + } + + @Override + public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) { + return new ITexture[] {Textures.BlockIcons.MACHINE_CASINGS[mTier][aColorIndex+1], (aSide == 0||aSide ==1) ? null : new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP) }; + } + + @Override + public ITexture[] getTexturesActive(ITexture aBaseTexture) { + return getTexturesInactive(aBaseTexture); + } + + @Override + public ITexture[] getTexturesInactive(ITexture aBaseTexture) { + return new ITexture[] { + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP),new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), + new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP),new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP),}; + } +} diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java new file mode 100644 index 0000000000..d81103fbc5 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java @@ -0,0 +1,125 @@ +package gregtech.common.tileentities.machines.basic; + +import gregtech.api.GregTech_API; +import gregtech.api.enums.Element; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +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.objects.GT_RenderedTexture; +import gregtech.api.util.GT_OreDictUnificator; +import gregtech.api.util.GT_Utility; +import gregtech.common.items.behaviors.Behaviour_DataOrb; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; + +public class GT_MetaTileEntity_Replicator + extends GT_MetaTileEntity_BasicMachine +{ + private static int sHeaviestElementMass = 0; + + public GT_MetaTileEntity_Replicator(int aID, String aName, String aNameRegional, int aTier) + { + super(aID, aName, aNameRegional, aTier, 1, "Producing Elemental Matter", 1, 1, "Replicator.png", "", new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_REPLICATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_REPLICATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_REPLICATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_REPLICATOR), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_REPLICATOR_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_REPLICATOR) }); + } + + public GT_MetaTileEntity_Replicator(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) + { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) + { + return new GT_MetaTileEntity_Replicator(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + } + + public int checkRecipe() + { + FluidStack tFluid = getFillableStack(); + if ((tFluid != null) && (tFluid.isFluidEqual(Materials.UUMatter.getFluid(1L)))) + { + ItemStack tDataOrb = getSpecialSlot(); + if ((ItemList.Tool_DataOrb.isStackEqual(tDataOrb, false, true)) && (Behaviour_DataOrb.getDataTitle(tDataOrb).equals("Elemental-Scan"))) + { + Materials tMaterial = (Materials)Element.get(Behaviour_DataOrb.getDataName(tDataOrb)).mLinkedMaterials.get(0); + long tMass = tMaterial.getMass(); + if ((tFluid.amount >= tMass) && (tMass > 0L)) + { + this.mEUt = ((int)gregtech.api.enums.GT_Values.V[this.mTier]); + this.mMaxProgresstime = ((int)(tMass * 512L / (1 << this.mTier - 1))); + if ((this.mOutputItems[0] = GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial, 1L)) == null) + { + if ((this.mOutputItems[0] = GT_OreDictUnificator.get(OrePrefixes.cell, tMaterial, 1L)) != null) { + if ((this.mOutputFluid = GT_Utility.getFluidForFilledItem(this.mOutputItems[0], true)) == null) + { + if (ItemList.Cell_Empty.isStackEqual(getInputAt(0))) { + if (canOutput(new ItemStack[] { this.mOutputItems[0] })) + { + getInputAt(0).stackSize -= 1; FluidStack + tmp231_230 = tFluid;tmp231_230.amount = ((int)(tmp231_230.amount - tMass)); + return 2; + } + } + } + else + { + this.mOutputItems[0] = null; + if ((getDrainableStack() == null) || ((getDrainableStack().isFluidEqual(this.mOutputFluid)) && (getDrainableStack().amount < 16000))) + { + FluidStack tmp287_286 = tFluid;tmp287_286.amount = ((int)(tmp287_286.amount - tMass)); + return 2; + } + } + } + } + else if (canOutput(new ItemStack[] { this.mOutputItems[0] })) + { + FluidStack tmp322_321 = tFluid;tmp322_321.amount = ((int)(tmp322_321.amount - tMass)); + return 2; + } + } + } + } + return 0; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) + { + return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (ItemList.Cell_Empty.isStackEqual(aStack)); + } + + public boolean isFluidInputAllowed(FluidStack aFluid) + { + return aFluid.isFluidEqual(Materials.UUMatter.getFluid(1L)); + } + + public int getCapacity() + { + if ((sHeaviestElementMass == 0) && (GregTech_API.sPostloadFinished)) + { + Materials tMaterial; + for (Iterator i$ = Materials.VALUES.iterator(); i$.hasNext(); sHeaviestElementMass = Math.max(sHeaviestElementMass, (int)tMaterial.getMass())) + { + tMaterial = (Materials)i$.next(); + if ((tMaterial.mElement == null) || (tMaterial.mElement.mIsIsotope)) {} + } + } + return sHeaviestElementMass; + } +} + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + * Qualified Name: gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_Replicator + * JD-Core Version: 0.7.0.1 + */ \ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java new file mode 100644 index 0000000000..d65970dbac --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_RockBreaker.java @@ -0,0 +1,88 @@ +package gregtech.common.tileentities.machines.basic; + +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +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.objects.GT_RenderedTexture; +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 net.minecraft.init.Blocks; +import net.minecraft.item.ItemStack; + +public class GT_MetaTileEntity_RockBreaker + extends GT_MetaTileEntity_BasicMachine +{ + public GT_MetaTileEntity_RockBreaker(int aID, String aName, String aNameRegional, int aTier) + { + super(aID, aName, aNameRegional, aTier, 1, "Put Lava and Water adjacent", 1, 1, "RockBreaker.png", "", new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_ROCK_BREAKER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_ROCK_BREAKER) }); + } + + public GT_MetaTileEntity_RockBreaker(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) + { + super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName); + } + + public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) + { + return new GT_MetaTileEntity_RockBreaker(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName); + } + + public GT_Recipe.GT_Recipe_Map getRecipeList() + { + return GT_Recipe.GT_Recipe_Map.sRockBreakerFakeRecipes; + } + + public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) + { + return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack)); + } + + public int checkRecipe() + { + IGregTechTileEntity aBaseMetaTileEntity = getBaseMetaTileEntity(); + if ((aBaseMetaTileEntity.getBlockOffset(0, 0, 1) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.water) || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.water)) + { + ItemStack tOutput = null; + if (aBaseMetaTileEntity.getBlockOffset(0, 1, 0) == Blocks.lava) { + tOutput = new ItemStack(Blocks.stone, 1); + } else if ((aBaseMetaTileEntity.getBlockOffset(0, 0, 1) == Blocks.lava) || (aBaseMetaTileEntity.getBlockOffset(0, 0, -1) == Blocks.lava) || (aBaseMetaTileEntity.getBlockOffset(-1, 0, 0) == Blocks.lava) || (aBaseMetaTileEntity.getBlockOffset(1, 0, 0) == Blocks.lava)) { + tOutput = new ItemStack(Blocks.cobblestone, 1); + } + if (tOutput != null) { + if (GT_Utility.areStacksEqual(getInputAt(0), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Redstone, 1L))) + { + tOutput = new ItemStack(Blocks.obsidian, 1); + if (canOutput(new ItemStack[] { tOutput })) + { + getInputAt(0).stackSize -= 1; + this.mOutputItems[0] = tOutput; + this.mMaxProgresstime = (128 / (1 << this.mTier - 1)); + this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1)); + return 2; + } + } + else if (canOutput(new ItemStack[] { tOutput })) + { + this.mOutputItems[0] = tOutput; + this.mMaxProgresstime = (16 / (1 << this.mTier - 1)); + this.mEUt = (32 * (1 << this.mTier - 1) * (1 << this.mTier - 1)); + return 2; + } + } + } + return 0; + } +} + + +/* Location: F:\Torrent\minecraft\jd-gui-0.3.6.windows\gregtech_1.7.10-5.07.07-dev.jar + * Qualified Name: gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_RockBreaker + * JD-Core Version: 0.7.0.1 + */ \ No newline at end of file diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java new file mode 100644 index 0000000000..3360369114 --- /dev/null +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java @@ -0,0 +1,221 @@ +package gregtech.common.tileentities.machines.basic; + +import forestry.api.genetics.AlleleManager; +import forestry.api.genetics.IAlleleRegistry; +import forestry.api.genetics.IIndividual; +import gregtech.GT_Mod; +import gregtech.api.GregTech_API; +import gregtech.api.enums.Element; +import gregtech.api.enums.GT_Values; +import gregtech.api.enums.ItemList; +import gregtech.api.enums.Materials; +import gregtech.api.enums.OrePrefixes; +import gregtech.api.enums.Textures; +import gregtech.api.enums.Textures.BlockIcons; +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.objects.GT_RenderedTexture; +import gregtech.api.objects.ItemData; +import gregtech.api.objects.MaterialStack; +import gregtech.api.util.GT_Log; +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 gregtech.common.items.behaviors.Behaviour_DataOrb; + +import java.util.Map; + +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraftforge.fluids.FluidStack; + +public class GT_MetaTileEntity_Scanner + extends GT_MetaTileEntity_BasicMachine +{ + public GT_MetaTileEntity_Scanner(int aID, String aName, String aNameRegional, int aTier) + { + super(aID, aName, aNameRegional, aTier, 1, "Scans Crops and other things.", 1, 1, "Scanner.png", "", new ITexture[] { new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_SCANNER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_SIDE_SCANNER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_SCANNER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_FRONT_SCANNER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_SCANNER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_TOP_SCANNER), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_SCANNER_ACTIVE), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_BOTTOM_SCANNER) }); +