me.getWorld() 获取。
实体查询
Entity getEntity(int id)
Entity getEntityById(int id)
List<Entity> getEntities()
List<Entity> getPlayerEntities() // 世界里的玩家(含自己)
List<Entity> getItemEntities() // 掉落物
List<Entity> getMobEntities() // 生物
void removeEntity(int id)
void removeEntity(Entity entity)
Tab-list 玩家(不在视距也能拿)
List<NetworkPlayer> getNetworkPlayers()
方块查询
Block getBlockAt(int x, int y, int z)
Block getBlockAt(double x, double y, double z)
Block getBlockAt(Vec3 pos)
String getBlockId(int x, int y, int z) // "minecraft:stone"
boolean isAir(int x, int y, int z)
boolean isSolid(int x, int y, int z)
boolean isReplaceable(int x, int y, int z) // 空气 / 水 / 草 / 雪层等
boolean isInteractable(int x, int y, int z) // 箱子 / 门 / 按钮等
Tile Entities(已加载区块)
List<TileEntity> getTileEntities()
Scoreboard / Teams
List<String> getScoreboard() // 侧边栏,按分降序
Map<String, List<String>> getTeams() // teamName -> members
世界属性
String getDimension() // "minecraft:overworld"
long getTime()
long getDayTime()
boolean isDay()
boolean isNight()
boolean isRaining()
boolean isThundering()
int getMinBuildHeight()
int getMaxBuildHeight()
原生访问
net.minecraft.client.multiplayer.ClientLevel raw()