Skip to content

Commit

Permalink
Fix matter upgrader clearing ownership (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonovanDMC committed Oct 28, 2022
1 parent 4ca9d41 commit f59c772
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit f59c772

Please sign in to comment.