mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-27 07:27:15 +01:00
Preserve getOrCreateStack
This commit is contained in:
parent
d67f345146
commit
a6f5c51d6a
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ public class BacktankBlock extends HorizontalKineticBlock
|
|||
ItemStack stack = new ItemStack(item);
|
||||
Optional<BacktankBlockEntity> 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);
|
||||
|
|
Loading…
Reference in a new issue