本文整理汇总了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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}