update to latest pumpkin version

This commit is contained in:
Alexander Medvedev 2026-07-25 18:30:58 +02:00
parent 5e784fb4bb
commit 8323eaa2e3
18 changed files with 1267 additions and 2061 deletions

View File

@ -14,19 +14,19 @@ jobs:
name: Build JAR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Set up JDK 25
uses: actions/setup-java@v5
with:
java-version: "25"
distribution: "temurin"
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v5
uses: gradle/actions/setup-gradle@v6
- name: Build JAR with Gradle
run: ./gradlew jar
working-directory: java
- name: Upload JAR
uses: actions/upload-artifact@v6
uses: actions/upload-artifact@v7
with:
name: patchbukkit-jar
path: java/patchbukkit/build/libs/patchbukkit.jar
@ -40,7 +40,7 @@ jobs:
toolchain:
- stable
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: rustup component add rustfmt
- uses: Swatinem/rust-cache@v2
@ -56,7 +56,7 @@ jobs:
toolchain:
- stable
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- uses: bnjbvr/cargo-machete@main
@ -69,7 +69,7 @@ jobs:
toolchain:
- stable
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: rustup component add clippy
- uses: Swatinem/rust-cache@v2
@ -94,12 +94,12 @@ jobs:
toolchain:
- stable
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- run: rustup component add clippy
- uses: Swatinem/rust-cache@v2
- name: Download JAR
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
with:
name: patchbukkit-jar
path: java/patchbukkit/build/libs/
@ -119,20 +119,19 @@ jobs:
os:
[
ubuntu-latest,
ubuntu-24.04-arm,
ubuntu-26.04-arm,
windows-latest,
windows-11-arm,
macos-latest,
macos-15-intel,
]
toolchain:
- stable
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- uses: Swatinem/rust-cache@v2
- name: Download JAR
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
with:
name: patchbukkit-jar
path: java/patchbukkit/build/libs/
@ -169,9 +168,9 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Download prebuilt artifacts
uses: actions/download-artifact@v7
uses: actions/download-artifact@v8
with:
pattern: "patchbukkit-*"
path: dist/

View File

@ -3,8 +3,8 @@
[versions]
commons-math3 = "3.6.1"
guava = "33.3.1-jre"
junit-jupiter = "5.11.1"
guava = "33.6.0-jre"
junit-jupiter = "6.0.3"
[libraries]
commons-math3 = { module = "org.apache.commons:commons-math3", version.ref = "commons-math3" }

View File

@ -1,7 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
networkTimeout=120000
distributionUrl=https\://services.gradle.org/distributions/gradle-9.6.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

View File

@ -10,7 +10,7 @@ repositories {
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT")
compileOnly("io.papermc.paper:paper-api:26.2.build.+")
}
java {

View File

@ -39,11 +39,5 @@ public final class UnsafeValuesTests {
assertTrue(!supported, "isSupportedApiVersion(\"1.0\") should be false");
}
@ConformanceTest(name = "UnsafeValues.componentFlattener() returns non-null", category = TestCategory.UNSAFE_VALUES)
public void testComponentFlattener() {
UnsafeValues unsafe = Bukkit.getUnsafe();
ComponentFlattener flattener = unsafe.componentFlattener();
assertNotNull(flattener, "UnsafeValues.componentFlattener()");
}
}

View File

@ -1,7 +1,7 @@
name: PatchBukkitTest
version: "1.0.0"
main: org.patchbukkit.testplugin.PatchBukkitTestPlugin
api-version: "1.21"
api-version: "26"
description: Conformance test plugin for PatchBukkit API surface
commands:
pbtest:

View File

@ -45,7 +45,7 @@ repositories {
}
dependencies {
implementation("io.papermc.paper:paper-api:1.21.11-R0.1-SNAPSHOT")
implementation("io.papermc.paper:paper-api:26.2.build.+")
implementation("net.sf.jopt-simple:jopt-simple:6.0-alpha-3")
implementation("io.github.astonbitecode:j4rs:0.24.0")
implementation("org.apache.maven:maven-resolver-provider:3.9.6")

View File

@ -14,6 +14,7 @@ import io.papermc.paper.threadedregions.scheduler.RegionScheduler;
import java.awt.image.BufferedImage;
import java.io.File;
import java.net.InetAddress;
import java.nio.file.Path;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
@ -100,7 +101,6 @@ import patchbukkit.bridge.NativeBridgeFfi;
import patchbukkit.log.LogLevel;
import patchbukkit.log.SendLogRequest;
@SuppressWarnings("removal")
public class PatchBukkitServer implements Server {
private final String serverName =
@ -224,7 +224,7 @@ public class PatchBukkitServer implements Server {
@Override
public @NotNull String getVersion() {
return "1.21.11";
return "26.2";
}
@Override
@ -1871,4 +1871,10 @@ public class PatchBukkitServer implements Server {
"Unimplemented method 'allowPausing'"
);
}
@Override
public @NotNull Path getLevelDirectory() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getLevelDirectory'");
}
}

View File

@ -35,12 +35,12 @@ public final class PatchBukkitServerBuildInfo implements ServerBuildInfo {
@Override
public String minecraftVersionId() {
return "1.21.11";
return "26.2";
}
@Override
public String minecraftVersionName() {
return "1.21.11";
return "26.2";
}
@Override

View File

@ -16,7 +16,6 @@ import net.kyori.adventure.text.event.HoverEvent.ShowItem;
import net.kyori.adventure.text.flattener.ComponentFlattener;
import net.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
import net.kyori.adventure.text.serializer.plain.PlainComponentSerializer;
import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
import patchbukkit.bridge.NativeBridgeFfi;
@ -51,7 +50,6 @@ import org.patchbukkit.versioning.ApiVersion;
import org.patchbukkit.versioning.Versioning;
import patchbukkit.common.EmptyRequest;
@SuppressWarnings("removal")
public class PatchBukkitUnsafeValues implements UnsafeValues {
public static final PatchBukkitUnsafeValues INSTANCE =
@ -76,48 +74,7 @@ public class PatchBukkitUnsafeValues implements UnsafeValues {
}
}
@Override
public ComponentFlattener componentFlattener() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'componentFlattener'");
}
@Override
public PlainComponentSerializer plainComponentSerializer() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'plainComponentSerializer'");
}
@Override
public PlainTextComponentSerializer plainTextSerializer() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'plainTextSerializer'");
}
@Override
public GsonComponentSerializer gsonComponentSerializer() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'gsonComponentSerializer'");
}
@Override
public GsonComponentSerializer colorDownsamplingGsonComponentSerializer() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'colorDownsamplingGsonComponentSerializer'");
}
@Override
public LegacyComponentSerializer legacyComponentSerializer() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'legacyComponentSerializer'");
}
@Override
public Component resolveWithContext(Component component, CommandSender context, Entity scoreboardSubject,
boolean bypassPermissions) throws IOException {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'resolveWithContext'");
}
@Override
public Material toLegacy(Material material) {
@ -182,60 +139,6 @@ public class PatchBukkitUnsafeValues implements UnsafeValues {
throw new UnsupportedOperationException("Unimplemented method 'removeAdvancement'");
}
@Override
public Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(Material material, EquipmentSlot slot) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getDefaultAttributeModifiers'");
}
@Override
public CreativeCategory getCreativeCategory(Material material) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getCreativeCategory'");
}
@Override
public String getBlockTranslationKey(Material material) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getBlockTranslationKey'");
}
@Override
public String getItemTranslationKey(Material material) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getItemTranslationKey'");
}
@Override
public String getTranslationKey(EntityType entityType) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getTranslationKey'");
}
@Override
public String getTranslationKey(ItemStack itemStack) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getTranslationKey'");
}
@Override
public String getTranslationKey(Attribute attribute) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getTranslationKey'");
}
@Override
public InternalPotionData getInternalPotionData(NamespacedKey key) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getInternalPotionData'");
}
@Override
public @NotNull Builder createDamageSourceBuilder(@NotNull DamageType damageType) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'createDamageSourceBuilder'");
}
@Override
public String get(Class<?> aClass, String value) {
// TODO Auto-generated method stub
@ -248,20 +151,6 @@ public class PatchBukkitUnsafeValues implements UnsafeValues {
throw new UnsupportedOperationException("Unimplemented method 'get'");
}
@Override
public byte[] serializeItem(ItemStack item) {
System.out.println("Serializing item: " + item);
System.out.println(item.getType().getKey().getKey());
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'serializeItem'");
}
@Override
public ItemStack deserializeItem(byte[] data) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'deserializeItem'");
}
@Override
public @NotNull JsonObject serializeItemAsJson(@NotNull ItemStack itemStack) {
// TODO Auto-generated method stub
@ -288,11 +177,6 @@ public class PatchBukkitUnsafeValues implements UnsafeValues {
throw new UnsupportedOperationException("Unimplemented method 'deserializeEntity'");
}
@Override
public int nextEntityId() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'nextEntityId'");
}
@Override
public @NotNull String getMainLevelName() {
@ -306,74 +190,7 @@ public class PatchBukkitUnsafeValues implements UnsafeValues {
throw new UnsupportedOperationException("Unimplemented method 'getProtocolVersion'");
}
@Override
public boolean isValidRepairItemStack(@NotNull ItemStack itemToBeRepaired, @NotNull ItemStack repairMaterial) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'isValidRepairItemStack'");
}
@Override
public boolean hasDefaultEntityAttributes(@NotNull NamespacedKey entityKey) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'hasDefaultEntityAttributes'");
}
@Override
public @NotNull Attributable getDefaultEntityAttributes(@NotNull NamespacedKey entityKey) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getDefaultEntityAttributes'");
}
@Override
public @NotNull NamespacedKey getBiomeKey(RegionAccessor accessor, int x, int y, int z) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getBiomeKey'");
}
@Override
public void setBiomeKey(RegionAccessor accessor, int x, int y, int z, NamespacedKey biomeKey) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'setBiomeKey'");
}
@Override
public String getStatisticCriteriaKey(@NotNull Statistic statistic) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getStatisticCriteriaKey'");
}
@Override
public @Nullable Color getSpawnEggLayerColor(EntityType entityType, int layer) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getSpawnEggLayerColor'");
}
@Override
public LifecycleEventManager<Plugin> createPluginLifecycleEventManager(JavaPlugin plugin,
BooleanSupplier registrationCheck) {
return new PatchBukkitLifecycleEventManager(plugin, registrationCheck);
}
@Override
public @NotNull List<Component> computeTooltipLines(@NotNull ItemStack itemStack,
@NotNull TooltipContext tooltipContext, @Nullable Player player) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'computeTooltipLines'");
}
@Override
public ItemStack createEmptyStack() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'createEmptyStack'");
}
@Override
public @NotNull Map<String, Object> serializeStack(ItemStack itemStack) {
System.out.println("Serializing itemstack: " + itemStack);
System.out.println(itemStack.getType().getKey().getKey());
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'serializeStack'");
}
@Override
public @NotNull ItemStack deserializeStack(@NotNull Map<String, Object> args) {
@ -387,4 +204,18 @@ public class PatchBukkitUnsafeValues implements UnsafeValues {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'deserializeItemHover'");
}
@Override
public InternalPotionData getInternalPotionData(NamespacedKey key) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getInternalPotionData'");
}
@Override
public int nextEntityId(World world) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'nextEntityId'");
}
}

View File

@ -12,6 +12,7 @@ import org.bukkit.EntityEffect;
import org.bukkit.Location;
import org.bukkit.Server;
import org.bukkit.Sound;
import org.bukkit.SoundCategory;
import org.bukkit.World;
import org.bukkit.block.BlockFace;
import org.bukkit.block.PistonMoveReaction;
@ -45,6 +46,7 @@ import io.papermc.paper.datacomponent.DataComponentType.Valued;
import io.papermc.paper.entity.LookAnchor;
import io.papermc.paper.entity.TeleportFlag;
import io.papermc.paper.threadedregions.scheduler.EntityScheduler;
import net.kyori.adventure.sound.Sound.Source;
import net.kyori.adventure.text.Component;
import net.kyori.adventure.util.TriState;
import patchbukkit.bridge.NativeBridgeFfi;
@ -985,4 +987,16 @@ public class PatchBukkitEntity implements Entity {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'broadcastHurtAnimation'");
}
@Override
public Source soundSource() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'soundSource'");
}
@Override
public @NotNull SoundCategory getSoundCategory() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getSoundCategory'");
}
}

View File

@ -839,4 +839,29 @@ public class PatchBukkitLivingEntity
public @Nullable Color getWaypointColor() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getWaypointColor'");
}
@Override
public void kill(DamageSource damageSource) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'kill'");
}
@Override
public boolean addPotionEffect(@NotNull PotionEffect effect) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'addPotionEffect'");
}
@Override
public float getSoundVolume() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getSoundVolume'");
}
@Override
public float getSoundPitch() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getSoundPitch'");
}
@Override
public @Nullable Sound getHurtSound(@NotNull DamageSource damageSource) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getHurtSound'");
}}

View File

@ -1,5 +1,8 @@
package org.patchbukkit.world;
import io.papermc.paper.entity.poi.PoiSearchResult;
import io.papermc.paper.entity.poi.PoiType;
import io.papermc.paper.entity.poi.PoiType.Occupancy;
import io.papermc.paper.math.Position;
import io.papermc.paper.raytracing.PositionedRayTraceConfigurationBuilder;
import java.nio.file.Path;
@ -25,6 +28,7 @@ import org.bukkit.persistence.PersistentDataContainer;
import org.bukkit.plugin.Plugin;
import org.bukkit.util.*;
import org.bukkit.util.Vector;
import org.checkerframework.checker.index.qual.Positive;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jspecify.annotations.NonNull;
@ -1699,4 +1703,24 @@ public class PatchBukkitWorld
"Unimplemented method 'getListeningPluginChannels'"
);
}
@Override
public void setAllowMonsterSpawning(boolean allowMonsters) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'setAllowMonsterSpawning'");
}
@Override
public @Nullable Location locateNearestPoi(@NotNull Location origin, @NotNull PoiType poiType, @Positive int radius,
@NotNull Occupancy occupancy) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'locateNearestPoi'");
}
@Override
public @NotNull List<PoiSearchResult> locateAllPoiInRange(@NotNull Location origin,
@NotNull Predicate<PoiType> poiTypePredicate, @Positive int radius, @NotNull Occupancy occupancy) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'locateAllPoiInRange'");
}
}

2983
rust/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -20,27 +20,27 @@ pumpkin-api-macros = { git = "https://github.com/Pumpkin-MC/Pumpkin.git", branch
tokio = "1"
tracing = "0.1"
glob = "0.3.3"
j4rs = { version = "0.24" }
rust-embed = { version = "8.11.0", features = ["interpolate-folder-path"] }
glob = "0.3.4"
j4rs = { version = "=0.24.0" }
rust-embed = { version = "8.12.0", features = ["interpolate-folder-path"] }
walkdir = "2"
zip = "7.2"
zip = "8.6"
anyhow = "1.0"
uuid = "1.20.0"
uuid = "1.24.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde-saphyr = "0.0.17"
serde-saphyr = "0.0.29"
rand = { git = "https://github.com/rust-random/rand"}
prost = "0.14"
toml = "1.0"
toml = "1.1"
[build-dependencies]
j4rs = { version = "0.24", artifact = "cdylib", lib = true }
env_logger = "0.11.8"
j4rs = { version = "=0.24.0", artifact = "cdylib", lib = true }
env_logger = "0.11.11"
log = "0.4"
prost-build = "0.14"
protoc-bin-vendored = "3"

View File

@ -84,7 +84,7 @@ impl ServiceGenerator for FfiServiceGenerator {
};
for method in &service.methods {
let fn_name = format!("ffi_{}_{}", to_snake_case(&service.name), &method.name);
let fn_name = format!("ffi_{}_{}", to_snake_case(&service.name), method.name);
let input_type = self.proto_type_to_rust(&method.input_proto_type);
service_info.methods.push(MethodInfo {

View File

@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2026-03-05"
channel = "nightly-2026-07-25"
components = ["rust-analyzer", "rust-src", "rustfmt", "clippy"]

View File

@ -34,7 +34,7 @@ pub struct AnyCommandNode {
}
impl GetClientSideArgParser for AnyCommandNode {
fn get_client_side_parser(&self) -> ArgumentType<'_> {
fn get_client_side_parser(&self) -> ArgumentType {
ArgumentType::String(StringProtoArgBehavior::GreedyPhrase)
}