mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 12:43:52 -07:00
@@ -213,7 +213,7 @@ public enum EntityType implements Keyed {
|
||||
ZOMBIE("zombie", Zombie.class, 54),
|
||||
SLIME("slime", Slime.class, 55),
|
||||
GHAST("ghast", Ghast.class, 56),
|
||||
PIG_ZOMBIE("zombie_pigman", PigZombie.class, 57),
|
||||
ZOMBIFIED_PIGLIN("zombified_piglin", PigZombie.class, 57),
|
||||
ENDERMAN("enderman", Enderman.class, 58),
|
||||
CAVE_SPIDER("cave_spider", CaveSpider.class, 59),
|
||||
SILVERFISH("silverfish", Silverfish.class, 60),
|
||||
@@ -261,6 +261,10 @@ public enum EntityType implements Keyed {
|
||||
WANDERING_TRADER("wandering_trader", WanderingTrader.class, -1),
|
||||
FOX("fox", Fox.class, -1),
|
||||
BEE("bee", Bee.class, -1),
|
||||
HOGLIN("hoglin", Hoglin.class, -1),
|
||||
PIGLIN("piglin", Piglin.class, -1),
|
||||
STRIDER("strider", Strider.class, -1),
|
||||
ZOGLIN("zoglin", Zoglin.class, -1),
|
||||
/**
|
||||
* A fishing line and bobber.
|
||||
*/
|
||||
@@ -309,6 +313,7 @@ public enum EntityType implements Keyed {
|
||||
NAME_MAP.put("snowman", SNOWMAN);
|
||||
NAME_MAP.put("villager_golem", IRON_GOLEM);
|
||||
NAME_MAP.put("ender_crystal", ENDER_CRYSTAL);
|
||||
NAME_MAP.put("zombie_pigman", ZOMBIFIED_PIGLIN);
|
||||
}
|
||||
|
||||
private EntityType(/*@Nullable*/ String name, /*@Nullable*/ Class<? extends Entity> clazz, int typeId) {
|
||||
|
@@ -3,7 +3,7 @@ package org.bukkit.entity;
|
||||
import org.bukkit.inventory.meta.FireworkMeta;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface Firework extends Entity {
|
||||
public interface Firework extends Projectile {
|
||||
|
||||
/**
|
||||
* Get a copy of the fireworks meta
|
||||
|
6
paper-api/src/main/java/org/bukkit/entity/Hoglin.java
Normal file
6
paper-api/src/main/java/org/bukkit/entity/Hoglin.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a Hoglin.
|
||||
*/
|
||||
public interface Hoglin extends Animals { }
|
@@ -230,31 +230,6 @@ public interface HumanEntity extends LivingEntity, AnimalTamer, InventoryHolder
|
||||
*/
|
||||
public int getSleepTicks();
|
||||
|
||||
/**
|
||||
* Gets the Location where the player will spawn at their bed, null if
|
||||
* they have not slept in one or their current bed spawn is invalid.
|
||||
*
|
||||
* @return Bed Spawn Location if bed exists, otherwise null.
|
||||
*/
|
||||
@Nullable
|
||||
public Location getBedSpawnLocation();
|
||||
|
||||
/**
|
||||
* Sets the Location where the player will spawn at their bed.
|
||||
*
|
||||
* @param location where to set the respawn location
|
||||
*/
|
||||
public void setBedSpawnLocation(@Nullable Location location);
|
||||
|
||||
/**
|
||||
* Sets the Location where the player will spawn at their bed.
|
||||
*
|
||||
* @param location where to set the respawn location
|
||||
* @param force whether to forcefully set the respawn location even if a
|
||||
* valid bed is not present
|
||||
*/
|
||||
public void setBedSpawnLocation(@Nullable Location location, boolean force);
|
||||
|
||||
/**
|
||||
* Attempts to make the entity sleep at the given location.
|
||||
* <br>
|
||||
|
6
paper-api/src/main/java/org/bukkit/entity/Piglin.java
Normal file
6
paper-api/src/main/java/org/bukkit/entity/Piglin.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a Piglin.
|
||||
*/
|
||||
public interface Piglin extends Monster { }
|
@@ -225,6 +225,32 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
*/
|
||||
public boolean isSleepingIgnored();
|
||||
|
||||
/**
|
||||
* Gets the Location where the player will spawn at their bed, null if
|
||||
* they have not slept in one or their current bed spawn is invalid.
|
||||
*
|
||||
* @return Bed Spawn Location if bed exists, otherwise null.
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
public Location getBedSpawnLocation();
|
||||
|
||||
/**
|
||||
* Sets the Location where the player will spawn at their bed.
|
||||
*
|
||||
* @param location where to set the respawn location
|
||||
*/
|
||||
public void setBedSpawnLocation(@Nullable Location location);
|
||||
|
||||
/**
|
||||
* Sets the Location where the player will spawn at their bed.
|
||||
*
|
||||
* @param location where to set the respawn location
|
||||
* @param force whether to forcefully set the respawn location even if a
|
||||
* valid bed is not present
|
||||
*/
|
||||
public void setBedSpawnLocation(@Nullable Location location, boolean force);
|
||||
|
||||
/**
|
||||
* Play a note for a player at a location. This requires a note block
|
||||
* at the particular location (as far as the client is concerned). This
|
||||
|
6
paper-api/src/main/java/org/bukkit/entity/Strider.java
Normal file
6
paper-api/src/main/java/org/bukkit/entity/Strider.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a Strider.
|
||||
*/
|
||||
public interface Strider extends Animals, Vehicle { }
|
6
paper-api/src/main/java/org/bukkit/entity/Zoglin.java
Normal file
6
paper-api/src/main/java/org/bukkit/entity/Zoglin.java
Normal file
@@ -0,0 +1,6 @@
|
||||
package org.bukkit.entity;
|
||||
|
||||
/**
|
||||
* Represents a Zoglin.
|
||||
*/
|
||||
public interface Zoglin extends Monster { }
|
@@ -4,6 +4,7 @@ import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import org.bukkit.Keyed;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.NamespacedKey;
|
||||
@@ -46,11 +47,17 @@ public final class MemoryKey<T> implements Keyed {
|
||||
private static final Map<NamespacedKey, MemoryKey> MEMORY_KEYS = new HashMap<>();
|
||||
//
|
||||
public static final MemoryKey<Location> HOME = new MemoryKey<>(NamespacedKey.minecraft("home"), Location.class);
|
||||
public static final MemoryKey<Location> MEETING_POINT = new MemoryKey<>(NamespacedKey.minecraft("meeting_point"), Location.class);
|
||||
public static final MemoryKey<Location> POTENTIAL_JOB_SITE = new MemoryKey<>(NamespacedKey.minecraft("potential_job_site"), Location.class);
|
||||
public static final MemoryKey<Location> JOB_SITE = new MemoryKey<>(NamespacedKey.minecraft("job_site"), Location.class);
|
||||
public static final MemoryKey<Location> MEETING_POINT = new MemoryKey<>(NamespacedKey.minecraft("meeting_point"), Location.class);
|
||||
public static final MemoryKey<Long> LAST_SLEPT = new MemoryKey<>(NamespacedKey.minecraft("last_slept"), Long.class);
|
||||
public static final MemoryKey<Long> LAST_WOKEN = new MemoryKey<>(NamespacedKey.minecraft("last_woken"), Long.class);
|
||||
public static final MemoryKey<Long> LAST_WORKED_AT_POI = new MemoryKey<>(NamespacedKey.minecraft("last_worked_at_poi"), Long.class);
|
||||
public static final MemoryKey<Boolean> UNIVERSAL_ANGER = new MemoryKey<>(NamespacedKey.minecraft("universal_anger"), Boolean.class);
|
||||
public static final MemoryKey<UUID> ANGRY_AT = new MemoryKey<>(NamespacedKey.minecraft("angry_at"), UUID.class);
|
||||
public static final MemoryKey<Boolean> ADMIRING_ITEM = new MemoryKey<>(NamespacedKey.minecraft("admiring_item"), Boolean.class);
|
||||
public static final MemoryKey<Boolean> ADMIRING_DISABLED = new MemoryKey<>(NamespacedKey.minecraft("admiring_disabled"), Boolean.class);
|
||||
public static final MemoryKey<Boolean> HUNTED_RECENTLY = new MemoryKey<>(NamespacedKey.minecraft("hunted_recently"), Boolean.class);
|
||||
|
||||
/**
|
||||
* Returns a {@link MemoryKey} by a {@link NamespacedKey}.
|
||||
|
Reference in New Issue
Block a user