use of net.minecraft.world.Clearable in project FastAsyncWorldEdit by IntellectualSites.
the class PaperweightAdapter method clearContainerBlockContents.
@Override
public boolean clearContainerBlockContents(org.bukkit.World world, BlockVector3 pt) {
ServerLevel originalWorld = ((CraftWorld) world).getHandle();
BlockEntity entity = originalWorld.getBlockEntity(new BlockPos(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()));
if (entity instanceof Clearable) {
((Clearable) entity).clearContent();
return true;
}
return false;
}
Aggregations