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 13361b2 commit d5445b4
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import moze_intel.projecte.api.capabilities.IKnowledgeProvider;
import moze_intel.projecte.api.proxy.IEMCProxy;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
import net.minecraft.network.chat.TranslatableComponent;
import net.minecraft.world.InteractionResult;
Expand Down Expand Up @@ -132,6 +133,7 @@ public InteractionResult onItemUseFirst(ItemStack stack, UseOnContext context) {
newTile.owner = owner;
newTile.ownerName = ownerName;
newTile.emc = emc;
newTile.saveAdditional(new CompoundTag());
level.removeBlockEntity(pos);
level.setBlockEntity(newTile);
Util.markDirty(level, pos);
Expand Down

0 comments on commit d5445b4

Please sign in to comment.