use of com.bergerkiller.generated.net.minecraft.server.TileEntityHandle in project BKCommonLib by bergerhealer.
the class NMSTileEntity method getBlock.
public static Block getBlock(Object tileEntity) {
TileEntityHandle handle = TileEntityHandle.createHandle(tileEntity);
BlockPositionHandle pos = handle.getPosition();
return handle.getWorld().getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
}
use of com.bergerkiller.generated.net.minecraft.server.TileEntityHandle in project BKCommonLib by bergerhealer.
the class WrapperConversion method getBlockFromTileEntity.
@ConverterMethod(input = "net.minecraft.server.TileEntity")
public static org.bukkit.block.Block getBlockFromTileEntity(Object nmsTileEntityHandle) {
TileEntityHandle handle = TileEntityHandle.createHandle(nmsTileEntityHandle);
BlockPositionHandle pos = handle.getPosition();
return handle.getWorld().getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
}
Aggregations