From f59c772038c5fb987a7f5b41658dd26483ca51d7 Mon Sep 17 00:00:00 2001 From: Donovan Daniels Date: Fri, 28 Oct 2022 02:02:51 -0500 Subject: [PATCH] Fix matter upgrader clearing ownership (#75) --- .../mc/forge/projectexpansion/item/ItemMatterUpgrader.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/cool/furry/mc/forge/projectexpansion/item/ItemMatterUpgrader.java b/src/main/java/cool/furry/mc/forge/projectexpansion/item/ItemMatterUpgrader.java index 1aea6f89..e4fc1c4b 100644 --- a/src/main/java/cool/furry/mc/forge/projectexpansion/item/ItemMatterUpgrader.java +++ b/src/main/java/cool/furry/mc/forge/projectexpansion/item/ItemMatterUpgrader.java @@ -19,6 +19,7 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.ItemUseContext; +import net.minecraft.nbt.CompoundNBT; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ActionResultType; import net.minecraft.util.math.BlockPos; @@ -135,6 +136,7 @@ public ActionResultType onItemUseFirst(ItemStack stack, ItemUseContext context) newTile.owner = owner; newTile.ownerName = ownerName; newTile.emc = emc; + tile.write(new CompoundNBT()); newTile.markDirty(); world.removeTileEntity(pos); world.setTileEntity(pos, newTile);