Class SpawnSettings.SpawnDensity

java.lang.Object
net.minecraft.world.biome.SpawnSettings.SpawnDensity
Enclosing class:
SpawnSettings

public static class SpawnSettings.SpawnDensity extends Object
Embodies the density limit information of a type of entity in entity spawning logic. The density field is generated for all entities spawned than a specific type of entity.
Mappings:
Namespace Name
official cbj$b
intermediary net/minecraft/class_5483$class_5265
named net/minecraft/world/biome/SpawnSettings$SpawnDensity
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<SpawnSettings.SpawnDensity> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Lcbj$b;a:Lcom/mojang/serialization/Codec;
      intermediary field_25820 Lnet/minecraft/class_5483$class_5265;field_25820:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/world/biome/SpawnSettings$SpawnDensity;CODEC:Lcom/mojang/serialization/Codec;
    • gravityLimit

      private final double gravityLimit
      Mappings:
      Namespace Name Mixin selector
      official b Lcbj$b;b:D
      intermediary field_24407 Lnet/minecraft/class_5483$class_5265;field_24407:D
      named gravityLimit Lnet/minecraft/world/biome/SpawnSettings$SpawnDensity;gravityLimit:D
    • mass

      private final double mass
      Mappings:
      Namespace Name Mixin selector
      official c Lcbj$b;c:D
      intermediary field_24408 Lnet/minecraft/class_5483$class_5265;field_24408:D
      named mass Lnet/minecraft/world/biome/SpawnSettings$SpawnDensity;mass:D
  • Constructor Details

    • SpawnDensity

      SpawnDensity(double gravityLimit, double mass)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcbj$b;<init>(DD)V
      intermediary <init> Lnet/minecraft/class_5483$class_5265;<init>(DD)V
      named <init> Lnet/minecraft/world/biome/SpawnSettings$SpawnDensity;<init>(DD)V
  • Method Details

    • getGravityLimit

      public double getGravityLimit()
      Represents the cap of gravity as in GravityField.calculate(BlockPos, double) for entity spawning. If the cap is exceeded, the entity spawning attempt will skip.
      Mappings:
      Namespace Name Mixin selector
      official a Lcbj$b;a()D
      intermediary method_27837 Lnet/minecraft/class_5483$class_5265;method_27837()D
      named getGravityLimit Lnet/minecraft/world/biome/SpawnSettings$SpawnDensity;getGravityLimit()D
    • getMass

      public double getMass()
      Represents the mass of each entity spawned. Will affect gravity calculation.
      Mappings:
      Namespace Name Mixin selector
      official b Lcbj$b;b()D
      intermediary method_27838 Lnet/minecraft/class_5483$class_5265;method_27838()D
      named getMass Lnet/minecraft/world/biome/SpawnSettings$SpawnDensity;getMass()D