0fa2a949ae
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 8503c3c9 #621: Add HumanEntity#getItemInUse and Material#getSlipperiness 248deb09 #622: Add methods to check if item is the breed item for an entity 2ce691d8 Clarify Player#breakBlock only works for blocks in the same world 5dcdd48e SPIGOT-6514: Small Dripleaf block data is missing half property cc9610b7 #619: Add Player#breakBlock() 862bc475 Fix bad merge of SPIGOT-6502 fix 989bb0c1 Downgrade SnakeYAML due to issues with comments parsing 1dff62ae Fix inverted visual fire docs CraftBukkit Changes: 40caacc8 SPIGOT-6526: World entities are not populated when plugin onEnable is called c9a92ad0 SPIGOT-6536: Marker position not set on spawn 20d3e57c #855: Add HumanEntity#getItemInUse and Material#getSlipperiness d9c69b44 SPIGOT-6529: Fix BundleMeta#setItems 8bd43be5 SPIGOT-6535: PlayerGameModeChangeEvent event incorrectly reports old gamemode 4ece3ff3 #856: Add methods to check if item is the breed item for an entity dd4bec5f Add additional validation to Player#breakBlock bc835ae6 SPIGOT-6532: Fix Entity#setGlowing 384e116e Restore 1.16.5 behaviour of InventoryDragEvent being called even when a single item is 'dragged' to its own slot b42e708c Fix new map colors rendering as transparent cfe7fecf SPIGOT-6524: Inventory desync when InventoryClickEvent is cancelled eeae1b19 SPIGOT-6522: ItemStack on cursor is always AIR 7490724d Fix missing PlayerEditBookEvent 06875f76 SPIGOT-6513: Placing ItemStack in Inventory causes InventoryAction.NOTHING 27835bde SPIGOT-6519: Fix end gateway teleports 4ac634ad SPIGOT-6515: "Un-waterlogging" throws UnsupportedOperationException in some cases da425fa2 SPIGOT-6518: Anvils falling onto dripstone can sometimes crash server 50530da9 SPIGOT-6514: Small Dripleaf block data is missing half property 6fdecf20 #853: Implement Player#breakBlock() 4db9c49f SPIGOT-6510: Bukkit#createMap throws NullPointerException 89e2b127 SPIGOT-6517: Spider jockey crash on dripstone cbf2f678 SPIGOT-6508: Rename conflicted getServer 74575d48 SPIGOT-6506: Fix crash with custom inventories a3df386f Fix NPE with Entity.getNearbyEntities d747f8ed Fix NPE with World.getNearbyEntities 4d2c7800 Fix second usage of worldGenSettings just in case 5182f923 SPIGOT-6504: Fix generating fresh worlds Spigot Changes: 66f9d3c1 Rebuild patches 191e4971 Rebuild patches a09c0bb6 Restore Spigot experience merging
77 lines
4.8 KiB
Diff
77 lines
4.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Kyle Wood <kyle@denwav.dev>
|
|
Date: Fri, 11 Jun 2021 05:25:03 -0500
|
|
Subject: [PATCH] Decompile fixes
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index 0000a0057ec4ee2db72e4ea1bf421f95d9d9fdc6..729e55535d833f8f6ff65bf226aac5ecdec44990 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -1139,7 +1139,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
}
|
|
}
|
|
|
|
- protected void doRunTask(TickTask ticktask) {
|
|
+ public void doRunTask(TickTask ticktask) { // Paper - decomp fix
|
|
this.getProfiler().incrementCounter("runTask");
|
|
super.doRunTask(ticktask);
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/commands/SummonCommand.java b/src/main/java/net/minecraft/server/commands/SummonCommand.java
|
|
index 71c22f72b6e7507e85ecb6be3166b809b7409ab2..fb9fca76a42479363c9c9764fdae6adb4b5e703f 100644
|
|
--- a/src/main/java/net/minecraft/server/commands/SummonCommand.java
|
|
+++ b/src/main/java/net/minecraft/server/commands/SummonCommand.java
|
|
@@ -54,9 +54,9 @@ public class SummonCommand {
|
|
|
|
nbttagcompound1.putString("id", entity.toString());
|
|
ServerLevel worldserver = source.getLevel();
|
|
- Entity entity1 = EntityType.loadEntityRecursive(nbttagcompound1, worldserver, (entity1) -> {
|
|
- entity1.moveTo(pos.x, pos.y, pos.z, entity1.getYRot(), entity1.getXRot());
|
|
- return entity1;
|
|
+ Entity entity1 = EntityType.loadEntityRecursive(nbttagcompound1, worldserver, (loadedEntity) -> { // Paper - decomp fix
|
|
+ loadedEntity.moveTo(pos.x, pos.y, pos.z, loadedEntity.getYRot(), loadedEntity.getXRot()); // Paper - decomp fix
|
|
+ return loadedEntity; // Paper - decomp fix
|
|
});
|
|
|
|
if (entity1 == null) {
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
|
index 88a8c2bc4aa30f478122a05fd119486a0107db82..5f00e3f4c86196db47bf1007973445d40866afdd 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
|
|
@@ -169,8 +169,8 @@ public class BehaviorUtils {
|
|
|
|
return optional.map((uuid) -> {
|
|
return ((ServerLevel) entity.level).getEntity(uuid);
|
|
- }).map((entity) -> {
|
|
- return entity instanceof LivingEntity ? (LivingEntity) entity : null;
|
|
+ }).map((entity2) -> { // Paper - decomp fix
|
|
+ return entity2 instanceof LivingEntity ? (LivingEntity) entity2 : null; // Paper - decomp fix
|
|
});
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
|
index c88dc823ca0c2f83bc10886208d498ea77523d68..dcfd0b107ac7bd1633f3b681cd5f5e26ce87bd63 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
|
@@ -522,7 +522,7 @@ public class Phantom extends FlyingMob implements Enemy {
|
|
List<Player> list = Phantom.this.level.getNearbyPlayers(this.attackTargeting, (LivingEntity) Phantom.this, Phantom.this.getBoundingBox().inflate(16.0D, 64.0D, 16.0D));
|
|
|
|
if (!list.isEmpty()) {
|
|
- list.sort(Comparator.comparing(Entity::getY).reversed());
|
|
+ list.sort(Comparator.<Player, Double>comparing(Entity::getY).reversed()); // Paper - decomp fix
|
|
Iterator iterator = list.iterator();
|
|
|
|
while (iterator.hasNext()) {
|
|
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
|
index b4a5709b03e400d00504f33a9b34019d2b7bf115..2d79d4014770081fcd58a929e5fe0a26ac1b8023 100644
|
|
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
|
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
|
|
@@ -172,7 +172,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
|
|
Map<RecipeType<?>, Object2ObjectLinkedOpenHashMap<ResourceLocation, Recipe<?>>> map = Maps.newHashMap(); // CraftBukkit
|
|
|
|
recipes.forEach((irecipe) -> {
|
|
- Map<ResourceLocation, Recipe<?>> map1 = (Map) map.computeIfAbsent(irecipe.getType(), (recipes) -> {
|
|
+ Map<ResourceLocation, Recipe<?>> map1 = (Map) map.computeIfAbsent(irecipe.getType(), (recipes_) -> { // Paper - decomp fix
|
|
return new Object2ObjectLinkedOpenHashMap<>(); // CraftBukkit
|
|
});
|
|
Recipe<?> irecipe1 = (Recipe) map1.put(irecipe.getId(), irecipe);
|