Interface SpecialSpawner

All Known Implementing Classes:
CatSpawner, PatrolSpawner, PhantomSpawner, WanderingTraderManager, ZombieSiegeManager

public interface SpecialSpawner
Spawns entities in a world.

A spawner is typically used to spawn entities within a special context, such as cats in a village or wandering traders. This is different from the mob spawner logic which is used for the spawner block, or the structure spawn conditions (such as guardians) which is defined in ChunkGenerator.getEntitySpawnList(net.minecraft.registry.entry.RegistryEntry<net.minecraft.world.biome.Biome>, net.minecraft.world.gen.StructureAccessor, net.minecraft.entity.SpawnGroup, net.minecraft.util.math.BlockPos). However, cats in swamp huts are spawned in both CatSpawner and the normal structure spawning.

Mappings:
Namespace Name
named net/minecraft/world/spawner/SpecialSpawner
intermediary net/minecraft/class_5304
official dbn
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    spawn(ServerWorld world, boolean spawnMonsters, boolean spawnAnimals)
    Spawns entities into a world.
  • Method Details

    • spawn

      int spawn(ServerWorld world, boolean spawnMonsters, boolean spawnAnimals)
      Spawns entities into a world.
      Parameters:
      spawnMonsters - whether monsters should be spawned
      spawnAnimals - whether animals should be spawned
      Returns:
      the number of entities spawned
      Mappings:
      Namespace Name Mixin selector
      named spawn Lnet/minecraft/world/spawner/SpecialSpawner;spawn(Lnet/minecraft/server/world/ServerWorld;ZZ)I
      intermediary method_6445 Lnet/minecraft/class_5304;method_6445(Lnet/minecraft/class_3218;ZZ)I
      official a Ldbn;a(Larf;ZZ)I