diff options
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity')
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; - } + }*/ } |