TileEntityMagicApiary.java 文件源码

java
阅读 32 收藏 0 点赞 0 评论 0

项目:MagicBees 作者:
@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;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号