Class SpawnHelper

java.lang.Object
net.minecraft.world.SpawnHelper

public final class SpawnHelper
extends Object
Mappings:
Namespace Name
official buf
intermediary net/minecraft/class_1948
named net/minecraft/world/SpawnHelper
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a:Lorg/apache/logging/log4j/Logger;
      intermediary field_9292 Lnet/minecraft/class_1948;field_9292:Lorg/apache/logging/log4j/Logger;
      named LOGGER Lnet/minecraft/world/SpawnHelper;LOGGER:Lorg/apache/logging/log4j/Logger;
    • CHUNK_AREA

      private static final int CHUNK_AREA
      Mappings:
      Namespace Name Mixin selector
      official b Lbuf;b:I
      intermediary field_24392 Lnet/minecraft/class_1948;field_24392:I
      named CHUNK_AREA Lnet/minecraft/world/SpawnHelper;CHUNK_AREA:I
    • SPAWNABLE_GROUPS

      private static final SpawnGroup[] SPAWNABLE_GROUPS
      Mappings:
      Namespace Name Mixin selector
      official c Lbuf;c:[Lark;
      intermediary field_24393 Lnet/minecraft/class_1948;field_24393:[Lnet/minecraft/class_1311;
      named SPAWNABLE_GROUPS Lnet/minecraft/world/SpawnHelper;SPAWNABLE_GROUPS:[Lnet/minecraft/entity/SpawnGroup;
  • Constructor Details

    • SpawnHelper

      public SpawnHelper()
  • Method Details

    • setupSpawn

      public static SpawnHelper.Info setupSpawn​(int spawningChunkCount, Iterable<Entity> entities, SpawnHelper.ChunkSource chunkSource)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(ILjava/lang/Iterable;Lbuf$b;)Lbuf$d;
      intermediary method_27815 Lnet/minecraft/class_1948;method_27815(ILjava/lang/Iterable;Lnet/minecraft/class_1948$class_5260;)Lnet/minecraft/class_1948$class_5262;
      named setupSpawn Lnet/minecraft/world/SpawnHelper;setupSpawn(ILjava/lang/Iterable;Lnet/minecraft/world/SpawnHelper$ChunkSource;)Lnet/minecraft/world/SpawnHelper$Info;
    • getBiomeDirectly

      private static Biome getBiomeDirectly​(BlockPos pos, Chunk chunk)
      Mappings:
      Namespace Name Mixin selector
      official b Lbuf;b(Lfx;Lcjl;)Lbuu;
      intermediary method_27822 Lnet/minecraft/class_1948;method_27822(Lnet/minecraft/class_2338;Lnet/minecraft/class_2791;)Lnet/minecraft/class_1959;
      named getBiomeDirectly Lnet/minecraft/world/SpawnHelper;getBiomeDirectly(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/chunk/Chunk;)Lnet/minecraft/world/biome/Biome;
    • spawn

      public static void spawn​(ServerWorld world, WorldChunk chunk, SpawnHelper.Info info, boolean spawnAnimals, boolean spawnMonsters, boolean shouldSpawnAnimals)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Laav;Lcjw;Lbuf$d;ZZZ)V
      intermediary method_27821 Lnet/minecraft/class_1948;method_27821(Lnet/minecraft/class_3218;Lnet/minecraft/class_2818;Lnet/minecraft/class_1948$class_5262;ZZZ)V
      named spawn Lnet/minecraft/world/SpawnHelper;spawn(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/chunk/WorldChunk;Lnet/minecraft/world/SpawnHelper$Info;ZZZ)V
    • spawnEntitiesInChunk

      public static void spawnEntitiesInChunk​(SpawnGroup group, ServerWorld world, WorldChunk chunk, SpawnHelper.Checker checker, SpawnHelper.Runner runner)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Lark;Laav;Lcjw;Lbuf$c;Lbuf$a;)V
      intermediary method_8663 Lnet/minecraft/class_1948;method_8663(Lnet/minecraft/class_1311;Lnet/minecraft/class_3218;Lnet/minecraft/class_2818;Lnet/minecraft/class_1948$class_5261;Lnet/minecraft/class_1948$class_5259;)V
      named spawnEntitiesInChunk Lnet/minecraft/world/SpawnHelper;spawnEntitiesInChunk(Lnet/minecraft/entity/SpawnGroup;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/chunk/WorldChunk;Lnet/minecraft/world/SpawnHelper$Checker;Lnet/minecraft/world/SpawnHelper$Runner;)V
    • spawnEntitiesInChunk

      public static void spawnEntitiesInChunk​(SpawnGroup group, ServerWorld world, Chunk chunk, BlockPos pos, SpawnHelper.Checker checker, SpawnHelper.Runner runner)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Lark;Laav;Lcjl;Lfx;Lbuf$c;Lbuf$a;)V
      intermediary method_24930 Lnet/minecraft/class_1948;method_24930(Lnet/minecraft/class_1311;Lnet/minecraft/class_3218;Lnet/minecraft/class_2791;Lnet/minecraft/class_2338;Lnet/minecraft/class_1948$class_5261;Lnet/minecraft/class_1948$class_5259;)V
      named spawnEntitiesInChunk Lnet/minecraft/world/SpawnHelper;spawnEntitiesInChunk(Lnet/minecraft/entity/SpawnGroup;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/chunk/Chunk;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/SpawnHelper$Checker;Lnet/minecraft/world/SpawnHelper$Runner;)V
    • isAcceptableSpawnPosition

      private static boolean isAcceptableSpawnPosition​(ServerWorld world, Chunk chunk, BlockPos.Mutable pos, double squaredDistance)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Laav;Lcjl;Lfx$a;D)Z
      intermediary method_24933 Lnet/minecraft/class_1948;method_24933(Lnet/minecraft/class_3218;Lnet/minecraft/class_2791;Lnet/minecraft/class_2338$class_2339;D)Z
      named isAcceptableSpawnPosition Lnet/minecraft/world/SpawnHelper;isAcceptableSpawnPosition(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/chunk/Chunk;Lnet/minecraft/util/math/BlockPos$Mutable;D)Z
    • canSpawn

      private static boolean canSpawn​(ServerWorld world, SpawnGroup group, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, SpawnSettings.SpawnEntry spawnEntry, BlockPos.Mutable pos, double squaredDistance)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Laav;Lark;Lbum;Lcjn;Lbvf$c;Lfx$a;D)Z
      intermediary method_24934 Lnet/minecraft/class_1948;method_24934(Lnet/minecraft/class_3218;Lnet/minecraft/class_1311;Lnet/minecraft/class_5138;Lnet/minecraft/class_2794;Lnet/minecraft/class_5483$class_1964;Lnet/minecraft/class_2338$class_2339;D)Z
      named canSpawn Lnet/minecraft/world/SpawnHelper;canSpawn(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/SpawnGroup;Lnet/minecraft/world/gen/StructureAccessor;Lnet/minecraft/world/gen/chunk/ChunkGenerator;Lnet/minecraft/world/biome/SpawnSettings$SpawnEntry;Lnet/minecraft/util/math/BlockPos$Mutable;D)Z
    • createMob

      @Nullable private static MobEntity createMob​(ServerWorld world, EntityType<?> type)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Laav;Laqz;)Larj;
      intermediary method_24931 Lnet/minecraft/class_1948;method_24931(Lnet/minecraft/class_3218;Lnet/minecraft/class_1299;)Lnet/minecraft/class_1308;
      named createMob Lnet/minecraft/world/SpawnHelper;createMob(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/EntityType;)Lnet/minecraft/entity/mob/MobEntity;
    • isValidSpawn

      private static boolean isValidSpawn​(ServerWorld world, MobEntity entity, double squaredDistance)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Laav;Larj;D)Z
      intermediary method_24932 Lnet/minecraft/class_1948;method_24932(Lnet/minecraft/class_3218;Lnet/minecraft/class_1308;D)Z
      named isValidSpawn Lnet/minecraft/world/SpawnHelper;isValidSpawn(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/mob/MobEntity;D)Z
    • pickRandomSpawnEntry

      private static Optional<SpawnSettings.SpawnEntry> pickRandomSpawnEntry​(ServerWorld world, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, SpawnGroup spawnGroup, Random random, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Laav;Lbum;Lcjn;Lark;Ljava/util/Random;Lfx;)Ljava/util/Optional;
      intermediary method_8664 Lnet/minecraft/class_1948;method_8664(Lnet/minecraft/class_3218;Lnet/minecraft/class_5138;Lnet/minecraft/class_2794;Lnet/minecraft/class_1311;Ljava/util/Random;Lnet/minecraft/class_2338;)Ljava/util/Optional;
      named pickRandomSpawnEntry Lnet/minecraft/world/SpawnHelper;pickRandomSpawnEntry(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/gen/StructureAccessor;Lnet/minecraft/world/gen/chunk/ChunkGenerator;Lnet/minecraft/entity/SpawnGroup;Ljava/util/Random;Lnet/minecraft/util/math/BlockPos;)Ljava/util/Optional;
    • containsSpawnEntry

      private static boolean containsSpawnEntry​(ServerWorld world, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, SpawnGroup spawnGroup, SpawnSettings.SpawnEntry spawnEntry, BlockPos pos)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Laav;Lbum;Lcjn;Lark;Lbvf$c;Lfx;)Z
      intermediary method_8659 Lnet/minecraft/class_1948;method_8659(Lnet/minecraft/class_3218;Lnet/minecraft/class_5138;Lnet/minecraft/class_2794;Lnet/minecraft/class_1311;Lnet/minecraft/class_5483$class_1964;Lnet/minecraft/class_2338;)Z
      named containsSpawnEntry Lnet/minecraft/world/SpawnHelper;containsSpawnEntry(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/gen/StructureAccessor;Lnet/minecraft/world/gen/chunk/ChunkGenerator;Lnet/minecraft/entity/SpawnGroup;Lnet/minecraft/world/biome/SpawnSettings$SpawnEntry;Lnet/minecraft/util/math/BlockPos;)Z
    • method_29950

      private static List<SpawnSettings.SpawnEntry> method_29950​(ServerWorld serverWorld, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, SpawnGroup spawnGroup, BlockPos blockPos, @Nullable Biome biome)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Laav;Lbum;Lcjn;Lark;Lfx;Lbuu;)Ljava/util/List;
      intermediary method_29950 Lnet/minecraft/class_1948;method_29950(Lnet/minecraft/class_3218;Lnet/minecraft/class_5138;Lnet/minecraft/class_2794;Lnet/minecraft/class_1311;Lnet/minecraft/class_2338;Lnet/minecraft/class_1959;)Ljava/util/List;
      named method_29950 Lnet/minecraft/world/SpawnHelper;method_29950(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/world/gen/StructureAccessor;Lnet/minecraft/world/gen/chunk/ChunkGenerator;Lnet/minecraft/entity/SpawnGroup;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/world/biome/Biome;)Ljava/util/List;
    • getSpawnPos

      private static BlockPos getSpawnPos​(World world, WorldChunk chunk)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Lbtv;Lcjw;)Lfx;
      intermediary method_8657 Lnet/minecraft/class_1948;method_8657(Lnet/minecraft/class_1937;Lnet/minecraft/class_2818;)Lnet/minecraft/class_2338;
      named getSpawnPos Lnet/minecraft/world/SpawnHelper;getSpawnPos(Lnet/minecraft/world/World;Lnet/minecraft/world/chunk/WorldChunk;)Lnet/minecraft/util/math/BlockPos;
    • isClearForSpawn

      public static boolean isClearForSpawn​(BlockView blockView, BlockPos pos, BlockState state, FluidState fluidState, EntityType<?> entityType)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Lbsz;Lfx;Lcht;Ldal;Laqz;)Z
      intermediary method_8662 Lnet/minecraft/class_1948;method_8662(Lnet/minecraft/class_1922;Lnet/minecraft/class_2338;Lnet/minecraft/class_2680;Lnet/minecraft/class_3610;Lnet/minecraft/class_1299;)Z
      named isClearForSpawn Lnet/minecraft/world/SpawnHelper;isClearForSpawn(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/fluid/FluidState;Lnet/minecraft/entity/EntityType;)Z
    • canSpawn

      public static boolean canSpawn​(SpawnRestriction.Location location, WorldView world, BlockPos pos, @Nullable EntityType<?> entityType)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Lasa$c;Lbty;Lfx;Laqz;)Z
      intermediary method_8660 Lnet/minecraft/class_1948;method_8660(Lnet/minecraft/class_1317$class_1319;Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;Lnet/minecraft/class_1299;)Z
      named canSpawn Lnet/minecraft/world/SpawnHelper;canSpawn(Lnet/minecraft/entity/SpawnRestriction$Location;Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/EntityType;)Z
    • populateEntities

      public static void populateEntities​(ServerWorldAccess world, Biome biome, ChunkPos chunkPos, Random random)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Lbuj;Lbuu;Lbta;Ljava/util/Random;)V
      intermediary method_8661 Lnet/minecraft/class_1948;method_8661(Lnet/minecraft/class_5425;Lnet/minecraft/class_1959;Lnet/minecraft/class_1923;Ljava/util/Random;)V
      named populateEntities Lnet/minecraft/world/SpawnHelper;populateEntities(Lnet/minecraft/world/ServerWorldAccess;Lnet/minecraft/world/biome/Biome;Lnet/minecraft/util/math/ChunkPos;Ljava/util/Random;)V
    • getEntitySpawnPos

      private static BlockPos getEntitySpawnPos​(WorldView world, EntityType<?> entityType, int x, int z)
      Mappings:
      Namespace Name Mixin selector
      official a Lbuf;a(Lbty;Laqz;II)Lfx;
      intermediary method_8658 Lnet/minecraft/class_1948;method_8658(Lnet/minecraft/class_4538;Lnet/minecraft/class_1299;II)Lnet/minecraft/class_2338;
      named getEntitySpawnPos Lnet/minecraft/world/SpawnHelper;getEntitySpawnPos(Lnet/minecraft/world/WorldView;Lnet/minecraft/entity/EntityType;II)Lnet/minecraft/util/math/BlockPos;