From a6f5c51d6a3a2c971d6a4f40cfdc3ee4499b63d9 Mon Sep 17 00:00:00 2001 From: VoidLeech Date: Fri, 5 Jul 2024 01:08:44 +0200 Subject: [PATCH] Preserve getOrCreateStack --- .../simibubi/create/content/equipment/armor/BacktankBlock.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/simibubi/create/content/equipment/armor/BacktankBlock.java b/src/main/java/com/simibubi/create/content/equipment/armor/BacktankBlock.java index aa07e001f..59ca29710 100644 --- a/src/main/java/com/simibubi/create/content/equipment/armor/BacktankBlock.java +++ b/src/main/java/com/simibubi/create/content/equipment/armor/BacktankBlock.java @@ -158,7 +158,7 @@ public class BacktankBlock extends HorizontalKineticBlock ItemStack stack = new ItemStack(item); Optional blockEntityOptional = getBlockEntityOptional(blockGetter, pos); - CompoundTag tag = blockEntityOptional.map(BacktankBlockEntity::getFullNbt).orElse(stack.getOrCreateTag()); + CompoundTag tag = stack.getOrCreateTag().merge(blockEntityOptional.map(BacktankBlockEntity::getFullNbt).orElse(new CompoundTag())); int air = blockEntityOptional.map(BacktankBlockEntity::getAirLevel) .orElse(0);