Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
fixed drums voiding covers on place
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed May 31, 2024
1 parent b709527 commit 0c8d339
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ public void onDrop(BlockState state, LootContext.Builder builder, List<ItemStack

@Override
public void onPlacedBy(Level world, BlockPos pos, BlockState state, @org.jetbrains.annotations.Nullable LivingEntity placer, ItemStack stack) {
super.onPlacedBy(world, pos, state, placer, stack);
CompoundTag nbt = stack.getTag();
this.fluidHandler.ifPresent(f -> {
FluidHolder fluid = nbt != null && nbt.contains("Fluid") ? FluidHooks.fluidFromCompound(nbt.getCompound("Fluid")) : FluidHooks.safeGetItemFluidManager(stack).map(fi -> fi.getFluidInTank(0)).orElse(FluidHooks.emptyFluid());
Expand Down

0 comments on commit 0c8d339

Please sign in to comment.