aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity
diff options
context:
space:
mode:
authorAlkalus <3060479+draknyte1@users.noreply.github.com>2019-10-10 18:44:32 +0100
committerAlkalus <3060479+draknyte1@users.noreply.github.com>2019-10-10 18:44:32 +0100
commit9c71ae70fc2276b4c56baa26217be2d23dde63b6 (patch)
treea409249e197be63c75b4822038ba04897c59009d /src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity
parentab84b1d95f8c4880891debc594a41f57941de78a (diff)
downloadGT5-Unofficial-9c71ae70fc2276b4c56baa26217be2d23dde63b6.tar.gz
GT5-Unofficial-9c71ae70fc2276b4c56baa26217be2d23dde63b6.tar.bz2
GT5-Unofficial-9c71ae70fc2276b4c56baa26217be2d23dde63b6.zip
+ Added OD tag 'rodBlaze' to blaze rods.
$ Corrected certain multiblocks not counting their casings during construction. Fixes #549. $ Stopped custom MTE's incorrectly handling getDrops(). Fixes #553. $ Stopped GT++ Multis trying to reduce the 'wait' time on themselves when placed or first loaded. Fixes #556.
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java38
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java4
2 files changed, 31 insertions, 11 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java
index e637365c1e..f6bec1f402 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/BaseCustomTileEntity.java
@@ -11,6 +11,7 @@ import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_Utility;
import gregtech.common.GT_Pollution;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy;
@@ -96,17 +97,36 @@ public class BaseCustomTileEntity extends BaseMetaTileEntity {
}
public ArrayList<ItemStack> getDrops() {
- ItemStack rStack = new ItemStack(Meta_GT_Proxy.sBlockMachines, 1, this.getMetaTileID());
- NBTTagCompound aSuperNBT = super.getDrops().get(0).getTagCompound();
- NBTTagCompound tNBT = aSuperNBT;
- if (this.hasValidMetaTileEntity()) {
- this.mMetaTileEntity.setItemNBT(tNBT);
+ ArrayList<ItemStack> aDrops = new ArrayList<ItemStack>();
+ ItemStack rStack = new ItemStack(GregTech_API.sBlockMachines, 1, this.getMetaTileID());
+ // Currently not using my custom block.
+ // ItemStack rStack = new ItemStack(Meta_GT_Proxy.sBlockMachines, 1,
+ // this.getMetaTileID());
+ boolean fail = true;
+
+ ArrayList<ItemStack> aSuperDrops = super.getDrops();
+ if (aSuperDrops != null && !aSuperDrops.isEmpty()) {
+ ItemStack aSuperStack = super.getDrops().get(0);
+ if (aSuperStack != null && aSuperStack.hasTagCompound()) {
+ NBTTagCompound aSuperNBT = aSuperStack.getTagCompound();
+ if (aSuperNBT != null && !aSuperNBT.hasNoTags()) {
+ NBTTagCompound tNBT = (NBTTagCompound) aSuperNBT.copy();
+ if (tNBT != null && !tNBT.hasNoTags()) {
+ if (this.hasValidMetaTileEntity()) {
+ this.mMetaTileEntity.setItemNBT(tNBT);
+ rStack.setTagCompound(tNBT);
+ fail = false;
+ aDrops.add(rStack);
+ }
+ }
+ }
+
+ }
}
- if (!tNBT.hasNoTags()) {
- rStack.setTagCompound(tNBT);
+ if (fail) {
+ aDrops.add(rStack);
}
-
- return new ArrayList<ItemStack>(Arrays.asList(new ItemStack[] { rStack }));
+ return aDrops;
}
public boolean isTeleporterCompatible(Direction aSide) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
index b556dc10f9..c16f62866f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
@@ -2232,9 +2232,9 @@ GT_MetaTileEntity_MultiBlockBase {
}
private final void tryTickWaitTimerDown() {
- if (mStartUpCheck > 10) {
+ /*if (mStartUpCheck > 10) {
mStartUpCheck = 10;
- }
+ }*/
}