@SuppressWarnings("unchecked")
private boolean searchChunkForBooster(Chunk chunk) {
Vec3 apiaryPos = Vec3.createVectorHelper(xCoord, yCoord, zCoord);
for (Map.Entry<ChunkPosition, TileEntity> entry : ((Map<ChunkPosition, TileEntity>)chunk.chunkTileEntityMap).entrySet()) {
TileEntity entity = entry.getValue();
if (entity instanceof IMagicApiaryAuraProvider) {
Vec3 tePos = Vec3.createVectorHelper(entity.xCoord, entity.yCoord, entity.zCoord);
Vec3 result = apiaryPos.subtract(tePos);
if (result.lengthVector() <= AURAPROVIDER_SEARCH_RADIUS) {
saveAuraProviderPosition(entity.xCoord, entity.yCoord, entity.zCoord);
this.auraProvider = (IMagicApiaryAuraProvider)entity;
return true;
}
}
}
return false;
}
TileEntityMagicApiary.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:MagicBees
作者:
评论列表
文章目录