Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-154328

The Village Siege (Zombie Siege) never happens

    XMLWordPrintable

    Details

    • Confirmation Status:
      Plausible
    • Category:
      (Unassigned)
    • Mojang Priority:
      Normal

      Description

      In 1.14.2, the Village Siege seems to never happen and by looking the code, the method used to find a random position for a zombie (and for the initial test of position) always return null (because of the test about "creature can spawn" with null entityType provided).
      In MCP mappings, it looks like this :

       

      @Nullable
      private Vec3d findRandomSpawnPos(BlockPos pos) {
         for(int i = 0; i < 10; ++i) {
            BlockPos blockpos = pos.add(this.world.rand.nextInt(16) - 8, this.world.rand.nextInt(6) - 3, this.world.rand.nextInt(16) - 8);
            if (this.world.func_217483_b_(blockpos) && WorldEntitySpawner.canCreatureTypeSpawnAtLocation(EntitySpawnPlacementRegistry.PlacementType.ON_GROUND, this.world, blockpos, (EntityType<?>)null)) {
               return new Vec3d((double)blockpos.getX(), (double)blockpos.getY(), (double)blockpos.getZ());
            }
         }
      
         return null;
      }
      

      and the method related for the WorldEntitySpawner.canCreatureTypeSpawnAtLocation() return false, as the method above is using a null entityType :

      public static boolean canCreatureTypeSpawnAtLocation(EntitySpawnPlacementRegistry.PlacementType placeType, IWorldReader worldIn, BlockPos pos, @Nullable EntityType<?> entityTypeIn) {
         if (entityTypeIn != null && worldIn.getWorldBorder().contains(pos)) {
            return placeType.canSpawnAt(worldIn, pos, entityTypeIn);
         }
         return false;
      }
      

       

       

        Attachments

          Activity

            People

            • Assignee:
              cojomax99 [Mojang] Cory Scheviak
              Reporter:
              Corail31 Corail
            • Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                CHK: