Class CatSpawner

java.lang.Object
net.minecraft.world.spawner.CatSpawner
All Implemented Interfaces:
SpecialSpawner

public class CatSpawner extends Object implements SpecialSpawner
A spawner for cats in villages and tagged structures.
Implementation Note:
Cats in swamp huts are also spawned in SwampHutGenerator.spawnCat(net.minecraft.world.ServerWorldAccess, net.minecraft.util.math.BlockBox).
Mappings:
Namespace Name
named net/minecraft/world/spawner/CatSpawner
intermediary net/minecraft/class_4274
official cub
  • Field Details

    • SPAWN_INTERVAL

      private static final int SPAWN_INTERVAL
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named SPAWN_INTERVAL Lnet/minecraft/world/spawner/CatSpawner;SPAWN_INTERVAL:I
      intermediary field_30601 Lnet/minecraft/class_4274;field_30601:I
      official a Lcub;a:I
    • cooldown

      private int cooldown
      Mappings:
      Namespace Name Mixin selector
      named cooldown Lnet/minecraft/world/spawner/CatSpawner;cooldown:I
      intermediary field_19171 Lnet/minecraft/class_4274;field_19171:I
      official b Lcub;b:I
  • Constructor Details

    • CatSpawner

      public CatSpawner()
  • Method Details

    • spawn

      public void spawn(ServerWorld world, boolean spawnMonsters, boolean spawnAnimals)
      Spawns entities into a world.
      Specified by:
      spawn in interface SpecialSpawner
      Parameters:
      spawnMonsters - whether monsters should be spawned
      spawnAnimals - whether animals should be spawned
      Mappings:
      Namespace Name Mixin selector
      named spawn Lnet/minecraft/world/spawner/SpecialSpawner;spawn(Lnet/minecraft/server/world/ServerWorld;ZZ)V
      intermediary method_6445 Lnet/minecraft/class_5304;method_6445(Lnet/minecraft/class_3218;ZZ)V
      official a Ldmg;a(Laub;ZZ)V
    • spawnInHouse

      private void spawnInHouse(ServerWorld world, BlockPos pos)
      Tries to spawn cats in villages.
      Implementation Note:
      Cats spawn when there are more than 4 occupied beds and less than 5 existing cats.
      Mappings:
      Namespace Name Mixin selector
      named spawnInHouse Lnet/minecraft/world/spawner/CatSpawner;spawnInHouse(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;)V
      intermediary method_20263 Lnet/minecraft/class_4274;method_20263(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;)V
      official a Lcub;a(Laub;Ljb;)V
    • spawnInStructure

      private void spawnInStructure(ServerWorld world, BlockPos pos)
      Tries to spawn cats in tagged structures.
      Implementation Note:
      Cats spawn when there are no other cats nearby.
      Mappings:
      Namespace Name Mixin selector
      named spawnInStructure Lnet/minecraft/world/spawner/CatSpawner;spawnInStructure(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/BlockPos;)V
      intermediary method_20260 Lnet/minecraft/class_4274;method_20260(Lnet/minecraft/class_3218;Lnet/minecraft/class_2338;)V
      official b Lcub;b(Laub;Ljb;)V
    • spawn

      private void spawn(BlockPos pos, ServerWorld world, boolean persistent)
      Spawns a cat.
      Mappings:
      Namespace Name Mixin selector
      named spawn Lnet/minecraft/world/spawner/CatSpawner;spawn(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/server/world/ServerWorld;Z)V
      intermediary method_20262 Lnet/minecraft/class_4274;method_20262(Lnet/minecraft/class_2338;Lnet/minecraft/class_3218;Z)V
      official a Lcub;a(Ljb;Laub;Z)V