aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities
diff options
context:
space:
mode:
authorConnor-Colenso <52056774+Connor-Colenso@users.noreply.github.com>2023-09-04 03:05:22 +0100
committerGitHub <noreply@github.com>2023-09-04 03:05:22 +0100
commit76719d65a90d98e228a914774d3b11ed9f01ac8e (patch)
treece0d35f954e441e9cc4aa95aa347073728e6f4ee /src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities
parent0393b582eb3edcb5c575330804b6747577a55e27 (diff)
downloadGT5-Unofficial-76719d65a90d98e228a914774d3b11ed9f01ac8e.tar.gz
GT5-Unofficial-76719d65a90d98e228a914774d3b11ed9f01ac8e.tar.bz2
GT5-Unofficial-76719d65a90d98e228a914774d3b11ed9f01ac8e.zip
Clean-up v2 (#729)
* Remove test items from NEI with no texture * Add number formatting to hand pumps * Remove heavy plates (no recipes & completely unused). * Remove helium generator (no texture, no recipe) * Remove fire pit and fire starter (no use, no recipe, no textures) * Remove giant chicken and associated unused stuff, has no texture and is unobtainable. Used to be relevant but isn't anymore. * Remove villagers with silly trades like 1 motor + 1 hull = 1 hull. Why? * Remove trade bench, no recipe, missing textures. Unused. * Remove farm processors, no texture, no recipe. Unused. * Remove MAX tier components, these exist in GT now, have no recipe here and are unused. * Hide untextured light block from NEI * Update buildscript * Remove unused backpacks, no recipe and contains dupe bugs. Bad. * Remove eatotronic, universal toolbox and magic tool bag. All 3 are missing textures and uncraftable. * Remove eatotronic, universal toolbox and magic tool bag. All 3 are missing textures and uncraftable. part 2 * Remove dragon catcher (what?), no texture, no recipe, unused. * Remove empty item, does nothing, has no recipe, no idea why it is here. * Empty item v2 removal * Revert "Empty item v2 removal" This reverts commit 75bcd3ccfaf55bbfe2c12b2e4167d5c37636030d. * Revert "Remove empty item, does nothing, has no recipe, no idea why it is here." This reverts commit e41a9f484392776331c58530ab1faa5ef978ef36. * Remove debug square. No recipe, unused. * Number formatting overflow covers * Remove JVM garbage collection block. Unused, no recipe. * Remove nanotubes, no recipe for them. Unused. * Remove "git" item, doesn't seem to work. Has no recipe. * Remove uncraftable food with awful textures. * Remove "bat king" mob, unused content. Does not spawn. * Remove uncraftable doors with bad textures. Unused content. * Remove uncraftable, unlocalised redstone stuff that crashes game when placed. * Remove weird spawner item. No recipe, does not exist in world. * Remove sunnarium bit, no recipe, no usage. * Remove unused modularity table and some misc uncraftable, unused items. * Remove Interconnecting Storage Crate, no recipe, unused. * Delete worse debug power gen, this already exists as part of GT. Unneeded duplication. * Delete unused placeholder circuit * Delete uncraftable generator hatches. * Spotless * Remove XP tank thing, unused and uncraftable. * Remove null item, this fluid registry only seemed to register one null fluid. All others exist? * Remove EU -> RF battery. Unused in GTNH. * Remove some shelf nonsense, why is this in this mod? * Remove some weird random tools. These have no realistic usage in GTNH. * Remove firemaker. Useless in GTNH. * Removed helium blob. Deprecated item, not used anymore, uncraftable. * spotlessApply (#730) Co-authored-by: GitHub GTNH Actions <> * Stop modulators generating unused blocks with no textures * Remove more unused untextured casings * Remove more unused untextured casings * Remove more unused untextured casings * Remove more unused untextured casings * Remove more unused untextured casings * Remove some weird methods and uncraftable mining parts, probably part of deprecated multiblock. * spotlessApply (#732) Co-authored-by: GitHub GTNH Actions <> * Remove gem shards, unused. * Remove unused atoms * Remove unused gum * Remove unused elements/materials * Bye bye * Remove some unused reflection stuff * Remove control cores, obsolete now. * Remove mob killing thing with no texture and no recipe. * Remove uncraftable covers * Remove pizza gloves * Net and rope removal, unused * Remove force crop * Removal of some old event stuff * Remove unused nuclear chem items * Remove player safe, mostly because of the horrible event code that was intercepting every block break. I can't see any real usage of this via discord. * Remove Force material and associated other nonsense. Also remove some nuclear chem stuff. * Remove force for realsies * Skookum Chooker purge. * Remove some enderio compat, these plates/dusts are added via GT5 anyway now. This is obsolete. * spotlessApply (#733) Co-authored-by: GitHub GTNH Actions <> * Unused textures * Bump dep * Revert "Remove force for realsies" This reverts commit 0d288912a99f9dabce56d2a2623d4d3510f4804e. * Revert "Remove Force material and associated other nonsense. Also remove some nuclear chem stuff." This reverts commit 3455e6e916defe1f2aef923be6f9696a6cf3095b. * Remove nuclear items that are unused * spotlessApply (#734) Co-authored-by: GitHub GTNH Actions <> --------- Co-authored-by: GTNH-Colen <54497873+GTNH-Colen@users.noreply.github.com> Co-authored-by: Connor Colenso <colen@CONNORSPC> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java2
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java234
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java386
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java578
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java77
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java365
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java40
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java49
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java60
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java47
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java276
11 files changed, 0 insertions, 2114 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
index 51d7b4d186..3b54fb46a7 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
@@ -28,7 +28,6 @@ import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator {
public int mEfficiency;
- private int mDays;
private long mTicksToBurnFor;
private int mVoltage = 0;
private GT_Recipe mCurrentRecipe;
@@ -79,7 +78,6 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator
@Override
public void loadNBTData(NBTTagCompound aNBT) {
super.loadNBTData(aNBT);
- // this.mMachineBlock = aNBT.getByte("mMachineBlock");
this.mTicksToBurnFor = aNBT.getLong("mTicksToBurnFor");
this.mVoltage = aNBT.getInteger("mVoltage");
this.mDaysRemaining = aNBT.getInteger("mDaysRemaining");
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java
deleted file mode 100644
index c04a04ae3c..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java
+++ /dev/null
@@ -1,234 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.tileentities.generators.creative;
-
-import static gregtech.api.enums.GT_Values.V;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import com.gtnewhorizon.gtnhlib.reflect.Fields;
-
-import gregtech.api.enums.GT_Values;
-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_Utility;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import gtPlusPlus.core.util.sys.KeyboardUtils;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
-import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GregtechMetaEnergyBuffer;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- *
- * This is the main construct for my Basic Machines such as the Automatic Extractor Extend this class to make a simple
- * Machine
- */
-public class GregtechMetaCreativeEnergyBuffer extends GregtechMetaEnergyBuffer {
-
- private int mVoltageTier = 3;
-
- public GregtechMetaCreativeEnergyBuffer(final String aName, final int aTier, final String aDescription,
- final ITexture[][][] aTextures, final int aSlotCount) {
- super(aName, aTier, aDescription, aTextures, aSlotCount);
- // TODO Auto-generated constructor stub
- }
-
- public GregtechMetaCreativeEnergyBuffer(final int aID, final String aName, final String aNameRegional,
- final int aTier, final String aDescription, final int aSlotCount) {
- super(aID, aName, aNameRegional, aTier, aDescription, aSlotCount);
- }
-
- @Override
- public String[] getDescription() {
- return new String[] { this.mDescription, "Use Screwdriver to change voltage",
- "Hold Shift while using Screwdriver to change amperage", EnumChatFormatting.GREEN + "CREATIVE MACHINE",
- CORE.GT_Tooltip.get() };
- }
-
- /*
- * MACHINE_STEEL_SIDE
- */
- @Override
- public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
- CustomIcon h = TexturesGtBlock.Casing_Material_RedSteel;
- CustomIcon g = TexturesGtBlock.Casing_Material_Grisium;
- CustomIcon k;
- boolean j = MathUtils.isNumberEven(this.mVoltageTier);
- final ITexture[][][] rTextures = new ITexture[2][17][];
- k = j ? g : h;
- for (byte i = -1; i < 16; i++) {
- rTextures[0][i + 1] = new ITexture[] { new GT_RenderedTexture(k) };
- rTextures[1][i + 1] = new ITexture[] { new GT_RenderedTexture(k),
- this.mInventory.length > 4 ? Textures.BlockIcons.OVERLAYS_ENERGY_OUT_MULTI[this.mVoltageTier]
- : Textures.BlockIcons.OVERLAYS_ENERGY_OUT[this.mVoltageTier] };
- }
- return rTextures;
- }
-
- @Override
- public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final ForgeDirection side,
- final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) {
- return this.mTextures[side == facing ? 1 : 0][aColorIndex + 1];
- }
-
- @Override
- protected void showEnergy(final World worldIn, final EntityPlayer playerIn) {
- final long tempStorage = this.getBaseMetaTileEntity().getStoredEU();
- final double c = ((double) tempStorage / this.maxEUStore()) * 100;
- final double roundOff = Math.round(c * 100.00) / 100.00;
- PlayerUtils.messagePlayer(
- playerIn,
- "Energy: " + GT_Utility
- .formatNumbers(tempStorage) + " EU at " + V[this.mVoltageTier] + "v (" + roundOff + "%)");
- PlayerUtils.messagePlayer(playerIn, "Amperage: " + GT_Utility.formatNumbers(maxAmperesOut()) + "A");
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
- return new GregtechMetaCreativeEnergyBuffer(
- this.mName,
- this.mTier,
- this.mDescription,
- this.mTextures,
- this.mInventory.length);
- }
-
- @Override
- public long getMinimumStoredEU() {
- return 0;
- }
-
- @Override
- public long maxEUStore() {
- return Long.MAX_VALUE;
- }
-
- @Override
- public long maxEUInput() {
- return V[mVoltageTier];
- }
-
- @Override
- public long maxEUOutput() {
- return V[mVoltageTier];
- }
-
- @Override
- public long maxAmperesIn() {
- return aCurrentOutputAmperage;
- }
-
- @Override
- public long maxAmperesOut() {
- return aCurrentOutputAmperage;
- }
-
- @Override
- public int getProgresstime() {
- return Integer.MAX_VALUE;
- }
-
- @Override
- public int maxProgresstime() {
- return Integer.MAX_VALUE;
- }
-
- @Override
- public boolean isAccessAllowed(final EntityPlayer aPlayer) {
- return true;
- }
-
- @Override
- public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
- if (aBaseMetaTileEntity.isServerSide()) {
- aBaseMetaTileEntity.increaseStoredEnergyUnits(Integer.MAX_VALUE, true);
- }
- }
-
- @Override
- public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex,
- final ForgeDirection side, final ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex,
- final ForgeDirection side, final ItemStack aStack) {
- return false;
- }
-
- @Override
- public String[] getInfoData() {
- String[] infoData = super.getInfoData();
- return new String[] { infoData[0], "THIS IS A CREATIVE ITEM - FOR TESTING | Tier: " + this.mVoltageTier,
- infoData[1], infoData[2] };
- }
-
- @Override
- public boolean isGivingInformation() {
- return true;
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- aNBT.setInteger("mVoltageTier", this.mVoltageTier);
- super.saveNBTData(aNBT);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- this.mVoltageTier = aNBT.getInteger("mVoltageTier");
- super.loadNBTData(aNBT);
- }
-
- private static Fields.ClassFields<GregtechMetaCreativeEnergyBuffer>.Field<ITexture[][][]> mTexturesAccessor;
-
- @Override
- public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (KeyboardUtils.isShiftKeyDown()) {
- super.onScrewdriverRightClick(side, aPlayer, aX, aY, aZ);
- } else {
- if (this.mVoltageTier < (GT_Values.VN[9].equals("UHV") ? GT_Values.V.length - 1 : 9)) {
- this.mVoltageTier++;
- } else {
- this.mVoltageTier = 0;
- }
- this.markDirty();
- try {
- if (mTexturesAccessor == null) {
- mTexturesAccessor = Fields.ofClass(GregtechMetaCreativeEnergyBuffer.class)
- .getField(Fields.LookupType.PUBLIC, "mTextures", ITexture[][][].class);
- }
- ITexture[][][] V = getTextureSet(null);
- if (V != null) {
- Logger.REFLECTION("Got Valid Textures.");
- if (this.getBaseMetaTileEntity().isClientSide()) {
- Logger.REFLECTION("Clientside Call.");
- Logger.REFLECTION("Refreshing Textures on buffer.");
- mTexturesAccessor.setValue(this, V);
- Logger.REFLECTION("Refreshed Textures on buffer.");
- } else {
- Logger.REFLECTION("Serverside Call.");
- }
- } else {
- Logger.REFLECTION("Bad mTextures setter.");
- }
- } catch (Throwable t) {
- // Bad refresh.
- t.printStackTrace();
- Logger.REFLECTION("Bad mTextures setter.");
- }
- PlayerUtils.messagePlayer(aPlayer, "Now running at " + GT_Values.VOLTAGE_NAMES[this.mVoltageTier] + ".");
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java
deleted file mode 100644
index e815a622d9..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java
+++ /dev/null
@@ -1,386 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.World;
-import net.minecraftforge.common.util.ForgeDirection;
-
-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 gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-
-public class GregtechMetaGarbageCollector extends GregtechMetaTileEntity {
-
- long mLastCleanup = 0;
- long mLocalTickVar = 0;
- int mFrequency = 5;
-
- public GregtechMetaGarbageCollector(final String aName, final String aNameRegional, final String aDescription) {
- super(991, aName, aNameRegional, 5, 0, aDescription);
- }
-
- public GregtechMetaGarbageCollector(final String aName, final String aDescription, final ITexture[][][] aTextures) {
- super(aName, 5, 0, aDescription, aTextures);
- }
-
- @Override
- public String[] getDescription() {
- return new String[] { this.mDescription, "Can request the JVM to perform garbage collection",
- "Configurable to run once every 5 minute interval (5-180)", "This Machine has no recipe",
- "Admin Tool, Limit one per world if possible", CORE.GT_Tooltip.get() };
- }
-
- @Override
- public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
- final ITexture[][][] rTextures = new ITexture[10][17][];
- for (byte i = -1; i < 16; i++) {
- rTextures[0][i + 1] = this.getFront(i);
- rTextures[1][i + 1] = this.getBack(i);
- rTextures[2][i + 1] = this.getBottom(i);
- rTextures[3][i + 1] = this.getTop(i);
- rTextures[4][i + 1] = this.getSides(i);
- rTextures[5][i + 1] = this.getFrontActive(i);
- rTextures[6][i + 1] = this.getBackActive(i);
- rTextures[7][i + 1] = this.getBottomActive(i);
- rTextures[8][i + 1] = this.getTopActive(i);
- rTextures[9][i + 1] = this.getSidesActive(i);
- }
- return rTextures;
- }
-
- @Override
- public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final ForgeDirection side,
- final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) {
- return this.mTextures[(aActive ? 5 : 0)
- + (side == facing ? 0
- : side == facing.getOpposite() ? 1
- : side == ForgeDirection.DOWN ? 2 : side == ForgeDirection.UP ? 3 : 4)][aColorIndex
- + 1];
- }
-
- public ITexture[] getFront(final byte aColor) {
- return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel) };
- }
-
- public ITexture[] getBack(final byte aColor) {
- return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel) };
- }
-
- public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium) };
- }
-
- public ITexture[] getTop(final byte aColor) {
- return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium) };
- }
-
- public ITexture[] getSides(final byte aColor) {
- return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3) };
- }
-
- public ITexture[] getFrontActive(final byte aColor) {
- return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel) };
- }
-
- public ITexture[] getBackActive(final byte aColor) {
- return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel) };
- }
-
- public ITexture[] getBottomActive(final byte aColor) {
- return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium) };
- }
-
- public ITexture[] getTopActive(final byte aColor) {
- return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium) };
- }
-
- public ITexture[] getSidesActive(final byte aColor) {
- return new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[this.mTier + 3][aColor + 1],
- new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3) };
- }
-
- @Override
- public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (mFrequency < 180) {
- mFrequency += 5;
- } else {
- mFrequency = 5;
- }
- PlayerUtils.messagePlayer(aPlayer, "Running every " + mFrequency + " minutes.");
- super.onScrewdriverRightClick(side, aPlayer, aX, aY, aZ);
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
- return new GregtechMetaGarbageCollector(this.mName, this.mDescription, this.mTextures);
- }
-
- @Override
- public boolean isSimpleMachine() {
- return true;
- }
-
- @Override
- public boolean isElectric() {
- return false;
- }
-
- @Override
- public boolean isValidSlot(final int aIndex) {
- return false;
- }
-
- @Override
- public boolean isFacingValid(final ForgeDirection facing) {
- return true;
- }
-
- @Override
- public boolean isEnetInput() {
- return false;
- }
-
- @Override
- public boolean isEnetOutput() {
- return false;
- }
-
- @Override
- public boolean isInputFacing(final ForgeDirection side) {
- return side != this.getBaseMetaTileEntity().getFrontFacing();
- }
-
- @Override
- public boolean isOutputFacing(final ForgeDirection side) {
- return side == this.getBaseMetaTileEntity().getFrontFacing();
- }
-
- @Override
- public boolean isTeleporterCompatible() {
- return false;
- }
-
- @Override
- public long getMinimumStoredEU() {
- return 0;
- }
-
- @Override
- public long maxEUStore() {
- return 0;
- }
-
- @Override
- public int getCapacity() {
- return 0;
- }
-
- @Override
- public long maxEUInput() {
- return 0;
- }
-
- @Override
- public long maxEUOutput() {
- return 0;
- }
-
- @Override
- public long maxAmperesIn() {
- return 0;
- }
-
- @Override
- public long maxAmperesOut() {
- return 0;
- }
-
- @Override
- public int rechargerSlotStartIndex() {
- return 0;
- }
-
- @Override
- public int dechargerSlotStartIndex() {
- return 0;
- }
-
- @Override
- public int rechargerSlotCount() {
- return 0;
- }
-
- @Override
- public int dechargerSlotCount() {
- return 0;
- }
-
- @Override
- public int getProgresstime() {
- return (int) this.getBaseMetaTileEntity().getUniversalEnergyStored();
- }
-
- @Override
- public int maxProgresstime() {
- return (int) this.getBaseMetaTileEntity().getUniversalEnergyCapacity();
- }
-
- @Override
- public boolean isAccessAllowed(final EntityPlayer aPlayer) {
- return true;
- }
-
- @Override
- public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) {
- return true;
- }
- this.showPollution(aPlayer.getEntityWorld(), aPlayer);
- return true;
- }
-
- private void showPollution(final World worldIn, final EntityPlayer playerIn) {
- PlayerUtils.messagePlayer(
- playerIn,
- "Running every " + mFrequency + " minutes. Owner: " + this.getBaseMetaTileEntity().getOwnerName());
- long aDiff = mLocalTickVar - this.mLastCleanup;
- PlayerUtils.messagePlayer(playerIn, "Last run: " + Utils.getSecondsFromMillis(aDiff) + " seconds ago.");
- }
-
- @Override
- public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex,
- final ForgeDirection side, final ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex,
- final ForgeDirection side, final ItemStack aStack) {
- return false;
- }
-
- @Override
- public String[] getInfoData() {
- return new String[] { this.getLocalName() };
- }
-
- @Override
- public boolean isGivingInformation() {
- return true;
- }
-
- @Override
- public int[] getAccessibleSlotsFromSide(final int p_94128_1_) {
- return new int[] {};
- }
-
- @Override
- public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) {
- return false;
- }
-
- @Override
- public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) {
- return false;
- }
-
- @Override
- public int getSizeInventory() {
- return 0;
- }
-
- @Override
- public ItemStack getStackInSlot(final int p_70301_1_) {
- return null;
- }
-
- @Override
- public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) {
- return null;
- }
-
- @Override
- public ItemStack getStackInSlotOnClosing(final int p_70304_1_) {
- return null;
- }
-
- @Override
- public void setInventorySlotContents(final int p_70299_1_, final ItemStack p_70299_2_) {}
-
- @Override
- public String getInventoryName() {
- return null;
- }
-
- @Override
- public boolean hasCustomInventoryName() {
- return false;
- }
-
- @Override
- public int getInventoryStackLimit() {
- return 0;
- }
-
- @Override
- public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) {
- return true;
- }
-
- @Override
- public void openInventory() {}
-
- @Override
- public void closeInventory() {}
-
- @Override
- public boolean isItemValidForSlot(final int p_94041_1_, final ItemStack p_94041_2_) {
- return false;
- }
-
- @Override
- public boolean isOverclockerUpgradable() {
- return false;
- }
-
- @Override
- public boolean isTransformerUpgradable() {
- return false;
- }
-
- @Override
- public void saveNBTData(final NBTTagCompound aNBT) {}
-
- @Override
- public void loadNBTData(final NBTTagCompound aNBT) {}
-
- @Override
- public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
- super.onPostTick(aBaseMetaTileEntity, aTick);
- if (this.getBaseMetaTileEntity().isServerSide()) {
- mLocalTickVar = System.currentTimeMillis();
- long aDiff = mLocalTickVar - this.mLastCleanup;
- if (Utils.getSecondsFromMillis(aDiff) >= (this.mFrequency * 60)) {
- System.gc();
- this.mLastCleanup = mLocalTickVar;
- }
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java
deleted file mode 100644
index 9a073e9e30..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java
+++ /dev/null
@@ -1,578 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.tileentities.storage;
-
-import net.minecraft.block.Block;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import com.gtnewhorizons.modularui.api.screen.ModularWindow;
-import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
-import com.gtnewhorizons.modularui.common.widget.DrawableWidget;
-import com.gtnewhorizons.modularui.common.widget.SlotWidget;
-import com.gtnewhorizons.modularui.common.widget.TextWidget;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures.BlockIcons;
-import gregtech.api.gui.modularui.GT_UIInfos;
-import gregtech.api.gui.modularui.GT_UITextures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.modularui.IAddUIWidgets;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.api.objects.data.AutoMap;
-import gtPlusPlus.api.objects.minecraft.BlockPos;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.data.ArrayUtils;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-
-public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_TieredMachineBlock implements IAddUIWidgets {
-
- /*
- * sides.put(getUp()); sides.put(getDown()); sides.put(getXPos()); sides.put(getXNeg()); sides.put(getZPos());
- * sides.put(getZNeg());
- */
-
- public int mItemCount = 0;
- public ItemStack mItemStack = null;
- private static final double mStorageFactor = 2;
-
- // Meta Tile ID
- public static final int mCrateID = 955;
-
- // Sides
- public static final int SIDE_Up = 0;
- public static final int SIDE_Down = 1;
- public static final int SIDE_XPos = 2;
- public static final int SIDE_XNeg = 3;
- public static final int SIDE_ZPos = 4;
- public static final int SIDE_ZNeg = 5;
- public static final int[] SIDES = new int[] { SIDE_Up, SIDE_Down, SIDE_XPos, SIDE_XNeg, SIDE_ZPos, SIDE_ZNeg };
-
- // Neighbour Cache
- private GT_MetaTileEntity_ConnectableCrate[] mNeighbourCache = new GT_MetaTileEntity_ConnectableCrate[6];
- // Cached Crate Location
- private BlockPos mCurrentPos = null;
- // Master Crate Position
- protected BlockPos mMasterCrateLocation = null;
- // Is Master?
- protected boolean mIsMaster = false;
- // Is Connected?
- protected boolean mIsConnected[] = new boolean[] { false, false, false, false, false, false };
- // How many are connected?
- protected int mConnectedCount = 0;
- // Map of connected locations
- protected AutoMap<String> mConnectedCache = new AutoMap<String>();
-
- public GT_MetaTileEntity_ConnectableCrate(int aID, String aName, String aNameRegional, int aTier) {
- super(
- aID,
- aName,
- aNameRegional,
- aTier,
- 3,
- "This Crate stores " + (int) (Math.pow(6.0D, (double) aTier) * mStorageFactor) + " Items",
- new ITexture[0]);
- }
-
- public GT_MetaTileEntity_ConnectableCrate(String aName, int aTier, String[] aDescription,
- ITexture[][][] aTextures) {
- super(aName, aTier, 3, aDescription, aTextures);
- }
-
- @Override
- public String[] getDescription() {
- return org.apache.commons.lang3.ArrayUtils.add(this.mDescriptionArray, CORE.GT_Tooltip.get());
- }
-
- @Override
- public boolean isSimpleMachine() {
- return true;
- }
-
- public boolean isFacingValid(ForgeDirection facing) {
- return true;
- }
-
- @Override
- public boolean isAccessAllowed(EntityPlayer aPlayer) {
- return true;
- }
-
- @Override
- public boolean isValidSlot(int aIndex) {
- return true;
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_ConnectableCrate(this.mName, this.mTier, this.mDescriptionArray, this.mTextures);
- }
-
- public int getOppositeSide(int s