当前位置: 首页>>代码示例>>Java>>正文


Java World.isLoaded方法代码示例

本文整理汇总了Java中net.minecraft.server.World.isLoaded方法的典型用法代码示例。如果您正苦于以下问题:Java World.isLoaded方法的具体用法?Java World.isLoaded怎么用?Java World.isLoaded使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.server.World的用法示例。


在下文中一共展示了World.isLoaded方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: updateNearbyBlocks

import net.minecraft.server.World; //导入方法依赖的package包/类
private void updateNearbyBlocks(World world, int x, int y, int z, int radius, boolean updateSelf)
{
    // If the block in question is loaded
    if ( world.isLoaded( x, y, z ) )
    {
        // Get block id
        int id = world.getTypeId( x, y, z );

        // See if it needs update
        if ( updateSelf && obfuscateBlocks[id] )
        {
            // Send the update
            world.notify( x, y, z );
        }

        // Check other blocks for updates
        if ( radius > 0 )
        {
            updateNearbyBlocks( world, x + 1, y, z, radius - 1, true );
            updateNearbyBlocks( world, x - 1, y, z, radius - 1, true );
            updateNearbyBlocks( world, x, y + 1, z, radius - 1, true );
            updateNearbyBlocks( world, x, y - 1, z, radius - 1, true );
            updateNearbyBlocks( world, x, y, z + 1, radius - 1, true );
            updateNearbyBlocks( world, x, y, z - 1, radius - 1, true );
        }
    }
}
 
开发者ID:AlmuraDev,项目名称:Almura-Server,代码行数:28,代码来源:AntiXray.java

示例2: isLoaded

import net.minecraft.server.World; //导入方法依赖的package包/类
private static boolean isLoaded(World world, int x, int y, int z, int radius)
{
    return world.isLoaded( x, y, z )
            || ( radius > 0
            && ( isLoaded( world, x + 1, y, z, radius - 1 )
            || isLoaded( world, x - 1, y, z, radius - 1 )
            || isLoaded( world, x, y + 1, z, radius - 1 )
            || isLoaded( world, x, y - 1, z, radius - 1 )
            || isLoaded( world, x, y, z + 1, radius - 1 )
            || isLoaded( world, x, y, z - 1, radius - 1 ) ) );
}
 
开发者ID:AlmuraDev,项目名称:Almura-Server,代码行数:12,代码来源:AntiXray.java

示例3: updateNearbyBlocks

import net.minecraft.server.World; //导入方法依赖的package包/类
private void updateNearbyBlocks(World world, int x, int y, int z, int radius, boolean updateSelf)
{
    // If the block in question is loaded
    if ( world.isLoaded( x, y, z ) )
    {
        // Get block id
        Block block = world.getType(x, y, z);

        // See if it needs update
        if ( updateSelf && obfuscateBlocks[Block.getId( block )] )
        {
            // Send the update
            world.notify( x, y, z );
        }

        // Check other blocks for updates
        if ( radius > 0 )
        {
            updateNearbyBlocks( world, x + 1, y, z, radius - 1, true );
            updateNearbyBlocks( world, x - 1, y, z, radius - 1, true );
            updateNearbyBlocks( world, x, y + 1, z, radius - 1, true );
            updateNearbyBlocks( world, x, y - 1, z, radius - 1, true );
            updateNearbyBlocks( world, x, y, z + 1, radius - 1, true );
            updateNearbyBlocks( world, x, y, z - 1, radius - 1, true );
        }
    }
}
 
开发者ID:pvginkel,项目名称:Tweakkit-Server,代码行数:28,代码来源:AntiXray.java

示例4: isLoaded

import net.minecraft.server.World; //导入方法依赖的package包/类
private static boolean isLoaded(World world, int x, int y, int z, int radius)
{
    return world.isLoaded( x, y, z )
            && ( radius == 0 ||
            ( isLoaded( world, x + 1, y, z, radius - 1 )
            && isLoaded( world, x - 1, y, z, radius - 1 )
            && isLoaded( world, x, y + 1, z, radius - 1 )
            && isLoaded( world, x, y - 1, z, radius - 1 )
            && isLoaded( world, x, y, z + 1, radius - 1 )
            && isLoaded( world, x, y, z - 1, radius - 1 ) ) );
}
 
开发者ID:pvginkel,项目名称:Tweakkit-Server,代码行数:12,代码来源:AntiXray.java


注:本文中的net.minecraft.server.World.isLoaded方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。