aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/common
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
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')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java31
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java81
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java9
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java21
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java17
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java27
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java40
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java1
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java86
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java168
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java15
-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
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java231
23 files changed, 121 insertions, 2720 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
index 047e589db1..9a82ecf93b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks2.java
@@ -3,7 +3,9 @@ package gtPlusPlus.xmod.gregtech.common.blocks;
import java.util.List;
import net.minecraft.block.Block;
+import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
@@ -18,7 +20,26 @@ import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage.Gregt
public class GregtechMetaCasingBlocks2 extends GregtechMetaCasingBlocksAbstract {
- CasingTextureHandler2 TextureHandler = new CasingTextureHandler2();
+ @Override
+ public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) {
+ aList.add(new ItemStack(aItem, 1, 0));
+ aList.add(new ItemStack(aItem, 1, 1));
+ aList.add(new ItemStack(aItem, 1, 2));
+ aList.add(new ItemStack(aItem, 1, 3));
+ aList.add(new ItemStack(aItem, 1, 4));
+ aList.add(new ItemStack(aItem, 1, 5));
+ aList.add(new ItemStack(aItem, 1, 6));
+ aList.add(new ItemStack(aItem, 1, 7));
+ aList.add(new ItemStack(aItem, 1, 8));
+ aList.add(new ItemStack(aItem, 1, 9));
+ aList.add(new ItemStack(aItem, 1, 10));
+ aList.add(new ItemStack(aItem, 1, 11));
+ aList.add(new ItemStack(aItem, 1, 12));
+ aList.add(new ItemStack(aItem, 1, 13));
+
+ aList.add(new ItemStack(aItem, 1, 15));
+
+ }
public static class GregtechMetaCasingItemBlocks2 extends GregtechMetaCasingItems {
@@ -62,10 +83,9 @@ public class GregtechMetaCasingBlocks2 extends GregtechMetaCasingBlocksAbstract
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Thermal Containment Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "Bulk Production Frame");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "Cutting Factory Frame");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Sterile Farm Casing"); // Tree
- // Farmer
- // Textures
+
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Sterile Farm Casing");
+
GregtechItemList.Casing_ThermalCentrifuge.set(new ItemStack(this, 1, 0));
GregtechItemList.Casing_Refinery_External.set(new ItemStack(this, 1, 1));
GregtechItemList.Casing_Refinery_Structural.set(new ItemStack(this, 1, 2));
@@ -80,6 +100,7 @@ public class GregtechMetaCasingBlocks2 extends GregtechMetaCasingBlocksAbstract
GregtechItemList.Casing_ThermalContainment.set(new ItemStack(this, 1, 11));
GregtechItemList.Casing_Autocrafter.set(new ItemStack(this, 1, 12));
GregtechItemList.Casing_CuttingFactoryFrame.set(new ItemStack(this, 1, 13));
+
GregtechItemList.Casing_PLACEHOLDER_TreeFarmer.set(new ItemStack(this, 1, 15)); // Tree Farmer Textures
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
index 038e4f0366..cf9d272398 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
@@ -1,5 +1,9 @@
package gtPlusPlus.xmod.gregtech.common.blocks;
+import java.util.List;
+
+import net.minecraft.creativetab.CreativeTabs;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
@@ -21,23 +25,15 @@ public class GregtechMetaCasingBlocks4 extends GregtechMetaCasingBlocksAbstract
}
TAE.registerTexture(3, i, new GTPP_CopiedBlockTexture(this, 6, i));
}
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Naquadah Reactor Base"); // 48
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Naquadah Reactor Base");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Reactor Piping");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Naquadah Containment Chamber");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Tempered Arc Furnace Casing");
GT_LanguageManager
- .addStringLocalization(this.getUnlocalizedName() + ".4.name", "Quantum Force Transformer Coil Casings"); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", ""); // Unused
+ .addStringLocalization(this.getUnlocalizedName() + ".4.name", "Quantum Force Transformer Coil Casings");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Vacuum Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Turbodyne Casing");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused
+
GregtechItemList.Casing_Naq_Reactor_A.set(new ItemStack(this, 1, 0));
GregtechItemList.Casing_Naq_Reactor_B.set(new ItemStack(this, 1, 1));
GregtechItemList.Casing_Naq_Reactor_C.set(new ItemStack(this, 1, 2));
@@ -56,46 +52,75 @@ public class GregtechMetaCasingBlocks4 extends GregtechMetaCasingBlocksAbstract
// Texture ID's. case 0 == ID[57]
if ((aMeta >= 0) && (aMeta < 16)) {
switch (aMeta) {
- case 0:
+ case 0 -> {
return TexturesGtBlock.Casing_Trinium_Titanium.getIcon();
- case 1:
+ }
+ case 1 -> {
return TexturesGtBlock.TEXTURE_TECH_C.getIcon();
- case 2:
+ }
+ case 2 -> {
return TexturesGtBlock.TEXTURE_ORGANIC_PANEL_A_GLOWING.getIcon();
- case 3:
+ }
+ case 3 -> {
return TexturesGtBlock.TEXTURE_METAL_PANEL_A.getIcon();
- case 4:
+ }
+ case 4 -> {
return TexturesGtBlock.Casing_Coil_QFT.getIcon();
- case 5:
+ }
+ case 5 -> {
return Textures.BlockIcons.RENDERING_ERROR.getIcon();
- case 6:
+ }
+ case 6 -> {
return Textures.BlockIcons.RENDERING_ERROR.getIcon();
- case 7:
+ }
+ case 7 -> {
return Textures.BlockIcons.RENDERING_ERROR.getIcon();
- case 8:
+ }
+ case 8 -> {
return Textures.BlockIcons.RENDERING_ERROR.getIcon();
- case 9:
+ }
+ case 9 -> {
return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon();
- case 10:
+ }
+ case 10 -> {
if (aSide < 2) {
return TexturesGtBlock.TEXTURE_STONE_RED_B.getIcon();
} else {
return TexturesGtBlock.TEXTURE_STONE_RED_A.getIcon();
}
- case 11:
+ }
+ case 11 -> {
return TexturesGtBlock.TEXTURE_CASING_ROCKETDYNE.getIcon();
- case 12:
+ }
+ case 12 -> {
return Textures.BlockIcons.RENDERING_ERROR.getIcon();
- case 13:
+ }
+ case 13 -> {
return Textures.BlockIcons.RENDERING_ERROR.getIcon();
- case 14:
+ }
+ case 14 -> {
return Textures.BlockIcons.RENDERING_ERROR.getIcon();
- case 15:
+ }
+ case 15 -> {
return Textures.BlockIcons.RENDERING_ERROR.getIcon();
- default:
+ }
+ default -> {
return TexturesGtBlock.Casing_Material_MaragingSteel.getIcon();
+ }
}
}
return TexturesGtBlock._PlaceHolder.getIcon();
}
+
+ @Override
+ public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) {
+ aList.add(new ItemStack(aItem, 1, 0));
+ aList.add(new ItemStack(aItem, 1, 1));
+ aList.add(new ItemStack(aItem, 1, 2));
+ aList.add(new ItemStack(aItem, 1, 3));
+ aList.add(new ItemStack(aItem, 1, 4));
+
+ aList.add(new ItemStack(aItem, 1, 10));
+ aList.add(new ItemStack(aItem, 1, 11));
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java
index a74d714a80..3cf25344ac 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks6.java
@@ -3,7 +3,9 @@ package gtPlusPlus.xmod.gregtech.common.blocks;
import java.util.List;
import net.minecraft.block.Block;
+import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
@@ -21,6 +23,13 @@ public class GregtechMetaCasingBlocks6 extends GregtechMetaCasingBlocksAbstract
public static boolean mConnectedMachineTextures = false;
CasingTextureHandler6 TextureHandler = new CasingTextureHandler6();
+ @Override
+ public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) {
+ for (int i = 0; i < 3; i++) {
+ aList.add(new ItemStack(aItem, 1, i));
+ }
+ }
+
public static class GregtechMetaCasingItemBlocks3 extends GregtechMetaCasingItems {
public GregtechMetaCasingItemBlocks3(Block par1) {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java
index 685bee8dab..b16868aeb2 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMachineCasings.java
@@ -3,7 +3,9 @@ package gtPlusPlus.xmod.gregtech.common.blocks;
import java.util.List;
import net.minecraft.block.Block;
+import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
@@ -17,6 +19,13 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
public class GregtechMetaSpecialMachineCasings extends GregtechMetaCasingBlocksAbstract {
+ @Override
+ public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) {
+ for (int i = 0; i < 4; i++) {
+ aList.add(new ItemStack(aItem, 1, i));
+ }
+ }
+
public static class SpecialCasingItemBlock extends GregtechMetaCasingItems {
public SpecialCasingItemBlock(Block par1) {
@@ -47,18 +56,6 @@ public class GregtechMetaSpecialMachineCasings extends GregtechMetaCasingBlocksA
TAE.registerTexture(84, new GTPP_CopiedBlockTexture(this, 6, 2));
GT_LanguageManager
.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Rugged Botmium Machine Casing");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused
GregtechItemList.Casing_Machine_Custom_1.set(new ItemStack(this, 1, 0));
GregtechItemList.Casing_Machine_Custom_2.set(new ItemStack(this, 1, 1));
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java
index b81e381b8c..1cc2403973 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings2.java
@@ -3,7 +3,9 @@ package gtPlusPlus.xmod.gregtech.common.blocks;
import java.util.List;
import net.minecraft.block.Block;
+import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
@@ -18,6 +20,13 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
public class GregtechMetaSpecialMultiCasings2 extends GregtechMetaCasingBlocksAbstract {
+ @Override
+ public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) {
+ for (int i = 0; i < 8; i++) {
+ aList.add(new ItemStack(aItem, 1, i));
+ }
+ }
+
public static class SpecialCasingItemBlock extends GregtechMetaCasingItems {
public SpecialCasingItemBlock(Block par1) {
@@ -51,14 +60,6 @@ public class GregtechMetaSpecialMultiCasings2 extends GregtechMetaCasingBlocksAb
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", "Modulator II");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", "Modulator III");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Modulator IV");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", ""); // Unused
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", ""); // Unused
GregtechItemList.ResonanceChamber_I.set(new ItemStack(this, 1, 0));
GregtechItemList.ResonanceChamber_II.set(new ItemStack(this, 1, 1));
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java
index 0d4606ab4f..c9f748e171 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaTieredCasingBlocks1.java
@@ -3,7 +3,9 @@ package gtPlusPlus.xmod.gregtech.common.blocks;
import java.util.List;
import net.minecraft.block.Block;
+import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
@@ -16,6 +18,13 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
public class GregtechMetaTieredCasingBlocks1 extends GregtechMetaCasingBlocksAbstract {
+ @Override
+ public void getSubBlocks(Item aItem, CreativeTabs par2CreativeTabs, List aList) {
+ for (int i = 0; i < 10; i++) {
+ aList.add(new ItemStack(aItem, 1, i));
+ }
+ }
+
public static class TieredCasingItemBlock extends GregtechMetaCasingItems {
public TieredCasingItemBlock(Block par1) {
@@ -34,11 +43,6 @@ public class GregtechMetaTieredCasingBlocks1 extends GregtechMetaCasingBlocksAbs
public GregtechMetaTieredCasingBlocks1() {
super(TieredCasingItemBlock.class, "gtplusplus.blocktieredcasings.1", GT_Material_Casings.INSTANCE);
- for (byte i = 0; i < 16; i = (byte) (i + 1)) {
- // TAE.registerTextures(new GT_CopiedBlockTexture(this, 6, i));
- // Don't register these Textures, Hatches should never need to use their Textures.
- }
- int aIndex = 0;
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".0.name", "Integral Encasement I");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".1.name", "Integral Encasement II");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "Integral Encasement III");
@@ -49,12 +53,6 @@ public class GregtechMetaTieredCasingBlocks1 extends GregtechMetaCasingBlocksAbs
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Integral Framework III");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Integral Framework IV");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "Integral Framework V");
- // GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Vacuum Casing");
- // GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "Turbodyne Casing");
- // GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "");
- // GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "");
- // GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".14.name", "");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".15.name", "Placeholder Block");
GregtechItemList.GTPP_Casing_ULV.set(new ItemStack(this, 1, 0));
GregtechItemList.GTPP_Casing_LV.set(new ItemStack(this, 1, 1));
@@ -66,13 +64,6 @@ public class GregtechMetaTieredCasingBlocks1 extends GregtechMetaCasingBlocksAbs
GregtechItemList.GTPP_Casing_ZPM.set(new ItemStack(this, 1, 7));
GregtechItemList.GTPP_Casing_UV.set(new ItemStack(this, 1, 8));
GregtechItemList.GTPP_Casing_MAX.set(new ItemStack(this, 1, 9));
-
- // GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 10));
- // GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 11));
- // GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 12));
- // GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 13));
- // GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 14));
- // GregtechItemList.Casing_LV.set(new ItemStack(this, 1, 15));
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java
deleted file mode 100644
index 5dda99f469..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtCutomCovers.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.blocks.textures;
-
-import static gregtech.api.enums.Mods.ZTones;
-
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
-
-public class TexturesGtCutomCovers {
-
- public static final CustomIcon[] TEXTURE_ZTONES_AGON = new CustomIcon[16];
- public static final CustomIcon[] TEXTURE_ZTONES_ISZM = new CustomIcon[16];
- public static final CustomIcon[] TEXTURE_ZTONES_KORP = new CustomIcon[16];
- public static final CustomIcon[] TEXTURE_ZTONES_JELT = new CustomIcon[16];
- public static final CustomIcon[] TEXTURE_ZTONES_BITT = new CustomIcon[16];
-
- public static void init() {
- generateZTones();
- }
-
- private static void generateZTones() {
- // ZTONES
- String[] aZtoneCoverTextureNames = new String[] { "agon", "iszm", "korp", "jelt", "bitt" };
- int aArrayIndex = 0;
- CustomIcon[][] aArrays = new CustomIcon[][] { TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP,
- TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT };
-
- for (CustomIcon[] t : aArrays) {
- for (int s = 0; s < 16; s++) {
- t[s] = new CustomIcon(
- ZTones.ID,
- "sets/" + aZtoneCoverTextureNames[aArrayIndex]
- + "/"
- + aZtoneCoverTextureNames[aArrayIndex]
- + "_ ("
- + s
- + ")");
- }
- aArrayIndex++;
- }
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
index 9819f9d59b..dfb519a445 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtTools.java
@@ -12,7 +12,6 @@ import gtPlusPlus.api.objects.Logger;
public final class TexturesGtTools {
- public static final CustomIcon SKOOKUM_CHOOCHER = new CustomIcon("iconsets/SKOOKUMCHOOCHER");
public static final CustomIcon ANGLE_GRINDER = new CustomIcon("iconsets/ANGLE_GRINDER");
public static final CustomIcon ELECTRIC_SNIPS = new CustomIcon("iconsets/ELECTRIC_SNIPS");
public static final CustomIcon ELECTRIC_LIGHTER = new CustomIcon("iconsets/ELECTRIC_LIGHTER");
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java
index 94d5402589..c1f87ef041 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/covers/CoverManager.java
@@ -1,102 +1,16 @@
package gtPlusPlus.xmod.gregtech.common.covers;
-import static gregtech.api.enums.Mods.ZTones;
-import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_AGON;
-import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_BITT;
-import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_ISZM;
-import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_JELT;
-import static gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers.TEXTURE_ZTONES_KORP;
-
-import gtPlusPlus.core.lib.VanillaColours;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtCutomCovers;
-import gtPlusPlus.xmod.gregtech.common.items.MetaCustomCoverItem;
import gtPlusPlus.xmod.gregtech.common.items.covers.MetaItemCoverCasings;
public class CoverManager {
- // ZTones
- public static MetaCustomCoverItem Cover_Agon;
- public static MetaCustomCoverItem Cover_Iszm;
- public static MetaCustomCoverItem Cover_Korp;
- public static MetaCustomCoverItem Cover_Jelt;
- public static MetaCustomCoverItem Cover_Bitt;
-
// GT
public static MetaItemCoverCasings Cover_Gt_Machine_Casing;
public static void generateCustomCovers() {
- // init textures
- TexturesGtCutomCovers.init();
-
// GT Machine Casings
Cover_Gt_Machine_Casing = new MetaItemCoverCasings();
-
- if (ZTones.isModLoaded()) {
- String[] aZtoneCoverTextureNames = new String[] { "agon", "iszm", "korp", "jelt", "bitt" };
- MetaCustomCoverItem[] aZtoneCoverItems = new MetaCustomCoverItem[] { Cover_Agon, Cover_Iszm, Cover_Korp,
- Cover_Jelt, Cover_Bitt };
- CustomIcon[][] aArrays = new CustomIcon[][] { TEXTURE_ZTONES_AGON, TEXTURE_ZTONES_ISZM, TEXTURE_ZTONES_KORP,
- TEXTURE_ZTONES_JELT, TEXTURE_ZTONES_BITT };
- short[][][] aRGB = new short[][][] { ZTONES.RGB_AGON, ZTONES.RGB_ISZM, ZTONES.RGB_KORP, ZTONES.RGB_JELT,
- ZTONES.RGB_BITT };
- for (int y = 0; y < aZtoneCoverTextureNames.length; y++) {
- aZtoneCoverItems[y] = new MetaCustomCoverItem(
- ZTones.ID,
- 16,
- aZtoneCoverTextureNames[y],
- aArrays[y],
- aRGB[y]);
- }
- }
}
- static final class ZTONES {
-
- private static final short[][] RGB_AGON = new short[][] { VanillaColours.DYE_WHITE.getAsShort(),
- VanillaColours.DYE_YELLOW.getAsShort(), VanillaColours.DYE_LIME.getAsShort(),
- VanillaColours.DYE_GREEN.getAsShort(), VanillaColours.DYE_CYAN.getAsShort(),
- VanillaColours.DYE_LIGHT_BLUE.getAsShort(), VanillaColours.DYE_DARK_BLUE.getAsShort(),
- VanillaColours.DYE_DARK_PURPLE.getAsShort(), VanillaColours.DYE_LIGHT_PURPLE.getAsShort(),
- VanillaColours.DYE_PINK.getAsShort(), VanillaColours.DYE_RED.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_BROWN.getAsShort(),
- VanillaColours.DYE_BLACK.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_LIGHT_GRAY.getAsShort(), };
- private static final short[][] RGB_ISZM = new short[][] { VanillaColours.DYE_LIGHT_GRAY.getAsShort(),
- VanillaColours.DYE_WHITE.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_BLUE.getAsShort(), VanillaColours.DYE_YELLOW.getAsShort(),
- VanillaColours.DYE_DARK_BLUE.getAsShort(), VanillaColours.DYE_RED.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_CYAN.getAsShort(),
- VanillaColours.DYE_YELLOW.getAsShort(), VanillaColours.DYE_RED.getAsShort(),
- VanillaColours.DYE_CYAN.getAsShort(), VanillaColours.DYE_GREEN.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_LIGHT_BLUE.getAsShort(),
- VanillaColours.DYE_DARK_PURPLE.getAsShort(), };
- private static final short[][] RGB_KORP = new short[][] { new short[] { 125, 125, 125 },
- VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(),
- VanillaColours.DYE_DARK_GRAY.getAsShort(), new short[] { 22, 156, 156 }, new short[] { 22, 156, 156 },
- VanillaColours.DYE_DARK_GRAY.getAsShort(), VanillaColours.DYE_DARK_GRAY.getAsShort(), };
- private static final short[][] RGB_JELT = new short[][] { VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_ORANGE.getAsShort(), };
- private static final short[][] RGB_BITT = new short[][] { VanillaColours.DYE_BLACK.getAsShort(),
- VanillaColours.DYE_WHITE.getAsShort(), VanillaColours.DYE_YELLOW.getAsShort(),
- VanillaColours.DYE_LIME.getAsShort(), VanillaColours.DYE_GREEN.getAsShort(),
- VanillaColours.DYE_CYAN.getAsShort(), VanillaColours.DYE_LIGHT_BLUE.getAsShort(),
- VanillaColours.DYE_LIGHT_BLUE.getAsShort(), VanillaColours.DYE_DARK_BLUE.getAsShort(),
- VanillaColours.DYE_DARK_PURPLE.getAsShort(), VanillaColours.DYE_LIGHT_PURPLE.getAsShort(),
- VanillaColours.DYE_PINK.getAsShort(), VanillaColours.DYE_RED.getAsShort(),
- VanillaColours.DYE_RED.getAsShort(), VanillaColours.DYE_ORANGE.getAsShort(),
- VanillaColours.DYE_BROWN.getAsShort(), };
- }
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
index f7f935fdf1..d7eccc0d6b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
@@ -5,8 +5,6 @@ import static gregtech.client.GT_TooltipHandler.Tier.*;
import static gregtech.client.GT_TooltipHandler.registerTieredTooltip;
import static gtPlusPlus.core.util.Utils.getTcAspectStack;
-import net.minecraft.item.EnumAction;
-
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
@@ -18,7 +16,6 @@ import gregtech.api.interfaces.ITexture;
import gregtech.api.objects.GT_MultiTexture;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.render.TextureFactory;
-import gregtech.api.util.GT_FoodStat;
import gregtech.api.util.GT_ModHandler;
import gregtech.common.covers.GT_Cover_Arm;
import gregtech.common.covers.GT_Cover_Conveyor;
@@ -57,7 +54,6 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
// Simplify life.
registerComponents_ULV();
- registerComponents_MAX();
// Extruder Shape
GregtechItemList.Shape_Extruder_WindmillShaft
@@ -192,21 +188,11 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
getTcAspectStack(TC_Aspects.POTENTIA, 8L) }));
this.setElectricStats(32000 + tLastID, GT_Values.V[6] * 10 * 60 * 20, GT_Values.V[5], 5L, -3L, true);
- // FOOOOOOOOOOOOOOD
- GregtechItemList.Food_Baked_Raisin_Bread.set(
- this.addItem(
- tLastID = 60,
- "Raisin Bread",
- "Extra Raisins, Just for ImQ009",
- new Object[] { new GT_FoodStat(5, 0.5F, EnumAction.eat, null, false, true, false, new int[0]),
- getTcAspectStack(TC_Aspects.CORPUS, 1L), getTcAspectStack(TC_Aspects.FAMES, 1L),
- getTcAspectStack(TC_Aspects.IGNIS, 1L) }));
-
GregtechItemList.Cover_Overflow_ULV.set(
this.addItem(
71,
"Overflow Valve (ULV)",
- "Maximum void amount: 8000",
+ "Maximum void amount: 8,000",
new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
getTcAspectStack(TC_Aspects.AQUA, 1L) }));
@@ -214,7 +200,7 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
this.addItem(
72,
"Overflow Valve (LV)",
- "Maximum void amount: 64000",
+ "Maximum void amount: 64,000",
new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
getTcAspectStack(TC_Aspects.AQUA, 1L) }));
@@ -222,7 +208,7 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
this.addItem(
73,
"Overflow Valve (MV)",
- "Maximum void amount: 512000",
+ "Maximum void amount: 512,000",
new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
getTcAspectStack(TC_Aspects.AQUA, 1L) }));
@@ -230,7 +216,7 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
this.addItem(
74,
"Overflow Valve (HV)",
- "Maximum void amount: 4096000",
+ "Maximum void amount: 4,096,000",
new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
getTcAspectStack(TC_Aspects.AQUA, 1L) }));
@@ -238,7 +224,7 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
this.addItem(
75,
"Overflow Valve (EV)",
- "Maximum void amount: 32768000",
+ "Maximum void amount: 32,768,000",
new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
getTcAspectStack(TC_Aspects.AQUA, 1L) }));
@@ -246,7 +232,7 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
this.addItem(
76,
"Overflow Valve (IV)",
- "Maximum void amount: 262144000",
+ "Maximum void amount: 262,144,000",
new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 1L),
getTcAspectStack(TC_Aspects.MACHINA, 1L), getTcAspectStack(TC_Aspects.ITER, 1L),
getTcAspectStack(TC_Aspects.AQUA, 1L) }));
@@ -295,21 +281,6 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
"Hypervisor Matrix (Fusion)",
"A memory unit containing an RI (Restricted Intelligence)"));
- // NanoTubes
- GregtechItemList.NanoTube_Base_Substrate
- .set(this.addItem(101, "Silicon Base Substrate", "Used in the production of Carbon Nanotubes"));
- GregtechItemList.NanoTube_Finished.set(
- this.addItem(102, "Carbon Nanotubes", "Multi-walled Zigzag nanotubes, possibly Carbon's final form"));
- GregtechItemList.Carbyne_Tube_Finished.set(
- this.addItem(
- 103,
- "Linear Acetylenic Carbon (LAC/Carbyne)",
- "LAC chains grown inside Multi-walled Carbon Nanotubes, highly stable"));
- GregtechItemList.Carbyne_Sheet_Finished.set(
- this.addItem(
- 104,
- "Carbyne Composite Panel",
- "Nanotubes which contain LAC, arranged side by side and compressed further"));
GregtechItemList.Laser_Lens_Special
.set(this.addItem(105, "Quantum Anomaly", "Probably should shoot it with lasers"));
@@ -341,51 +312,6 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
/*
* High Tier 'Saws' for the tree Farm
*/
- GregtechItemList.Farm_Processor_EV.set(
- this.addItem(
- tLastID = 120,
- "Farm Processor [EV]",
- "Reusable",
- new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.METALLUM, 8L),
- getTcAspectStack(TC_Aspects.POTENTIA, 8L) }));
- this.setElectricStats(32000 + tLastID, GT_Values.V[5] * 10 * 60 * 20, GT_Values.V[4], 4L, -3L, false);
- GregtechItemList.Farm_Processor_IV.set(
- this.addItem(
- tLastID = 122,
- "Farm Processor [IV]",
- "Reusable",
- new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.METALLUM, 8L),
- getTcAspectStack(TC_Aspects.POTENTIA, 8L) }));
- this.setElectricStats(32000 + tLastID, GT_Values.V[6] * 10 * 60 * 20, GT_Values.V[5], 5L, -3L, false);
- GregtechItemList.Farm_Processor_LuV.set(
- this.addItem(
- tLastID = 124,
- "Farm Processor [LuV]",
- "Reusable",
- new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.METALLUM, 8L),
- getTcAspectStack(TC_Aspects.POTENTIA, 8L) }));
- this.setElectricStats(32000 + tLastID, GT_Values.V[7] * 10 * 60 * 20, GT_Values.V[6], 6L, -3L, false);
- GregtechItemList.Farm_Processor_ZPM.set(
- this.addItem(
- tLastID = 126,
- "Farm Processor [ZPM]",
- "Reusable",
- new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.METALLUM, 8L),
- getTcAspectStack(TC_Aspects.POTENTIA, 8L) }));
- this.setElectricStats(32000 + tLastID, GT_Values.V[8] * 10 * 60 * 20, GT_Values.V[7], 7L, -3L, false);
- GregtechItemList.Farm_Processor_UV.set(
- this.addItem(
- tLastID = 128,
- "Farm Processor [UV]",
- "Reusable",
- new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.METALLUM, 8L),
- getTcAspectStack(TC_Aspects.POTENTIA, 8L) }));
- this.setElectricStats(32000 + tLastID, GT_Values.V[9] * 10 * 60 * 20, GT_Values.V[8], 8L, -3L, false);
GregtechItemList.Laser_Lens_WoodsGlass.set(
this.addItem(
@@ -500,88 +426,6 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
return true;
}
- private boolean registerComponents_MAX() {
- GregtechItemList.Electric_Pump_MAX.set(
- this.addItem(
- 3,
- "Electric Pump (MAX)",
- "",
- new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L),
- getTcAspectStack(TC_Aspects.AQUA, 8L) }));
- GregtechItemList.Electric_Motor_MAX.set(
- this.addItem(
- 7,
- "Electric Motor (MAX)",
- "",
- new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.MOTUS, 8L) }));
- GregtechItemList.Conveyor_Module_MAX.set(
- this.addItem(
- 11,
- "Conveyor Module (MAX)",
- "",
- new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.ITER, 8L) }));
- GregtechItemList.Electric_Piston_MAX.set(
- this.addItem(
- 15,
- "Electric Piston (MAX)",
- "",
- new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L) }));
- GregtechItemList.Robot_Arm_MAX.set(
- this.addItem(
- 19,
- "Robot Arm (MAX)",
- "",
- new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 16L), getTcAspectStack(TC_Aspects.MOTUS, 8L),
- getTcAspectStack("COGNITIO", 8L) }));
- GregtechItemList.Field_Generator_MAX.set(
- this.addItem(
- 23,
- "Field Generator (MAX)",
- "",
- new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 16L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.TUTAMEN, 8L) }));
- GregtechItemList.Emitter_MAX.set(
- this.addItem(
- 27,
- "Emitter (MAX)",
- "",
- new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.LUX, 8L) }));
- GregtechItemList.Sensor_MAX.set(
- this.addItem(
- 31,
- "Sensor (MAX)",
- "",
- new Object[] { getTcAspectStack(TC_Aspects.ELECTRUM, 8L),
- getTcAspectStack(TC_Aspects.MACHINA, 8L), getTcAspectStack(TC_Aspects.SENSUS, 8L) }));
-
- GregTech_API.registerCover(
- GregtechItemList.Electric_Pump_MAX.get(1L),
- new GT_MultiTexture(
- new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[8][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_PUMP) }),
- new GT_Cover_Pump(524288, TextureFactory.of(OVERLAY_PUMP)));
- GregTech_API.registerCover(
- GregtechItemList.Conveyor_Module_MAX.get(1L),
- new GT_MultiTexture(
- new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[4][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_CONVEYOR) }),
- new GT_Cover_Conveyor(4, 1, TextureFactory.of(OVERLAY_CONVEYOR)));
- GregTech_API.registerCover(
- GregtechItemList.Robot_Arm_MAX.get(1L),
- new GT_MultiTexture(
- new ITexture[] { Textures.BlockIcons.MACHINE_CASINGS[4][0],
- new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ARM) }),
- new GT_Cover_Arm(4, TextureFactory.of(OVERLAY_ARM)));
-
- return true;
- }
-
public boolean registerOldCircuits() {
// Enable Old Circuits
Logger.INFO("[Old Feature - Circuits] Enabling Pre-5.09.28 Circuits and Data Storage.");
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
index cd81bfce76..a07ed2131a 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
@@ -6,7 +6,6 @@ import gregtech.api.enums.ToolDictNames;
import gregtech.api.items.GT_MetaGenerated_Tool;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechToolDictNames;
import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_AngleGrinder;
-import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_Choocher;
import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_ElectricButcherKnife;
import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_ElectricLighter;
import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_ElectricSnips;
@@ -15,7 +14,6 @@ public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool {
public static final short ELECTRIC_LIGHTER = 7534;
public static final short ELECTRIC_BUTCHER_KNIFE = 7634;
- public static final short SKOOKUM_CHOOCHER = 7734;
public static final short ANGLE_GRINDER = 7834;
public static final short ELECTRIC_SNIPS = 7934;
public static GT_MetaGenerated_Tool INSTANCE;
@@ -30,19 +28,6 @@ public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool {
private MetaGeneratedGregtechTools() {
super("plusplus.metatool.01");
- // Skookum Choocher
- GregTech_API.registerTool(
- this.addTool(
- SKOOKUM_CHOOCHER,
- "Skookum Choocher",
- "Can Really Chooch. Does a Skookum job at Hammering and Wrenching stuff.",
- new TOOL_Gregtech_Choocher(),
- new Object[] { GregtechToolDictNames.craftingToolSkookumChoocher,
- ToolDictNames.craftingToolHardHammer, ToolDictNames.craftingToolWrench,
- new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
- new TC_Aspects.TC_AspectStack(TC_Aspects.ORDO, 2L) }),
- GregTech_API.sWrenchList);
// Electric File
this.addTool(
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 side) {
- if (side == SIDE_Up) {
- return SIDE_Down;
- } else if (side == SIDE_Down) {
- return SIDE_Up;
- } else if (side == SIDE_XNeg) {
- return SIDE_XPos;
- } else if (side == SIDE_XPos) {
- return SIDE_XNeg;
- } else if (side == SIDE_ZNeg) {
- return SIDE_ZPos;
- } else {
- return SIDE_ZNeg;
- }
- }
-
- public boolean calculateOwnershipIfConnected() {
- if (mCurrentPos == null) {
- mCurrentPos = new BlockPos(
- this.getBaseMetaTileEntity().getXCoord(),
- this.getBaseMetaTileEntity().getYCoord(),
- this.getBaseMetaTileEntity().getZCoord(),
- this.getBaseMetaTileEntity().getWorld());
- }
- AutoMap<BlockPos> n = mCurrentPos.getSurroundingBlocks();
- int p = 0;
- for (BlockPos i : n) {
- if (i != null) {
- if (doesSideContainCrate(p)) {
- GT_MetaTileEntity_ConnectableCrate yu = getCrateAtBlockPos(i);
- if (yu != null) {
- mNeighbourCache[p] = yu;
- }
- }
- }
- p++;
- }
-
- int e4 = 0;
- if (mNeighbourCache.length > 0) {
- for (GT_MetaTileEntity_ConnectableCrate e : mNeighbourCache) {
- this.mConnectedCount = this.mConnectedCache.size();
- if (e != null) {
- // First, we check if this Crate is a Master, if not, continue checking what it is.
- if (this.mIsMaster) {
- // So this other Crate is also a master? Which is more Powerful
- if (e.mIsMaster) {
- // This crate holds more connected, it becomes master now.
- if (this.mConnectedCount > e.mConnectedCount) {
- e.mIsMaster = false;
- e.mMasterCrateLocation = this.mCurrentPos;
- if (!e.mIsConnected[getOppositeSide(e4)]) {
- e.mIsConnected[getOppositeSide(e4)] = true;
- }
- if (!this.mIsConnected[e4]) {
- this.mIsConnected[e4] = true;
- }
- this.mConnectedCache = ArrayUtils.mergeTwoMaps(this.mConnectedCache, e.mConnectedCache);
- continue;
- }
- // Other crate held more connected, it is now master.
- else {
- this.mIsMaster = false;
- this.mMasterCrateLocation = e.mCurrentPos;
- if (!this.mIsConnected[e4]) {
- this.mIsConnected[e4] = true;
- }
- if (!e.mIsConnected[getOppositeSide(e4)]) {
- e.mIsConnected[getOppositeSide(e4)] = true;
- }
- e.mConnectedCache = ArrayUtils.mergeTwoMaps(e.mConnectedCache, this.mConnectedCache);
- // Best wipe our cache of connected blocks then, since they no longer hold value.
- mConnectedCache.clear();
- continue;
- }
- }
- // Other Crate was not a Master, but we are, time to inherit it into our connection hivemind.
- else {
- // It would appear this controller has another master, time to query it.
- if (e.mMasterCrateLocation != null && !e.mMasterCrateLocation.getUniqueIdentifier()
- .equalsIgnoreCase(this.mMasterCrateLocation.getUniqueIdentifier())) {
- GT_MetaTileEntity_ConnectableCrate gM = getCrateAtBlockPos(e.mMasterCrateLocation);
- if (gM != null) {
- // Lets compare controller strengths
- int gM_Owned = gM.mConnectedCount;
- // We are stronger, let's inherit it.
- if (this.mConnectedCount > gM_Owned) {
- e.mIsMaster = false;
- e.mMasterCrateLocation = this.mCurrentPos;
- gM.mIsMaster = false;
- gM.mMasterCrateLocation = this.mCurrentPos;
- if (!e.mIsConnected[getOppositeSide(e4)]) {
- e.mIsConnected[getOppositeSide(e4)] = true;
- }
- if (!this.mIsConnected[e4]) {
- this.mIsConnected[e4] = true;
- }
- this.mConnectedCache = ArrayUtils
- .mergeTwoMaps(this.mConnectedCache, gM.mConnectedCache);
- continue;
- }
- // We lost, time to submit to a new master crate
- else {
- this.mIsMaster = false;
- this.mMasterCrateLocation = e.mMasterCrateLocation;
- if (!this.mIsConnected[e4]) {
- this.mIsConnected[e4] = true;
- }
- if (!e.mIsConnected[getOppositeSide(e4)]) {
- e.mIsConnected[getOppositeSide(e4)] = true;
- }
- gM.mConnectedCache = ArrayUtils
- .mergeTwoMaps(gM.mConnectedCache, this.mConnectedCache);
- // Best wipe our cache of connected blocks then, since they no longer hold
- // value.
- mConnectedCache.clear();
- continue;
- }
- } else {
- // Could not get the Tile Entity for the Other Master Crate.. Guess I can just
- // ignore this case for now~ TODO
- continue;
- }
- }
- // Either the other crate has no known Master or it is already this crate.
- else {
- // The other crate has no master, time to inherit.
- if (e.mMasterCrateLocation == null || (!e.mIsConnected[getOppositeSide(e4)])) {
- e.mMasterCrateLocation = this.mCurrentPos;
- if (!e.mIsConnected[getOppositeSide(e4)]) {
- e.mIsConnected[getOppositeSide(e4)] = true;
- }
- if (!this.mIsConnected[e4]) {
- this.mIsConnected[e4] = true;
- }
- mConnectedCache.put(e.mCurrentPos.getUniqueIdentifier());
- continue;
- } else {
- // Do nothing, we own this Crate already :)
- continue;
- }
- }
- }
- }
-
- // We are not a Storage Master Crate, into a brave new world we go
- else {
- // Best wipe our cache of connected blocks then, since they no longer hold value.
- mConnectedCache.clear();
-
- // Dang, the other crate is a master, time to get incorporated.
- if (e.mIsMaster) {
- this.mIsMaster = false;
- this.mMasterCrateLocation = e.mCurrentPos;
- this.mIsConnected[e4] = true;
- if (!e.mIsConnected[e4]) {
- e.mIsConnected[e4] = true;
- }
- if (e.mMasterCrateLocation == null) {
- e.mMasterCrateLocation = e.mCurrentPos;
- }
- e.mConnectedCache.put(this.mCurrentPos.getUniqueIdentifier());
- continue;
- }
- // So the Crate we Checked is not a Master, so let's see if it knows where one is
- else {
- // So, this Crate we have found knows about a master
- if (e.mMasterCrateLocation != null) {
- GT_MetaTileEntity_ConnectableCrate gM = getCrateAtBlockPos(e.mMasterCrateLocation);
- // Found the master crate
- if (gM != null) {
- this.mIsMaster = false;
- this.mMasterCrateLocation = e.mMasterCrateLocation;
- if (!this.mIsConnected[e4]) {
- this.mIsConnected[e4] = true;
- }
- if (!e.mIsConnected[getOppositeSide(e4)]) {
- e.mIsConnected[getOppositeSide(e4)] = true;
- }
- gM.mConnectedCache.put(this.mCurrentPos.getUniqueIdentifier());
- continue;
- } else {
- // Could not get the Tile Entity for the Other Master Crate.. Guess I can just
- // ignore this case for now~ TODO
- continue;
- }
- }
- // This crate has no master, not going to check if it's connected.
- else {
- this.mIsMaster = true;
- this.mMasterCrateLocation = this.mCurrentPos;
- e.mIsMaster = false;
- e.mMasterCrateLocation = this.mCurrentPos;
- if (!e.mIsConnected[getOppositeSide(e4)]) {
- e.mIsConnected[getOppositeSide(e4)] = true;
- }
- if (!this.mIsConnected[e4]) {
- this.mIsConnected[e4] = true;
- }
- mConnectedCache.put(e.mCurrentPos.getUniqueIdentifier());
- continue;
- }
- }
- }
- }
- e4++;
- }
- return true;
- } else {
- return false;
- }
- }
-
- public boolean doesSideContainCrate(int side) {
- return checkSideForDataType(0, side);
- }
-
- public boolean isCrateAtSideController(int side) {
- return checkSideForDataType(1, side);
- }
-
- private boolean checkSideForDataType(int aType, int ordinalSide) {
- BlockPos mPosToCheck = ordinalSide == SIDE_Up ? mCurrentPos.getUp()
- : ordinalSide == SIDE_Down ? mCurrentPos.getDown()
- : ordinalSide == SIDE_XPos ? mCurrentPos.getXPos()
- : ordinalSide == SIDE_XNeg ? mCurrentPos.getXNeg()
- : ordinalSide == SIDE_ZPos ? mCurrentPos.getZPos() : mCurrentPos.getZNeg();
- GT_MetaTileEntity_ConnectableCrate g = getCrateAtBlockPos(mPosToCheck);
- if (g != null) {
- if (aType == 0) {
- return true;
- } else {
- if (g.mIsMaster) {
- return true;
- }
- }
- }
- return false;
- }
-
- public GT_MetaTileEntity_ConnectableCrate getCrateAtBlockPos(BlockPos pos) {
- if (pos != null) {
- Block b = pos.getBlockAtPos();
- int m = pos.getMetaAtPos();
- TileEntity t = pos.world.getTileEntity(pos.xPos, pos.yPos, pos.zPos);
- if (b != null && t != null) {
- if (b == GregTech_API.sBlockMachines && m == mCrateID) {
- if (t instanceof IGregTechTileEntity) {
- IGregTechTileEntity g = (IGregTechTileEntity) t;
- final IMetaTileEntity aMetaTileEntity = g.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return null;
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_ConnectableCrate) {
- return ((GT_MetaTileEntity_ConnectableCrate) aMetaTileEntity);
- }
- }
- }
- }
- }
- return null;
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer);
- return true;
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTimer) {
- if (this.getBaseMetaTileEntity().isServerSide() && this.getBaseMetaTileEntity().isAllowedToWork()) {
- if (this.getItemCount() <= 0) {
- this.mItemStack = null;
- this.mItemCount = 0;
- }
-
- if (this.mItemStack == null && this.mInventory[0] != null) {
- this.mItemStack = this.mInventory[0].copy();
- }
-
- if (this.mInventory[0] != null && this.mItemCount < this.getMaxItemCount()
- && GT_Utility.areStacksEqual(this.mInventory[0], this.mItemStack)) {
- this.mItemCount += this.mInventory[0].stackSize;
- if (this.mItemCount > this.getMaxItemCount()) {
- this.mInventory[0].stackSize = this.mItemCount - this.getMaxItemCount();
- this.mItemCount = this.getMaxItemCount();
- } else {
- this.mInventory[0] = null;
- }
- }
-
- if (this.mInventory[1] == null && this.mItemStack != null) {
- this.mInventory[1] = this.mItemStack.copy();
- this.mInventory[1].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount);
- this.mItemCount -= this.mInventory[1].stackSize;
- } else if (this.mItemCount > 0 && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack)
- && this.mInventory[1].getMaxStackSize() > this.mInventory[1].stackSize) {
- int tmp = Math.min(
- this.mItemCount,
- this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize);
- this.mInventory[1].stackSize += tmp;
- this.mItemCount -= tmp;
- }
-
- if (this.mItemStack != null) {
- this.mInventory[2] = this.mItemStack.copy();
- this.mInventory[2].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount);
- } else {
- this.mInventory[2] = null;
- }
- }
- }
-
- private int getItemCount() {
- return this.mItemCount;
- }
-
- @Override
- public void setItemCount(int aCount) {
- this.mItemCount = aCount;
- }
-
- @Override
- public int getProgresstime() {
- return this.mItemCount + (this.mInventory[0] == null ? 0 : this.mInventory[0].stackSize)
- + (this.mInventory[1] == null ? 0 : this.mInventory[1].stackSize);
- }
-
- @Override
- public int maxProgresstime() {
- return this.getMaxItemCount();
- }
-
- @Override
- public int getMaxItemCount() {
- return (int) (Math.pow(6.0D, (double) this.mTier) * mStorageFactor - 128.0D);
- }
-
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side,
- ItemStack aStack) {
- return aIndex == 1;
- }
-
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, ForgeDirection side,
- ItemStack aStack) {
- return aIndex == 0 && (this.mInventory[0] == null || GT_Utility.areStacksEqual(this.mInventory[0], aStack));
- }
-
- @Override
- public String[] getInfoData() {
- return this.mItemStack == null
- ? new String[] { "Super Storage Chest", "Stored Items:", "No Items", Integer.toString(0),
- Integer.toString(this.getMaxItemCount()) }
- : new String[] { "Super Storage Chest", "Stored Items:", this.mItemStack.getDisplayName(),
- Integer.toString(this.mItemCount), Integer.toString(this.getMaxItemCount()) };
- }
-
- @Override
- public boolean isGivingInformation() {
- return true;
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- aNBT.setInteger("mItemCount", this.mItemCount);
- if (this.mItemStack != null) {
- aNBT.setTag("mItemStack", this.mItemStack.writeToNBT(new NBTTagCompound()));
- }
- aNBT.setString("mMasterCrateLocation", mMasterCrateLocation.getUniqueIdentifier());
- aNBT.setBoolean("mIsMaster", mIsMaster);
- for (int y = 0; y < this.mIsConnected.length; y++) {
- aNBT.setBoolean("mIsConnected" + y, mIsConnected[y]);
- }
- aNBT.setInteger("mConnectedCount", mConnectedCount);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- if (aNBT.hasKey("mItemCount")) {
- this.mItemCount = aNBT.getInteger("mItemCount");
- }
- if (aNBT.hasKey("mItemStack")) {
- this.mItemStack = ItemStack.loadItemStackFromNBT((NBTTagCompound) aNBT.getTag("mItemStack"));
- }
- if (aNBT.hasKey("mMasterCrateLocation")) {
- this.mMasterCrateLocation = BlockPos.generateBlockPos(aNBT.getString("mMasterCrateLocation"));
- }
- if (aNBT.hasKey("mIsMaster")) {
- this.mIsMaster = aNBT.getBoolean("mIsMaster");
- }
-
- for (int y = 0; y < this.mIsConnected.length; y++) {
- if (aNBT.hasKey("mIsConnected" + y)) {
- this.mIsConnected[y] = aNBT.getBoolean("mIsConnected" + y);
- }
- }
-
- if (aNBT.hasKey("mConnectedCount")) {
- this.mConnectedCount = aNBT.getInteger("mConnectedCount");
- }
- }
-
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, ForgeDirection side, ForgeDirection facing,
- int aColorIndex, boolean aActive, boolean aRedstone) {
- return aBaseMetaTileEntity.getFrontFacing() == ForgeDirection.DOWN && side == ForgeDirection.WEST
- ? new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.TEXTURE_CASING_AMAZON),
- new GT_RenderedTexture(BlockIcons.OVERLAY_QCHEST) }
- : (side == aBaseMetaTileEntity.getFrontFacing()
- ? new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.TEXTURE_CASING_AMAZON),
- new GT_RenderedTexture(BlockIcons.OVERLAY_QCHEST) }
- : new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.TEXTURE_CASING_AMAZON) });
- }
-
- @Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- return new ITexture[0][0][0];
- }
-
- @Override
- public void onExplosion() {
- // TODO Auto-generated method stub
- super.onExplosion();
- }
-
- @Override
- public void onRemoval() {
- // TODO Auto-generated method stub
- super.onRemoval();
- }
-
- @Override
- public void onMachineBlockUpdate() {
- // TODO Auto-generated method stub
- super.onMachineBlockUpdate();
- }
-
- @Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
- public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(7, 16).setSize(71, 45))
- .widget(
- new SlotWidget(inventoryHandler, 0)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN)
- .setPos(79, 16))
- .widget(
- new SlotWidget(inventoryHandler, 1).setAccess(true, false)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_OUT)
- .setPos(79, 52))
- .widget(
- SlotWidget.phantom(inventoryHandler, 2).disableInteraction()
- .setBackground(GT_UITextures.TRANSPARENT).setPos(59, 42))
- .widget(new TextWidget("Item Amount").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 20)).widget(
- TextWidget.dynamicString(() -> GT_Utility.parseNumberToString(mItemCount))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 30));
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java
deleted file mode 100644
index 9e7b7d03e5..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.tileentities.storage;
-
-import org.apache.commons.lang3.ArrayUtils;
-
-import com.gtnewhorizons.modularui.api.screen.ModularWindow;
-import com.gtnewhorizons.modularui.api.screen.UIBuildContext;
-import com.gtnewhorizons.modularui.common.widget.ButtonWidget;
-import com.gtnewhorizons.modularui.common.widget.FakeSyncWidget;
-import com.gtnewhorizons.modularui.common.widget.SlotGroup;
-import com.gtnewhorizons.modularui.common.widget.TextWidget;
-
-import gregtech.api.enums.Textures;
-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.objects.GT_RenderedTexture;
-import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.xmod.gregtech.api.gui.GTPP_UITextures;
-import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines.GregtechMetaSafeBlockBase;
-
-public class GregtechMetaSafeBlock extends GregtechMetaSafeBlockBase implements IAddUIWidgets {
-
- public GregtechMetaSafeBlock(final int aID, final String aName, final String aNameRegional, final int aTier) {
- super(aID, aName, aNameRegional, aTier, 28, "Protecting your items from sticky fingers.");
- }
-
- public GregtechMetaSafeBlock(final String aName, final int aTier, final int aInvSlotCount,
- final String[] aDescription, final ITexture[][][] aTextures) {
- super(aName, aTier, aInvSlotCount, aDescription, aTextures);
- }
-
- @Override
- public String[] getDescription() {
- return ArrayUtils.add(this.mDescriptionArray, CORE.GT_Tooltip.get());
- }
-
- @Override
- public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
- return new GregtechMetaSafeBlock(
- this.mName,
- this.mTier,
- this.mInventory.length,
- this.mDescriptionArray,
- this.mTextures);
- }
-
- @Override
- public ITexture getOverlayIcon() {
- return new GT_RenderedTexture(Textures.BlockIcons.VOID);
- }
-
- @Override
- public boolean isValidSlot(final int aIndex) {
- return aIndex < (this.mInventory.length - 1);
- }
-
- @Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
- public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(SlotGroup.ofItemHandler(inventoryHandler, 9).endAtSlot(26).build().setPos(7, 4))
- .widget(
- new ButtonWidget().setOnClick((clickData, widget) -> bUnbreakable = !bUnbreakable)
- .setBackground(GT_UITextures.BUTTON_STANDARD, GTPP_UITextures.OVERLAY_BUTTON_LOCK)
- .setPos(43, 62).setSize(18, 18))
- .widget(new TextWidget("Safe Status").setPos(76, 61))
- .widget(
- TextWidget.dynamicString(() -> bUnbreakable ? "Locked" : "Unlocked").setSynced(false)
- .setPos(82, 73))
- .widget(new FakeSyncWidget.BooleanSyncer(() -> bUnbreakable, val -> bUnbreakable = val));
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java
deleted file mode 100644
index aeea5b33e8..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf.java
+++ /dev/null
@@ -1,365 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
-
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import org.apache.commons.lang3.ArrayUtils;
-
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicHull_NonElectric;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import gtPlusPlus.core.util.Utils;
-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;
-
-public class GT4Entity_Shelf extends GT_MetaTileEntity_BasicHull_NonElectric {
-
- public byte mType = 0;
- public boolean mLocked = false;
- protected byte mIndex = (byte) MathUtils.randInt(1, 3);
- public static GT_RenderedTexture texBottom = new GT_RenderedTexture(
- new CustomIcon("TileEntities/gt4/machine_bottom"));
- public static GT_RenderedTexture texTop = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_top"));
- public static GT_RenderedTexture texSide = new GT_RenderedTexture(new CustomIcon("TileEntities/gt4/machine_side"));
- public static GT_RenderedTexture texSideCabinet = new GT_RenderedTexture(
- new CustomIcon("TileEntities/gt4/machine_side_cabinet"));
-
- public GT4Entity_Shelf(final int aID, final String aName, final String aNameRegional, final String aDescription) {
- super(aID, aName, aNameRegional, 0, aDescription);
- }
-
- public GT4Entity_Shelf(final String aName, final String[] aDescription, final ITexture[][][] aTextures) {
- super(aName, 0, aDescription, aTextures);
- }
-
- @Override
- public boolean isSimpleMachine() {
- return true;
- }
-
- @Override
- public boolean isFacingValid(ForgeDirection facing) {
- return facing.offsetY == 0;
- }
-
- @Override
- public boolean isAccessAllowed(EntityPlayer aPlayer) {
- if (this.getBaseMetaTileEntity().getOwnerName().equalsIgnoreCase(aPlayer.getDisplayName())) {
- return true;
- }
- PlayerUtils.messagePlayer(
- aPlayer,
- "This container belongs to " + this.getBaseMetaTileEntity().getOwnerName() + ".");
- return false;
- }
-
- @Override
- public boolean ownerControl() {
- return false;
- }
-
- @Override
- public boolean isEnetOutput() {
- return false;
- }
-
- @Override
- public boolean isEnetInput() {
- return false;
- }
-
- @Override
- public boolean isOutputFacing(final ForgeDirection side) {
- return side != this.getBaseMetaTileEntity().getFrontFacing();
- }
-
- @Override
- public boolean isInputFacing(ForgeDirection side) {
- return false;
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aTile, EntityPlayer aPlayer) {
- if (aTile.isClientSide()) {
- return true;
- }
- ItemStack tStack = aPlayer.inventory.getStackInSlot(aPlayer.inventory.currentItem);
- if (tStack == null) {
- if (KeyboardUtils.isCtrlKeyDown()) {
- if (this.mInventory[0] != null) {
- PlayerUtils.messagePlayer(
- aPlayer,
- "Contains " + this.mInventory[0].getDisplayName()
- + " x"
- + this.mInventory[0].stackSize
- + ".");
- }
- return false;
- } else {
- if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) {
- if (!this.mLocked) {
- PlayerUtils.messagePlayer(
- aPlayer,
- "Removed " + this.mInventory[0].getDisplayName()
- + " x"
- + this.mInventory[0].stackSize
- + ".");
- aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, this.mInventory[0]);
- getBaseMetaTileEntity().setInventorySlotContents(0, null);
- this.mType = 0;
- return true;
- } else {
- PlayerUtils.messagePlayer(
- aPlayer,
- "This container is locked. It belongs to " + aTile.getOwnerName() + ".");
- return false;
- }
- }
- return false;
- }
- } else if (tStack != null && this.mInventory[0] == null) {
-
- if (KeyboardUtils.isCtrlKeyDown() || GT_MetaGenerated_Tool_01.class.isInstance(tStack.getItem())) {
- return false;
- }
- PlayerUtils.messagePlayer(aPlayer, "Stored " + tStack.getDisplayName() + " x" + tStack.stackSize + ".");
- aPlayer.inventory.setInventorySlotContents(aPlayer.inventory.currentItem, null);
- getBaseMetaTileEntity().setInventorySlotContents(0, tStack);
- this.mType = (byte) MathUtils.randInt(1, 3);
- return true;
- } else {
- if (this.mInventory[0] == null) {
- this.mType = 0;
- }
- return super.onRightclick(aTile, aPlayer);
- }
- }
-
- @Override
- public void onLeftclick(IGregTechTileEntity aTile, EntityPlayer aPlayer) {
- if ((this.mInventory[0] != null) && (this.mInventory[0].stackSize > 0)) {
- ItemStack tOutput = GT_Utility.copy(new Object[] { this.mInventory[0] });
- if (!aPlayer.isSneaking()) {
- tOutput.stackSize = 1;
- }
- getBaseMetaTileEntity().decrStackSize(0, tOutput.stackSize);
- EntityItem tEntity = new EntityItem(
- getBaseMetaTileEntity().getWorld(),
- getBaseMetaTileEntity().getOffsetX(getBaseMetaTileEntity().getFrontFacing(), 1) + 0.5D,
- getBaseMetaTileEntity().getOffsetY(getBaseMetaTileEntity().getFrontFacing(), 1) + 0.5D,
- getBaseMetaTileEntity().getOffsetZ(getBaseMetaTileEntity().getFrontFacing(), 1) + 0.5D,
- tOutput);
- tEntity.motionX = 0.0D;
- tEntity.motionY = 0.0D;
- tEntity.motionZ = 0.0D;
- getBaseMetaTileEntity().getWorld().spawnEntityInWorld(tEntity);
- if (this.mInventory[0] == null) {
- this.mType = 0;
- }
- }
- super.onLeftclick(aTile, aPlayer);
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT4Entity_Shelf(this.mName, this.mDescriptionArray, this.mTextures);
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) { // mLocked
- aNBT.setInteger("mType", this.mType);
- aNBT.setBoolean("mLocked", this.mLocked);
- aNBT.setByte("mIndex", this.mIndex);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- if (aNBT.hasKey("mIndex")) {
- this.mType = ((byte) aNBT.getInteger("mType"));
- }
- if (aNBT.hasKey("mIndex")) {
- this.mLocked = (aNBT.getBoolean("mLocked"));
- }
- if (aNBT.hasKey("mIndex")) {
- this.mIndex = aNBT.getByte("mIndex");
- }
- }
-
- @Override
- public void onValueUpdate(byte aValue) {
- this.mType = aValue;
- }
-
- @Override
- public byte getUpdateData() {
- return this.mType;
- }
-
- @Override
- public String[] getDescription() {
- return ArrayUtils.addAll(
- mDescriptionArray,
- "Decorative Item Storage",
- "Right click to store/remove something",
- "Ctrl + Rmb to check contents",
- "Ctrl + Rmb with a screwdriver to lock");
- }
-
- @Override
- public byte getTileEntityBaseType() {
- return 0;
- }
-
- @Override
- public boolean allowCoverOnSide(ForgeDirection side, GT_ItemStack aStack) {
- // return side != getBaseMetaTileEntity().getFrontFacing();
- return false;
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity p0, int p1, ForgeDirection side, ItemStack p3) {
- return true;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity p0, int p1, ForgeDirection side, ItemStack p3) {
- return false;
- }
-
- @Override
- public ITexture[][][] getTextureSet(ITexture[] aTextures) {
- ITexture[][][] rTextures = new ITexture[7][17][];
- for (byte i = -1; i < 16; i = (byte) (i + 1)) {
- ITexture[] tmp0 = { this.getBottom((byte) 0)[0] };
- rTextures[0][(i + 1)] = tmp0;
- ITexture[] tmp1 = { this.getTop((byte) 0)[0] };
- rTextures[1][(i + 1)] = tmp1;
- ITexture[] tmp2 = { this.getSides((byte) 0)[0] };
- rTextures[2][(i + 1)] = tmp2;
- ITexture[] tmp4 = { this.getSides((byte) 0)[0] };
- rTextures[3][(i + 1)] = tmp4;
- ITexture[] tmp5 = { this.getSides((byte) 0)[0], getFront((byte) 0)[0] };
- rTextures[4][(i + 1)] = tmp5;
- ITexture[] tmp6 = { this.getSides((byte) 0)[0], getFront((byte) 1)[0] };
- rTextures[5][(i + 1)] = tmp6;
- ITexture[] tmp7 = { this.getSides((byte) 0)[0], getFront((byte) 2)[0] };
- rTextures[6][(i + 1)] = tmp7;
- }
- return rTextures;
- }
-
- @Override
- public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final ForgeDirection side,
- final ForgeDirection facing, final int aColorIndex, final boolean aActive, final boolean aRedstone) {
-
- ITexture[] tmp = this.mTextures[(side.offsetY == 0)
- ? ((side != facing) ? 2
- : ((byte) this.mType == 0 ? 4
- : this.mType == 1 || this.mType == 2 ? 5 : this.mType == 3 ? 6 : 0))
- : side.ordinal()][aColorIndex + 1];
- if (side != facing && tmp.length == 2) {
- tmp = new ITexture[] { tmp[0] };
- }
- return tmp;
- }
-
- private static GT_RenderedTexture x1 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_FRONT);
- private static GT_RenderedTexture x2 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_PAPER_FRONT);
- private static GT_RenderedTexture x3 = new GT_RenderedTexture(TexturesGtBlock.OVERLAY_WOODEN_SHELF_CANS_FRONT);
-
- public ITexture[] getFrontNormal() {
- return new ITexture[] { x1 };
- }
-
- public ITexture[] getFrontActive() {
- return new ITexture[] { x2 };
- }
-
- public ITexture[] getFrontAlternative() {
- return new ITexture[] { x3 };
- }
-
- public ITexture[] getBack(final byte aColor) {
- return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks) };
- }
-
- public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.Casing_Machine_Acacia_Log) };
- }
-
- public ITexture[] getTop(final byte aColor) {
- return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks) };
- }
-
- public ITexture[] getSides(final byte aColor) {
- return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks) };
- }
-
- public ITexture[] getFrontActive(final byte aColor) {
- return this.getFrontNormal();
- }
-
- public ITexture[] getBackActive(final byte aColor) {
- return this.getBack(aColor);
- }
-
- public ITexture[] getBottomActive(final byte aColor) {
- return this.getBottom(aColor);
- }
-
- public ITexture[] getTopActive(final byte aColor) {
- return this.getTop(aColor);
- }
-
- public ITexture[] getSidesActive(final byte aColor) {
- return this.getSides(aColor);
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- super.onPostTick(aBaseMetaTileEntity, aTick);
- }
-
- public ITexture[] getFront(byte aColour) {
- if (aColour == 1) {
- return getFrontActive();
- } else if (aColour == 2) {
- return getFrontAlternative();
- }
- return getFrontNormal();
- }
-
- @Override
- public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (KeyboardUtils.isCtrlKeyDown()) {
- if (!aPlayer.getDisplayName().equalsIgnoreCase(this.getBaseMetaTileEntity().getOwnerName())) {
- PlayerUtils.messagePlayer(aPlayer, "Container is not yours to lock.");
- } else {
- this.mLocked = Utils.invertBoolean(this.mLocked);
- if (this.mLocked) {
- PlayerUtils.messagePlayer(aPlayer, "Container is now locked.");
- } else {
- PlayerUtils.messagePlayer(aPlayer, "Container is now unlocked.");
- }
- }
- } else {
- super.onScrewdriverRightClick(side, aPlayer, aX, aY, aZ);
- }
- }
-
- @Override
- public void onPreTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- super.onPreTick(aBaseMetaTileEntity, aTick);
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java
deleted file mode 100644
index fec96cbdd4..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Compartment.java
+++ /dev/null
@@ -1,40 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-
-public class GT4Entity_Shelf_Compartment extends GT4Entity_Shelf {
-
- public GT4Entity_Shelf_Compartment(final int aID, final String aName, final String aNameRegional,
- final String aDescription) {
- super(aID, aName, aNameRegional, aDescription);
- }
-
- public GT4Entity_Shelf_Compartment(String mName, String[] mDescriptionArray, ITexture[][][] mTextures) {
- super(mName, mDescriptionArray, mTextures);
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT4Entity_Shelf_Compartment(this.mName, this.mDescriptionArray, this.mTextures);
- }
-
- @Override
- public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (side == getBaseMetaTileEntity().getFrontFacing()) {
- this.mType = ((byte) ((this.mType + 1) % 16));
- PlayerUtils.messagePlayer(aPlayer, "Set type to " + this.mType + ".");
- }
- }
-
- @Override
- public ITexture[] getFront(final byte aColor) {
- return new ITexture[] { TexturesGtBlock.OVERLAYS_COMPARTMENT_FRONT[this.mType < 16 ? this.mType : 0] };
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java
deleted file mode 100644
index e486292995..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Desk.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
-
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-
-public class GT4Entity_Shelf_Desk extends GT4Entity_Shelf {
-
- public GT4Entity_Shelf_Desk(final int aID, final String aName, final String aNameRegional,
- final String aDescription) {
- super(aID, aName, aNameRegional, aDescription);
- }
-
- public GT4Entity_Shelf_Desk(String mName, String[] mDescriptionArray, ITexture[][][] mTextures) {
- super(mName, mDescriptionArray, mTextures);
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT4Entity_Shelf_Desk(this.mName, this.mDescriptionArray, this.mTextures);
- }
-
- @Override
- public ITexture[] getFront(final byte aColor) {
- return new ITexture[] { TexturesGtBlock.OVERLAYS_CABINET_FRONT[this.mType < 16 ? this.mType : 0] };
- }
-
- @Override
- public ITexture[] getBack(final byte aColor) {
- return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks) };
- }
-
- @Override
- public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks) };
- }
-
- @Override
- public ITexture[] getTop(final byte aColor) {
- return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks) };
- }
-
- @Override
- public ITexture[] getSides(final byte aColor) {
- return new ITexture[] { new GT_RenderedTexture(TexturesGtBlock.VanillaIcon_OakPlanks) };
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java
deleted file mode 100644
index 60fc4d511e..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_FileCabinet.java
+++ /dev/null
@@ -1,60 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraftforge.common.util.ForgeDirection;
-
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
-
-public class GT4Entity_Shelf_FileCabinet extends GT4Entity_Shelf {
-
- public GT4Entity_Shelf_FileCabinet(final int aID, final String aName, final String aNameRegional,
- final String aDescription) {
- super(aID, aName, aNameRegional, aDescription);
- }
-
- public GT4Entity_Shelf_FileCabinet(String mName, String[] mDescriptionArray, ITexture[][][] mTextures) {
- super(mName, mDescriptionArray, mTextures);
- }
-
- @Override
- public void onScrewdriverRightClick(ForgeDirection side, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (side == getBaseMetaTileEntity().getFrontFacing()) {
- this.mType = ((byte) ((this.mType + 1) % 16));
- PlayerUtils.messagePlayer(aPlayer, "Set type to " + this.mType + ".");
- }
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT4Entity_Shelf_FileCabinet(this.mName, this.mDescriptionArray, this.mTextures);
- }
-
- @Override
- public ITexture[] getFront(final byte aColor) {
- return new ITexture[] { TexturesGtBlock.OVERLAYS_CABINET_FRONT[this.mType < 16 ? this.mType : 0] };
- }
-
- @Override
- public ITexture[] getBack(final byte aColor) {
- return new ITexture[] { texSide };
- }
-
- @Override
- public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] { texBottom };
- }
-
- @Override
- public ITexture[] getTop(final byte aColor) {
- return new ITexture[] { texTop };
- }
-
- @Override
- public ITexture[] getSides(final byte aColor) {
- return new ITexture[] { texSide };
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java
deleted file mode 100644
index e870113951..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Iron.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
-
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-
-public class GT4Entity_Shelf_Iron extends GT4Entity_Shelf {
-
- public GT4Entity_Shelf_Iron(final int aID, final String aName, final String aNameRegional,
- final String aDescription) {
- super(aID, aName, aNameRegional, aDescription);
- }
-
- public GT4Entity_Shelf_Iron(String mName, String[] mDescriptionArray, ITexture[][][] mTextures) {
- super(mName, mDescriptionArray, mTextures);
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT4Entity_Shelf_Iron(this.mName, this.mDescriptionArray, this.mTextures);
- }
-
- @Override
- public ITexture[] getFront(final byte aColor) {
- return new ITexture[] { texSideCabinet };
- }
-
- @Override
- public ITexture[] getBack(final byte aColor) {
- return new ITexture[] { texSide };
- }
-
- @Override
- public ITexture[] getBottom(final byte aColor) {
- return new ITexture[] { texBottom };
- }
-
- @Override
- public ITexture[] getTop(final byte aColor) {
- return new ITexture[] { texTop };
- }
-
- @Override
- public ITexture[] getSides(final byte aColor) {
- return new ITexture[] { texSide };
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java
deleted file mode 100644
index c2fd2674d8..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/shelving/GT4Entity_Shelf_Large.java
+++ /dev/null
@@ -1,276 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
-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.gui.modularui.GT_UIInfos;
-import gregtech.api.gui.modularui.GT_UITextures;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.util.GT_Utility;
-import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import gtPlusPlus.core.util.sys.KeyboardUtils;
-
-public class GT4Entity_Shelf_Large extends GT4Entity_Shelf {
-
- private final int mSize;
- public int mItemCount;
- public ItemStack mItemStack;
-
- public GT4Entity_Shelf_Large(final int aID, final String aName, final String aNameRegional,
- final String aDescription, final int aSize) {
- super(aID, aName, aNameRegional, aDescription);
- this.mSize = aSize;
- this.mItemCount = 0;
- this.mItemStack = null;
- }
-
- public GT4Entity_Shelf_Large(String mName, String[] mDescriptionArray, final int aSize, ITexture[][][] mTextures) {
- super(mName, mDescriptionArray, mTextures);
- this.mSize = aSize;
- this.mItemCount = 0;
- this.mItemStack = null;
- }
-
- @Override
- public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT4Entity_Shelf_Large(this.mName, this.mDescriptionArray, mSize, this.mTextures);
- }
-
- @Override
- public boolean isGivingInformation() {
- return true;
- }
-
- @Override
- public boolean isDigitalChest() {
- return true;
- }
-
- @Override
- public boolean isValidSlot(final int aIndex) {
- return true;
- }
-
- @Override
- public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) {
- return true;
- }
- if (KeyboardUtils.isCtrlKeyDown()) {
- String itemName = (this.mItemStack != null ? this.mItemStack.getDisplayName() : "Nothing.");
- String itemAmount = (this.mItemCount > 0 ? "" + this.mItemCount : "bad");
- String itemMessage = "This container currently holds "
- + (itemAmount.equalsIgnoreCase("bad") ? "nothing." : itemName + " x" + itemAmount + ".");
- PlayerUtils.messagePlayer(aPlayer, itemMessage);
- } else {
- GT_UIInfos.openGTTileEntityUI(aBaseMetaTileEntity, aPlayer);
- }
- return true;
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- aNBT.setInteger("mItemCount", this.mItemCount);
- if (this.mItemStack != null) {
- aNBT.setTag("mItemStack", (NBTBase) this.mItemStack.writeToNBT(new NBTTagCompound()));
- }
- super.saveNBTData(aNBT);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- if (aNBT.hasKey("mItemCount")) {
- this.mItemCount = aNBT.getInteger("mItemCount");
- }
- if (aNBT.hasKey("mItemStack")) {
- this.mItemStack = ItemStack.loadItemStackFromNBT((NBTTagCompound) aNBT.getTag("mItemStack"));
- }
- super.loadNBTData(aNBT);
- }
-
- @Override
- public void onOpenGUI() {
- super.onOpenGUI();
- }
-
- @Override
- public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTimer) {
- if (this.getBaseMetaTileEntity().isServerSide() && this.getBaseMetaTileEntity().isAllowedToWork()) {
- try {
- if (this.mInventory[0] != null) {
- this.mType = (byte) this.mIndex;
- } else {
- this.mType = 0;
- }
-
- if (this.getItemCount() <= 0) {
- this.mItemStack = null;
- this.mItemCount = 0;
- }
- if (this.mItemStack == null && this.mInventory[0] != null) {
- this.mItemStack = this.mInventory[0].copy();
- }
- if (this.mInventory[0] != null && this.mItemCount < this.getMaxItemCount()
- && GT_Utility.areStacksEqual(this.mInventory[0], this.mItemStack)) {
- this.mItemCount += this.mInventory[0].stackSize;
- if (this.mItemCount > this.getMaxItemCount()) {
- this.mInventory[0].stackSize = this.mItemCount - this.getMaxItemCount();
- this.mItemCount = this.getMaxItemCount();
- } else {
- this.mInventory[0] = null;
- }
- }
- if (this.mInventory[1] == null && this.mItemStack != null) {
- this.mInventory[1] = this.mItemStack.copy();
- this.mInventory[1].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount);
- this.mItemCount -= this.mInventory[1].stackSize;
- } else if (this.mItemCount > 0 && GT_Utility.areStacksEqual(this.mInventory[1], this.mItemStack)
- && this.mInventory[1].getMaxStackSize() > this.mInventory[1].stackSize) {
- final int tmp = Math.min(
- this.mItemCount,
- this.mInventory[1].getMaxStackSize() - this.mInventory[1].stackSize);
- final ItemStack itemStack = this.mInventory[1];
- itemStack.stackSize += tmp;
- this.mItemCount -= tmp;
- }
- if (this.mItemStack != null) {
- this.mInventory[2] = this.mItemStack.copy();
- this.mInventory[2].stackSize = Math.min(this.mItemStack.getMaxStackSize(), this.mItemCount);
- } else {
- this.mInventory[2] = null;
- }
- } catch (Throwable t) {
- if (t instanceof ArrayIndexOutOfBoundsException) {}
- }
- }
- }
-
- private int getItemCount() {
- return this.mItemCount;
- }
-
- @Override
- public void setItemCount(final int aCount) {
- this.mItemCount = aCount;
- }
-
- @Override
- public int getProgresstime() {
- try {
- return this.mItemCount + ((this.mInventory[0] == null) ? 0 : this.mInventory[0].stackSize)
- + ((this.mInventory[1] == null) ? 0 : this.mInventory[1].stackSize);
- } catch (Throwable t) {
- return 0;
- }
- }
-
- @Override
- public int maxProgresstime() {
- return this.getMaxItemCount();
- }
-
- @Override
- public int getMaxItemCount() {
- return this.mSize;
- }
-
- @Override
- public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex,
- final ForgeDirection side, final ItemStack aStack) {
- return aIndex == 1;
- }
-
- @Override
- public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex,
- final ForgeDirection side, final ItemStack aStack) {
- return aIndex == 0 && ((this.mInventory[0] == null && this.mItemStack == null)
- || GT_Utility.areStacksEqual(this.mInventory[0], aStack)
- || (this.mItemStack != null && GT_Utility.areStacksEqual(this.mItemStack, aStack)));
- }
-
- @Override
- public String[] getInfoData() {
- if (this.mItemStack == null) {
- return new String[] { this.getLocalName(), "No Items Stored",
- "Free Space: " + Integer.toString(this.getMaxItemCount()) };
- }
- return new String[] { this.getLocalName(),
- "Storing: " + this.mItemStack.getDisplayName() + " x" + Integer.toString(this.mItemCount),
- "Space Remaining: " + Integer.toString(this.getMaxItemCount() - this.getItemCount())
- + "/"
- + Integer.toString(this.getMaxItemCount()) };
- }
-
- @Override
- public String[] getDescription() {
- String[] mSuper = super.getDescription();
- String[] desc = new String[mSuper.length + 1];
- for (int i = 0; i > mSuper.length; i++) {
- desc[i] = mSuper[i];
- }
- desc[desc.length - 1] = "Control + Rmb block to check contents";
- return desc;
- }
-
- @Override
- public boolean isItemValidForSlot(int aIndex, ItemStack aStack) {
- Logger.INFO("1:" + aIndex);
- if (aIndex == 2) {
- if (ItemStack.areItemStacksEqual(aStack, mItemStack)) {
- return true;
- } else {
- if (mItemStack == null) {
- return true;
- }
- return false;
- }
- }
- return super.isItemValidForSlot(aIndex, aStack);
- }
-
- @Override
- public boolean canInsertItem(int aIndex, ItemStack aStack, int ordinalSide) {
- Logger.INFO("2:" + aIndex);
- if (aIndex == 0) {
- if (ItemStack.areItemStacksEqual(aStack, mItemStack)) {
- return true;
- } else {
- if (mItemStack == null) {
- return true;
- }
- return false;
- }
- }
- return super.canInsertItem(aIndex, aStack, ordinalSide);
- }
-
- @Override
- public boolean useModularUI() {
- return true;
- }
-
- @Override
- public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildContext) {
- builder.widget(
- new DrawableWidget().setDrawable(GT_UITextures.PICTURE_SCREEN_BLACK).setPos(7, 16).setSize(71, 45))
- .widget(
- new SlotWidget(inventoryHandler, 0)
- .setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_IN)
- .setPos(79, 16))
- .widget(new TextWidget("Item Amount").setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 20)).widget(
- TextWidget.dynamicString(() -> GT_Utility.parseNumberToString(mItemCount))
- .setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(10, 30));
- }
-}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java b/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java
deleted file mode 100644
index be943cd398..0000000000
--- a/src/main/java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_Choocher.java
+++ /dev/null
@@ -1,231 +0,0 @@
-package gtPlusPlus.xmod.gregtech.common.tools;
-
-import java.util.Arrays;
-import java.util.List;
-
-import net.minecraft.block.Block;
-import net.minecraft.block.material.Material;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.monster.EntityIronGolem;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraft.stats.AchievementList;
-import net.minecraft.util.ChatComponentText;
-import net.minecraft.util.EnumChatFormatting;
-import net.minecraft.util.IChatComponent;
-import net.minecraftforge.event.world.BlockEvent;
-
-import gregtech.GT_Mod;
-import gregtech.api.enums.SoundResource;
-import gregtech.api.interfaces.IIconContainer;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.tools.GT_Tool;
-import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtTools;
-import gtPlusPlus.xmod.gregtech.common.items.behaviours.Behaviour_Choocher;
-
-public class TOOL_Gregtech_Choocher extends GT_Tool {
-
- public static final List<String> mEffectiveList = Arrays
- .asList(new String[] { EntityIronGolem.class.getName(), "EntityTowerGuardian" });
-
- @Override
- public float getNormalDamageAgainstEntity(final float aOriginalDamage, final Entity aEntity, final ItemStack aStack,
- final EntityPlayer aPlayer) {
- String tName = aEntity.getClass().getName();
- tName = tName.substring(tName.lastIndexOf(".") + 1);
- return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage;
- }
-
- @Override
- public int getToolDamagePerBlockBreak() {
- return 50;
- }
-
- @Override
- public int getToolDamagePerDropConversion() {
- return 100;
- }
-
- @Override
- public int getToolDamagePerContainerCraft() {
- return 400;
- }
-
- @Override
- public int getToolDamagePerEntityAttack() {
- return 100;
- }
-
- @Override
- public int getBaseQuality() {
- return 0;
- }
-
- @Override
- public float getBaseDamage() {
- return 4.0F;
- }
-
- @Override
- public float getSpeedMultiplier() {
- return 0.85F;
- }
-
- @Override
- public float getMaxDurabilityMultiplier() {
- return 1.2F;
- }
-
- @Override
- public String getCraftingSound() {
- return SoundResource.RANDOM_ANVIL_USE.toString();
- }
-
- @Override
- public String getEntityHitSound() {
- return SoundResource.RANDOM_ANVIL_BREAK.toString();
- }
-
- @Override
- public String getMiningSound() {
- return null;
- }
-
- @Override
- public boolean canBlock() {
- return true;
- }
-
- @Override
- public boolean isWrench() {
- return true;
- }
-
- @Override
- public boolean isCrowbar() {
- return false;
- }
-
- @Override
- public boolean isWeapon() {
- return true;
- }
-
- @Override
- public boolean isMinableBlock(final Block aBlock, final byte aMetaData) {
- final String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("sword")) || (tTool.equals("wrench"))
- || (tTool.equals("hammer"))
- || (tTool.equals("pickaxe")))) || (aBlock.getMaterial() == Material.rock)
- || (aBlock.getMaterial() == Material.glass)
- || (aBlock.getMaterial() == Material.piston)
- || (aBlock == Blocks.hopper)
- || (aBlock == Blocks.dispenser)
- || (aBlock == Blocks.dropper)
- || (aBlock.getMaterial() == Material.ice)
- || (aBlock.getMaterial() == Material.packedIce)
- || (GT_Recipe.GT_Recipe_Map.sHammerRecipes.containsInput(new ItemStack(aBlock, 1, aMetaData)))
- || (aBlock.getMaterial() == Material.sand)
- || (aBlock.getMaterial() == Material.grass)
- || (aBlock.getMaterial() == Material.ground)
- || (aBlock.getMaterial() == Material.snow)
- || (aBlock.getMaterial() == Material.clay)
- || (aBlock.getMaterial() == Material.leaves)
- || (aBlock.getMaterial() == Material.vine)
- || (aBlock.getMaterial() == Material.wood)
- || (aBlock.getMaterial() == Material.cactus)
- || (aBlock.getMaterial() == Material.circuits)
- || (aBlock.getMaterial() == Material.gourd)
- || (aBlock.getMaterial() == Material.web)
- || (aBlock.getMaterial() == Material.cloth)
- || (aBlock.getMaterial() == Material.carpet)
- || (aBlock.getMaterial() == Material.plants)
- || (aBlock.getMaterial() == Material.cake)
- || (aBlock.getMaterial() == Material.tnt)
- || (aBlock.getMaterial() == Material.sponge);
- }
-
- @Override
- public int convertBlockDrops(final List<ItemStack> aDrops, final ItemStack aStack, final EntityPlayer aPlayer,
- final Block aBlock, final int aX, final int aY, final int aZ, final byte aMetaData, final int aFortune,
- final boolean aSilkTouch, final BlockEvent.HarvestDropsEvent aEvent) {
- int rConversions = 0;
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes
- .findRecipe(null, true, 2147483647L, null, new ItemStack[] { new ItemStack(aBlock, 1, aMetaData) });
- if ((tRecipe == null) || (aBlock.hasTileEntity(aMetaData))) {
- for (final ItemStack tDrop : aDrops) {
- tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(
- null,
- true,
- 2147483647L,
- null,
- new ItemStack[] { GT_Utility.copyAmount(1L, new Object[] { tDrop }) });
- if (tRecipe != null) {
- final ItemStack tHammeringOutput = tRecipe.getOutput(0);
- if (tHammeringOutput != null) {
- rConversions += tDrop.stackSize;
- tDrop.stackSize *= tHammeringOutput.stackSize;
- tHammeringOutput.stackSize = tDrop.stackSize;
- GT_Utility.setStack(tDrop, tHammeringOutput);
- }
- }
- }
- } else {
- aDrops.clear();
- aDrops.add(tRecipe.getOutput(0));
- rConversions++;
- }
- return rConversions;
- }
-
- @Override
- public ItemStack getBrokenItem(final ItemStack aStack) {
- return null;
- }
-
- @Override
- public IIconContainer getIcon(final boolean aIsToolHead, final ItemStack aStack) {
- // Utils.LOG_INFO("Texture: "+TexturesGtTools.SKOOKUM_CHOOCHER.getTextureFile());
- return TexturesGtTools.SKOOKUM_CHOOCHER;
- }
-
- @Override
- public short[] getRGBa(final boolean aIsToolHead, final ItemStack aStack) {
- return GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa;
- }
-
- @Override
- public void onToolCrafted(final ItemStack aStack, final EntityPlayer aPlayer) {
- super.onToolCrafted(aStack, aPlayer);
- aPlayer.triggerAchievement(AchievementList.buildSword);
- try {
- GT_Mod.achievements.issueAchievement(aPlayer, "tools");
- GT_Mod.achievements.issueAchievement(aPlayer, "unitool");
- } catch (final Exception e) {}
- }
-
- @Override
- public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) {
- return new ChatComponentText(
- EnumChatFormatting.RED + aEntity.getCommandSenderName()
- + EnumChatFormatting.WHITE
- + " has been Choochered by "
- + EnumChatFormatting.GREEN
- + aPlayer.getCommandSenderName()
- + EnumChatFormatting.WHITE);
- }
-
- @Override
- public void onStatsAddedToTool(final GT_MetaGenerated_Tool aItem, final int aID) {
- aItem.addItemBehavior(aID, new Behaviour_Choocher());
- }
-
- @Override
- public boolean isGrafter() {
- return false;
- }
-}