net.minecraft.world.World.getVillageCollection()方法的使用及代码示例

x33g5p2x  于2022-02-02 转载在 其他  
字(2.2k)|赞(0)|评价(0)|浏览(126)

本文整理了Java中net.minecraft.world.World.getVillageCollection()方法的一些代码示例,展示了World.getVillageCollection()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。World.getVillageCollection()方法的具体详情如下:
包路径:net.minecraft.world.World
类名称:World
方法名:getVillageCollection

World.getVillageCollection介绍

暂无

代码示例

代码示例来源:origin: SleepyTrousers/EnderIO

  1. @Override
  2. public @Nonnull VillageCollection getVillageCollection() {
  3. return wrapped.getVillageCollection();
  4. }

代码示例来源:origin: amadornes/MCMultiPart

  1. @Override
  2. public VillageCollection getVillageCollection() {
  3. return getActualWorld().getVillageCollection();
  4. }

代码示例来源:origin: TeamLapen/Vampirism

  1. @Override
  2. public boolean getCanSpawnHere() {
  3. if (isGettingSundamage(true) || (world.isDaytime() && rand.nextInt(5) != 0)) return false;
  4. if (isGettingGarlicDamage(true) != EnumStrength.NONE) return false;
  5. if (world.getVillageCollection().getNearestVillage(getPosition(), 1) != null) {
  6. if (getRNG().nextInt(60) != 0) {
  7. return false;
  8. }
  9. }
  10. return super.getCanSpawnHere() && (!restrictedSpawn || getCanSpawnHereRestricted());
  11. }

代码示例来源:origin: TeamLapen/Vampirism

  1. return world.getVillageCollection().getNearestVillage(world.getHeight(new BlockPos(i << 4, 0, j << 4)), 20) == null;

代码示例来源:origin: TeamLapen/Vampirism

  1. @Override
  2. public boolean shouldExecute() {
  3. BlockPos blockpos = new BlockPos(this.entityObj);
  4. if (this.entityObj.getEntityWorld().isDaytime() && this.entityObj.getEntityWorld().provider.hasSkyLight()) {
  5. if (this.entityObj.getRNG().nextInt(50) != 0) {
  6. return false;
  7. } else if (this.insidePosX != -1 && this.entityObj.getDistanceSq((double) this.insidePosX, this.entityObj.posY, (double) this.insidePosZ) < 4.0D) {
  8. return false;
  9. } else {
  10. Village village = this.entityObj.getEntityWorld().getVillageCollection().getNearestVillage(blockpos, 14);
  11. if (village == null) {
  12. return false;
  13. } else {
  14. this.doorInfo = village.getDoorInfo(blockpos);
  15. return this.doorInfo != null;
  16. }
  17. }
  18. } else {
  19. return false;
  20. }
  21. }

代码示例来源:origin: ldtteam/minecolonies

  1. && world.getVillageCollection().getNearestVillage(pos, Configurations.gameplay.workingRangeTownHallChunks * BLOCKS_PER_CHUNK) != null)

代码示例来源:origin: TeamLapen/Vampirism

  1. } else {
  2. @Nullable Village village = this.theEntity.getEntityWorld().getVillageCollection().getNearestVillage(new BlockPos(this.theEntity), 0);

相关文章

World类方法