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


Java Village.getDoorInfo方法代码示例

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


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

示例1: shouldExecute

import net.minecraft.village.Village; //导入方法依赖的package包/类
/**
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute()
{
    BlockPos blockpos = new BlockPos(this.entityObj);

    if ((!this.entityObj.worldObj.isDaytime() || this.entityObj.worldObj.isRaining() && !this.entityObj.worldObj.getBiomeGenForCoords(blockpos).canSpawnLightningBolt()) && !this.entityObj.worldObj.provider.getHasNoSky())
    {
        if (this.entityObj.getRNG().nextInt(50) != 0)
        {
            return false;
        }
        else if (this.insidePosX != -1 && this.entityObj.getDistanceSq((double)this.insidePosX, this.entityObj.posY, (double)this.insidePosZ) < 4.0D)
        {
            return false;
        }
        else
        {
            Village village = this.entityObj.worldObj.getVillageCollection().getNearestVillage(blockpos, 14);

            if (village == null)
            {
                return false;
            }
            else
            {
                this.doorInfo = village.getDoorInfo(blockpos);
                return this.doorInfo != null;
            }
        }
    }
    else
    {
        return false;
    }
}
 
开发者ID:Notoh,项目名称:DecompiledMinecraft,代码行数:38,代码来源:EntityAIMoveIndoors.java

示例2: shouldExecute

import net.minecraft.village.Village; //导入方法依赖的package包/类
/**
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute()
{
    BlockPos blockpos = new BlockPos(this.entityObj);

    if ((!this.entityObj.world.isDaytime() || this.entityObj.world.isRaining() && !this.entityObj.world.getBiome(blockpos).canRain()) && this.entityObj.world.provider.func_191066_m())
    {
        if (this.entityObj.getRNG().nextInt(50) != 0)
        {
            return false;
        }
        else if (this.insidePosX != -1 && this.entityObj.getDistanceSq((double)this.insidePosX, this.entityObj.posY, (double)this.insidePosZ) < 4.0D)
        {
            return false;
        }
        else
        {
            Village village = this.entityObj.world.getVillageCollection().getNearestVillage(blockpos, 14);

            if (village == null)
            {
                return false;
            }
            else
            {
                this.doorInfo = village.getDoorInfo(blockpos);
                return this.doorInfo != null;
            }
        }
    }
    else
    {
        return false;
    }
}
 
开发者ID:sudofox,项目名称:Backmemed,代码行数:38,代码来源:EntityAIMoveIndoors.java

示例3: shouldExecute

import net.minecraft.village.Village; //导入方法依赖的package包/类
/**
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute()
{
    BlockPos blockpos = new BlockPos(this.entityObj);

    if ((!this.entityObj.worldObj.isDaytime() || this.entityObj.worldObj.isRaining() && !this.entityObj.worldObj.getBiome(blockpos).canRain()) && !this.entityObj.worldObj.provider.getHasNoSky())
    {
        if (this.entityObj.getRNG().nextInt(50) != 0)
        {
            return false;
        }
        else if (this.insidePosX != -1 && this.entityObj.getDistanceSq((double)this.insidePosX, this.entityObj.posY, (double)this.insidePosZ) < 4.0D)
        {
            return false;
        }
        else
        {
            Village village = this.entityObj.worldObj.getVillageCollection().getNearestVillage(blockpos, 14);

            if (village == null)
            {
                return false;
            }
            else
            {
                this.doorInfo = village.getDoorInfo(blockpos);
                return this.doorInfo != null;
            }
        }
    }
    else
    {
        return false;
    }
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:38,代码来源:EntityAIMoveIndoors.java

示例4: shouldExecute

import net.minecraft.village.Village; //导入方法依赖的package包/类
/**
 * Returns whether the EntityAIBase should begin execution.
 */
public boolean shouldExecute()
{
    BlockPos blockpos = new BlockPos(this.entityObj);

    if ((!this.entityObj.worldObj.isDaytime() || this.entityObj.worldObj.isRaining() && !this.entityObj.worldObj.getBiomeGenForCoords(blockpos).canRain()) && !this.entityObj.worldObj.provider.getHasNoSky())
    {
        if (this.entityObj.getRNG().nextInt(50) != 0)
        {
            return false;
        }
        else if (this.insidePosX != -1 && this.entityObj.getDistanceSq((double)this.insidePosX, this.entityObj.posY, (double)this.insidePosZ) < 4.0D)
        {
            return false;
        }
        else
        {
            Village village = this.entityObj.worldObj.getVillageCollection().getNearestVillage(blockpos, 14);

            if (village == null)
            {
                return false;
            }
            else
            {
                this.doorInfo = village.getDoorInfo(blockpos);
                return this.doorInfo != null;
            }
        }
    }
    else
    {
        return false;
    }
}
 
开发者ID:BlazeAxtrius,项目名称:ExpandedRailsMod,代码行数:38,代码来源:EntityAIMoveIndoors.java


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