mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
SPIGOT-6918: Add SpawnCategory API and configurations for Axolotls
By: Doc <nachito94@msn.com>
This commit is contained in:
@@ -638,4 +638,12 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
||||
*/
|
||||
@NotNull
|
||||
Pose getPose();
|
||||
|
||||
/**
|
||||
* Get the category of spawn to which this entity belongs.
|
||||
*
|
||||
* @return the entity´s category spawn
|
||||
*/
|
||||
@NotNull
|
||||
SpawnCategory getSpawnCategory();
|
||||
}
|
||||
|
43
paper-api/src/main/java/org/bukkit/entity/SpawnCategory.java
Normal file
43
paper-api/src/main/java/org/bukkit/entity/SpawnCategory.java
Normal file
@@ -0,0 +1,43 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents groups of entities with shared spawn behaviors and mob caps.
|
||||
*
|
||||
* @see <a href="https://minecraft.fandom.com/wiki/Spawn#Java_Edition_mob_cap">Minecraft Wiki</a>
|
||||
*/
|
||||
public enum SpawnCategory {
|
||||
|
||||
/**
|
||||
* Entities related to Monsters, eg: Witch, Zombie, Creeper, etc.
|
||||
*/
|
||||
MONSTER,
|
||||
/**
|
||||
* Entities related to Animals, eg: Strider, Cow, Turtle, etc.
|
||||
*/
|
||||
ANIMAL,
|
||||
/**
|
||||
* Entities related to Water Animals, eg: Squid or Dolphin.
|
||||
*/
|
||||
WATER_ANIMAL,
|
||||
/**
|
||||
* Entities related to Water Ambient, eg: Cod, PufferFish, Tropical Fish,
|
||||
* Salmon, etc.
|
||||
*/
|
||||
WATER_AMBIENT,
|
||||
/**
|
||||
* Entities related to Water Underground, eg: Glow Squid.
|
||||
*/
|
||||
WATER_UNDERGROUND_CREATURE,
|
||||
/**
|
||||
* Entities related to Ambient, eg: Bat.
|
||||
*/
|
||||
AMBIENT,
|
||||
/**
|
||||
* All the Axolotl are represented by this Category.
|
||||
*/
|
||||
AXOLOTL,
|
||||
/**
|
||||
* Entities not related to a mob, eg: Player, ArmorStand, Boat, etc.
|
||||
*/
|
||||
MISC;
|
||||
}
|
Reference in New Issue
Block a user