Search in sources :

Example 11 with BlockEntity

use of net.minecraft.world.level.block.entity.BlockEntity in project MinecraftForge by MinecraftForge.

the class ForgeFlowingFluid method beforeDestroyingBlock.

@Override
protected void beforeDestroyingBlock(LevelAccessor worldIn, BlockPos pos, BlockState state) {
    BlockEntity blockEntity = state.hasBlockEntity() ? worldIn.getBlockEntity(pos) : null;
    Block.dropResources(state, worldIn, pos, blockEntity);
}
Also used : BlockEntity(net.minecraft.world.level.block.entity.BlockEntity)

Aggregations

BlockEntity (net.minecraft.world.level.block.entity.BlockEntity)11 BlockPos (net.minecraft.core.BlockPos)8 CompoundTagBuilder (com.denizenscript.denizen.nms.util.jnbt.CompoundTagBuilder)2 LocationTag (com.denizenscript.denizen.objects.LocationTag)2 MaterialTag (com.denizenscript.denizen.objects.MaterialTag)2 PlayerTag (com.denizenscript.denizen.objects.PlayerTag)2 DurationTag (com.denizenscript.denizencore.objects.core.DurationTag)2 Level (net.minecraft.world.level.Level)2 SignBlockEntity (net.minecraft.world.level.block.entity.SignBlockEntity)2 BlockState (net.minecraft.world.level.block.state.BlockState)2 IModelData (net.minecraftforge.client.model.data.IModelData)2 CompoundTag (com.denizenscript.denizen.nms.util.jnbt.CompoundTag)1 DenizenNetworkManagerImpl (com.denizenscript.denizen.nms.v1_17.impl.network.handlers.DenizenNetworkManagerImpl)1 DenizenNetworkManagerImpl (com.denizenscript.denizen.nms.v1_18.impl.network.handlers.DenizenNetworkManagerImpl)1 Preconditions (com.google.common.base.Preconditions)1 WeakReference (java.lang.ref.WeakReference)1 Collections (java.util.Collections)1 HashSet (java.util.HashSet)1 Map (java.util.Map)1 Set (java.util.Set)1