aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2019-01-20 20:10:16 +0100
committerbartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>2019-01-20 20:10:16 +0100
commitb04aef2f3d21c89172299141a8ba81fca0f6f237 (patch)
treeb11b5e4dfe65d030017d782e1c9e8e0d93716f79
parentddd365db557705a431c9465cee70ba44d146cb20 (diff)
downloadGT5-Unofficial-b04aef2f3d21c89172299141a8ba81fca0f6f237.tar.gz
GT5-Unofficial-b04aef2f3d21c89172299141a8ba81fca0f6f237.tar.bz2
GT5-Unofficial-b04aef2f3d21c89172299141a8ba81fca0f6f237.zip
code cleanup
+added DEHP +added travis? +added sonarcloud? +version increase Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com>
-rw-r--r--.travis.yml15
-rw-r--r--build.gradle11
-rw-r--r--build.properties2
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java1
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java2
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java2
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java2
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java3
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java5
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java4
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java85
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java112
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_AcidGenerator.java3
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_Diode.java3
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_EnergyDistributor.java3
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_RadioHatch.java6
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_DEHP.java197
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_LESU.java4
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_ManualTrafo.java2
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_Windmill.java21
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java61
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/util/NEIbartworksConfig.java2
22 files changed, 420 insertions, 126 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000000..029ac46082
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,15 @@
+language: java
+sudo: false
+install: true
+
+addons:
+ sonarcloud:
+ organization: "sonarcloud"
+ token:
+ secure: "KW2U8HenTpLQOXT+OxCsu4noCKH6ZkUATld36YTbwAwzVKt6aesqtKHkZuo+Y+a143GI184pdnhMcRB1F49Wf0IQTkOhvopfnSEg+AKWZJb+gAbZQaYkaoe04pVzdwnpBXPDZR0DnTJX09VJGlES0RMiYfaQDHAYuPRQRBf17mLWvhXf7ZfNshGLikmzQcXWoXMpB+z9BaJ9Vr9/+Jn4Geuh9MWsbc2xZyQU8hoTTtKxqj5sTVRkwmxTf0ooGrMKohoOQ5JeZLDWM0Z/7KW64kFCE3xDrKg2gnKyKNLU6qIwbgCtVkcqGb28tXuqNdRSZ5BHb70dZb0E2+9VGhS7xPA8iUVmktJRKKG+f34HtDlsXqA00SEF2u+fq+TDz7fcPHLM8z1IcUI2XF5c5A/6E1k161i3kMB9xpd5Rq4waywo+/2j+L2CE6u5aj7BeL7KUQKD7k5gx3bXUyIo2QdjzeJeUJTSaxchcae9iIO+W6rwc68fD5/UNHVp+O75QNz2B+pklz6hCFVaoUep8rl4LO58ODBU1GL4JfeTM0RzOofOFepPXIi39iCk89c61WBtxX8RPkv3nBDsrXCGU7UNH1thP1nmgCfB4HGRxixWBAnmPDHNLEW81RG+meGRpHX7RkWISmrl95x15QXb016hldvK3sAegxxVPUdyJxRplgE="
+
+jdk:
+ - oraclejdk8
+
+script:
+- ./gradlew sonarqube \ No newline at end of file
diff --git a/build.gradle b/build.gradle
index e9ae2df168..667680d955 100644
--- a/build.gradle
+++ b/build.gradle
@@ -16,6 +16,10 @@ buildscript {
}
}
+plugins {
+ id "org.sonarqube" version "2.2"
+}
+
apply plugin: 'forge'
apply plugin: 'idea'
apply plugin: 'signing'
@@ -120,6 +124,13 @@ artifacts {
archives apiJar
}
+sonarqube {
+ properties {
+ property "sonar.projectName", "bartworks"
+ property "sonar.projectKey", "bartimaeusnek_bartworks"
+ }
+}
+
task signJar(dependsOn: 'reobf'){
doLast {
ant.signjar(
diff --git a/build.properties b/build.properties
index e38d9e91d9..19a81a00dd 100644
--- a/build.properties
+++ b/build.properties
@@ -23,7 +23,7 @@
mc_version=1.7.10
majorUpdate=0
minorUpdate=3
-buildNumber=16
+buildNumber=17
ic2.version=2.2.828-experimental
gregtech.version=5.09.32.36
gregtech.jenkinsbuild=143
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
index 3f3fc8d9a5..a0364772af 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
@@ -82,6 +82,7 @@ public final class MainMod {
@Mod.EventHandler
public void init(FMLInitializationEvent init) {
new LoaderRegistry().run();
+
}
@Mod.EventHandler
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java
index 1d403a93d9..8f45b3d48d 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/GT2Tab.java
@@ -34,6 +34,6 @@ public class GT2Tab extends CreativeTabs {
@Override
public Item getTabIconItem() {
- return ItemRegistry.tab;
+ return ItemRegistry.TAB;
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java
index f3e5e15882..c49fdb0aae 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/creativetabs/bartworksTab.java
@@ -34,7 +34,7 @@ public class bartworksTab extends CreativeTabs {
@Override
public Item getTabIconItem() {
- return ItemRegistry.RockcutterHV;
+ return ItemRegistry.ROCKCUTTER_HV;
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java
index 15523b68f6..4f7a19e0c6 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/client/renderer/RendererSwitchingColorFluid.java
@@ -64,7 +64,7 @@ public class RendererSwitchingColorFluid implements ISimpleBlockRenderingHandler
++count;
}
}
- if (end == 0.0f) {
+ if (end == 0.0f && count != 0) {
end = total / count;
}
return end;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java
index b4f28fd33a..0db716071e 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/configs/ConfigHandler.java
@@ -39,6 +39,7 @@ public class ConfigHandler {
public static boolean newStuff = true;
public static boolean BioLab = true;
public static Configuration c;
+ public static boolean DEHPDirectSteam = false;
private static boolean ezmode = false;
public ConfigHandler(@Nonnull FMLPreInitializationEvent e) {
@@ -51,7 +52,7 @@ public class ConfigHandler {
teslastaff = c.get("System", "Enable Teslastaff", false, "Enables the Teslastaff, an Item used to destroy Electric Armors").getBoolean(false);
newStuff = !c.get("System", "Disable non-original-GT-stuff", false, "This switch disables my new content, that is not part of the GT2 compat").getBoolean(false);
BioLab = !c.get("System", "Disable BioLab", false, "This switch disables the BioLab, BioVat etc. If you use GT5.08 or equivalent, this needs to be turned off!").getBoolean(false);
-
+ DEHPDirectSteam = c.get("Multiblocks", "DEHP Direct Steam Mode", false, "This switch enables the Direct Steam Mode of the DEHP. If enabled it will take in Waterand output steam. If disabled it will Input IC2Coolant and output hot coolant").getBoolean(false);
if (ConfigHandler.IDOffset == 0) {
ConfigHandler.IDOffset = 12600;
c.get("System", "ID Offset", 12600, "ID Offset for this mod. This Mod uses " + IDU + " IDs. DO NOT CHANGE IF YOU DONT KNOW WHAT THIS IS").set(12600);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java
index 5fa2064026..da80a83eb3 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/items/LabParts.java
@@ -72,7 +72,10 @@ public class LabParts extends SimpleSubItemClass {
@Override
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean b) {
- if (itemStack == null || itemStack.getTagCompound() == null) {
+ if (itemStack == null)
+ return;
+
+ if (itemStack.getTagCompound() == null) {
switch (itemStack.getItemDamage()) {
case 0:
list.add("An empty Sterilized Petri Dish.");
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java
index 60614afde0..0c7b559b03 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/BioItemList.java
@@ -76,9 +76,9 @@ public class BioItemList {
}, null, null, true, true);
- private static final Item mItemBioLabParts = new LabModule(new String[]{"DNAExtractionModule", "PCRThermoclyclingModule", "PlasmidSynthesisModule", "TransformationModule", "ClonalCellularSynthesisModule"});
+ private static final Item mItemBioLabParts = new LabModule(new String[]{"DNAExtractionModule", "PCRThermoclyclingModule", "PlasmidSynthesisModule", "TransformationModule", "ClonalCellularSynthesisModule" });
public static final ItemStack[] mBioLabParts = {new ItemStack(mItemBioLabParts), new ItemStack(mItemBioLabParts, 1, 1), new ItemStack(mItemBioLabParts, 1, 2), new ItemStack(mItemBioLabParts, 1, 3), new ItemStack(mItemBioLabParts, 1, 4)};
- private static final Item vanillaBioLabParts = new LabParts(new String[]{"petriDish", "DNASampleFlask", "PlasmidCell", "DetergentPowder", "Agarose", "IncubationModule", "PlasmaMembrane"});
+ private static final Item vanillaBioLabParts = new LabParts(new String[]{"petriDish", "DNASampleFlask", "PlasmidCell", "DetergentPowder", "Agarose", "IncubationModule", "PlasmaMembrane" });
public BioItemList() {
GameRegistry.registerItem(mItemBioLabParts, "BioLabModules");
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
index d90b99029d..4ca992e984 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/ItemRegistry.java
@@ -27,10 +27,7 @@ import com.github.bartimaeusnek.bartworks.common.blocks.BW_Blocks;
import com.github.bartimaeusnek.bartworks.common.blocks.BW_TileEntityContainer;
import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.common.items.*;
-import com.github.bartimaeusnek.bartworks.common.tileentities.BW_RotorBlock;
-import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_AcidGenerator;
-import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_Diode;
-import com.github.bartimaeusnek.bartworks.common.tileentities.GT_MetaTileEntity_EnergyDistributor;
+import com.github.bartimaeusnek.bartworks.common.tileentities.*;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
@@ -47,22 +44,23 @@ import static com.github.bartimaeusnek.bartworks.MainMod.BWT;
import static com.github.bartimaeusnek.bartworks.MainMod.GT2;
import static com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler.newStuff;
-public class ItemRegistry implements Runnable {
+public class ItemRegistry {
- public static final Item Destructopack = new GT_Destructopack_Item();
- public static final Item Teslastaff = new GT_Teslastaff_Item();
- public static final Item RockcutterLV = new GT_Rockcutter_Item(1);
- public static final Item RockcutterMV = new GT_Rockcutter_Item(2);
- public static final Item RockcutterHV = new GT_Rockcutter_Item(3);
- public static final Item CircuitProgrammer = new Circuit_Programmer();
+ public static final Item DESTRUCTOPACK = new GT_Destructopack_Item();
+ public static final Item TESLASTAFF = new GT_Teslastaff_Item();
+ public static final Item ROCKCUTTER_LV = new GT_Rockcutter_Item(1);
+ public static final Item ROCKCUTTER_MV = new GT_Rockcutter_Item(2);
+ public static final Item ROCKCUTTER_HV = new GT_Rockcutter_Item(3);
+ public static final Item CIRCUIT_PROGRAMMER = new Circuit_Programmer();
public static final Block ROTORBLOCK = new BW_TileEntityContainer(Material.wood, BW_RotorBlock.class, "BWRotorBlock");
- public static final Item LeatherRotor = new BW_Stonage_Rotors(5, 0.15f, 15, 30, 2400, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorLeather.png"), "BW_LeatherRotor", "rotors/itemRotorLeather");
- public static final Item WoolRotor = new BW_Stonage_Rotors(7, 0.18f, 10, 20, 1600, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorWool.png"), "BW_WoolRotor", "rotors/itemRotorWool");
- public static final Item PaperRotor = new BW_Stonage_Rotors(9, 0.2f, 1, 10, 800, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorPaper.png"), "BW_PaperRotor", "rotors/itemRotorPaper");
- public static final Item CombinedRotor = new BW_Stonage_Rotors(11, 0.22f, 1, 50, 5800, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorCombined.png"), "BW_CombinedRotor", "rotors/itemRotorCombined");
- public static final Item craftingParts = new SimpleSubItemClass(new String[]{"grindstone_top", "grindstone_bottom", "completed_grindstone", "rotors/leatherParts", "rotors/woolParts", "rotors/paperParts", "rotors/combinedParts"});
- public static final Item tab = new SimpleIconItem("GT2Coin");
+ public static final Item LEATHER_ROTOR = new BW_Stonage_Rotors(5, 0.15f, 15, 30, 2400, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorLeather.png"), "BW_LeatherRotor", "rotors/itemRotorLeather");
+ public static final Item WOOL_ROTOR = new BW_Stonage_Rotors(7, 0.18f, 10, 20, 1600, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorWool.png"), "BW_WoolRotor", "rotors/itemRotorWool");
+ public static final Item PAPER_ROTOR = new BW_Stonage_Rotors(9, 0.2f, 1, 10, 800, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorPaper.png"), "BW_PaperRotor", "rotors/itemRotorPaper");
+ public static final Item COMBINED_ROTOR = new BW_Stonage_Rotors(11, 0.22f, 1, 50, 5800, IKineticRotor.GearboxType.WIND, new ResourceLocation(MainMod.modID, "textures/items/rotors/rotorCombined.png"), "BW_CombinedRotor", "rotors/itemRotorCombined");
+ public static final Item CRAFTING_PARTS = new SimpleSubItemClass(new String[]{"grindstone_top", "grindstone_bottom", "completed_grindstone", "rotors/leatherParts", "rotors/woolParts", "rotors/paperParts", "rotors/combinedParts" });
+ public static final Item TAB = new SimpleIconItem("GT2Coin");
public static final Item WINDMETER = new BW_SimpleWindMeter();
+ public static ItemStack dehp;
public static final Block[] BW_BLOCKS = {
new BW_Blocks("BW_ItemBlocks", new String[]
{
@@ -82,42 +80,41 @@ public class ItemRegistry implements Runnable {
};
- public static ItemStack[] Diode2A = new ItemStack[GT_Values.VN.length];
- public static ItemStack[] Diode4A = new ItemStack[GT_Values.VN.length];
- public static ItemStack[] Diode8A = new ItemStack[GT_Values.VN.length];
- public static ItemStack[] Diode12A = new ItemStack[GT_Values.VN.length];
- public static ItemStack[] Diode16A = new ItemStack[GT_Values.VN.length];
- public static ItemStack[] EnergyDistributor = new ItemStack[GT_Values.VN.length];
- public static ItemStack[] AcidGens = new ItemStack[3];
+ public static ItemStack[] diode2A = new ItemStack[GT_Values.VN.length];
+ public static ItemStack[] diode4A = new ItemStack[GT_Values.VN.length];
+ public static ItemStack[] diode8A = new ItemStack[GT_Values.VN.length];
+ public static ItemStack[] diode12A = new ItemStack[GT_Values.VN.length];
+ public static ItemStack[] diode16A = new ItemStack[GT_Values.VN.length];
+ public static ItemStack[] energyDistributor = new ItemStack[GT_Values.VN.length];
+ public static ItemStack[] acidGens = new ItemStack[3];
- @Override
- public void run() {
+ public static void run() {
if (newStuff) {
GameRegistry.registerBlock(BW_BLOCKS[2], BW_ItemBlocks.class, "BW_Machinery_Casings");
GT_OreDictUnificator.registerOre(OrePrefixes.block, Materials.NickelZincFerrite, new ItemStack(BW_BLOCKS[2]));
- GameRegistry.registerItem(LeatherRotor, "BW_LeatherRotor");
- GameRegistry.registerItem(WoolRotor, "BW_WoolRotor");
- GameRegistry.registerItem(PaperRotor, "BW_PaperRotor");
- GameRegistry.registerItem(CombinedRotor, "BW_CombinedRotor");
- GameRegistry.registerItem(craftingParts, "craftingParts");
+ GameRegistry.registerItem(LEATHER_ROTOR, "BW_LeatherRotor");
+ GameRegistry.registerItem(WOOL_ROTOR, "BW_WoolRotor");
+ GameRegistry.registerItem(PAPER_ROTOR, "BW_PaperRotor");
+ GameRegistry.registerItem(COMBINED_ROTOR, "BW_CombinedRotor");
+ GameRegistry.registerItem(CRAFTING_PARTS, "craftingParts");
GameRegistry.registerTileEntity(BW_RotorBlock.class, "BWRotorBlockTE");
GameRegistry.registerBlock(ROTORBLOCK, "BWRotorBlock");
GameRegistry.registerItem(WINDMETER, "BW_SimpleWindMeter");
for (int i = 0; i < GT_Values.VN.length; i++) {
- ItemRegistry.Diode2A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length + 1 + i, "Cable Diode 2A " + GT_Values.VN[i], "Cable Diode 2A " + GT_Values.VN[i], i, 2).getStackForm(1L);
- ItemRegistry.Diode4A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 2 + 1 + i, "Cable Diode 4A " + GT_Values.VN[i], "Cable Diode 4A " + GT_Values.VN[i], i, 4).getStackForm(1L);
- ItemRegistry.Diode8A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 3 + 1 + i, "Cable Diode 8A " + GT_Values.VN[i], "Cable Diode 8A " + GT_Values.VN[i], i, 8).getStackForm(1L);
- ItemRegistry.Diode12A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 4 + 1 + i, "Cable Diode 12A " + GT_Values.VN[i], "Cable Diode 12A " + GT_Values.VN[i], i, 12).getStackForm(1L);
- ItemRegistry.Diode16A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 5 + 1 + i, "Cable Diode 16A " + GT_Values.VN[i], "Cable Diode 16A " + GT_Values.VN[i], i, 16).getStackForm(1L);
- ItemRegistry.EnergyDistributor[i] = new GT_MetaTileEntity_EnergyDistributor(ConfigHandler.IDOffset + 1 + i, "Energy Distributor " + GT_Values.VN[i], "Energy Distributor " + GT_Values.VN[i], i, "Splits Amperage into several Sides").getStackForm(1L);
+ ItemRegistry.diode2A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length + 1 + i, "Cable Diode 2A " + GT_Values.VN[i], "Cable Diode 2A " + GT_Values.VN[i], i, 2).getStackForm(1L);
+ ItemRegistry.diode4A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 2 + 1 + i, "Cable Diode 4A " + GT_Values.VN[i], "Cable Diode 4A " + GT_Values.VN[i], i, 4).getStackForm(1L);
+ ItemRegistry.diode8A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 3 + 1 + i, "Cable Diode 8A " + GT_Values.VN[i], "Cable Diode 8A " + GT_Values.VN[i], i, 8).getStackForm(1L);
+ ItemRegistry.diode12A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 4 + 1 + i, "Cable Diode 12A " + GT_Values.VN[i], "Cable Diode 12A " + GT_Values.VN[i], i, 12).getStackForm(1L);
+ ItemRegistry.diode16A[i] = new GT_MetaTileEntity_Diode(ConfigHandler.IDOffset + GT_Values.VN.length * 5 + 1 + i, "Cable Diode 16A " + GT_Values.VN[i], "Cable Diode 16A " + GT_Values.VN[i], i, 16).getStackForm(1L);
+ ItemRegistry.energyDistributor[i] = new GT_MetaTileEntity_EnergyDistributor(ConfigHandler.IDOffset + 1 + i, "Energy Distributor " + GT_Values.VN[i], "Energy Distributor " + GT_Values.VN[i], i, "Splits Amperage into several Sides").getStackForm(1L);
}
for (int i = 0; i < 3; i++) {
- ItemRegistry.AcidGens[i] = new GT_MetaTileEntity_AcidGenerator(ConfigHandler.IDOffset + GT_Values.VN.length * 8 - 2 + i, "Acid Generator " + GT_Values.VN[i + 2], "Acid Generator " + GT_Values.VN[i + 2], i + 2, new String[]{"An Acid Generator", "Creates Power from Chemical Energy Potentials."}).getStackForm(1);
+ ItemRegistry.acidGens[i] = new GT_MetaTileEntity_AcidGenerator(ConfigHandler.IDOffset + GT_Values.VN.length * 8 - 2 + i, "Acid Generator " + GT_Values.VN[i + 2], "Acid Generator " + GT_Values.VN[i + 2], i + 2, new String[]{"An Acid Generator", "Creates Power from Chemical Energy Potentials." }).getStackForm(1);
}
-
+ dehp = new GT_TileEntity_DEHP(ConfigHandler.IDOffset + GT_Values.VN.length * 8 + 1, 1, "DEHP", "Deep Earth Heating Pump").getStackForm(1L);
}
@@ -125,11 +122,11 @@ public class ItemRegistry implements Runnable {
GameRegistry.registerBlock(BW_BLOCKS[0], BW_ItemBlocks.class, "BW_ItemBlocks");
GameRegistry.registerBlock(BW_BLOCKS[1], BW_ItemBlocks.class, "GT_LESU_CASING");
if (ConfigHandler.teslastaff)
- GameRegistry.registerItem(Teslastaff, Teslastaff.getUnlocalizedName());
+ GameRegistry.registerItem(TESLASTAFF, TESLASTAFF.getUnlocalizedName());
- GameRegistry.registerItem(RockcutterLV, RockcutterLV.getUnlocalizedName());
- GameRegistry.registerItem(RockcutterMV, RockcutterMV.getUnlocalizedName());
- GameRegistry.registerItem(RockcutterHV, RockcutterHV.getUnlocalizedName());
- GameRegistry.registerItem(tab, "tabIconGT2");
+ GameRegistry.registerItem(ROCKCUTTER_LV, ROCKCUTTER_LV.getUnlocalizedName());
+ GameRegistry.registerItem(ROCKCUTTER_MV, ROCKCUTTER_MV.getUnlocalizedName());
+ GameRegistry.registerItem(ROCKCUTTER_HV, ROCKCUTTER_HV.getUnlocalizedName());
+ GameRegistry.registerItem(TAB, "tabIconGT2");
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java
index 6a651b3c2b..5e191fbc8a 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/RecipeLoader.java
@@ -27,6 +27,7 @@ import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_LESU;
import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_ManualTrafo;
import com.github.bartimaeusnek.bartworks.common.tileentities.GT_TileEntity_Windmill;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
@@ -39,6 +40,7 @@ import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
import static com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler.newStuff;
@@ -103,7 +105,7 @@ public class RecipeLoader implements Runnable {
});
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.Destructopack),
+ new ItemStack(ItemRegistry.DESTRUCTOPACK),
RecipeLoader.BITSD,
new Object[]{
"CPC",
@@ -115,7 +117,7 @@ public class RecipeLoader implements Runnable {
});
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.Destructopack),
+ new ItemStack(ItemRegistry.DESTRUCTOPACK),
RecipeLoader.BITSD,
new Object[]{
"CPC",
@@ -127,7 +129,7 @@ public class RecipeLoader implements Runnable {
});
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.RockcutterMV),
+ new ItemStack(ItemRegistry.ROCKCUTTER_MV),
RecipeLoader.BITSD,
new Object[]{
"DS ",
@@ -141,7 +143,7 @@ public class RecipeLoader implements Runnable {
});
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.RockcutterLV),
+ new ItemStack(ItemRegistry.ROCKCUTTER_LV),
RecipeLoader.BITSD,
new Object[]{
"DS ",
@@ -155,7 +157,7 @@ public class RecipeLoader implements Runnable {
});
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.RockcutterHV),
+ new ItemStack(ItemRegistry.ROCKCUTTER_HV),
RecipeLoader.BITSD,
new Object[]{
"DS ",
@@ -170,7 +172,7 @@ public class RecipeLoader implements Runnable {
if (ConfigHandler.teslastaff)
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.Teslastaff),
+ new ItemStack(ItemRegistry.TESLASTAFF),
RecipeLoader.BITSD,
new Object[]{
"BO ",
@@ -182,6 +184,22 @@ public class RecipeLoader implements Runnable {
});
if (newStuff) {
+ if (!MainMod.GTNH)
+ GT_ModHandler.addCraftingRecipe(
+ ItemRegistry.dehp,
+ BITSD,
+ new Object[]{
+ "GPG",
+ "NCN",
+ "GPG",
+ 'G', GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.HSSE, 1L),
+ 'P', ItemList.Pump_IV.get(1L),
+ 'N', GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Ultimate, 1L),
+ 'C', ItemList.MACHINE_HULLS[5],
+ }
+ );
+ else
+ GT_Values.RA.addAssemblylineRecipe(ItemList.Pump_IV.get(1L), 72000, new ItemStack[]{ItemList.Pump_IV.get(16), GT_OreDictUnificator.get(OrePrefixes.pipeLarge, Materials.Ultimate, 32L), GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.HSSE, 32L), ItemList.Field_Generator_LuV.get(8)}, new FluidStack[]{Materials.SolderingAlloy.getMolten(32 * 144), Materials.Polytetrafluoroethylene.getMolten(32 * 144)}, ItemRegistry.dehp, 5000, BW_Util.getMachineVoltageFromTier(6));
GT_ModHandler.addCraftingRecipe(
new ItemStack(ItemRegistry.WINDMETER),
@@ -205,7 +223,7 @@ public class RecipeLoader implements Runnable {
Materials cable = cables[i + 2];
ItemStack machinehull = ItemList.MACHINE_HULLS[i + 2].get(1L);
GT_ModHandler.addCraftingRecipe(
- ItemRegistry.AcidGens[i],
+ ItemRegistry.acidGens[i],
RecipeLoader.BITSD,
new Object[]{
"HRH",
@@ -226,7 +244,7 @@ public class RecipeLoader implements Runnable {
ItemStack machinehull = ItemList.MACHINE_HULLS[i].get(1L);
GT_ModHandler.addCraftingRecipe(
- ItemRegistry.EnergyDistributor[i],
+ ItemRegistry.energyDistributor[i],
RecipeLoader.BITSD,
new Object[]{
"PWP",
@@ -237,7 +255,7 @@ public class RecipeLoader implements Runnable {
'C', machinehull
});
GT_ModHandler.addCraftingRecipe(
- ItemRegistry.Diode12A[i],
+ ItemRegistry.diode12A[i],
RecipeLoader.BITSD,
new Object[]{
"WDW",
@@ -250,7 +268,7 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- ItemRegistry.Diode12A[i],
+ ItemRegistry.diode12A[i],
RecipeLoader.BITSD,
new Object[]{
"WDW",
@@ -263,7 +281,7 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- ItemRegistry.Diode8A[i],
+ ItemRegistry.diode8A[i],
RecipeLoader.BITSD,
new Object[]{
"WDW",
@@ -276,7 +294,7 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- ItemRegistry.Diode8A[i],
+ ItemRegistry.diode8A[i],
RecipeLoader.BITSD,
new Object[]{
"WDW",
@@ -289,7 +307,7 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- ItemRegistry.Diode4A[i],
+ ItemRegistry.diode4A[i],
RecipeLoader.BITSD,
new Object[]{
"WDW",
@@ -302,7 +320,7 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- ItemRegistry.Diode4A[i],
+ ItemRegistry.diode4A[i],
RecipeLoader.BITSD,
new Object[]{
"WDW",
@@ -315,7 +333,7 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- ItemRegistry.Diode2A[i],
+ ItemRegistry.diode2A[i],
RecipeLoader.BITSD,
new Object[]{
"WDW",
@@ -328,7 +346,7 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- ItemRegistry.Diode2A[i],
+ ItemRegistry.diode2A[i],
RecipeLoader.BITSD,
new Object[]{
"WDW",
@@ -341,7 +359,7 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- ItemRegistry.Diode16A[i],
+ ItemRegistry.diode16A[i],
RecipeLoader.BITSD,
new Object[]{
"WHW",
@@ -355,7 +373,7 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- ItemRegistry.Diode16A[i],
+ ItemRegistry.diode16A[i],
RecipeLoader.BITSD,
new Object[]{
"WHW",
@@ -396,7 +414,7 @@ public class RecipeLoader implements Runnable {
}
);
- GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1L), Materials.Aluminium.getPlates(1), ItemList.Circuit_Board_Plastic.get(1L), ItemList.Battery_RE_LV_Lithium.get(1L)}, Materials.SolderingAlloy.getMolten(288L), new ItemStack(ItemRegistry.CircuitProgrammer), 600, (int) (GT_Values.V[2] - (GT_Values.V[2] / 10)));
+ GT_Values.RA.addAssemblerRecipe(new ItemStack[]{GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Good, 1L), Materials.Aluminium.getPlates(1), ItemList.Circuit_Board_Plastic.get(1L), ItemList.Battery_RE_LV_Lithium.get(1L)}, Materials.SolderingAlloy.getMolten(288L), new ItemStack(ItemRegistry.CIRCUIT_PROGRAMMER), 600, (int) (GT_Values.V[2] - (GT_Values.V[2] / 10)));
GT_ModHandler.addCraftingRecipe(
new GT_TileEntity_Windmill(ConfigHandler.IDOffset + GT_Values.VN.length * 6 + 2, "Windmill", "Windmill").getStackForm(1L),
@@ -408,16 +426,16 @@ public class RecipeLoader implements Runnable {
'B', new ItemStack(Blocks.brick_block),
'W', GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L),
'H', new ItemStack(Blocks.hopper),
- 'G', new ItemStack(ItemRegistry.craftingParts, 1, 2),
+ 'G', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 2),
}
);
- String[] stones = {"stone", "stoneSmooth"};
- String[] granites = {"blockGranite", "stoneGranite", "Granite", "granite"};
+ String[] stones = {"stone", "stoneSmooth" };
+ String[] granites = {"blockGranite", "stoneGranite", "Granite", "granite" };
for (String granite : granites) {
for (String stone : stones) {
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.craftingParts, 1, 0),
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 0),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"SSS",
@@ -428,7 +446,7 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.craftingParts, 1, 1),
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 1),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"hDf",
@@ -438,7 +456,7 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.craftingParts, 1, 0),
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 0),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"SSS",
@@ -449,7 +467,7 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.craftingParts, 1, 1),
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 1),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"hDf",
@@ -460,32 +478,32 @@ public class RecipeLoader implements Runnable {
);
}
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.craftingParts, 1, 2),
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 2),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"STS",
"h f",
"SBS",
'S', granite,
- 'T', new ItemStack(ItemRegistry.craftingParts, 1, 0),
- 'B', new ItemStack(ItemRegistry.craftingParts, 1, 1),
+ 'T', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 0),
+ 'B', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 1),
}
);
}
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.craftingParts, 1, 2),
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 2),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"STS",
"h f",
"SBS",
'S', new ItemStack(GregTech_API.sBlockGranites, 1, OreDictionary.WILDCARD_VALUE),
- 'T', new ItemStack(ItemRegistry.craftingParts, 1, 0),
- 'B', new ItemStack(ItemRegistry.craftingParts, 1, 1),
+ 'T', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 0),
+ 'B', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 1),
}
);
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.craftingParts, 1, 3),
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"WLs",
@@ -496,7 +514,7 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.craftingParts, 1, 4),
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"WLs",
@@ -507,7 +525,7 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.craftingParts, 1, 5),
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"WLs",
@@ -518,59 +536,59 @@ public class RecipeLoader implements Runnable {
}
);
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.craftingParts, 1, 6),
+ new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 6),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"WEs",
"WZh",
"WDf",
- 'E', new ItemStack(ItemRegistry.craftingParts, 1, 3),
- 'Z', new ItemStack(ItemRegistry.craftingParts, 1, 4),
- 'D', new ItemStack(ItemRegistry.craftingParts, 1, 5),
+ 'E', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3),
+ 'Z', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4),
+ 'D', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5),
'W', new ItemStack(Blocks.log, 1, OreDictionary.WILDCARD_VALUE),
}
);
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.LeatherRotor),
+ new ItemStack(ItemRegistry.LEATHER_ROTOR),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"hPf",
"PWP",
"sPr",
- 'P', new ItemStack(ItemRegistry.craftingParts, 1, 3),
+ 'P', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 3),
'W', GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L),
}
);
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.WoolRotor),
+ new ItemStack(ItemRegistry.WOOL_ROTOR),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"hPf",
"PWP",
"sPr",
- 'P', new ItemStack(ItemRegistry.craftingParts, 1, 4),
+ 'P', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 4),
'W', GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L),
}
);
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.PaperRotor),
+ new ItemStack(ItemRegistry.PAPER_ROTOR),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"hPf",
"PWP",
"sPr",
- 'P', new ItemStack(ItemRegistry.craftingParts, 1, 5),
+ 'P', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 5),
'W', GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L),
}
);
GT_ModHandler.addCraftingRecipe(
- new ItemStack(ItemRegistry.CombinedRotor),
+ new ItemStack(ItemRegistry.COMBINED_ROTOR),
GT_ModHandler.RecipeBits.NOT_REMOVABLE,
new Object[]{
"hPf",
"PWP",
"sPr",
- 'P', new ItemStack(ItemRegistry.craftingParts, 1, 6),
+ 'P', new ItemStack(ItemRegistry.CRAFTING_PARTS, 1, 6),
'W', GT_OreDictUnificator.get(OrePrefixes.gearGt, Materials.Iron, 1L),
}
);
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_AcidGenerator.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_AcidGenerator.java
index f893779b81..4d75f908b9 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_AcidGenerator.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_AcidGenerator.java
@@ -107,7 +107,8 @@ public class GT_MetaTileEntity_AcidGenerator extends GT_MetaTileEntity_BasicGene
return aSide == this.getBaseMetaTileEntity().getFrontFacing();
}
+ @SuppressWarnings("deprecation")
public String[] getDescription() {
- return new String[]{mDescription, "Voltage: " + ChatColorHelper.YELLOW + GT_Values.V[this.mTier], "Efficiency: " + ChatColorHelper.YELLOW + getEfficiency(), "Amperage OUT: " + ChatColorHelper.YELLOW + maxAmperesOut(), "Added by bartimaeusnek via " + ChatColorHelper.DARKGREEN + "BartWorks"};
+ return new String[]{mDescription, "Voltage: " + ChatColorHelper.YELLOW + GT_Values.V[this.mTier], "Efficiency: " + ChatColorHelper.YELLOW + getEfficiency(), "Amperage OUT: " + ChatColorHelper.YELLOW + maxAmperesOut(), "Added by bartimaeusnek via " + ChatColorHelper.DARKGREEN + "BartWorks" };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_Diode.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_Diode.java
index ab8ceacff9..a30ba65f1d 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_Diode.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_Diode.java
@@ -57,7 +57,8 @@ public class GT_MetaTileEntity_Diode extends GT_MetaTileEntity_BasicHull {
return new GT_MetaTileEntity_Diode(this.mName, this.mTier, this.mInventory.length, this.mDescriptionArray, this.mTextures);
}
+ @SuppressWarnings("deprecation")
public String[] getDescription() {
- return new String[]{mDescription, "Voltage: " + ChatColorHelper.YELLOW + GT_Values.V[this.mTier], "Amperage IN: " + ChatColorHelper.YELLOW + maxAmperesIn(), "Amperage OUT: " + ChatColorHelper.YELLOW + maxAmperesOut(), "Added by bartimaeusnek via " + ChatColorHelper.DARKGREEN + "BartWorks"};
+ return new String[]{mDescription, "Voltage: " + ChatColorHelper.YELLOW + GT_Values.V[this.mTier], "Amperage IN: " + ChatColorHelper.YELLOW + maxAmperesIn(), "Amperage OUT: " + ChatColorHelper.YELLOW + maxAmperesOut(), "Added by bartimaeusnek via " + ChatColorHelper.DARKGREEN + "BartWorks" };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_EnergyDistributor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_EnergyDistributor.java
index bbe86520f3..822c495887 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_EnergyDistributor.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_EnergyDistributor.java
@@ -68,8 +68,9 @@ public class GT_MetaTileEntity_EnergyDistributor extends GT_MetaTileEntity_Trans
return 512L + (GT_Values.V[this.mTier] * 320L);
}
+ @SuppressWarnings("deprecation")
public String[] getDescription() {
- return new String[]{mDescription, "Voltage: " + ChatColorHelper.YELLOW + GT_Values.V[this.mTier], "Amperage IN: " + ChatColorHelper.YELLOW + maxAmperesIn(), "Amperage OUT: " + ChatColorHelper.YELLOW + maxAmperesOut(), "Added by bartimaeusnek via " + ChatColorHelper.DARKGREEN + "BartWorks"};
+ return new String[]{this.mDescription, "Voltage: " + ChatColorHelper.YELLOW + GT_Values.V[this.mTier], "Amperage IN: " + ChatColorHelper.YELLOW + this.maxAmperesIn(), "Amperage OUT: " + ChatColorHelper.YELLOW + this.maxAmperesOut(), "Added by bartimaeusnek via " + ChatColorHelper.DARKGREEN + "BartWorks" };
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_RadioHatch.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_RadioHatch.java
index 619a025747..879d9f7fb1 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_RadioHatch.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_MetaTileEntity_RadioHatch.java
@@ -57,7 +57,7 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch {
private byte coverage = 0;
public GT_MetaTileEntity_RadioHatch(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 1, new String[]{"Radioactive Item Chamber for Multiblocks", "Capacity: " + (aTier - 2) + " kg" + ((aTier - 2) >= 2 ? "s" : ""), "Use a screwdriver to set the containment level"});
+ super(aID, aName, aNameRegional, aTier, 1, new String[]{"Radioactive Item Chamber for Multiblocks", "Capacity: " + (aTier - 2) + " kg" + ((aTier - 2) >= 2 ? "s" : ""), "Use a screwdriver to set the containment level" });
cap = aTier - 2;
}
@@ -251,7 +251,9 @@ public class GT_MetaTileEntity_RadioHatch extends GT_MetaTileEntity_Hatch {
@Override
public String[] getInfoData() {
- return new String[]{"Material: " + material, "Sievert: " + sievert, "Amount: " + mass, "Time (in t/s/m/h) to decay (1kg): " + ((calcDecayTicks(this.sievert)) - timer % (calcDecayTicks(this.sievert) * 60)) + "t/" + ((calcDecayTicks(this.sievert)) - timer % (calcDecayTicks(this.sievert))) / 20 + "s/" + ((calcDecayTicks(this.sievert)) - timer % (calcDecayTicks(this.sievert))) / 20 / 60 + "m/" + ((calcDecayTicks(this.sievert)) - timer % (calcDecayTicks(this.sievert))) / 20 / 60 / 60 + "h"};
+ if (calcDecayTicks(this.sievert) != 0)
+ return new String[]{"Material: " + material, "Sievert: " + sievert, "Amount: " + mass, "Time (in t/s/m/h) to decay (1kg): " + ((calcDecayTicks(this.sievert)) - timer % (calcDecayTicks(this.sievert) * 60)) + "t/" + ((calcDecayTicks(this.sievert)) - timer % (calcDecayTicks(this.sievert))) / 20 + "s/" + ((calcDecayTicks(this.sievert)) - timer % (calcDecayTicks(this.sievert))) / 20 / 60 + "m/" + ((calcDecayTicks(this.sievert)) - timer % (calcDecayTicks(this.sievert))) / 20 / 60 / 60 + "h" };
+ else return new String[]{"Material: Empty", "Sievert: 0", "Amount: 0" };
}
public boolean isSimpleMachine() {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_DEHP.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_DEHP.java
index 7e6f55a02b..adbb63e8d4 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_DEHP.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_DEHP.java
@@ -22,27 +22,75 @@
package com.github.bartimaeusnek.bartworks.common.tileentities;
+import com.github.bartimaeusnek.bartworks.common.configs.ConfigHandler;
+import com.github.bartimaeusnek.bartworks.util.BW_Util;
+import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.util.GT_Config;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_Utility;
import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_DrillerBase;
+import ic2.core.block.reactor.tileentity.TileEntityNuclearReactorElectric;
+import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.fluids.Fluid;
+import net.minecraftforge.fluids.FluidRegistry;
+
+import java.lang.reflect.Field;
+import java.util.Arrays;
public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase {
+ private byte mMode;
+ private byte mTier;
+ private static float nulearHeatMod = 2f;
- public GT_TileEntity_DEHP(int aID, String aName, String aNameRegional) {
+ public GT_TileEntity_DEHP(int aID, int tier, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
+ mTier= (byte) tier;
}
- public GT_TileEntity_DEHP(String aName) {
+ public GT_TileEntity_DEHP(String aName,byte mTier) {
super(aName);
+ this.mTier= (byte) mTier;
+ }
+
+ @Override
+ public void onConfigLoad(GT_Config aConfig) {
+ try {
+ Class c = TileEntityNuclearReactorElectric.class;
+ Field f = c.getDeclaredField("huOutputModifier");
+ f.setAccessible(true);
+ nulearHeatMod = f.getFloat(f);
+ }catch (SecurityException | IllegalArgumentException | ExceptionInInitializerError | NullPointerException | IllegalAccessException | NoSuchFieldException e){
+ e.printStackTrace();
+ }
+ super.onConfigLoad(aConfig);
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ aNBT.setByte("mTier",mTier);
+ aNBT.setByte("mMode",mMode);
+ super.saveNBTData(aNBT);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ mTier=aNBT.getByte("mTier");
+ mMode=aNBT.getByte("mMode");
+ super.loadNBTData(aNBT);
}
@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity iGregTechTileEntity) {
- return new GT_TileEntity_DEHP(this.mName);
+ return new GT_TileEntity_DEHP(this.mName,mTier);
}
@Override
@@ -52,7 +100,9 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase {
@Override
public String[] getDescription() {
- return new String[0];
+ String[] dscSteam = {"Controller Block for the Deep Earth Heat Pump " + (mTier > 1 ? mTier : ""), "Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)", "3x1x3 Base of " + getCasingBlockItem().name(), "1x3x1 " + getCasingBlockItem().name() + " pillar (Center of base)", "1x3x1 " + this.getFrameMaterial().mName + " Frame Boxes (Each pillar side and on top)", "1x Input Hatch (One of base casings)","1x Output Hatch (One of base casings)", "1x Maintenance Hatch (One of base casings)", "1x " + GT_Values.VN[this.getMinTier()] + "+ Energy Hatch (Any bottom layer casing)","Consumes "+GT_Values.V[mTier+2]+"EU/t","Has 4 Modes, use the Screwdriver to change them:","0 Idle, 1 Steam, 2 Superheated Steam (requires Distilled Water), 3 Retract","Explodes when it runs out of Water/Distilled Water","Converts "+(long) (mTier*1200*20)+"L/s Water(minus 10% per Maintenance Problem) to Steam","Converts "+(long) (mTier*600*20)+"L/s Distilled Water(minus 10% per Maintenance Problem) to SuperheatedSteam"};
+ String[] dscCooleant = {"Controller Block for the Deep Earth Heat Pump " + (mTier > 1 ? mTier : ""), "Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)", "3x1x3 Base of " + getCasingBlockItem().name(), "1x3x1 " + getCasingBlockItem().name() + " pillar (Center of base)", "1x3x1 " + this.getFrameMaterial().mName + " Frame Boxes (Each pillar side and on top)", "1x Input Hatch (One of base casings)","1x Output Hatch (One of base casings)", "1x Maintenance Hatch (One of base casings)", "1x " + GT_Values.VN[this.getMinTier()] + "+ Energy Hatch (Any bottom layer casing)","Consumes "+GT_Values.V[mTier+2]+"EU/t","Has 4 Modes, use the Screwdriver to change them:","0 Idle, 1 & 2 Coolant Heating Mode (no Difference between them), 3 Retract","Explodes when it runs out of Coolant","Heats up "+(long) (mTier*24*((double) nulearHeatMod))*20+"L/s Coolant(minus 10% per Maintenance Problem)"};
+ return ConfigHandler.DEHPDirectSteam ? dscSteam : dscCooleant;
}
@Override
@@ -67,12 +117,12 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase {
@Override
protected int getCasingTextureIndex() {
- return 13;
+ return 11;
}
@Override
protected int getMinTier() {
- return 5;
+ return 2+mTier;
}
@Override
@@ -80,9 +130,142 @@ public class GT_TileEntity_DEHP extends GT_MetaTileEntity_DrillerBase {
return !this.mMaintenanceHatches.isEmpty() && !this.mOutputHatches.isEmpty() && !this.mInputHatches.isEmpty();
}
+ private long getFluidFromHatches(Fluid f){
+ long ret = 0;
+ for (GT_MetaTileEntity_Hatch_Input ih : this.mInputHatches){
+ if (ih.getFluid().getFluid().equals(f))
+ ret += ih.getFluidAmount();
+ }
+ return ret;
+ }
+
+ private long getWaterFromHatches(boolean onlyDistilled){
+ Fluid toConsume1 = FluidRegistry.WATER;
+ Fluid toConsume2 = GT_ModHandler.getDistilledWater(1L).getFluid();
+ if (onlyDistilled)
+ toConsume1=toConsume2;
+ long ret = 0;
+ for (GT_MetaTileEntity_Hatch_Input ih : this.mInputHatches){
+ if (ih.getFluid().getFluid().equals(toConsume1) || ih.getFluid().getFluid().equals(toConsume2))
+ ret += ih.getFluidAmount();
+ }
+ return ret;
+ }
+
@Override
- protected void setElectricityStats() {
+ protected boolean workingUpward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) {
+ if (mMode != 3){
+ this.isPickingPipes = false;
+ return true;
+ }
+ return super.workingUpward(aStack, xDrill, yDrill, zDrill, xPipe, zPipe, yHead, oldYHead);
+ }
+ @Override
+ public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ ++mMode;
+ if (mMode >=4)
+ mMode = 0;
+ GT_Utility.sendChatToPlayer(aPlayer,"Mode: "+mMode);
+ super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ);
+ }
+
+ protected boolean workingDownward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) {
+ if (mMode==3){
+ this.isPickingPipes = true;
+ return true;
+ }
+
+ if (!this.tryLowerPipe()) {
+ if (this.waitForPipes()) {
+ return false;
+ } else {
+ if (ConfigHandler.DEHPDirectSteam) {
+ if (mMode==1) {
+ long steamProduced = (mTier * 600 * 2L * this.mEfficiency / 10000L);
+ long waterConsume = ((steamProduced + 160) / 160);
+
+ if (getWaterFromHatches(false) - waterConsume > 0) {
+ consumeFluid(FluidRegistry.WATER,waterConsume);
+ addOutput(GT_ModHandler.getSteam(steamProduced));
+ } else {
+ explodeMultiblock();
+ return false;
+ }
+ } else if (mMode==2) {
+ long steamProduced = (mTier * 300 * 2L * this.mEfficiency / 10000L);
+ long waterConsume = ((steamProduced + 160) / 160);
+
+ if (getWaterFromHatches(true) - waterConsume > 0) {
+ consumeFluid(GT_ModHandler.getDistilledWater(1).getFluid(),waterConsume);
+ addOutput(FluidRegistry.getFluidStack("ic2superheatedsteam", (int) steamProduced));
+ } else {
+ explodeMultiblock();
+ return false;
+ }
+ }
+ }else{
+ if (mMode==1 || mMode==2) {
+ long coolantConverted = (long) (mTier*24*((double) nulearHeatMod)*this.mEfficiency / 10000L);
+ if (getFluidFromHatches(FluidRegistry.getFluid("ic2coolant"))-coolantConverted > 0){
+ consumeFluid(FluidRegistry.getFluid("ic2coolant"),coolantConverted);
+ addOutput(FluidRegistry.getFluidStack("ic2hotcoolant", (int) coolantConverted ));
+ } else {
+ explodeMultiblock();
+ return false;
+ }
+ }
+ }
+ }
+ } else {
+ return true;
+ }
+ return true;
+ }
+
+ private boolean consumeFluid(Fluid fluid,long ammount){
+
+ if (ammount> Integer.MAX_VALUE){
+ int[] tmp = new int[(int) (ammount/Integer.MAX_VALUE)];
+ Arrays.fill(tmp,(int) (ammount/Integer.MAX_VALUE));
+ for (int i = 0; i < tmp.length; i++) {
+ for (GT_MetaTileEntity_Hatch_Input ih : this.mInputHatches){
+ if (fluid.equals(FluidRegistry.WATER) ? ih.getFluid().getFluid().equals(fluid) ||ih.getFluid().getFluid().equals(GT_ModHandler.getDistilledWater(1).getFluid()) :ih.getFluid().getFluid().equals(fluid) )
+ tmp[i] -= ih.drain((int) ammount,true).amount;
+ if (tmp[i] <= 0)
+ break;
+ }
+ }
+
+ if (tmp[tmp.length-1] <= 0){
+ return true;
+ }
+
+ return false;
+ }
+
+ long tmp = ammount;
+ for (GT_MetaTileEntity_Hatch_Input ih : this.mInputHatches){
+ if (fluid.equals(FluidRegistry.WATER) ? ih.getFluid().getFluid().equals(fluid) ||ih.getFluid().getFluid().equals(GT_ModHandler.getDistilledWater(1).getFluid()) :ih.getFluid().getFluid().equals(fluid) )
+ tmp -= ih.drain((int) ammount,true).amount;
+ if (tmp <= 0)
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ protected void setElectricityStats() {
+ try {
+ this.mEUt=isPickingPipes ? 60 : Math.toIntExact(GT_Values.V[getMinTier()]);
+ }catch (ArithmeticException e){
+ e.printStackTrace();
+ this.mEUt = Integer.MAX_VALUE-7;
+ }
+ this.mProgresstime=0;
+ this.mMaxProgresstime=1;
+ this.mEfficiency = this.getCurrentEfficiency((ItemStack)null);
+ this.mEfficiencyIncrease = 10000;
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_LESU.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_LESU.java
index cd88cfa5ec..f23fb5900e 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_LESU.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_LESU.java
@@ -367,6 +367,7 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
@Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack itemStack) {
+ long startingTime = System.nanoTime();
connectedcells = new ConnectedBlocksChecker();
connectedcells.get_connected(aBaseMetaTileEntity.getWorld(), aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord(), ItemRegistry.BW_BLOCKS[1]);
@@ -394,6 +395,9 @@ public class GT_TileEntity_LESU extends GT_MetaTileEntity_MultiBlockBase {
this.getBaseMetaTileEntity().enableWorking();
this.getBaseMetaTileEntity().setActive(true);
+ long finishedTime = System.nanoTime();
+ if (finishedTime - startingTime > 5000000)
+ MainMod.logger.warn("LESU LookUp took longer than 5ms!(" + (finishedTime - startingTime) + "ns / " + ((finishedTime - startingTime) / 1000000) + "ms) Check at x:" + this.getBaseMetaTileEntity().getXCoord() + " y:" + this.getBaseMetaTileEntity().getYCoord() + " z:" + this.getBaseMetaTileEntity().getZCoord() + " DIM-ID: " + this.getBaseMetaTileEntity().getWorld().provider.dimensionId);
return true;
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_ManualTrafo.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_ManualTrafo.java
index 93fd85b502..5ae36c80da 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_ManualTrafo.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_ManualTrafo.java
@@ -348,7 +348,7 @@ public class GT_TileEntity_ManualTrafo extends GT_MetaTileEntity_MultiBlockBase
}
}
}
- if (this.mDynamoHatches.size() <= 0 || this.mEnergyHatches.size() <= 0)
+ if (this.mDynamoHatches.isEmpty() || this.mEnergyHatches.isEmpty())
return false;
return true;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_Windmill.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_Windmill.java
index 1be0c68da1..aff4e196c4 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_Windmill.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/GT_TileEntity_Windmill.java
@@ -54,7 +54,6 @@ import net.minecraft.tileentity.TileEntityDispenser;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
-import scala.actors.threadpool.Arrays;
import java.util.ArrayList;
@@ -122,7 +121,7 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_MultiBlockBase {
BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.Ash ||
BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.Snow ||
BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.Stone ||
- BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.MeatRaw||
+ BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.MeatRaw ||
BW_Util.checkStackAndPrefix(mOutputItems[0]) && GT_OreDictUnificator.getAssociation(mOutputItems[0]).mMaterial.mMaterial == Materials.MeatCooked
)
mOutputItems[1] = tRecipe.getOutput(0);
@@ -579,12 +578,12 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_MultiBlockBase {
@Override
public String[] getInfoData() {
- return new String[]{"Progress:", this.mProgresstime + " Grindings of " + this.mMaxProgresstime + " needed Grindings", "GrindPower:", Integer.toString(this.rotorBlock.getGrindPower()) + "KU/t"};
+ return new String[]{"Progress:", this.mProgresstime + " Grindings of " + this.mMaxProgresstime + " needed Grindings", "GrindPower:", Integer.toString(this.rotorBlock.getGrindPower()) + "KU/t" };
}
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister aBlockIconRegister) {
- iIcons[0] = Blocks.brick_block.getIcon(0,0);
+ iIcons[0] = Blocks.brick_block.getIcon(0, 0);
iIconContainers[0] = new IIconContainer() {
@Override
public IIcon getIcon() {
@@ -632,22 +631,18 @@ public class GT_TileEntity_Windmill extends GT_MetaTileEntity_MultiBlockBase {
if (aFacing == aSide || aSide == 0) {
iTextures[0] = new GT_RenderedTexture(iIconContainers[0]);
- ret = new ITexture[6];
for (int i = 0; i < ret.length; i++) {
- ret[i]=iTextures[0];
+ ret[i] = iTextures[0];
}
- }
- else if (aSide == 1) {
+ } else if (aSide == 1) {
iTextures[1] = new GT_RenderedTexture(iIconContainers[1]);
- ret = new ITexture[6];
for (int i = 0; i < ret.length; i++) {
- ret[i]=iTextures[1];
+ ret[i] = iTextures[1];
}
- }
- else{
+ } else {
iTextures[2] = new GT_RenderedTexture(Textures.BlockIcons.COVER_WOOD_PLATE);
for (int i = 0; i < ret.length; i++) {
- ret[i]=iTextures[2];
+ ret[i] = iTextures[2];
}
}
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java
index ba5265904f..33b6615865 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/BW_Util.java
@@ -25,6 +25,7 @@ package com.github.bartimaeusnek.bartworks.util;
import com.github.bartimaeusnek.bartworks.API.BioVatLogicAdder;
import gregtech.api.enums.Materials;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import net.minecraft.block.Block;
@@ -124,4 +125,64 @@ public class BW_Util {
}
}
+ public static boolean check_layer(IGregTechTileEntity aBaseMetaTileEntity, int diameter, int yLevel, int height, Block block, int offset, int aBaseCasingIndex) {
+ return check_layer(aBaseMetaTileEntity, diameter, yLevel, height, block, offset, false, aBaseCasingIndex);
+ }
+
+ public static boolean check_layer(IGregTechTileEntity aBaseMetaTileEntity, int diameter, int yLevel, int height, Block block, int offset, boolean controllerLayer, int aBaseCasingIndex) {
+ return check_layer(aBaseMetaTileEntity, diameter, yLevel, height, block, offset, controllerLayer, false, aBaseCasingIndex);
+ }
+
+ public static boolean check_layer(IGregTechTileEntity aBaseMetaTileEntity, int diameter, int yLevel, int height, Block block, int offset, boolean controllerLayer, boolean freeCorners, int aBaseCasingIndex) {
+ return check_layer(aBaseMetaTileEntity, diameter, yLevel, height, block, offset, controllerLayer, freeCorners, false, null, true, aBaseCasingIndex);
+ }
+
+ public static boolean check_layer(IGregTechTileEntity aBaseMetaTileEntity, int diameter, int yLevel, int height, Block block, int offset, boolean controllerLayer, boolean insideCheck, Block inside, int aBaseCasingIndex) {
+ return check_layer(aBaseMetaTileEntity, diameter, yLevel, height, block, offset, controllerLayer, false, insideCheck, inside, true, aBaseCasingIndex);
+ }
+
+ /**
+ * @param aBaseMetaTileEntity the Multiblock controller, usually a parameter
+ * @param diameter the diameter of the layer
+ * @param yLevel the starting y level of the Layer, referenced to the Multiblock
+ * @param height the height of the Layers, referenced to the Multiblock
+ * @param block the block for the walls
+ * @param offset the offset in most cases should be the same as the diameter
+ * @param controllerLayer if the layer contains the controller
+ * @param freeCorners if the corners should be checked
+ * @param insideCheck if the inside should be empty/filled
+ * @param inside which block should be inside
+ * @param allowHatches if hatches are allowed in this Layer
+ * @param aBaseCasingIndex the Index for the hatches texture
+ * @return if the layer check was completed
+ */
+ public static boolean check_layer(IGregTechTileEntity aBaseMetaTileEntity, int diameter, int yLevel, int height, Block block, int offset, boolean controllerLayer, boolean freeCorners, boolean insideCheck, Block inside, boolean allowHatches, int aBaseCasingIndex) {
+ int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * offset;
+ int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * offset;
+ for (int x = -diameter; x < diameter; x++) {
+ for (int y = yLevel; y < height; y++) {
+ for (int z = -diameter; z < diameter; z++) {
+ if (freeCorners && (((Math.abs(x) == diameter && Math.abs(z) == diameter))))
+ continue;
+ if (controllerLayer && (xDir + x == 0 && zDir + z == 0))
+ continue;
+ if (insideCheck && (Math.abs(x) < diameter && Math.abs(z) != diameter))
+ if (!aBaseMetaTileEntity.getBlockOffset(xDir + x, y, zDir + z).equals(inside))
+ return false;
+ if (!aBaseMetaTileEntity.getBlockOffset(xDir + x, y, zDir + z).equals(block))
+ if (!(allowHatches && (
+ ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity.getMetaTileEntity()).addDynamoToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, y, zDir + z), aBaseCasingIndex) ||
+ ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity.getMetaTileEntity()).addEnergyInputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, y, zDir + z), aBaseCasingIndex) ||
+ ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity.getMetaTileEntity()).addMaintenanceToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, y, zDir + z), aBaseCasingIndex) ||
+ ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity.getMetaTileEntity()).addMufflerToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, y, zDir + z), aBaseCasingIndex) ||
+ ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity.getMetaTileEntity()).addInputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, y, zDir + z), aBaseCasingIndex) ||
+ ((GT_MetaTileEntity_MultiBlockBase) aBaseMetaTileEntity.getMetaTileEntity()).addOutputToMachineList(aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + x, y, zDir + z), aBaseCasingIndex)
+ )))
+ return false;
+ }
+ }
+ }
+ return true;
+ }
+
}
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/util/NEIbartworksConfig.java b/src/main/java/com/github/bartimaeusnek/bartworks/util/NEIbartworksConfig.java
index 770f5edfe5..9c6d12c7ba 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/util/NEIbartworksConfig.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/util/NEIbartworksConfig.java
@@ -49,7 +49,7 @@ public class NEIbartworksConfig implements IConfigureNEI {
@Optional.Method(modid = "NotEnoughItems")
@Override
public void loadConfig() {
- API.hideItem(new ItemStack(ItemRegistry.tab));
+ API.hideItem(new ItemStack(ItemRegistry.TAB));
API.hideItem(new ItemStack(FluidLoader.bioFluidBlock));
API.hideItem(new ItemStack(BioItemList.bw_fake_glasses));
}