diff --git a/build-data/paper.at b/build-data/paper.at index e1f52762aa..84637b2535 100644 --- a/build-data/paper.at +++ b/build-data/paper.at @@ -4,6 +4,7 @@ # This line would make the field public and remove the final modifier #public-f net.minecraft.network.protocol.game.ClientboundChatPacket sender # Leave out the member and it will apply to the class itself +# More info, see here https://mcforge.readthedocs.io/en/latest/advanced/accesstransformers/#access-modifiers # Item Rarity API public net.minecraft.world.item.Item rarity @@ -16,3 +17,15 @@ public net.minecraft.util.worldupdate.WorldUpgrader REGEX # More Lidded Block API public net.minecraft.world.level.block.entity.EnderChestBlockEntity openersCounter + +# Improve EntityShootBowEvent +public net.minecraft.world.entity.projectile.AbstractArrow getPickupItem()Lnet.minecraft.world.item.ItemStack; + +# Implement Expanded ArmorStand API +public net.minecraft.world.entity.decoration.ArmorStand isDisabled(Lnet/minecraft/world/entity/EquipmentSlot;)Z + +# Asynchronous chunk IO and loading +public net.minecraft.util.thread.BlockableEventLoop runAllTasks()V + +# Chunk debug command +public net.minecraft.server.level.ChunkMap entitiesInLevel diff --git a/patches/server/Asynchronous-chunk-IO-and-loading.patch b/patches/server/Asynchronous-chunk-IO-and-loading.patch index 42e8f47527..d30ad1b1f4 100644 --- a/patches/server/Asynchronous-chunk-IO-and-loading.patch +++ b/patches/server/Asynchronous-chunk-IO-and-loading.patch @@ -2987,19 +2987,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 // CraftBukkit end StringReader stringreader = new StringReader(packet.getCommand()); -diff --git a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java -+++ b/src/main/java/net/minecraft/util/thread/BlockableEventLoop.java -@@ -0,0 +0,0 @@ public abstract class BlockableEventLoop implements Profiler - this.pendingRunnables.clear(); - } - -- protected void runAllTasks() { -+ public void runAllTasks() { // Paper - protected -> public - while(this.pollTask()) { - } - diff --git a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java b/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/world/entity/ai/village/poi/PoiManager.java diff --git a/patches/server/Chunk-debug-command.patch b/patches/server/Chunk-debug-command.patch index c1aa6ce8ff..ff3a28cb02 100644 --- a/patches/server/Chunk-debug-command.patch +++ b/patches/server/Chunk-debug-command.patch @@ -441,19 +441,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private boolean hasChangedSections; private final ShortSet[] changedBlocksPerSection; private final BitSet blockChangedLightSectionFilter; -diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/server/level/ChunkMap.java -+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java -@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider - public final Long2ObjectLinkedOpenHashMap updatingChunkMap = new Long2ObjectLinkedOpenHashMap(); - public volatile Long2ObjectLinkedOpenHashMap visibleChunkMap; - private final Long2ObjectLinkedOpenHashMap pendingUnloads; -- private final LongSet entitiesInLevel; -+ public final LongSet entitiesInLevel; // Paper - private -> public - public final ServerLevel level; - private final ThreadedLevelLightEngine lightEngine; - private final BlockableEventLoop mainThreadExecutor; diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java diff --git a/patches/server/Implement-Expanded-ArmorStand-API.patch b/patches/server/Implement-Expanded-ArmorStand-API.patch index 312fdf9fe6..2493980a19 100644 --- a/patches/server/Implement-Expanded-ArmorStand-API.patch +++ b/patches/server/Implement-Expanded-ArmorStand-API.patch @@ -7,19 +7,6 @@ Add the following: - Add proper methods for getting and setting items in both hands. Deprecates old methods - Enable/Disable slot interactions -diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java -@@ -0,0 +0,0 @@ public class ArmorStand extends LivingEntity { - return enumitemslot; - } - -- private boolean isDisabled(net.minecraft.world.entity.EquipmentSlot slot) { -+ public boolean isDisabled(net.minecraft.world.entity.EquipmentSlot slot) { // Paper - private -> public - return (this.disabledSlots & 1 << slot.getFilterFlag()) != 0 || slot.getType() == net.minecraft.world.entity.EquipmentSlot.Type.HAND && !this.isShowArms(); - } - diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java diff --git a/patches/server/Improve-EntityShootBowEvent.patch b/patches/server/Improve-EntityShootBowEvent.patch index b5f98ee1c2..b5fbb4d63c 100644 --- a/patches/server/Improve-EntityShootBowEvent.patch +++ b/patches/server/Improve-EntityShootBowEvent.patch @@ -42,55 +42,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } @Override -diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -0,0 +0,0 @@ public abstract class AbstractArrow extends Projectile { - } - } - -- protected abstract ItemStack getPickupItem(); -+ public abstract ItemStack getPickupItem(); // Paper - protected -> public - - @Override - protected Entity.MovementEmission getMovementEmission() { -diff --git a/src/main/java/net/minecraft/world/entity/projectile/Arrow.java b/src/main/java/net/minecraft/world/entity/projectile/Arrow.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/Arrow.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/Arrow.java -@@ -0,0 +0,0 @@ public class Arrow extends AbstractArrow { - } - - @Override -- protected ItemStack getPickupItem() { -+ public ItemStack getPickupItem() { // Paper - protected -> public - if (this.effects.isEmpty() && this.potion == Potions.EMPTY) { - return new ItemStack(Items.ARROW); - } else { -diff --git a/src/main/java/net/minecraft/world/entity/projectile/SpectralArrow.java b/src/main/java/net/minecraft/world/entity/projectile/SpectralArrow.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/SpectralArrow.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/SpectralArrow.java -@@ -0,0 +0,0 @@ public class SpectralArrow extends AbstractArrow { - } - - @Override -- protected ItemStack getPickupItem() { -+ public ItemStack getPickupItem() { // Paper - protected -> public - return new ItemStack(Items.SPECTRAL_ARROW); - } - -diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java -index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownTrident.java -@@ -0,0 +0,0 @@ public class ThrownTrident extends AbstractArrow { - } - - @Override -- protected ItemStack getPickupItem() { -+ public ItemStack getPickupItem() { // Paper - protected -> public - return this.tridentItem.copy(); - } - diff --git a/patches/server/Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch b/patches/server/Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch index 9e25ffa6de..82ceb96a16 100644 --- a/patches/server/Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch +++ b/patches/server/Optimize-PlayerChunkMap-memory-use-for-visibleChunks.patch @@ -110,7 +110,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // public final Long2ObjectLinkedOpenHashMap updatingChunkMap = new Long2ObjectLinkedOpenHashMap(); // Paper - moved up + // public volatile Long2ObjectLinkedOpenHashMap visibleChunkMap; // Paper - moved up private final Long2ObjectLinkedOpenHashMap pendingUnloads; - public final LongSet entitiesInLevel; // Paper - private -> public + public final LongSet entitiesInLevel; public final ServerLevel level; @@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider