Updated Upstream (Bukkit/CraftBukkit) (#10301)

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:
7ca2b46c SPIGOT-7594: Fix typo and include missing MinecraftExperimental annotation in Loot Table enum

CraftBukkit Changes:
176c0ad39 Fix copying BlockStates with fields (eg, Banner)
ee685bd2a Fix Camel not standing up when hurt
619936d4b Increase outdated build delay
This commit is contained in:
Jake Potrebic 2024-03-08 15:52:00 -08:00
parent a0b94c31b4
commit 8b00b9a52d
10 changed files with 33 additions and 29 deletions

View File

@ -651,3 +651,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
TRIAL_CHAMBERS_CORRIDOR_POT("pots/trial_chambers/corridor"),
SHIPWRECK_MAP("chests/shipwreck_map"),
SHIPWRECK_SUPPLY("chests/shipwreck_supply"),
@@ -0,0 +0,0 @@ public enum LootTables implements Keyed {
PIGLIN_BARTERING("gameplay/piglin_bartering"),
// Spawners
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
TRIAL_CHAMBER_KEY("spawners/trial_chamber/key"),
@MinecraftExperimental
+ @org.jetbrains.annotations.ApiStatus.Experimental // Paper - add missing annotation
TRIAL_CHAMBER_CONSUMABLES("spawners/trial_chamber/consumables"),
// Archaeology
DESERT_WELL_ARCHAEOLOGY("archaeology/desert_well"),

View File

@ -146,7 +146,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper
Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -7);
deadline.add(Calendar.DAY_OF_YEAR, -28);
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java

View File

@ -37,11 +37,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
@Override
- protected void actuallyHurt(DamageSource source, float amount) {
+ protected boolean actuallyHurt(DamageSource source, float amount) { // Paper - Fix CB...
- // CraftBukkit start - void -> boolean
- protected boolean actuallyHurt(DamageSource damagesource, float f) {
- boolean hurt = super.actuallyHurt(damagesource, f);
- if (!hurt) {
- return hurt;
- }
- // CraftBukkit end
+ protected boolean actuallyHurt(DamageSource damagesource, float f) { // Paper - change return type to boolean
this.standUpInstantly();
- super.actuallyHurt(source, amount);
+ return super.actuallyHurt(source, amount); // Paper - Fix CB...
- return hurt; // CraftBukkit
+ return super.actuallyHurt(damagesource, f); // Paper - change return type to boolean
}
@Override

View File

@ -73,14 +73,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
@@ -0,0 +0,0 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
boolean flag1 = this.isTamed() && this.getAge() == 0 && this.canFallInLove();
boolean bl2 = this.isTamed() && this.getAge() == 0 && this.canFallInLove();
if (bl2) {
if (flag1) {
- this.setInLove(player);
+ this.setInLove(player, item.copy()); // Paper - Fix EntityBreedEvent copying
}
boolean bl3 = this.isBaby();
boolean flag2 = this.isBaby();
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java

View File

@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -0,0 +0,0 @@ public class Main {
Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -7);
deadline.add(Calendar.DAY_OF_YEAR, -28);
if (buildDate.before(deadline.getTime())) {
- System.err.println("*** Error, this build is outdated ***");
+ // Paper start - This is some stupid bullshit

View File

@ -141,19 +141,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
public static <T> SortedArraySet<T> create(Comparator<T> comparator) {
diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
@@ -0,0 +0,0 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
@Override
protected void customServerAiStep() {
this.level().getProfiler().push("camelBrain");
- Brain<?> brain = this.getBrain();
+ Brain<Camel> brain = (Brain<Camel>) this.getBrain(); // Paper - decompile fix
brain.tick((ServerLevel)this.level(), this);
this.level().getProfiler().pop();
this.level().getProfiler().push("camelActivityUpdate");
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java

View File

@ -22,14 +22,14 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
@@ -0,0 +0,0 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
} else {
boolean bl = this.getHealth() < this.getMaxHealth();
if (bl) {
boolean flag = this.getHealth() < this.getMaxHealth();
if (flag) {
- this.heal(2.0F);
+ this.heal(2.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // Paper - Add missing regain reason
}
boolean bl2 = this.isTamed() && this.getAge() == 0 && this.canFallInLove();
boolean flag1 = this.isTamed() && this.getAge() == 0 && this.canFallInLove();
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java

View File

@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -0,0 +0,0 @@ public class Main {
deadline.add(Calendar.DAY_OF_YEAR, -7);
deadline.add(Calendar.DAY_OF_YEAR, -28);
if (buildDate.before(deadline.getTime())) {
System.err.println("*** Error, this build is outdated ***");
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");

@ -1 +1 @@
Subproject commit 9a80d38c002509a4849c5e5f735dca9f9b5731e4
Subproject commit 7ca2b46c1a7d7479e45a79aa2db86de5c7fd20d8

@ -1 +1 @@
Subproject commit 98b6c1ac7d4698ded83d96217861b071e519b300
Subproject commit 176c0ad39fffd8a6003e686b910fc02b669f1434