diff --git a/patches/unapplied/api/0264-Added-Vanilla-Entity-Tags.patch b/patches/api/0261-Added-Vanilla-Entity-Tags.patch similarity index 65% rename from patches/unapplied/api/0264-Added-Vanilla-Entity-Tags.patch rename to patches/api/0261-Added-Vanilla-Entity-Tags.patch index 6228580f9..68465846a 100644 --- a/patches/unapplied/api/0264-Added-Vanilla-Entity-Tags.patch +++ b/patches/api/0261-Added-Vanilla-Entity-Tags.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Added Vanilla Entity Tags diff --git a/src/main/java/org/bukkit/Tag.java b/src/main/java/org/bukkit/Tag.java -index 34d23f53acf00620223731c4fdacffde9cff41a8..a64d04310f1bc32224765e01dd4f020d289dad0c 100644 +index 34d23f53acf00620223731c4fdacffde9cff41a8..ddd195a834d1756c903644fc1faffe7ebcb238ed 100644 --- a/src/main/java/org/bukkit/Tag.java +++ b/src/main/java/org/bukkit/Tag.java @@ -698,6 +698,44 @@ public interface Tag extends Keyed { @@ -18,37 +18,37 @@ index 34d23f53acf00620223731c4fdacffde9cff41a8..a64d04310f1bc32224765e01dd4f020d + * @deprecated use {@link #REGISTRY_ENTITY_TYPES} + */ + @Deprecated(forRemoval = true) -+ String REGISTRY_ENTITIES = "entities"; ++ String REGISTRY_ENTITIES = REGISTRY_ENTITY_TYPES; + /** + * Vanilla entity tag representing arrow entities. + * @deprecated use {@link #ENTITY_TYPES_ARROWS} + */ + @Deprecated(forRemoval = true) -+ Tag ARROWS = Bukkit.getTag(REGISTRY_ENTITIES, NamespacedKey.minecraft("arrows"), org.bukkit.entity.EntityType.class); ++ Tag ARROWS = ENTITY_TYPES_ARROWS; + /** + * Vanilla entity tag representing entities that live in beehives + * @deprecated use {@link #ENTITY_TYPES_BEEHIVE_INHABITORS} + */ + @Deprecated(forRemoval = true) -+ Tag BEEHIVE_INHABITORS = Bukkit.getTag(REGISTRY_ENTITIES, NamespacedKey.minecraft("beehive_inhabitors"), org.bukkit.entity.EntityType.class); ++ Tag BEEHIVE_INHABITORS = ENTITY_TYPES_BEEHIVE_INHABITORS; + /** + * Vanilla entity tag representing projectiles that impact + * @deprecated use {@link #ENTITY_TYPES_IMPACT_PROJECTILES} + */ + @Deprecated(forRemoval = true) -+ Tag IMPACT_PROJECTILES = Bukkit.getTag(REGISTRY_ENTITIES, NamespacedKey.minecraft("impact_projectiles"), org.bukkit.entity.EntityType.class); ++ Tag IMPACT_PROJECTILES = ENTITY_TYPES_IMPACT_PROJECTILES; + /** + * Vanilla entity tag for village raiders + * @deprecated use {@link #ENTITY_TYPES_RAIDERS} + */ + @Deprecated(forRemoval = true) -+ Tag RAIDERS = Bukkit.getTag(REGISTRY_ENTITIES, NamespacedKey.minecraft("raiders"), org.bukkit.entity.EntityType.class); ++ Tag RAIDERS = ENTITY_TYPES_RAIDERS; + /** + * Vanilla entity tag for skeleton types + * @deprecated use {@link #ENTITY_TYPES_SKELETONS} + */ + @Deprecated(forRemoval = true) -+ Tag SKELETONS = Bukkit.getTag(REGISTRY_ENTITIES, NamespacedKey.minecraft("skeletons"), org.bukkit.entity.EntityType.class); ++ Tag SKELETONS = ENTITY_TYPES_SKELETONS; + // Paper end /** diff --git a/patches/unapplied/api/0265-added-Wither-API.patch b/patches/api/0262-added-Wither-API.patch similarity index 100% rename from patches/unapplied/api/0265-added-Wither-API.patch rename to patches/api/0262-added-Wither-API.patch diff --git a/patches/unapplied/api/0266-Added-PlayerChangeBeaconEffectEvent.patch b/patches/api/0263-Added-PlayerChangeBeaconEffectEvent.patch similarity index 100% rename from patches/unapplied/api/0266-Added-PlayerChangeBeaconEffectEvent.patch rename to patches/api/0263-Added-PlayerChangeBeaconEffectEvent.patch diff --git a/patches/unapplied/api/0267-Added-PlayerStonecutterRecipeSelectEvent.patch b/patches/api/0264-Added-PlayerStonecutterRecipeSelectEvent.patch similarity index 100% rename from patches/unapplied/api/0267-Added-PlayerStonecutterRecipeSelectEvent.patch rename to patches/api/0264-Added-PlayerStonecutterRecipeSelectEvent.patch diff --git a/patches/server/0006-MC-Utils.patch b/patches/server/0006-MC-Utils.patch index 89a0dc4a6..f5d70c265 100644 --- a/patches/server/0006-MC-Utils.patch +++ b/patches/server/0006-MC-Utils.patch @@ -6936,6 +6936,43 @@ index 0000000000000000000000000000000000000000..909b2c98e7a9117d2f737245e4661792 + throw new UnsupportedOperationException("Not supported."); + } +} +diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +index 0596f94c6ae22fcfddd7370e1eebd71885ed0e54..af1f7591e99b1aac95bcfabbe20447c1b5ad3adf 100644 +--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +@@ -88,8 +88,17 @@ public final class CraftMagicNumbers implements UnsafeValues { + private static final Map MATERIAL_ITEM = new HashMap<>(); + private static final Map MATERIAL_BLOCK = new HashMap<>(); + private static final Map MATERIAL_FLUID = new HashMap<>(); ++ // Paper start ++ private static final Map> ENTITY_TYPE_ENTITY_TYPES = new HashMap<>(); ++ private static final Map, org.bukkit.entity.EntityType> ENTITY_TYPES_ENTITY_TYPE = new HashMap<>(); + + static { ++ for (org.bukkit.entity.EntityType type : org.bukkit.entity.EntityType.values()) { ++ if (type == org.bukkit.entity.EntityType.UNKNOWN) continue; ++ ENTITY_TYPE_ENTITY_TYPES.put(type, net.minecraft.core.Registry.ENTITY_TYPE.get(CraftNamespacedKey.toMinecraft(type.getKey()))); ++ ENTITY_TYPES_ENTITY_TYPE.put(net.minecraft.core.Registry.ENTITY_TYPE.get(CraftNamespacedKey.toMinecraft(type.getKey())), type); ++ } ++ // Paper end + for (Block block : net.minecraft.core.Registry.BLOCK) { + BLOCK_MATERIAL.put(block, Material.getMaterial(net.minecraft.core.Registry.BLOCK.getKey(block).getPath().toUpperCase(Locale.ROOT))); + } +@@ -155,6 +164,14 @@ public final class CraftMagicNumbers implements UnsafeValues { + public static ResourceLocation key(Material mat) { + return CraftNamespacedKey.toMinecraft(mat.getKey()); + } ++ // Paper start ++ public static net.minecraft.world.entity.EntityType getEntityTypes(org.bukkit.entity.EntityType type) { ++ return ENTITY_TYPE_ENTITY_TYPES.get(type); ++ } ++ public static org.bukkit.entity.EntityType getEntityType(net.minecraft.world.entity.EntityType entityTypes) { ++ return ENTITY_TYPES_ENTITY_TYPE.get(entityTypes); ++ } ++ // Paper end + // ======================================================================== + + public static byte toLegacyData(BlockState data) { diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java index 939789831f14621800c6792d20119079fc51b6f1..aff1a282516119e0f6026f1b35d6ee72859e8670 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java diff --git a/patches/server/0010-Timings-v2.patch b/patches/server/0010-Timings-v2.patch index 0faf42c55..13185a52e 100644 --- a/patches/server/0010-Timings-v2.patch +++ b/patches/server/0010-Timings-v2.patch @@ -2114,12 +2114,12 @@ index e52ef47b783785dc214746b678e7b549aea9a274..3d90b3426873a3528af14f7f1ab0adae this.value = value; } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 0596f94c6ae22fcfddd7370e1eebd71885ed0e54..7024e0750a10ce4325b7217c76e03603ef53faa8 100644 +index af1f7591e99b1aac95bcfabbe20447c1b5ad3adf..bad8455d5128b3b2e188143c704964bdf8e445dd 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -156,6 +156,12 @@ public final class CraftMagicNumbers implements UnsafeValues { - return CraftNamespacedKey.toMinecraft(mat.getKey()); +@@ -173,6 +173,12 @@ public final class CraftMagicNumbers implements UnsafeValues { } + // Paper end // ======================================================================== + // Paper start + @Override @@ -2130,7 +2130,7 @@ index 0596f94c6ae22fcfddd7370e1eebd71885ed0e54..7024e0750a10ce4325b7217c76e03603 public static byte toLegacyData(BlockState data) { return CraftLegacy.toLegacyData(data); -@@ -330,6 +336,13 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -347,6 +353,13 @@ public final class CraftMagicNumbers implements UnsafeValues { return clazz; } diff --git a/patches/server/0021-Implement-Paper-VersionChecker.patch b/patches/server/0021-Implement-Paper-VersionChecker.patch index 9d988fdec..1e7818b2e 100644 --- a/patches/server/0021-Implement-Paper-VersionChecker.patch +++ b/patches/server/0021-Implement-Paper-VersionChecker.patch @@ -140,10 +140,10 @@ index 0000000000000000000000000000000000000000..91d7afc710a2d52b4f429e0381cf6417 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index bbb29440264094ecb82ec1282bdf7aa9f1f2106a..c7a5c9102b0cadeeefdd0dbd0de609f921460485 100644 +index 1049a7f39cf7ac2019d7ad7935e9205c98b100b7..bb8bad18ed799fd57ea2a1bcae4fb1399c3bde6a 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -368,6 +368,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -385,6 +385,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public String getTimingsServerName() { return com.destroystokyo.paper.PaperConfig.timingsServerName; } diff --git a/patches/server/0224-Add-CraftMagicNumbers.isSupportedApiVersion.patch b/patches/server/0224-Add-CraftMagicNumbers.isSupportedApiVersion.patch index 3b4c9b5a8..b4e3e987e 100644 --- a/patches/server/0224-Add-CraftMagicNumbers.isSupportedApiVersion.patch +++ b/patches/server/0224-Add-CraftMagicNumbers.isSupportedApiVersion.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add CraftMagicNumbers.isSupportedApiVersion() diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index c7a5c9102b0cadeeefdd0dbd0de609f921460485..db33d1eb9bee8178072cc3b430b88b044a66cd92 100644 +index bb8bad18ed799fd57ea2a1bcae4fb1399c3bde6a..8f39acd1707fd8989b81fb715a8481733d1eb20d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -373,6 +373,11 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -390,6 +390,11 @@ public final class CraftMagicNumbers implements UnsafeValues { public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() { return new com.destroystokyo.paper.PaperVersionFetcher(); } diff --git a/patches/server/0383-Add-Raw-Byte-ItemStack-Serialization.patch b/patches/server/0383-Add-Raw-Byte-ItemStack-Serialization.patch index 6fd9fd773..a923354dc 100644 --- a/patches/server/0383-Add-Raw-Byte-ItemStack-Serialization.patch +++ b/patches/server/0383-Add-Raw-Byte-ItemStack-Serialization.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization Serializes using NBT which is safer for server data migrations than bukkits format. diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index db33d1eb9bee8178072cc3b430b88b044a66cd92..114890cceaf786ca7f76f8d2a62d6243b039285b 100644 +index 8f39acd1707fd8989b81fb715a8481733d1eb20d..0bb3290f3ff23d7f653ce87943d7c6d156770926 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -378,6 +378,53 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -395,6 +395,53 @@ public final class CraftMagicNumbers implements UnsafeValues { public boolean isSupportedApiVersion(String apiVersion) { return apiVersion != null && SUPPORTED_API.contains(apiVersion); } diff --git a/patches/server/0494-Add-methods-to-get-translation-keys.patch b/patches/server/0494-Add-methods-to-get-translation-keys.patch index 94fdbfae7..a74edd8d2 100644 --- a/patches/server/0494-Add-methods-to-get-translation-keys.patch +++ b/patches/server/0494-Add-methods-to-get-translation-keys.patch @@ -42,10 +42,10 @@ index eb99e0c2462a2d1ab4508a5c3f1580b6e31d7465..c536eceef3365a7b726cd970df345ba1 public net.minecraft.world.item.enchantment.Enchantment getHandle() { diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 114890cceaf786ca7f76f8d2a62d6243b039285b..458be5e7cff9f9d97323360b7deaf045dff36fa6 100644 +index 0bb3290f3ff23d7f653ce87943d7c6d156770926..b3afb10f96e0662714ff89244132a6df8bbd3769 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -425,6 +425,30 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -442,6 +442,30 @@ public final class CraftMagicNumbers implements UnsafeValues { Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!"); return compound; } diff --git a/patches/server/0502-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch b/patches/server/0502-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch index 97e91ff12..bb18548c2 100644 --- a/patches/server/0502-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch +++ b/patches/server/0502-Expose-the-Entity-Counter-to-allow-plugins-to-use-va.patch @@ -21,10 +21,10 @@ index 8ec0a2ca0e1aa2e31c73df6ddb6b626d386797d8..41acc6d9e5b01526a2f0d5fa68b2913e + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 458be5e7cff9f9d97323360b7deaf045dff36fa6..5d5720b2a6cbf9d73b6c7413e4ddc5cc114b9448 100644 +index b3afb10f96e0662714ff89244132a6df8bbd3769..e28bb9f0f27d2d7347f48891256ac8225e1e1459 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -449,6 +449,10 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -466,6 +466,10 @@ public final class CraftMagicNumbers implements UnsafeValues { net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack); return nmsItemStack.getItem().getDescriptionId(nmsItemStack); } diff --git a/patches/server/0521-Fix-client-lag-on-advancement-loading.patch b/patches/server/0521-Fix-client-lag-on-advancement-loading.patch index 5d872f587..9ae9e3565 100644 --- a/patches/server/0521-Fix-client-lag-on-advancement-loading.patch +++ b/patches/server/0521-Fix-client-lag-on-advancement-loading.patch @@ -15,10 +15,10 @@ manually reload the advancement data for all players, which normally takes place as a part of the datapack reloading. diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 5d5720b2a6cbf9d73b6c7413e4ddc5cc114b9448..ea45befec7e03f48da00f8a77dcae6561745a01e 100644 +index e28bb9f0f27d2d7347f48891256ac8225e1e1459..29d079927ac5f48f14e6f41a32b03174cc622dda 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -306,7 +306,13 @@ public final class CraftMagicNumbers implements UnsafeValues { +@@ -323,7 +323,13 @@ public final class CraftMagicNumbers implements UnsafeValues { Bukkit.getLogger().log(Level.SEVERE, "Error saving advancement " + key, ex); } diff --git a/patches/unapplied/server/0607-added-Wither-API.patch b/patches/server/0579-added-Wither-API.patch similarity index 91% rename from patches/unapplied/server/0607-added-Wither-API.patch rename to patches/server/0579-added-Wither-API.patch index 1995967f8..16df60938 100644 --- a/patches/unapplied/server/0607-added-Wither-API.patch +++ b/patches/server/0579-added-Wither-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] added Wither API diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -index 9a89e6ff72d285a941be986300ff5c2a723a80e0..c4b075fffae1e535b887740d48bd26da223d6798 100644 +index 4f9f64def9b5da5bd2714c5f3ba36a4339623758..3657b7021d8b505653fadbdfbd515c112cd11177 100644 --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java -@@ -83,6 +83,11 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob +@@ -85,6 +85,11 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob return entityliving.getMobType() != MobType.UNDEAD && entityliving.attackable(); }; private static final TargetingConditions TARGETING_CONDITIONS = TargetingConditions.forCombat().range(20.0D).selector(WitherBoss.LIVING_ENTITY_SELECTOR); @@ -20,7 +20,7 @@ index 9a89e6ff72d285a941be986300ff5c2a723a80e0..c4b075fffae1e535b887740d48bd26da public WitherBoss(EntityType type, Level world) { super(type, world); -@@ -591,7 +596,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob +@@ -603,7 +608,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @Override public boolean canChangeDimensions() { diff --git a/patches/unapplied/server/0608-Added-firing-of-PlayerChangeBeaconEffectEvent.patch b/patches/server/0580-Added-firing-of-PlayerChangeBeaconEffectEvent.patch similarity index 94% rename from patches/unapplied/server/0608-Added-firing-of-PlayerChangeBeaconEffectEvent.patch rename to patches/server/0580-Added-firing-of-PlayerChangeBeaconEffectEvent.patch index d83a1ff8c..b6c0947f1 100644 --- a/patches/unapplied/server/0608-Added-firing-of-PlayerChangeBeaconEffectEvent.patch +++ b/patches/server/0580-Added-firing-of-PlayerChangeBeaconEffectEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Added firing of PlayerChangeBeaconEffectEvent diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -index 6647cda859006f7afc9aae14f5c305e428b3c5c6..6a198f2590563577877ec8510bbdbab72c359aa7 100644 +index 61276c2a7d607f57b3e5e4c61bc89d5016d5dd1f..fb4c987512f82e702b20c0eff493a2777624f3b3 100644 --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java @@ -160,9 +160,15 @@ public class BeaconMenu extends AbstractContainerMenu { diff --git a/patches/unapplied/server/0609-Add-toggle-for-always-placing-the-dragon-egg.patch b/patches/server/0581-Add-toggle-for-always-placing-the-dragon-egg.patch similarity index 79% rename from patches/unapplied/server/0609-Add-toggle-for-always-placing-the-dragon-egg.patch rename to patches/server/0581-Add-toggle-for-always-placing-the-dragon-egg.patch index d4d11bbaa..02835fadb 100644 --- a/patches/unapplied/server/0609-Add-toggle-for-always-placing-the-dragon-egg.patch +++ b/patches/server/0581-Add-toggle-for-always-placing-the-dragon-egg.patch @@ -5,25 +5,26 @@ Subject: [PATCH] Add toggle for always placing the dragon egg diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -index eece168668e93d2cd0bdcdd0911aef5208084e67..3e694d8a28524f9ea6ba8f1947061b92bc15b13d 100644 +index 6322748d2eabdf29a46c50166fad265b6c8053d5..1eaea3659dbd99767a045e0f66143bebb604c047 100644 --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java -@@ -802,5 +802,10 @@ public class PaperWorldConfig { - } +@@ -697,6 +697,11 @@ public class PaperWorldConfig { perPlayerMobSpawns = getBoolean("per-player-mob-spawns", true); } -+ + + public boolean enderDragonsDeathAlwaysPlacesDragonEgg = false; + private void enderDragonsDeathAlwaysPlacesDragonEgg() { + enderDragonsDeathAlwaysPlacesDragonEgg = getBoolean("ender-dragons-death-always-places-dragon-egg", enderDragonsDeathAlwaysPlacesDragonEgg); + } - } - ++ + public boolean phantomIgnoreCreative = true; + public boolean phantomOnlyAttackInsomniacs = true; + private void phantomSettings() { diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -index e1d689aa65b8d993c7223d306363366f3adff62f..f88719dede80c064f6210e078c435ffda32ecc1a 100644 +index ddfaaac55646527ccd5bb4f5b4d35aa3ddaf34f4..619ce8161deab5b93e2a3c4e652b3249f499fd3b 100644 --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -@@ -363,7 +363,7 @@ public class EndDragonFight { +@@ -367,7 +367,7 @@ public class EndDragonFight { this.dragonEvent.setVisible(false); this.spawnExitPortal(true); this.spawnNewGateway(); diff --git a/patches/unapplied/server/0610-Added-PlayerStonecutterRecipeSelectEvent.patch b/patches/server/0582-Added-PlayerStonecutterRecipeSelectEvent.patch similarity index 97% rename from patches/unapplied/server/0610-Added-PlayerStonecutterRecipeSelectEvent.patch rename to patches/server/0582-Added-PlayerStonecutterRecipeSelectEvent.patch index b3564670a..a82ffac8c 100644 --- a/patches/unapplied/server/0610-Added-PlayerStonecutterRecipeSelectEvent.patch +++ b/patches/server/0582-Added-PlayerStonecutterRecipeSelectEvent.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Added PlayerStonecutterRecipeSelectEvent Co-Authored-By: MiniDigger diff --git a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java -index c971a534ded962e3be92c71059c75cc1d54970b5..dd1d05ce730fdada2278b5cd9d72955df35c70c5 100644 +index 221b6ffb426edc034183dbaf37de29c694874c62..c597139b2b88edf629bc0021ebb65d8bea2e6a7d 100644 --- a/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java +++ b/src/main/java/net/minecraft/world/inventory/StonecutterMenu.java @@ -62,7 +62,7 @@ public class StonecutterMenu extends AbstractContainerMenu { diff --git a/patches/unapplied/server/0606-Added-Vanilla-Entity-Tags.patch b/patches/unapplied/server/0606-Added-Vanilla-Entity-Tags.patch deleted file mode 100644 index 78073c1c3..000000000 --- a/patches/unapplied/server/0606-Added-Vanilla-Entity-Tags.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jake Potrebic -Date: Sun, 3 Jan 2021 20:03:35 -0800 -Subject: [PATCH] Added Vanilla Entity Tags - - -diff --git a/src/main/java/io/papermc/paper/CraftEntityTag.java b/src/main/java/io/papermc/paper/CraftEntityTag.java -new file mode 100644 -index 0000000000000000000000000000000000000000..dd6faad4f2591de0cf4a48744a7bd0280594605b ---- /dev/null -+++ b/src/main/java/io/papermc/paper/CraftEntityTag.java -@@ -0,0 +1,29 @@ -+package io.papermc.paper; -+ -+import org.bukkit.craftbukkit.tag.CraftTag; -+import org.bukkit.craftbukkit.util.CraftMagicNumbers; -+import org.bukkit.entity.EntityType; -+ -+import java.util.Collections; -+import java.util.Set; -+import java.util.stream.Collectors; -+import net.minecraft.resources.ResourceLocation; -+import net.minecraft.tags.TagCollection; -+ -+@Deprecated(forRemoval = true) -+public class CraftEntityTag extends CraftTag, EntityType> { -+ -+ public CraftEntityTag(TagCollection> registry, ResourceLocation tag) { -+ super(registry, tag); -+ } -+ -+ @Override -+ public boolean isTagged(EntityType item) { -+ return getHandle().contains(CraftMagicNumbers.getEntityTypes(item)); -+ } -+ -+ @Override -+ public Set getValues() { -+ return Collections.unmodifiableSet(getHandle().getValues().stream().map(CraftMagicNumbers::getEntityType).collect(Collectors.toSet())); -+ } -+} -diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 374155f592907fc078dd4747ad7710ee83d7da50..35c7ecad55f63701fcb86fb6051723662268b7c9 100644 ---- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java -+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -2391,6 +2391,11 @@ public final class CraftServer implements Server { - Preconditions.checkArgument(clazz == org.bukkit.entity.EntityType.class, "Entity type namespace must have entity type"); - - return (org.bukkit.Tag) new CraftEntityTag(EntityTypeTags.getAllTags(), key); -+ // Paper start -+ case org.bukkit.Tag.REGISTRY_ENTITIES: -+ Preconditions.checkArgument(clazz == org.bukkit.entity.EntityType.class, "Entity namespace must have entitytype type"); -+ return (org.bukkit.Tag) new io.papermc.paper.CraftEntityTag(net.minecraft.tags.EntityTypeTags.getAllTags(), key); -+ // Paper end - default: - throw new IllegalArgumentException(); - } -diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index c0a08c3ac18b3ec0964c61c90df3263c50ece83d..eb06ca21a964de3f3d6712387b72e8994f1f03bd 100644 ---- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -@@ -115,8 +115,17 @@ public final class CraftMagicNumbers implements UnsafeValues { - private static final Map MATERIAL_ITEM = new HashMap<>(); - private static final Map MATERIAL_BLOCK = new HashMap<>(); - private static final Map MATERIAL_FLUID = new HashMap<>(); -+ // Paper start -+ private static final Map> ENTITY_TYPE_ENTITY_TYPES = new HashMap<>(); -+ private static final Map, org.bukkit.entity.EntityType> ENTITY_TYPES_ENTITY_TYPE = new HashMap<>(); - - static { -+ for (org.bukkit.entity.EntityType type : org.bukkit.entity.EntityType.values()) { -+ if (type == org.bukkit.entity.EntityType.UNKNOWN) continue; -+ ENTITY_TYPE_ENTITY_TYPES.put(type, net.minecraft.core.Registry.ENTITY_TYPE.get(CraftNamespacedKey.toMinecraft(type.getKey()))); -+ ENTITY_TYPES_ENTITY_TYPE.put(net.minecraft.core.Registry.ENTITY_TYPE.get(CraftNamespacedKey.toMinecraft(type.getKey())), type); -+ } -+ // Paper end - for (Block block : net.minecraft.core.Registry.BLOCK) { - BLOCK_MATERIAL.put(block, Material.getMaterial(net.minecraft.core.Registry.BLOCK.getKey(block).getPath().toUpperCase(Locale.ROOT))); - } -@@ -182,6 +191,14 @@ public final class CraftMagicNumbers implements UnsafeValues { - public static ResourceLocation key(Material mat) { - return CraftNamespacedKey.toMinecraft(mat.getKey()); - } -+ // Paper start -+ public static net.minecraft.world.entity.EntityType getEntityTypes(org.bukkit.entity.EntityType type) { -+ return ENTITY_TYPE_ENTITY_TYPES.get(type); -+ } -+ public static org.bukkit.entity.EntityType getEntityType(net.minecraft.world.entity.EntityType entityTypes) { -+ return ENTITY_TYPES_ENTITY_TYPE.get(entityTypes); -+ } -+ // Paper end - // ======================================================================== - // Paper start - @Override