use of net.minecraft.server.v1_12_R1.BlockJukeBox.TileEntityRecordPlayer in project PaperDev by Kamillaova.
the class CraftJukebox method eject.
@Override
public boolean eject() {
requirePlaced();
TileEntity tileEntity = this.getTileEntityFromWorld();
if (!(tileEntity instanceof TileEntityRecordPlayer))
return false;
TileEntityRecordPlayer jukebox = (TileEntityRecordPlayer) tileEntity;
boolean result = !jukebox.getRecord().isEmpty();
CraftWorld world = (CraftWorld) this.getWorld();
((BlockJukeBox) Blocks.JUKEBOX).dropRecord(world.getHandle(), new BlockPosition(getX(), getY(), getZ()), null);
return result;
}
Aggregations