Paper/patches/unapplied/api/0264-Added-Vanilla-Entity-T...

56 lines
2.7 KiB
Diff
Raw Normal View History

2021-06-11 12:02:28 +00:00
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Sun, 3 Jan 2021 20:03:40 -0800
Subject: [PATCH] Added Vanilla Entity Tags
diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java
2021-11-22 05:21:37 +00:00
index 34d23f53acf00620223731c4fdacffde9cff41a8..a64d04310f1bc32224765e01dd4f020d289dad0c 100644
2021-06-11 12:02:28 +00:00
--- a/src/main/java/org/bukkit/Tag.java
+++ b/src/main/java/org/bukkit/Tag.java
2021-11-22 05:21:37 +00:00
@@ -698,6 +698,44 @@ public interface Tag<T extends Keyed> extends Keyed {
* Vanilla tag representing entities extra susceptible to freezing.
2021-06-11 12:02:28 +00:00
*/
Tag<EntityType> ENTITY_TYPES_FREEZE_HURTS_EXTRA_TYPES = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("freeze_hurts_extra_types"), EntityType.class);
2021-06-11 12:02:28 +00:00
+ // Paper start
+ /**
+ * Key for the built-in entity registry
+ * @deprecated use {@link #REGISTRY_ENTITY_TYPES}
2021-06-11 12:02:28 +00:00
+ */
+ @Deprecated(forRemoval = true)
2021-06-11 12:02:28 +00:00
+ String REGISTRY_ENTITIES = "entities";
+ /**
+ * Vanilla entity tag representing arrow entities.
+ * @deprecated use {@link #ENTITY_TYPES_ARROWS}
2021-06-11 12:02:28 +00:00
+ */
+ @Deprecated(forRemoval = true)
2021-06-11 12:02:28 +00:00
+ Tag<org.bukkit.entity.EntityType> ARROWS = Bukkit.getTag(REGISTRY_ENTITIES, NamespacedKey.minecraft("arrows"), org.bukkit.entity.EntityType.class);
+ /**
+ * Vanilla entity tag representing entities that live in beehives
+ * @deprecated use {@link #ENTITY_TYPES_BEEHIVE_INHABITORS}
2021-06-11 12:02:28 +00:00
+ */
+ @Deprecated(forRemoval = true)
2021-06-11 12:02:28 +00:00
+ Tag<org.bukkit.entity.EntityType> BEEHIVE_INHABITORS = Bukkit.getTag(REGISTRY_ENTITIES, NamespacedKey.minecraft("beehive_inhabitors"), org.bukkit.entity.EntityType.class);
+ /**
+ * Vanilla entity tag representing projectiles that impact
+ * @deprecated use {@link #ENTITY_TYPES_IMPACT_PROJECTILES}
2021-06-11 12:02:28 +00:00
+ */
+ @Deprecated(forRemoval = true)
2021-06-11 12:02:28 +00:00
+ Tag<org.bukkit.entity.EntityType> IMPACT_PROJECTILES = Bukkit.getTag(REGISTRY_ENTITIES, NamespacedKey.minecraft("impact_projectiles"), org.bukkit.entity.EntityType.class);
+ /**
+ * Vanilla entity tag for village raiders
+ * @deprecated use {@link #ENTITY_TYPES_RAIDERS}
2021-06-11 12:02:28 +00:00
+ */
+ @Deprecated(forRemoval = true)
2021-06-11 12:02:28 +00:00
+ Tag<org.bukkit.entity.EntityType> RAIDERS = Bukkit.getTag(REGISTRY_ENTITIES, NamespacedKey.minecraft("raiders"), org.bukkit.entity.EntityType.class);
+ /**
+ * Vanilla entity tag for skeleton types
+ * @deprecated use {@link #ENTITY_TYPES_SKELETONS}
2021-06-11 12:02:28 +00:00
+ */
+ @Deprecated(forRemoval = true)
2021-06-11 12:02:28 +00:00
+ Tag<org.bukkit.entity.EntityType> SKELETONS = Bukkit.getTag(REGISTRY_ENTITIES, NamespacedKey.minecraft("skeletons"), org.bukkit.entity.EntityType.class);
+ // Paper end
/**
* Returns whether or not this tag has an entry for the specified item.