Updated Upstream (Bukkit/CraftBukkit/Spigot)
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: 09b1c123 PR-916: Add more lightning API c085f3de PR-859: Add Entity#getTrackedBy CraftBukkit Changes: 1bf30a4e9 SPIGOT-7495: Spawning bee entity in asynchronous BlockPopulator causes IllegalStateException - Accessing LegacyRandomSource from multiple threads 476c5bccd PR-1267: Add more lightning API 40d5e6c02 PR-1190: Add Entity#getTrackedBy 40d41acc1 SPIGOT-7491: Downgrade bundled SQLite to be updated next release 44b31da38 PR-1264: Load Bukkit class before creating Registry item dc45a6738 SPIGOT-7496: Failure to load datapacks with multiple identical predicates f508657d6 Fix decompile error affecting javac ef7a4743d PR-1265: Ensure UTF-8 used in new test resource Spigot Changes: 224dad51 Rebuild patches
This commit is contained in:
parent
9b7863a607
commit
a4d2616808
20 changed files with 38 additions and 132 deletions
|
@ -36,7 +36,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ public static final class LegacyRegistry extends CraftRegistry<ConfiguredStructure, Structure> {
|
||||
+
|
||||
+ public LegacyRegistry(final Registry<Structure> minecraftRegistry) {
|
||||
+ super(minecraftRegistry, LegacyRegistry::minecraftToBukkit);
|
||||
+ super(ConfiguredStructure.class, minecraftRegistry, LegacyRegistry::minecraftToBukkit);
|
||||
+ }
|
||||
+
|
||||
+ private static @Nullable ConfiguredStructure minecraftToBukkit(NamespacedKey key, Structure nms) {
|
||||
|
@ -80,7 +80,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
@@ -0,0 +0,0 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
return new CraftRegistry<>(registryHolder.registryOrThrow(Registries.TRIM_PATTERN), CraftTrimPattern::new);
|
||||
return new CraftRegistry<>(TrimPattern.class, registryHolder.registryOrThrow(Registries.TRIM_PATTERN), CraftTrimPattern::new);
|
||||
}
|
||||
// TODO registry modification API
|
||||
+ // Paper start - remove this after a while along with all ConfiguredStructure stuff
|
||||
|
|
|
@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
implementation("org.ow2.asm:asm:9.5")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.5") // Paper - ASM event executor generation
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.43.0.0")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1")
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.1.0")
|
||||
@@ -0,0 +0,0 @@ dependencies {
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
+ implementation("net.fabricmc:mapping-io:0.3.0") // Paper - needed to read mappings for stacktrace deobfuscation
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.43.0.0")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1")
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.1.0")
|
||||
runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||
@@ -0,0 +0,0 @@ tasks.check {
|
||||
|
|
|
@ -8,28 +8,6 @@ and constructing an entity off the main thread
|
|||
should be supported. Some entities (for whatever
|
||||
reason) use the level's random in some places.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java
|
||||
@@ -0,0 +0,0 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
|
||||
BeeGoToHiveGoal() {
|
||||
super();
|
||||
- this.travellingTicks = Bee.this.level().random.nextInt(10);
|
||||
+ this.travellingTicks = Bee.this./* level(). */random.nextInt(10); // Paper - use entity random
|
||||
this.blacklistedTargets = Lists.newArrayList();
|
||||
this.setFlags(EnumSet.of(Goal.Flag.MOVE));
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
|
||||
|
||||
BeeGoToKnownFlowerGoal() {
|
||||
super();
|
||||
- this.travellingTicks = Bee.this.level().random.nextInt(10);
|
||||
+ this.travellingTicks = Bee.this./* level(). */random.nextInt(10); // Paper - use entity random
|
||||
this.setFlags(EnumSet.of(Goal.Flag.MOVE));
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Date: Tue, 26 Sep 2023 18:32:49 -0700
|
||||
Subject: [PATCH] Fix creating the reverse map for loot table keys
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java b/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/storage/loot/LootDataManager.java
|
||||
@@ -0,0 +0,0 @@ public class LootDataManager implements PreparableReloadListener, LootDataResolv
|
||||
public static final LootDataId<LootTable> EMPTY_LOOT_TABLE_KEY = new LootDataId<>(LootDataType.TABLE, BuiltInLootTables.EMPTY);
|
||||
private Map<LootDataId<?>, ?> elements = Map.of();
|
||||
private Multimap<LootDataType<?>, ResourceLocation> typeKeys = ImmutableMultimap.of();
|
||||
- public Map<?, ResourceLocation> lootTableToKey = ImmutableMap.of(); // CraftBukkit
|
||||
+ public Map<LootTable, ResourceLocation> lootTableToKey = ImmutableMap.of(); // CraftBukkit // Paper - only store loot tables because those don't override equals and hashCode
|
||||
|
||||
public LootDataManager() {}
|
||||
|
||||
@@ -0,0 +0,0 @@ public class LootDataManager implements PreparableReloadListener, LootDataResolv
|
||||
this.elements = map1;
|
||||
this.typeKeys = com_google_common_collect_immutablemultimap_builder.build();
|
||||
// CraftBukkit start - build a reversed registry map
|
||||
- ImmutableMap.Builder<Object, ResourceLocation> lootTableToKeyBuilder = ImmutableMap.builder();
|
||||
- this.elements.forEach((key, lootTable) -> lootTableToKeyBuilder.put((Object) lootTable, key.location()));
|
||||
+ // Paper start - only create a map for loot tables
|
||||
+ ImmutableMap.Builder<LootTable, ResourceLocation> lootTableToKeyBuilder = ImmutableMap.builder();
|
||||
+ this.elements.forEach((lootDataId, value) -> {
|
||||
+ if (lootDataId.type() == LootDataType.TABLE && value instanceof LootTable lootTable) {
|
||||
+ lootTableToKeyBuilder.put(lootTable, lootDataId.location());
|
||||
+ }
|
||||
+ });
|
||||
+ // Paper end
|
||||
this.lootTableToKey = lootTableToKeyBuilder.build();
|
||||
// CraftBukkit end
|
||||
}
|
|
@ -257,16 +257,3 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
return AbortableIterationConsumer.Continuation.ABORT;
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/StructurePiece.java b/src/main/java/net/minecraft/world/level/levelgen/structure/StructurePiece.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/StructurePiece.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/StructurePiece.java
|
||||
@@ -0,0 +0,0 @@ public abstract class StructurePiece {
|
||||
}
|
||||
|
||||
public static BoundingBox createBoundingBox(Stream<StructurePiece> pieces) {
|
||||
- Stream stream1 = pieces.map(StructurePiece::getBoundingBox);
|
||||
+ Stream<BoundingBox> stream1 = pieces.map(StructurePiece::getBoundingBox); // Paper - decompile fix
|
||||
|
||||
Objects.requireNonNull(stream1);
|
||||
return (BoundingBox) BoundingBox.encapsulatingBoxes(stream1::iterator).orElseThrow(() -> {
|
||||
|
|
|
@ -29,24 +29,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public int getLifeTicks() {
|
||||
+ return getHandle().life;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setLifeTicks(int lifeTicks) {
|
||||
+ getHandle().life = lifeTicks;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @org.jetbrains.annotations.Nullable org.bukkit.entity.Entity getCausingEntity() {
|
||||
+ final var cause = this.getHandle().getCause();
|
||||
+ return cause == null ? null : cause.getBukkitEntity();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void setCausingPlayer(@org.jetbrains.annotations.Nullable org.bukkit.entity.Player causingPlayer) {
|
||||
+ this.getHandle().setCause(causingPlayer == null ? null : ((CraftPlayer) causingPlayer).getHandle());
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito
|
||||
+ implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.43.0.0")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1")
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.1.0")
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
new file mode 100644
|
||||
|
|
|
@ -48,7 +48,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ }
|
||||
+ implementation("org.ow2.asm:asm:9.5")
|
||||
+ implementation("commons-lang:commons-lang:2.6")
|
||||
+ runtimeOnly("org.xerial:sqlite-jdbc:3.43.0.0")
|
||||
+ runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1")
|
||||
+ runtimeOnly("com.mysql:mysql-connector-j:8.1.0")
|
||||
+
|
||||
+ runtimeOnly("org.apache.maven:maven-resolver-provider:3.8.5")
|
||||
|
@ -413,7 +413,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
- <dependency>
|
||||
- <groupId>org.xerial</groupId>
|
||||
- <artifactId>sqlite-jdbc</artifactId>
|
||||
- <version>3.43.0.0</version>
|
||||
- <version>3.42.0.1</version>
|
||||
- <scope>runtime</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
|
|
|
@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
|
||||
@@ -0,0 +0,0 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
|
||||
if (bukkitClass == TrimPattern.class) {
|
||||
return new CraftRegistry<>(registryHolder.registryOrThrow(Registries.TRIM_PATTERN), CraftTrimPattern::new);
|
||||
return new CraftRegistry<>(TrimPattern.class, registryHolder.registryOrThrow(Registries.TRIM_PATTERN), CraftTrimPattern::new);
|
||||
}
|
||||
+ // TODO registry modification API
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
implementation("org.ow2.asm:asm-commons:9.5") // Paper - ASM event executor generation
|
||||
+ testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.43.0.0")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1")
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.1.0")
|
||||
@@ -0,0 +0,0 @@ tasks.compileJava {
|
||||
options.setIncremental(false)
|
||||
|
|
|
@ -10,7 +10,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +0,0 @@ dependencies {
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.43.0.0")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1")
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.1.0")
|
||||
+ runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +0,0 @@ dependencies {
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.43.0.0")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.1")
|
||||
runtimeOnly("com.mysql:mysql-connector-j:8.1.0")
|
||||
runtimeOnly("com.lmax:disruptor:3.4.4") // Paper
|
||||
+ // Paper start - Use Velocity cipher
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue