diff options
author | Alexdoru <57050655+Alexdoru@users.noreply.github.com> | 2024-11-12 12:53:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-12 11:53:07 +0000 |
commit | c1a110a7fba458ef691cb31cf9bec4f8e988cf32 (patch) | |
tree | 5f351943b64b1b395b2937d9059b579e6f98b9ae /src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java | |
parent | ddd00719ff3287b6bd3f9444ce223ef869f86878 (diff) | |
download | GT5-Unofficial-c1a110a7fba458ef691cb31cf9bec4f8e988cf32.tar.gz GT5-Unofficial-c1a110a7fba458ef691cb31cf9bec4f8e988cf32.tar.bz2 GT5-Unofficial-c1a110a7fba458ef691cb31cf9bec4f8e988cf32.zip |
Delete NBT data about crafting components on MetaTileEntity (#3476)
Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java')
-rw-r--r-- | src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index da81e7d9cb..36c3fc3f04 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -126,7 +126,6 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity private long mLastCheckTick = 0; private String mOwnerName = ""; private UUID mOwnerUuid = GTUtility.defaultUuid; - private NBTTagCompound mRecipeStuff = new NBTTagCompound(); private int cableUpdateDelay = 30; public BaseMetaTileEntity() {} @@ -158,7 +157,6 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity nbt.setBoolean("mWorks", !mWorks); nbt.setBoolean("mInputDisabled", mInputDisabled); nbt.setBoolean("mOutputDisabled", mOutputDisabled); - nbt.setTag("GT.CraftingComponents", mRecipeStuff); nbt.setString("shutDownReasonID", getLastShutDownReason().getID()); nbt.setTag("shutDownReason", getLastShutDownReason().writeToNBT(new NBTTagCompound())); } catch (Throwable e) { @@ -215,7 +213,6 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity mOtherUpgrades = (byte) (aNBT.getByte("mOtherUpgrades") + aNBT.getByte("mBatteries") + aNBT.getByte("mLiBatteries")); - mRecipeStuff = aNBT.getCompoundTag("GT.CraftingComponents"); final int nbtVersion = aNBT.getInteger("nbtVersion"); readCoverNBT(aNBT); loadMetaTileNBT(aNBT); @@ -1412,14 +1409,6 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity } } } - if (mRecipeStuff != null) { - for (int i = 0; i < 9; i++) { - if (this.getRandomNumber(100) < 50) { - dropItems(GTUtility.loadItem(mRecipeStuff, "Ingredient." + i)); - } - } - } - Pollution.addPollution((TileEntity) this, GTMod.gregtechproxy.mPollutionOnExplosion); mMetaTileEntity.doExplosion(aAmount); } @@ -1455,10 +1444,9 @@ public class BaseMetaTileEntity extends CommonMetaTileEntity public ArrayList<ItemStack> getDrops() { final ItemStack rStack = new ItemStack(GregTechAPI.sBlockMachines, 1, mID); final NBTTagCompound tNBT = new NBTTagCompound(); - if (mRecipeStuff != null && !mRecipeStuff.hasNoTags()) tNBT.setTag("GT.CraftingComponents", mRecipeStuff); - if (mMuffler) tNBT.setBoolean("mMuffler", mMuffler); - if (mLockUpgrade) tNBT.setBoolean("mLockUpgrade", mLockUpgrade); - if (mSteamConverter) tNBT.setBoolean("mSteamConverter", mSteamConverter); + if (mMuffler) tNBT.setBoolean("mMuffler", true); + if (mLockUpgrade) tNBT.setBoolean("mLockUpgrade", true); + if (mSteamConverter) tNBT.setBoolean("mSteamConverter", true); if (mColor > 0) tNBT.setByte("mColor", mColor); if (mOtherUpgrades > 0) tNBT.setByte("mOtherUpgrades", mOtherUpgrades); |