Java Code Examples for cn.nukkit.blockentity.BlockEntity#getLevel()
The following examples show how to use
cn.nukkit.blockentity.BlockEntity#getLevel() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Level.java From Jupiter with GNU General Public License v3.0 | 5 votes |
public void addBlockEntity(BlockEntity blockEntity) { if (blockEntity.getLevel() != this) { throw new LevelException("Invalid Block Entity level"); } blockEntities.put(blockEntity.getId(), blockEntity); this.clearChunkCache((int) blockEntity.getX() >> 4, (int) blockEntity.getZ() >> 4); }
Example 2
Source File: Level.java From Jupiter with GNU General Public License v3.0 | 5 votes |
public void removeBlockEntity(BlockEntity blockEntity) { if (blockEntity.getLevel() != this) { throw new LevelException("Invalid Block Entity level"); } blockEntities.remove(blockEntity.getId()); updateBlockEntities.remove(blockEntity.getId()); this.clearChunkCache((int) blockEntity.getX() >> 4, (int) blockEntity.getZ() >> 4); }
Example 3
Source File: Level.java From Nukkit with GNU General Public License v3.0 | 5 votes |
public void removeBlockEntity(BlockEntity blockEntity) { if (blockEntity.getLevel() != this) { throw new LevelException("Invalid Block Entity level"); } blockEntities.remove(blockEntity.getId()); updateBlockEntities.remove(blockEntity.getId()); }
Example 4
Source File: Level.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public void addBlockEntity(BlockEntity blockEntity) { if (blockEntity.getLevel() != this) { throw new LevelException("Invalid Block Entity level"); } blockEntities.put(blockEntity.getId(), blockEntity); }
Example 5
Source File: Level.java From Nukkit with GNU General Public License v3.0 | 4 votes |
public void addBlockEntity(BlockEntity blockEntity) { if (blockEntity.getLevel() != this) { throw new LevelException("Invalid Block Entity level"); } blockEntities.put(blockEntity.getId(), blockEntity); }