mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 15:30:19 +01:00
deprecate and update some entity tags (#10932)
This commit is contained in:
parent
58268601ac
commit
ffff490cc8
2 changed files with 7 additions and 17 deletions
|
@ -884,7 +884,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+
|
||||
+ public BaseTag(@NotNull Class<T> clazz, @NotNull NamespacedKey key, @NotNull Collection<T> values, @NotNull Predicate<T>... globalPredicates) {
|
||||
+ this.key = key != null ? key : NamespacedKey.randomKey();
|
||||
+ this.key = key;
|
||||
+ this.tagged = clazz.isEnum() ? createEnumSet(clazz) : new HashSet<>();
|
||||
+ this.tagged.addAll(values);
|
||||
+ this.globalPredicates = Lists.newArrayList(globalPredicates);
|
||||
|
@ -1105,8 +1105,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ * @see <a href="https://minecraft.wiki/wiki/Mob#Undead_mobs">https://minecraft.wiki/wiki/Mob#Undead_mobs</a>
|
||||
+ */
|
||||
+ public static final EntitySetTag UNDEADS = new EntitySetTag(keyFor("undeads"))
|
||||
+ .add(DROWNED, HUSK, PHANTOM, SKELETON, SKELETON_HORSE, STRAY, WITHER, WITHER_SKELETON, ZOGLIN, ZOMBIE, ZOMBIE_HORSE, ZOMBIE_VILLAGER, ZOMBIFIED_PIGLIN)
|
||||
+ .ensureSize("UNDEADS", 13).lock();
|
||||
+ .add(DROWNED, HUSK, PHANTOM, SKELETON, SKELETON_HORSE, STRAY, WITHER, WITHER_SKELETON, ZOGLIN, ZOMBIE, ZOMBIE_HORSE, ZOMBIE_VILLAGER, ZOMBIFIED_PIGLIN, BOGGED)
|
||||
+ .ensureSize("UNDEADS", 14).lock();
|
||||
+
|
||||
+ /**
|
||||
+ * Covers all horses
|
||||
|
@ -1132,10 +1132,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ /**
|
||||
+ * Covers all water based mobs
|
||||
+ * @see <a href="https://minecraft.wiki/wiki/Mob#Aquatic_mobs">https://minecraft.wiki/wiki/Mob#Aquatic_mobs</a>
|
||||
+ * @deprecated in favour of {@link org.bukkit.Tag#ENTITY_TYPES_AQUATIC}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public static final EntitySetTag WATER_BASED = new EntitySetTag(keyFor("water_based"))
|
||||
+ .add(AXOLOTL, DOLPHIN, SQUID, GLOW_SQUID, GUARDIAN, ELDER_GUARDIAN, TURTLE, COD, SALMON, PUFFERFISH, TROPICAL_FISH)
|
||||
+ .ensureSize("WATER_BASED", 11).lock();
|
||||
+ .add(AXOLOTL, DOLPHIN, SQUID, GLOW_SQUID, GUARDIAN, ELDER_GUARDIAN, TURTLE, COD, SALMON, PUFFERFISH, TROPICAL_FISH, TADPOLE)
|
||||
+ .ensureSize("WATER_BASED", 12).lock();
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
|
|
|
@ -56,18 +56,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
ITEM_BUNDLE_REMOVE_ONE("item.bundle.remove_one"),
|
||||
ITEM_CHORUS_FRUIT_TELEPORT("item.chorus_fruit.teleport"),
|
||||
ITEM_CROP_PLANT("item.crop.plant"),
|
||||
diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/Tag.java
|
||||
+++ b/src/main/java/org/bukkit/Tag.java
|
||||
@@ -0,0 +0,0 @@ public interface Tag<T extends Keyed> extends Keyed {
|
||||
/**
|
||||
* Vanilla tag representing entities which can turn in boats.
|
||||
*/
|
||||
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
|
||||
Tag<EntityType> ENTITY_TYPES_CAN_TURN_IN_BOATS = Bukkit.getTag(REGISTRY_ENTITY_TYPES, NamespacedKey.minecraft("can_turn_in_boats"), EntityType.class);
|
||||
/**
|
||||
* Vanilla tag representing all entities sensitive to illager enchantments.
|
||||
diff --git a/src/main/java/org/bukkit/block/Crafter.java b/src/main/java/org/bukkit/block/Crafter.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/block/Crafter.java
|
||||
|
|
Loading…
Reference in a new issue