aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTING.md49
-rw-r--r--README.md3
-rw-r--r--build.properties3
-rw-r--r--misc/vector/item_distributor.svg231
-rw-r--r--src/main/java/gregtech/GT_Mod.java10
-rw-r--r--src/main/java/gregtech/api/enums/ItemList.java1568
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java169
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java2
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java6
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java4
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java4
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java9
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java207
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java1692
-rw-r--r--src/main/java/gregtech/api/util/GT_LanguageManager.java3
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java60
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java9
-rw-r--r--src/main/java/gregtech/common/GT_UndergroundOil.java43
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings1.java19
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings2.java12
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings5.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Casings8.java4
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java7
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Machines.java9
-rw-r--r--src/main/java/gregtech/common/items/armor/components/ArmorComponent.java53
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java16
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java37
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java754
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller1.java51
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller2.java66
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java114
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java398
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java8
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java231
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill1.java51
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill2.java51
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill3.java51
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java142
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant1.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant2.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant3.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java304
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java16
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Scoop.java10
-rw-r--r--src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java1
-rw-r--r--src/main/java/gregtech/loaders/misc/GT_Achievements.java2
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java2
-rw-r--r--src/main/java/gregtech/loaders/postload/GT_AE2EnergyTunnelLoader.java28
-rw-r--r--src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java28
-rw-r--r--src/main/java/gregtech/loaders/postload/PartP2PGTPower.java100
-rw-r--r--src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java5
-rw-r--r--src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java21
-rw-r--r--src/main/resources/assets/gregtech/lang/en_US.lang2
-rw-r--r--src/main/resources/assets/gregtech/lang/zh_CN.lang223
62 files changed, 3870 insertions, 3056 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000000..f679a567fd
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,49 @@
+# Contributing
+
+When contributing to this repository, please first discuss the change you wish to make via our public Discord channel if possible.
+Be sure to consult the correct channel and dev, use #gregtech5 for GT5u and gregtech5-12 for GT 5.10/5.12 development.
+
+Please note we have a level of quality to maintain, please follow the guidelines in all your interactions within the project.
+
+## Issue Creation Process
+
+1. Try and see if the issue already has a pre-existing issue open.
+2. Provide the version of GT you are using and the version of IC2. Providing a full modlist helps.
+3. Try to explain the issue in details and include any aditional info if possible. Screenshots, Video or a way to reproduce the issue.
+* Failing to provide all of the above details can result in an issue being closed without action.
+
+## Pull Request Process
+
+1. Ensure any new build dependencies are noted within the PR details and why it's a valid requirement.
+2. Try ensure that the build works successfully and attempt to test it yourself thoroughly.
+3. You will have the Pull Request merged in once you have the sign-off of tone other developer & @Blood-Asp, also whenever @Blood-Asp finds time.
+
+## Standard of Quality
+
+### Our Goal
+
+In the interest of fostering an open project environment, we as
+contributors and maintainers try to make participation in our project and
+our community a hassle-free experience wherever possible..
+
+### Our Standards
+
+Practices that contribute to creating a positive environment
+include:
+
+* Follow the codestyle used through most of the project
+* Being respectful of differing viewpoints on the PR
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Try to document your code as you go for future readability.
+
+Practies we'd like to avoid include:
+
+* Leaving large code comment segments commented out without any comments.
+* Making large changes to pre-existing content without large community consultation beforehand. (Provided that the code changed won't continue to be backcompatible for addons.)
+
+### Our Responsibilities
+
+Project maintainers have the right and responsibility to remove, edit, or
+reject comments, commits, code, issues, and other contributions
+that are not aligned to this Code of Conduct. \ No newline at end of file
diff --git a/README.md b/README.md
index 33c4e0faf8..01fc62d971 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,8 @@ GT5-Unofficial is a decompiled and modified version of GT5.07.07. The goal of th
## Downloads
-Builds can be found on the [IC2 Forums](http://forum.industrial-craft.net/index.php?page=Thread&threadID=11488).
+Builds can be found on the [IC2 Forums](http://forum.industrial-craft.net/index.php?page=Thread&threadID=11488)
+and as [OneDrive Downloads](http://1drv.ms/1L4h4gC)
## Installation
diff --git a/build.properties b/build.properties
index 5a9547bf06..10cffc838a 100644
--- a/build.properties
+++ b/build.properties
@@ -1,8 +1,7 @@
minecraft.version=1.7.10
forge.version=10.13.4.1566-1.7.10
-gt.version=5.09.31pre1
-
+gt.version=5.09.31
ae2.version=rv2-beta-33
applecore.version=1.7.10-1.2.1+107.59407
buildcraft.version=7.1.11
diff --git a/misc/vector/item_distributor.svg b/misc/vector/item_distributor.svg
deleted file mode 100644
index a8aeac2efd..0000000000
--- a/misc/vector/item_distributor.svg
+++ /dev/null
@@ -1,231 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="640"
- height="640"
- viewBox="0 0 169.33333 169.33334"
- version="1.1"
- id="svg8"
- inkscape:version="0.92.1 r15371"
- sodipodi:docname="item_distributor.svg"
- inkscape:export-filename="./AUTOMATION_ITEMDISTRIBUTOR.png"
- inkscape:export-xdpi="2.4000001"
- inkscape:export-ydpi="2.4000001">
- <defs
- id="defs2">
- <linearGradient
- inkscape:collect="always"
- id="linearGradient4567">
- <stop
- style="stop-color:#ffffff;stop-opacity:1"
- offset="0"
- id="stop4563" />
- <stop
- id="stop4571"
- offset="0.5"
- style="stop-color:#a05a2c;stop-opacity:1" />
- <stop
- style="stop-color:#000000;stop-opacity:1"
- offset="1"
- id="stop4565" />
- </linearGradient>
- <linearGradient
- inkscape:collect="always"
- xlink:href="#linearGradient4567"
- id="linearGradient4569"
- x1="-169.33333"
- y1="-41.666683"
- x2="338.66666"
- y2="466.33331"
- gradientUnits="userSpaceOnUse" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="0.7"
- inkscape:cx="-296.2953"
- inkscape:cy="383.54174"
- inkscape:document-units="mm"
- inkscape:current-layer="layer1"
- showgrid="false"
- units="px"
- inkscape:window-width="1920"
- inkscape:window-height="1017"
- inkscape:window-x="-8"
- inkscape:window-y="-8"
- inkscape:window-maximized="1">
- <inkscape:grid
- type="xygrid"
- id="grid4485" />
- </sodipodi:namedview>
- <metadata
- id="metadata5">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-127.66665)">
- <image
- y="117.08331"
- x="-243.41666"
- id="image4495"
- xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBI WXMAAAsSAAALEgHS3X78AAAAB3RJTUUH3gQWES0RM2zKJgAAAJ1JREFUOMvtk1EKglAURMdoV9ra UnIptoFoc84ZsA+NVCKFPvrpwuU9Lsy5wzxeMQyDvqmDvqzfA47rQddda7Bsy1iY8W7LRm17qT8C jHW/3c6ASJREgEJUnspm00FskaWYIIhstjPobcFSHKIEgbczAGbiKM4EQfQ7ALYnyLiZ2WnY4cBP B1PnBbH3OMCqqlODe/WrZ+RNiMX/L+gBEUbAGtDL/toAAAAASUVORK5CYII= "
- style="image-rendering:optimizeSpeed"
- preserveAspectRatio="none"
- height="169.33333"
- width="169.33333" />
- <g
- id="g4596"
- style="stroke:none;fill-opacity:1;fill:url(#linearGradient4569)">
- <rect
- y="138.24998"
- x="10.583333"
- height="10.583333"
- width="148.16667"
- id="rect4498"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)"
- id="rect4500"
- width="148.16667"
- height="10.583333"
- x="10.583333"
- y="275.83331" />
- <rect
- y="148.83331"
- x="148.16667"
- height="127"
- width="10.583333"
- id="rect4502"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="148.83331"
- x="10.583333"
- height="127"
- width="10.583333"
- id="rect4504"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="159.41666"
- x="95.25"
- height="21.166666"
- width="10.583333"
- id="rect4506"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="148.83331"
- x="105.83333"
- height="21.166666"
- width="10.583333"
- id="rect4508"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="148.83331"
- x="63.499996"
- height="31.75"
- width="10.583333"
- id="rect4510"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="180.58331"
- x="21.166666"
- height="10.583333"
- width="31.75"
- id="rect4512"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="191.16666"
- x="42.333332"
- height="10.583333"
- width="10.583333"
- id="rect4514"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="212.33331"
- x="31.75"
- height="10.583333"
- width="21.166666"
- id="rect4518"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="244.08331"
- x="95.25"
- height="31.75"
- width="10.583333"
- id="rect4520"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="191.16666"
- x="116.41666"
- height="10.583333"
- width="21.166666"
- id="rect4526"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="180.58331"
- x="127"
- height="10.583333"
- width="21.166666"
- id="rect4528"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="222.91664"
- x="21.166666"
- height="10.583333"
- width="21.166666"
- id="rect4568"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="244.08333"
- x="63.5"
- height="21.166666"
- width="10.583333"
- id="rect4570"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="254.66666"
- x="52.916664"
- height="21.166666"
- width="10.583333"
- id="rect4572"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="222.91664"
- x="116.41666"
- height="10.583333"
- width="21.166666"
- id="rect4574"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- <rect
- y="233.49998"
- x="127"
- height="10.583333"
- width="21.166666"
- id="rect4576"
- style="opacity:1;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1.58749988, 1.58749988000000000;stroke-dashoffset:0;stroke-opacity:1;fill:url(#linearGradient4569)" />
- </g>
- </g>
-</svg>
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index eb51de7e96..848791bb40 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -19,6 +19,7 @@ import gregtech.common.GT_DummyWorld;
import gregtech.common.GT_Network;
import gregtech.common.GT_Proxy;
import gregtech.common.GT_RecipeAdder;
+import gregtech.common.blocks.GT_Block_Ores_Abstract;
import gregtech.common.entities.GT_Entity_Arrow;
import gregtech.common.entities.GT_Entity_Arrow_Potion;
import gregtech.common.items.armor.components.LoadArmorComponents;
@@ -236,6 +237,7 @@ public class GT_Mod implements IGT_Mod {
gregtechproxy.mDisableIC2Cables = tMainConfig.get(aTextGeneral, "DisableIC2Cables", true).getBoolean(true);
gregtechproxy.mAchievements = tMainConfig.get(aTextGeneral, "EnableAchievements", true).getBoolean(true);
gregtechproxy.mAE2Integration = GregTech_API.sSpecialFile.get(ConfigCategories.general, "EnableAE2Integration", Loader.isModLoaded("appliedenergistics2"));
+ gregtechproxy.mAE2Tunnel = GregTech_API.sSpecialFile.get(ConfigCategories.general, "EnableAE2Tunnel", false);
gregtechproxy.mNerfedCombs = tMainConfig.get(aTextGeneral, "NerfCombs", true).getBoolean(true);
gregtechproxy.mNerfedCrops = tMainConfig.get(aTextGeneral, "NerfCrops", true).getBoolean(true);
gregtechproxy.mHideUnusedOres = tMainConfig.get(aTextGeneral, "HideUnusedOres", true).getBoolean(true);
@@ -279,6 +281,13 @@ public class GT_Mod implements IGT_Mod {
gregtechproxy.enableGCOres = GregTech_API.sWorldgenFile.get("general", "enableGCOres", gregtechproxy.enableGCOres);
gregtechproxy.enableUBOres = GregTech_API.sWorldgenFile.get("general", "enableUBOres", gregtechproxy.enableUBOres);
+ Materials[] tDisableOres = new Materials[]{Materials.Chrome, Materials.Naquadria, Materials.Silicon, Materials.Cobalt, Materials.Cadmium, Materials.Indium, Materials.Tungsten,
+ Materials.Adamantium, Materials.Mithril, Materials.DarkIron, Materials.Rutile, Materials.Alduorite, Materials.Magnesium, Materials.Nikolite};
+ for(Materials tMat : tDisableOres){
+ if(!GregTech_API.sMaterialComponents.get("disableLaserDrillOres", tMat.mName, false))
+ GT_Block_Ores_Abstract.aBlockedOres.add(tMat);
+ }
+
GregTech_API.mUseOnlyGoodSolderingMaterials = GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.harderrecipes, "useonlygoodsolderingmaterials", GregTech_API.mUseOnlyGoodSolderingMaterials);
if (tMainConfig.get("general", "hardermobspawners", true).getBoolean(true)) {
@@ -598,6 +607,7 @@ public class GT_Mod implements IGT_Mod {
new GT_CropLoader().run();
new GT_Worldgenloader().run();
new GT_CoverLoader().run();
+ new GT_AE2EnergyTunnelLoader().run();
LoadArmorComponents.init();
GT_RecipeRegistrator.registerUsagesForMaterials(new ItemStack(Blocks.planks, 1), null, false);
diff --git a/src/main/java/gregtech/api/enums/ItemList.java b/src/main/java/gregtech/api/enums/ItemList.java
index 92afee5cec..e10437cf8b 100644
--- a/src/main/java/gregtech/api/enums/ItemList.java
+++ b/src/main/java/gregtech/api/enums/ItemList.java
@@ -1,784 +1,784 @@
-package gregtech.api.enums;
-
-import gregtech.api.interfaces.IItemContainer;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.block.Block;
-import net.minecraft.item.Item;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.fluids.Fluid;
-
-import static gregtech.api.enums.GT_Values.W;
-
-/**
- * Class containing all non-OreDict Items of GregTech.
- */
-public enum ItemList implements IItemContainer {
- Display_ITS_FREE,
- Display_Fluid,
- TE_Slag,
- TE_Slag_Rich,
- TE_Rockwool,
- TE_Hardened_Glass,
- FR_Lemon,
- FR_Mulch,
- FR_Fertilizer,
- FR_Compost,
- FR_Silk,
- FR_Wax,
- FR_RefractoryWax,
- FR_WaxCapsule,
- FR_RefractoryCapsule,
- FR_Stick,
- FR_Casing_Impregnated,
- FR_Casing_Sturdy,
- FR_Casing_Hardened,
- FR_Bee_Drone,
- FR_Bee_Princess,
- FR_Bee_Queen,
- FR_Tree_Sapling,
- FR_Butterfly,
- FR_Larvae,
- FR_Serum,
- FR_Caterpillar,
- FR_PollenFertile,
- TF_LiveRoot,
- TF_Vial_FieryBlood,
- TF_Vial_FieryTears,
- RC_ShuntingWire,
- RC_ShuntingWireFrame,
- RC_Rail_Reinforced,
- RC_Rail_Electric,
- RC_Rail_Standard,
- RC_Rail_Wooden,
- RC_Rail_Adv,
- RC_Rail_HS,
- RC_Tie_Wood,
- RC_Tie_Stone,
- RC_Bed_Wood,
- RC_Bed_Stone,
- RC_Rebar,
- IC2_Item_Casing_Tin,
- IC2_Item_Casing_Copper,
- IC2_Item_Casing_Iron,
- IC2_Item_Casing_Steel,
- IC2_Item_Casing_Lead,
- IC2_Item_Casing_Bronze,
- IC2_Item_Casing_Gold,
- IC2_Spray_WeedEx,
- IC2_Scrap,
- IC2_Scrapbox,
- IC2_Fertilizer,
- IC2_Mixed_Metal_Ingot,
- IC2_Hops,
- IC2_Resin,
- IC2_Plantball,
- IC2_PlantballCompressed,
- IC2_CoffeeBeans,
- IC2_CoffeePowder,
- IC2_Crop_Seeds,
- IC2_Grin_Powder,
- IC2_Energium_Dust,
- IC2_Compressed_Coal_Ball,
- IC2_Compressed_Coal_Chunk,
- IC2_Fuel_Rod_Empty,
- IC2_Fuel_Can_Empty,
- IC2_Fuel_Can_Filled,
- IC2_Food_Can_Empty,
- IC2_Food_Can_Filled,
- IC2_Food_Can_Spoiled,
- IC2_ShaftIron,
- IC2_ShaftSteel,
- IC2_Industrial_Diamond,
- IC2_ForgeHammer,
- IC2_WireCutter,
- IC2_SuBattery,
- IC2_ReBattery,
- IC2_AdvBattery,
- IC2_EnergyCrystal,
- IC2_LapotronCrystal,
- Arrow_Head_Glass_Emtpy,
- Arrow_Head_Glass_Poison,
- Arrow_Head_Glass_Poison_Long,
- Arrow_Head_Glass_Poison_Strong,
- Arrow_Head_Glass_Slowness,
- Arrow_Head_Glass_Slowness_Long,
- Arrow_Head_Glass_Weakness,
- Arrow_Head_Glass_Weakness_Long,
- Arrow_Head_Glass_Holy_Water,
- Arrow_Wooden_Glass_Emtpy,
- Arrow_Wooden_Glass_Poison,
- Arrow_Wooden_Glass_Poison_Long,
- Arrow_Wooden_Glass_Poison_Strong,
- Arrow_Wooden_Glass_Slowness,
- Arrow_Wooden_Glass_Slowness_Long,
- Arrow_Wooden_Glass_Weakness,
- Arrow_Wooden_Glass_Weakness_Long,
- Arrow_Wooden_Glass_Holy_Water,
- Arrow_Plastic_Glass_Emtpy,
- Arrow_Plastic_Glass_Poison,
- Arrow_Plastic_Glass_Poison_Long,
- Arrow_Plastic_Glass_Poison_Strong,
- Arrow_Plastic_Glass_Slowness,
- Arrow_Plastic_Glass_Slowness_Long,
- Arrow_Plastic_Glass_Weakness,
- Arrow_Plastic_Glass_Weakness_Long,
- Arrow_Plastic_Glass_Holy_Water,
- Shape_Empty,
- Shape_Mold_Bottle,
- Shape_Mold_Plate,
- Shape_Mold_Ingot,
- Shape_Mold_Casing,
- Shape_Mold_Gear,
- Shape_Mold_Gear_Small,
- Shape_Mold_Credit,
- Shape_Mold_Nugget,
- Shape_Mold_Block,
- Shape_Mold_Ball,
- Shape_Mold_Bun,
- Shape_Mold_Bread,
- Shape_Mold_Baguette,
- Shape_Mold_Cylinder,
- Shape_Mold_Anvil,
- Shape_Mold_Arrow,
- Shape_Mold_Name,
- Shape_Slicer_Flat,
- Shape_Slicer_Stripes,
- Shape_Extruder_Bottle,
- Shape_Extruder_Plate,
- Shape_Extruder_Cell,
- Shape_Extruder_Ring,
- Shape_Extruder_Rod,
- Shape_Extruder_Bolt,
- Shape_Extruder_Ingot,
- Shape_Extruder_Wire,
- Shape_Extruder_Casing,
- Shape_Extruder_Pipe_Tiny,
- Shape_Extruder_Pipe_Small,
- Shape_Extruder_Pipe_Medium,
- Shape_Extruder_Pipe_Large,
- Shape_Extruder_Pipe_Huge,
- Shape_Extruder_Block,
- Shape_Extruder_Sword,
- Shape_Extruder_Pickaxe,
- Shape_Extruder_Shovel,
- Shape_Extruder_Axe,
- Shape_Extruder_Hoe,
- Shape_Extruder_Hammer,
- Shape_Extruder_File,
- Shape_Extruder_Saw,
- Shape_Extruder_Gear,
- Crate_Empty,
- Credit_Copper,
- Credit_Iron,
- Credit_Silver,
- Credit_Gold,
- Credit_Platinum,
- Credit_Osmium,
- Credit_Greg_Copper,
- Credit_Greg_Cupronickel,
- Credit_Greg_Silver,
- Credit_Greg_Gold,
- Credit_Greg_Platinum,
- Credit_Greg_Osmium,
- Credit_Greg_Naquadah,
- Credit_Greg_Neutronium,
- Coin_Gold_Ancient,
- Coin_Doge,
- Coin_Chocolate,
- Cell_Universal_Fluid,
- Cell_Empty,
- Cell_Water,
- Cell_Lava,
- Cell_Air,
- Large_Fluid_Cell_Steel,
- Large_Fluid_Cell_TungstenSteel,
- ThermosCan_Empty,
- ThermosCan_Dark_Coffee,
- ThermosCan_Dark_Cafe_au_lait,
- ThermosCan_Coffee,
- ThermosCan_Cafe_au_lait,
- ThermosCan_Lait_au_cafe,
- ThermosCan_Dark_Chocolate_Milk,
- ThermosCan_Chocolate_Milk,
- ThermosCan_Tea,
- ThermosCan_Sweet_Tea,
- ThermosCan_Ice_Tea,
- Bottle_Empty,
- Bottle_Milk,
- Bottle_Holy_Water,
- Bottle_Purple_Drink,
- Bottle_Grape_Juice,
- Bottle_Wine,
- Bottle_Vinegar,
- Bottle_Potato_Juice,
- Bottle_Vodka,
- Bottle_Leninade,
- Bottle_Mineral_Water,
- Bottle_Salty_Water,
- Bottle_Reed_Water,
- Bottle_Rum,
- Bottle_Pirate_Brew,
- Bottle_Hops_Juice,
- Bottle_Dark_Beer,
- Bottle_Dragon_Blood,
- Bottle_Wheaty_Juice,
- Bottle_Scotch,
- Bottle_Glen_McKenner,
- Bottle_Wheaty_Hops_Juice,
- Bottle_Beer,
- Bottle_Chilly_Sauce,
- Bottle_Hot_Sauce,
- Bottle_Diabolo_Sauce,
- Bottle_Diablo_Sauce,
- Bottle_Snitches_Glitch_Sauce,
- Bottle_Apple_Juice,
- Bottle_Cider,
- Bottle_Golden_Apple_Juice,
- Bottle_Golden_Cider,
- Bottle_Iduns_Apple_Juice,
- Bottle_Notches_Brew,
- Bottle_Lemon_Juice,
- Bottle_Limoncello,
- Bottle_Lemonade,
- Bottle_Alcopops,
- Bottle_Cave_Johnsons_Grenade_Juice,
- Food_Potato_On_Stick,
- Food_Potato_On_Stick_Roasted,
- Food_Fries,
- Food_ChiliChips,
- Food_PotatoChips,
- Food_Baked_Potato,
- Food_Poisonous_Potato,
- Food_Cheese,
- Food_Chum,
- Food_Chum_On_Stick,
- Food_Dough,
- Food_Dough_Sugar,
- Food_Dough_Chocolate,
- Food_Raw_Cookie,
- Food_Flat_Dough,
- Food_Burger_Veggie,
- Food_Burger_Cheese,
- Food_Burger_Meat,
- Food_Burger_Chum,
- Food_Sandwich_Veggie,
- Food_Sandwich_Cheese,
- Food_Sandwich_Bacon,
- Food_Sandwich_Steak,
- Food_Large_Sandwich_Veggie,
- Food_Large_Sandwich_Cheese,
- Food_Large_Sandwich_Bacon,
- Food_Large_Sandwich_Steak,
- Food_Sliced_Lemon,
- Food_Sliced_Tomato,
- Food_Sliced_Onion,
- Food_Sliced_Cucumber,
- Food_Sliced_Cheese,
- Food_Sliced_Bread,
- Food_Sliced_Bun,
- Food_Sliced_Baguette,
- Food_Sliced_Breads,
- Food_Sliced_Buns,
- Food_Sliced_Baguettes,
- Food_Packaged_Fries,
- Food_Packaged_PotatoChips,
- Food_Packaged_ChiliChips,
- Food_Raw_Potato,
- Food_Raw_Fries,
- Food_Raw_PotatoChips,
- Food_Raw_Bread,
- Food_Raw_Bun,
- Food_Raw_Baguette,
- Food_Raw_Cake,
- Food_Raw_Pizza_Veggie,
- Food_Raw_Pizza_Cheese,
- Food_Raw_Pizza_Meat,
- Food_Baked_Bread,
- Food_Baked_Bun,
- Food_Baked_Baguette,
- Food_Baked_Cake,
- Food_Baked_Pizza_Veggie,
- Food_Baked_Pizza_Cheese,
- Food_Baked_Pizza_Meat,
- Crop_Drop_Argentia,
- Crop_Drop_Plumbilia,
- Crop_Drop_Indigo,
- Crop_Drop_Ferru,
- Crop_Drop_Aurelia,
- Crop_Drop_OilBerry,
- Crop_Drop_MilkWart,
- Crop_Drop_BobsYerUncleRanks,
- Crop_Drop_Coppon,
- Crop_Drop_Tine,
- Crop_Drop_Chilly,
- Crop_Drop_Lemon,
- Crop_Drop_Onion,
- Crop_Drop_Tomato,
- Crop_Drop_MTomato,
- Crop_Drop_Grapes,
- Crop_Drop_TeaLeaf,
- Crop_Drop_Cucumber,
- Crop_Drop_Rape,
- Schematic,
- Schematic_Crafting,
- Schematic_1by1,
- Schematic_2by2,
- Schematic_3by3,
- Schematic_Dust,
- Circuit_Integrated,
- Circuit_Board_Basic,
- Circuit_Board_Advanced,
- Circuit_Board_Elite,
- Circuit_Parts_Advanced,
- Circuit_Parts_Wiring_Basic,
- Circuit_Parts_Wiring_Advanced,
- Circuit_Parts_Wiring_Elite,
- Circuit_Parts_Crystal_Chip_Elite,
- Circuit_Parts_Crystal_Chip_Master,
- Circuit_Primitive,
- Circuit_Basic,
- Circuit_Good,
- Circuit_Advanced,
- Circuit_Data,
- Circuit_Elite,
- Circuit_Master,
- Circuit_Ultimate,
- Rotor_LV, Rotor_MV, Rotor_HV, Rotor_EV, Rotor_IV, Rotor_LuV, Rotor_ZPM, Rotor_UV,
- Electric_Motor_LV, Electric_Motor_MV, Electric_Motor_HV, Electric_Motor_EV, Electric_Motor_IV, Electric_Motor_LuV, Electric_Motor_ZPM, Electric_Motor_UV,
- Electric_Pump_LV, Electric_Pump_MV, Electric_Pump_HV, Electric_Pump_EV, Electric_Pump_IV, Electric_Pump_LuV, Electric_Pump_ZPM, Electric_Pump_UV,
- Conveyor_Module_LV, Conveyor_Module_MV, Conveyor_Module_HV, Conveyor_Module_EV, Conveyor_Module_IV, Conveyor_Module_LuV, Conveyor_Module_ZPM, Conveyor_Module_UV,
- Electric_Piston_LV, Electric_Piston_MV, Electric_Piston_HV, Electric_Piston_EV, Electric_Piston_IV, Electric_Piston_LuV, Electric_Piston_ZPM, Electric_Piston_UV,
- Field_Generator_LV, Field_Generator_MV, Field_Generator_HV, Field_Generator_EV, Field_Generator_IV, Field_Generator_LuV, Field_Generator_ZPM, Field_Generator_UV,
- Robot_Arm_LV, Robot_Arm_MV, Robot_Arm_HV, Robot_Arm_EV, Robot_Arm_IV, Robot_Arm_LuV, Robot_Arm_ZPM, Robot_Arm_UV,
- Emitter_LV, Emitter_MV, Emitter_HV, Emitter_EV, Emitter_IV, Emitter_LuV, Emitter_ZPM, Emitter_UV,
- Sensor_LV, Sensor_MV, Sensor_HV, Sensor_EV, Sensor_IV, Sensor_LuV, Sensor_ZPM, Sensor_UV,
- Battery_Hull_LV, Battery_Hull_MV, Battery_Hull_HV,
- Battery_SU_LV_SulfuricAcid,
- Battery_SU_LV_Mercury,
- Battery_SU_MV_SulfuricAcid,
- Battery_SU_MV_Mercury,
- Battery_SU_HV_SulfuricAcid,
- Battery_SU_HV_Mercury,
- Battery_RE_ULV_Tantalum,
- Battery_RE_LV_Cadmium,
- Battery_RE_LV_Lithium,
- Battery_RE_LV_Sodium,
- Battery_RE_MV_Cadmium,
- Battery_RE_MV_Lithium,
- Battery_RE_MV_Sodium,
- Battery_RE_HV_Cadmium,
- Battery_RE_HV_Lithium,
- Battery_RE_HV_Sodium,
- ZPM,
- Fuel_Can_Plastic_Empty,
- Fuel_Can_Plastic_Filled,
- Upgrade_Battery,
- Upgrade_Overclocker,
- Upgrade_Muffler,
- Upgrade_SteamEngine,
- Upgrade_Lock,
- Cover_Controller,
- Cover_ActivityDetector,
- Cover_FluidDetector,
- Cover_ItemDetector,
- Cover_EnergyDetector,
- Cover_Drain,
- Cover_Shutter,
- Cover_Crafting,
- Cover_Screen,
- Cover_SolarPanel,
- Cover_SolarPanel_8V,
- Cover_SolarPanel_LV,
- Cover_SolarPanel_MV,
- Cover_SolarPanel_HV,
- Cover_SolarPanel_EV,
- Cover_SolarPanel_IV,
- Cover_SolarPanel_LuV,
- Cover_SolarPanel_ZPM,
- Cover_SolarPanel_UV,
- Ingot_IridiumAlloy,
- Plank_Oak,
- Plank_Spruce,
- Plank_Birch,
- Plank_Jungle,
- Plank_Acacia,
- Plank_DarkOak,
- Plank_Larch,
- Plank_Teak,
- Plank_Acacia_Green,
- Plank_Lime,
- Plank_Chestnut,
- Plank_Wenge,
- Plank_Baobab,
- Plank_Sequoia,
- Plank_Kapok,
- Plank_Ebony,
- Plank_Mahagony,
- Plank_Balsa,
- Plank_Willow,
- Plank_Walnut,
- Plank_Greenheart,
- Plank_Cherry,
- Plank_Mahoe,
- Plank_Poplar,
- Plank_Palm,
- Plank_Papaya,
- Plank_Pine,
- Plank_Plum,
- Plank_Maple,
- Plank_Citrus,
- Dye_Indigo,
- Dye_SquidInk,
- Dye_Bonemeal,
- Dye_Cocoa,
- Duct_Tape,
- Book_Written_00,
- Book_Written_01,
- Book_Written_02,
- Book_Written_03,
- Paper_Printed_Pages,
- Paper_Magic_Empty,
- Paper_Magic_Page,
- Paper_Magic_Pages,
- Paper_Punch_Card_Empty,
- Paper_Punch_Card_Encoded,
- McGuffium_239,
- NC_SensorCard,
- NC_SensorKit,
- Tool_Matches,
- Tool_MatchBox_Used,
- Tool_MatchBox_Full,
- Tool_Lighter_Invar_Empty,
- Tool_Lighter_Invar_Used,
- Tool_Lighter_Invar_Full,
- Tool_Lighter_Platinum_Empty,
- Tool_Lighter_Platinum_Used,
- Tool_Lighter_Platinum_Full,
- Tool_Cheat,
- Tool_Scanner,
- Tool_DataOrb,
- Tool_DataStick,
- Tool_Sonictron,
- Tool_Sword_Bronze,
- Tool_Pickaxe_Bronze,
- Tool_Shovel_Bronze,
- Tool_Axe_Bronze,
- Tool_Hoe_Bronze,
- Tool_Sword_Steel,
- Tool_Pickaxe_Steel,
- Tool_Shovel_Steel,
- Tool_Axe_Steel,
- Tool_Hoe_Steel,
-
- Spray_Empty, Spray_Bug, Spray_Ice, Spray_Hardener, Spray_CFoam, Spray_Pepper, Spray_Hydration,
- Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, Color_06, Color_07, Color_08, Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15,
- Spray_Color_00, Spray_Color_01, Spray_Color_02, Spray_Color_03, Spray_Color_04, Spray_Color_05, Spray_Color_06, Spray_Color_07, Spray_Color_08, Spray_Color_09, Spray_Color_10, Spray_Color_11, Spray_Color_12, Spray_Color_13, Spray_Color_14, Spray_Color_15,
- Spray_Color_Used_00, Spray_Color_Used_01, Spray_Color_Used_02, Spray_Color_Used_03, Spray_Color_Used_04, Spray_Color_Used_05, Spray_Color_Used_06, Spray_Color_Used_07, Spray_Color_Used_08, Spray_Color_Used_09, Spray_Color_Used_10, Spray_Color_Used_11, Spray_Color_Used_12, Spray_Color_Used_13, Spray_Color_Used_14, Spray_Color_Used_15,
-
- Armor_Cheat,
- Armor_Cloaking,
- Armor_Lamp,
- Armor_LithiumPack,
- Armor_LapotronicPack,
- Armor_ForceField,
- Energy_LapotronicOrb,
- Reactor_NeutronReflector,
- Component_Turbine_Bronze,
- Component_Turbine_Steel,
- Component_Turbine_Magnalium,
- Component_Turbine_TungstenSteel,
- Component_Turbine_Carbon,
- Component_LavaFilter,
- Component_Sawblade_Diamond,
- Component_Grinder_Diamond,
- Component_Grinder_Tungsten,
- Component_Filter,
- Component_Minecart_Wheels_Iron,
- Component_Minecart_Wheels_Steel,
-
- Generator_Diesel_LV,
- Generator_Diesel_MV,
- Generator_Diesel_HV,
- Generator_Gas_Turbine_LV,
- Generator_Gas_Turbine_MV,
- Generator_Gas_Turbine_HV,
- Generator_Steam_Turbine_LV,
- Generator_Steam_Turbine_MV,
- Generator_Steam_Turbine_HV,
- Generator_Naquadah_Mark_I,
- Generator_Naquadah_Mark_II,
- Generator_Naquadah_Fluid,
-
- Machine_Bronze_Boiler,
- Machine_Bronze_Boiler_Solar,
- Machine_Bronze_CraftingTable,
- Machine_Bronze_Furnace,
- Machine_Bronze_Macerator,
- Machine_Bronze_Extractor,
- Machine_Bronze_Hammer,
- Machine_Bronze_Compressor,
- Machine_Bronze_AlloySmelter,
- Machine_Bronze_BlastFurnace,
- Machine_Bricked_BlastFurnace,
- Machine_Steel_Boiler_Lava,
- Machine_Steel_Boiler,
- Machine_Steel_Furnace,
- Machine_Steel_Macerator,
- Machine_Steel_Extractor,
- Machine_Steel_Hammer,
- Machine_Steel_Compressor,
- Machine_Steel_AlloySmelter,
-
- Hull_Bronze, Hull_Steel, Hull_Bronze_Bricks, Hull_Steel_Bricks,
-
- Transformer_LV_ULV, Transformer_MV_LV, Transformer_HV_MV, Transformer_EV_HV, Transformer_IV_EV, Transformer_LuV_IV, Transformer_ZPM_LuV, Transformer_UV_ZPM, Transformer_MAX_UV,
-
- Casing_ULV, Casing_LV, Casing_MV, Casing_HV, Casing_EV, Casing_IV, Casing_LuV, Casing_ZPM, Casing_UV, Casing_MAX, Casing_BronzePlatedBricks, Casing_HeatProof, Casing_Coil_Cupronickel_Deprecated, Casing_Coil_Kanthal_Deprecated, Casing_Coil_Nichrome_Deprecated, Casing_Coil_Superconductor,
- Casing_SolidSteel, Casing_FrostProof, Casing_Gearbox_Bronze, Casing_Gearbox_Steel, Casing_Gearbox_Titanium, Casing_Gearbox_TungstenSteel, Casing_Processor, Casing_DataDrive, Casing_ContainmentField, Casing_Assembler, Casing_Pump, Casing_Motor, Casing_Pipe_Bronze, Casing_Pipe_Steel, Casing_Pipe_Titanium, Casing_Pipe_TungstenSteel, Casing_Pipe_Polytetrafluoroethylene,
- Casing_Stripes_A, Casing_Stripes_B, Casing_RadioactiveHazard, Casing_BioHazard, Casing_ExplosionHazard, Casing_FireHazard, Casing_AcidHazard, Casing_MagicHazard, Casing_FrostHazard, Casing_NoiseHazard, Casing_Grate, Casing_Vent, Casing_RadiationProof, Casing_Firebox_Bronze, Casing_Firebox_Steel, Casing_Firebox_TungstenSteel, Casing_Chemically_Inert,
- Casing_MiningOsmiridium, Casing_RobustTungstenSteel, Casing_CleanStainlessSteel, Casing_StableTitanium, Casing_Firebox_Titanium,
- Hull_ULV, Hull_LV, Hull_MV, Hull_HV, Hull_EV, Hull_IV, Hull_LuV, Hull_ZPM, Hull_UV, Hull_MAX,
- CompressedFireclay, Firebrick, Casing_Firebricks,
-
- Automation_Filter_ULV, Automation_Filter_LV, Automation_Filter_MV, Automation_Filter_HV, Automation_Filter_EV, Automation_Filter_IV, Automation_Filter_LuV, Automation_Filter_ZPM, Automation_Filter_UV, Automation_Filter_MAX,
- Automation_TypeFilter_ULV, Automation_TypeFilter_LV, Automation_TypeFilter_MV, Automation_TypeFilter_HV, Automation_TypeFilter_EV, Automation_TypeFilter_IV, Automation_TypeFilter_LuV, Automation_TypeFilter_ZPM, Automation_TypeFilter_UV, Automation_TypeFilter_MAX,
- Automation_ChestBuffer_ULV, Automation_ChestBuffer_LV, Automation_ChestBuffer_MV, Automation_ChestBuffer_HV, Automation_ChestBuffer_EV, Automation_ChestBuffer_IV, Automation_ChestBuffer_LuV, Automation_ChestBuffer_ZPM, Automation_ChestBuffer_UV, Automation_ChestBuffer_MAX,
- Automation_SuperBuffer_ULV, Automation_SuperBuffer_LV, Automation_SuperBuffer_MV, Automation_SuperBuffer_HV, Automation_SuperBuffer_EV, Automation_SuperBuffer_IV, Automation_SuperBuffer_LuV, Automation_SuperBuffer_ZPM, Automation_SuperBuffer_UV, Automation_SuperBuffer_MAX,
- Automation_Regulator_ULV, Automation_Regulator_LV, Automation_Regulator_MV, Automation_Regulator_HV, Automation_Regulator_EV, Automation_Regulator_IV, Automation_Regulator_LuV, Automation_Regulator_ZPM, Automation_Regulator_UV, Automation_Regulator_MAX,
- Automation_ItemDistributor_ULV, Automation_ItemDistributor_LV, Automation_ItemDistributor_MV, Automation_ItemDistributor_HV, Automation_ItemDistributor_EV, Automation_ItemDistributor_IV, Automation_ItemDistributor_LuV, Automation_ItemDistributor_ZPM, Automation_ItemDistributor_UV, Automation_ItemDistributor_MAX,
-
- Hatch_Dynamo_ULV, Hatch_Dynamo_LV, Hatch_Dynamo_MV, Hatch_Dynamo_HV, Hatch_Dynamo_EV, Hatch_Dynamo_IV, Hatch_Dynamo_LuV, Hatch_Dynamo_ZPM, Hatch_Dynamo_UV, Hatch_Dynamo_MAX,
- Hatch_Energy_ULV, Hatch_Energy_LV, Hatch_Energy_MV, Hatch_Energy_HV, Hatch_Energy_EV, Hatch_Energy_IV, Hatch_Energy_LuV, Hatch_Energy_ZPM, Hatch_Energy_UV, Hatch_Energy_MAX,
- Hatch_Input_ULV, Hatch_Input_LV, Hatch_Input_MV, Hatch_Input_HV, Hatch_Input_EV, Hatch_Input_IV, Hatch_Input_LuV, Hatch_Input_ZPM, Hatch_Input_UV, Hatch_Input_MAX,
- Hatch_Input_Bus_ULV, Hatch_Input_Bus_LV, Hatch_Input_Bus_MV, Hatch_Input_Bus_HV, Hatch_Input_Bus_EV, Hatch_Input_Bus_IV, Hatch_Input_Bus_LuV, Hatch_Input_Bus_ZPM, Hatch_Input_Bus_UV, Hatch_Input_Bus_MAX,
- Hatch_Output_ULV, Hatch_Output_LV, Hatch_Output_MV, Hatch_Output_HV, Hatch_Output_EV, Hatch_Output_IV, Hatch_Output_LuV, Hatch_Output_ZPM, Hatch_Output_UV, Hatch_Output_MAX,
- Hatch_Output_Bus_ULV, Hatch_Output_Bus_LV, Hatch_Output_Bus_MV, Hatch_Output_Bus_HV, Hatch_Output_Bus_EV, Hatch_Output_Bus_IV, Hatch_Output_Bus_LuV, Hatch_Output_Bus_ZPM, Hatch_Output_Bus_UV, Hatch_Output_Bus_MAX,
- Hatch_Muffler_LV, Hatch_Muffler_MV, Hatch_Muffler_HV, Hatch_Muffler_EV, Hatch_Muffler_IV, Hatch_Muffler_LuV, Hatch_Muffler_ZPM, Hatch_Muffler_UV, Hatch_Muffler_MAX,
- Hatch_Maintenance, Hatch_DataAccess_EV, Hatch_DataAccess_LuV,
-
- Battery_Buffer_1by1_ULV, Battery_Buffer_1by1_LV, Battery_Buffer_1by1_MV, Battery_Buffer_1by1_HV, Battery_Buffer_1by1_EV, Battery_Buffer_1by1_IV, Battery_Buffer_1by1_LuV, Battery_Buffer_1by1_ZPM, Battery_Buffer_1by1_UV, Battery_Buffer_1by1_MAX,
- Battery_Buffer_2by2_ULV, Battery_Buffer_2by2_LV, Battery_Buffer_2by2_MV, Battery_Buffer_2by2_HV, Battery_Buffer_2by2_EV, Battery_Buffer_2by2_IV, Battery_Buffer_2by2_LuV, Battery_Buffer_2by2_ZPM, Battery_Buffer_2by2_UV, Battery_Buffer_2by2_MAX,
- Battery_Buffer_3by3_ULV, Battery_Buffer_3by3_LV, Battery_Buffer_3by3_MV, Battery_Buffer_3by3_HV, Battery_Buffer_3by3_EV, Battery_Buffer_3by3_IV, Battery_Buffer_3by3_LuV, Battery_Buffer_3by3_ZPM, Battery_Buffer_3by3_UV, Battery_Buffer_3by3_MAX,
- Battery_Buffer_4by4_ULV, Battery_Buffer_4by4_LV, Battery_Buffer_4by4_MV, Battery_Buffer_4by4_HV, Battery_Buffer_4by4_EV, Battery_Buffer_4by4_IV, Battery_Buffer_4by4_LuV, Battery_Buffer_4by4_ZPM, Battery_Buffer_4by4_UV, Battery_Buffer_4by4_MAX,
-
- Locker_ULV, Locker_LV, Locker_MV, Locker_HV, Locker_EV, Locker_IV, Locker_LuV, Locker_ZPM, Locker_UV, Locker_MAX,
-
- Machine_Multi_LargeBoiler_Bronze, Machine_Multi_LargeBoiler_Steel, Machine_Multi_LargeBoiler_Titanium, Machine_Multi_LargeBoiler_TungstenSteel, Machine_Multi_BlastFurnace, Machine_Multi_ImplosionCompressor, Machine_Multi_VacuumFreezer, Machine_Multi_Furnace,
- Machine_LV_AlloySmelter, Machine_MV_AlloySmelter, Machine_HV_AlloySmelter, Machine_EV_AlloySmelter, Machine_IV_AlloySmelter, Machine_LuV_AlloySmelter, Machine_ZPM_AlloySmelter, Machine_UV_AlloySmelter,
- Machine_LV_Assembler, Machine_MV_Assembler, Machine_HV_Assembler, Machine_EV_Assembler, Machine_IV_Assembler, Machine_LuV_Assembler, Machine_ZPM_Assembler, Machine_UV_Assembler,
- Machine_LV_Bender, Machine_MV_Bender, Machine_HV_Bender, Machine_EV_Bender, Machine_IV_Bender, Machine_LuV_Bender, Machine_ZPM_Bender, Machine_UV_Bender,
- Machine_LV_Canner, Machine_MV_Canner, Machine_HV_Canner, Machine_EV_Canner, Machine_IV_Canner, Machine_LuV_Canner, Machine_ZPM_Canner, Machine_UV_Canner,
- Machine_LV_Compressor, Machine_MV_Compressor, Machine_HV_Compressor, Machine_EV_Compressor, Machine_IV_Compressor, Machine_LuV_Compressor, Machine_ZPM_Compressor, Machine_UV_Compressor,
- Machine_LV_Cutter, Machine_MV_Cutter, Machine_HV_Cutter, Machine_EV_Cutter, Machine_IV_Cutter, Machine_LuV_Cutter, Machine_ZPM_Cutter, Machine_UV_Cutter,
- Machine_LV_Slicer, Machine_MV_Slicer, Machine_HV_Slicer, Machine_EV_Slicer, Machine_IV_Slicer, Machine_LuV_Slicer, Machine_ZPM_Slicer, Machine_UV_Slicer,
- Machine_LV_Sifter, Machine_MV_Sifter, Machine_HV_Sifter, Machine_EV_Sifter, Machine_IV_Sifter, Machine_LuV_Sifter, Machine_ZPM_Sifter, Machine_UV_Sifter,
- Machine_LV_ArcFurnace, Machine_MV_ArcFurnace, Machine_HV_ArcFurnace, Machine_EV_ArcFurnace, Machine_IV_ArcFurnace, Machine_LuV_ArcFurnace, Machine_ZPM_ArcFurnace, Machine_UV_ArcFurnace,
- Machine_LV_PlasmaArcFurnace, Machine_MV_PlasmaArcFurnace, Machine_HV_PlasmaArcFurnace, Machine_EV_PlasmaArcFurnace, Machine_IV_PlasmaArcFurnace, Machine_LuV_PlasmaArcFurnace, Machine_ZPM_PlasmaArcFurnace, Machine_UV_PlasmaArcFurnace,
- Machine_LV_Oven, Machine_MV_Oven, Machine_HV_Oven, Machine_EV_Oven, Machine_IV_Oven, Machine_LuV_Oven, Machine_ZPM_Oven, Machine_UV_Oven,
- Machine_LV_E_Furnace, Machine_MV_E_Furnace, Machine_HV_E_Furnace, Machine_EV_E_Furnace, Machine_IV_E_Furnace, Machine_LuV_E_Furnace, Machine_ZPM_E_Furnace, Machine_UV_E_Furnace,
- Machine_LV_Extractor, Machine_MV_Extractor, Machine_HV_Extractor, Machine_EV_Extractor, Machine_IV_Extractor, Machine_LuV_Extractor, Machine_ZPM_Extractor, Machine_UV_Extractor,
- Machine_LV_Extruder, Machine_MV_Extruder, Machine_HV_Extruder, Machine_EV_Extruder, Machine_IV_Extruder, Machine_LuV_Extruder, Machine_ZPM_Extruder, Machine_UV_Extruder,
- Machine_LV_Lathe, Machine_MV_Lathe, Machine_HV_Lathe, Machine_EV_Lathe, Machine_IV_Lathe, Machine_LuV_Lathe, Machine_ZPM_Lathe, Machine_UV_Lathe,
- Machine_LV_Macerator, Machine_MV_Macerator, Machine_HV_Macerator, Machine_EV_Macerator, Machine_IV_Macerator, Machine_LuV_Macerator, Machine_ZPM_Macerator, Machine_UV_Macerator,
- Machine_LV_Microwave, Machine_MV_Microwave, Machine_HV_Microwave, Machine_EV_Microwave, Machine_IV_Microwave, Machine_LuV_Microwave, Machine_ZPM_Microwave, Machine_UV_Microwave,
- Machine_LV_Printer, Machine_MV_Printer, Machine_HV_Printer, Machine_EV_Printer, Machine_IV_Printer, Machine_LuV_Printer, Machine_ZPM_Printer, Machine_UV_Printer,
- Machine_LV_Recycler, Machine_MV_Recycler, Machine_HV_Recycler, Machine_EV_Recycler, Machine_IV_Recycler, Machine_LuV_Recycler, Machine_ZPM_Recycler, Machine_UV_Recycler,
- Machine_LV_Scanner, Machine_MV_Scanner, Machine_HV_Scanner, Machine_EV_Scanner, Machine_IV_Scanner, Machine_LuV_Scanner, Machine_ZPM_Scanner, Machine_UV_Scanner,
- Machine_LV_Wiremill, Machine_MV_Wiremill, Machine_HV_Wiremill, Machine_EV_Wiremill, Machine_IV_Wiremill, Machine_LuV_Wiremill, Machine_ZPM_Wiremill, Machine_UV_Wiremill,
- Machine_LV_Electrolyzer, Machine_MV_Electrolyzer, Machine_HV_Electrolyzer, Machine_EV_Electrolyzer, Machine_IV_Electrolyzer, Machine_LuV_Electrolyzer, Machine_ZPM_Electrolyzer, Machine_UV_Electrolyzer,
- Machine_LV_Centrifuge, Machine_MV_Centrifuge, Machine_HV_Centrifuge, Machine_EV_Centrifuge, Machine_IV_Centrifuge, Machine_LuV_Centrifuge, Machine_ZPM_Centrifuge, Machine_UV_Centrifuge,
- Machine_LV_ThermalCentrifuge, Machine_MV_ThermalCentrifuge, Machine_HV_ThermalCentrifuge, Machine_EV_ThermalCentrifuge, Machine_IV_ThermalCentrifuge, Machine_LuV_ThermalCentrifuge, Machine_ZPM_ThermalCentrifuge, Machine_UV_ThermalCentrifuge,
- Machine_LV_OreWasher, Machine_MV_OreWasher, Machine_HV_OreWasher, Machine_EV_OreWasher, Machine_IV_OreWasher, Machine_LuV_OreWasher, Machine_ZPM_OreWasher, Machine_UV_OreWasher,
- Machine_LV_RockBreaker, Machine_MV_RockBreaker, Machine_HV_RockBreaker, Machine_EV_RockBreaker, Machine_IV_RockBreaker, Machine_LuV_RockBreaker, Machine_ZPM_RockBreaker, Machine_UV_RockBreaker,
- Machine_LV_Boxinator, Machine_MV_Boxinator, Machine_HV_Boxinator, Machine_EV_Boxinator, Machine_IV_Boxinator, Machine_LuV_Boxinator, Machine_ZPM_Boxinator, Machine_UV_Boxinator,
- Machine_LV_Unboxinator, Machine_MV_Unboxinator, Machine_HV_Unboxinator, Machine_EV_Unboxinator, Machine_IV_Unboxinator, Machine_LuV_Unboxinator, Machine_ZPM_Unboxinator, Machine_UV_Unboxinator,
- Machine_LV_ChemicalReactor, Machine_MV_ChemicalReactor, Machine_HV_ChemicalReactor, Machine_EV_ChemicalReactor, Machine_IV_ChemicalReactor, Machine_LuV_ChemicalReactor, Machine_ZPM_ChemicalReactor, Machine_UV_ChemicalReactor,
- Machine_Multi_LargeChemicalReactor,
- Machine_LV_FluidCanner, Machine_MV_FluidCanner, Machine_HV_FluidCanner, Machine_EV_FluidCanner, Machine_IV_FluidCanner, Machine_LuV_FluidCanner, Machine_ZPM_FluidCanner, Machine_UV_FluidCanner,
- Machine_LV_Disassembler, Machine_MV_Disassembler, Machine_HV_Disassembler, Machine_EV_Disassembler, Machine_IV_Disassembler, Machine_LuV_Disassembler, Machine_ZPM_Disassembler, Machine_UV_Disassembler,
- Machine_LV_Bundler, Machine_MV_Bundler, Machine_HV_Bundler, Machine_EV_Bundler, Machine_IV_Bundler, Machine_LuV_Bundler, Machine_ZPM_Bundler, Machine_UV_Bundler,
- Machine_LV_Massfab, Machine_MV_Massfab, Machine_HV_Massfab, Machine_EV_Massfab, Machine_IV_Massfab, Machine_LuV_Massfab, Machine_ZPM_Massfab, Machine_UV_Massfab,
- Machine_LV_Amplifab, Machine_MV_Amplifab, Machine_HV_Amplifab, Machine_EV_Amplifab, Machine_IV_Amplifab, Machine_LuV_Amplifab, Machine_ZPM_Amplifab, Machine_UV_Amplifab,
- Machine_LV_Replicator, Machine_MV_Replicator, Machine_HV_Replicator, Machine_EV_Replicator, Machine_IV_Replicator, Machine_LuV_Replicator, Machine_ZPM_Replicator, Machine_UV_Replicator,
- Machine_LV_Brewery, Machine_MV_Brewery, Machine_HV_Brewery, Machine_EV_Brewery, Machine_IV_Brewery, Machine_LuV_Brewery, Machine_ZPM_Brewery, Machine_UV_Brewery,
- Machine_LV_Fermenter, Machine_MV_Fermenter, Machine_HV_Fermenter, Machine_EV_Fermenter, Machine_IV_Fermenter, Machine_LuV_Fermenter, Machine_ZPM_Fermenter, Machine_UV_Fermenter,
- Machine_LV_FluidExtractor, Machine_MV_FluidExtractor, Machine_HV_FluidExtractor, Machine_EV_FluidExtractor, Machine_IV_FluidExtractor, Machine_LuV_FluidExtractor, Machine_ZPM_FluidExtractor, Machine_UV_FluidExtractor,
- Machine_LV_FluidSolidifier, Machine_MV_FluidSolidifier, Machine_HV_FluidSolidifier, Machine_EV_FluidSolidifier, Machine_IV_FluidSolidifier, Machine_LuV_FluidSolidifier, Machine_ZPM_FluidSolidifier, Machine_UV_FluidSolidifier,
- Machine_LV_Distillery, Machine_MV_Distillery, Machine_HV_Distillery, Machine_EV_Distillery, Machine_IV_Distillery, Machine_LuV_Distillery, Machine_ZPM_Distillery, Machine_UV_Distillery,
- Machine_LV_ChemicalBath, Machine_MV_ChemicalBath, Machine_HV_ChemicalBath, Machine_EV_ChemicalBath, Machine_IV_ChemicalBath, Machine_LuV_ChemicalBath, Machine_ZPM_ChemicalBath, Machine_UV_ChemicalBath,
- Machine_LV_Polarizer, Machine_MV_Polarizer, Machine_HV_Polarizer, Machine_EV_Polarizer, Machine_IV_Polarizer, Machine_LuV_Polarizer, Machine_ZPM_Polarizer, Machine_UV_Polarizer,
- Machine_LV_ElectromagneticSeparator, Machine_MV_ElectromagneticSeparator, Machine_HV_ElectromagneticSeparator, Machine_EV_ElectromagneticSeparator, Machine_IV_ElectromagneticSeparator, Machine_LuV_ElectromagneticSeparator, Machine_ZPM_ElectromagneticSeparator, Machine_UV_ElectromagneticSeparator,
- Machine_LV_Autoclave, Machine_MV_Autoclave, Machine_HV_Autoclave, Machine_EV_Autoclave, Machine_IV_Autoclave, Machine_LuV_Autoclave, Machine_ZPM_Autoclave, Machine_UV_Autoclave,
- Machine_LV_Mixer, Machine_MV_Mixer, Machine_HV_Mixer, Machine_EV_Mixer, Machine_IV_Mixer, Machine_LuV_Mixer, Machine_ZPM_Mixer, Machine_UV_Mixer,
- Machine_LV_LaserEngraver, Machine_MV_LaserEngraver, Machine_HV_LaserEngraver, Machine_EV_LaserEngraver, Machine_IV_LaserEngraver, Machine_LuV_LaserEngraver, Machine_ZPM_LaserEngraver, Machine_UV_LaserEngraver,
- Machine_LV_Press, Machine_MV_Press, Machine_HV_Press, Machine_EV_Press, Machine_IV_Press, Machine_LuV_Press, Machine_ZPM_Press, Machine_UV_Press,
- Machine_LV_Hammer, Machine_MV_Hammer, Machine_HV_Hammer, Machine_EV_Hammer, Machine_IV_Hammer, Machine_LuV_Hammer, Machine_ZPM_Hammer, Machine_UV_Hammer,
- Machine_LV_FluidHeater, Machine_MV_FluidHeater, Machine_HV_FluidHeater, Machine_EV_FluidHeater, Machine_IV_FluidHeater, Machine_LuV_FluidHeater, Machine_ZPM_FluidHeater, Machine_UV_FluidHeater,
- Machine_LV_Miner, Machine_MV_Miner,
-
- Neutron_Reflector,
- Reactor_Coolant_He_1, Reactor_Coolant_He_3, Reactor_Coolant_He_6, Reactor_Coolant_NaK_1, Reactor_Coolant_NaK_3, Reactor_Coolant_NaK_6,
- ThoriumCell_1, ThoriumCell_2, ThoriumCell_4,
- FusionComputer_LuV, FusionComputer_ZPMV, FusionComputer_UV,
- Casing_Fusion_Coil, Casing_Fusion, Casing_Fusion2,
- Generator_Plasma_IV, Generator_Plasma_LuV, Generator_Plasma_ZPMV,
- MagicEnergyConverter_LV, MagicEnergyConverter_MV, MagicEnergyConverter_HV,
- MagicEnergyAbsorber_LV, MagicEnergyAbsorber_MV, MagicEnergyAbsorber_HV, MagicEnergyAbsorber_EV,
- Depleted_Thorium_1, Depleted_Thorium_2, Depleted_Thorium_4,
- Processing_Array, Distillation_Tower, Energy_LapotronicOrb2,
- Energy_Module, Energy_Cluster,
- ZPM2, Quantum_Tank_LV, Quantum_Tank_MV, Quantum_Tank_HV, Quantum_Tank_EV, Quantum_Tank_IV, Quantum_Chest_LV, Quantum_Chest_MV, Quantum_Chest_HV, Quantum_Chest_EV, Quantum_Chest_IV,
-
- NULL, Cover_RedstoneTransmitterExternal, Cover_RedstoneTransmitterInternal, Cover_RedstoneReceiverExternal, Cover_RedstoneReceiverInternal,
- LargeSteamTurbine, LargeGasTurbine, LargeHPSteamTurbine, LargePlasmaTurbine,
- Ingot_Heavy1, Ingot_Heavy2, Ingot_Heavy3,
- Pump_LV, Pump_MV, Pump_HV, Pump_EV, Pump_IV, Pump_LuV, Pump_ZPM, Pump_UV,
- Teleporter, Cover_NeedsMaintainance, Casing_Turbine, Casing_Turbine1, Casing_Turbine2, Casing_Turbine3, Casing_EngineIntake,
- Casing_Coil_Cupronickel, Casing_Coil_Kanthal, Casing_Coil_Nichrome, Casing_Coil_TungstenSteel, Casing_Coil_HSSG, Casing_Coil_Naquadah, Casing_Coil_NaquadahAlloy,
- MobRep_LV, MobRep_MV, MobRep_HV, MobRep_EV, MobRep_IV, MobRep_LuV, MobRep_ZPM, MobRep_UV, Cover_PlayerDetector, Machine_Multi_HeatExchanger,
- Block_BronzePlate, Block_IridiumTungstensteel, Block_Plascrete, Block_TungstenSteelReinforced,
- Honeycomb, Charcoal_Pile, Block_BrittleCharcoal, Seismic_Prospector, Seismic_Prospector_Adv, OilDrill, OreDrill1, OreDrill2, OreDrill3, OreDrill4, PyrolyseOven, OilCracker, Crop_Drop_UUMBerry, Crop_Drop_UUABerry, Empty_Board_Basic, Empty_Board_Elite,
- Battery_Charger_4by4_ULV, Battery_Charger_4by4_LV, Battery_Charger_4by4_MV, Battery_Charger_4by4_HV, Battery_Charger_4by4_EV, Battery_Charger_4by4_IV, Battery_Charger_4by4_LuV, Battery_Charger_4by4_ZPM, Battery_Charger_4by4_UV, Battery_Charger_4by4_MAX,
- MicroTransmitter_HV, MicroTransmitter_EV, MicroTransmitter_IV, MicroTransmitter_LUV, MicroTransmitter_ZPM,
- Crop_Drop_Bauxite, Crop_Drop_Ilmenite, Crop_Drop_Pitchblende, Crop_Drop_Uraninite, Crop_Drop_Thorium, Crop_Drop_Nickel, Crop_Drop_Zinc, Crop_Drop_Manganese, Crop_Drop_Scheelite, Crop_Drop_Platinum, Crop_Drop_Iridium, Crop_Drop_Osmium, Crop_Drop_Naquadah, Uraniumcell_1, Uraniumcell_2, Uraniumcell_4, Moxcell_1, Moxcell_2, Moxcell_4,
- ModularBasicHelmet, ModularBasicChestplate, ModularBasicLeggings, ModularBasicBoots,
- ModularElectric1Helmet, ModularElectric1Chestplate, ModularElectric1Leggings, ModularElectric1Boots,
- ModularElectric2Helmet, ModularElectric2Chestplate, ModularElectric2Leggings, ModularElectric2Boots, Block_Powderbarrel, GelledToluene,
- FluidRegulator_LV, FluidRegulator_MV, FluidRegulator_HV, FluidRegulator_EV, FluidRegulator_IV, FluidRegulator_LuV, FluidRegulator_ZPM, FluidRegulator_UV, FluidFilter, CuringOven, Machine_Multi_Assemblyline, Machine_Multi_DieselEngine, QuantumEye, QuantumStar, Gravistar, Block_SSFUEL, Block_MSSFUEL, SFMixture, MSFMixture, Depleted_Naquadah_1, Depleted_Naquadah_2, Depleted_Naquadah_4, NaquadahCell_1, NaquadahCell_2, NaquadahCell_4, Hatch_AutoMaintenance,
- Machine_Multi_Cleanroom, Circuit_Board_Coated, Circuit_Board_Phenolic, Circuit_Board_Epoxy, Circuit_Board_Fiberglass, Circuit_Board_Multifiberglass, Circuit_Board_Wetware, Circuit_Board_Plastic,
- Circuit_Parts_Resistor, Circuit_Parts_ResistorSMD, Circuit_Parts_Glass_Tube, Circuit_Parts_Vacuum_Tube, Circuit_Parts_Coil, Circuit_Parts_Diode, Circuit_Parts_DiodeSMD, Circuit_Parts_Transistor, Circuit_Parts_TransistorSMD, Circuit_Parts_Capacitor, Circuit_Parts_CapacitorSMD, Circuit_Parts_GlassFiber, Circuit_Parts_PetriDish,
- Circuit_Silicon_Ingot, Circuit_Silicon_Ingot2, Circuit_Silicon_Ingot3, Circuit_Silicon_Wafer, Circuit_Silicon_Wafer2, Circuit_Silicon_Wafer3, Circuit_Wafer_ILC, Circuit_Chip_ILC, Circuit_Wafer_Ram, Circuit_Chip_Ram,
- Circuit_Wafer_NAND, Circuit_Chip_NAND, Circuit_Wafer_NOR, Circuit_Chip_NOR, Circuit_Wafer_CPU, Circuit_Chip_CPU, Circuit_Wafer_SoC, Circuit_Chip_SoC, Circuit_Wafer_SoC2, Circuit_Chip_SoC2, Circuit_Wafer_PIC, Circuit_Chip_PIC,
- Circuit_Wafer_HPIC, Circuit_Chip_HPIC, Circuit_Wafer_NanoCPU, Circuit_Chip_NanoCPU, Circuit_Wafer_QuantumCPU, Circuit_Chip_QuantumCPU,
- Circuit_Chip_CrystalCPU, Circuit_Chip_CrystalSoC, Circuit_Chip_NeuroCPU, Circuit_Chip_Stemcell,
- Circuit_Microprocessor, Circuit_Processor, Circuit_Computer, Circuit_Nanoprocessor, Circuit_Nanocomputer, Circuit_Elitenanocomputer, Circuit_Quantumprocessor, Circuit_Quantumcomputer, Circuit_Masterquantumcomputer,
- Circuit_Quantummainframe, Circuit_Crystalprocessor, Circuit_Crystalcomputer, Circuit_Ultimatecrystalcomputer, Circuit_Crystalmainframe, Circuit_Neuroprocessor, Circuit_Wetwarecomputer, Circuit_Wetwaresupercomputer, Circuit_Wetwaremainframe, Circuit_Parts_RawCrystalChip,
- Machine_LV_CircuitAssembler, Machine_MV_CircuitAssembler, Machine_HV_CircuitAssembler, Machine_EV_CircuitAssembler, Machine_IV_CircuitAssembler, Machine_LuV_CircuitAssembler, Machine_ZPM_CircuitAssembler, Machine_UV_CircuitAssembler, Circuit_Integrated_Good, Machine_IV_LightningRod, Machine_HV_LightningRod, Machine_EV_LightningRod;
-
- public static final ItemList[]
- DYE_ONLY_ITEMS = {Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, Color_06, Color_07, Color_08, Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15}, SPRAY_CAN_DYES = {Spray_Color_00, Spray_Color_01, Spray_Color_02, Spray_Color_03, Spray_Color_04, Spray_Color_05, Spray_Color_06, Spray_Color_07, Spray_Color_08, Spray_Color_09, Spray_Color_10, Spray_Color_11, Spray_Color_12, Spray_Color_13, Spray_Color_14, Spray_Color_15}, SPRAY_CAN_DYES_USED = {Spray_Color_Used_00, Spray_Color_Used_01, Spray_Color_Used_02, Spray_Color_Used_03, Spray_Color_Used_04, Spray_Color_Used_05, Spray_Color_Used_06, Spray_Color_Used_07, Spray_Color_Used_08, Spray_Color_Used_09, Spray_Color_Used_10, Spray_Color_Used_11, Spray_Color_Used_12, Spray_Color_Used_13, Spray_Color_Used_14, Spray_Color_Used_15}, TRANSFORMERS = {Transformer_LV_ULV, Transformer_MV_LV, Transformer_HV_MV, Transformer_EV_HV, Transformer_IV_EV, Transformer_LuV_IV, Transformer_ZPM_LuV, Transformer_UV_ZPM, Transformer_MAX_UV}, MACHINE_HULLS = {Hull_ULV, Hull_LV, Hull_MV, Hull_HV, Hull_EV, Hull_IV, Hull_LuV, Hull_ZPM, Hull_UV, Hull_MAX}, HATCHES_DYNAMO = {Hatch_Dynamo_ULV, Hatch_Dynamo_LV, Hatch_Dynamo_MV, Hatch_Dynamo_HV, Hatch_Dynamo_EV, Hatch_Dynamo_IV, Hatch_Dynamo_LuV, Hatch_Dynamo_ZPM, Hatch_Dynamo_UV, Hatch_Dynamo_MAX}, HATCHES_ENERGY = {Hatch_Energy_ULV, Hatch_Energy_LV, Hatch_Energy_MV, Hatch_Energy_HV, Hatch_Energy_EV, Hatch_Energy_IV, Hatch_Energy_LuV, Hatch_Energy_ZPM, Hatch_Energy_UV, Hatch_Energy_MAX}, HATCHES_INPUT = {Hatch_Input_ULV, Hatch_Input_LV, Hatch_Input_MV, Hatch_Input_HV, Hatch_Input_EV, Hatch_Input_IV, Hatch_Input_LuV, Hatch_Input_ZPM, Hatch_Input_UV, Hatch_Input_MAX}, HATCHES_INPUT_BUS = {Hatch_Input_Bus_ULV, Hatch_Input_Bus_LV, Hatch_Input_Bus_MV, Hatch_Input_Bus_HV, Hatch_Input_Bus_EV, Hatch_Input_Bus_IV, Hatch_Input_Bus_LuV, Hatch_Input_Bus_ZPM, Hatch_Input_Bus_UV, Hatch_Input_Bus_MAX}, HATCHES_OUTPUT = {Hatch_Output_ULV, Hatch_Output_LV, Hatch_Output_MV, Hatch_Output_HV, Hatch_Output_EV, Hatch_Output_IV, Hatch_Output_LuV, Hatch_Output_ZPM, Hatch_Output_UV, Hatch_Output_MAX}, HATCHES_OUTPUT_BUS = {Hatch_Output_Bus_ULV, Hatch_Output_Bus_LV, Hatch_Output_Bus_MV, Hatch_Output_Bus_HV, Hatch_Output_Bus_EV, Hatch_Output_Bus_IV, Hatch_Output_Bus_LuV, Hatch_Output_Bus_ZPM, Hatch_Output_Bus_UV, Hatch_Output_Bus_MAX}, HATCHES_MUFFLER = {Hatch_Muffler_LV, Hatch_Muffler_LV, Hatch_Muffler_MV, Hatch_Muffler_HV, Hatch_Muffler_EV, Hatch_Muffler_IV, Hatch_Muffler_LuV, Hatch_Muffler_ZPM, Hatch_Muffler_UV, Hatch_Muffler_MAX};
- public static Fluid sOilExtraHeavy, sEpichlorhydrin, sDrillingFluid, sNitricAcid, sBlueVitriol, sNickelSulfate, sToluene, sNitrationMixture, sRocketFuel, sHydricSulfur, sIndiumConcentrate, sLeadZincSolution;
- private ItemStack mStack;
- private boolean mHasNotBeenSet = true;
-
- @Override
- public IItemContainer set(Item aItem) {
- mHasNotBeenSet = false;
- if (aItem == null) return this;
- ItemStack aStack = new ItemStack(aItem, 1, 0);
- mStack = GT_Utility.copyAmount(1, aStack);
- return this;
- }
-
- @Override
- public IItemContainer set(ItemStack aStack) {
- mHasNotBeenSet = false;
- mStack = GT_Utility.copyAmount(1, aStack);
- return this;
- }
-
- @Override
- public Item getItem() {
- if (mHasNotBeenSet)
- throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- if (GT_Utility.isStackInvalid(mStack)) return null;
- return mStack.getItem();
- }
-
- @Override
- public Block getBlock() {
- if (mHasNotBeenSet)
- throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- return GT_Utility.getBlockFromItem(getItem());
- }
-
- @Override
- public final boolean hasBeenSet() {
- return !mHasNotBeenSet;
- }
-
- @Override
- public boolean isStackEqual(Object aStack) {
- return isStackEqual(aStack, false, false);
- }
-
- @Override
- public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT) {
- if (GT_Utility.isStackInvalid(aStack)) return false;
- return GT_Utility.areUnificationsEqual((ItemStack) aStack, aWildcard ? getWildcard(1) : get(1), aIgnoreNBT);
- }
-
- @Override
- public ItemStack get(long aAmount, Object... aReplacements) {
- if (mHasNotBeenSet)
- throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
- return GT_Utility.copyAmount(aAmount, GT_OreDictUnificator.get(mStack));
- }
-
- @Override
- public ItemStack getWildcard(long aAmount, Object... aReplacements) {
- if (mHasNotBeenSet)
- throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
- return GT_Utility.copyAmountAndMetaData(aAmount, W, GT_OreDictUnificator.get(mStack));
- }
-
- @Override
- public ItemStack getUndamaged(long aAmount, Object... aReplacements) {
- if (mHasNotBeenSet)
- throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
- return GT_Utility.copyAmountAndMetaData(aAmount, 0, GT_OreDictUnificator.get(mStack));
- }
-
- @Override
- public ItemStack getAlmostBroken(long aAmount, Object... aReplacements) {
- if (mHasNotBeenSet)
- throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
- return GT_Utility.copyAmountAndMetaData(aAmount, mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(mStack));
- }
-
- @Override
- public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements) {
- ItemStack rStack = get(1, aReplacements);
- if (GT_Utility.isStackInvalid(rStack)) return null;
- rStack.setStackDisplayName(aDisplayName);
- return GT_Utility.copyAmount(aAmount, rStack);
- }
-
- @Override
- public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements) {
- ItemStack rStack = get(1, aReplacements);
- if (GT_Utility.isStackInvalid(rStack)) return null;
- GT_ModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false);
- return GT_Utility.copyAmount(aAmount, rStack);
- }
-
- @Override
- public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements) {
- if (mHasNotBeenSet)
- throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
- return GT_Utility.copyAmountAndMetaData(aAmount, aMetaValue, GT_OreDictUnificator.get(mStack));
- }
-
- @Override
- public IItemContainer registerOre(Object... aOreNames) {
- if (mHasNotBeenSet)
- throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, get(1));
- return this;
- }
-
- @Override
- public IItemContainer registerWildcardAsOre(Object... aOreNames) {
- if (mHasNotBeenSet)
- throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
- for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, getWildcard(1));
- return this;
- }
-}
+package gregtech.api.enums;
+
+import gregtech.api.interfaces.IItemContainer;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.block.Block;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.Fluid;
+
+import static gregtech.api.enums.GT_Values.W;
+
+/**
+ * Class containing all non-OreDict Items of GregTech.
+ */
+public enum ItemList implements IItemContainer {
+ Display_ITS_FREE,
+ Display_Fluid,
+ TE_Slag,
+ TE_Slag_Rich,
+ TE_Rockwool,
+ TE_Hardened_Glass,
+ FR_Lemon,
+ FR_Mulch,
+ FR_Fertilizer,
+ FR_Compost,
+ FR_Silk,
+ FR_Wax,
+ FR_RefractoryWax,
+ FR_WaxCapsule,
+ FR_RefractoryCapsule,
+ FR_Stick,
+ FR_Casing_Impregnated,
+ FR_Casing_Sturdy,
+ FR_Casing_Hardened,
+ FR_Bee_Drone,
+ FR_Bee_Princess,
+ FR_Bee_Queen,
+ FR_Tree_Sapling,
+ FR_Butterfly,
+ FR_Larvae,
+ FR_Serum,
+ FR_Caterpillar,
+ FR_PollenFertile,
+ TF_LiveRoot,
+ TF_Vial_FieryBlood,
+ TF_Vial_FieryTears,
+ RC_ShuntingWire,
+ RC_ShuntingWireFrame,
+ RC_Rail_Reinforced,
+ RC_Rail_Electric,
+ RC_Rail_Standard,
+ RC_Rail_Wooden,
+ RC_Rail_Adv,
+ RC_Rail_HS,
+ RC_Tie_Wood,
+ RC_Tie_Stone,
+ RC_Bed_Wood,
+ RC_Bed_Stone,
+ RC_Rebar,
+ IC2_Item_Casing_Tin,
+ IC2_Item_Casing_Copper,
+ IC2_Item_Casing_Iron,
+ IC2_Item_Casing_Steel,
+ IC2_Item_Casing_Lead,
+ IC2_Item_Casing_Bronze,
+ IC2_Item_Casing_Gold,
+ IC2_Spray_WeedEx,
+ IC2_Scrap,
+ IC2_Scrapbox,
+ IC2_Fertilizer,
+ IC2_Mixed_Metal_Ingot,
+ IC2_Hops,
+ IC2_Resin,
+ IC2_Plantball,
+ IC2_PlantballCompressed,
+ IC2_CoffeeBeans,
+ IC2_CoffeePowder,
+ IC2_Crop_Seeds,
+ IC2_Grin_Powder,
+ IC2_Energium_Dust,
+ IC2_Compressed_Coal_Ball,
+ IC2_Compressed_Coal_Chunk,
+ IC2_Fuel_Rod_Empty,
+ IC2_Fuel_Can_Empty,
+ IC2_Fuel_Can_Filled,
+ IC2_Food_Can_Empty,
+ IC2_Food_Can_Filled,
+ IC2_Food_Can_Spoiled,
+ IC2_ShaftIron,
+ IC2_ShaftSteel,
+ IC2_Industrial_Diamond,
+ IC2_ForgeHammer,
+ IC2_WireCutter,
+ IC2_SuBattery,
+ IC2_ReBattery,
+ IC2_AdvBattery,
+ IC2_EnergyCrystal,
+ IC2_LapotronCrystal,
+ Arrow_Head_Glass_Emtpy,
+ Arrow_Head_Glass_Poison,
+ Arrow_Head_Glass_Poison_Long,
+ Arrow_Head_Glass_Poison_Strong,
+ Arrow_Head_Glass_Slowness,
+ Arrow_Head_Glass_Slowness_Long,
+ Arrow_Head_Glass_Weakness,
+ Arrow_Head_Glass_Weakness_Long,
+ Arrow_Head_Glass_Holy_Water,
+ Arrow_Wooden_Glass_Emtpy,
+ Arrow_Wooden_Glass_Poison,
+ Arrow_Wooden_Glass_Poison_Long,
+ Arrow_Wooden_Glass_Poison_Strong,
+ Arrow_Wooden_Glass_Slowness,
+ Arrow_Wooden_Glass_Slowness_Long,
+ Arrow_Wooden_Glass_Weakness,
+ Arrow_Wooden_Glass_Weakness_Long,
+ Arrow_Wooden_Glass_Holy_Water,
+ Arrow_Plastic_Glass_Emtpy,
+ Arrow_Plastic_Glass_Poison,
+ Arrow_Plastic_Glass_Poison_Long,
+ Arrow_Plastic_Glass_Poison_Strong,
+ Arrow_Plastic_Glass_Slowness,
+ Arrow_Plastic_Glass_Slowness_Long,
+ Arrow_Plastic_Glass_Weakness,
+ Arrow_Plastic_Glass_Weakness_Long,
+ Arrow_Plastic_Glass_Holy_Water,
+ Shape_Empty,
+ Shape_Mold_Bottle,
+ Shape_Mold_Plate,
+ Shape_Mold_Ingot,
+ Shape_Mold_Casing,
+ Shape_Mold_Gear,
+ Shape_Mold_Gear_Small,
+ Shape_Mold_Credit,
+ Shape_Mold_Nugget,
+ Shape_Mold_Block,
+ Shape_Mold_Ball,
+ Shape_Mold_Bun,
+ Shape_Mold_Bread,
+ Shape_Mold_Baguette,
+ Shape_Mold_Cylinder,
+ Shape_Mold_Anvil,
+ Shape_Mold_Arrow,
+ Shape_Mold_Name,
+ Shape_Slicer_Flat,
+ Shape_Slicer_Stripes,
+ Shape_Extruder_Bottle,
+ Shape_Extruder_Plate,
+ Shape_Extruder_Cell,
+ Shape_Extruder_Ring,
+ Shape_Extruder_Rod,
+ Shape_Extruder_Bolt,
+ Shape_Extruder_Ingot,
+ Shape_Extruder_Wire,
+ Shape_Extruder_Casing,
+ Shape_Extruder_Pipe_Tiny,
+ Shape_Extruder_Pipe_Small,
+ Shape_Extruder_Pipe_Medium,
+ Shape_Extruder_Pipe_Large,
+ Shape_Extruder_Pipe_Huge,
+ Shape_Extruder_Block,
+ Shape_Extruder_Sword,
+ Shape_Extruder_Pickaxe,
+ Shape_Extruder_Shovel,
+ Shape_Extruder_Axe,
+ Shape_Extruder_Hoe,
+ Shape_Extruder_Hammer,
+ Shape_Extruder_File,
+ Shape_Extruder_Saw,
+ Shape_Extruder_Gear,
+ Crate_Empty,
+ Credit_Copper,
+ Credit_Iron,
+ Credit_Silver,
+ Credit_Gold,
+ Credit_Platinum,
+ Credit_Osmium,
+ Credit_Greg_Copper,
+ Credit_Greg_Cupronickel,
+ Credit_Greg_Silver,
+ Credit_Greg_Gold,
+ Credit_Greg_Platinum,
+ Credit_Greg_Osmium,
+ Credit_Greg_Naquadah,
+ Credit_Greg_Neutronium,
+ Coin_Gold_Ancient,
+ Coin_Doge,
+ Coin_Chocolate,
+ Cell_Universal_Fluid,
+ Cell_Empty,
+ Cell_Water,
+ Cell_Lava,
+ Cell_Air,
+ Large_Fluid_Cell_Steel,
+ Large_Fluid_Cell_TungstenSteel,
+ ThermosCan_Empty,
+ ThermosCan_Dark_Coffee,
+ ThermosCan_Dark_Cafe_au_lait,
+ ThermosCan_Coffee,
+ ThermosCan_Cafe_au_lait,
+ ThermosCan_Lait_au_cafe,
+ ThermosCan_Dark_Chocolate_Milk,
+ ThermosCan_Chocolate_Milk,
+ ThermosCan_Tea,
+ ThermosCan_Sweet_Tea,
+ ThermosCan_Ice_Tea,
+ Bottle_Empty,
+ Bottle_Milk,
+ Bottle_Holy_Water,
+ Bottle_Purple_Drink,
+ Bottle_Grape_Juice,
+ Bottle_Wine,
+ Bottle_Vinegar,
+ Bottle_Potato_Juice,
+ Bottle_Vodka,
+ Bottle_Leninade,
+ Bottle_Mineral_Water,
+ Bottle_Salty_Water,
+ Bottle_Reed_Water,
+ Bottle_Rum,
+ Bottle_Pirate_Brew,
+ Bottle_Hops_Juice,
+ Bottle_Dark_Beer,
+ Bottle_Dragon_Blood,
+ Bottle_Wheaty_Juice,
+ Bottle_Scotch,
+ Bottle_Glen_McKenner,
+ Bottle_Wheaty_Hops_Juice,
+ Bottle_Beer,
+ Bottle_Chilly_Sauce,
+ Bottle_Hot_Sauce,
+ Bottle_Diabolo_Sauce,
+ Bottle_Diablo_Sauce,
+ Bottle_Snitches_Glitch_Sauce,
+ Bottle_Apple_Juice,
+ Bottle_Cider,
+ Bottle_Golden_Apple_Juice,
+ Bottle_Golden_Cider,
+ Bottle_Iduns_Apple_Juice,
+ Bottle_Notches_Brew,
+ Bottle_Lemon_Juice,
+ Bottle_Limoncello,
+ Bottle_Lemonade,
+ Bottle_Alcopops,
+ Bottle_Cave_Johnsons_Grenade_Juice,
+ Food_Potato_On_Stick,
+ Food_Potato_On_Stick_Roasted,
+ Food_Fries,
+ Food_ChiliChips,
+ Food_PotatoChips,
+ Food_Baked_Potato,
+ Food_Poisonous_Potato,
+ Food_Cheese,
+ Food_Chum,
+ Food_Chum_On_Stick,
+ Food_Dough,
+ Food_Dough_Sugar,
+ Food_Dough_Chocolate,
+ Food_Raw_Cookie,
+ Food_Flat_Dough,
+ Food_Burger_Veggie,
+ Food_Burger_Cheese,
+ Food_Burger_Meat,
+ Food_Burger_Chum,
+ Food_Sandwich_Veggie,
+ Food_Sandwich_Cheese,
+ Food_Sandwich_Bacon,
+ Food_Sandwich_Steak,
+ Food_Large_Sandwich_Veggie,
+ Food_Large_Sandwich_Cheese,
+ Food_Large_Sandwich_Bacon,
+ Food_Large_Sandwich_Steak,
+ Food_Sliced_Lemon,
+ Food_Sliced_Tomato,
+ Food_Sliced_Onion,
+ Food_Sliced_Cucumber,
+ Food_Sliced_Cheese,
+ Food_Sliced_Bread,
+ Food_Sliced_Bun,
+ Food_Sliced_Baguette,
+ Food_Sliced_Breads,
+ Food_Sliced_Buns,
+ Food_Sliced_Baguettes,
+ Food_Packaged_Fries,
+ Food_Packaged_PotatoChips,
+ Food_Packaged_ChiliChips,
+ Food_Raw_Potato,
+ Food_Raw_Fries,
+ Food_Raw_PotatoChips,
+ Food_Raw_Bread,
+ Food_Raw_Bun,
+ Food_Raw_Baguette,
+ Food_Raw_Cake,
+ Food_Raw_Pizza_Veggie,
+ Food_Raw_Pizza_Cheese,
+ Food_Raw_Pizza_Meat,
+ Food_Baked_Bread,
+ Food_Baked_Bun,
+ Food_Baked_Baguette,
+ Food_Baked_Cake,
+ Food_Baked_Pizza_Veggie,
+ Food_Baked_Pizza_Cheese,
+ Food_Baked_Pizza_Meat,
+ Crop_Drop_Argentia,
+ Crop_Drop_Plumbilia,
+ Crop_Drop_Indigo,
+ Crop_Drop_Ferru,
+ Crop_Drop_Aurelia,
+ Crop_Drop_OilBerry,
+ Crop_Drop_MilkWart,
+ Crop_Drop_BobsYerUncleRanks,
+ Crop_Drop_Coppon,
+ Crop_Drop_Tine,
+ Crop_Drop_Chilly,
+ Crop_Drop_Lemon,
+ Crop_Drop_Onion,
+ Crop_Drop_Tomato,
+ Crop_Drop_MTomato,
+ Crop_Drop_Grapes,
+ Crop_Drop_TeaLeaf,
+ Crop_Drop_Cucumber,
+ Crop_Drop_Rape,
+ Schematic,
+ Schematic_Crafting,
+ Schematic_1by1,
+ Schematic_2by2,
+ Schematic_3by3,
+ Schematic_Dust,
+ Circuit_Integrated,
+ Circuit_Board_Basic,
+ Circuit_Board_Advanced,
+ Circuit_Board_Elite,
+ Circuit_Parts_Advanced,
+ Circuit_Parts_Wiring_Basic,
+ Circuit_Parts_Wiring_Advanced,
+ Circuit_Parts_Wiring_Elite,
+ Circuit_Parts_Crystal_Chip_Elite,
+ Circuit_Parts_Crystal_Chip_Master,
+ Circuit_Primitive,
+ Circuit_Basic,
+ Circuit_Good,
+ Circuit_Advanced,
+ Circuit_Data,
+ Circuit_Elite,
+ Circuit_Master,
+ Circuit_Ultimate,
+ Rotor_LV, Rotor_MV, Rotor_HV, Rotor_EV, Rotor_IV, Rotor_LuV, Rotor_ZPM, Rotor_UV,
+ Electric_Motor_LV, Electric_Motor_MV, Electric_Motor_HV, Electric_Motor_EV, Electric_Motor_IV, Electric_Motor_LuV, Electric_Motor_ZPM, Electric_Motor_UV,
+ Electric_Pump_LV, Electric_Pump_MV, Electric_Pump_HV, Electric_Pump_EV, Electric_Pump_IV, Electric_Pump_LuV, Electric_Pump_ZPM, Electric_Pump_UV,
+ Conveyor_Module_LV, Conveyor_Module_MV, Conveyor_Module_HV, Conveyor_Module_EV, Conveyor_Module_IV, Conveyor_Module_LuV, Conveyor_Module_ZPM, Conveyor_Module_UV,
+ Electric_Piston_LV, Electric_Piston_MV, Electric_Piston_HV, Electric_Piston_EV, Electric_Piston_IV, Electric_Piston_LuV, Electric_Piston_ZPM, Electric_Piston_UV,
+ Field_Generator_LV, Field_Generator_MV, Field_Generator_HV, Field_Generator_EV, Field_Generator_IV, Field_Generator_LuV, Field_Generator_ZPM, Field_Generator_UV,
+ Robot_Arm_LV, Robot_Arm_MV, Robot_Arm_HV, Robot_Arm_EV, Robot_Arm_IV, Robot_Arm_LuV, Robot_Arm_ZPM, Robot_Arm_UV,
+ Emitter_LV, Emitter_MV, Emitter_HV, Emitter_EV, Emitter_IV, Emitter_LuV, Emitter_ZPM, Emitter_UV,
+ Sensor_LV, Sensor_MV, Sensor_HV, Sensor_EV, Sensor_IV, Sensor_LuV, Sensor_ZPM, Sensor_UV,
+ Battery_Hull_LV, Battery_Hull_MV, Battery_Hull_HV,
+ Battery_SU_LV_SulfuricAcid,
+ Battery_SU_LV_Mercury,
+ Battery_SU_MV_SulfuricAcid,
+ Battery_SU_MV_Mercury,
+ Battery_SU_HV_SulfuricAcid,
+ Battery_SU_HV_Mercury,
+ Battery_RE_ULV_Tantalum,
+ Battery_RE_LV_Cadmium,
+ Battery_RE_LV_Lithium,
+ Battery_RE_LV_Sodium,
+ Battery_RE_MV_Cadmium,
+ Battery_RE_MV_Lithium,
+ Battery_RE_MV_Sodium,
+ Battery_RE_HV_Cadmium,
+ Battery_RE_HV_Lithium,
+ Battery_RE_HV_Sodium,
+ ZPM,
+ Fuel_Can_Plastic_Empty,
+ Fuel_Can_Plastic_Filled,
+ Upgrade_Battery,
+ Upgrade_Overclocker,
+ Upgrade_Muffler,
+ Upgrade_SteamEngine,
+ Upgrade_Lock,
+ Cover_Controller,
+ Cover_ActivityDetector,
+ Cover_FluidDetector,
+ Cover_ItemDetector,
+ Cover_EnergyDetector,
+ Cover_Drain,
+ Cover_Shutter,
+ Cover_Crafting,
+ Cover_Screen,
+ Cover_SolarPanel,
+ Cover_SolarPanel_8V,
+ Cover_SolarPanel_LV,
+ Cover_SolarPanel_MV,
+ Cover_SolarPanel_HV,
+ Cover_SolarPanel_EV,
+ Cover_SolarPanel_IV,
+ Cover_SolarPanel_LuV,
+ Cover_SolarPanel_ZPM,
+ Cover_SolarPanel_UV,
+ Ingot_IridiumAlloy,
+ Plank_Oak,
+ Plank_Spruce,
+ Plank_Birch,
+ Plank_Jungle,
+ Plank_Acacia,
+ Plank_DarkOak,
+ Plank_Larch,
+ Plank_Teak,
+ Plank_Acacia_Green,
+ Plank_Lime,
+ Plank_Chestnut,
+ Plank_Wenge,
+ Plank_Baobab,
+ Plank_Sequoia,
+ Plank_Kapok,
+ Plank_Ebony,
+ Plank_Mahagony,
+ Plank_Balsa,
+ Plank_Willow,
+ Plank_Walnut,
+ Plank_Greenheart,
+ Plank_Cherry,
+ Plank_Mahoe,
+ Plank_Poplar,
+ Plank_Palm,
+ Plank_Papaya,
+ Plank_Pine,
+ Plank_Plum,
+ Plank_Maple,
+ Plank_Citrus,
+ Dye_Indigo,
+ Dye_SquidInk,
+ Dye_Bonemeal,
+ Dye_Cocoa,
+ Duct_Tape,
+ Book_Written_00,
+ Book_Written_01,
+ Book_Written_02,
+ Book_Written_03,
+ Paper_Printed_Pages,
+ Paper_Magic_Empty,
+ Paper_Magic_Page,
+ Paper_Magic_Pages,
+ Paper_Punch_Card_Empty,
+ Paper_Punch_Card_Encoded,
+ McGuffium_239,
+ NC_SensorCard,
+ NC_SensorKit,
+ Tool_Matches,
+ Tool_MatchBox_Used,
+ Tool_MatchBox_Full,
+ Tool_Lighter_Invar_Empty,
+ Tool_Lighter_Invar_Used,
+ Tool_Lighter_Invar_Full,
+ Tool_Lighter_Platinum_Empty,
+ Tool_Lighter_Platinum_Used,
+ Tool_Lighter_Platinum_Full,
+ Tool_Cheat,
+ Tool_Scanner,
+ Tool_DataOrb,
+ Tool_DataStick,
+ Tool_Sonictron,
+ Tool_Sword_Bronze,
+ Tool_Pickaxe_Bronze,
+ Tool_Shovel_Bronze,
+ Tool_Axe_Bronze,
+ Tool_Hoe_Bronze,
+ Tool_Sword_Steel,
+ Tool_Pickaxe_Steel,
+ Tool_Shovel_Steel,
+ Tool_Axe_Steel,
+ Tool_Hoe_Steel,
+
+ Spray_Empty, Spray_Bug, Spray_Ice, Spray_Hardener, Spray_CFoam, Spray_Pepper, Spray_Hydration,
+ Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, Color_06, Color_07, Color_08, Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15,
+ Spray_Color_00, Spray_Color_01, Spray_Color_02, Spray_Color_03, Spray_Color_04, Spray_Color_05, Spray_Color_06, Spray_Color_07, Spray_Color_08, Spray_Color_09, Spray_Color_10, Spray_Color_11, Spray_Color_12, Spray_Color_13, Spray_Color_14, Spray_Color_15,
+ Spray_Color_Used_00, Spray_Color_Used_01, Spray_Color_Used_02, Spray_Color_Used_03, Spray_Color_Used_04, Spray_Color_Used_05, Spray_Color_Used_06, Spray_Color_Used_07, Spray_Color_Used_08, Spray_Color_Used_09, Spray_Color_Used_10, Spray_Color_Used_11, Spray_Color_Used_12, Spray_Color_Used_13, Spray_Color_Used_14, Spray_Color_Used_15,
+
+ Armor_Cheat,
+ Armor_Cloaking,
+ Armor_Lamp,
+ Armor_LithiumPack,
+ Armor_LapotronicPack,
+ Armor_ForceField,
+ Energy_LapotronicOrb,
+ Reactor_NeutronReflector,
+ Component_Turbine_Bronze,
+ Component_Turbine_Steel,
+ Component_Turbine_Magnalium,
+ Component_Turbine_TungstenSteel,
+ Component_Turbine_Carbon,
+ Component_LavaFilter,
+ Component_Sawblade_Diamond,
+ Component_Grinder_Diamond,
+ Component_Grinder_Tungsten,
+ Component_Filter,
+ Component_Minecart_Wheels_Iron,
+ Component_Minecart_Wheels_Steel,
+
+ Generator_Diesel_LV,
+ Generator_Diesel_MV,
+ Generator_Diesel_HV,
+ Generator_Gas_Turbine_LV,
+ Generator_Gas_Turbine_MV,
+ Generator_Gas_Turbine_HV,
+ Generator_Steam_Turbine_LV,
+ Generator_Steam_Turbine_MV,
+ Generator_Steam_Turbine_HV,
+ Generator_Naquadah_Mark_I,
+ Generator_Naquadah_Mark_II,
+ Generator_Naquadah_Fluid,
+
+ Machine_Bronze_Boiler,
+ Machine_Bronze_Boiler_Solar,
+ Machine_Bronze_CraftingTable,
+ Machine_Bronze_Furnace,
+ Machine_Bronze_Macerator,
+ Machine_Bronze_Extractor,
+ Machine_Bronze_Hammer,
+ Machine_Bronze_Compressor,
+ Machine_Bronze_AlloySmelter,
+ Machine_Bronze_BlastFurnace,
+ Machine_Bricked_BlastFurnace,
+ Machine_Steel_Boiler_Lava,
+ Machine_Steel_Boiler,
+ Machine_Steel_Furnace,
+ Machine_Steel_Macerator,
+ Machine_Steel_Extractor,
+ Machine_Steel_Hammer,
+ Machine_Steel_Compressor,
+ Machine_Steel_AlloySmelter,
+
+ Hull_Bronze, Hull_Steel, Hull_Bronze_Bricks, Hull_Steel_Bricks,
+
+ Transformer_LV_ULV, Transformer_MV_LV, Transformer_HV_MV, Transformer_EV_HV, Transformer_IV_EV, Transformer_LuV_IV, Transformer_ZPM_LuV, Transformer_UV_ZPM, Transformer_MAX_UV,
+
+ Casing_ULV, Casing_LV, Casing_MV, Casing_HV, Casing_EV, Casing_IV, Casing_LuV, Casing_ZPM, Casing_UV, Casing_MAX, Casing_BronzePlatedBricks, Casing_HeatProof, Casing_Coil_Cupronickel_Deprecated, Casing_Coil_Kanthal_Deprecated, Casing_Coil_Nichrome_Deprecated, Casing_Coil_Superconductor,
+ Casing_SolidSteel, Casing_FrostProof, Casing_Gearbox_Bronze, Casing_Gearbox_Steel, Casing_Gearbox_Titanium, Casing_Gearbox_TungstenSteel, Casing_Processor, Casing_DataDrive, Casing_ContainmentField, Casing_Assembler, Casing_Pump, Casing_Motor, Casing_Pipe_Bronze, Casing_Pipe_Steel, Casing_Pipe_Titanium, Casing_Pipe_TungstenSteel, Casing_Pipe_Polytetrafluoroethylene,
+ Casing_Stripes_A, Casing_Stripes_B, Casing_RadioactiveHazard, Casing_BioHazard, Casing_ExplosionHazard, Casing_FireHazard, Casing_AcidHazard, Casing_MagicHazard, Casing_FrostHazard, Casing_NoiseHazard, Casing_Grate, Casing_Vent, Casing_RadiationProof, Casing_Firebox_Bronze, Casing_Firebox_Steel, Casing_Firebox_TungstenSteel, Casing_Chemically_Inert,
+ Casing_MiningOsmiridium, Casing_RobustTungstenSteel, Casing_CleanStainlessSteel, Casing_StableTitanium, Casing_Firebox_Titanium,
+ Hull_ULV, Hull_LV, Hull_MV, Hull_HV, Hull_EV, Hull_IV, Hull_LuV, Hull_ZPM, Hull_UV, Hull_MAX,
+ CompressedFireclay, Firebrick, Casing_Firebricks,
+
+ Automation_Filter_ULV, Automation_Filter_LV, Automation_Filter_MV, Automation_Filter_HV, Automation_Filter_EV, Automation_Filter_IV, Automation_Filter_LuV, Automation_Filter_ZPM, Automation_Filter_UV, Automation_Filter_MAX,
+ Automation_TypeFilter_ULV, Automation_TypeFilter_LV, Automation_TypeFilter_MV, Automation_TypeFilter_HV, Automation_TypeFilter_EV, Automation_TypeFilter_IV, Automation_TypeFilter_LuV, Automation_TypeFilter_ZPM, Automation_TypeFilter_UV, Automation_TypeFilter_MAX,
+ Automation_ChestBuffer_ULV, Automation_ChestBuffer_LV, Automation_ChestBuffer_MV, Automation_ChestBuffer_HV, Automation_ChestBuffer_EV, Automation_ChestBuffer_IV, Automation_ChestBuffer_LuV, Automation_ChestBuffer_ZPM, Automation_ChestBuffer_UV, Automation_ChestBuffer_MAX,
+ Automation_SuperBuffer_ULV, Automation_SuperBuffer_LV, Automation_SuperBuffer_MV, Automation_SuperBuffer_HV, Automation_SuperBuffer_EV, Automation_SuperBuffer_IV, Automation_SuperBuffer_LuV, Automation_SuperBuffer_ZPM, Automation_SuperBuffer_UV, Automation_SuperBuffer_MAX,
+ Automation_Regulator_ULV, Automation_Regulator_LV, Automation_Regulator_MV, Automation_Regulator_HV, Automation_Regulator_EV, Automation_Regulator_IV, Automation_Regulator_LuV, Automation_Regulator_ZPM, Automation_Regulator_UV, Automation_Regulator_MAX,
+ Automation_ItemDistributor_ULV, Automation_ItemDistributor_LV, Automation_ItemDistributor_MV, Automation_ItemDistributor_HV, Automation_ItemDistributor_EV, Automation_ItemDistributor_IV, Automation_ItemDistributor_LuV, Automation_ItemDistributor_ZPM, Automation_ItemDistributor_UV, Automation_ItemDistributor_MAX,
+
+ Hatch_Dynamo_ULV, Hatch_Dynamo_LV, Hatch_Dynamo_MV, Hatch_Dynamo_HV, Hatch_Dynamo_EV, Hatch_Dynamo_IV, Hatch_Dynamo_LuV, Hatch_Dynamo_ZPM, Hatch_Dynamo_UV, Hatch_Dynamo_MAX,
+ Hatch_Energy_ULV, Hatch_Energy_LV, Hatch_Energy_MV, Hatch_Energy_HV, Hatch_Energy_EV, Hatch_Energy_IV, Hatch_Energy_LuV, Hatch_Energy_ZPM, Hatch_Energy_UV, Hatch_Energy_MAX,
+ Hatch_Input_ULV, Hatch_Input_LV, Hatch_Input_MV, Hatch_Input_HV, Hatch_Input_EV, Hatch_Input_IV, Hatch_Input_LuV, Hatch_Input_ZPM, Hatch_Input_UV, Hatch_Input_MAX,
+ Hatch_Input_Bus_ULV, Hatch_Input_Bus_LV, Hatch_Input_Bus_MV, Hatch_Input_Bus_HV, Hatch_Input_Bus_EV, Hatch_Input_Bus_IV, Hatch_Input_Bus_LuV, Hatch_Input_Bus_ZPM, Hatch_Input_Bus_UV, Hatch_Input_Bus_MAX,
+ Hatch_Output_ULV, Hatch_Output_LV, Hatch_Output_MV, Hatch_Output_HV, Hatch_Output_EV, Hatch_Output_IV, Hatch_Output_LuV, Hatch_Output_ZPM, Hatch_Output_UV, Hatch_Output_MAX,
+ Hatch_Output_Bus_ULV, Hatch_Output_Bus_LV, Hatch_Output_Bus_MV, Hatch_Output_Bus_HV, Hatch_Output_Bus_EV, Hatch_Output_Bus_IV, Hatch_Output_Bus_LuV, Hatch_Output_Bus_ZPM, Hatch_Output_Bus_UV, Hatch_Output_Bus_MAX,
+ Hatch_Muffler_LV, Hatch_Muffler_MV, Hatch_Muffler_HV, Hatch_Muffler_EV, Hatch_Muffler_IV, Hatch_Muffler_LuV, Hatch_Muffler_ZPM, Hatch_Muffler_UV, Hatch_Muffler_MAX,
+ Hatch_Maintenance, Hatch_DataAccess_EV, Hatch_DataAccess_LuV,
+
+ Battery_Buffer_1by1_ULV, Battery_Buffer_1by1_LV, Battery_Buffer_1by1_MV, Battery_Buffer_1by1_HV, Battery_Buffer_1by1_EV, Battery_Buffer_1by1_IV, Battery_Buffer_1by1_LuV, Battery_Buffer_1by1_ZPM, Battery_Buffer_1by1_UV, Battery_Buffer_1by1_MAX,
+ Battery_Buffer_2by2_ULV, Battery_Buffer_2by2_LV, Battery_Buffer_2by2_MV, Battery_Buffer_2by2_HV, Battery_Buffer_2by2_EV, Battery_Buffer_2by2_IV, Battery_Buffer_2by2_LuV, Battery_Buffer_2by2_ZPM, Battery_Buffer_2by2_UV, Battery_Buffer_2by2_MAX,
+ Battery_Buffer_3by3_ULV, Battery_Buffer_3by3_LV, Battery_Buffer_3by3_MV, Battery_Buffer_3by3_HV, Battery_Buffer_3by3_EV, Battery_Buffer_3by3_IV, Battery_Buffer_3by3_LuV, Battery_Buffer_3by3_ZPM, Battery_Buffer_3by3_UV, Battery_Buffer_3by3_MAX,
+ Battery_Buffer_4by4_ULV, Battery_Buffer_4by4_LV, Battery_Buffer_4by4_MV, Battery_Buffer_4by4_HV, Battery_Buffer_4by4_EV, Battery_Buffer_4by4_IV, Battery_Buffer_4by4_LuV, Battery_Buffer_4by4_ZPM, Battery_Buffer_4by4_UV, Battery_Buffer_4by4_MAX,
+
+ Locker_ULV, Locker_LV, Locker_MV, Locker_HV, Locker_EV, Locker_IV, Locker_LuV, Locker_ZPM, Locker_UV, Locker_MAX,
+
+ Machine_Multi_LargeBoiler_Bronze, Machine_Multi_LargeBoiler_Steel, Machine_Multi_LargeBoiler_Titanium, Machine_Multi_LargeBoiler_TungstenSteel, Machine_Multi_BlastFurnace, Machine_Multi_ImplosionCompressor, Machine_Multi_VacuumFreezer, Machine_Multi_Furnace,
+ Machine_LV_AlloySmelter, Machine_MV_AlloySmelter, Machine_HV_AlloySmelter, Machine_EV_AlloySmelter, Machine_IV_AlloySmelter, Machine_LuV_AlloySmelter, Machine_ZPM_AlloySmelter, Machine_UV_AlloySmelter,
+ Machine_LV_Assembler, Machine_MV_Assembler, Machine_HV_Assembler, Machine_EV_Assembler, Machine_IV_Assembler, Machine_LuV_Assembler, Machine_ZPM_Assembler, Machine_UV_Assembler,
+ Machine_LV_Bender, Machine_MV_Bender, Machine_HV_Bender, Machine_EV_Bender, Machine_IV_Bender, Machine_LuV_Bender, Machine_ZPM_Bender, Machine_UV_Bender,
+ Machine_LV_Canner, Machine_MV_Canner, Machine_HV_Canner, Machine_EV_Canner, Machine_IV_Canner, Machine_LuV_Canner, Machine_ZPM_Canner, Machine_UV_Canner,
+ Machine_LV_Compressor, Machine_MV_Compressor, Machine_HV_Compressor, Machine_EV_Compressor, Machine_IV_Compressor, Machine_LuV_Compressor, Machine_ZPM_Compressor, Machine_UV_Compressor,
+ Machine_LV_Cutter, Machine_MV_Cutter, Machine_HV_Cutter, Machine_EV_Cutter, Machine_IV_Cutter, Machine_LuV_Cutter, Machine_ZPM_Cutter, Machine_UV_Cutter,
+ Machine_LV_Slicer, Machine_MV_Slicer, Machine_HV_Slicer, Machine_EV_Slicer, Machine_IV_Slicer, Machine_LuV_Slicer, Machine_ZPM_Slicer, Machine_UV_Slicer,
+ Machine_LV_Sifter, Machine_MV_Sifter, Machine_HV_Sifter, Machine_EV_Sifter, Machine_IV_Sifter, Machine_LuV_Sifter, Machine_ZPM_Sifter, Machine_UV_Sifter,
+ Machine_LV_ArcFurnace, Machine_MV_ArcFurnace, Machine_HV_ArcFurnace, Machine_EV_ArcFurnace, Machine_IV_ArcFurnace, Machine_LuV_ArcFurnace, Machine_ZPM_ArcFurnace, Machine_UV_ArcFurnace,
+ Machine_LV_PlasmaArcFurnace, Machine_MV_PlasmaArcFurnace, Machine_HV_PlasmaArcFurnace, Machine_EV_PlasmaArcFurnace, Machine_IV_PlasmaArcFurnace, Machine_LuV_PlasmaArcFurnace, Machine_ZPM_PlasmaArcFurnace, Machine_UV_PlasmaArcFurnace,
+ Machine_LV_Oven, Machine_MV_Oven, Machine_HV_Oven, Machine_EV_Oven, Machine_IV_Oven, Machine_LuV_Oven, Machine_ZPM_Oven, Machine_UV_Oven,
+ Machine_LV_E_Furnace, Machine_MV_E_Furnace, Machine_HV_E_Furnace, Machine_EV_E_Furnace, Machine_IV_E_Furnace, Machine_LuV_E_Furnace, Machine_ZPM_E_Furnace, Machine_UV_E_Furnace,
+ Machine_LV_Extractor, Machine_MV_Extractor, Machine_HV_Extractor, Machine_EV_Extractor, Machine_IV_Extractor, Machine_LuV_Extractor, Machine_ZPM_Extractor, Machine_UV_Extractor,
+ Machine_LV_Extruder, Machine_MV_Extruder, Machine_HV_Extruder, Machine_EV_Extruder, Machine_IV_Extruder, Machine_LuV_Extruder, Machine_ZPM_Extruder, Machine_UV_Extruder,
+ Machine_LV_Lathe, Machine_MV_Lathe, Machine_HV_Lathe, Machine_EV_Lathe, Machine_IV_Lathe, Machine_LuV_Lathe, Machine_ZPM_Lathe, Machine_UV_Lathe,
+ Machine_LV_Macerator, Machine_MV_Macerator, Machine_HV_Macerator, Machine_EV_Macerator, Machine_IV_Macerator, Machine_LuV_Macerator, Machine_ZPM_Macerator, Machine_UV_Macerator,
+ Machine_LV_Microwave, Machine_MV_Microwave, Machine_HV_Microwave, Machine_EV_Microwave, Machine_IV_Microwave, Machine_LuV_Microwave, Machine_ZPM_Microwave, Machine_UV_Microwave,
+ Machine_LV_Printer, Machine_MV_Printer, Machine_HV_Printer, Machine_EV_Printer, Machine_IV_Printer, Machine_LuV_Printer, Machine_ZPM_Printer, Machine_UV_Printer,
+ Machine_LV_Recycler, Machine_MV_Recycler, Machine_HV_Recycler, Machine_EV_Recycler, Machine_IV_Recycler, Machine_LuV_Recycler, Machine_ZPM_Recycler, Machine_UV_Recycler,
+ Machine_LV_Scanner, Machine_MV_Scanner, Machine_HV_Scanner, Machine_EV_Scanner, Machine_IV_Scanner, Machine_LuV_Scanner, Machine_ZPM_Scanner, Machine_UV_Scanner,
+ Machine_LV_Wiremill, Machine_MV_Wiremill, Machine_HV_Wiremill, Machine_EV_Wiremill, Machine_IV_Wiremill, Machine_LuV_Wiremill, Machine_ZPM_Wiremill, Machine_UV_Wiremill,
+ Machine_LV_Electrolyzer, Machine_MV_Electrolyzer, Machine_HV_Electrolyzer, Machine_EV_Electrolyzer, Machine_IV_Electrolyzer, Machine_LuV_Electrolyzer, Machine_ZPM_Electrolyzer, Machine_UV_Electrolyzer,
+ Machine_LV_Centrifuge, Machine_MV_Centrifuge, Machine_HV_Centrifuge, Machine_EV_Centrifuge, Machine_IV_Centrifuge, Machine_LuV_Centrifuge, Machine_ZPM_Centrifuge, Machine_UV_Centrifuge,
+ Machine_LV_ThermalCentrifuge, Machine_MV_ThermalCentrifuge, Machine_HV_ThermalCentrifuge, Machine_EV_ThermalCentrifuge, Machine_IV_ThermalCentrifuge, Machine_LuV_ThermalCentrifuge, Machine_ZPM_ThermalCentrifuge, Machine_UV_ThermalCentrifuge,
+ Machine_LV_OreWasher, Machine_MV_OreWasher, Machine_HV_OreWasher, Machine_EV_OreWasher, Machine_IV_OreWasher, Machine_LuV_OreWasher, Machine_ZPM_OreWasher, Machine_UV_OreWasher,
+ Machine_LV_RockBreaker, Machine_MV_RockBreaker, Machine_HV_RockBreaker, Machine_EV_RockBreaker, Machine_IV_RockBreaker, Machine_LuV_RockBreaker, Machine_ZPM_RockBreaker, Machine_UV_RockBreaker,
+ Machine_LV_Boxinator, Machine_MV_Boxinator, Machine_HV_Boxinator, Machine_EV_Boxinator, Machine_IV_Boxinator, Machine_LuV_Boxinator, Machine_ZPM_Boxinator, Machine_UV_Boxinator,
+ Machine_LV_Unboxinator, Machine_MV_Unboxinator, Machine_HV_Unboxinator, Machine_EV_Unboxinator, Machine_IV_Unboxinator, Machine_LuV_Unboxinator, Machine_ZPM_Unboxinator, Machine_UV_Unboxinator,
+ Machine_LV_ChemicalReactor, Machine_MV_ChemicalReactor, Machine_HV_ChemicalReactor, Machine_EV_ChemicalReactor, Machine_IV_ChemicalReactor, Machine_LuV_ChemicalReactor, Machine_ZPM_ChemicalReactor, Machine_UV_ChemicalReactor,
+ Machine_Multi_LargeChemicalReactor,
+ Machine_LV_FluidCanner, Machine_MV_FluidCanner, Machine_HV_FluidCanner, Machine_EV_FluidCanner, Machine_IV_FluidCanner, Machine_LuV_FluidCanner, Machine_ZPM_FluidCanner, Machine_UV_FluidCanner,
+ Machine_LV_Disassembler, Machine_MV_Disassembler, Machine_HV_Disassembler, Machine_EV_Disassembler, Machine_IV_Disassembler, Machine_LuV_Disassembler, Machine_ZPM_Disassembler, Machine_UV_Disassembler,
+ Machine_LV_Bundler, Machine_MV_Bundler, Machine_HV_Bundler, Machine_EV_Bundler, Machine_IV_Bundler, Machine_LuV_Bundler, Machine_ZPM_Bundler, Machine_UV_Bundler,
+ Machine_LV_Massfab, Machine_MV_Massfab, Machine_HV_Massfab, Machine_EV_Massfab, Machine_IV_Massfab, Machine_LuV_Massfab, Machine_ZPM_Massfab, Machine_UV_Massfab,
+ Machine_LV_Amplifab, Machine_MV_Amplifab, Machine_HV_Amplifab, Machine_EV_Amplifab, Machine_IV_Amplifab, Machine_LuV_Amplifab, Machine_ZPM_Amplifab, Machine_UV_Amplifab,
+ Machine_LV_Replicator, Machine_MV_Replicator, Machine_HV_Replicator, Machine_EV_Replicator, Machine_IV_Replicator, Machine_LuV_Replicator, Machine_ZPM_Replicator, Machine_UV_Replicator,
+ Machine_LV_Brewery, Machine_MV_Brewery, Machine_HV_Brewery, Machine_EV_Brewery, Machine_IV_Brewery, Machine_LuV_Brewery, Machine_ZPM_Brewery, Machine_UV_Brewery,
+ Machine_LV_Fermenter, Machine_MV_Fermenter, Machine_HV_Fermenter, Machine_EV_Fermenter, Machine_IV_Fermenter, Machine_LuV_Fermenter, Machine_ZPM_Fermenter, Machine_UV_Fermenter,
+ Machine_LV_FluidExtractor, Machine_MV_FluidExtractor, Machine_HV_FluidExtractor, Machine_EV_FluidExtractor, Machine_IV_FluidExtractor, Machine_LuV_FluidExtractor, Machine_ZPM_FluidExtractor, Machine_UV_FluidExtractor,
+ Machine_LV_FluidSolidifier, Machine_MV_FluidSolidifier, Machine_HV_FluidSolidifier, Machine_EV_FluidSolidifier, Machine_IV_FluidSolidifier, Machine_LuV_FluidSolidifier, Machine_ZPM_FluidSolidifier, Machine_UV_FluidSolidifier,
+ Machine_LV_Distillery, Machine_MV_Distillery, Machine_HV_Distillery, Machine_EV_Distillery, Machine_IV_Distillery, Machine_LuV_Distillery, Machine_ZPM_Distillery, Machine_UV_Distillery,
+ Machine_LV_ChemicalBath, Machine_MV_ChemicalBath, Machine_HV_ChemicalBath, Machine_EV_ChemicalBath, Machine_IV_ChemicalBath, Machine_LuV_ChemicalBath, Machine_ZPM_ChemicalBath, Machine_UV_ChemicalBath,
+ Machine_LV_Polarizer, Machine_MV_Polarizer, Machine_HV_Polarizer, Machine_EV_Polarizer, Machine_IV_Polarizer, Machine_LuV_Polarizer, Machine_ZPM_Polarizer, Machine_UV_Polarizer,
+ Machine_LV_ElectromagneticSeparator, Machine_MV_ElectromagneticSeparator, Machine_HV_ElectromagneticSeparator, Machine_EV_ElectromagneticSeparator, Machine_IV_ElectromagneticSeparator, Machine_LuV_ElectromagneticSeparator, Machine_ZPM_ElectromagneticSeparator, Machine_UV_ElectromagneticSeparator,
+ Machine_LV_Autoclave, Machine_MV_Autoclave, Machine_HV_Autoclave, Machine_EV_Autoclave, Machine_IV_Autoclave, Machine_LuV_Autoclave, Machine_ZPM_Autoclave, Machine_UV_Autoclave,
+ Machine_LV_Mixer, Machine_MV_Mixer, Machine_HV_Mixer, Machine_EV_Mixer, Machine_IV_Mixer, Machine_LuV_Mixer, Machine_ZPM_Mixer, Machine_UV_Mixer,
+ Machine_LV_LaserEngraver, Machine_MV_LaserEngraver, Machine_HV_LaserEngraver, Machine_EV_LaserEngraver, Machine_IV_LaserEngraver, Machine_LuV_LaserEngraver, Machine_ZPM_LaserEngraver, Machine_UV_LaserEngraver,
+ Machine_LV_Press, Machine_MV_Press, Machine_HV_Press, Machine_EV_Press, Machine_IV_Press, Machine_LuV_Press, Machine_ZPM_Press, Machine_UV_Press,
+ Machine_LV_Hammer, Machine_MV_Hammer, Machine_HV_Hammer, Machine_EV_Hammer, Machine_IV_Hammer, Machine_LuV_Hammer, Machine_ZPM_Hammer, Machine_UV_Hammer,
+ Machine_LV_FluidHeater, Machine_MV_FluidHeater, Machine_HV_FluidHeater, Machine_EV_FluidHeater, Machine_IV_FluidHeater, Machine_LuV_FluidHeater, Machine_ZPM_FluidHeater, Machine_UV_FluidHeater,
+ Machine_LV_Miner, Machine_MV_Miner,
+
+ Neutron_Reflector,
+ Reactor_Coolant_He_1, Reactor_Coolant_He_3, Reactor_Coolant_He_6, Reactor_Coolant_NaK_1, Reactor_Coolant_NaK_3, Reactor_Coolant_NaK_6,
+ ThoriumCell_1, ThoriumCell_2, ThoriumCell_4,
+ FusionComputer_LuV, FusionComputer_ZPMV, FusionComputer_UV,
+ Casing_Fusion_Coil, Casing_Fusion, Casing_Fusion2,
+ Generator_Plasma_IV, Generator_Plasma_LuV, Generator_Plasma_ZPMV,
+ MagicEnergyConverter_LV, MagicEnergyConverter_MV, MagicEnergyConverter_HV,
+ MagicEnergyAbsorber_LV, MagicEnergyAbsorber_MV, MagicEnergyAbsorber_HV, MagicEnergyAbsorber_EV,
+ Depleted_Thorium_1, Depleted_Thorium_2, Depleted_Thorium_4,
+ Processing_Array, Distillation_Tower, Energy_LapotronicOrb2,
+ Energy_Module, Energy_Cluster,
+ ZPM2, Quantum_Tank_LV, Quantum_Tank_MV, Quantum_Tank_HV, Quantum_Tank_EV, Quantum_Tank_IV, Quantum_Chest_LV, Quantum_Chest_MV, Quantum_Chest_HV, Quantum_Chest_EV, Quantum_Chest_IV,
+
+ NULL, Cover_RedstoneTransmitterExternal, Cover_RedstoneTransmitterInternal, Cover_RedstoneReceiverExternal, Cover_RedstoneReceiverInternal,
+ LargeSteamTurbine, LargeGasTurbine, LargeHPSteamTurbine, LargePlasmaTurbine,
+ Ingot_Heavy1, Ingot_Heavy2, Ingot_Heavy3,
+ Pump_LV, Pump_MV, Pump_HV, Pump_EV, Pump_IV, Pump_LuV, Pump_ZPM, Pump_UV,
+ Teleporter, Cover_NeedsMaintainance, Casing_Turbine, Casing_Turbine1, Casing_Turbine2, Casing_Turbine3, Casing_EngineIntake,
+ Casing_Coil_Cupronickel, Casing_Coil_Kanthal, Casing_Coil_Nichrome, Casing_Coil_TungstenSteel, Casing_Coil_HSSG, Casing_Coil_Naquadah, Casing_Coil_NaquadahAlloy,
+ MobRep_LV, MobRep_MV, MobRep_HV, MobRep_EV, MobRep_IV, MobRep_LuV, MobRep_ZPM, MobRep_UV, Cover_PlayerDetector, Machine_Multi_HeatExchanger,
+ Block_BronzePlate, Block_IridiumTungstensteel, Block_Plascrete, Block_TungstenSteelReinforced,
+ Honeycomb, Charcoal_Pile, Block_BrittleCharcoal, Seismic_Prospector, Seismic_Prospector_Adv, OilDrill1, OilDrill2, OilDrill3, ConcreteBackfiller1, ConcreteBackfiller2, OreDrill1, OreDrill2, OreDrill3, OreDrill4, PyrolyseOven, OilCracker, Crop_Drop_UUMBerry, Crop_Drop_UUABerry, Empty_Board_Basic, Empty_Board_Elite,
+ Battery_Charger_4by4_ULV, Battery_Charger_4by4_LV, Battery_Charger_4by4_MV, Battery_Charger_4by4_HV, Battery_Charger_4by4_EV, Battery_Charger_4by4_IV, Battery_Charger_4by4_LuV, Battery_Charger_4by4_ZPM, Battery_Charger_4by4_UV, Battery_Charger_4by4_MAX,
+ MicroTransmitter_HV, MicroTransmitter_EV, MicroTransmitter_IV, MicroTransmitter_LUV, MicroTransmitter_ZPM,
+ Crop_Drop_Bauxite, Crop_Drop_Ilmenite, Crop_Drop_Pitchblende, Crop_Drop_Uraninite, Crop_Drop_Thorium, Crop_Drop_Nickel, Crop_Drop_Zinc, Crop_Drop_Manganese, Crop_Drop_Scheelite, Crop_Drop_Platinum, Crop_Drop_Iridium, Crop_Drop_Osmium, Crop_Drop_Naquadah, Uraniumcell_1, Uraniumcell_2, Uraniumcell_4, Moxcell_1, Moxcell_2, Moxcell_4,
+ ModularBasicHelmet, ModularBasicChestplate, ModularBasicLeggings, ModularBasicBoots,
+ ModularElectric1Helmet, ModularElectric1Chestplate, ModularElectric1Leggings, ModularElectric1Boots,
+ ModularElectric2Helmet, ModularElectric2Chestplate, ModularElectric2Leggings, ModularElectric2Boots, Block_Powderbarrel, GelledToluene,
+ FluidRegulator_LV, FluidRegulator_MV, FluidRegulator_HV, FluidRegulator_EV, FluidRegulator_IV, FluidRegulator_LuV, FluidRegulator_ZPM, FluidRegulator_UV, FluidFilter, CuringOven, Machine_Multi_Assemblyline, Machine_Multi_DieselEngine, QuantumEye, QuantumStar, Gravistar, Block_SSFUEL, Block_MSSFUEL, SFMixture, MSFMixture, Depleted_Naquadah_1, Depleted_Naquadah_2, Depleted_Naquadah_4, NaquadahCell_1, NaquadahCell_2, NaquadahCell_4, Hatch_AutoMaintenance,
+ Machine_Multi_Cleanroom, Circuit_Board_Coated, Circuit_Board_Phenolic, Circuit_Board_Epoxy, Circuit_Board_Fiberglass, Circuit_Board_Multifiberglass, Circuit_Board_Wetware, Circuit_Board_Plastic,
+ Circuit_Parts_Resistor, Circuit_Parts_ResistorSMD, Circuit_Parts_Glass_Tube, Circuit_Parts_Vacuum_Tube, Circuit_Parts_Coil, Circuit_Parts_Diode, Circuit_Parts_DiodeSMD, Circuit_Parts_Transistor, Circuit_Parts_TransistorSMD, Circuit_Parts_Capacitor, Circuit_Parts_CapacitorSMD, Circuit_Parts_GlassFiber, Circuit_Parts_PetriDish,
+ Circuit_Silicon_Ingot, Circuit_Silicon_Ingot2, Circuit_Silicon_Ingot3, Circuit_Silicon_Wafer, Circuit_Silicon_Wafer2, Circuit_Silicon_Wafer3, Circuit_Wafer_ILC, Circuit_Chip_ILC, Circuit_Wafer_Ram, Circuit_Chip_Ram,
+ Circuit_Wafer_NAND, Circuit_Chip_NAND, Circuit_Wafer_NOR, Circuit_Chip_NOR, Circuit_Wafer_CPU, Circuit_Chip_CPU, Circuit_Wafer_SoC, Circuit_Chip_SoC, Circuit_Wafer_SoC2, Circuit_Chip_SoC2, Circuit_Wafer_PIC, Circuit_Chip_PIC,
+ Circuit_Wafer_HPIC, Circuit_Chip_HPIC, Circuit_Wafer_NanoCPU, Circuit_Chip_NanoCPU, Circuit_Wafer_QuantumCPU, Circuit_Chip_QuantumCPU,
+ Circuit_Chip_CrystalCPU, Circuit_Chip_CrystalSoC, Circuit_Chip_NeuroCPU, Circuit_Chip_Stemcell,
+ Circuit_Microprocessor, Circuit_Processor, Circuit_Computer, Circuit_Nanoprocessor, Circuit_Nanocomputer, Circuit_Elitenanocomputer, Circuit_Quantumprocessor, Circuit_Quantumcomputer, Circuit_Masterquantumcomputer,
+ Circuit_Quantummainframe, Circuit_Crystalprocessor, Circuit_Crystalcomputer, Circuit_Ultimatecrystalcomputer, Circuit_Crystalmainframe, Circuit_Neuroprocessor, Circuit_Wetwarecomputer, Circuit_Wetwaresupercomputer, Circuit_Wetwaremainframe, Circuit_Parts_RawCrystalChip,
+ Machine_LV_CircuitAssembler, Machine_MV_CircuitAssembler, Machine_HV_CircuitAssembler, Machine_EV_CircuitAssembler, Machine_IV_CircuitAssembler, Machine_LuV_CircuitAssembler, Machine_ZPM_CircuitAssembler, Machine_UV_CircuitAssembler, Circuit_Integrated_Good, Machine_IV_LightningRod, Machine_HV_LightningRod, Machine_EV_LightningRod;
+
+ public static final ItemList[]
+ DYE_ONLY_ITEMS = {Color_00, Color_01, Color_02, Color_03, Color_04, Color_05, Color_06, Color_07, Color_08, Color_09, Color_10, Color_11, Color_12, Color_13, Color_14, Color_15}, SPRAY_CAN_DYES = {Spray_Color_00, Spray_Color_01, Spray_Color_02, Spray_Color_03, Spray_Color_04, Spray_Color_05, Spray_Color_06, Spray_Color_07, Spray_Color_08, Spray_Color_09, Spray_Color_10, Spray_Color_11, Spray_Color_12, Spray_Color_13, Spray_Color_14, Spray_Color_15}, SPRAY_CAN_DYES_USED = {Spray_Color_Used_00, Spray_Color_Used_01, Spray_Color_Used_02, Spray_Color_Used_03, Spray_Color_Used_04, Spray_Color_Used_05, Spray_Color_Used_06, Spray_Color_Used_07, Spray_Color_Used_08, Spray_Color_Used_09, Spray_Color_Used_10, Spray_Color_Used_11, Spray_Color_Used_12, Spray_Color_Used_13, Spray_Color_Used_14, Spray_Color_Used_15}, TRANSFORMERS = {Transformer_LV_ULV, Transformer_MV_LV, Transformer_HV_MV, Transformer_EV_HV, Transformer_IV_EV, Transformer_LuV_IV, Transformer_ZPM_LuV, Transformer_UV_ZPM, Transformer_MAX_UV}, MACHINE_HULLS = {Hull_ULV, Hull_LV, Hull_MV, Hull_HV, Hull_EV, Hull_IV, Hull_LuV, Hull_ZPM, Hull_UV, Hull_MAX}, HATCHES_DYNAMO = {Hatch_Dynamo_ULV, Hatch_Dynamo_LV, Hatch_Dynamo_MV, Hatch_Dynamo_HV, Hatch_Dynamo_EV, Hatch_Dynamo_IV, Hatch_Dynamo_LuV, Hatch_Dynamo_ZPM, Hatch_Dynamo_UV, Hatch_Dynamo_MAX}, HATCHES_ENERGY = {Hatch_Energy_ULV, Hatch_Energy_LV, Hatch_Energy_MV, Hatch_Energy_HV, Hatch_Energy_EV, Hatch_Energy_IV, Hatch_Energy_LuV, Hatch_Energy_ZPM, Hatch_Energy_UV, Hatch_Energy_MAX}, HATCHES_INPUT = {Hatch_Input_ULV, Hatch_Input_LV, Hatch_Input_MV, Hatch_Input_HV, Hatch_Input_EV, Hatch_Input_IV, Hatch_Input_LuV, Hatch_Input_ZPM, Hatch_Input_UV, Hatch_Input_MAX}, HATCHES_INPUT_BUS = {Hatch_Input_Bus_ULV, Hatch_Input_Bus_LV, Hatch_Input_Bus_MV, Hatch_Input_Bus_HV, Hatch_Input_Bus_EV, Hatch_Input_Bus_IV, Hatch_Input_Bus_LuV, Hatch_Input_Bus_ZPM, Hatch_Input_Bus_UV, Hatch_Input_Bus_MAX}, HATCHES_OUTPUT = {Hatch_Output_ULV, Hatch_Output_LV, Hatch_Output_MV, Hatch_Output_HV, Hatch_Output_EV, Hatch_Output_IV, Hatch_Output_LuV, Hatch_Output_ZPM, Hatch_Output_UV, Hatch_Output_MAX}, HATCHES_OUTPUT_BUS = {Hatch_Output_Bus_ULV, Hatch_Output_Bus_LV, Hatch_Output_Bus_MV, Hatch_Output_Bus_HV, Hatch_Output_Bus_EV, Hatch_Output_Bus_IV, Hatch_Output_Bus_LuV, Hatch_Output_Bus_ZPM, Hatch_Output_Bus_UV, Hatch_Output_Bus_MAX}, HATCHES_MUFFLER = {Hatch_Muffler_LV, Hatch_Muffler_LV, Hatch_Muffler_MV, Hatch_Muffler_HV, Hatch_Muffler_EV, Hatch_Muffler_IV, Hatch_Muffler_LuV, Hatch_Muffler_ZPM, Hatch_Muffler_UV, Hatch_Muffler_MAX};
+ public static Fluid sOilExtraHeavy, sEpichlorhydrin, sDrillingFluid, sNitricAcid, sBlueVitriol, sNickelSulfate, sToluene, sNitrationMixture, sRocketFuel, sHydricSulfur, sIndiumConcentrate, sLeadZincSolution;
+ private ItemStack mStack;
+ private boolean mHasNotBeenSet = true;
+
+ @Override
+ public IItemContainer set(Item aItem) {
+ mHasNotBeenSet = false;
+ if (aItem == null) return this;
+ ItemStack aStack = new ItemStack(aItem, 1, 0);
+ mStack = GT_Utility.copyAmount(1, aStack);
+ return this;
+ }
+
+ @Override
+ public IItemContainer set(ItemStack aStack) {
+ mHasNotBeenSet = false;
+ mStack = GT_Utility.copyAmount(1, aStack);
+ return this;
+ }
+
+ @Override
+ public Item getItem() {
+ if (mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ if (GT_Utility.isStackInvalid(mStack)) return null;
+ return mStack.getItem();
+ }
+
+ @Override
+ public Block getBlock() {
+ if (mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ return GT_Utility.getBlockFromItem(getItem());
+ }
+
+ @Override
+ public final boolean hasBeenSet() {
+ return !mHasNotBeenSet;
+ }
+
+ @Override
+ public boolean isStackEqual(Object aStack) {
+ return isStackEqual(aStack, false, false);
+ }
+
+ @Override
+ public boolean isStackEqual(Object aStack, boolean aWildcard, boolean aIgnoreNBT) {
+ if (GT_Utility.isStackInvalid(aStack)) return false;
+ return GT_Utility.areUnificationsEqual((ItemStack) aStack, aWildcard ? getWildcard(1) : get(1), aIgnoreNBT);
+ }
+
+ @Override
+ public ItemStack get(long aAmount, Object... aReplacements) {
+ if (mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
+ return GT_Utility.copyAmount(aAmount, GT_OreDictUnificator.get(mStack));
+ }
+
+ @Override
+ public ItemStack getWildcard(long aAmount, Object... aReplacements) {
+ if (mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
+ return GT_Utility.copyAmountAndMetaData(aAmount, W, GT_OreDictUnificator.get(mStack));
+ }
+
+ @Override
+ public ItemStack getUndamaged(long aAmount, Object... aReplacements) {
+ if (mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
+ return GT_Utility.copyAmountAndMetaData(aAmount, 0, GT_OreDictUnificator.get(mStack));
+ }
+
+ @Override
+ public ItemStack getAlmostBroken(long aAmount, Object... aReplacements) {
+ if (mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
+ return GT_Utility.copyAmountAndMetaData(aAmount, mStack.getMaxDamage() - 1, GT_OreDictUnificator.get(mStack));
+ }
+
+ @Override
+ public ItemStack getWithName(long aAmount, String aDisplayName, Object... aReplacements) {
+ ItemStack rStack = get(1, aReplacements);
+ if (GT_Utility.isStackInvalid(rStack)) return null;
+ rStack.setStackDisplayName(aDisplayName);
+ return GT_Utility.copyAmount(aAmount, rStack);
+ }
+
+ @Override
+ public ItemStack getWithCharge(long aAmount, int aEnergy, Object... aReplacements) {
+ ItemStack rStack = get(1, aReplacements);
+ if (GT_Utility.isStackInvalid(rStack)) return null;
+ GT_ModHandler.chargeElectricItem(rStack, aEnergy, Integer.MAX_VALUE, true, false);
+ return GT_Utility.copyAmount(aAmount, rStack);
+ }
+
+ @Override
+ public ItemStack getWithDamage(long aAmount, long aMetaValue, Object... aReplacements) {
+ if (mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ if (GT_Utility.isStackInvalid(mStack)) return GT_Utility.copyAmount(aAmount, aReplacements);
+ return GT_Utility.copyAmountAndMetaData(aAmount, aMetaValue, GT_OreDictUnificator.get(mStack));
+ }
+
+ @Override
+ public IItemContainer registerOre(Object... aOreNames) {
+ if (mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, get(1));
+ return this;
+ }
+
+ @Override
+ public IItemContainer registerWildcardAsOre(Object... aOreNames) {
+ if (mHasNotBeenSet)
+ throw new IllegalAccessError("The Enum '" + name() + "' has not been set to an Item at this time!");
+ for (Object tOreName : aOreNames) GT_OreDictUnificator.registerOre(tOreName, getWildcard(1));
+ return this;
+ }
+} \ No newline at end of file
diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java
index 74723db0e9..3834333cf9 100644
--- a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java
+++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java
@@ -1,84 +1,85 @@
-package gregtech.api.gui;
-
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.util.GT_LanguageManager;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.items.GT_MetaGenerated_Tool_01;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-
-import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-
-/**
- * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
- * <p/>
- * The GUI-Container I use for all my Basic Machines
- * <p/>
- * As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs I needed to produce some dummy-classes which extend this class
- */
-public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machine {
-
- String mName = "";
-
- public GT_GUIContainer_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) {
- super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "multimachines/" + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile));
- mName = aName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- fontRendererObj.drawString(mName, 10, 8, 16448255);
-
- if (mContainer != null) {
- if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 1) != 0)
- fontRendererObj.drawString(trans("132", "Pipe is loose."), 10, 16, 16448255);
- if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 2) != 0)
- fontRendererObj.drawString(trans("133", "Screws are missing."), 10, 24, 16448255);
- if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 4) != 0)
- fontRendererObj.drawString(trans("134", "Something is stuck."), 10, 32, 16448255);
- if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 8) != 0)
- fontRendererObj.drawString(trans("135", "Platings are dented."), 10, 40, 16448255);
- if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 16) != 0)
- fontRendererObj.drawString(trans("136", "Circuitry burned out."), 10, 48, 16448255);
- if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 32) != 0)
- fontRendererObj.drawString(trans("137", "That doesn't belong there."), 10, 56, 16448255);
- if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 64) != 0)
- fontRendererObj.drawString(trans("138", "Incomplete Structure."), 10, 64, 16448255);
-
- if (((GT_Container_MultiMachine) mContainer).mDisplayErrorCode == 0) {
- if (((GT_Container_MultiMachine) mContainer).mActive == 0) {
- fontRendererObj.drawString(trans("139", "Hit with Soft Hammer"), 10, 16, 16448255);
- fontRendererObj.drawString(trans("140", "to (re-)start the Machine"), 10, 24, 16448255);
- fontRendererObj.drawString(trans("141", "if it doesn't start."), 10, 32, 16448255);
- } else {
- fontRendererObj.drawString(trans("142", "Running perfectly."), 10, 16, 16448255);
- }
- int id = mContainer.mTileEntity.getMetaTileID();
- if (id == 1157 || id == 1158 || id == 1177 || id == 1178 || id == 1179) {
- ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1);
- if (tItem == null || !GT_Utility.areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L))) {
- fontRendererObj.drawString(trans("143", "Missing Mining Pipe"), 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255);
- }
- } else if (id == 1131 || id == 1151 || id == 1152 || id == 1153) {
- ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1);
- if (tItem == null || !(tItem.getItem() == GT_MetaGenerated_Tool_01.INSTANCE && tItem.getItemDamage() >= 170 && tItem.getItemDamage() <= 177)) {
- fontRendererObj.drawString(trans("144", "Missing Turbine Rotor"), 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255);
- }
- }
- }
- }
- }
-
- public String trans(String aKey, String aEnglish) {
- return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-}
+package gregtech.api.gui;
+
+import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
+
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.items.GT_MetaGenerated_Tool_01;
+import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_DrillerBase;
+import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+
+/**
+ * NEVER INCLUDE THIS FILE IN YOUR MOD!!!
+ * <p/>
+ * The GUI-Container I use for all my Basic Machines
+ * <p/>
+ * As the NEI-RecipeTransferRect Handler can't handle one GUI-Class for all GUIs I needed to produce some dummy-classes which extend this class
+ */
+public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machine {
+
+ String mName = "";
+
+ public GT_GUIContainer_MultiMachine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aTextureFile) {
+ super(new GT_Container_MultiMachine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "multimachines/" + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile));
+ mName = aName;
+ }
+
+ @Override
+ protected void drawGuiContainerForegroundLayer(int par1, int par2) {
+ fontRendererObj.drawString(mName, 10, 8, 16448255);
+
+ if (mContainer != null) {
+ if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 1) != 0)
+ fontRendererObj.drawString(trans("132", "Pipe is loose."), 10, 16, 16448255);
+ if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 2) != 0)
+ fontRendererObj.drawString(trans("133", "Screws are missing."), 10, 24, 16448255);
+ if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 4) != 0)
+ fontRendererObj.drawString(trans("134", "Something is stuck."), 10, 32, 16448255);
+ if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 8) != 0)
+ fontRendererObj.drawString(trans("135", "Platings are dented."), 10, 40, 16448255);
+ if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 16) != 0)
+ fontRendererObj.drawString(trans("136", "Circuitry burned out."), 10, 48, 16448255);
+ if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 32) != 0)
+ fontRendererObj.drawString(trans("137", "That doesn't belong there."), 10, 56, 16448255);
+ if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 64) != 0)
+ fontRendererObj.drawString(trans("138", "Incomplete Structure."), 10, 64, 16448255);
+
+ if (((GT_Container_MultiMachine) mContainer).mDisplayErrorCode == 0) {
+ if (((GT_Container_MultiMachine) mContainer).mActive == 0) {
+ fontRendererObj.drawString(trans("139", "Hit with Soft Hammer"), 10, 16, 16448255);
+ fontRendererObj.drawString(trans("140", "to (re-)start the Machine"), 10, 24, 16448255);
+ fontRendererObj.drawString(trans("141", "if it doesn't start."), 10, 32, 16448255);
+ } else {
+ fontRendererObj.drawString(trans("142", "Running perfectly."), 10, 16, 16448255);
+ }
+ if (mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_DrillerBase) {
+ ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1);
+ if (tItem == null || !GT_Utility.areStacksEqual(tItem, GT_ModHandler.getIC2Item("miningPipe", 1L))) {
+ fontRendererObj.drawString(trans("143", "Missing Mining Pipe"), 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255);
+ }
+ } else if (mContainer.mTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_LargeTurbine) {
+ ItemStack tItem = mContainer.mTileEntity.getMetaTileEntity().getStackInSlot(1);
+ if (tItem == null || !(tItem.getItem() == GT_MetaGenerated_Tool_01.INSTANCE && tItem.getItemDamage() >= 170 && tItem.getItemDamage() <= 177)) {
+ fontRendererObj.drawString(trans("144", "Missing Turbine Rotor"), 10, ((GT_Container_MultiMachine) mContainer).mActive == 0 ? 40 : 24, 16448255);
+ }
+ }
+ }
+ }
+ }
+
+ public String trans(String aKey, String aEnglish) {
+ return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false);
+ }
+
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
+ super.drawGuiContainerBackgroundLayer(par1, par2, par3);
+ int x = (width - xSize) / 2;
+ int y = (height - ySize) / 2;
+ drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
+ }
+}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java
index fc73e382d1..af157b0af6 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Cable.java
@@ -296,7 +296,7 @@ public class GT_MetaPipeEntity_Cable extends MetaPipeEntity implements IMetaTile
return new String[]{
"Max Voltage: %%%" + EnumChatFormatting.GREEN + mVoltage + " (" + VN[GT_Utility.getTier(mVoltage)] + ")" + EnumChatFormatting.GRAY,
"Max Amperage: %%%" + EnumChatFormatting.YELLOW + mAmperage + EnumChatFormatting.GRAY,
- "Loss/Meter/Ampere: %%%" + EnumChatFormatting.RED + mCableLossPerMeter + EnumChatFormatting.GRAY + " EU-Volt"
+ "Loss/Meter/Ampere: %%%" + EnumChatFormatting.RED + mCableLossPerMeter + EnumChatFormatting.GRAY + "%%% EU-Volt"
};
}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
index a900dee4b6..d3ed717892 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Fluid.java
@@ -402,8 +402,8 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
@Override
public String[] getDescription() {
return new String[]{
- EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + (mCapacity * 20) + "L/sec" + EnumChatFormatting.GRAY,
- EnumChatFormatting.RED + "Heat Limit: %%%" + mHeatResistance + " K" + EnumChatFormatting.GRAY
+ EnumChatFormatting.BLUE + "Fluid Capacity: %%%" + (mCapacity * 20) + "%%% L/sec" + EnumChatFormatting.GRAY,
+ EnumChatFormatting.RED + "Heat Limit: %%%" + mHeatResistance + "%%% K" + EnumChatFormatting.GRAY
};
}
@@ -412,4 +412,4 @@ public class GT_MetaPipeEntity_Fluid extends MetaPipeEntity {
if(GT_Mod.instance.isClientSide() && GT_Client.hideValue==1) return 0.0625F;
return mThickNess;
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
index 6e6b6f219a..62ea2e4148 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaPipeEntity_Item.java
@@ -305,7 +305,7 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE
@Override
public String[] getDescription() {
- return new String[]{"Item Capacity: " + getMaxPipeCapacity() + " Stacks/sec", "Routing Value: " + mStepSize};
+ return new String[]{"Item Capacity: %%%" + getMaxPipeCapacity() + "%%% Stacks/sec", "Routing Value: %%%" + mStepSize};
}
private boolean isInventoryEmpty() {
@@ -347,4 +347,4 @@ public class GT_MetaPipeEntity_Item extends MetaPipeEntity implements IMetaTileE
return AxisAlignedBB.getBoundingBox(aX + tSide4, aY + tSide0, aZ + tSide2, aX + tSide5, aY + tSide1, aZ + tSide3);
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java
index 3ebe3a3f04..7eeb9fd6c7 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Buffer.java
@@ -218,7 +218,7 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM
if (mTargetStackSize == 0) {
GT_Utility.sendChatToPlayer(aPlayer, trans("098","Do not regulate Item Stack Size"));
} else {
- GT_Utility.sendChatToPlayer(aPlayer, trans("099","Regulate Item Stack Size to: " + mTargetStackSize));
+ GT_Utility.sendChatToPlayer(aPlayer, trans("099","Regulate Item Stack Size to: ") + mTargetStackSize);
}
}
}
@@ -274,4 +274,4 @@ public abstract class GT_MetaTileEntity_Buffer extends GT_MetaTileEntity_TieredM
public boolean allowGeneralRedstoneOutput(){
return true;
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java
index fe21e8a3c2..d57aff8fc9 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch.java
@@ -1,6 +1,5 @@
package gregtech.api.metatileentity.implementations;
-import gregtech.GT_Mod;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -77,6 +76,14 @@ public abstract class GT_MetaTileEntity_Hatch extends GT_MetaTileEntity_BasicTan
mMachineBlock=actualTexture;
}
+ /**
+ *
+ * @param textureIndex
+ * Index between 0-127.
+ * Add 128 per page, if texture index is not on first page.
+ *
+ */
+
public final void updateTexture(int textureIndex){
onValueUpdate((byte) textureIndex);
onTexturePageUpdate((byte) (textureIndex>>7));
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java
index 466222f12f..8aabe853f5 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DataAccess.java
@@ -1,101 +1,106 @@
-package gregtech.api.metatileentity.implementations;
-
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.*;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_RenderedTexture;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-
-public class GT_MetaTileEntity_Hatch_DataAccess extends GT_MetaTileEntity_Hatch {
- public GT_MetaTileEntity_Hatch_DataAccess(int aID, String aName, String aNameRegional, int aTier) {
- super(aID, aName, aNameRegional, aTier, 16, new String[]{
- "Data Access for Multiblocks",
- "Adds " + (aTier == 4 ? 4 : 16) + " extra slots for Data Sticks"});
- }
-
- public GT_MetaTileEntity_Hatch_DataAccess(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aTier == 4 ? 4 : 16, aDescription, aTextures);
- }
-
- public GT_MetaTileEntity_Hatch_DataAccess(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
- super(aName, aTier, aTier == 4 ? 4 : 16, aDescription, aTextures);
- }
-
- @Override
- public ITexture[] getTexturesActive(ITexture aBaseTexture) {
- return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_DATA_ACCESS)};
- }
-
- @Override
- public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
- return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_DATA_ACCESS)};
- }
-
- @Override
- public boolean isSimpleMachine() {
- return true;
- }
-
- @Override
- public boolean isFacingValid(byte aFacing) {
- 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_Hatch_DataAccess(mName, mTier, mDescriptionArray, mTextures);
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) return true;
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- switch (mTier) {
- case 4:
- return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity);
- default:
- return new GT_Container_4by4(aPlayerInventory, aBaseMetaTileEntity);
- }
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- switch (mTier) {
- case 4:
- return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess");
- case 6:
- return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess");
- default:
- return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess");
- }
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-}
+package gregtech.api.metatileentity.implementations;
+
+import gregtech.api.enums.Textures;
+import gregtech.api.gui.*;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.objects.GT_RenderedTexture;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+
+public class GT_MetaTileEntity_Hatch_DataAccess extends GT_MetaTileEntity_Hatch {
+ public GT_MetaTileEntity_Hatch_DataAccess(int aID, String aName, String aNameRegional, int aTier) {
+ super(aID, aName, aNameRegional, aTier, 16, new String[]{
+ "Data Access for Multiblocks",
+ "Adds " + (aTier == 4 ? 4 : 16) + " extra slots for Data Sticks"});
+ }
+
+ public GT_MetaTileEntity_Hatch_DataAccess(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
+ super(aName, aTier, aTier == 4 ? 4 : 16, aDescription, aTextures);
+ }
+
+ public GT_MetaTileEntity_Hatch_DataAccess(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
+ super(aName, aTier, aTier == 4 ? 4 : 16, aDescription, aTextures);
+ }
+
+ @Override
+ public ITexture[] getTexturesActive(ITexture aBaseTexture) {
+ return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_DATA_ACCESS)};
+ }
+
+ @Override
+ public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
+ return new ITexture[]{aBaseTexture, new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_DATA_ACCESS)};
+ }
+
+ @Override
+ public boolean isSimpleMachine() {
+ return true;
+ }
+
+ @Override
+ public boolean isFacingValid(byte aFacing) {
+ 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_Hatch_DataAccess(mName, mTier, mDescriptionArray, mTextures);
+ }
+
+ @Override
+ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
+ if (aBaseMetaTileEntity.isClientSide()) return true;
+ aBaseMetaTileEntity.openGUI(aPlayer);
+ return true;
+ }
+
+ @Override
+ public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ switch (mTier) {
+ case 4:
+ return new GT_Container_2by2(aPlayerInventory, aBaseMetaTileEntity);
+ default:
+ return new GT_Container_4by4(aPlayerInventory, aBaseMetaTileEntity);
+ }
+ }
+
+ @Override
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ switch (mTier) {
+ case 4:
+ return new GT_GUIContainer_2by2(aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess");
+ case 6:
+ return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess");
+ default:
+ return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Data Access Hatch", "DataAccess");
+ }
+ }
+
+ @Override
+ public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public int getInventoryStackLimit() {
+ return 1;
+ }
+} \ No newline at end of file
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
index fd6b144d84..35d1de4558 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
@@ -1,846 +1,846 @@
-package gregtech.api.metatileentity.implementations;
-
-import gregtech.GT_Mod;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.gui.GT_Container_MultiMachine;
-import gregtech.api.gui.GT_GUIContainer_MultiMachine;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.items.GT_MetaGenerated_Tool;
-import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.objects.GT_ItemStack;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_OreDictUnificator;
-import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gregtech.api.util.GT_Utility;
-import gregtech.common.GT_Pollution;
-import gregtech.common.items.GT_MetaGenerated_Tool_01;
-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.FluidStack;
-
-import java.util.ArrayList;
-
-import static gregtech.api.enums.GT_Values.V;
-
-public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
-
- public static boolean disableMaintenance;
- public boolean mMachine = false, mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mRunningOnLoad = false;
- public int mPollution = 0, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mEfficiencyIncrease = 0, mUpdate = 0, mStartUpCheck = 100, mRuntime = 0, mEfficiency = 0;
- public ItemStack[] mOutputItems = null;
- public FluidStack[] mOutputFluids = null;
- public String mNEI;
- public int damageFactorLow = 5;
- public float damageFactorHigh = 0.6f;
-
- public ArrayList<GT_MetaTileEntity_Hatch_Input> mInputHatches = new ArrayList<GT_MetaTileEntity_Hatch_Input>();
- public ArrayList<GT_MetaTileEntity_Hatch_Output> mOutputHatches = new ArrayList<GT_MetaTileEntity_Hatch_Output>();
- public ArrayList<GT_MetaTileEntity_Hatch_InputBus> mInputBusses = new ArrayList<GT_MetaTileEntity_Hatch_InputBus>();
- public ArrayList<GT_MetaTileEntity_Hatch_OutputBus> mOutputBusses = new ArrayList<GT_MetaTileEntity_Hatch_OutputBus>();
- public ArrayList<GT_MetaTileEntity_Hatch_Dynamo> mDynamoHatches = new ArrayList<GT_MetaTileEntity_Hatch_Dynamo>();
- public ArrayList<GT_MetaTileEntity_Hatch_Muffler> mMufflerHatches = new ArrayList<GT_MetaTileEntity_Hatch_Muffler>();
- public ArrayList<GT_MetaTileEntity_Hatch_Energy> mEnergyHatches = new ArrayList<GT_MetaTileEntity_Hatch_Energy>();
- public ArrayList<GT_MetaTileEntity_Hatch_Maintenance> mMaintenanceHatches = new ArrayList<GT_MetaTileEntity_Hatch_Maintenance>();
-
- public GT_MetaTileEntity_MultiBlockBase(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional, 2);
- GT_MetaTileEntity_MultiBlockBase.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false);
- this.damageFactorLow = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorLow", 5);
- this.damageFactorHigh = (float) GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorHigh", 0.6f);
- this.mNEI = "";
- }
-
- public GT_MetaTileEntity_MultiBlockBase(String aName) {
- super(aName, 2);
- GT_MetaTileEntity_MultiBlockBase.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false);
- this.damageFactorLow = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorLow", 5);
- this.damageFactorHigh = (float) GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorHigh", 0.6f);
- }
-
- public static boolean isValidMetaTileEntity(MetaTileEntity aMetaTileEntity) {
- return aMetaTileEntity.getBaseMetaTileEntity() != null && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileEntity() == aMetaTileEntity && !aMetaTileEntity.getBaseMetaTileEntity().isDead();
- }
-
- @Override
- public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) {
- return aSide != getBaseMetaTileEntity().getFrontFacing();
- }
-
- @Override
- public boolean isSimpleMachine() {
- return false;
- }
-
- @Override
- public boolean isFacingValid(byte aFacing) {
- return true;
- }
-
- @Override
- public boolean isAccessAllowed(EntityPlayer aPlayer) {
- return true;
- }
-
- @Override
- public boolean isValidSlot(int aIndex) {
- return aIndex > 0;
- }
-
- @Override
- public int getProgresstime() {
- return mProgresstime;
- }
-
- @Override
- public int maxProgresstime() {
- return mMaxProgresstime;
- }
-
- @Override
- public int increaseProgress(int aProgress) {
- return aProgress;
- }
-
- @Override
- public void saveNBTData(NBTTagCompound aNBT) {
- aNBT.setInteger("mEUt", mEUt);
- aNBT.setInteger("mProgresstime", mProgresstime);
- aNBT.setInteger("mMaxProgresstime", mMaxProgresstime);
- aNBT.setInteger("mEfficiencyIncrease", mEfficiencyIncrease);
- aNBT.setInteger("mEfficiency", mEfficiency);
- aNBT.setInteger("mPollution", mPollution);
- aNBT.setInteger("mRuntime", mRuntime);
-
- if (mOutputItems != null) {
- aNBT.setInteger("mOutputItemsLength", mOutputItems.length);
- for (int i = 0; i < mOutputItems.length; i++)
- if (mOutputItems[i] != null) {
- NBTTagCompound tNBT = new NBTTagCompound();
- mOutputItems[i].writeToNBT(tNBT);
- aNBT.setTag("mOutputItem" + i, tNBT);
- }
- }
- if (mOutputFluids != null) {
- aNBT.setInteger("mOutputFluidsLength", mOutputFluids.length);
- for (int i = 0; i < mOutputFluids.length; i++)
- if (mOutputFluids[i] != null) {
- NBTTagCompound tNBT = new NBTTagCompound();
- mOutputFluids[i].writeToNBT(tNBT);
- aNBT.setTag("mOutputFluids" + i, tNBT);
- }
- }
- aNBT.setBoolean("mWrench", mWrench);
- aNBT.setBoolean("mScrewdriver", mScrewdriver);
- aNBT.setBoolean("mSoftHammer", mSoftHammer);
- aNBT.setBoolean("mHardHammer", mHardHammer);
- aNBT.setBoolean("mSolderingTool", mSolderingTool);
- aNBT.setBoolean("mCrowbar", mCrowbar);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- mEUt = aNBT.getInteger("mEUt");
- mProgresstime = aNBT.getInteger("mProgresstime");
- mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
- if (mMaxProgresstime > 0) mRunningOnLoad = true;
- mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease");
- mEfficiency = aNBT.getInteger("mEfficiency");
- mPollution = aNBT.getInteger("mPollution");
- mRuntime = aNBT.getInteger("mRuntime");
-
- int aOutputItemsLength = aNBT.getInteger("mOutputItemsLength");
- if (aOutputItemsLength > 0) {
- mOutputItems = new ItemStack[aOutputItemsLength];
- for (int i = 0; i < mOutputItems.length; i++)
- mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i);
- }
-
- int aOutputFluidsLength = aNBT.getInteger("mOutputFluidsLength");
- if (aOutputFluidsLength > 0) {
- mOutputFluids = new FluidStack[aOutputFluidsLength];
- for (int i = 0; i < mOutputFluids.length; i++)
- mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i);
- }
-
- mWrench = aNBT.getBoolean("mWrench");
- mScrewdriver = aNBT.getBoolean("mScrewdriver");
- mSoftHammer = aNBT.getBoolean("mSoftHammer");
- mHardHammer = aNBT.getBoolean("mHardHammer");
- mSolderingTool = aNBT.getBoolean("mSolderingTool");
- mCrowbar = aNBT.getBoolean("mCrowbar");
- }
-
- @Override
- public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
- if (aBaseMetaTileEntity.isClientSide()) return true;
- aBaseMetaTileEntity.openGUI(aPlayer);
- return true;
- }
-
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity);
- }
-
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png");
- }
-
- @Override
- public byte getTileEntityBaseType() {
- return 2;
- }
-
- @Override
- public void onMachineBlockUpdate() {
- mUpdate = 50;
- }
-
- @Override
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- if (aBaseMetaTileEntity.isServerSide()) {
- if (mEfficiency < 0) mEfficiency = 0;
- if (--mUpdate == 0 || --mStartUpCheck == 0) {
- mInputHatches.clear();
- mInputBusses.clear();
- mOutputHatches.clear();
- mOutputBusses.clear();
- mDynamoHatches.clear();
- mEnergyHatches.clear();
- mMufflerHatches.clear();
- mMaintenanceHatches.clear();
- mMachine = checkMachine(aBaseMetaTileEntity, mInventory[1]);
- }
- if (mStartUpCheck < 0) {
- if (mMachine) {
- for (GT_MetaTileEntity_Hatch_Maintenance tHatch : mMaintenanceHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (!GT_MetaTileEntity_MultiBlockBase.disableMaintenance) {
- if (tHatch.mAuto && (!mWrench || !mScrewdriver || !mSoftHammer || !mHardHammer || !mSolderingTool || !mCrowbar))
- tHatch.autoMaintainance();
- if (tHatch.mWrench) mWrench = true;
- if (tHatch.mScrewdriver) mScrewdriver = true;
- if (tHatch.mSoftHammer) mSoftHammer = true;
- if (tHatch.mHardHammer) mHardHammer = true;
- if (tHatch.mSolderingTool) mSolderingTool = true;
- if (tHatch.mCrowbar) mCrowbar = true;
- } else {
- mWrench = true;
- mScrewdriver = true;
- mSoftHammer = true;
- mHardHammer = true;
- mSolderingTool = true;
- mCrowbar = true;
- }
-
- tHatch.mWrench = false;
- tHatch.mScrewdriver = false;
- tHatch.mSoftHammer = false;
- tHatch.mHardHammer = false;
- tHatch.mSolderingTool = false;
- tHatch.mCrowbar = false;
- }
- }
- if (getRepairStatus() > 0) {
- if (mMaxProgresstime > 0 && doRandomMaintenanceDamage()) {
- if (onRunningTick(mInventory[1])) {
- if (!polluteEnvironment(getPollutionPerTick(mInventory[1]))) {
- stopMachine();
- }
- if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
- if (mOutputItems != null) for (ItemStack tStack : mOutputItems)
- if (tStack != null) {
- try {
- GT_Mod.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack);
- } catch (Exception ignored) {
- }
- addOutput(tStack);
- }
- if (mOutputFluids != null) {
- addFluidOutputs(mOutputFluids);
- }
- mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000)));
- mOutputItems = null;
- mProgresstime = 0;
- mMaxProgresstime = 0;
- mEfficiencyIncrease = 0;
- if (aBaseMetaTileEntity.isAllowedToWork()) checkRecipe(mInventory[1]);
- if (mOutputFluids != null && mOutputFluids.length > 0) {
- if (mOutputFluids.length > 1) {
- try {
- GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant");
- } catch (Exception ignored) {
- }
- }
- }
- }
- }
- } else {
- if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) {
-
- if (aBaseMetaTileEntity.isAllowedToWork()) {
- checkRecipe(mInventory[1]);
- }
- if (mMaxProgresstime <= 0) mEfficiency = Math.max(0, mEfficiency - 1000);
- }
- }
- } else {
- stopMachine();
- }
- } else {
- stopMachine();
- }
- }
- aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mWrench ? 0 : 1) | (mScrewdriver ? 0 : 2) | (mSoftHammer ? 0 : 4) | (mHardHammer ? 0 : 8) | (mSolderingTool ? 0 : 16) | (mCrowbar ? 0 : 32) | (mMachine ? 0 : 64));
- aBaseMetaTileEntity.setActive(mMaxProgresstime > 0);
- }
- }
-
- public boolean polluteEnvironment(int aPollutionLevel) {
- mPollution += aPollutionLevel;
- for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (mPollution >= 10000) {
- if (tHatch.polluteEnvironment()) {
- mPollution -= 10000;
- }
- } else {
- break;
- }
- }
- }
- return mPollution < 10000;
- }
-
- /**
- * Called every tick the Machine runs
- */
- public boolean onRunningTick(ItemStack aStack) {
- if (mEUt > 0) {
- addEnergyOutput(((long) mEUt * mEfficiency) / 10000);
- return true;
- }
- if (mEUt < 0) {
- if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) {
- stopMachine();
- return false;
- }
- }
- return true;
- }
-
- /**
- * Checks if this is a Correct Machine Part for this kind of Machine (Turbine Rotor for example)
- */
- public abstract boolean isCorrectMachinePart(ItemStack aStack);
-
- /**
- * Checks the Recipe
- */
- public abstract boolean checkRecipe(ItemStack aStack);
-
- /**
- * Checks the Machine. You have to assign the MetaTileEntities for the Hatches here.
- */
- public abstract boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack);
-
- /**
- * Gets the maximum Efficiency that spare Part can get (0 - 10000)
- */
- public abstract int getMaxEfficiency(ItemStack aStack);
-
- /**
- * Gets the pollution this Device outputs to a Muffler per tick (10000 = one Pullution Block)
- */
- public abstract int getPollutionPerTick(ItemStack aStack);
-
- /**
- * Gets the damage to the ItemStack, usually 0 or 1.
- */
- public abstract int getDamageToComponent(ItemStack aStack);
-
- /**
- * If it explodes when the Component has to be replaced.
- */
- public abstract boolean explodesOnComponentBreak(ItemStack aStack);
-
- public void stopMachine() {
- mOutputItems = null;
- mEUt = 0;
- mEfficiency = 0;
- mProgresstime = 0;
- mMaxProgresstime = 0;
- mEfficiencyIncrease = 0;
- getBaseMetaTileEntity().disableWorking();
- }
-
- public int getRepairStatus() {
- return (mWrench ? 1 : 0) + (mScrewdriver ? 1 : 0) + (mSoftHammer ? 1 : 0) + (mHardHammer ? 1 : 0) + (mSolderingTool ? 1 : 0) + (mCrowbar ? 1 : 0);
- }
-
- public int getIdealStatus() {
- return 6;
- }
-
- public int getCurrentEfficiency(ItemStack itemStack) {
- int maxEff = getMaxEfficiency(itemStack);
- return maxEff - (getIdealStatus() - getRepairStatus()) * maxEff / 10;
- }
-
- public boolean doRandomMaintenanceDamage() {
- if (!isCorrectMachinePart(mInventory[1]) || getRepairStatus() == 0) {
- stopMachine();
- return false;
- }
- if (mRuntime++ > 1000) {
- mRuntime = 0;
- if (getBaseMetaTileEntity().getRandomNumber(6000) == 0) {
- switch (getBaseMetaTileEntity().getRandomNumber(6)) {
- case 0:
- mWrench = false;
- break;
- case 1:
- mScrewdriver = false;
- break;
- case 2:
- mSoftHammer = false;
- break;
- case 3:
- mHardHammer = false;
- break;
- case 4:
- mSolderingTool = false;
- break;
- case 5:
- mCrowbar = false;
- break;
- }
- }
- if (mInventory[1] != null && getBaseMetaTileEntity().getRandomNumber(2) == 0 && !mInventory[1].getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.")) {
- if (mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) {
- NBTTagCompound tNBT = mInventory[1].getTagCompound();
- if (tNBT != null) {
- NBTTagCompound tNBT2 = tNBT.getCompoundTag("GT.CraftingComponents");//tNBT2 dont use out if
- if (!tNBT.getBoolean("mDis")) {
- tNBT2 = new NBTTagCompound();
- Materials tMaterial = GT_MetaGenerated_Tool.getPrimaryMaterial(mInventory[1]);
- ItemStack tTurbine = GT_OreDictUnificator.get(OrePrefixes.turbineBlade, tMaterial, 1);
- int i = mInventory[1].getItemDamage();
- if (i == 170) {
- ItemStack tStack = GT_Utility.copyAmount(1, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Magnalium, 1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- } else if (i == 172) {
- ItemStack tStack = GT_Utility.copyAmount(1, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.7", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.8", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Titanium, 1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- } else if (i == 174) {
- ItemStack tStack = GT_Utility.copyAmount(2, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- } else if (i == 176) {
- ItemStack tStack = GT_Utility.copyAmount(2, tTurbine);
- tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.7", tStack.writeToNBT(new NBTTagCompound()));
- tNBT2.setTag("Ingredient.8", tStack.writeToNBT(new NBTTagCompound()));
- tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Americium, 1);
- tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
- }
- tNBT.setTag("GT.CraftingComponents", tNBT2);
- tNBT.setBoolean("mDis", true);
- mInventory[1].setTagCompound(tNBT);
-
- }
- }
- ((GT_MetaGenerated_Tool) mInventory[1].getItem()).doDamage(mInventory[1], (long) Math.min(mEUt / this.damageFactorLow, Math.pow(mEUt, this.damageFactorHigh)));
- if (mInventory[1].stackSize == 0) mInventory[1] = null;
- }
- }
- }
- return true;
- }
-
- public void explodeMultiblock() {
- GT_Pollution.addPollution(getBaseMetaTileEntity(), 300000);
- mInventory[1] = null;
- for (MetaTileEntity tTileEntity : mInputBusses) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- for (MetaTileEntity tTileEntity : mOutputBusses) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- for (MetaTileEntity tTileEntity : mInputHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- for (MetaTileEntity tTileEntity : mOutputHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- for (MetaTileEntity tTileEntity : mDynamoHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- for (MetaTileEntity tTileEntity : mMufflerHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- for (MetaTileEntity tTileEntity : mEnergyHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- for (MetaTileEntity tTileEntity : mMaintenanceHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
- getBaseMetaTileEntity().doExplosion(V[8]);
- }
-
- public boolean addEnergyOutput(long aEU) {
- if (aEU <= 0) return true;
- for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- if (tHatch.getBaseMetaTileEntity().increaseStoredEnergyUnits(aEU, false)) {
- return true;
- }
- }
- }
- return false;
- }
-
- public long getMaxInputVoltage() {
- long rVoltage = 0;
- for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches)
- if (isValidMetaTileEntity(tHatch)) rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage();
- return rVoltage;
- }
-
- public boolean drainEnergyInput(long aEU) {
- if (aEU <= 0) return true;
- for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches)
- if (isValidMetaTileEntity(tHatch)) {
- if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEU, false)) return true;
- }
- return false;
- }
-
- private boolean dumpFluid(FluidStack copiedFluidStack, boolean restrictiveHatchesOnly){
- for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
- if (!isValidMetaTileEntity(tHatch) || (restrictiveHatchesOnly && tHatch.mMode == 0)) {
- continue;
- }
- if (GT_ModHandler.isSteam(copiedFluidStack)) {
- if (!tHatch.outputsSteam()) {
- continue;
- }
- } else {
- if (!tHatch.outputsLiquids()) {
- continue;
- }
- if (tHatch.isFluidLocked() && tHatch.getLockedFluidName() != null && !tHatch.getLockedFluidName().equals(copiedFluidStack.getUnlocalizedName())) {
- continue;
- }
- }
- int tAmount = tHatch.fill(copiedFluidStack, false);
- if (tAmount >= copiedFluidStack.amount) {
- boolean filled = tHatch.fill(copiedFluidStack, true) >= copiedFluidStack.amount;
- tHatch.onEmptyingContainerWhenEmpty();
- return filled;
- } else if (tAmount > 0) {
- copiedFluidStack.amount = copiedFluidStack.amount - tHatch.fill(copiedFluidStack, true);
- tHatch.onEmptyingContainerWhenEmpty();
- }
- }
- return false;
- }
-
- public boolean addOutput(FluidStack aLiquid) {
- if (aLiquid == null) return false;
- FluidStack copiedFluidStack = aLiquid.copy();
- if (!dumpFluid(copiedFluidStack, true)){
- dumpFluid(copiedFluidStack, false);
- }
- return false;
- }
-
- protected void addFluidOutputs(FluidStack[] mOutputFluids2) {
- for (FluidStack outputFluidStack : mOutputFluids2) {
- addOutput(outputFluidStack);
- }
- }
-
- public boolean depleteInput(FluidStack aLiquid) {
- if (aLiquid == null) return false;
- for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
- tHatch.mRecipeMap = getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- FluidStack tLiquid = tHatch.getFluid();
- if (tLiquid != null && tLiquid.isFluidEqual(aLiquid)) {
- tLiquid = tHatch.drain(aLiquid.amount, false);
- if (tLiquid != null && tLiquid.amount >= aLiquid.amount) {
- tLiquid = tHatch.drain(aLiquid.amount, true);
- return tLiquid != null && tLiquid.amount >= aLiquid.amount;
- }
- }
- }
- }
- return false;
- }
-
- public boolean addOutput(ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) return false;
- aStack = GT_Utility.copy(aStack);
-// FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true);
-// if (aLiquid == null) {
- boolean outputSuccess = true;
- while (outputSuccess && aStack.stackSize > 0) {
- outputSuccess = false;
- ItemStack single = aStack.splitStack(1);
- for (GT_MetaTileEntity_Hatch_OutputBus tHatch : mOutputBusses) {
- if (!outputSuccess && isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getSizeInventory() - 1; i >= 0 && !outputSuccess; i--) {
- if (tHatch.getBaseMetaTileEntity().addStackToSlot(i, single)) outputSuccess = true;
- }
- }
- }
- for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
- if (!outputSuccess && isValidMetaTileEntity(tHatch) && tHatch.outputsItems()) {
- if (tHatch.getBaseMetaTileEntity().addStackToSlot(1, single)) outputSuccess = true;
- }
- }
- }
-// }else {
-// for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
-// if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid)?tHatch.outputsSteam():tHatch.outputsLiquids()) {
-// int tAmount = tHatch.fill(aLiquid, false);
-// if (tAmount >= aLiquid.amount) {
-// return tHatch.fill(aLiquid, true) >= aLiquid.amount;
-// }
-// }
-// }
-// }
- return outputSuccess;
- }
-
- public boolean depleteInput(ItemStack aStack) {
- if (GT_Utility.isStackInvalid(aStack)) return false;
- FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true);
- if (aLiquid != null) return depleteInput(aLiquid);
- for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
- tHatch.mRecipeMap = getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(0))) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) {
- tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize);
- return true;
- }
- }
- }
- }
- for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses) {
- tHatch.mRecipeMap = getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(i))) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) {
- tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize);
- return true;
- }
- }
- }
- }
- }
- return false;
- }
-
- public ArrayList<ItemStack> getStoredOutputs() {
- ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
-// for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
-// if (isValidMetaTileEntity(tHatch)) {
-// rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(1));
-// }
-// }
- for (GT_MetaTileEntity_Hatch_OutputBus tHatch : mOutputBusses) {
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
- }
- }
- }
- return rList;
- }
-
- public ArrayList<FluidStack> getStoredFluids() {
- ArrayList<FluidStack> rList = new ArrayList<FluidStack>();
- for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
- tHatch.mRecipeMap = getRecipeMap();
- if (isValidMetaTileEntity(tHatch) && tHatch.getFillableStack() != null) {
- rList.add(tHatch.getFillableStack());
- }
- }
- return rList;
- }
-
- public ArrayList<ItemStack> getStoredInputs() {
- ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
-// for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
-// tHatch.mRecipeMap = getRecipeMap();
-// if (isValidMetaTileEntity(tHatch) && tHatch.getBaseMetaTileEntity().getStackInSlot(0) != null) {
-// rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(0));
-// }
-// }
- for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses) {
- tHatch.mRecipeMap = getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null)
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
- }
- }
- }
- return rList;
- }
-
- public GT_Recipe_Map getRecipeMap() {
- return null;
- }
-
- public void updateSlots() {
- for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches)
- if (isValidMetaTileEntity(tHatch)) tHatch.updateSlots();
- for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses)
- if (isValidMetaTileEntity(tHatch)) tHatch.updateSlots();
- }
-
- public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) return false;
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input)
- return mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus)
- return mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity);
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output)
- return mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus)
- return mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy)
- return mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity);
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo)
- return mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity);
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance)
- return mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity);
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler)
- return mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
- return false;
- }
-
- public boolean addMaintenanceToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) return false;
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addEnergyInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addDynamoToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) return false;
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addMufflerToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) return false;
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) return false;
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = getRecipeMap();
- return mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mRecipeMap = getRecipeMap();
- return mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity);
- }
- return false;
- }
-
- public boolean addOutputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) return false;
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
- }
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
- }
- return false;
- }
-
- @Override
- public String[] getInfoData() {
- return new String[]{"Progress:", (mProgresstime / 20) + "secs", (mMaxProgresstime / 20) + "secs", "Efficiency:", (mEfficiency / 100.0F) + "%", "Problems:", String.valueOf((getIdealStatus() - getRepairStatus()))};
- }
-
- @Override
- public boolean isGivingInformation() {
- return true;
- }
-
- @Override
- public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-
- @Override
- public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return false;
- }
-}
+package gregtech.api.metatileentity.implementations;
+
+import gregtech.GT_Mod;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.ConfigCategories;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gregtech.api.gui.GT_Container_MultiMachine;
+import gregtech.api.gui.GT_GUIContainer_MultiMachine;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.items.GT_MetaGenerated_Tool;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.objects.GT_ItemStack;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
+import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import gregtech.api.util.GT_Utility;
+import gregtech.common.GT_Pollution;
+import gregtech.common.items.GT_MetaGenerated_Tool_01;
+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.FluidStack;
+
+import java.util.ArrayList;
+
+import static gregtech.api.enums.GT_Values.V;
+
+public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
+
+ public static boolean disableMaintenance;
+ public boolean mMachine = false, mWrench = false, mScrewdriver = false, mSoftHammer = false, mHardHammer = false, mSolderingTool = false, mCrowbar = false, mRunningOnLoad = false;
+ public int mPollution = 0, mProgresstime = 0, mMaxProgresstime = 0, mEUt = 0, mEfficiencyIncrease = 0, mUpdate = 0, mStartUpCheck = 100, mRuntime = 0, mEfficiency = 0;
+ public ItemStack[] mOutputItems = null;
+ public FluidStack[] mOutputFluids = null;
+ public String mNEI;
+ public int damageFactorLow = 5;
+ public float damageFactorHigh = 0.6f;
+
+ public ArrayList<GT_MetaTileEntity_Hatch_Input> mInputHatches = new ArrayList<GT_MetaTileEntity_Hatch_Input>();
+ public ArrayList<GT_MetaTileEntity_Hatch_Output> mOutputHatches = new ArrayList<GT_MetaTileEntity_Hatch_Output>();
+ public ArrayList<GT_MetaTileEntity_Hatch_InputBus> mInputBusses = new ArrayList<GT_MetaTileEntity_Hatch_InputBus>();
+ public ArrayList<GT_MetaTileEntity_Hatch_OutputBus> mOutputBusses = new ArrayList<GT_MetaTileEntity_Hatch_OutputBus>();
+ public ArrayList<GT_MetaTileEntity_Hatch_Dynamo> mDynamoHatches = new ArrayList<GT_MetaTileEntity_Hatch_Dynamo>();
+ public ArrayList<GT_MetaTileEntity_Hatch_Muffler> mMufflerHatches = new ArrayList<GT_MetaTileEntity_Hatch_Muffler>();
+ public ArrayList<GT_MetaTileEntity_Hatch_Energy> mEnergyHatches = new ArrayList<GT_MetaTileEntity_Hatch_Energy>();
+ public ArrayList<GT_MetaTileEntity_Hatch_Maintenance> mMaintenanceHatches = new ArrayList<GT_MetaTileEntity_Hatch_Maintenance>();
+
+ public GT_MetaTileEntity_MultiBlockBase(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional, 2);
+ GT_MetaTileEntity_MultiBlockBase.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false);
+ this.damageFactorLow = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorLow", 5);
+ this.damageFactorHigh = (float) GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorHigh", 0.6f);
+ this.mNEI = "";
+ }
+
+ public GT_MetaTileEntity_MultiBlockBase(String aName) {
+ super(aName, 2);
+ GT_MetaTileEntity_MultiBlockBase.disableMaintenance = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.disableMaintenance", false);
+ this.damageFactorLow = GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorLow", 5);
+ this.damageFactorHigh = (float) GregTech_API.sMachineFile.get(ConfigCategories.machineconfig, "MultiBlockMachines.damageFactorHigh", 0.6f);
+ }
+
+ public static boolean isValidMetaTileEntity(MetaTileEntity aMetaTileEntity) {
+ return aMetaTileEntity.getBaseMetaTileEntity() != null && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileEntity() == aMetaTileEntity && !aMetaTileEntity.getBaseMetaTileEntity().isDead();
+ }
+
+ @Override
+ public boolean allowCoverOnSide(byte aSide, GT_ItemStack aCoverID) {
+ return aSide != getBaseMetaTileEntity().getFrontFacing();
+ }
+
+ @Override
+ public boolean isSimpleMachine() {
+ return false;
+ }
+
+ @Override
+ public boolean isFacingValid(byte aFacing) {
+ return true;
+ }
+
+ @Override
+ public boolean isAccessAllowed(EntityPlayer aPlayer) {
+ return true;
+ }
+
+ @Override
+ public boolean isValidSlot(int aIndex) {
+ return aIndex > 0;
+ }
+
+ @Override
+ public int getProgresstime() {
+ return mProgresstime;
+ }
+
+ @Override
+ public int maxProgresstime() {
+ return mMaxProgresstime;
+ }
+
+ @Override
+ public int increaseProgress(int aProgress) {
+ return aProgress;
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ aNBT.setInteger("mEUt", mEUt);
+ aNBT.setInteger("mProgresstime", mProgresstime);
+ aNBT.setInteger("mMaxProgresstime", mMaxProgresstime);
+ aNBT.setInteger("mEfficiencyIncrease", mEfficiencyIncrease);
+ aNBT.setInteger("mEfficiency", mEfficiency);
+ aNBT.setInteger("mPollution", mPollution);
+ aNBT.setInteger("mRuntime", mRuntime);
+
+ if (mOutputItems != null) {
+ aNBT.setInteger("mOutputItemsLength", mOutputItems.length);
+ for (int i = 0; i < mOutputItems.length; i++)
+ if (mOutputItems[i] != null) {
+ NBTTagCompound tNBT = new NBTTagCompound();
+ mOutputItems[i].writeToNBT(tNBT);
+ aNBT.setTag("mOutputItem" + i, tNBT);
+ }
+ }
+ if (mOutputFluids != null) {
+ aNBT.setInteger("mOutputFluidsLength", mOutputFluids.length);
+ for (int i = 0; i < mOutputFluids.length; i++)
+ if (mOutputFluids[i] != null) {
+ NBTTagCompound tNBT = new NBTTagCompound();
+ mOutputFluids[i].writeToNBT(tNBT);
+ aNBT.setTag("mOutputFluids" + i, tNBT);
+ }
+ }
+ aNBT.setBoolean("mWrench", mWrench);
+ aNBT.setBoolean("mScrewdriver", mScrewdriver);
+ aNBT.setBoolean("mSoftHammer", mSoftHammer);
+ aNBT.setBoolean("mHardHammer", mHardHammer);
+ aNBT.setBoolean("mSolderingTool", mSolderingTool);
+ aNBT.setBoolean("mCrowbar", mCrowbar);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ mEUt = aNBT.getInteger("mEUt");
+ mProgresstime = aNBT.getInteger("mProgresstime");
+ mMaxProgresstime = aNBT.getInteger("mMaxProgresstime");
+ if (mMaxProgresstime > 0) mRunningOnLoad = true;
+ mEfficiencyIncrease = aNBT.getInteger("mEfficiencyIncrease");
+ mEfficiency = aNBT.getInteger("mEfficiency");
+ mPollution = aNBT.getInteger("mPollution");
+ mRuntime = aNBT.getInteger("mRuntime");
+
+ int aOutputItemsLength = aNBT.getInteger("mOutputItemsLength");
+ if (aOutputItemsLength > 0) {
+ mOutputItems = new ItemStack[aOutputItemsLength];
+ for (int i = 0; i < mOutputItems.length; i++)
+ mOutputItems[i] = GT_Utility.loadItem(aNBT, "mOutputItem" + i);
+ }
+
+ int aOutputFluidsLength = aNBT.getInteger("mOutputFluidsLength");
+ if (aOutputFluidsLength > 0) {
+ mOutputFluids = new FluidStack[aOutputFluidsLength];
+ for (int i = 0; i < mOutputFluids.length; i++)
+ mOutputFluids[i] = GT_Utility.loadFluid(aNBT, "mOutputFluids" + i);
+ }
+
+ mWrench = aNBT.getBoolean("mWrench");
+ mScrewdriver = aNBT.getBoolean("mScrewdriver");
+ mSoftHammer = aNBT.getBoolean("mSoftHammer");
+ mHardHammer = aNBT.getBoolean("mHardHammer");
+ mSolderingTool = aNBT.getBoolean("mSolderingTool");
+ mCrowbar = aNBT.getBoolean("mCrowbar");
+ }
+
+ @Override
+ public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
+ if (aBaseMetaTileEntity.isClientSide()) return true;
+ aBaseMetaTileEntity.openGUI(aPlayer);
+ return true;
+ }
+
+ @Override
+ public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_Container_MultiMachine(aPlayerInventory, aBaseMetaTileEntity);
+ }
+
+ @Override
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "MultiblockDisplay.png");
+ }
+
+ @Override
+ public byte getTileEntityBaseType() {
+ return 2;
+ }
+
+ @Override
+ public void onMachineBlockUpdate() {
+ mUpdate = 50;
+ }
+
+ @Override
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ if (aBaseMetaTileEntity.isServerSide()) {
+ if (mEfficiency < 0) mEfficiency = 0;
+ if (--mUpdate == 0 || --mStartUpCheck == 0) {
+ mInputHatches.clear();
+ mInputBusses.clear();
+ mOutputHatches.clear();
+ mOutputBusses.clear();
+ mDynamoHatches.clear();
+ mEnergyHatches.clear();
+ mMufflerHatches.clear();
+ mMaintenanceHatches.clear();
+ mMachine = checkMachine(aBaseMetaTileEntity, mInventory[1]);
+ }
+ if (mStartUpCheck < 0) {
+ if (mMachine) {
+ for (GT_MetaTileEntity_Hatch_Maintenance tHatch : mMaintenanceHatches) {
+ if (isValidMetaTileEntity(tHatch)) {
+ if (!GT_MetaTileEntity_MultiBlockBase.disableMaintenance) {
+ if (tHatch.mAuto && (!mWrench || !mScrewdriver || !mSoftHammer || !mHardHammer || !mSolderingTool || !mCrowbar))
+ tHatch.autoMaintainance();
+ if (tHatch.mWrench) mWrench = true;
+ if (tHatch.mScrewdriver) mScrewdriver = true;
+ if (tHatch.mSoftHammer) mSoftHammer = true;
+ if (tHatch.mHardHammer) mHardHammer = true;
+ if (tHatch.mSolderingTool) mSolderingTool = true;
+ if (tHatch.mCrowbar) mCrowbar = true;
+ } else {
+ mWrench = true;
+ mScrewdriver = true;
+ mSoftHammer = true;
+ mHardHammer = true;
+ mSolderingTool = true;
+ mCrowbar = true;
+ }
+
+ tHatch.mWrench = false;
+ tHatch.mScrewdriver = false;
+ tHatch.mSoftHammer = false;
+ tHatch.mHardHammer = false;
+ tHatch.mSolderingTool = false;
+ tHatch.mCrowbar = false;
+ }
+ }
+ if (getRepairStatus() > 0) {
+ if (mMaxProgresstime > 0 && doRandomMaintenanceDamage()) {
+ if (onRunningTick(mInventory[1])) {
+ if (!polluteEnvironment(getPollutionPerTick(mInventory[1]))) {
+ stopMachine();
+ }
+ if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
+ if (mOutputItems != null) for (ItemStack tStack : mOutputItems)
+ if (tStack != null) {
+ try {
+ GT_Mod.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack);
+ } catch (Exception ignored) {
+ }
+ addOutput(tStack);
+ }
+ if (mOutputFluids != null) {
+ addFluidOutputs(mOutputFluids);
+ }
+ mEfficiency = Math.max(0, Math.min(mEfficiency + mEfficiencyIncrease, getMaxEfficiency(mInventory[1]) - ((getIdealStatus() - getRepairStatus()) * 1000)));
+ mOutputItems = null;
+ mProgresstime = 0;
+ mMaxProgresstime = 0;
+ mEfficiencyIncrease = 0;
+ if (aBaseMetaTileEntity.isAllowedToWork()) checkRecipe(mInventory[1]);
+ if (mOutputFluids != null && mOutputFluids.length > 0) {
+ if (mOutputFluids.length > 1) {
+ try {
+ GT_Mod.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "oilplant");
+ } catch (Exception ignored) {
+ }
+ }
+ }
+ }
+ }
+ } else {
+ if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled() || aBaseMetaTileEntity.hasInventoryBeenModified()) {
+
+ if (aBaseMetaTileEntity.isAllowedToWork()) {
+ checkRecipe(mInventory[1]);
+ }
+ if (mMaxProgresstime <= 0) mEfficiency = Math.max(0, mEfficiency - 1000);
+ }
+ }
+ } else {
+ stopMachine();
+ }
+ } else {
+ stopMachine();
+ }
+ }
+ aBaseMetaTileEntity.setErrorDisplayID((aBaseMetaTileEntity.getErrorDisplayID() & ~127) | (mWrench ? 0 : 1) | (mScrewdriver ? 0 : 2) | (mSoftHammer ? 0 : 4) | (mHardHammer ? 0 : 8) | (mSolderingTool ? 0 : 16) | (mCrowbar ? 0 : 32) | (mMachine ? 0 : 64));
+ aBaseMetaTileEntity.setActive(mMaxProgresstime > 0);
+ }
+ }
+
+ public boolean polluteEnvironment(int aPollutionLevel) {
+ mPollution += aPollutionLevel;
+ for (GT_MetaTileEntity_Hatch_Muffler tHatch : mMufflerHatches) {
+ if (isValidMetaTileEntity(tHatch)) {
+ if (mPollution >= 10000) {
+ if (tHatch.polluteEnvironment()) {
+ mPollution -= 10000;
+ }
+ } else {
+ break;
+ }
+ }
+ }
+ return mPollution < 10000;
+ }
+
+ /**
+ * Called every tick the Machine runs
+ */
+ public boolean onRunningTick(ItemStack aStack) {
+ if (mEUt > 0) {
+ addEnergyOutput(((long) mEUt * mEfficiency) / 10000);
+ return true;
+ }
+ if (mEUt < 0) {
+ if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) {
+ stopMachine();
+ return false;
+ }
+ }
+ return true;
+ }
+
+ /**
+ * Checks if this is a Correct Machine Part for this kind of Machine (Turbine Rotor for example)
+ */
+ public abstract boolean isCorrectMachinePart(ItemStack aStack);
+
+ /**
+ * Checks the Recipe
+ */
+ public abstract boolean checkRecipe(ItemStack aStack);
+
+ /**
+ * Checks the Machine. You have to assign the MetaTileEntities for the Hatches here.
+ */
+ public abstract boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack);
+
+ /**
+ * Gets the maximum Efficiency that spare Part can get (0 - 10000)
+ */
+ public abstract int getMaxEfficiency(ItemStack aStack);
+
+ /**
+ * Gets the pollution this Device outputs to a Muffler per tick (10000 = one Pullution Block)
+ */
+ public abstract int getPollutionPerTick(ItemStack aStack);
+
+ /**
+ * Gets the damage to the ItemStack, usually 0 or 1.
+ */
+ public abstract int getDamageToComponent(ItemStack aStack);
+
+ /**
+ * If it explodes when the Component has to be replaced.
+ */
+ public abstract boolean explodesOnComponentBreak(ItemStack aStack);
+
+ public void stopMachine() {
+ mOutputItems = null;
+ mEUt = 0;
+ mEfficiency = 0;
+ mProgresstime = 0;
+ mMaxProgresstime = 0;
+ mEfficiencyIncrease = 0;
+ getBaseMetaTileEntity().disableWorking();
+ }
+
+ public int getRepairStatus() {
+ return (mWrench ? 1 : 0) + (mScrewdriver ? 1 : 0) + (mSoftHammer ? 1 : 0) + (mHardHammer ? 1 : 0) + (mSolderingTool ? 1 : 0) + (mCrowbar ? 1 : 0);
+ }
+
+ public int getIdealStatus() {
+ return 6;
+ }
+
+ public int getCurrentEfficiency(ItemStack itemStack) {
+ int maxEff = getMaxEfficiency(itemStack);
+ return maxEff - (getIdealStatus() - getRepairStatus()) * maxEff / 10;
+ }
+
+ public boolean doRandomMaintenanceDamage() {
+ if (!isCorrectMachinePart(mInventory[1]) || getRepairStatus() == 0) {
+ stopMachine();
+ return false;
+ }
+ if (mRuntime++ > 1000) {
+ mRuntime = 0;
+ if (getBaseMetaTileEntity().getRandomNumber(6000) == 0) {
+ switch (getBaseMetaTileEntity().getRandomNumber(6)) {
+ case 0:
+ mWrench = false;
+ break;
+ case 1:
+ mScrewdriver = false;
+ break;
+ case 2:
+ mSoftHammer = false;
+ break;
+ case 3:
+ mHardHammer = false;
+ break;
+ case 4:
+ mSolderingTool = false;
+ break;
+ case 5:
+ mCrowbar = false;
+ break;
+ }
+ }
+ if (mInventory[1] != null && getBaseMetaTileEntity().getRandomNumber(2) == 0 && !mInventory[1].getUnlocalizedName().startsWith("gt.blockmachines.basicmachine.")) {
+ if (mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) {
+ NBTTagCompound tNBT = mInventory[1].getTagCompound();
+ if (tNBT != null) {
+ NBTTagCompound tNBT2 = tNBT.getCompoundTag("GT.CraftingComponents");//tNBT2 dont use out if
+ if (!tNBT.getBoolean("mDis")) {
+ tNBT2 = new NBTTagCompound();
+ Materials tMaterial = GT_MetaGenerated_Tool.getPrimaryMaterial(mInventory[1]);
+ ItemStack tTurbine = GT_OreDictUnificator.get(OrePrefixes.turbineBlade, tMaterial, 1);
+ int i = mInventory[1].getItemDamage();
+ if (i == 170) {
+ ItemStack tStack = GT_Utility.copyAmount(1, tTurbine);
+ tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
+ tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Magnalium, 1);
+ tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
+ } else if (i == 172) {
+ ItemStack tStack = GT_Utility.copyAmount(1, tTurbine);
+ tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.7", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.8", tStack.writeToNBT(new NBTTagCompound()));
+ tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Titanium, 1);
+ tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
+ } else if (i == 174) {
+ ItemStack tStack = GT_Utility.copyAmount(2, tTurbine);
+ tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
+ tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.TungstenSteel, 1);
+ tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
+ } else if (i == 176) {
+ ItemStack tStack = GT_Utility.copyAmount(2, tTurbine);
+ tNBT2.setTag("Ingredient.0", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.1", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.2", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.3", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.5", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.6", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.7", tStack.writeToNBT(new NBTTagCompound()));
+ tNBT2.setTag("Ingredient.8", tStack.writeToNBT(new NBTTagCompound()));
+ tStack = GT_OreDictUnificator.get(OrePrefixes.stickLong, Materials.Americium, 1);
+ tNBT2.setTag("Ingredient.4", tStack.writeToNBT(new NBTTagCompound()));
+ }
+ tNBT.setTag("GT.CraftingComponents", tNBT2);
+ tNBT.setBoolean("mDis", true);
+ mInventory[1].setTagCompound(tNBT);
+
+ }
+ }
+ ((GT_MetaGenerated_Tool) mInventory[1].getItem()).doDamage(mInventory[1], (long) Math.min(mEUt / this.damageFactorLow, Math.pow(mEUt, this.damageFactorHigh)));
+ if (mInventory[1].stackSize == 0) mInventory[1] = null;
+ }
+ }
+ }
+ return true;
+ }
+
+ public void explodeMultiblock() {
+ GT_Pollution.addPollution(getBaseMetaTileEntity(), 300000);
+ mInventory[1] = null;
+ for (MetaTileEntity tTileEntity : mInputBusses) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
+ for (MetaTileEntity tTileEntity : mOutputBusses) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
+ for (MetaTileEntity tTileEntity : mInputHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
+ for (MetaTileEntity tTileEntity : mOutputHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
+ for (MetaTileEntity tTileEntity : mDynamoHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
+ for (MetaTileEntity tTileEntity : mMufflerHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
+ for (MetaTileEntity tTileEntity : mEnergyHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
+ for (MetaTileEntity tTileEntity : mMaintenanceHatches) tTileEntity.getBaseMetaTileEntity().doExplosion(V[8]);
+ getBaseMetaTileEntity().doExplosion(V[8]);
+ }
+
+ public boolean addEnergyOutput(long aEU) {
+ if (aEU <= 0) return true;
+ for (GT_MetaTileEntity_Hatch_Dynamo tHatch : mDynamoHatches) {
+ if (isValidMetaTileEntity(tHatch)) {
+ if (tHatch.getBaseMetaTileEntity().increaseStoredEnergyUnits(aEU, false)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ public long getMaxInputVoltage() {
+ long rVoltage = 0;
+ for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches)
+ if (isValidMetaTileEntity(tHatch)) rVoltage += tHatch.getBaseMetaTileEntity().getInputVoltage();
+ return rVoltage;
+ }
+
+ public boolean drainEnergyInput(long aEU) {
+ if (aEU <= 0) return true;
+ for (GT_MetaTileEntity_Hatch_Energy tHatch : mEnergyHatches)
+ if (isValidMetaTileEntity(tHatch)) {
+ if (tHatch.getBaseMetaTileEntity().decreaseStoredEnergyUnits(aEU, false)) return true;
+ }
+ return false;
+ }
+
+ private boolean dumpFluid(FluidStack copiedFluidStack, boolean restrictiveHatchesOnly){
+ for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
+ if (!isValidMetaTileEntity(tHatch) || (restrictiveHatchesOnly && tHatch.mMode == 0)) {
+ continue;
+ }
+ if (GT_ModHandler.isSteam(copiedFluidStack)) {
+ if (!tHatch.outputsSteam()) {
+ continue;
+ }
+ } else {
+ if (!tHatch.outputsLiquids()) {
+ continue;
+ }
+ if (tHatch.isFluidLocked() && tHatch.getLockedFluidName() != null && !tHatch.getLockedFluidName().equals(copiedFluidStack.getUnlocalizedName())) {
+ continue;
+ }
+ }
+ int tAmount = tHatch.fill(copiedFluidStack, false);
+ if (tAmount >= copiedFluidStack.amount) {
+ boolean filled = tHatch.fill(copiedFluidStack, true) >= copiedFluidStack.amount;
+ tHatch.onEmptyingContainerWhenEmpty();
+ return filled;
+ } else if (tAmount > 0) {
+ copiedFluidStack.amount = copiedFluidStack.amount - tHatch.fill(copiedFluidStack, true);
+ tHatch.onEmptyingContainerWhenEmpty();
+ }
+ }
+ return false;
+ }
+
+ public boolean addOutput(FluidStack aLiquid) {
+ if (aLiquid == null) return false;
+ FluidStack copiedFluidStack = aLiquid.copy();
+ if (!dumpFluid(copiedFluidStack, true)){
+ dumpFluid(copiedFluidStack, false);
+ }
+ return false;
+ }
+
+ protected void addFluidOutputs(FluidStack[] mOutputFluids2) {
+ for (FluidStack outputFluidStack : mOutputFluids2) {
+ addOutput(outputFluidStack);
+ }
+ }
+
+ public boolean depleteInput(FluidStack aLiquid) {
+ if (aLiquid == null) return false;
+ for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
+ tHatch.mRecipeMap = getRecipeMap();
+ if (isValidMetaTileEntity(tHatch)) {
+ FluidStack tLiquid = tHatch.getFluid();
+ if (tLiquid != null && tLiquid.isFluidEqual(aLiquid)) {
+ tLiquid = tHatch.drain(aLiquid.amount, false);
+ if (tLiquid != null && tLiquid.amount >= aLiquid.amount) {
+ tLiquid = tHatch.drain(aLiquid.amount, true);
+ return tLiquid != null && tLiquid.amount >= aLiquid.amount;
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ public boolean addOutput(ItemStack aStack) {
+ if (GT_Utility.isStackInvalid(aStack)) return false;
+ aStack = GT_Utility.copy(aStack);
+// FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true);
+// if (aLiquid == null) {
+ boolean outputSuccess = true;
+ while (outputSuccess && aStack.stackSize > 0) {
+ outputSuccess = false;
+ ItemStack single = aStack.splitStack(1);
+ for (GT_MetaTileEntity_Hatch_OutputBus tHatch : mOutputBusses) {
+ if (!outputSuccess && isValidMetaTileEntity(tHatch)) {
+ for (int i = tHatch.getSizeInventory() - 1; i >= 0 && !outputSuccess; i--) {
+ if (tHatch.getBaseMetaTileEntity().addStackToSlot(i, single)) outputSuccess = true;
+ }
+ }
+ }
+ for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
+ if (!outputSuccess && isValidMetaTileEntity(tHatch) && tHatch.outputsItems()) {
+ if (tHatch.getBaseMetaTileEntity().addStackToSlot(1, single)) outputSuccess = true;
+ }
+ }
+ }
+// }else {
+// for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
+// if (isValidMetaTileEntity(tHatch) && GT_ModHandler.isSteam(aLiquid)?tHatch.outputsSteam():tHatch.outputsLiquids()) {
+// int tAmount = tHatch.fill(aLiquid, false);
+// if (tAmount >= aLiquid.amount) {
+// return tHatch.fill(aLiquid, true) >= aLiquid.amount;
+// }
+// }
+// }
+// }
+ return outputSuccess;
+ }
+
+ public boolean depleteInput(ItemStack aStack) {
+ if (GT_Utility.isStackInvalid(aStack)) return false;
+ FluidStack aLiquid = GT_Utility.getFluidForFilledItem(aStack, true);
+ if (aLiquid != null) return depleteInput(aLiquid);
+ for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
+ tHatch.mRecipeMap = getRecipeMap();
+ if (isValidMetaTileEntity(tHatch)) {
+ if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(0))) {
+ if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) {
+ tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize);
+ return true;
+ }
+ }
+ }
+ }
+ for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses) {
+ tHatch.mRecipeMap = getRecipeMap();
+ if (isValidMetaTileEntity(tHatch)) {
+ for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
+ if (GT_Utility.areStacksEqual(aStack, tHatch.getBaseMetaTileEntity().getStackInSlot(i))) {
+ if (tHatch.getBaseMetaTileEntity().getStackInSlot(0).stackSize >= aStack.stackSize) {
+ tHatch.getBaseMetaTileEntity().decrStackSize(0, aStack.stackSize);
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
+
+ public ArrayList<ItemStack> getStoredOutputs() {
+ ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
+// for (GT_MetaTileEntity_Hatch_Output tHatch : mOutputHatches) {
+// if (isValidMetaTileEntity(tHatch)) {
+// rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(1));
+// }
+// }
+ for (GT_MetaTileEntity_Hatch_OutputBus tHatch : mOutputBusses) {
+ if (isValidMetaTileEntity(tHatch)) {
+ for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
+ rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
+ }
+ }
+ }
+ return rList;
+ }
+
+ public ArrayList<FluidStack> getStoredFluids() {
+ ArrayList<FluidStack> rList = new ArrayList<FluidStack>();
+ for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
+ tHatch.mRecipeMap = getRecipeMap();
+ if (isValidMetaTileEntity(tHatch) && tHatch.getFillableStack() != null) {
+ rList.add(tHatch.getFillableStack());
+ }
+ }
+ return rList;
+ }
+
+ public ArrayList<ItemStack> getStoredInputs() {
+ ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
+// for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches) {
+// tHatch.mRecipeMap = getRecipeMap();
+// if (isValidMetaTileEntity(tHatch) && tHatch.getBaseMetaTileEntity().getStackInSlot(0) != null) {
+// rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(0));
+// }
+// }
+ for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses) {
+ tHatch.mRecipeMap = getRecipeMap();
+ if (isValidMetaTileEntity(tHatch)) {
+ for (int i = tHatch.getBaseMetaTileEntity().getSizeInventory() - 1; i >= 0; i--) {
+ if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null)
+ rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
+ }
+ }
+ }
+ return rList;
+ }
+
+ public GT_Recipe_Map getRecipeMap() {
+ return null;
+ }
+
+ public void updateSlots() {
+ for (GT_MetaTileEntity_Hatch_Input tHatch : mInputHatches)
+ if (isValidMetaTileEntity(tHatch)) tHatch.updateSlots();
+ for (GT_MetaTileEntity_Hatch_InputBus tHatch : mInputBusses)
+ if (isValidMetaTileEntity(tHatch)) tHatch.updateSlots();
+ }
+
+ public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) return false;
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) return false;
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input)
+ return mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus)
+ return mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output)
+ return mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus)
+ return mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy)
+ return mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo)
+ return mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance)
+ return mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler)
+ return mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return false;
+ }
+
+ public boolean addMaintenanceToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) return false;
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) return false;
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ return mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance) aMetaTileEntity);
+ }
+ return false;
+ }
+
+ public boolean addEnergyInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) {
+ return false;
+ }
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) return false;
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ return mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity);
+ }
+ return false;
+ }
+
+ public boolean addDynamoToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) return false;
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) return false;
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ return mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity);
+ }
+ return false;
+ }
+
+ public boolean addMufflerToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) return false;
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) return false;
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ return mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ }
+ return false;
+ }
+
+ public boolean addInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) return false;
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) return false;
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = getRecipeMap();
+ return mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mRecipeMap = getRecipeMap();
+ return mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity);
+ }
+ return false;
+ }
+
+ public boolean addOutputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) return false;
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) return false;
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ return mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ return mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ }
+ return false;
+ }
+
+ @Override
+ public String[] getInfoData() {
+ return new String[]{"Progress:", (mProgresstime / 20) + "secs", (mMaxProgresstime / 20) + "secs", "Efficiency:", (mEfficiency / 100.0F) + "%", "Problems:", String.valueOf((getIdealStatus() - getRepairStatus()))};
+ }
+
+ @Override
+ public boolean isGivingInformation() {
+ return true;
+ }
+
+ @Override
+ public boolean allowPullStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ return false;
+ }
+} \ No newline at end of file
diff --git a/src/main/java/gregtech/api/util/GT_LanguageManager.java b/src/main/java/gregtech/api/util/GT_LanguageManager.java
index f391acd153..59a24ef432 100644
--- a/src/main/java/gregtech/api/util/GT_LanguageManager.java
+++ b/src/main/java/gregtech/api/util/GT_LanguageManager.java
@@ -316,7 +316,8 @@ public class GT_LanguageManager {
// addStringLocalization("Interaction_DESCRIPTION_Index_208", "Grab");
// addStringLocalization("Interaction_DESCRIPTION_Index_209", "Grab");
// addStringLocalization("Interaction_DESCRIPTION_Index_210", "Grab");
+ addStringLocalization("Interaction_DESCRIPTION_Index_211", "Items per side: ");
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java
index d31a2529c2..69f5b9783c 100644
--- a/src/main/java/gregtech/api/util/GT_Utility.java
+++ b/src/main/java/gregtech/api/util/GT_Utility.java
@@ -8,9 +8,11 @@ import gregtech.api.enchants.Enchantment_Radioactivity;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.SubTag;
+import gregtech.api.enums.Textures;
import gregtech.api.events.BlockScanningEvent;
import gregtech.api.interfaces.IDebugableBlock;
import gregtech.api.interfaces.IProjectileItem;
+import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.*;
import gregtech.api.items.GT_EnergyArmor_Item;
import gregtech.api.items.GT_Generic_Item;
@@ -54,7 +56,12 @@ import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.common.util.BlockSnapshot;
+import net.minecraftforge.common.util.FakePlayer;
+import net.minecraftforge.common.util.FakePlayerFactory;
import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.event.ForgeEventFactory;
+import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.fluids.*;
import net.minecraftforge.fluids.FluidContainerRegistry.FluidContainerData;
@@ -67,9 +74,11 @@ import java.text.NumberFormat;
import java.util.*;
import java.util.Map.Entry;
+import com.mojang.authlib.GameProfile;
+
import static gregtech.api.enums.GT_Values.*;
import static gregtech.common.GT_Proxy.GTPOLLUTION;
-import static gregtech.common.GT_UndergroundOil.undergroundOil;
+import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation;
/**
* NEVER INCLUDE THIS FILE IN YOUR MOD!!!
@@ -1115,6 +1124,17 @@ public class GT_Utility {
aInventory.setInventorySlotContents(i, null);
}
}
+
+ /**
+ * Initializes a new texture page.
+ */
+ public static boolean addTexturePage(byte page){
+ if(Textures.BlockIcons.casingTexturePages[page]==null){
+ Textures.BlockIcons.casingTexturePages[page]=new ITexture[128];
+ return true;
+ }
+ return false;
+ }
/**
* Converts a Number to a String
@@ -1802,7 +1822,7 @@ public class GT_Utility {
}
if (aPlayer.capabilities.isCreativeMode && GT_Values.D1) {
- FluidStack tFluid = undergroundOil(aWorld.getChunkFromBlockCoords(aX,aZ),-1);//-# to only read
+ FluidStack tFluid = undergroundOilReadInformation(aWorld.getChunkFromBlockCoords(aX,aZ));
if (tFluid!=null)
tList.add(EnumChatFormatting.GOLD+tFluid.getLocalizedName()+EnumChatFormatting.RESET+": " +EnumChatFormatting.YELLOW+ tFluid.amount +EnumChatFormatting.RESET+trans("200"," L"));
else
@@ -1981,7 +2001,41 @@ public class GT_Utility {
public static ItemStack getIntegratedCircuit(int config){
return ItemList.Circuit_Integrated.getWithDamage(0, config, new Object[0]);
}
-
+
+ public static float getBlockHardnessAt(World aWorld, int aX, int aY, int aZ) {
+ return aWorld.getBlock(aX, aY, aZ).getBlockHardness(aWorld, aX, aY, aZ);
+ }
+
+ public static FakePlayer getFakePlayer(IGregTechTileEntity aBaseMetaTileEntity) {
+ if (aBaseMetaTileEntity.getWorld() instanceof WorldServer) {
+ return FakePlayerFactory.get((WorldServer) aBaseMetaTileEntity.getWorld(), new GameProfile(null, aBaseMetaTileEntity.getOwnerName()));
+ }
+ return null;
+ }
+
+ public static boolean eraseBlockByFakePlayer(FakePlayer aPlayer, int aX, int aY, int aZ, boolean isSimulate) {
+ if (aPlayer == null) return false;
+ World aWorld = aPlayer.worldObj;
+ BlockEvent.BreakEvent event = new BlockEvent.BreakEvent(aX, aY, aZ, aWorld, aWorld.getBlock(aX, aY, aZ), aWorld.getBlockMetadata(aX, aY, aZ), aPlayer);
+ MinecraftForge.EVENT_BUS.post(event);
+ if (!event.isCanceled()) {
+ if (!isSimulate) return aWorld.setBlockToAir(aX, aY, aZ);
+ return true;
+ }
+ return false;
+ }
+
+ public static boolean setBlockByFakePlayer(FakePlayer aPlayer, int aX, int aY, int aZ, Block aBlock, int aMeta, boolean isSimulate) {
+ if (aPlayer == null) return false;
+ World aWorld = aPlayer.worldObj;
+ BlockEvent.PlaceEvent event = ForgeEventFactory.onPlayerBlockPlace(aPlayer, new BlockSnapshot(aWorld, aX, aY, aZ, aBlock, aMeta), ForgeDirection.UNKNOWN);
+ if (!event.isCanceled()) {
+ if (!isSimulate) return aWorld.setBlock(aX, aY, aZ, aBlock, aMeta, 3);
+ return true;
+ }
+ return false;
+ }
+
public static class ItemNBT {
public static void setNBT(ItemStack aStack, NBTTagCompound aNBT) {
if (aNBT == null) {
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index 79b5b59df6..09fb87fd25 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -145,6 +145,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
public boolean mDisableIC2Cables = false;
public boolean mAchievements = true;
public boolean mAE2Integration = true;
+ public boolean mAE2Tunnel = true;
public boolean mArcSmeltIntoAnnealed = true;
public boolean mMagneticraftRecipes = true;
public boolean mImmersiveEngineeringRecipes = true;
@@ -1887,5 +1888,11 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
}
}
+ @SubscribeEvent
+ public void onBlockEvent(BlockEvent event) {
+ if (event.block.getUnlocalizedName().equals("blockAlloyGlass"))
+ GregTech_API.causeMachineUpdate(event.world, event.x, event.y, event.z);
+ }
+
-} \ No newline at end of file
+}
diff --git a/src/main/java/gregtech/common/GT_UndergroundOil.java b/src/main/java/gregtech/common/GT_UndergroundOil.java
index d9eda954c3..93fafcfa11 100644
--- a/src/main/java/gregtech/common/GT_UndergroundOil.java
+++ b/src/main/java/gregtech/common/GT_UndergroundOil.java
@@ -19,14 +19,23 @@ import static gregtech.common.GT_Proxy.*;
*/
public class GT_UndergroundOil {
public static final short DIVIDER=5000;
+ private static final XSTR random=new XSTR();
- public static FluidStack undergroundOil(IGregTechTileEntity te, float drainSpeedCoefficient){
- return undergroundOil(te.getWorld().getChunkFromBlockCoords(te.getXCoord(),te.getZCoord()),drainSpeedCoefficient);
+ public static FluidStack undergroundOilReadInformation(IGregTechTileEntity te){
+ return undergroundOil(te.getWorld().getChunkFromBlockCoords(te.getXCoord(),te.getZCoord()),-1);
+ }
+
+ public static FluidStack undergroundOilReadInformation(Chunk chunk) {
+ return undergroundOil(chunk,-1);
+ }
+
+ public static FluidStack undergroundOil(IGregTechTileEntity te, float readOrDrainCoefficient){
+ return undergroundOil(te.getWorld().getChunkFromBlockCoords(te.getXCoord(),te.getZCoord()),readOrDrainCoefficient);
}
//Returns whole content for information purposes -> when drainSpeedCoeff < 0
//Else returns extracted fluidStack if amount > 0, or null otherwise
- public static FluidStack undergroundOil(Chunk chunk, float drainSpeedCoefficient) {
+ public static FluidStack undergroundOil(Chunk chunk, float readOrDrainCoefficient) {
if (GT_Mod.gregtechproxy.mUndergroundOil.CheckBlackList(chunk.worldObj.provider.dimensionId)) return null;
World aWorld = chunk.worldObj;
@@ -42,11 +51,13 @@ public class GT_UndergroundOil {
if(tInts==null) tInts=getDefaultChunkDataOnCreation();//init if null
else if(tInts[GTOIL]==0){//FAST stop
//can return 0 amount stack for info :D
- return drainSpeedCoefficient>=0 ? null : new FluidStack(FluidRegistry.getFluid(tInts[GTOILFLUID]),0);
+ return readOrDrainCoefficient>=0 ? null : new FluidStack(FluidRegistry.getFluid(tInts[GTOILFLUID]),0);
}
//GEN IT TO GET OBJECT...
- XSTR tRandom = new XSTR( (aWorld.getSeed() + aWorld.provider.dimensionId * 2 + ((int)Math.floor((double)chunk.getChunkCoordIntPair().chunkXPos/(double)6)) + (7 * ((int)Math.floor((double)chunk.getChunkCoordIntPair().chunkZPos/6)))));
+ final XSTR tRandom = new XSTR( (aWorld.getSeed() + aWorld.provider.dimensionId * 2 +
+ ((int)Math.floor((double)chunk.getChunkCoordIntPair().chunkXPos/(double)6)) +
+ (7 * ((int)Math.floor((double)chunk.getChunkCoordIntPair().chunkZPos/6)))));
GT_UO_Fluid uoFluid = GT_Mod.gregtechproxy.mUndergroundOil.GetDimension(aWorld.provider.dimensionId).getRandomFluid(tRandom);
//Fluid stack holder
@@ -63,24 +74,32 @@ public class GT_UndergroundOil {
fluidInChunk = new FluidStack(uoFluid.getFluid(),tInts[GTOIL]);
}else{
fluidInChunk = new FluidStack(uoFluid.getFluid(), uoFluid.getRandomAmount(tRandom));
- tRandom=new XSTR();
- fluidInChunk.amount=(int)((float)fluidInChunk.amount*(0.75f+(tRandom.nextFloat()/2f)));//Randomly change amounts by +/- 25%
+ fluidInChunk.amount=(int)((float)fluidInChunk.amount*(0.75f+(random.nextFloat()/2f)));//Randomly change amounts by +/- 25%
}
tInts[GTOIL]=fluidInChunk.amount;
tInts[GTOILFLUID]=fluidInChunk.getFluidID();
}
//do stuff on it if needed
- if(drainSpeedCoefficient>=0){
- if(fluidInChunk.amount<DIVIDER){
+ if(readOrDrainCoefficient>=0){
+ int fluidExtracted=(int)Math.floor(fluidInChunk.amount * (double) readOrDrainCoefficient / DIVIDER);
+ double averageDecrease=uoFluid.DecreasePerOperationAmount * (double)readOrDrainCoefficient;
+ int decrease=(int)Math.ceil(averageDecrease);
+ if(fluidExtracted<=0 || fluidInChunk.amount<=decrease){//decrease - here it is max value of extraction for easy check
fluidInChunk=null;
tInts[GTOIL]=0;//so in next access it will stop way above
}else{
- fluidInChunk.amount = (int)(fluidInChunk.amount*(double)drainSpeedCoefficient/DIVIDER);//give appropriate amount
- tInts[GTOIL]-=uoFluid.DecreasePerOperationAmount;//diminish amount
+ fluidInChunk.amount = fluidExtracted;//give appropriate amount
+ if(random.nextFloat()<(decrease-averageDecrease)) decrease--;//use random to "subtract double from int"
+ //ex.
+ // averageDecrease=3.9
+ // decrease= ceil from 3.9 = 4
+ // decrease-averageDecrease=0.1 -> chance to subtract 1
+ // if random is < chance then subtract 1
+ tInts[GTOIL]-=decrease;//diminish amount, "randomly" adjusted to double value (averageDecrease)
}
}else{//just get info
- if(fluidInChunk.amount<DIVIDER){
+ if(fluidInChunk.amount<=DIVIDER){
fluidInChunk.amount=0;//return informative stack
tInts[GTOIL]=0;//so in next access it will stop way above
}else{
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java
index 08f7118f66..965c4bffab 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings1.java
@@ -11,12 +11,27 @@ import net.minecraft.world.IBlockAccess;
public class GT_Block_Casings1
extends GT_Block_Casings_Abstract {
+
+ /**
+ * Texture Index Information
+ * Textures.BlockIcons.casingTexturePages[0][0-63] - Gregtech
+ * Textures.BlockIcons.casingTexturePages[0][64-127] - GT++
+ * Textures.BlockIcons.casingTexturePages[1][0-127] - Gregtech
+ * Textures.BlockIcons.casingTexturePages[2][0-127] - Free
+ * Textures.BlockIcons.casingTexturePages[3][0-127] - Free
+ * Textures.BlockIcons.casingTexturePages[4][0-127] - Free
+ * Textures.BlockIcons.casingTexturePages[5][0-127] - Free
+ * Textures.BlockIcons.casingTexturePages[6][0-127] - Free
+ * Textures.BlockIcons.casingTexturePages[7][0-127] - Free
+ * Textures.BlockIcons.casingTexturePages[8][0-127] - TecTech
+ */
+
+
public GT_Block_Casings1() {
super(GT_Item_Casings1.class, "gt.blockcasings", GT_Material_Casings.INSTANCE);
- for (byte i = 0; i < 16; i = (byte) (i + 1)) {
+ for (byte i = 0; i < 16; i = (byte) (i + 1)) {
Textures.BlockIcons.CASING_BLOCKS[i] = new GT_CopiedBlockTexture(this, 6, i);
}
- Textures.BlockIcons.CASING_BLOCKS[111] = new GT_CopiedBlockTexture(this, 6, 0,Dyes.MACHINE_METAL.mRGBa);
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "ULV Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "LV Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "MV Machine Casing");
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java
index 83ffddd47a..f8f54f9604 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings2.java
@@ -1,9 +1,11 @@
package gregtech.common.blocks;
+import gregtech.api.enums.Dyes;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
import gregtech.api.objects.GT_CopiedBlockTexture;
import gregtech.api.util.GT_LanguageManager;
+import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
@@ -15,8 +17,11 @@ public class GT_Block_Casings2
public GT_Block_Casings2() {
super(GT_Item_Casings2.class, "gt.blockcasings2", GT_Material_Casings.INSTANCE);
for (byte i = 0; i < 16; i = (byte) (i + 1)) {
- Textures.BlockIcons.CASING_BLOCKS[(i + 16)] = new GT_CopiedBlockTexture(this, 6, i);
- }
+ if (i != 6){
+ Textures.BlockIcons.CASING_BLOCKS[(i + 16)] = new GT_CopiedBlockTexture(this, 6, i);
+ }
+ }
+
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Solid Steel Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Frost Proof Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".2.name", "Bronze Gear Box Casing");
@@ -49,6 +54,9 @@ public class GT_Block_Casings2
ItemList.Casing_Pipe_Steel.set(new ItemStack(this, 1, 13));
ItemList.Casing_Pipe_Titanium.set(new ItemStack(this, 1, 14));
ItemList.Casing_Pipe_TungstenSteel.set(new ItemStack(this, 1, 15));
+
+ //Special handler for Pyrolyse Oven Casing
+ Textures.BlockIcons.CASING_BLOCKS[22] = new GT_CopiedBlockTexture(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 6, 0,Dyes.MACHINE_METAL.mRGBa);
}
public IIcon getIcon(int aSide, int aMeta) {
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java
index d6c5bfebc9..e97228f5fe 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings5.java
@@ -6,6 +6,7 @@ import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
import gregtech.api.objects.GT_CopiedBlockTexture;
import gregtech.api.util.GT_LanguageManager;
+import gregtech.api.util.GT_Utility;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
@@ -13,8 +14,9 @@ public class GT_Block_Casings5
extends GT_Block_Casings_Abstract {
public GT_Block_Casings5() {
super(GT_Item_Casings5.class, "gt.blockcasings5", GT_Material_Casings.INSTANCE);
+ GT_Utility.addTexturePage((byte) 1);
for (byte i = 0; i < 16; i = (byte) (i + 1)) {
- Textures.BlockIcons.CASING_BLOCKS[(i + 64)] = new GT_CopiedBlockTexture(this, 6, i);
+ Textures.BlockIcons.casingTexturePages[1][i] = new GT_CopiedBlockTexture(this, 6, i);
}
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Cupronickel Coil Block");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "Kanthal Coil Block");
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java
index b085bbe6a3..84dbb80c02 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Casings8.java
@@ -13,8 +13,8 @@ public class GT_Block_Casings8
extends GT_Block_Casings_Abstract {
public GT_Block_Casings8() {
super(GT_Item_Casings8.class, "gt.blockcasings8", GT_Material_Casings.INSTANCE);
- for (int i = 0; i < 16; i = (i + 1)) {
- Textures.BlockIcons.CASING_BLOCKS[(i + 112)] = new GT_CopiedBlockTexture(this, 6, i);
+ for (int i = 0; i < 1; i = (i + 1)) {
+ Textures.BlockIcons.casingTexturePages[1][i+48] = new GT_CopiedBlockTexture(this, 6, i);
}
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".0.name", "Chemically Inert Machine Casing");
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + ".1.name", "PTFE Pipe Casing");
diff --git a/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java b/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java
index 540651fd21..5595fa8673 100644
--- a/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java
+++ b/src/main/java/gregtech/common/blocks/GT_Block_Ores_Abstract.java
@@ -30,7 +30,9 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import java.util.ArrayList;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements ITileEntityProvider {
public static ThreadLocal<GT_TileEntity_Ores> mTemporaryTileEntity = new ThreadLocal();
@@ -38,6 +40,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements
public static boolean tHideOres;
private final String aTextName = ".name";
private final String aTextSmall = "Small ";
+ public static Set aBlockedOres = new HashSet<Materials>();
protected GT_Block_Ores_Abstract(String aUnlocalizedName, int aOreMetaCount, boolean aHideFirstMeta, Material aMaterial) {
super(GT_Item_Ores.class, aUnlocalizedName, aMaterial);
@@ -56,7 +59,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements
if (!this.getEnabledMetas()[j]) continue;
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + (i + (j * 1000)) + aTextName, getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
GT_LanguageManager.addStringLocalization(getUnlocalizedName() + "." + ((i + 16000) + (j * 1000)) + aTextName, aTextSmall + getLocalizedName(GregTech_API.sGeneratedMaterials[i]));
- if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0) {
+ if ((GregTech_API.sGeneratedMaterials[i].mTypes & 0x8) != 0 && !aBlockedOres.contains(GregTech_API.sGeneratedMaterials[i])) {
GT_OreDictUnificator.registerOre(this.getProcessingPrefix()[j] != null ? this.getProcessingPrefix()[j].get(GregTech_API.sGeneratedMaterials[i]) : "", new ItemStack(this, 1, i + (j * 1000)));
if (tHideOres) {
if (!(j == 0 && !aHideFirstMeta)) {
@@ -247,7 +250,7 @@ public abstract class GT_Block_Ores_Abstract extends GT_Generic_Block implements
public void getSubBlocks(Item aItem, CreativeTabs aTab, List aList) {
for (int i = 0; i < GregTech_API.sGeneratedMaterials.length; i++) {
Materials tMaterial = GregTech_API.sGeneratedMaterials[i];
- if ((tMaterial != null) && ((tMaterial.mTypes & 0x8) != 0)) {
+ if ((tMaterial != null) && ((tMaterial.mTypes & 0x8) != 0)&& !aBlockedOres.contains(tMaterial)) {
if (!(new ItemStack(aItem, 1, i).getDisplayName().contains(aTextName))) aList.add(new ItemStack(aItem, 1, i));
if (!(new ItemStack(aItem, 1, i + 1000).getDisplayName().contains(aTextName))) aList.add(new ItemStack(aItem, 1, i + 1000));
if (!(new ItemStack(aItem, 1, i + 2000).getDisplayName().contains(aTextName))) aList.add(new ItemStack(aItem, 1, i + 2000));
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
index 4fff514672..aa54506468 100644
--- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
+++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
@@ -42,7 +42,12 @@ public class GT_Item_Machines
if(tDescription.contains("%%%")){
String[] tString = tDescription.split("%%%");
if(tString.length>=2){
- aList.add(GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tString[0], !GregTech_API.sPostloadFinished )+" "+tString[1]);
+ StringBuffer tBuffer = new StringBuffer();
+ Object tRep[] = new String[tString.length / 2];
+ for (int j = 0; j < tString.length; j++)
+ if (j % 2 == 0) tBuffer.append(tString[j]);
+ else {tBuffer.append(" %s"); tRep[j / 2] = tString[j];}
+ aList.add(String.format(GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tBuffer.toString(), !GregTech_API.sPostloadFinished), tRep));
}
}else{String tTranslated = GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tDescription, !GregTech_API.sPostloadFinished );
aList.add(tTranslated.equals("") ? tDescription : tTranslated);}
@@ -136,4 +141,4 @@ public class GT_Item_Machines
}
return true;
}
-} \ No newline at end of file
+}
diff --git a/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java b/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java
index ea2f0184dd..3dfcdd17fb 100644
--- a/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java
+++ b/src/main/java/gregtech/common/items/armor/components/ArmorComponent.java
@@ -2,6 +2,7 @@ package gregtech.common.items.armor.components;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.GregTech_API;
+import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.armor.ArmorData;
import net.minecraft.item.ItemStack;
@@ -18,27 +19,37 @@ public abstract class ArmorComponent implements IArmorComponent {
public static Map<String, ArmorComponent> mStacks = new HashMap<String, ArmorComponent>();
public Map<StatType,Float> mStat = new HashMap<StatType,Float>();
public Map<StatType,Boolean> mBStat = new HashMap<StatType,Boolean>();
-
+
public ArmorComponent(String aName, String aOreDict, boolean aElectric, float aWeight){
- mConfigName = aName;
- if(!GregTech_API.sModularArmor.get( mConfigName, "Enabled", true))return;
- mOreDict = GregTech_API.sModularArmor.get( mConfigName, "OreDict", aOreDict);
- mBStat.put(StatType.ELECTRIC, aElectric);
- mOreDicts.put(aOreDict, this);
- for(ItemStack tStack : OreDictionary.getOres(aOreDict))if(tStack!=null)mStacks.put(tStack.getUnlocalizedName(), this);
- mStat.put(StatType.WEIGHT, (float) GregTech_API.sModularArmor.get( mConfigName, "Weight", aWeight));
+ try {
+ mConfigName = aName;
+ if(!GregTech_API.sModularArmor.get( mConfigName, "Enabled", true))return;
+ mOreDict = GregTech_API.sModularArmor.get( mConfigName, "OreDict", aOreDict);
+ mBStat.put(StatType.ELECTRIC, aElectric);
+ mOreDicts.put(aOreDict, this);
+ for(ItemStack tStack : OreDictionary.getOres(aOreDict))if(tStack!=null)mStacks.put(tStack.getUnlocalizedName(), this);
+ mStat.put(StatType.WEIGHT, (float) GregTech_API.sModularArmor.get( mConfigName, "Weight", aWeight));
+ }
+ catch (Throwable t){
+ GT_Log.out.println("Tried adding "+aName+" as a modular armour component, however it failed.");
+ }
}
-
+
public ArmorComponent(String aName, ItemStack aStack, boolean aElectric, float aWeight){
- mConfigName = aName;
- String tStackName = GregTech_API.sModularArmor.get( mConfigName, "Stack", GameRegistry.findUniqueIdentifierFor(aStack.getItem()).toString()+(aStack.getItemDamage()==0 ? "" : ":"+aStack.getItemDamage()));
- mStack = GameRegistry.findItemStack(tStackName.split(":")[0], tStackName.split(":")[1], 1);
- if(tStackName.split(":").length>2)mStack.setItemDamage(Integer.parseInt(tStackName.split(":")[2]));
- if(!GregTech_API.sModularArmor.get( mConfigName, "Enabled", true))return;
- mStack = aStack;
- mBStat.put(StatType.ELECTRIC, aElectric);
- mStacks.put(aStack.getUnlocalizedName(), this);
- mStat.put(StatType.WEIGHT, (float) GregTech_API.sModularArmor.get( mConfigName, "Weight", aWeight));
+ try {
+ mConfigName = aName;
+ String tStackName = GregTech_API.sModularArmor.get( mConfigName, "Stack", GameRegistry.findUniqueIdentifierFor(aStack.getItem()).toString()+(aStack.getItemDamage()==0 ? "" : ":"+aStack.getItemDamage()));
+ mStack = GameRegistry.findItemStack(tStackName.split(":")[0], tStackName.split(":")[1], 1);
+ if(tStackName.split(":").length>2)mStack.setItemDamage(Integer.parseInt(tStackName.split(":")[2]));
+ if(!GregTech_API.sModularArmor.get( mConfigName, "Enabled", true))return;
+ mStack = aStack;
+ mBStat.put(StatType.ELECTRIC, aElectric);
+ mStacks.put(aStack.getUnlocalizedName(), this);
+ mStat.put(StatType.WEIGHT, (float) GregTech_API.sModularArmor.get( mConfigName, "Weight", aWeight));
+ }
+ catch (Throwable t){
+ GT_Log.out.println("Tried adding "+aName+" as a modular armour component, however it failed.");
+ }
}
@Override
@@ -49,12 +60,12 @@ public abstract class ArmorComponent implements IArmorComponent {
if(GT_Utility.areStacksEqual(tStack, aStack, true))return true;}
return false;
}
-
+
public void addVal(StatType aType, ArmorData aArmorData){
float tArmorDef = 0.0f;
if(aArmorData.mStat.containsKey(aType)){
- tArmorDef = aArmorData.mStat.get(aType);
- aArmorData.mStat.remove(aType);}
+ tArmorDef = aArmorData.mStat.get(aType);
+ aArmorData.mStat.remove(aType);}
aArmorData.mStat.put(aType, tArmorDef + mStat.get(aType));
}
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java
index 90d882f048..f6a74020ae 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Plunger_Item.java
@@ -34,7 +34,7 @@ public class Behaviour_Plunger_Item
if ((aTileEntity instanceof IGregTechTileEntity)) {
IMetaTileEntity tMetaTileEntity = ((IGregTechTileEntity) aTileEntity).getMetaTileEntity();
if ((tMetaTileEntity instanceof IMetaTileEntityItemPipe)) {
- for (Object tTileEntity : GT_Utility.sortMapByValuesAcending(IMetaTileEntityItemPipe.Util.scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, new ConcurrentHashMap(), 0L, false, true)).keySet())
+ for (Object tTileEntity : GT_Utility.sortMapByValuesAcending(IMetaTileEntityItemPipe.Util.scanPipes((IMetaTileEntityItemPipe) tMetaTileEntity, new ConcurrentHashMap<IMetaTileEntityItemPipe,Long>(), 0L, false, true)).keySet())
{
int i = 0;
diff --git a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java
index 9d4e4a7627..7f53fd31f7 100644
--- a/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java
+++ b/src/main/java/gregtech/common/tileentities/automation/GT_MetaTileEntity_ItemDistributor.java
@@ -153,7 +153,7 @@ public class GT_MetaTileEntity_ItemDistributor extends GT_MetaTileEntity_Buffer
//Adjust items per side by 1 or -1, constrained to the cyclic interval [0, 127]
itemsPerSide[aSide] += aPlayer.isSneaking() ? -1 : 1;
itemsPerSide[aSide] = (byte) ((itemsPerSide[aSide] + 128) % 128);
- GT_Utility.sendChatToPlayer(aPlayer, trans("110", "Items per side: " + itemsPerSide[aSide]));
+ GT_Utility.sendChatToPlayer(aPlayer, trans("211", "Items per side: ") + itemsPerSide[aSide]);
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
index d0ba25a327..ab5f7bd625 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_AdvSeismicProspector.java
@@ -144,7 +144,7 @@ public class GT_MetaTileEntity_AdvSeismicProspector extends GT_MetaTileEntity_Ba
{
ChunkPosition tPos = new ChunkPosition(GT_Utility.getScaleCoordinates(x*16,96), 0, GT_Utility.getScaleCoordinates(z*16,96));
ChunkCoordIntPair cInts = getBaseMetaTileEntity().getWorld().getChunkFromChunkCoords(tPos.chunkPosX,tPos.chunkPosZ).getChunkCoordIntPair();
- FluidStack tFluid = GT_UndergroundOil.undergroundOil(getBaseMetaTileEntity().getWorld().getChunkFromChunkCoords(tPos.chunkPosX,tPos.chunkPosZ),-1);
+ FluidStack tFluid = GT_UndergroundOil.undergroundOilReadInformation(getBaseMetaTileEntity().getWorld().getChunkFromChunkCoords(tPos.chunkPosX,tPos.chunkPosZ));
if (tFluid != null)
if (tFluids.containsKey(cInts)) {
if (tFluids.get(cInts).amount<tFluid.amount)
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
index 0885628d45..78ac4f0312 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_MicrowaveEnergyTransmitter.java
@@ -138,7 +138,7 @@ public class GT_MetaTileEntity_MicrowaveEnergyTransmitter extends GT_MetaTileEnt
}
public boolean hasDimensionalTeleportCapability() {
- return (this.mDebug) || (this.hasEgg) || (mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000);
+ return (this.mDebug) || (this.hasEgg) || (mFluid != null && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 1000);
}
public boolean isDimensionalTeleportAvailable() {
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
index 71d42fa806..9ff143c92c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Miner.java
@@ -17,6 +17,7 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.util.FakePlayer;
import java.util.ArrayList;
@@ -140,7 +141,9 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine {
}
public boolean moveOneDown(IGregTechTileEntity aBaseMetaTileEntity) {
- if (aBaseMetaTileEntity.getYCoord() + drillY - 1 < 0 || aBaseMetaTileEntity.getBlockOffset(0, drillY - 1, 0) == Blocks.bedrock) {
+ if (aBaseMetaTileEntity.getYCoord() + drillY - 1 < 0
+ || GT_Utility.getBlockHardnessAt(aBaseMetaTileEntity.getWorld(), aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord() + drillY - 1, aBaseMetaTileEntity.getZCoord()) < 0
+ || !GT_Utility.setBlockByFakePlayer(getFakePlayer(aBaseMetaTileEntity), aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord() + drillY - 1, aBaseMetaTileEntity.getZCoord(), MINING_PIPE_TIP_BLOCK, 0, true)) {
isPickingPipes = true;
return false;
}
@@ -173,6 +176,7 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine {
}
public void mineBlock(IGregTechTileEntity aBaseMetaTileEntity, int x, int y, int z) {
+ if (!GT_Utility.eraseBlockByFakePlayer(getFakePlayer(aBaseMetaTileEntity), aBaseMetaTileEntity.getXCoord() + x, aBaseMetaTileEntity.getYCoord() + y, aBaseMetaTileEntity.getZCoord() + z, true));
ArrayList<ItemStack> drops = getBlockDrops(aBaseMetaTileEntity.getBlockOffset(x, y, z), aBaseMetaTileEntity.getXCoord() + x, aBaseMetaTileEntity.getYCoord() + y, aBaseMetaTileEntity.getZCoord() + z);
if (drops.size() > 0)
mOutputItems[0] = drops.get(0);
@@ -203,4 +207,14 @@ public class GT_MetaTileEntity_Miner extends GT_MetaTileEntity_BasicMachine {
drillY = aNBT.getInteger("drillY");
drillZ = aNBT.getInteger("drillZ");
}
+
+ private FakePlayer mFakePlayer = null;
+
+ protected FakePlayer getFakePlayer(IGregTechTileEntity aBaseTile) {
+ if (mFakePlayer == null) mFakePlayer = GT_Utility.getFakePlayer(aBaseTile);
+ mFakePlayer.setWorld(aBaseTile.getWorld());
+ mFakePlayer.setPosition(aBaseTile.getXCoord(), aBaseTile.getYCoord(), aBaseTile.getZCoord());
+ return mFakePlayer;
+ }
+
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
index c4fa8d7397..1c02526ab9 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
@@ -15,8 +15,10 @@ import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.ChunkPosition;
+import net.minecraftforge.common.util.FakePlayer;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidBlock;
@@ -26,6 +28,9 @@ import java.util.Iterator;
import static gregtech.api.enums.GT_Values.V;
public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
+ private static final ItemStack MINING_PIPE = GT_ModHandler.getIC2Item("miningPipe", 0);
+ private static final Block MINING_PIPE_BLOCK = GT_Utility.getBlockFromStack(MINING_PIPE);
+ private static final Block MINING_PIPE_TIP_BLOCK = GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 0));
public ArrayList<ChunkPosition> mPumpList = new ArrayList<ChunkPosition>();
public int mPumpTimer = 0;
@@ -171,22 +176,21 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
private boolean moveOneDown() {
if ((this.mInventory[0] == null) || (this.mInventory[0].stackSize < 1)
- || (!GT_Utility.areStacksEqual(this.mInventory[0], GT_ModHandler.getIC2Item("miningPipe", 1L)))) {
+ || (!GT_Utility.areStacksEqual(this.mInventory[0], MINING_PIPE))) {
return false;
}
int yHead = getYOfPumpHead();
if (yHead <= 0) {
return false;
}
- if ((!consumeFluid(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord())) && (!getBaseMetaTileEntity().getAir(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord()))) {
-
+ if ((!consumeFluid(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord())) && (!getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord()).isAir(getBaseMetaTileEntity().getWorld(), getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord()))) {
return false;
}
- if (!(getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord(), GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))))) {
+ if (!GT_Utility.setBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), getBaseMetaTileEntity().getXCoord(), yHead - 1, getBaseMetaTileEntity().getZCoord(), MINING_PIPE_TIP_BLOCK, 0, false)) {
return false;
}
if (yHead != getBaseMetaTileEntity().getYCoord()) {
- getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord(), yHead, getBaseMetaTileEntity().getZCoord(), GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L)));
+ getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord(), yHead, getBaseMetaTileEntity().getZCoord(), MINING_PIPE_BLOCK);
}
getBaseMetaTileEntity().decrStackSize(0, 1);
return true;
@@ -194,19 +198,16 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
private int getYOfPumpHead() {
int y = getBaseMetaTileEntity().getYCoord() - 1;
- while (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord()) == GT_Utility
- .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
+ while (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord()) == MINING_PIPE_BLOCK) {
y--;
}
if (y == getBaseMetaTileEntity().getYCoord() - 1) {
- if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord()) != GT_Utility
- .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))) {
+ if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord()) != MINING_PIPE_TIP_BLOCK) {
return y + 1;
}
- } else if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord()) != GT_Utility
- .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)) && this.mInventory[0] != null && this.mInventory[0].stackSize > 0 && GT_Utility.areStacksEqual(this.mInventory[0], GT_ModHandler.getIC2Item("miningPipe", 1L))) {
- getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord(),
- GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)));
+ } else if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord()) != MINING_PIPE_TIP_BLOCK
+ && this.mInventory[0] != null && this.mInventory[0].stackSize > 0 && GT_Utility.areStacksEqual(this.mInventory[0], MINING_PIPE)) {
+ getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord(), y, getBaseMetaTileEntity().getZCoord(), MINING_PIPE_BLOCK);
getBaseMetaTileEntity().decrStackSize(0, 1);
}
return y;
@@ -281,6 +282,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
}
private boolean consumeFluid(int aX, int aY, int aZ) {
+ if (!GT_Utility.eraseBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), aX, aY, aZ, true)) return false;
Block aBlock = getBaseMetaTileEntity().getBlock(aX, aY, aZ);
int aMeta = getBaseMetaTileEntity().getMetaID(aX, aY, aZ);
if ((GT_Utility.isBlockValid(aBlock)) && ((this.mPumpedBlock1 == aBlock) || (this.mPumpedBlock2 == aBlock))) {
@@ -447,4 +449,13 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP),
new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP), new GT_RenderedTexture(Textures.BlockIcons.OVERLAY_ADV_PUMP),};
}
+
+ private FakePlayer mFakePlayer = null;
+
+ protected FakePlayer getFakePlayer(IGregTechTileEntity aBaseTile) {
+ if (mFakePlayer == null) mFakePlayer = GT_Utility.getFakePlayer(aBaseTile);
+ mFakePlayer.setWorld(aBaseTile.getWorld());
+ mFakePlayer.setPosition(aBaseTile.getXCoord(), aBaseTile.getYCoord(), aBaseTile.getZCoord());
+ return mFakePlayer;
+ }
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
index 85defad0cb..946a03a49e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_SeismicProspector.java
@@ -103,7 +103,7 @@ public class GT_MetaTileEntity_SeismicProspector extends GT_MetaTileEntity_Basic
}
}
if(tStringList.size()<1){tStringList.add("No Ores found.");}
- FluidStack tFluid = GT_UndergroundOil.undergroundOil(getBaseMetaTileEntity(),-1);
+ FluidStack tFluid = GT_UndergroundOil.undergroundOilReadInformation(getBaseMetaTileEntity());
String[] tStringArray = new String[tStringList.size()];
{
for (int i = 0; i < tStringArray.length; i++) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
index a7312d5a6e..399e798cd0 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Teleporter.java
@@ -232,7 +232,7 @@ public class GT_MetaTileEntity_Teleporter extends GT_MetaTileEntity_BasicTank {
}
public boolean hasDimensionalTeleportCapability() {
- return (this.mDebug) || (this.hasEgg) || (mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 10);
+ return (this.mDebug) || (this.hasEgg) || (mFluid != null && mFluid.isFluidEqual(Materials.Nitrogen.getPlasma(1)) && mFluid.amount >= 10);
}
public boolean isDimensionalTeleportAvailable() {
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
index a5b938a30a..5718e99f0c 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AssemblyLine.java
@@ -1,377 +1,377 @@
-package gregtech.common.tileentities.machines.multi;
-
-import java.util.ArrayList;
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_GUIContainer_MultiMachine;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
-
-public class GT_MetaTileEntity_AssemblyLine
- extends GT_MetaTileEntity_MultiBlockBase {
-
- public ArrayList<GT_MetaTileEntity_Hatch_DataAccess> mDataAccessHatches = new ArrayList<GT_MetaTileEntity_Hatch_DataAccess>();
-
- public GT_MetaTileEntity_AssemblyLine(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- public GT_MetaTileEntity_AssemblyLine(String aName) {
- super(aName);
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_AssemblyLine(this.mName);
- }
-
- public String[] getDescription() {
- return new String[]{"Assembly Line",
- "Size: 3x(5-16)x4, variable length",
- "Bottom: Steel Machine Casing(or Maintenance or Input Hatch),",
- "Input Bus (Last Output Bus), Steel Machine Casing",
- "Middle: Reinforced Glass, Assembly Line, Reinforced Glass",
- "UpMiddle: Grate Machine Casing,",
- " Assembler Machine Casing,",
- " Grate Machine Casing (or Controller or Data Access Hatch)",
- "Top: Steel Casing(or Energy Hatch)",
- "Up to 16 repeating slices, last is Output Bus",
- "Optional 1x Data Access Hatch next to the Controller"};
- }
-
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE)};
- }
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16]};
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "AssemblyLine.png");
- }
-
- public GT_Recipe.GT_Recipe_Map getRecipeMap() {
- return null;
- }
-
- public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
- }
-
- public boolean isFacingValid(byte aFacing) {
- return aFacing > 1;
- }
-
- public boolean checkRecipe(ItemStack aStack) {
- if(GT_Values.D1)System.out.println("Start ALine recipe check");
- ArrayList<ItemStack> tDataStickList = getDataItems(2);
- if (tDataStickList.size() == 0) return false;
- if(GT_Values.D1)System.out.println("Stick accepted, " + tDataStickList.size() + " Data Sticks found");
-
- ItemStack tStack[] = new ItemStack[15];
- FluidStack[] tFluids = new FluidStack[4];
- boolean recipeNA = false;
- boolean findRecipe = false;
- for (ItemStack tDataStick : tDataStickList){
- recipeNA = false;
- NBTTagCompound tTag = tDataStick.getTagCompound();
- if (tTag == null) continue;
- for (int i = 0; i < 15; i++) {
- if (!tTag.hasKey("" + i)) continue;
- if (mInputBusses.get(i) == null) {
- recipeNA = true;
- break;
- }
- tStack[i] = GT_Utility.loadItem(tTag, "" + i);
- if (tStack[i] == null) continue;
- if(GT_Values.D1)System.out.println("Item "+i+" : "+tStack[i].getUnlocalizedName());
- ItemStack stackInSlot = mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0);
- if (!GT_Utility.areStacksEqual(tStack[i], stackInSlot, true) || tStack[i].stackSize > stackInSlot.stackSize) {
- if(GT_Values.D1)System.out.println(i +" not accepted");
- recipeNA = true;
- break;
- }
- if(GT_Values.D1)System.out.println(i+" accepted");
- }
- if (recipeNA) continue;
-
- if(GT_Values.D1)System.out.println("All Items done, start fluid check");
- for (int i = 0; i < 4; i++) {
- if (!tTag.hasKey("f" + i)) continue;
- tFluids[i] = GT_Utility.loadFluid(tTag, "f" + i);
- if (tFluids[i] == null) continue;
- if(GT_Values.D1)System.out.println("Fluid "+i+" "+tFluids[i].getUnlocalizedName());
- if (mInputHatches.get(i) == null) {
- recipeNA = true;
- break;
- }
- FluidStack fluidInHatch = mInputHatches.get(i).mFluid;
- if (fluidInHatch == null || !GT_Utility.areFluidsEqual(fluidInHatch, tFluids[i], true) || fluidInHatch.amount < tFluids[i].amount) {
- if(GT_Values.D1)System.out.println(i+" not accepted");
- recipeNA = true;
- break;
- }
- if(GT_Values.D1)System.out.println(i+" accepted");
- }
- if (recipeNA) continue;
-
- if(GT_Values.D1)System.out.println("Input accepted, check other values");
- if (!tTag.hasKey("output")) continue;
- mOutputItems = new ItemStack[]{GT_Utility.loadItem(tTag, "output")};
- if (mOutputItems[0] == null || !GT_Utility.isStackValid(mOutputItems[0]))
- continue;
-
- if (!tTag.hasKey("time")) continue;
- mMaxProgresstime = tTag.getInteger("time");
- if (mMaxProgresstime <= 0) continue;
-
- if (!tTag.hasKey("eu")) continue;
- mEUt = tTag.getInteger("eu");
-
- if(GT_Values.D1)System.out.println("Find avaiable recipe");
- findRecipe = true;
- break;
- }
- if (!findRecipe) return false;
-
- if(GT_Values.D1)System.out.println("All checked start consuming inputs");
- for (int i = 0; i < 15; i++) {
- if (tStack[i] == null) continue;
- ItemStack stackInSlot = mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0);
- stackInSlot.stackSize -= tStack[i].stackSize;
- }
-
- for (int i = 0; i < 4; i++) {
- if (tFluids[i] == null) continue;
- mInputHatches.get(i).mFluid.amount -= tFluids[i].amount;
- if (mInputHatches.get(i).mFluid.amount <= 0) {
- mInputHatches.get(i).mFluid = null;
- }
- }
- if(GT_Values.D1)System.out.println("Check overclock");
-
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(getMaxInputVoltage()));
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- if (mEUt <= 16) {
- this.mEUt = (mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (mMaxProgresstime / (1 << tTier - 1));
- } else {
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
- if (this.mEUt > 0) {
- this.mEUt = -this.mEUt;
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- updateSlots();
- if(GT_Values.D1)System.out.println("Recipe sucessfull");
- return true;
- }
-
- public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
- super.startSoundLoop(aIndex, aX, aY, aZ);
- if (aIndex == 20) {
- GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(212), 10, 1.0F, aX, aY, aZ);
- }
- }
-
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
- if (xDir != 0) {
- for (int r = 0; r <= 16; r++) {
- int i = r * xDir;
-
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(0, 0, i);
- if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(0, 0, i) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(0, 0, i) == 10)) {
- if(r == 1 && !addDataAccessToMachineList(tTileEntity, 16)){
- return false;
- }
- }
- if (!aBaseMetaTileEntity.getBlockOffset(0, -1, i).getUnlocalizedName().equals("blockAlloyGlass")) {
- return false;
- }
- tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(0, -2, i);
- if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
- if (aBaseMetaTileEntity.getBlockOffset(0, -2, i) != GregTech_API.sBlockCasings2) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(0, -2, i) != 0) {
- return false;
- }
- }
-
- tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 1, i);
- if (!addEnergyInputToMachineList(tTileEntity, 16)) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir, 1, i) != GregTech_API.sBlockCasings2) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir, 1, i) != 0) {
- return false;
- }
- }
- if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(xDir, 0, i) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(xDir, 0, i) == 9)) {
- return false;
- }
- if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(xDir, -1, i) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(xDir, -1, i) == 5)) {
- return false;
- }
-
-
- if (!(aBaseMetaTileEntity.getBlockOffset(xDir * 2, 0, i) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(xDir * 2, 0, i) == 10)) {
- return false;
- }
- if (!aBaseMetaTileEntity.getBlockOffset(xDir * 2, -1, i).getUnlocalizedName().equals("blockAlloyGlass")) {
- return false;
- }
- tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir * 2, -2, i);
- if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir * 2, -2, i) != GregTech_API.sBlockCasings2) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir * 2, -2, i) != 0) {
- return false;
- }
- }
- tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, -2, i);
- if (!addInputToMachineList(tTileEntity, 16) && addOutputToMachineList(tTileEntity, 16)) {
- return r > 0 && mEnergyHatches.size() > 0;
- }
- }
- } else {
- for (int r = 0; r <= 16; r++) {
- int i = r * -zDir;
-
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, 0, 0);
- if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, 0, 0) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0) == 10)) {
- if(r == 1 && !addDataAccessToMachineList(tTileEntity, 16)){
- return false;
- }
- }
- if (!aBaseMetaTileEntity.getBlockOffset(i, -1, 0).getUnlocalizedName().equals("blockAlloyGlass")) {
- return false;
- }
- tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, 0);
- if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
- if (aBaseMetaTileEntity.getBlockOffset(i, -2, 0) != GregTech_API.sBlockCasings2) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(i, -2, 0) != 0) {
- return false;
- }
- }
-
- tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, 1, zDir);
- if (!addEnergyInputToMachineList(tTileEntity, 16)) {
- if (aBaseMetaTileEntity.getBlockOffset(i, 1, zDir) != GregTech_API.sBlockCasings2) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(i, 1, zDir) != 0) {
- return false;
- }
- }
- if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, 0, zDir) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir) == 9)) {
- return false;
- }
- if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, -1, zDir) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(i, -1, zDir) == 5)) {
- return false;
- }
-
-
- if (!(aBaseMetaTileEntity.getBlockOffset(i, 0, zDir * 2) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir * 2) == 10)) {
- return false;
- }
- if (!aBaseMetaTileEntity.getBlockOffset(i, -1, zDir * 2).getUnlocalizedName().equals("blockAlloyGlass")) {
- return false;
- }
- tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir * 2);
- if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
- if (aBaseMetaTileEntity.getBlockOffset(i, -2, zDir * 2) != GregTech_API.sBlockCasings2) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(i, -2, zDir * 2) != 0) {
- return false;
- }
- }
- tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir);
- if (!addInputToMachineList(tTileEntity, 16) && addOutputToMachineList(tTileEntity, 16)) {
- return r > 0 && mEnergyHatches.size() > 0;
- }
- }
- }
- return false;
- }
-
- /**
- * @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
- */
- private boolean isCorrectDataItem(ItemStack aStack, int state){
- if ((state & 1) != 0 && ItemList.Circuit_Integrated.isStackEqual(aStack, false, true)) return true;
- if ((state & 2) != 0 && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) return true;
- if ((state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) return true;
- return false;
- }
-
- /**
- * @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
- */
- public ArrayList<ItemStack> getDataItems(int state) {
- ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
- if (GT_Utility.isStackValid(mInventory[1]) && isCorrectDataItem(mInventory[1], state)) {
- rList.add(mInventory[1]);
- }
- for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) {
- if (isValidMetaTileEntity(tHatch)) {
- for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
- if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null
- && isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state))
- rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
- }
- }
- }
- return rList;
- }
-
- public boolean addDataAccessToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) return false;
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) return false;
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DataAccess) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return mDataAccessHatches.add((GT_MetaTileEntity_Hatch_DataAccess) aMetaTileEntity);
- }
- return false;
- }
-
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
- }
-
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- public int getDamageToComponent(ItemStack aStack) {
- return 0;
- }
-
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
- }
-}
+package gregtech.common.tileentities.machines.multi;
+
+import java.util.ArrayList;
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Textures;
+import gregtech.api.gui.GT_GUIContainer_MultiMachine;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GT_MetaTileEntity_AssemblyLine
+ extends GT_MetaTileEntity_MultiBlockBase {
+
+ public ArrayList<GT_MetaTileEntity_Hatch_DataAccess> mDataAccessHatches = new ArrayList<GT_MetaTileEntity_Hatch_DataAccess>();
+
+ public GT_MetaTileEntity_AssemblyLine(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_AssemblyLine(String aName) {
+ super(aName);
+ }
+
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_AssemblyLine(this.mName);
+ }
+
+ public String[] getDescription() {
+ return new String[]{"Assembly Line",
+ "Size: 3x(5-16)x4, variable length",
+ "Bottom: Steel Machine Casing(or Maintenance or Input Hatch),",
+ "Input Bus (Last Output Bus), Steel Machine Casing",
+ "Middle: Reinforced Glass, Assembly Line, Reinforced Glass",
+ "UpMiddle: Grate Machine Casing,",
+ " Assembler Machine Casing,",
+ " Grate Machine Casing (or Controller or Data Access Hatch)",
+ "Top: Steel Casing(or Energy Hatch)",
+ "Up to 16 repeating slices, last is Output Bus",
+ "Optional 1x Data Access Hatch next to the Controller"};
+ }
+
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ASSEMBLY_LINE)};
+ }
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16]};
+ }
+
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "AssemblyLine.png");
+ }
+
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return null;
+ }
+
+ public boolean isCorrectMachinePart(ItemStack aStack) {
+ return true;
+ }
+
+ public boolean isFacingValid(byte aFacing) {
+ return aFacing > 1;
+ }
+
+ public boolean checkRecipe(ItemStack aStack) {
+ if(GT_Values.D1)System.out.println("Start ALine recipe check");
+ ArrayList<ItemStack> tDataStickList = getDataItems(2);
+ if (tDataStickList.size() == 0) return false;
+ if(GT_Values.D1)System.out.println("Stick accepted, " + tDataStickList.size() + " Data Sticks found");
+
+ ItemStack tStack[] = new ItemStack[15];
+ FluidStack[] tFluids = new FluidStack[4];
+ boolean recipeNA = false;
+ boolean findRecipe = false;
+ for (ItemStack tDataStick : tDataStickList){
+ recipeNA = false;
+ NBTTagCompound tTag = tDataStick.getTagCompound();
+ if (tTag == null) continue;
+ for (int i = 0; i < 15; i++) {
+ if (!tTag.hasKey("" + i)) continue;
+ if (mInputBusses.get(i) == null) {
+ recipeNA = true;
+ break;
+ }
+ tStack[i] = GT_Utility.loadItem(tTag, "" + i);
+ if (tStack[i] == null) continue;
+ if(GT_Values.D1)System.out.println("Item "+i+" : "+tStack[i].getUnlocalizedName());
+ ItemStack stackInSlot = mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0);
+ if (!GT_Utility.areStacksEqual(tStack[i], stackInSlot, true) || tStack[i].stackSize > stackInSlot.stackSize) {
+ if(GT_Values.D1)System.out.println(i +" not accepted");
+ recipeNA = true;
+ break;
+ }
+ if(GT_Values.D1)System.out.println(i+" accepted");
+ }
+ if (recipeNA) continue;
+
+ if(GT_Values.D1)System.out.println("All Items done, start fluid check");
+ for (int i = 0; i < 4; i++) {
+ if (!tTag.hasKey("f" + i)) continue;
+ tFluids[i] = GT_Utility.loadFluid(tTag, "f" + i);
+ if (tFluids[i] == null) continue;
+ if(GT_Values.D1)System.out.println("Fluid "+i+" "+tFluids[i].getUnlocalizedName());
+ if (mInputHatches.get(i) == null) {
+ recipeNA = true;
+ break;
+ }
+ FluidStack fluidInHatch = mInputHatches.get(i).mFluid;
+ if (fluidInHatch == null || !GT_Utility.areFluidsEqual(fluidInHatch, tFluids[i], true) || fluidInHatch.amount < tFluids[i].amount) {
+ if(GT_Values.D1)System.out.println(i+" not accepted");
+ recipeNA = true;
+ break;
+ }
+ if(GT_Values.D1)System.out.println(i+" accepted");
+ }
+ if (recipeNA) continue;
+
+ if(GT_Values.D1)System.out.println("Input accepted, check other values");
+ if (!tTag.hasKey("output")) continue;
+ mOutputItems = new ItemStack[]{GT_Utility.loadItem(tTag, "output")};
+ if (mOutputItems[0] == null || !GT_Utility.isStackValid(mOutputItems[0]))
+ continue;
+
+ if (!tTag.hasKey("time")) continue;
+ mMaxProgresstime = tTag.getInteger("time");
+ if (mMaxProgresstime <= 0) continue;
+
+ if (!tTag.hasKey("eu")) continue;
+ mEUt = tTag.getInteger("eu");
+
+ if(GT_Values.D1)System.out.println("Find avaiable recipe");
+ findRecipe = true;
+ break;
+ }
+ if (!findRecipe) return false;
+
+ if(GT_Values.D1)System.out.println("All checked start consuming inputs");
+ for (int i = 0; i < 15; i++) {
+ if (tStack[i] == null) continue;
+ ItemStack stackInSlot = mInputBusses.get(i).getBaseMetaTileEntity().getStackInSlot(0);
+ stackInSlot.stackSize -= tStack[i].stackSize;
+ }
+
+ for (int i = 0; i < 4; i++) {
+ if (tFluids[i] == null) continue;
+ mInputHatches.get(i).mFluid.amount -= tFluids[i].amount;
+ if (mInputHatches.get(i).mFluid.amount <= 0) {
+ mInputHatches.get(i).mFluid = null;
+ }
+ }
+ if(GT_Values.D1)System.out.println("Check overclock");
+
+ byte tTier = (byte) Math.max(1, GT_Utility.getTier(getMaxInputVoltage()));
+ this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiencyIncrease = 10000;
+ if (mEUt <= 16) {
+ this.mEUt = (mEUt * (1 << tTier - 1) * (1 << tTier - 1));
+ this.mMaxProgresstime = (mMaxProgresstime / (1 << tTier - 1));
+ } else {
+ while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
+ this.mEUt *= 4;
+ this.mMaxProgresstime /= 2;
+ }
+ }
+ if (this.mEUt > 0) {
+ this.mEUt = -this.mEUt;
+ }
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ updateSlots();
+ if(GT_Values.D1)System.out.println("Recipe sucessfull");
+ return true;
+ }
+
+ public void startSoundLoop(byte aIndex, double aX, double aY, double aZ) {
+ super.startSoundLoop(aIndex, aX, aY, aZ);
+ if (aIndex == 20) {
+ GT_Utility.doSoundAtClient(GregTech_API.sSoundList.get(212), 10, 1.0F, aX, aY, aZ);
+ }
+ }
+
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+ if (xDir != 0) {
+ for (int r = 0; r <= 16; r++) {
+ int i = r * xDir;
+
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(0, 0, i);
+ if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(0, 0, i) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(0, 0, i) == 10)) {
+ if(r == 1 && !addDataAccessToMachineList(tTileEntity, 16)){
+ return false;
+ }
+ }
+ if (!aBaseMetaTileEntity.getBlockOffset(0, -1, i).getUnlocalizedName().equals("blockAlloyGlass")) {
+ return false;
+ }
+ tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(0, -2, i);
+ if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
+ if (aBaseMetaTileEntity.getBlockOffset(0, -2, i) != GregTech_API.sBlockCasings2) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(0, -2, i) != 0) {
+ return false;
+ }
+ }
+
+ tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, 1, i);
+ if (!addEnergyInputToMachineList(tTileEntity, 16)) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir, 1, i) != GregTech_API.sBlockCasings2) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir, 1, i) != 0) {
+ return false;
+ }
+ }
+ if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(xDir, 0, i) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(xDir, 0, i) == 9)) {
+ return false;
+ }
+ if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(xDir, -1, i) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(xDir, -1, i) == 5)) {
+ return false;
+ }
+
+
+ if (!(aBaseMetaTileEntity.getBlockOffset(xDir * 2, 0, i) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(xDir * 2, 0, i) == 10)) {
+ return false;
+ }
+ if (!aBaseMetaTileEntity.getBlockOffset(xDir * 2, -1, i).getUnlocalizedName().equals("blockAlloyGlass")) {
+ return false;
+ }
+ tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir * 2, -2, i);
+ if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
+ if (aBaseMetaTileEntity.getBlockOffset(xDir * 2, -2, i) != GregTech_API.sBlockCasings2) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(xDir * 2, -2, i) != 0) {
+ return false;
+ }
+ }
+ tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir, -2, i);
+ if (!addInputToMachineList(tTileEntity, 16) && addOutputToMachineList(tTileEntity, 16)) {
+ return r > 0 && mEnergyHatches.size() > 0;
+ }
+ }
+ } else {
+ for (int r = 0; r <= 16; r++) {
+ int i = r * -zDir;
+
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, 0, 0);
+ if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, 0, 0) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, 0) == 10)) {
+ if(r == 1 && !addDataAccessToMachineList(tTileEntity, 16)){
+ return false;
+ }
+ }
+ if (!aBaseMetaTileEntity.getBlockOffset(i, -1, 0).getUnlocalizedName().equals("blockAlloyGlass")) {
+ return false;
+ }
+ tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, 0);
+ if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
+ if (aBaseMetaTileEntity.getBlockOffset(i, -2, 0) != GregTech_API.sBlockCasings2) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(i, -2, 0) != 0) {
+ return false;
+ }
+ }
+
+ tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, 1, zDir);
+ if (!addEnergyInputToMachineList(tTileEntity, 16)) {
+ if (aBaseMetaTileEntity.getBlockOffset(i, 1, zDir) != GregTech_API.sBlockCasings2) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(i, 1, zDir) != 0) {
+ return false;
+ }
+ }
+ if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, 0, zDir) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir) == 9)) {
+ return false;
+ }
+ if (i != 0 && !(aBaseMetaTileEntity.getBlockOffset(i, -1, zDir) == GregTech_API.sBlockCasings2 && aBaseMetaTileEntity.getMetaIDOffset(i, -1, zDir) == 5)) {
+ return false;
+ }
+
+
+ if (!(aBaseMetaTileEntity.getBlockOffset(i, 0, zDir * 2) == GregTech_API.sBlockCasings3 && aBaseMetaTileEntity.getMetaIDOffset(i, 0, zDir * 2) == 10)) {
+ return false;
+ }
+ if (!aBaseMetaTileEntity.getBlockOffset(i, -1, zDir * 2).getUnlocalizedName().equals("blockAlloyGlass")) {
+ return false;
+ }
+ tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir * 2);
+ if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16))) {
+ if (aBaseMetaTileEntity.getBlockOffset(i, -2, zDir * 2) != GregTech_API.sBlockCasings2) {
+ return false;
+ }
+ if (aBaseMetaTileEntity.getMetaIDOffset(i, -2, zDir * 2) != 0) {
+ return false;
+ }
+ }
+ tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(i, -2, zDir);
+ if (!addInputToMachineList(tTileEntity, 16) && addOutputToMachineList(tTileEntity, 16)) {
+ return r > 0 && mEnergyHatches.size() > 0;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
+ */
+ private boolean isCorrectDataItem(ItemStack aStack, int state){
+ if ((state & 1) != 0 && ItemList.Circuit_Integrated.isStackEqual(aStack, true, true)) return true;
+ if ((state & 2) != 0 && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) return true;
+ if ((state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) return true;
+ return false;
+ }
+
+ /**
+ * @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
+ */
+ public ArrayList<ItemStack> getDataItems(int state) {
+ ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
+ if (GT_Utility.isStackValid(mInventory[1]) && isCorrectDataItem(mInventory[1], state)) {
+ rList.add(mInventory[1]);
+ }
+ for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) {
+ if (isValidMetaTileEntity(tHatch)) {
+ for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
+ if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null
+ && isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state))
+ rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
+ }
+ }
+ }
+ return rList;
+ }
+
+ public boolean addDataAccessToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) return false;
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) return false;
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DataAccess) {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
+ return mDataAccessHatches.add((GT_MetaTileEntity_Hatch_DataAccess) aMetaTileEntity);
+ }
+ return false;
+ }
+
+ public int getMaxEfficiency(ItemStack aStack) {
+ return 10000;
+ }
+
+ public int getPollutionPerTick(ItemStack aStack) {
+ return 0;
+ }
+
+ public int getDamageToComponent(ItemStack aStack) {
+ return 0;
+ }
+
+ public boolean explodesOnComponentBreak(ItemStack aStack) {
+ return false;
+ }
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
index d68383272c..0949e65d07 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_Cleanroom.java
@@ -37,7 +37,7 @@ public class GT_MetaTileEntity_Cleanroom extends GT_MetaTileEntity_MultiBlockBas
"Controller (Top center)",
"Top besides contoller and edges Filter Machine Casings",
"1 Reinforced Door (keep closed for 100% efficency",
- "1x MV+ Energy Hatch, 1x Maintainance Hatch",
+ "1x LV+ Energy Hatch(40EU/t startup, 4EU/t keepup), 1x Maintainance Hatch",
"Up to 10 Machine Hulls to transfer Items & Energy through walls",
"Remaining Blocks Plascrete"};
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller1.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller1.java
new file mode 100644
index 0000000000..a509d35ad3
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller1.java
@@ -0,0 +1,51 @@
+package gregtech.common.tileentities.machines.multi;
+
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+
+public class GT_MetaTileEntity_ConcreteBackfiller1 extends GT_MetaTileEntity_ConcreteBackfillerBase {
+ public GT_MetaTileEntity_ConcreteBackfiller1(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_ConcreteBackfiller1(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public String[] getDescription() {
+ return getDescriptionInternal("");
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_ConcreteBackfiller1(mName);
+ }
+
+ @Override
+ protected ItemList getCasingBlockItem() {
+ return ItemList.Casing_SolidSteel;
+ }
+
+ @Override
+ protected Materials getFrameMaterial() {
+ return Materials.Steel;
+ }
+
+ @Override
+ protected int getCasingTextureIndex() {
+ return 16;
+ }
+
+ @Override
+ protected int getRadius() {
+ return 16;
+ }
+
+ @Override
+ protected int getMinTier() {
+ return 2;
+ }
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller2.java
new file mode 100644
index 0000000000..46b9a4dbc3
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfiller2.java
@@ -0,0 +1,66 @@
+package gregtech.common.tileentities.machines.multi;
+
+import static gregtech.api.enums.GT_Values.VN;
+
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+
+public class GT_MetaTileEntity_ConcreteBackfiller2 extends GT_MetaTileEntity_ConcreteBackfillerBase {
+ public GT_MetaTileEntity_ConcreteBackfiller2(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_ConcreteBackfiller2(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public String[] getDescription() {
+ String casings = getCasingBlockItem().get(0).getDisplayName();
+ return new String[]{
+ "Controller Block for the Advanced Concrete Backfiller",
+ "Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)",
+ "3x1x3 Base of " + casings,
+ "1x3x1 " + casings + " pillar (Center of base)",
+ "1x3x1 " + getFrameMaterial().mName + " Frame Boxes (Each pillar side and on top)",
+ "1x Input Hatch (One of base casings)",
+ "1x Maintenance Hatch (One of base casings)",
+ "1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)",
+ "Put Programmed Circuits into Data Access to config radius",
+ "Radius = (total config value)x2 blocks",
+ "Default 64, Maximum 128",};
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_ConcreteBackfiller2(mName);
+ }
+
+ @Override
+ protected ItemList getCasingBlockItem() {
+ return ItemList.Casing_StableTitanium;
+ }
+
+ @Override
+ protected Materials getFrameMaterial() {
+ return Materials.Titanium;
+ }
+
+ @Override
+ protected int getCasingTextureIndex() {
+ return 50;
+ }
+
+ @Override
+ protected int getRadius() {
+ int tConfig = getTotalConfigValue() * 2;
+ return tConfig >= 128 ? 128 : tConfig <= 0 ? 64 : tConfig;
+ }
+
+ @Override
+ protected int getMinTier() {
+ return 4;
+ }
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java
new file mode 100644
index 0000000000..7379564745
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ConcreteBackfillerBase.java
@@ -0,0 +1,114 @@
+package gregtech.common.tileentities.machines.multi;
+
+import static gregtech.api.enums.GT_Values.VN;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.Materials;
+import gregtech.api.gui.GT_GUIContainer_MultiMachine;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+
+public abstract class GT_MetaTileEntity_ConcreteBackfillerBase extends GT_MetaTileEntity_DrillerBase {
+
+ private int mLastXOff = 0, mLastZOff = 0;
+
+ public GT_MetaTileEntity_ConcreteBackfillerBase(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_ConcreteBackfillerBase(String aName) {
+ super(aName);
+ }
+
+ protected String[] getDescriptionInternal(String tierSuffix) {
+ String casings = getCasingBlockItem().get(0).getDisplayName();
+ return new String[]{
+ "Controller Block for the Concrete Backfiller " + (tierSuffix != null ? tierSuffix : ""),
+ "Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)",
+ "3x1x3 Base of " + casings,
+ "1x3x1 " + casings + " pillar (Center of base)",
+ "1x3x1 " + getFrameMaterial().mName + " Frame Boxes (Each pillar side and on top)",
+ "1x Input Hatch (One of base casings)",
+ "1x Maintenance Hatch (One of base casings)",
+ "1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)",
+ "Radius is " + getRadius() + " blocks"};
+ }
+
+ @Override
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DrillingRig.png");
+ }
+
+ protected abstract int getRadius();
+
+ @Override
+ protected boolean checkHatches() {
+ return !mMaintenanceHatches.isEmpty() && !mInputHatches.isEmpty() && !mEnergyHatches.isEmpty();
+ }
+
+ @Override
+ protected void setElectricityStats() {
+ this.mEfficiency = getCurrentEfficiency(null);
+ this.mEfficiencyIncrease = 10000;
+ int tier = Math.max(1, GT_Utility.getTier(getMaxInputVoltage()));
+ this.mEUt = -6 * (1 << (tier << 1));
+ this.mMaxProgresstime = (workState == STATE_UPWARD ? 240 : 80) / (1 << tier);
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ }
+
+ @Override
+ protected boolean workingUpward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) {
+ if (isRefillableBlock(xPipe, yHead - 1, zPipe))
+ return tryRefillBlock(xPipe, yHead - 1, zPipe);
+ int radius = getRadius();
+ if (mLastXOff == 0 && mLastZOff == 0) {
+ mLastXOff = - radius;
+ mLastZOff = - radius;
+ }
+ if (yHead != yDrill) {
+ for (int i = mLastXOff; i <= radius; i++) {
+ for (int j = (i == mLastXOff ? mLastZOff : - radius); j <= radius; j++) {
+ if (isRefillableBlock(xPipe + i, yHead, zPipe + j)){
+ mLastXOff = i;
+ mLastZOff = j;
+ return tryRefillBlock(xPipe + i, yHead, zPipe + j);
+ }
+ }
+ }
+ }
+
+ if (tryPickPipe()) {
+ mLastXOff = 0;
+ mLastZOff = 0;
+ return true;
+ } else {
+ workState = STATE_DOWNWARD;
+ stopMachine();
+ return false;
+ }
+ }
+
+ private boolean isRefillableBlock(int aX, int aY, int aZ){
+ IGregTechTileEntity aBaseTile = getBaseMetaTileEntity();
+ if (!aBaseTile.getBlock(aX, aY, aZ).isAir(aBaseTile.getWorld(), aX, aY, aZ) || aBaseTile.getBlock(aX, aY, aZ).getMaterial().isSolid()) return false;
+ if (!GT_Utility.setBlockByFakePlayer(getFakePlayer(aBaseTile), aX, aY, aZ, GregTech_API.sBlockConcretes, 8, true)) return false;
+ return true;
+ }
+
+ private boolean tryRefillBlock(int aX, int aY, int aZ) {
+ if (!tryConsumeFluid()) return false;
+ getBaseMetaTileEntity().getWorld().setBlock(aX, aY, aZ, GregTech_API.sBlockConcretes, 8, 3);
+ return true;
+ }
+
+ private boolean tryConsumeFluid() {
+ if (!depleteInput(Materials.Concrete.getMolten(144L))){
+ mMaxProgresstime = 0;
+ return false;
+ }
+ return true;
+ }
+
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
new file mode 100644
index 0000000000..b98d99360c
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_DrillerBase.java
@@ -0,0 +1,398 @@
+package gregtech.common.tileentities.machines.multi;
+
+import static gregtech.api.enums.GT_Values.W;
+
+import java.util.ArrayList;
+
+import gregtech.api.GregTech_API;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.Textures;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_DataAccess;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.init.Blocks;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.FakePlayer;
+import net.minecraftforge.common.util.ForgeDirection;
+
+public abstract class GT_MetaTileEntity_DrillerBase extends GT_MetaTileEntity_MultiBlockBase {
+ private static final ItemStack miningPipe = GT_ModHandler.getIC2Item("miningPipe", 0);
+ private static final ItemStack miningPipeTip = GT_ModHandler.getIC2Item("miningPipeTip", 0);
+ private static final Block miningPipeBlock = GT_Utility.getBlockFromStack(miningPipe);
+ private static final Block miningPipeTipBlock = GT_Utility.getBlockFromStack(miningPipeTip);
+
+ private Block casingBlock;
+ private int casingMeta;
+ private int frameMeta;
+ private int casingTextureIndex;
+
+ private ForgeDirection back;
+
+ private int xDrill, yDrill, zDrill, xPipe, zPipe, yHead;
+ protected int workState;
+ protected static final int STATE_DOWNWARD = 0, STATE_AT_BOTTOM = 1, STATE_UPWARD = 2;
+
+ public GT_MetaTileEntity_DrillerBase(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ initFields();
+ }
+
+ public GT_MetaTileEntity_DrillerBase(String aName) {
+ super(aName);
+ initFields();
+ }
+
+ private void initFields() {
+ casingBlock = getCasingBlockItem().getBlock();
+ casingMeta = getCasingBlockItem().get(0).getItemDamage();
+ int frameId = 4096 + getFrameMaterial().mMetaItemSubID;
+ frameMeta = GregTech_API.METATILEENTITIES[frameId] != null ? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType() : W;
+ casingTextureIndex = getCasingTextureIndex();
+ workState = STATE_DOWNWARD;
+ }
+
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ if (aSide == aFacing)
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[casingTextureIndex],new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL)};
+ return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[casingTextureIndex]};
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ super.saveNBTData(aNBT);
+ aNBT.setInteger("workState", workState);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ workState = aNBT.getInteger("workState");
+ if (aNBT.hasKey("isPickingPipes")) workState = aNBT.getBoolean("isPickingPipes") ? STATE_UPWARD : STATE_DOWNWARD;
+ }
+
+ protected boolean tryPickPipe() {
+ if (yHead == yDrill) return false;
+ if (tryOutputPipe()){
+ if (checkBlockAndMeta(xPipe, yHead + 1, zPipe, miningPipeBlock, W))
+ getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead + 1, zPipe, miningPipeTipBlock);
+ getBaseMetaTileEntity().getWorld().setBlockToAir(xPipe, yHead, zPipe);
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * @return 0 for succeeded, 1 for invalid block, 2 for not having mining pipes, 3 for event canceled.
+ */
+ protected int tryLowerPipe() {
+ return tryLowerPipe(false);
+ }
+
+ /**
+ * @return 0 for succeeded, 1 for invalid block, 2 for not having mining pipes, 3 for event canceled.
+ */
+ protected int tryLowerPipe(boolean isSimulating) {
+ if (!isHasMiningPipes()) return 2;
+ switch (canLowerPipe()) {
+ case 1: return 1;
+ case 2: return 3;
+ }
+
+ if (!GT_Utility.setBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), xPipe, yHead - 1, zPipe, miningPipeTipBlock, 0, isSimulating)) return 3;
+ if (!isSimulating) {
+ if (yHead != yDrill) getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeBlock);
+ getBaseMetaTileEntity().decrStackSize(1, 1);
+ }
+
+ return 0;
+ }
+
+ private void putMiningPipesFromInputsInController() {
+ int maxPipes = miningPipe.getMaxStackSize();
+ if (isHasMiningPipes(maxPipes)) return;
+
+ ItemStack pipes = getStackInSlot(1);
+ for (ItemStack storedItem : getStoredInputs()) {
+ if (!storedItem.isItemEqual(miningPipe)) continue;
+
+ if (pipes == null) {
+ setInventorySlotContents(1, GT_Utility.copy(miningPipe));
+ pipes = getStackInSlot(1);
+ }
+
+ if (pipes.stackSize == maxPipes) break;
+
+ int needPipes = maxPipes - pipes.stackSize;
+ int transferPipes = storedItem.stackSize < needPipes ? storedItem.stackSize : needPipes;
+
+ pipes.stackSize += transferPipes;
+ storedItem.stackSize -= transferPipes;
+ }
+ updateSlots();
+ }
+
+ private boolean tryOutputPipe(){
+ if (!getBaseMetaTileEntity().addStackToSlot(1, GT_Utility.copyAmount(1, miningPipe)))
+ mOutputItems = new ItemStack[] {GT_Utility.copyAmount(1, miningPipe)};
+ return true;
+ }
+
+ /**
+ * @return 0 for available, 1 for invalid block, 2 for event canceled.
+ */
+ protected int canLowerPipe(){
+ IGregTechTileEntity aBaseTile = getBaseMetaTileEntity();
+ if (yHead > 0 && GT_Utility.getBlockHardnessAt(aBaseTile.getWorld(), xPipe, yHead - 1, zPipe) >= 0) {
+ return GT_Utility.eraseBlockByFakePlayer(getFakePlayer(aBaseTile), xPipe, yHead - 1, zPipe, true) ? 0 : 2;
+ }
+ return 1;
+ }
+
+ protected boolean reachingVoidOrBedrock() {
+ return yHead <= 0 || checkBlockAndMeta(xPipe, yHead - 1, zPipe, Blocks.bedrock, W);
+ }
+
+ private boolean isHasMiningPipes() {
+ return isHasMiningPipes(1);
+ }
+
+ private boolean isHasMiningPipes(int minCount) {
+ ItemStack pipe = getStackInSlot(1);
+ return pipe != null && pipe.stackSize > minCount - 1 && pipe.isItemEqual(miningPipe);
+ }
+
+ private boolean isEnergyEnough() {
+ long requiredEnergy = 512 + getMaxInputVoltage() * 4;
+ for (GT_MetaTileEntity_Hatch_Energy energyHatch : mEnergyHatches) {
+ requiredEnergy -= energyHatch.getEUVar();
+ if (requiredEnergy <= 0) return true;
+ }
+ return false;
+ }
+
+ protected boolean workingDownward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) {
+ switch (tryLowerPipe()) {
+ case 2: mMaxProgresstime = 0; return false;
+ case 3: workState = STATE_UPWARD; return true;
+ case 1: workState = STATE_AT_BOTTOM; return true;
+ default: return true;
+ }
+ }
+
+ protected boolean workingAtBottom(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) {
+ switch (tryLowerPipe(true)) {
+ case 0: workState = STATE_DOWNWARD; return true;
+ default: workState = STATE_UPWARD; return true;
+ }
+ }
+
+ protected boolean workingUpward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) {
+ if (tryPickPipe()) {
+ return true;
+ } else {
+ workState = STATE_DOWNWARD;
+ stopMachine();
+ return false;
+ }
+ }
+
+ @Override
+ public boolean checkRecipe(ItemStack aStack) {
+ //Public pipe actions
+ setElectricityStats();
+ int oldYHead = yHead;
+ if (!checkPipesAndSetYHead() || !isEnergyEnough()) {
+ stopMachine();
+ return false;
+ }
+ putMiningPipesFromInputsInController();
+ switch (workState) {
+ case STATE_DOWNWARD:
+ return workingDownward(aStack, xDrill, yDrill, zDrill, xPipe, zPipe, yHead, oldYHead);
+ case STATE_AT_BOTTOM:
+ return workingAtBottom(aStack, xDrill, yDrill, zDrill, xPipe, zPipe, yHead, oldYHead);
+ case STATE_UPWARD:
+ return workingUpward(aStack, xDrill, yDrill, zDrill, xPipe, zPipe, yHead, oldYHead);
+ default:
+ return false;
+ }
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ updateCoordinates();
+ //check base layer
+ for (int xOff = -1 + back.offsetX; xOff <= 1 + back.offsetX; xOff++) {
+ for (int zOff = -1 + back.offsetZ; zOff <= 1 + back.offsetZ; zOff++) {
+ if (xOff == 0 && zOff == 0) continue;
+
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xOff, 0, zOff);
+ if (!checkCasingBlock(xOff, 0, zOff)
+ && !addMaintenanceToMachineList(tTileEntity, casingTextureIndex)
+ && !addInputToMachineList(tTileEntity, casingTextureIndex)
+ && !addOutputToMachineList(tTileEntity, casingTextureIndex)
+ && !addEnergyInputToMachineList(tTileEntity, casingTextureIndex)
+ && !addDataAccessToMachineList(tTileEntity, casingTextureIndex))
+ return false;
+ }
+ }
+ if(!checkHatches()) return false;
+ if (GT_Utility.getTier(getMaxInputVoltage()) < getMinTier()) return false;
+ //check tower
+ for (int yOff = 1; yOff < 4; yOff++) {
+ if (!checkCasingBlock(back.offsetX, yOff, back.offsetZ)
+ || !checkFrameBlock(back.offsetX + 1, yOff, back.offsetZ)
+ || !checkFrameBlock(back.offsetX - 1, yOff, back.offsetZ)
+ || !checkFrameBlock(back.offsetX, yOff, back.offsetZ + 1)
+ || !checkFrameBlock(back.offsetX, yOff, back.offsetZ - 1)
+ || !checkFrameBlock(back.offsetX, yOff + 3, back.offsetZ))
+ return false;
+ }
+ return true;
+ }
+
+ private void updateCoordinates() {
+ xDrill = getBaseMetaTileEntity().getXCoord();
+ yDrill = getBaseMetaTileEntity().getYCoord();
+ zDrill = getBaseMetaTileEntity().getZCoord();
+ back = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing());
+ xPipe = xDrill + back.offsetX;
+ zPipe = zDrill + back.offsetZ;
+ }
+
+ private boolean checkPipesAndSetYHead() {
+ yHead = yDrill - 1;
+ while (checkBlockAndMeta(xPipe, yHead, zPipe, miningPipeBlock, W)) yHead--; //skip pipes
+ //is pipe tip OR is controller layer
+ if (checkBlockAndMeta(xPipe, yHead, zPipe, miningPipeTipBlock, W) || ++yHead == yDrill) return true;
+ //pipe column is broken - try fix
+ getBaseMetaTileEntity().getWorld().setBlock(xPipe, yHead, zPipe, miningPipeTipBlock);
+ return true;
+ }
+
+ protected boolean checkCasingBlock(int xOff, int yOff, int zOff) {
+ return checkBlockAndMetaOffset(xOff, yOff, zOff, casingBlock, casingMeta);
+ }
+ //meta of frame is getTileEntityBaseType; frame should be checked using its drops (possible a high weight operation)
+ protected boolean checkFrameBlock(int xOff, int yOff, int zOff) {
+ return checkBlockAndMetaOffset(xOff, yOff, zOff, GregTech_API.sBlockMachines, frameMeta);
+ }
+
+ protected boolean checkBlockAndMetaOffset(int xOff, int yOff, int zOff, Block block, int meta) {
+ return checkBlockAndMeta(xDrill + xOff, yDrill + yOff, zDrill + zOff, block, meta);
+ }
+
+ private boolean checkBlockAndMeta(int x, int y, int z, Block block, int meta) {
+ return (meta == W || getBaseMetaTileEntity().getMetaID(x, y, z) == meta)
+ && getBaseMetaTileEntity().getBlock(x, y, z) == block;
+ }
+
+ private FakePlayer mFakePlayer = null;
+
+ protected FakePlayer getFakePlayer(IGregTechTileEntity aBaseTile) {
+ if (mFakePlayer == null) mFakePlayer = GT_Utility.getFakePlayer(aBaseTile);
+ mFakePlayer.setWorld(aBaseTile.getWorld());
+ mFakePlayer.setPosition(aBaseTile.getXCoord(), aBaseTile.getYCoord(), aBaseTile.getZCoord());
+ return mFakePlayer;
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack aStack) {
+ return false;
+ }
+
+ protected abstract ItemList getCasingBlockItem();
+
+ protected abstract Materials getFrameMaterial();
+
+ protected abstract int getCasingTextureIndex();
+
+ protected abstract int getMinTier();
+
+ protected abstract boolean checkHatches();
+
+ protected abstract void setElectricityStats();
+
+ public int getTotalConfigValue(){
+ int config = 0;
+ ArrayList<ItemStack> tCircuitList = getDataItems(1);
+ for (ItemStack tCircuit : tCircuitList)
+ config += tCircuit.getItemDamage();
+ return config;
+ }
+
+ public ArrayList<GT_MetaTileEntity_Hatch_DataAccess> mDataAccessHatches = new ArrayList<GT_MetaTileEntity_Hatch_DataAccess>();
+
+ /**
+ * @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
+ */
+ private boolean isCorrectDataItem(ItemStack aStack, int state){
+ if ((state & 1) != 0 && ItemList.Circuit_Integrated.isStackEqual(aStack, true, true)) return true;
+ if ((state & 2) != 0 && ItemList.Tool_DataStick.isStackEqual(aStack, false, true)) return true;
+ if ((state & 4) != 0 && ItemList.Tool_DataOrb.isStackEqual(aStack, false, true)) return true;
+ return false;
+ }
+
+ /**
+ * @param state using bitmask, 1 for IntegratedCircuit, 2 for DataStick, 4 for DataOrb
+ */
+ public ArrayList<ItemStack> getDataItems(int state) {
+ ArrayList<ItemStack> rList = new ArrayList<ItemStack>();
+ if (GT_Utility.isStackValid(mInventory[1]) && isCorrectDataItem(mInventory[1], state)) {
+ rList.add(mInventory[1]);
+ }
+ for (GT_MetaTileEntity_Hatch_DataAccess tHatch : mDataAccessHatches) {
+ if (isValidMetaTileEntity(tHatch)) {
+ for (int i = 0; i < tHatch.getBaseMetaTileEntity().getSizeInventory(); i++) {
+ if (tHatch.getBaseMetaTileEntity().getStackInSlot(i) != null
+ && isCorrectDataItem(tHatch.getBaseMetaTileEntity().getStackInSlot(i), state))
+ rList.add(tHatch.getBaseMetaTileEntity().getStackInSlot(i));
+ }
+ }
+ }
+ return rList;
+ }
+
+ public boolean addDataAccessToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) return false;
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity == null) return false;
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_DataAccess) {
+ ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture((byte) aBaseCasingIndex);
+ return mDataAccessHatches.add((GT_MetaTileEntity_Hatch_DataAccess) aMetaTileEntity);
+ }
+ return false;
+ }
+
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
index 52120d2e90..393aeeff70 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeChemicalReactor.java
@@ -20,8 +20,8 @@ import java.util.ArrayList;
public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_MultiBlockBase {
- private static final int CASING_INDEX = 112;
-
+ private final int CASING_INDEX = 176;
+
public GT_MetaTileEntity_LargeChemicalReactor(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -58,11 +58,11 @@ public class GT_MetaTileEntity_LargeChemicalReactor extends GT_MetaTileEntity_Mu
boolean aRedstone) {
if (aSide == aFacing) {
return new ITexture[] {
- Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX],
+ Textures.BlockIcons.casingTexturePages[1][48],
new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR_ACTIVE
: Textures.BlockIcons.OVERLAY_FRONT_LARGE_CHEMICAL_REACTOR) };
}
- return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_INDEX] };
+ return new ITexture[] { Textures.BlockIcons.casingTexturePages[1][48] };
}
@Override
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java
deleted file mode 100644
index 56d1d8875a..0000000000
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill.java
+++ /dev/null
@@ -1,231 +0,0 @@
-package gregtech.common.tileentities.machines.multi;
-
-import gregtech.api.GregTech_API;
-import gregtech.api.enums.Textures;
-import gregtech.api.gui.GT_GUIContainer_MultiMachine;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.objects.GT_RenderedTexture;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.init.Blocks;
-import net.minecraft.item.ItemStack;
-import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
-
-import java.util.ArrayList;
-
-import static gregtech.common.GT_UndergroundOil.undergroundOil;
-
-public class GT_MetaTileEntity_OilDrill extends GT_MetaTileEntity_MultiBlockBase {
-
- private boolean completedCycle = false;
-
- public GT_MetaTileEntity_OilDrill(int aID, String aName, String aNameRegional) {
- super(aID, aName, aNameRegional);
- }
-
- public GT_MetaTileEntity_OilDrill(String aName) {
- super(aName);
- }
-
- public String[] getDescription() {
- return new String[]{
- "Controller Block for the Oil Drilling Rig",
- "Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)",
- "3x1x3 Base of Solid Steel Machine Casings",
- "1x3x1 Solid Steel Machine Casing pillar (Center of base)",
- "1x3x1 Steel Frame Boxes (Each Steel pillar side and on top)",
- "1x Output Hatch (One of base casings)",
- "1x Maintenance Hatch (One of base casings)",
- "1x Energy Hatch (One of base casings)"};
- }
-
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16], new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_OIL_DRILL)};
- }
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[16]};
- }
-
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DrillingRig.png");
- }
-
- @Override
- public boolean checkRecipe(ItemStack aStack) {
- if (mInventory[1] == null || (mInventory[1].isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L)) && mInventory[1].stackSize < mInventory[1].getMaxStackSize())) {
- ArrayList<ItemStack> tItems = getStoredInputs();
- for (ItemStack tStack : tItems) {
- if (tStack.isItemEqual(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
- if (tStack.stackSize < 2) {
- tStack = null;
- } else {
- tStack.stackSize--;
- }
-
- }
- if (mInventory[1] == null) {
- mInventory[1] = GT_ModHandler.getIC2Item("miningPipe", 1L);
- } else {
- mInventory[1].stackSize++;
- }
- }
- }
- FluidStack tFluid = undergroundOil(getBaseMetaTileEntity(),.5F+(getInputTier()*.25F));
- if (tFluid == null) {
- stopMachine();
- return false;
- }
- if (getYOfPumpHead() > 0 && getBaseMetaTileEntity().getBlockOffset(ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX, getYOfPumpHead() - 1 - getBaseMetaTileEntity().getYCoord(), ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ) != Blocks.bedrock) {
- if (completedCycle) {
- moveOneDown();
- }
- tFluid = null;
- if (mEnergyHatches.size() > 0 && mEnergyHatches.get(0).getEUVar() > (512 + getMaxInputVoltage() * 4))
- completedCycle = true;
- }
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
- int tEU = 24;
- int tDuration = 160;
- if (tEU <= 16) {
- this.mEUt = (tEU * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (tDuration / (1 << tTier - 1));
- } else {
- this.mEUt = tEU;
- this.mMaxProgresstime = tDuration;
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
- }
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
- this.mOutputFluids = new FluidStack[]{tFluid};
- return true;
- }
-
- private boolean moveOneDown() {
- if ((this.mInventory[1] == null) || (this.mInventory[1].stackSize < 1)
- || (!GT_Utility.areStacksEqual(this.mInventory[1], GT_ModHandler.getIC2Item("miningPipe", 1L)))) {
- return false;
- }
- int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
- int yHead = getYOfPumpHead();
- if (yHead < 1) {
- return false;
- }
- if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir) == Blocks.bedrock) {
- return false;
- }
- if (!(getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead - 1, getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))))) {
- return false;
- }
- if (yHead != getBaseMetaTileEntity().getYCoord()) {
- getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, yHead, getBaseMetaTileEntity().getZCoord() + zDir, GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L)));
- }
- getBaseMetaTileEntity().decrStackSize(1, 1);
- return true;
- }
-
- private int getYOfPumpHead() {
- int xDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing()).offsetZ;
- int y = getBaseMetaTileEntity().getYCoord() - 1;
- while (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) == GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipe", 1L))) {
- y--;
- }
- if (y == getBaseMetaTileEntity().getYCoord() - 1) {
- if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) != GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L))) {
- return y + 1;
- }
- } else if (getBaseMetaTileEntity().getBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir) != GT_Utility
- .getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)) && this.mInventory[1] != null && this.mInventory[1].stackSize > 0 && GT_Utility.areStacksEqual(this.mInventory[1], GT_ModHandler.getIC2Item("miningPipe", 1L))) {
- getBaseMetaTileEntity().getWorld().setBlock(getBaseMetaTileEntity().getXCoord() + xDir, y, getBaseMetaTileEntity().getZCoord() + zDir,
- GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("miningPipeTip", 1L)));
- getBaseMetaTileEntity().decrStackSize(0, 1);
- }
- return y;
- }
-
- @Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- if ((xDir + i != 0) || (zDir + j != 0)) {
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0, zDir + j);
- if ((!addMaintenanceToMachineList(tTileEntity, 16)) && (!addInputToMachineList(tTileEntity, 16)) && (!addOutputToMachineList(tTileEntity, 16)) && (!addEnergyInputToMachineList(tTileEntity, 16))) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j) != GregTech_API.sBlockCasings2) {
- return false;
- }
- if (aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j) != 0) {
- return false;
- }
- }
- }
- }
- }
- for (int y = 1; y < 4; y++) {
- if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir) != GregTech_API.sBlockCasings2) {
- return false;
- }
- if (aBaseMetaTileEntity.getBlockOffset(xDir + 1, y, zDir) != GregTech_API.sBlockMachines) {
- return false;
- }
- if (aBaseMetaTileEntity.getBlockOffset(xDir - 1, y, zDir) != GregTech_API.sBlockMachines) {
- return false;
- }
- if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir + 1) != GregTech_API.sBlockMachines) {
- return false;
- }
- if (aBaseMetaTileEntity.getBlockOffset(xDir, y, zDir - 1) != GregTech_API.sBlockMachines) {
- return false;
- }
- if (aBaseMetaTileEntity.getBlockOffset(xDir, y + 3, zDir) != GregTech_API.sBlockMachines) {
- return false;
- }
- }
- return true;
- }
-
- @Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
- }
-
- @Override
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
- }
-
- @Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- @Override
- public int getDamageToComponent(ItemStack aStack) {
- return 0;
- }
-
- @Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
- }
-
- public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
- return new GT_MetaTileEntity_OilDrill(this.mName);
- }
-
-} \ No newline at end of file
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill1.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill1.java
new file mode 100644
index 0000000000..c550c8046d
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill1.java
@@ -0,0 +1,51 @@
+package gregtech.common.tileentities.machines.multi;
+
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+
+public class GT_MetaTileEntity_OilDrill1 extends GT_MetaTileEntity_OilDrillBase {
+ public GT_MetaTileEntity_OilDrill1(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_OilDrill1(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public String[] getDescription() {
+ return getDescriptionInternal("I");
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_OilDrill1(mName);
+ }
+
+ @Override
+ protected ItemList getCasingBlockItem() {
+ return ItemList.Casing_SolidSteel;
+ }
+
+ @Override
+ protected Materials getFrameMaterial() {
+ return Materials.Steel;
+ }
+
+ @Override
+ protected int getCasingTextureIndex() {
+ return 16;
+ }
+
+ @Override
+ protected int getRangeInChunks() {
+ return 1;
+ }
+
+ @Override
+ protected int getMinTier() {
+ return 2;
+ }
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill2.java
new file mode 100644
index 0000000000..2eeff6febb
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill2.java
@@ -0,0 +1,51 @@
+package gregtech.common.tileentities.machines.multi;
+
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+
+public class GT_MetaTileEntity_OilDrill2 extends GT_MetaTileEntity_OilDrillBase {
+ public GT_MetaTileEntity_OilDrill2(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_OilDrill2(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public String[] getDescription() {
+ return getDescriptionInternal("II");
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_OilDrill2(mName);
+ }
+
+ @Override
+ protected ItemList getCasingBlockItem() {
+ return ItemList.Casing_StableTitanium;
+ }
+
+ @Override
+ protected Materials getFrameMaterial() {
+ return Materials.Titanium;
+ }
+
+ @Override
+ protected int getCasingTextureIndex() {
+ return 50;
+ }
+
+ @Override
+ protected int getRangeInChunks() {
+ return 3;
+ }
+
+ @Override
+ protected int getMinTier() {
+ return 3;
+ }
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill3.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill3.java
new file mode 100644
index 0000000000..0bb5647e68
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrill3.java
@@ -0,0 +1,51 @@
+package gregtech.common.tileentities.machines.multi;
+
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+
+public class GT_MetaTileEntity_OilDrill3 extends GT_MetaTileEntity_OilDrillBase {
+ public GT_MetaTileEntity_OilDrill3(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_OilDrill3(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public String[] getDescription() {
+ return getDescriptionInternal("III");
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_OilDrill3(mName);
+ }
+
+ @Override
+ protected ItemList getCasingBlockItem() {
+ return ItemList.Casing_RobustTungstenSteel;
+ }
+
+ @Override
+ protected Materials getFrameMaterial() {
+ return Materials.TungstenSteel;
+ }
+
+ @Override
+ protected int getCasingTextureIndex() {
+ return 48;
+ }
+
+ @Override
+ protected int getRangeInChunks() {
+ return 6;
+ }
+
+ @Override
+ protected int getMinTier() {
+ return 4;
+ }
+}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java
new file mode 100644
index 0000000000..5d760e62b3
--- /dev/null
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OilDrillBase.java
@@ -0,0 +1,142 @@
+package gregtech.common.tileentities.machines.multi;
+
+import static gregtech.api.enums.GT_Values.VN;
+import static gregtech.common.GT_UndergroundOil.undergroundOil;
+import static gregtech.common.GT_UndergroundOil.undergroundOilReadInformation;
+
+import java.util.ArrayList;
+
+import gregtech.api.gui.GT_GUIContainer_MultiMachine;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.chunk.Chunk;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+public abstract class GT_MetaTileEntity_OilDrillBase extends GT_MetaTileEntity_DrillerBase {
+
+ private boolean completedCycle = false;
+
+ private ArrayList<Chunk> mOilFieldChunks = new ArrayList<Chunk>();
+ private int mOilId = 0;
+
+ public GT_MetaTileEntity_OilDrillBase(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GT_MetaTileEntity_OilDrillBase(String aName) {
+ super(aName);
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ super.saveNBTData(aNBT);
+ aNBT.setInteger("mOilId", mOilId);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ mOilId = aNBT.getInteger("mOilId");
+ }
+
+ protected String[] getDescriptionInternal(String tierSuffix) {
+ String casings = getCasingBlockItem().get(0).getDisplayName();
+ return new String[]{
+ "Controller Block for the Oil Drilling Rig " + (tierSuffix != null ? tierSuffix : ""),
+ "Size(WxHxD): 3x7x3", "Controller (Front middle at bottom)",
+ "3x1x3 Base of " + casings,
+ "1x3x1 " + casings + " pillar (Center of base)",
+ "1x3x1 " + getFrameMaterial().mName + " Frame Boxes (Each pillar side and on top)",
+ "1x Output Hatch (One of base casings)",
+ "1x Maintenance Hatch (One of base casings)",
+ "1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)",
+ "Working on " + getRangeInChunks() + " * " + getRangeInChunks() + " chunks",
+ "Use Programmed Circuits to ignore near exhausted oil field"};
+ }
+
+
+ @Override
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DrillingRig.png");
+ }
+
+ protected int getRangeInChunks(){
+ return 0;
+ }
+
+ @Override
+ protected boolean checkHatches() {
+ return !mMaintenanceHatches.isEmpty() && !mOutputHatches.isEmpty() && !mEnergyHatches.isEmpty();
+ }
+
+ @Override
+ protected void setElectricityStats() {
+ this.mEfficiency = getCurrentEfficiency(null);
+ this.mEfficiencyIncrease = 10000;
+ int tier = Math.max(1, GT_Utility.getTier(getMaxInputVoltage()));
+ this.mEUt = -3 * (1 << (tier << 1));
+ this.mMaxProgresstime = (workState == STATE_AT_BOTTOM ? (1280 * getRangeInChunks() * getRangeInChunks() / (1 << getMinTier())) : 80) / (1 << tier);
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ }
+
+ @Override
+ protected boolean workingAtBottom(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) {
+ switch (tryLowerPipe(true)) {
+ case 0: workState = STATE_DOWNWARD; setElectricityStats(); return true;
+ case 3: workState = STATE_UPWARD; return true;
+ }
+
+ if (reachingVoidOrBedrock() && tryFillChunkList()) {
+ float speed = .5F+(GT_Utility.getTier(getMaxInputVoltage()) - getMinTier()) *.25F;
+ FluidStack tFluid = pumpOil(speed);
+ if (tFluid != null && tFluid.amount > getTotalConfigValue()){
+ this.mOutputFluids = new FluidStack[]{tFluid};
+ return true;
+ }
+ }
+ workState = STATE_UPWARD;
+ return true;
+ }
+
+ private boolean tryFillChunkList(){
+ FluidStack tFluid, tOil;
+ if (mOilId <= 0) {
+ tFluid = undergroundOilReadInformation(getBaseMetaTileEntity());
+ if (tFluid == null) return false;
+ mOilId = tFluid.getFluidID();
+ }
+ tOil = new FluidStack(FluidRegistry.getFluid(mOilId), 0);
+
+ if (mOilFieldChunks.isEmpty()) {
+ Chunk tChunk = getBaseMetaTileEntity().getWorld().getChunkFromBlockCoords(getBaseMetaTileEntity().getXCoord(), getBaseMetaTileEntity().getZCoord());
+ int range = getRangeInChunks();
+ int xChunk = (tChunk.xPosition / range) * range - (tChunk.xPosition < 0 ? range : 0), zChunk = (tChunk.zPosition / range) * range - (tChunk.zPosition < 0 ? range : 0);
+ for (int i = 0; i < range; i++) {
+ for (int j = 0; j < range; j++) {
+ tChunk = getBaseMetaTileEntity().getWorld().getChunkFromChunkCoords(xChunk + i, zChunk + j);
+ tFluid = undergroundOilReadInformation(tChunk);
+ if (tOil.isFluidEqual(tFluid))
+ mOilFieldChunks.add(tChunk);
+ }
+ }
+ }
+ if (mOilFieldChunks.isEmpty()) return false;
+ return true;
+ }
+
+ private FluidStack pumpOil(float speed){
+ if (mOilId <= 0) return null;
+ FluidStack tFluid, tOil;
+ tOil = new FluidStack(FluidRegistry.getFluid(mOilId), 0);
+ for (Chunk tChunk : mOilFieldChunks) {
+ tFluid = undergroundOil(getBaseMetaTileEntity(),speed);
+ if (tFluid == null) mOilFieldChunks.remove(tChunk);
+ if (tOil.isFluidEqual(tFluid)) tOil.amount += tFluid.amount;
+ }
+ return tOil.amount == 0 ? null : tOil;
+ }
+} \ No newline at end of file
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant1.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant1.java
index 25e4e3eb5d..a308c8c93a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant1.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant1.java
@@ -48,4 +48,9 @@ public class GT_MetaTileEntity_OreDrillingPlant1 extends GT_MetaTileEntity_OreDr
protected int getMinTier() {
return 2;
}
+
+ @Override
+ protected int getBaseProgressTime() {
+ return 960;
+ }
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant2.java
index 2b161fe471..2180f16141 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant2.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant2.java
@@ -48,4 +48,9 @@ public class GT_MetaTileEntity_OreDrillingPlant2 extends GT_MetaTileEntity_OreDr
protected int getMinTier() {
return 3;
}
+
+ @Override
+ protected int getBaseProgressTime() {
+ return 800;
+ }
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant3.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant3.java
index 1be6391f7a..e9d50765ae 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant3.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant3.java
@@ -48,4 +48,9 @@ public class GT_MetaTileEntity_OreDrillingPlant3 extends GT_MetaTileEntity_OreDr
protected int getMinTier() {
return 4;
}
+
+ @Override
+ protected int getBaseProgressTime() {
+ return 640;
+ }
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java
index 55fc1ef7e0..397692bdda 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlant4.java
@@ -48,4 +48,9 @@ public class GT_MetaTileEntity_OreDrillingPlant4 extends GT_MetaTileEntity_OreDr
protected int getMinTier() {
return 5;
}
+
+ @Override
+ protected int getBaseProgressTime() {
+ return 480;
+ }
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java
index 3d8dbb02bd..4e963d53ca 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_OreDrillingPlantBase.java
@@ -1,18 +1,15 @@
package gregtech.common.tileentities.machines.multi;
-import gregtech.api.GregTech_API;
+import static gregtech.api.enums.GT_Values.VN;
+
+import java.util.ArrayList;
+
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
-import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
-import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
-import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.objects.ItemData;
-import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
@@ -22,106 +19,40 @@ import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.ChunkPosition;
-import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
-import java.util.ArrayList;
-
-import static gregtech.api.enums.GT_Values.*;
-
-public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTileEntity_MultiBlockBase {
- private static final ItemStack miningPipe = GT_ModHandler.getIC2Item("miningPipe", 0);
- private static final ItemStack miningPipeTip = GT_ModHandler.getIC2Item("miningPipeTip", 0);
- private static final Block miningPipeBlock = GT_Utility.getBlockFromStack(miningPipe);
- private static final Block miningPipeTipBlock = GT_Utility.getBlockFromStack(miningPipeTip);
-
+public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTileEntity_DrillerBase {
+
private final ArrayList<ChunkPosition> oreBlockPositions = new ArrayList<>();
- private Block casingBlock;
- private int casingMeta;
- private int frameMeta;
- private int casingTextureIndex;
-
- private ForgeDirection back;
- private int xDrill, yDrill, zDrill, xCenter, zCenter, yHead;
-
- private boolean isPickingPipes;
-
public GT_MetaTileEntity_OreDrillingPlantBase(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
- initFields();
}
public GT_MetaTileEntity_OreDrillingPlantBase(String aName) {
super(aName);
- initFields();
- }
-
- private void initFields() {
- casingBlock = getCasingBlockItem().getBlock();
- casingMeta = getCasingBlockItem().get(0).getItemDamage();
- int frameId = 4096 + getFrameMaterial().mMetaItemSubID;
- frameMeta = GregTech_API.METATILEENTITIES[frameId] != null ? GregTech_API.METATILEENTITIES[frameId].getTileEntityBaseType() : W;
- casingTextureIndex = getCasingTextureIndex();
- isPickingPipes = false;
- }
-
- public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
- if (aSide == aFacing)
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[casingTextureIndex],new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_ORE_DRILL)};
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[casingTextureIndex]};
}
+ @Override
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "OreDrillingPlant.png");
}
@Override
- public void saveNBTData(NBTTagCompound aNBT) {
- super.saveNBTData(aNBT);
- aNBT.setBoolean("isPickingPipes", isPickingPipes);
- }
-
- @Override
- public void loadNBTData(NBTTagCompound aNBT) {
- super.loadNBTData(aNBT);
- isPickingPipes = aNBT.getBoolean("isPickingPipes");
- }
-
- @Override
- public boolean checkRecipe(ItemStack aStack) {
- setElectricityStats();
- int oldYHead = yHead;
- if (!checkPipesAndSetYHead() || !isEnergyEnough()) {
- stopMachine();
- return false;
- }
- if (yHead != oldYHead) oreBlockPositions.clear();
- if (isPickingPipes) {
- if (tryPickPipe()) {
- mOutputItems = new ItemStack[] {GT_Utility.copyAmount(1, miningPipe)};
- return true;
- } else {
- isPickingPipes = false;
- stopMachine();
- return false;
- }
- }
+ protected boolean workingDownward(ItemStack aStack, int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead, int oldYHead) {
+ if (yHead != oldYHead) oreBlockPositions.clear();
- putMiningPipesFromInputsInController();
- if (!tryConsumeDrillingFluid()) return false;
-
- fillMineListIfEmpty();
+ fillMineListIfEmpty(xDrill, yDrill, zDrill, xPipe, zPipe, yHead);
if (oreBlockPositions.isEmpty()) {
- if (!tryLowerPipe()) {
- isPickingPipes = true;
- return true;
- }
+ switch (tryLowerPipe()) {
+ case 2: mMaxProgresstime = 0; return false;
+ case 3: workState = STATE_UPWARD; return true;
+ case 1: workState = STATE_AT_BOTTOM; return true;
+ }
//new layer - fill again
- fillMineListIfEmpty();
+ fillMineListIfEmpty(xDrill, yDrill, zDrill, xPipe, zPipe, yHead);
}
ChunkPosition oreBlockPos = null;
@@ -129,9 +60,14 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
while ((oreBlock == null || oreBlock == Blocks.air) && !oreBlockPositions.isEmpty()) {
oreBlockPos = oreBlockPositions.remove(0);
- oreBlock = getBaseMetaTileEntity().getBlock(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ);
+ if (GT_Utility.eraseBlockByFakePlayer(getFakePlayer(getBaseMetaTileEntity()), oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ, true))
+ oreBlock = getBaseMetaTileEntity().getBlock(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ);
}
+ if (!tryConsumeDrillingFluid()) {
+ oreBlockPositions.add(0, oreBlockPos);
+ return false;
+ }
if (oreBlock != null && oreBlock != Blocks.air) {
ArrayList<ItemStack> oreBlockDrops = getBlockDrops(oreBlock, oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ);
getBaseMetaTileEntity().getWorld().setBlockToAir(oreBlockPos.chunkPosX, oreBlockPos.chunkPosY, oreBlockPos.chunkPosZ);
@@ -141,39 +77,18 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
return true;
}
- private boolean isEnergyEnough() {
- long requiredEnergy = 512 + getMaxInputVoltage() * 4;
- for (GT_MetaTileEntity_Hatch_Energy energyHatch : mEnergyHatches) {
- requiredEnergy -= energyHatch.getEUVar();
- if (requiredEnergy <= 0) return true;
- }
- return false;
- }
-
- private boolean tryPickPipe() {
- if (yHead == yDrill) return false;
- if (checkBlockAndMeta(xCenter, yHead + 1, zCenter, miningPipeBlock, W))
- getBaseMetaTileEntity().getWorld().setBlock(xCenter, yHead + 1, zCenter, miningPipeTipBlock);
- getBaseMetaTileEntity().getWorld().setBlockToAir(xCenter, yHead, zCenter);
- return true;
+ @Override
+ protected boolean checkHatches(){
+ return !mMaintenanceHatches.isEmpty() && !mInputHatches.isEmpty() && !mOutputBusses.isEmpty() && !mEnergyHatches.isEmpty();
}
-
- private void setElectricityStats() {
+
+ @Override
+ protected void setElectricityStats() {
this.mEfficiency = getCurrentEfficiency(null);
this.mEfficiencyIncrease = 10000;
- //T1 = 12; T2 = 48; T3 = 192; T4 = 768
- this.mEUt = 3 * (1 << (getMinTier() << 1));
- //T1 = 960; T2 = 480; T3 = 240; T4 = 120
- this.mMaxProgresstime = (isPickingPipes ? 80 : 1920) / (1 << getMinTier());
-
- long voltage = getMaxInputVoltage();
- long overclockEu = V[Math.max(1, GT_Utility.getTier(voltage)) - 1];
- while (this.mEUt <= overclockEu) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
- }
-
- this.mEUt = -this.mEUt;
+ int tier = Math.max(1, GT_Utility.getTier(getMaxInputVoltage()));
+ this.mEUt = -3 * (1 << (tier << 1));
+ this.mMaxProgresstime = (workState == STATE_DOWNWARD ? getBaseProgressTime() : 80) / (1 <<tier);
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
}
@@ -227,37 +142,17 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
}
private boolean tryConsumeDrillingFluid() {
- return depleteInput(new FluidStack(ItemList.sDrillingFluid, 2000));
- }
-
- private void putMiningPipesFromInputsInController() {
- int maxPipes = miningPipe.getMaxStackSize();
- if (isHasMiningPipes(maxPipes)) return;
-
- ItemStack pipes = getStackInSlot(1);
- for (ItemStack storedItem : getStoredInputs()) {
- if (!storedItem.isItemEqual(miningPipe)) continue;
-
- if (pipes == null) {
- setInventorySlotContents(1, GT_Utility.copy(miningPipe));
- pipes = getStackInSlot(1);
- }
-
- if (pipes.stackSize == maxPipes) break;
-
- int needPipes = maxPipes - pipes.stackSize;
- int transferPipes = storedItem.stackSize < needPipes ? storedItem.stackSize : needPipes;
-
- pipes.stackSize += transferPipes;
- storedItem.stackSize -= transferPipes;
+ if (!depleteInput(new FluidStack(ItemList.sDrillingFluid, 2000))) {
+ mMaxProgresstime = 0;
+ return false;
}
- updateSlots();
+ return true;
}
- private void fillMineListIfEmpty() {
+ private void fillMineListIfEmpty(int xDrill, int yDrill, int zDrill, int xPipe, int zPipe, int yHead) {
if (!oreBlockPositions.isEmpty()) return;
- tryAddOreBlockToMineList(xCenter, yHead - 1, zCenter);
+ tryAddOreBlockToMineList(xPipe, yHead - 1, zPipe);
if (yHead == yDrill) return; //skip controller block layer
int radius = getRadiusInChunks() << 4;
@@ -282,130 +177,9 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
}
}
- private boolean tryLowerPipe() {
- if (!isHasMiningPipes()) return false;
-
- if (yHead <= 0) return false;
- if (checkBlockAndMeta(xCenter, yHead - 1, zCenter, Blocks.bedrock, W)) return false;
-
- getBaseMetaTileEntity().getWorld().setBlock(xCenter, yHead - 1, zCenter, miningPipeTipBlock);
- if (yHead != yDrill) getBaseMetaTileEntity().getWorld().setBlock(xCenter, yHead, zCenter, miningPipeBlock);
-
- getBaseMetaTileEntity().decrStackSize(1, 1);
- return true;
- }
-
- private boolean isHasMiningPipes() {
- return isHasMiningPipes(1);
- }
-
- private boolean isHasMiningPipes(int minCount) {
- ItemStack pipe = getStackInSlot(1);
- return pipe != null && pipe.stackSize > minCount - 1 && pipe.isItemEqual(miningPipe);
- }
-
- @Override
- public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
- updateCoordinates();
- //check base layer
- for (int xOff = -1 + back.offsetX; xOff <= 1 + back.offsetX; xOff++) {
- for (int zOff = -1 + back.offsetZ; zOff <= 1 + back.offsetZ; zOff++) {
- if (xOff == 0 && zOff == 0) continue;
-
- IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xOff, 0, zOff);
- if (!checkCasingBlock(xOff, 0, zOff)
- && !addMaintenanceToMachineList(tTileEntity, casingTextureIndex)
- && !addInputToMachineList(tTileEntity, casingTextureIndex)
- && !addOutputToMachineList(tTileEntity, casingTextureIndex)
- && !addEnergyInputToMachineList(tTileEntity, casingTextureIndex))
- return false;
- }
- }
- if (mMaintenanceHatches.isEmpty() || mInputHatches.isEmpty() || mOutputBusses.isEmpty() || mEnergyHatches.isEmpty()) return false;
- if (GT_Utility.getTier(getMaxInputVoltage()) < getMinTier()) return false;
- //check tower
- for (int yOff = 1; yOff < 4; yOff++) {
- if (!checkCasingBlock(back.offsetX, yOff, back.offsetZ)
- || !checkFrameBlock(back.offsetX + 1, yOff, back.offsetZ)
- || !checkFrameBlock(back.offsetX - 1, yOff, back.offsetZ)
- || !checkFrameBlock(back.offsetX, yOff, back.offsetZ + 1)
- || !checkFrameBlock(back.offsetX, yOff, back.offsetZ - 1)
- || !checkFrameBlock(back.offsetX, yOff + 3, back.offsetZ))
- return false;
- }
- return true;
- }
-
- private void updateCoordinates() {
- xDrill = getBaseMetaTileEntity().getXCoord();
- yDrill = getBaseMetaTileEntity().getYCoord();
- zDrill = getBaseMetaTileEntity().getZCoord();
- back = ForgeDirection.getOrientation(getBaseMetaTileEntity().getBackFacing());
- xCenter = xDrill + back.offsetX;
- zCenter = zDrill + back.offsetZ;
- }
-
- private boolean checkPipesAndSetYHead() {
- yHead = yDrill - 1;
- while (checkBlockAndMeta(xCenter, yHead, zCenter, miningPipeBlock, W)) yHead--; //skip pipes
- //is pipe tip OR is controller layer
- if (checkBlockAndMeta(xCenter, yHead, zCenter, miningPipeTipBlock, W) || ++yHead == yDrill) return true;
- //pipe column is broken - try fix
- getBaseMetaTileEntity().getWorld().setBlock(xCenter, yHead, zCenter, miningPipeTipBlock);
- return true;
- }
-
- private boolean checkCasingBlock(int xOff, int yOff, int zOff) {
- return checkBlockAndMetaOffset(xOff, yOff, zOff, casingBlock, casingMeta);
- }
- //meta of frame is getTileEntityBaseType; frame should be checked using its drops (possible a high weight operation)
- private boolean checkFrameBlock(int xOff, int yOff, int zOff) {
- return checkBlockAndMetaOffset(xOff, yOff, zOff, GregTech_API.sBlockMachines, frameMeta);
- }
-
- private boolean checkBlockAndMetaOffset(int xOff, int yOff, int zOff, Block block, int meta) {
- return checkBlockAndMeta(xDrill + xOff, yDrill + yOff, zDrill + zOff, block, meta);
- }
-
- private boolean checkBlockAndMeta(int x, int y, int z, Block block, int meta) {
- return (meta == W || getBaseMetaTileEntity().getMetaID(x, y, z) == meta)
- && getBaseMetaTileEntity().getBlock(x, y, z) == block;
- }
-
- @Override
- public boolean isCorrectMachinePart(ItemStack aStack) {
- return true;
- }
-
- @Override
- public int getMaxEfficiency(ItemStack aStack) {
- return 10000;
- }
-
- @Override
- public int getPollutionPerTick(ItemStack aStack) {
- return 0;
- }
-
- @Override
- public int getDamageToComponent(ItemStack aStack) {
- return 0;
- }
-
- @Override
- public boolean explodesOnComponentBreak(ItemStack aStack) {
- return false;
- }
-
- protected abstract ItemList getCasingBlockItem();
-
- protected abstract Materials getFrameMaterial();
-
- protected abstract int getCasingTextureIndex();
-
protected abstract int getRadiusInChunks();
- protected abstract int getMinTier();
+ protected abstract int getBaseProgressTime();
protected String[] getDescriptionInternal(String tierSuffix) {
String casings = getCasingBlockItem().get(0).getDisplayName();
@@ -422,4 +196,4 @@ public abstract class GT_MetaTileEntity_OreDrillingPlantBase extends GT_MetaTile
"1x " + VN[getMinTier()] + "+ Energy Hatch (Any bottom layer casing)",
"Radius is " + (getRadiusInChunks() << 4) + " blocks"};
}
-}
+} \ No newline at end of file
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
index 25fa0b9042..6f3d3e9a47 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_PyrolyseOven.java
@@ -1,15 +1,19 @@
package gregtech.common.tileentities.machines.multi;
import gregtech.api.GregTech_API;
+import gregtech.api.enums.Dyes;
+import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
import gregtech.api.gui.GT_GUIContainer_MultiMachine;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_MultiBlockBase;
+import gregtech.api.objects.GT_CopiedBlockTexture;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
+import net.minecraft.block.Block;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
@@ -20,6 +24,9 @@ import java.util.ArrayList;
public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlockBase {
private int coilMetaID;
+ public static GT_CopiedBlockTexture mTextureULV = new GT_CopiedBlockTexture(Block.getBlockFromItem(ItemList.Casing_ULV.get(1).getItem()), 6, 0,Dyes.MACHINE_METAL.mRGBa);
+
+ //private final int CASING_INDEX = 22;
public GT_MetaTileEntity_PyrolyseOven(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -49,10 +56,9 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock
public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
if (aSide == aFacing) {
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[111],
- new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN)};
+ return new ITexture[]{mTextureULV, new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_PYROLYSE_OVEN)};
}
- return new ITexture[]{Textures.BlockIcons.CASING_BLOCKS[111]};
+ return new ITexture[]{mTextureULV};
}
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
@@ -127,7 +133,7 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock
}
}
} else if (h == 3) {// innen decke (ulv casings + input + muffler)
- if ((!addInputToMachineList(tTileEntity, 111)) && (!addMufflerToMachineList(tTileEntity, 111))) {
+ if ((!addInputToMachineList(tTileEntity, 22)) && (!addMufflerToMachineList(tTileEntity, 22))) {
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GregTech_API.sBlockCasings1) {
return false;
}
@@ -142,7 +148,7 @@ public class GT_MetaTileEntity_PyrolyseOven extends GT_MetaTileEntity_MultiBlock
}
} else {// Aeusserer 5x5 ohne hoehe
if (h == 0) {// aussen boden (controller, output, energy, maintainance, rest ulv casings)
- if ((!addMaintenanceToMachineList(tTileEntity, 111)) && (!addOutputToMachineList(tTileEntity, 111)) && (!addEnergyInputToMachineList(tTileEntity, 111))) {
+ if ((!addMaintenanceToMachineList(tTileEntity, 22)) && (!addOutputToMachineList(tTileEntity, 22)) && (!addEnergyInputToMachineList(tTileEntity, 22))) {
if ((xDir + i != 0) || (zDir + j != 0)) {//no controller
if (aBaseMetaTileEntity.getBlockOffset(xDir + i, h, zDir + j) != GregTech_API.sBlockCasings1) {
return false;
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java b/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java
index 142d3d73eb..ef8244f391 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Scoop.java
@@ -1,9 +1,12 @@
package gregtech.common.tools;
+import cpw.mods.fml.common.Loader;
import gregtech.api.GregTech_API;
+import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.items.GT_MetaGenerated_Tool;
+import gregtech.common.items.behaviors.Behaviour_None;
import gregtech.common.items.behaviors.Behaviour_Scoop;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
@@ -91,7 +94,12 @@ public class GT_Tool_Scoop
}
public void onStatsAddedToTool(GT_MetaGenerated_Tool aItem, int aID) {
- aItem.addItemBehavior(aID, new Behaviour_Scoop(200));
+ if(Loader.isModLoaded(GT_Values.MOD_ID_FR)){
+ aItem.addItemBehavior(aID, new Behaviour_Scoop(200));
+ }else{
+ aItem.addItemBehavior(aID, new Behaviour_None());
+ }
+
}
public IChatComponent getDeathMessage(EntityLivingBase aPlayer, EntityLivingBase aEntity) {
diff --git a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java
index 68ee13322c..9df8bc056a 100644
--- a/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java
+++ b/src/main/java/gregtech/loaders/materialprocessing/ProcessingModSupport.java
@@ -79,6 +79,7 @@ public class ProcessingModSupport implements gregtech.api.interfaces.IMaterialHa
Materials.ShadowSteel.mHasParentMod = false;
Materials.AstralSilver.mHasParentMod = false;
Materials.Midasium.mHasParentMod = false;
+ Materials.Adamantium.mHasParentMod = false;
}
if (!aEnableThaumcraftMats) {
Materials.Amber.mHasParentMod = false;
diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java
index d2bf8a7392..731874e2bd 100644
--- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java
+++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java
@@ -627,6 +627,8 @@ public class GT_Achievements {
} else if ((stack.getItem() == Ic2Items.quantumBodyarmor.getItem()) || (stack.getItem() == Ic2Items.quantumBoots.getItem()) ||
(stack.getItem() == Ic2Items.quantumHelmet.getItem()) || (stack.getItem() == Ic2Items.quantumLeggings.getItem())) {
issueAchievement(player, "buildQArmor");
+ } else if (stack.getUnlocalizedName().equals("ic2.itemPartCircuitAdv")) {
+ issueAchievement(player, "stepforward");
}
if(player.capabilities.isCreativeMode && stack.getUnlocalizedName().equals("gt.metaitem.01.32761")){//Debug Scanner pickup shows all assline recipes.
for(GT_Recipe recipe: GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.mRecipeList) {
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java
index 1108ab61fd..2a17cfbec8 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCircuit.java
@@ -29,7 +29,7 @@ public class ProcessingCircuit implements gregtech.api.interfaces.IOreRecipeRegi
case "Basic":
GT_ModHandler.removeRecipeByOutput(aStack);
GT_ModHandler.addCraftingRecipe(aStack, new Object[]{"RIR","VBV","CCC",'R',ItemList.Circuit_Parts_Resistor.get(1,new Object[0]),'C',GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.RedAlloy, 1),'V', ItemList.Circuit_Parts_Vacuum_Tube.get(1,new Object[0]),'B',ItemList.Circuit_Board_Coated.get(1,new Object[0]),'I',ItemList.IC2_Item_Casing_Steel.get(1,new Object[0])});
- GT_ModHandler.addShapelessCraftingRecipe(ItemList.Circuit_Basic.get(1L, new Object[0]), new Object[]{ItemList.Circuit_Integrated.getWildcard(1L, new Object[0])});
+ GT_ModHandler.addShapelessCraftingRecipe(aStack, new Object[]{ItemList.Circuit_Integrated.getWildcard(1L, new Object[0])});
break;
case "Advanced":
GT_ModHandler.removeRecipeByOutput(aStack);
diff --git a/src/main/java/gregtech/loaders/postload/GT_AE2EnergyTunnelLoader.java b/src/main/java/gregtech/loaders/postload/GT_AE2EnergyTunnelLoader.java
new file mode 100644
index 0000000000..f0c86a3b81
--- /dev/null
+++ b/src/main/java/gregtech/loaders/postload/GT_AE2EnergyTunnelLoader.java
@@ -0,0 +1,28 @@
+package gregtech.loaders.postload;
+
+import appeng.items.parts.PartType;
+import gregtech.GT_Mod;
+import gregtech.api.util.GT_Log;
+
+import java.lang.reflect.Field;
+
+public class GT_AE2EnergyTunnelLoader implements Runnable {
+ @Override
+ public void run() {
+ if (GT_Mod.gregtechproxy.mAE2Integration && GT_Mod.gregtechproxy.mAE2Tunnel) {
+ try {
+ load();
+ } catch (Throwable e) {
+ GT_Log.out.println("Failed to load P2P tunnel for GT electricity");
+ e.printStackTrace(GT_Log.out);
+ }
+ }
+ }
+
+ public void load() throws Throwable {
+ Field f = PartType.class.getDeclaredField("myPart");
+ f.setAccessible(true);
+ f.set(PartType.P2PTunnelEU, PartP2PGTPower.class);
+ }
+}
+
diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java
index 720ace8315..0a67aa4414 100644
--- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java
+++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java
@@ -442,8 +442,8 @@ if(Loader.isModLoaded("Railcraft")){
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Galena, 3), GT_OreDictUnificator.get(OrePrefixes.crushedPurified, Materials.Sphalerite, 1), Materials.SulfuricAcid.getFluid(4000), new FluidStack(ItemList.sIndiumConcentrate, 8000), null, 60, 150);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Aluminium, 4), null, new FluidStack(ItemList.sIndiumConcentrate, 8000), new FluidStack(ItemList.sLeadZincSolution, 8000), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Indium, 1), 50, 600);
GT_Values.RA.addElectrolyzerRecipe(null, null, new FluidStack(ItemList.sLeadZincSolution, 8000), Materials.Water.getFluid(2000), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Lead, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Silver, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Zinc, 1), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Sulfur, 3), null, null, null, 300, 192);
- GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified,Materials.Pentlandite,1), null, new FluidStack(ItemList.sNitricAcid,8000), new FluidStack(ItemList.sNickelSulfate,9000), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.PlatinumGroupSludge, 1), 50, 30);
- GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified,Materials.Chalcopyrite,1), null, new FluidStack(ItemList.sNitricAcid,8000), new FluidStack(ItemList.sBlueVitriol,9000), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.PlatinumGroupSludge, 1), 50, 30);
+ GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified,Materials.Pentlandite,1), null, new FluidStack(ItemList.sNitricAcid,1000), new FluidStack(ItemList.sNickelSulfate,9000), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.PlatinumGroupSludge, 1), 50, 30);
+ GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.crushedPurified,Materials.Chalcopyrite,1), null, new FluidStack(ItemList.sNitricAcid,1000), new FluidStack(ItemList.sBlueVitriol,9000), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.PlatinumGroupSludge, 1), 50, 30);
GT_Values.RA.addElectrolyzerRecipe(ItemList.Cell_Empty.get(1, new Object[0]), null, new FluidStack(ItemList.sBlueVitriol,9000), Materials.SulfuricAcid.getFluid(8000), GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Copper,1), GT_OreDictUnificator.get(OrePrefixes.cell,Materials.Oxygen,1), null, null, null, null, null, 900, 30);
GT_Values.RA.addElectrolyzerRecipe(ItemList.Cell_Empty.get(1, new Object[0]), null, new FluidStack(ItemList.sNickelSulfate,9000), Materials.SulfuricAcid.getFluid(8000), GT_OreDictUnificator.get(OrePrefixes.dust,Materials.Nickel,1), GT_OreDictUnificator.get(OrePrefixes.cell,Materials.Oxygen,1), null, null, null, null, null, 900, 30);
GT_Values.RA.addCentrifugeRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.PlatinumGroupSludge, 1), null, null, null, GT_OreDictUnificator.get(OrePrefixes.dust,Materials.SiliconDioxide,1), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Gold,1), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Platinum,1), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Palladium,1), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Iridium,1), GT_OreDictUnificator.get(OrePrefixes.dustTiny,Materials.Osmium,1), new int[]{10000,10000,10000,8000,6000,6000}, 900, 30);
@@ -469,8 +469,8 @@ if(Loader.isModLoaded("Railcraft")){
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.EpoxidFiberReinforced, 1), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Copper, 1), Materials.SulfuricAcid.getFluid(125), null, ItemList.Circuit_Board_Fiberglass.get(1, o), 500, 10);
GT_Values.RA.addChemicalRecipe(ItemList.Circuit_Board_Fiberglass.get(1, o), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Electrum, 16), Materials.SulfuricAcid.getFluid(250), null, ItemList.Circuit_Board_Multifiberglass.get(1, o), 100, 480);
- GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Cylinder.get(1, o), Materials.Polytetrafluoroethylene.getMolten(36), ItemList.Circuit_Parts_PetriDish.get(1, o), 160, 16);
- GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Cylinder.get(1, o), Materials.Polystyrene.getMolten(36), ItemList.Circuit_Parts_PetriDish.get(1, o), 160, 16);
+ GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Cylinder.get(0, o), Materials.Polytetrafluoroethylene.getMolten(36), ItemList.Circuit_Parts_PetriDish.get(1, o), 160, 16);
+ GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Cylinder.get(0, o), Materials.Polystyrene.getMolten(36), ItemList.Circuit_Parts_PetriDish.get(1, o), 160, 16);
GT_Values.RA.addMixerRecipe(Materials.Sugar.getDust(4), Materials.MeatRaw.getDust(1), Materials.Salt.getDustTiny(1), GT_Values.NI, GT_ModHandler.getDistilledWater(4000), Materials.GrowthMediumRaw.getFluid(4000), GT_Values.NI, 160, 16);
GT_Values.RA.addFluidHeaterRecipe(GT_Utility.getIntegratedCircuit(1), Materials.GrowthMediumRaw.getFluid(1000), Materials.GrowthMediumSterilized.getFluid(1000), 60, 24);
GT_Values.RA.addFluidHeaterRecipe(GT_Utility.getIntegratedCircuit(1), FluidRegistry.getFluidStack("potion.dragonblood", 1000), Materials.GrowthMediumSterilized.getFluid(1000), 60, 24);
@@ -503,7 +503,7 @@ if(Loader.isModLoaded("Railcraft")){
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Plastic, 1), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 2), ItemList.Circuit_Parts_Capacitor.get(2, o), 80, 96);
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Silicone, 8), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 2),Materials.Plastic.getMolten(72), ItemList.Circuit_Parts_CapacitorSMD.get(32, o), 120, 120);
GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.foil, Materials.PolyvinylChloride, 8), GT_OreDictUnificator.get(OrePrefixes.foil, Materials.Aluminium, 2),Materials.Plastic.getMolten(72), ItemList.Circuit_Parts_CapacitorSMD.get(32, o), 100, 120);
- GT_Values.RA.addExtruderRecipe(Materials.BorosilicateGlass.getIngots(1), ItemList.Shape_Extruder_Wire.get(1, new Object[0]), ItemList.Circuit_Parts_GlassFiber.get(8, new Object[0]), 160, 96);
+ GT_Values.RA.addExtruderRecipe(Materials.BorosilicateGlass.getIngots(1), ItemList.Shape_Extruder_Wire.get(0, new Object[0]), ItemList.Circuit_Parts_GlassFiber.get(8, new Object[0]), 160, 96);
GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer2.get(1, new Object[0]), GT_Utility.copyAmount(0,GT_OreDictUnificator.get(OrePrefixes.lens, Materials.EnderPearl, 1)), ItemList.Circuit_Wafer_NAND.get(1, new Object[0]), 500, 480, true);
GT_Values.RA.addLaserEngraverRecipe(ItemList.Circuit_Silicon_Wafer3.get(1, new Object[0]), GT_Utility.copyAmount(0,GT_OreDictUnificator.get(OrePrefixes.lens, Materials.EnderPearl, 1)), ItemList.Circuit_Wafer_NAND.get(4, new Object[0]), 200, 1920, true);
@@ -713,7 +713,7 @@ if(Loader.isModLoaded("Railcraft")){
GT_Values.RA.addChemicalRecipe(new ItemStack(Items.sugar), GT_OreDictUnificator.get(OrePrefixes.dustTiny, Materials.Plastic, 1), new FluidStack(ItemList.sToluene, 133), GT_Values.NF, ItemList.GelledToluene.get(2, new Object[0]), 140, 192);
GT_Values.RA.addMixerRecipe(GT_OreDictUnificator.get(OrePrefixes.cell,Materials.SulfuricAcid, 1), null, null, null, new FluidStack(ItemList.sNitricAcid,1000), new FluidStack(ItemList.sNitrationMixture, 2000), ItemList.Cell_Empty.get(1, new Object[0]), 480, 2);
- GT_Values.RA.addChemicalRecipe(ItemList.GelledToluene.get(4, new Object[0]), GT_Values.NI, new FluidStack(ItemList.sNitrationMixture,500), Materials.DilutedSulfuricAcid.getFluid(500), GT_ModHandler.getIC2Item("industrialTnt", 1L), 80, 480);
+ GT_Values.RA.addChemicalRecipe(ItemList.GelledToluene.get(4, new Object[0]), GT_Values.NI, new FluidStack(ItemList.sNitrationMixture,200), Materials.DilutedSulfuricAcid.getFluid(200), GT_ModHandler.getIC2Item("industrialTnt", 1L), 80, 480);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Hydrogen, 2L), GT_Utility.getIntegratedCircuit(4), Materials.NatruralGas.getGas(16000), Materials.Gas.getGas(16000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.HydricSulfide, 1L), Materials.Empty.getCells(1), 160);
GT_Values.RA.addChemicalRecipe(GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NatruralGas, 16L), GT_Utility.getIntegratedCircuit(4), Materials.Hydrogen.getGas(2000), Materials.HydricSulfide.getGas(1000), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Gas, 16L), 160);
@@ -2753,16 +2753,16 @@ if(Loader.isModLoaded("Railcraft")){
GT_Values.RA.addUniversalDistillationRecipe(Materials.CharcoalByproducts.getGas(1000),
new FluidStack[]{Materials.WoodTar.getFluid(250), Materials.WoodVinegar.getFluid(500), Materials.WoodGas.getGas(250)},
- Materials.Charcoal.getDustSmall(1), 200, 64);
+ Materials.Charcoal.getDustSmall(1), 40, 256);
GT_Values.RA.addUniversalDistillationRecipe(Materials.WoodGas.getGas(1000),
new FluidStack[]{Materials.CarbonDioxide.getGas(490), Materials.Ethylene.getGas(20), Materials.Methane.getGas(130), Materials.CarbonMonoxide.getGas(340), Materials.Hydrogen.getGas(20)},
- GT_Values.NI, 200, 64);
+ GT_Values.NI, 40, 256);
GT_Values.RA.addUniversalDistillationRecipe(Materials.WoodVinegar.getFluid(1000),
new FluidStack[]{Materials.AceticAcid.getFluid(100), Materials.Water.getFluid(500), Materials.Ethanol.getFluid(10), Materials.Methanol.getFluid(300), Materials.Acetone.getFluid(50), Materials.MethylAcetate.getFluid(10)},
- GT_Values.NI, 200, 64);
+ GT_Values.NI, 40, 256);
GT_Values.RA.addUniversalDistillationRecipe(Materials.WoodTar.getFluid(1000),
new FluidStack[]{Materials.Creosote.getFluid(500), Materials.Phenol.getFluid(75), Materials.Benzene.getFluid(350), Materials.Toluene.getFluid(75)},
- GT_Values.NI, 200, 64);
+ GT_Values.NI, 40, 256);
GT_Values.RA.addChemicalRecipe(Materials.Ethylene.getCells(1), Materials.AceticAcid.getCells(1), Materials.Oxygen.getGas(1000), Materials.VinylAcetate.getFluid(1000),Materials.Water.getCells(1), Materials.Empty.getCells(1), 180);
GT_Values.RA.addChemicalRecipe(Materials.AceticAcid.getCells(1),Materials.Oxygen.getCells(1), Materials.Ethylene.getGas(1000), Materials.VinylAcetate.getFluid(1000),Materials.Water.getCells(1), Materials.Empty.getCells(1), 180);
@@ -3047,12 +3047,12 @@ if(Loader.isModLoaded("Railcraft")){
GT_Values.RA.addDefaultPolymerizationRecipes(Materials.Styrene.mFluid, Materials.Styrene.getCells(1), Materials.Polystyrene.mStandardMoltenFluid);
- GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Butadiene.getCells(1), ItemList.Cell_Air.get(5, new Object[0]), Materials.Styrene.getFluid(350), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(9), Materials.Empty.getCells(6), 160, 240);
- GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Butadiene.getCells(1), Materials.Oxygen.getCells(5), Materials.Styrene.getFluid(350), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(13), Materials.Empty.getCells(6), 160, 240);
+ GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Butadiene.getCells(1), ItemList.Cell_Air.get(5, new Object[0]), Materials.Styrene.getFluid(350), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(9), Materials.Empty.getCells(6), 160, 240);
+ GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Butadiene.getCells(1), Materials.Oxygen.getCells(5), Materials.Styrene.getFluid(350), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(13), Materials.Empty.getCells(6), 160, 240);
GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Styrene.getCells(1), ItemList.Cell_Air.get(15, new Object[0]), Materials.Butadiene.getGas(3000), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(27), Materials.Empty.getCells(16), 480, 240);
GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Styrene.getCells(1), Materials.Oxygen.getCells(15), Materials.Butadiene.getGas(3000), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(41), Materials.Empty.getCells(16), 480, 240);
- GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Styrene.getCells(1), Materials.Butadiene.getCells(3), Materials.Air.getGas(15000), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(27), Materials.Empty.getCells(16), 480, 240);
- GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Styrene.getCells(1), Materials.Butadiene.getCells(3), Materials.Oxygen.getGas(15000), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(41), Materials.Empty.getCells(16), 480, 240);
+ GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Styrene.getCells(1), Materials.Butadiene.getCells(3), Materials.Air.getGas(15000), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(27), Materials.Empty.getCells(4), 480, 240);
+ GT_Values.RA.addChemicalRecipeForBasicMachineOnly(Materials.Styrene.getCells(1), Materials.Butadiene.getCells(3), Materials.Oxygen.getGas(15000), GT_Values.NF, Materials.RawStyreneButadieneRubber.getDust(41), Materials.Empty.getCells(4), 480, 240);
GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(3)}, new FluidStack[]{Materials.Styrene.getFluid(36), Materials.Butadiene.getGas(108), Materials.Air.getGas(2000)}, null, new ItemStack[]{Materials.RawStyreneButadieneRubber.getDust(1)}, 160, 240);
GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(3)}, new FluidStack[]{Materials.Styrene.getFluid(72), Materials.Butadiene.getGas(216), Materials.Oxygen.getGas(2000)}, null, new ItemStack[]{Materials.RawStyreneButadieneRubber.getDust(3)}, 160, 240);
GT_Values.RA.addMultiblockChemicalRecipe(new ItemStack[]{GT_Utility.getIntegratedCircuit(4)}, new FluidStack[]{Materials.Styrene.getFluid(540), Materials.Butadiene.getGas(1620), Materials.Titaniumtetrachloride.getFluid(100), Materials.Air.getGas(15000)}, null, new ItemStack[]{Materials.RawStyreneButadieneRubber.getDust(22), Materials.RawStyreneButadieneRubber.getDustSmall(2)}, 640, 240);
diff --git a/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java b/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java
new file mode 100644
index 0000000000..b59103f9fc
--- /dev/null
+++ b/src/main/java/gregtech/loaders/postload/PartP2PGTPower.java
@@ -0,0 +1,100 @@
+package gregtech.loaders.postload;
+
+import java.lang.reflect.Field;
+
+import appeng.api.networking.IGridNode;
+import appeng.api.networking.ticking.IGridTickable;
+import appeng.api.networking.ticking.TickRateModulation;
+import appeng.api.networking.ticking.TickingRequest;
+import appeng.parts.AEBasePart;
+import appeng.parts.p2p.PartP2PIC2Power;
+import gregtech.api.interfaces.tileentity.IEnergyConnected;
+import gregtech.api.util.GT_Log;
+import gregtech.api.util.GT_Utility;
+import net.minecraft.item.ItemStack;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraft.world.World;
+import net.minecraftforge.common.util.ForgeDirection;
+
+public class PartP2PGTPower extends PartP2PIC2Power implements IGridTickable {
+ public PartP2PGTPower(ItemStack is) {
+ super(is);
+ }
+
+ public final World getWorld() {
+ return getTile().getWorldObj();
+ }
+
+ public final int getXCoord() {
+ return getTile().xCoord;
+ }
+
+ public final short getYCoord() {
+ return (short) getTile().yCoord;
+ }
+
+ public final int getZCoord() {
+ return getTile().zCoord;
+ }
+
+ public final int getOffsetX(byte aSide, int aMultiplier) {
+ return getXCoord() + ForgeDirection.getOrientation(aSide).offsetX * aMultiplier;
+ }
+
+ public final short getOffsetY(byte aSide, int aMultiplier) {
+ return (short) (getYCoord() + ForgeDirection.getOrientation(aSide).offsetY * aMultiplier);
+ }
+
+ public final int getOffsetZ(byte aSide, int aMultiplier) {
+ return getZCoord() + ForgeDirection.getOrientation(aSide).offsetZ * aMultiplier;
+ }
+
+ public final TileEntity getTileEntity(int aX, int aY, int aZ) {
+ return getWorld().getTileEntity(aX, aY, aZ);
+ }
+
+ public final TileEntity getTileEntityAtSide(byte aSide) {
+ int tX = getOffsetX(aSide, 1), tY = getOffsetY(aSide, 1), tZ = getOffsetZ(aSide, 1);
+ return getWorld().getTileEntity(tX, tY, tZ);
+ }
+
+ public boolean outputEnergy() {
+ if (getOfferedEnergy() == 0) {
+ return false;
+ }
+ TileEntity t = getTileEntityAtSide((byte) getSide().ordinal());
+ if (t instanceof IEnergyConnected) {
+ long voltage = 8 << (getSourceTier() * 2);
+ if (voltage > getOfferedEnergy()) {
+ voltage = (long) getOfferedEnergy();
+ }
+ if (((IEnergyConnected) t).injectEnergyUnits(GT_Utility.getOppositeSide(getSide().ordinal()), voltage, 1) > 0) {
+ drawEnergy(voltage);
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public TickingRequest getTickingRequest(IGridNode iGridNode) {
+ return new TickingRequest(1, 20, false, false);
+ }
+
+ @Override
+ public TickRateModulation tickingRequest(IGridNode iGridNode, int i) {
+ return outputEnergy() ? TickRateModulation.FASTER : TickRateModulation.SLOWER;
+ }
+
+ public ForgeDirection getSide(){
+ try {
+ Field fSide = AEBasePart.class.getDeclaredField("side");
+ fSide.setAccessible(true);
+ return (ForgeDirection) fSide.get(this);
+ } catch (Exception e) {
+ GT_Log.out.println("A fatal error occured at the P2P tunnel for GT electricity");
+ e.printStackTrace(GT_Log.out);
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java
index cf216a17c3..719907d285 100644
--- a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java
+++ b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java
@@ -653,10 +653,10 @@ public class GT_Loader_Item_Block_And_Fluid
}
}
}
- GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.cobblestone, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), null, 0, false);
+ GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.cobblestone, 1, 32767), new ItemStack(Blocks.sand, 1), null, 0, false);
//GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.stone, 1, 32767), new ItemStack(Blocks.cobblestone, 1), null, 0, false);
GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.gravel, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 1L), null, 0, false);
- GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.furnace, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 8L), null, 0, false);
+ GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.furnace, 1, 32767), new ItemStack(Blocks.sand, 6), null, 0, false);
GT_ModHandler.addPulverisationRecipe(new ItemStack(Blocks.lit_furnace, 1, 32767), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Stone, 8L), null, 0, false);
GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.FierySteel, GT_ModHandler.getModItem("TwilightForest", "item.fieryIngot", 1L, 0));
@@ -722,5 +722,6 @@ public class GT_Loader_Item_Block_And_Fluid
FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(Materials.NaquadahEnriched.getMolten(1000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.NaquadahEnriched, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L)));
FluidContainerRegistry.registerFluidContainer(new FluidContainerRegistry.FluidContainerData(Materials.Naquadria.getMolten(1000L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Naquadria, 1L), GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Empty, 1L)));
+ GregTech_API.registerMachineBlock(GT_Utility.getBlockFromStack(GT_ModHandler.getIC2Item("reinforcedGlass", 0)), 0);
}
}
diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java
index 760f796ecf..fa1d85ae09 100644
--- a/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java
+++ b/src/main/java/gregtech/loaders/preload/GT_Loader_MetaTileEntities.java
@@ -357,8 +357,8 @@ public class GT_Loader_MetaTileEntities implements Runnable {
GT_ModHandler.addCraftingRecipe(ItemList.Hatch_AutoMaintenance.get(1L, new Object[0]), bitsd, new Object[]{"CHC", "AMA", "CHC", 'M', ItemList.Hull_IV,'H',ItemList.Hatch_Maintenance,'A',ItemList.Robot_Arm_IV,'C',OrePrefixes.circuit.get(Materials.Master)});
- ItemList.Hatch_DataAccess_EV.set(new GT_MetaTileEntity_Hatch_DataAccess(131, "hatch.dataaccess", "Data Access Hatch", 4).getStackForm(1L));
- ItemList.Hatch_DataAccess_LuV.set(new GT_MetaTileEntity_Hatch_DataAccess(132, "hatch.dataaccess.adv", "Advanced Data Access Hatch", 6).getStackForm(1L));
+ ItemList.Hatch_DataAccess_EV.set(new GT_MetaTileEntity_Hatch_DataAccess(131, "hatch.dataaccess", "Data Access Hatch", 4).getStackForm(1L));
+ ItemList.Hatch_DataAccess_LuV.set(new GT_MetaTileEntity_Hatch_DataAccess(132, "hatch.dataaccess.adv", "Advanced Data Access Hatch", 6).getStackForm(1L));
GT_ModHandler.addCraftingRecipe(ItemList.Hatch_DataAccess_EV.get(1L, new Object[0]), bitsd, new Object[]{"COC", "OMO", "COC", 'M', ItemList.Hull_EV, 'O', ItemList.Tool_DataStick , 'C' ,OrePrefixes.circuit.get(Materials.Elite)});
GT_ModHandler.addCraftingRecipe(ItemList.Hatch_DataAccess_LuV.get(1L, new Object[0]), bitsd, new Object[]{"COC", "OMO", "COC", 'M', ItemList.Hull_LuV, 'O', ItemList.Tool_DataOrb , 'C' ,OrePrefixes.circuit.get(Materials.Ultimate)});
@@ -1062,8 +1062,8 @@ public class GT_Loader_MetaTileEntities implements Runnable {
ItemList.Machine_ZPM_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(677, "basicmachine.e_oven.tier.07", "Advanced Electric Oven VI", 7, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L));
ItemList.Machine_UV_Oven.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(678, "basicmachine.e_oven.tier.08", "Advanced Electric Oven VII", 8, "Just a Furnace with a different Design", GT_Recipe.GT_Recipe_Map.sFurnaceRecipes, 1, 1, 0, 0, 1, "E_Oven.png", (String) GregTech_API.sSoundList.get(Integer.valueOf(207)), aBoolConst_0, aBoolConst_0, 0, "ELECTRIC_OVEN", new Object[]{"CEC", aTextCableHull, "WEW", 'M', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.HULL, 'E', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.CIRCUIT, 'W', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.WIRE, 'C', GT_MetaTileEntity_BasicMachine_GT_Recipe.X.COIL_HEATING}).getStackForm(1L));
- ItemList.Machine_LV_Miner.set(new GT_MetaTileEntity_Miner(679, "basicmachine.miner.tier.01", "Basic miner", 1).getStackForm(1L));
- ItemList.Machine_MV_Miner.set(new GT_MetaTileEntity_Miner(680, "basicmachine.miner.tier.02", "Advanced miner", 2).getStackForm(1L));
+ ItemList.Machine_LV_Miner.set(new GT_MetaTileEntity_Miner(679, "basicmachine.miner.tier.01", "Basic Miner", 1).getStackForm(1L));
+ ItemList.Machine_MV_Miner.set(new GT_MetaTileEntity_Miner(680, "basicmachine.miner.tier.02", "Advanced Miner", 2).getStackForm(1L));
GT_ModHandler.addCraftingRecipe(ItemList.Machine_LV_Miner.get(1L), bitsd, new Object[]{"EEE", aTextWireHull, "CSC", 'M', ItemList.Hull_LV, 'E', ItemList.Electric_Motor_LV, 'C', OrePrefixes.circuit.get(Materials.Basic), 'W', OrePrefixes.cableGt01.get(Materials.Tin), 'S', ItemList.Sensor_LV});
GT_ModHandler.addCraftingRecipe(ItemList.Machine_MV_Miner.get(1L), bitsd, new Object[]{"EEE", aTextWireHull, "CSC", 'M', ItemList.Hull_MV, 'E', ItemList.Electric_Motor_MV, 'C', OrePrefixes.circuit.get(Materials.Good), 'W', OrePrefixes.cableGt01.get(Materials.Copper), 'S', ItemList.Sensor_MV});
@@ -1231,8 +1231,17 @@ public class GT_Loader_MetaTileEntities implements Runnable {
GT_ModHandler.addCraftingRecipe(ItemList.Seismic_Prospector.get(1L, new Object[0]), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.Hull_Steel, 'W', OrePrefixes.plateDouble.get(Materials.Steel), 'E', OrePrefixes.circuit.get(Materials.Basic), 'C', ItemList.Sensor_LV});
GT_ModHandler.addCraftingRecipe(ItemList.Seismic_Prospector_Adv.get(1L, new Object[0]), bitsd, new Object[] { "WWW", "EME", "CCC", 'M', ItemList.Hull_EV, 'W', OrePrefixes.plateDouble.get(Materials.VanadiumSteel),'E', OrePrefixes.circuit.get(Materials.Data), 'C', ItemList.Sensor_EV });
- ItemList.OilDrill.set(new GT_MetaTileEntity_OilDrill(1157, "multimachine.oildrill", "Oil Drilling Rig").getStackForm(1));
- GT_ModHandler.addCraftingRecipe(ItemList.OilDrill.get(1L, new Object[0]), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.Hull_MV, 'W', OrePrefixes.frameGt.get(Materials.Steel), 'E', OrePrefixes.circuit.get(Materials.Good), 'C', ItemList.Electric_Motor_MV});
+ ItemList.OilDrill1.set(new GT_MetaTileEntity_OilDrill1(1157, "multimachine.oildrill1", "Oil Drilling Rig").getStackForm(1));
+ ItemList.OilDrill2.set(new GT_MetaTileEntity_OilDrill2(133, "multimachine.oildrill2", "Oil Drilling Rig II").getStackForm(1));
+ ItemList.OilDrill3.set(new GT_MetaTileEntity_OilDrill3(134, "multimachine.oildrill3", "Oil Drilling Rig III").getStackForm(1));
+ GT_ModHandler.addCraftingRecipe(ItemList.OilDrill1.get(1L, new Object[0]), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.Hull_MV, 'W', OrePrefixes.frameGt.get(Materials.Steel), 'E', OrePrefixes.circuit.get(Materials.Good), 'C', ItemList.Electric_Motor_MV});
+ GT_ModHandler.addCraftingRecipe(ItemList.OilDrill2.get(1L, new Object[0]), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.OilDrill1, 'W', OrePrefixes.frameGt.get(Materials.Titanium), 'E', OrePrefixes.circuit.get(Materials.Advanced), 'C', ItemList.Electric_Motor_HV});
+ GT_ModHandler.addCraftingRecipe(ItemList.OilDrill3.get(1L, new Object[0]), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.OilDrill2, 'W', OrePrefixes.frameGt.get(Materials.TungstenSteel), 'E', OrePrefixes.circuit.get(Materials.Data), 'C', ItemList.Electric_Motor_EV});
+
+ ItemList.ConcreteBackfiller1.set(new GT_MetaTileEntity_ConcreteBackfiller1(135, "multimachine.concretebackfiller1", "Concrete Backfiller").getStackForm(1));
+ ItemList.ConcreteBackfiller2.set(new GT_MetaTileEntity_ConcreteBackfiller2(136, "multimachine.concretebackfiller3", "Advanced Concrete Backfiller").getStackForm(1));
+ GT_ModHandler.addCraftingRecipe(ItemList.ConcreteBackfiller1.get(1L, new Object[0]), bitsd, new Object[]{"WPW", "EME", "CQC", 'M', ItemList.Hull_MV, 'W', OrePrefixes.frameGt.get(Materials.Steel), 'E', OrePrefixes.circuit.get(Materials.Good), 'C', ItemList.Electric_Motor_MV, 'P', OrePrefixes.pipeLarge.get(Materials.Steel), 'Q', ItemList.Electric_Pump_MV});
+ GT_ModHandler.addCraftingRecipe(ItemList.ConcreteBackfiller2.get(1L, new Object[0]), bitsd, new Object[]{"WPW", "EME", "CQC", 'M', ItemList.ConcreteBackfiller1, 'W', OrePrefixes.frameGt.get(Materials.Titanium), 'E', OrePrefixes.circuit.get(Materials.Data), 'C', ItemList.Electric_Motor_EV, 'P', OrePrefixes.pipeLarge.get(Materials.Steel), 'Q', ItemList.Electric_Pump_EV});
ItemList.OreDrill1.set(new GT_MetaTileEntity_OreDrillingPlant1(1158, "multimachine.oredrill1", "Ore Drilling Plant").getStackForm(1));
GT_ModHandler.addCraftingRecipe(ItemList.OreDrill1.get(1L), bitsd, new Object[]{"WWW", "EME", "CCC", 'M', ItemList.Hull_EV, 'W', OrePrefixes.frameGt.get(Materials.Titanium), 'E', OrePrefixes.circuit.get(Materials.Data), 'C', ItemList.Electric_Motor_EV});
diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang
index 08dba5530f..0249c483c7 100644
--- a/src/main/resources/assets/gregtech/lang/en_US.lang
+++ b/src/main/resources/assets/gregtech/lang/en_US.lang
@@ -253,7 +253,7 @@ achievement.gtbasiccircuit.desc=Craft a Electronic Circuit
achievement.bettercircuits=Better Circuits
achievement.bettercircuits.desc=Get Good Circuits
achievement.stepforward=Step forward
-achievement.stepforward.desc=Craft Advanced Circuits
+achievement.stepforward.desc=Obtain Advanced Circuits
achievement.gtmonosilicon=Monocrystaline Silicon Ingot
achievement.gtmonosilicon.desc=Produce a Monocrystaline Silicon Ingot
achievement.gtlogicwafer=Logic Circuit Wafer
diff --git a/src/main/resources/assets/gregtech/lang/zh_CN.lang b/src/main/resources/assets/gregtech/lang/zh_CN.lang
index aa7913fcad..257de7b66a 100644
--- a/src/main/resources/assets/gregtech/lang/zh_CN.lang
+++ b/src/main/resources/assets/gregtech/lang/zh_CN.lang
@@ -1,3 +1,16 @@
+item.gregtech:modulararmor_helmet.name=基础模块化装甲头盔
+item.gregtech:modulararmor_chestplate.name=基础模块化装甲胸甲
+item.gregtech:modulararmor_leggings.name=基础模块化装甲护腿
+item.gregtech:modulararmor_boots.name=基础模块化装甲靴子
+item.gregtech:modularelectric1_helmet.name=模块化外骨骼头盔
+item.gregtech:modularelectric1_chestplate.name=模块化外骨骼胸甲
+item.gregtech:modularelectric1_leggings.name=模块化外骨骼护腿
+item.gregtech:modularelectric1_boots.name=模块化外骨骼靴子
+item.gregtech:modularelectric2_helmet.name=模块化纳米头盔
+item.gregtech:modularelectric2_chestplate.name=模块化纳米胸甲
+item.gregtech:modularelectric2_leggings.name=模块化纳米护腿
+item.gregtech:modularelectric2_boots.name=模块化纳米靴子
+
achievement.Naquadah=找到硅岩矿石
achievement.Naquadah.desc=高度: 10-60, 几率: 10, //末地
achievement.NaquadahEnriched=找到浓缩硅岩矿石
@@ -90,8 +103,6 @@ achievement.Uranium=找到铀矿石
achievement.Uranium.desc=高度: 10-40, 几率: 40, 主世界//
achievement.Uraninite=找到晶质铀矿矿石
achievement.Uraninite.desc=高度: 10-40, 几率: 40, 主世界//
-achievement.Plutonium=找到钚矿石
-achievement.Plutonium.desc=高度: 20-30, 几率: 10, 主世界//
achievement.Bastnasite=找到氟碳铈矿矿石
achievement.Bastnasite.desc=高度: 20-40, 几率: 30, 主世界//
achievement.Monazite=找到独居石矿石
@@ -136,7 +147,7 @@ achievement.CertusQuartz=找到赛特斯石英矿石
achievement.CertusQuartz.desc=高度: 40-80, 几率: 60, 主世界//
achievement.Graphite=找到石墨矿石
achievement.Graphite.desc=高度: 5-20, 几率: 40, 主世界//
-achievement.Diamond=找到Diamond
+achievement.Diamond=找到钻石矿石
achievement.Diamond.desc=高度: 5-20, 几率: 40, 主世界//
achievement.Bentonite=找到膨润土
achievement.Bentonite.desc=高度: 10-40, 几率: 60, 主世界//末地
@@ -170,6 +181,8 @@ achievement.Emerald=找到绿宝石矿石
achievement.Emerald.desc=高度: 5-30, 几率: 30, 主世界//末地
achievement.Thorium=找到钍矿石
achievement.Thorium.desc=高度: 5-30, 几率: 30, 主世界//末地
+achievement.Oilsands=找到油砂矿石
+achievement.Oilsands.desc=高度: 50-80, 几率: 80, 主世界
achievement.flintpick=第一把工具
achievement.flintpick.desc=制造一把燧石镐
@@ -233,14 +246,32 @@ achievement.macerator=研磨
achievement.macerator.desc=制造一台蒸汽研磨机
achievement.extract=提取
achievement.extract.desc=制造一台蒸汽提取机
-achievement.smallparts=小部件
-achievement.smallparts.desc=制造存储芯片
-achievement.bettercircuits=更好的电路
-achievement.bettercircuits.desc=得到进阶电子电路
-achievement.stepforward=更进一步
-achievement.stepforward.desc=制造高级电路
-achievement.energyflow=能量流
-achievement.energyflow.desc=得到能量流电路
+achievement.smallparts=管
+achievement.smallparts.desc=制造一个真空管
+achievement.gtbasiccircuit=基础电路板
+achievement.gtbasiccircuit.desc=制造一个电路板
+achievement.bettercircuits=更好的电路板
+achievement.bettercircuits.desc=获得优质电子电路板
+achievement.stepforward=向前一步
+achievement.stepforward.desc=制造高级电路板
+achievement.gtmonosilicon=单晶硅
+achievement.gtmonosilicon.desc=制造一个单晶硅
+achievement.gtlogicwafer=集成逻辑电路芯片(晶圆)
+achievement.gtlogicwafer.desc=制造一个集成逻辑电路芯片(晶圆)
+achievement.gtlogiccircuit=集成逻辑电路芯片
+achievement.gtlogiccircuit.desc=制造一个集成逻辑电路芯片
+achievement.gtcleanroom=超净间
+achievement.gtcleanroom.desc=制造一个超净间控制器
+achievement.gtquantumprocessor=量子处理器
+achievement.gtquantumprocessor.desc=量子处理器
+achievement.energyflow=纳米处理器
+achievement.energyflow.desc=获得纳米处理器
+achievement.gtcrystalprocessor=晶体处理器
+achievement.gtcrystalprocessor.desc=获得晶体处理器
+achievement.gtwetware=湿件处理器
+achievement.gtwetware.desc=获得湿件处理器
+achievement.gtwetmain=湿件主机
+achievement.gtwetmain.desc=获得一个湿件主机
achievement.orbs=球
achievement.orbs.desc=得到一个兰波顿能量球
achievement.thatspower=这就是能量
@@ -311,6 +342,8 @@ achievement.upgradeebf=升级你的能量网
achievement.upgradeebf.desc=制造一个MV级能源输入舱
achievement.maintainance=维护
achievement.maintainance.desc=修理一台机器的所有维护问题
+achievement.upgrade=升级你的线圈
+achievement.upgrade.desc=制造一个铁铬铝合金线圈
achievement.titan=钛
achievement.titan.desc=制造一块钛锭
achievement.magic=魔法?
@@ -323,10 +356,12 @@ achievement.muchsteam=如此多的蒸汽
achievement.muchsteam.desc=启动一台大型涡轮机
achievement.efficientsteam=高效蒸汽
achievement.efficientsteam.desc=在大型涡轮机里使用过热蒸汽
-achievement.upgrade=升级你的线圈
-achievement.upgrade.desc=制造一个铁铬铝合金线圈
+achievement.upgrade2=升级你的线圈 (二级)
+achievement.upgrade2.desc=制造一个镍铬合金线圈方块
achievement.tungsten=钨
-achievement.tungsten.desc=冷却一块炙热的钨锭
+achievement.tungsten.desc=冷却一块热钨锭
+achievement.osmium=锇
+achievement.osmium.desc=冷却一块热锇锭
achievement.hightech=高科技
achievement.hightech.desc=制造一台力场产生器(LV)
achievement.amplifier=增幅器
@@ -339,23 +374,169 @@ achievement.universal=通用的
achievement.universal.desc=制造一台质量加工器
achievement.replication=复制
achievement.replication.desc=制造一台复制器
-achievement.upgrade2=升级你的线圈 (再次)
-achievement.upgrade2.desc=制造一个镍铬合金线圈
achievement.tungstensteel=钨钢
-achievement.tungstensteel.desc=冷却一块炙热的钨钢锭
+achievement.tungstensteel.desc=冷却一块热钨钢锭
+achievement.upgrade3=升级你的线圈(三级)
+achievement.upgrade3.desc=制造一个钨钢合金线圈方块
+achievement.hssg=高速钢-G
+achievement.hssg.desc=冷却一块热高速钢-G锭
+achievement.upgrade4=升级你的线圈(四级)
+achievement.upgrade4.desc=制造一个高速钢-G线圈方块
+achievement.stargatematerial=星际之门材料
+achievement.stargatematerial.desc=冷却一块热硅岩锭
achievement.conducting=超导
-achievement.conducting.desc=制造一个超导线圈
+achievement.conducting.desc=制造一个超导线圈方块
achievement.fusion=聚合
achievement.fusion.desc=制作氦离子
achievement.higherefficency=更高的效率
achievement.higherefficency.desc=制作氮离子
achievement.advancing=超前
achievement.advancing.desc=制作铕
+achievement.stargateliquid=液体的星际之门材料
+achievement.stargateliquid.desc=生产硅岩
achievement.tothelimit=寻求极限
achievement.tothelimit.desc=制作镅
-achievement.denseaspossible=尽可能致密
-achievement.denseaspossible.desc=制作0号元素
-achievement.fullefficiency=满负荷效率
+chievement.fullefficiency=满负荷效率
achievement.fullefficiency.desc=制造一台离子发电机Mk.III
+achievement.upgrade5=升级你的线圈(五级)
+achievement.upgrade5.desc=制造一个硅岩线圈方块
+achievement.alienmetallurgy=外星冶金术
+achievement.alienmetallurgy.desc=冷却一个热硅岩锭
+achievement.over9000=战斗力超过9000!
+achievement.over9000.desc=制造一个硅岩合金线圈方块
+achievement.finalpreparations=最终准备
+achievement.finalpreparations.desc=冷却一个热硅岩瑞亚锭
+achievement.denseaspossible=尽可能致密
+achievement.denseaspossible.desc=制作中子素
achievement.whatnow=接下来呢?
achievement.whatnow.desc=制作一个终极电池
+
+achievement.gt.metaitem.01.32606=LuV级电动马达
+achievement.gt.metaitem.01.32606.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32607=ZPM级电力马达
+achievement.gt.metaitem.01.32607.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32608=UV级电力马达
+achievement.gt.metaitem.01.32608.desc=捡起这个物品来在NEI里看它的合成表
+
+achievement.gt.metaitem.01.32615=LuV级电力泵
+achievement.gt.metaitem.01.32615.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32616=ZPM级电力泵
+achievement.gt.metaitem.01.32616.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32617=UV级电力泵
+achievement.gt.metaitem.01.32617.desc=捡起这个物品来在NEI里看它的合成表
+
+achievement.gt.metaitem.01.32635=LuV级传送带
+achievement.gt.metaitem.01.32635.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32636=ZPM级传送带
+achievement.gt.metaitem.01.32636.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32637=UV级传送带
+achievement.gt.metaitem.01.32637.desc=捡起这个物品来在NEI里看它的合成表
+
+achievement.gt.metaitem.01.32645=LuV级电力活塞
+achievement.gt.metaitem.01.32645.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32646=ZPM级电力活塞
+achievement.gt.metaitem.01.32646.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32647=UV级电力活塞
+achievement.gt.metaitem.01.32647.desc=捡起这个物品来在NEI里看它的合成表
+
+achievement.gt.metaitem.01.32655=LuV级机械臂
+achievement.gt.metaitem.01.32655.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32656=ZPM级机械臂
+achievement.gt.metaitem.01.32656.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32657=UV级机械臂
+achievement.gt.metaitem.01.32657.desc=捡起这个物品来在NEI里看它的合成表
+
+achievement.gt.metaitem.01.32675=LuV级力场发生器
+achievement.gt.metaitem.01.32675.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32676=ZPM级力场发生器
+achievement.gt.metaitem.01.32676.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32677=UV级力场发生器
+achievement.gt.metaitem.01.32677.desc=捡起这个物品来在NEI里看它的合成表
+
+achievement.gt.metaitem.01.32685=LuV级发射器
+achievement.gt.metaitem.01.32685.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32686=ZPM级发射器
+achievement.gt.metaitem.01.32686.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32687=UV级发射器
+achievement.gt.metaitem.01.32687.desc=捡起这个物品来在NEI里看它的合成表
+
+achievement.gt.metaitem.01.32695=LuV级传感器
+achievement.gt.metaitem.01.32695.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32696=ZPM级传感器
+achievement.gt.metaitem.01.32696.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32697=UV级传感器
+achievement.gt.metaitem.01.32697.desc=捡起这个物品来在NEI里看它的合成表
+
+achievement.gt.blockmachines.fusioncomputer.tier.06=核聚变反应堆控制电脑Mk I
+achievement.gt.blockmachines.fusioncomputer.tier.06.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.blockmachines.fusioncomputer.tier.07=核聚变反应堆控制电脑Mk II
+achievement.gt.blockmachines.fusioncomputer.tier.07.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.blockmachines.fusioncomputer.tier.08=核聚变反应堆控制电脑Mk III
+achievement.gt.blockmachines.fusioncomputer.tier.08.desc=捡起这个物品来在NEI里看它的合成表
+
+achievement.gt.metaitem.03.32072=神经元处理器
+achievement.gt.metaitem.03.32072.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.03.32095=湿件主机
+achievement.gt.metaitem.03.32095.desc=捡起这个物品来在NEI里看它的合成表
+
+achievement.item.NanoCircuit=Nano Circuit
+achievement.item.NanoCircuit.desc=捡起这个物品来在NEI里看它的合成表
+achievement.item.PikoCircuit=Piko Circuit
+achievement.item.PikoCircuit.desc=捡起这个物品来在NEI里看它的合成表
+achievement.item.QuantumCircuit=Quantum Circuit
+achievement.item.QuantumCircuit.desc=捡起这个物品来在NEI里看它的合成表
+
+achievement.gt.metaitem.01.32605=终极电池
+achievement.gt.metaitem.01.32605.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32609=真正的终极电池
+achievement.gt.metaitem.01.32609.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32736=能量模块
+achievement.gt.metaitem.01.32736.desc=捡起这个物品来在NEI里看它的合成表
+achievement.gt.metaitem.01.32737=能量簇
+achievement.gt.metaitem.01.32737.desc=捡起这个物品来在NEI里看它的合成表
+
+achievement.ic2.itemArmorQuantumHelmet=量子头盔
+achievement.ic2.itemArmorQuantumHelmet.desc=捡起这个物品来在NEI里看它的合成表
+achievement.ic2.itemArmorQuantumChestplate=量子胸甲
+achievement.ic2.itemArmorQuantumChestplate.desc=捡起这个物品来在NEI里看它的合成表
+achievement.ic2.itemArmorQuantumLegs=量子护腿
+achievement.ic2.itemArmorQuantumLegs.desc=捡起这个物品来在NEI里看它的合成表
+achievement.ic2.itemArmorQuantumBoots=量子靴子
+achievement.ic2.itemArmorQuantumBoots.desc=捡起这个物品来在NEI里看它的合成表
+
+achievement.item.graviChestPlate=重力胸甲
+achievement.item.graviChestPlate.desc=捡起这个物品来在NEI里看它的合成表
+
+for.bees.species.clay=粘土
+for.bees.species.slimeball=史莱姆球
+for.bees.species.peat=褐煤
+for.bees.species.stickyresin=粘性树脂
+for.bees.species.coal=煤炭
+for.bees.species.oil=石油
+for.bees.species.redstone=红石
+for.bees.species.lapis=青金石
+for.bees.species.certus=下界石英
+for.bees.species.ruby=红宝石
+for.bees.species.sapphire=蓝宝石
+for.bees.species.diamond=钻石
+for.bees.species.olivine=橄榄石
+for.bees.species.emerald=绿宝石
+for.bees.species.copper=铜
+for.bees.species.tin=锡
+for.bees.species.lead=铅
+for.bees.species.iron=铁
+for.bees.species.steel=钢
+for.bees.species.nickel=镍
+for.bees.species.zinc=锌
+for.bees.species.silver=银
+for.bees.species.gold=金
+for.bees.species.aluminium=铝
+for.bees.species.titanium=钛
+for.bees.species.chrome=铬
+for.bees.species.manganese=锰
+for.bees.species.tungsten=钨
+for.bees.species.platinum=铂
+for.bees.species.iridium=铱
+for.bees.species.uranium=铀
+for.bees.species.plutonium=钚
+for.bees.species.naquadah=硅岩