Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions build-logic/src/main/kotlin/buildlogic.adapter.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,18 @@ repositories {
maven {
name = "PaperMC"
url = uri("https://repo.papermc.io/repository/maven-public/")
content {
// excludeModule("io.papermc.paper", "dev-bundle")
}
}
maven {
name = "EngineHub Repository"
url = uri("https://maven.enginehub.org/repo/")
content {
// excludeModule("io.papermc.paper", "dev-bundle")
excludeModule("net.fabricmc", "yarn")
}
}
/* maven {
maven {
name = "IntellectualSites"
url = uri("https://repo.intellectualsites.dev/repository/paper-dev-bundles/")
content {
// includeModule("io.papermc.paper", "dev-bundle")
}
}*/
url = uri("https://repo.intellectualsites.dev/repository/maven-all/")
}
mavenCentral()
afterEvaluate {
killNonEngineHubRepositories()
Expand Down
2 changes: 0 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jlibnoise = "1.0.0"
jchronic = "0.2.4a"
lz4-java = "1.11.1"
commons-cli = "1.11.0"
paperLib = "1.0.8"
paster = "1.1.7"
vault = "1.7.1"
serverlib = "2.3.7"
Expand Down Expand Up @@ -106,7 +105,6 @@ jlibnoise = { group = "com.sk89q.lib", name = "jlibnoise", version.ref = "jlibno
jchronic = { group = "com.sk89q", name = "jchronic", version.ref = "jchronic" }
lz4Java = { group = "at.yawk.lz4", name = "lz4-java", version.ref = "lz4-java" }
commonsCli = { group = "commons-cli", name = "commons-cli", version.ref = "commons-cli" }
paperLib = { group = "io.papermc", name = "paperlib", version.ref = "paperLib" }
adventureApi = { group = "net.kyori", name = "adventure-api", version.ref = "adventure" }
adventureMiniMessage = { group = "net.kyori", name = "adventure-text-minimessage", version.ref = "adventure" }
paster = { group = "com.intellectualsites.paster", name = "Paster", version.ref = "paster" }
Expand Down
1 change: 0 additions & 1 deletion worldedit-bukkit/adapters/adapter-1_21/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ plugins {
dependencies {
// url=https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/1.21.1-R0.1-SNAPSHOT/
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.21.1-R0.1-20250328.161643-128")
compileOnly(libs.paperLib)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fastasyncworldedit.bukkit.adapter.FaweAdapter;
import com.fastasyncworldedit.bukkit.adapter.NMSRelighterFactory;
import com.fastasyncworldedit.bukkit.util.PaperSupport;
import com.fastasyncworldedit.core.FaweCache;
import com.fastasyncworldedit.core.entity.LazyBaseEntity;
import com.fastasyncworldedit.core.extent.processor.PlacementStateProcessor;
Expand Down Expand Up @@ -56,7 +57,6 @@
import com.sk89q.worldedit.world.generation.TreeType;
import com.sk89q.worldedit.world.item.ItemType;
import com.sk89q.worldedit.world.registry.BlockMaterial;
import io.papermc.lib.PaperLib;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.core.RegistryAccess;
Expand Down Expand Up @@ -885,7 +885,7 @@ public Iterable<NamespacedKey> getRegisteredBiomes() {

@Override
public RelighterFactory getRelighterFactory() {
if (PaperLib.isPaper()) {
if (PaperSupport.isPaper()) {
return new PaperweightStarlightRelighterFactory();
} else {
return new NMSRelighterFactory();
Expand Down Expand Up @@ -917,7 +917,7 @@ public PlacementStateProcessor getPlatformPlacementProcessor(Extent extent, Bloc
}

private boolean wasAccessibleSinceLastSave(ChunkHolder holder) {
if (PaperLib.isPaper()) { // Papers new chunk system has no related replacement - therefor we assume true.
if (PaperSupport.isPaper()) { // Papers new chunk system has no related replacement - therefor we assume true.
return true;
}
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.fastasyncworldedit.bukkit.adapter.AbstractBukkitGetBlocks;
import com.fastasyncworldedit.bukkit.adapter.DelegateSemaphore;
import com.fastasyncworldedit.bukkit.adapter.NativeEntityFunctionSet;
import com.fastasyncworldedit.bukkit.util.PaperSupport;
import com.fastasyncworldedit.core.Fawe;
import com.fastasyncworldedit.core.FaweCache;
import com.fastasyncworldedit.core.configuration.Settings;
Expand All @@ -27,7 +28,6 @@
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.biome.BiomeTypes;
import com.sk89q.worldedit.world.block.BlockTypesCache;
import io.papermc.lib.PaperLib;
import io.papermc.paper.event.block.BeaconDeactivatedEvent;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
Expand Down Expand Up @@ -361,7 +361,7 @@ protected <T extends Future<T>> T internalCall(
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
if (ordinal != BlockTypesCache.ReservedIDs.__RESERVED__) {
BlockEntity tile = entry.getValue();
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
if (PaperSupport.isPaper() && tile instanceof BeaconBlockEntity) {
if (beacons == null) {
beacons = new ArrayList<>();
}
Expand Down Expand Up @@ -691,7 +691,7 @@ protected <T extends Future<T>> T internalCall(
if (!set.getSideEffectSet().shouldApply(SideEffect.ENTITY_EVENTS)) {
entity.spawnReason = CreatureSpawnEvent.SpawnReason.CUSTOM;
entity.generation = false;
if (PaperLib.isPaper()) {
if (PaperSupport.isPaper()) {
if (!nmsWorld.moonrise$getEntityLookup().addNewEntity(entity)) {
onError.run();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.sk89q.worldedit.bukkit.adapter.impl.fawe.v1_21_R1;

import com.fastasyncworldedit.bukkit.util.PaperSupport;
import com.fastasyncworldedit.core.extent.processor.heightmap.HeightMapType;
import com.fastasyncworldedit.core.nbt.FaweCompoundTag;
import com.fastasyncworldedit.core.queue.IBlocks;
Expand All @@ -16,7 +17,6 @@
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockTypesCache;
import io.papermc.lib.PaperLib;
import net.minecraft.core.Holder;
import net.minecraft.nbt.Tag;
import net.minecraft.server.dedicated.DedicatedServer;
Expand Down Expand Up @@ -197,7 +197,7 @@ protected void storeBiomes(int layer, PalettedContainerRO<Holder<Biome>> biomeDa
biomes[layer] = new Holder[64];
}
if (biomeData instanceof PalettedContainer<Holder<Biome>> palettedContainer) {
if (PaperLib.isPaper()) {
if (PaperSupport.isPaper()) {
for (int i = 0; i < 64; i++) {
biomes[layer][i] = palettedContainer.get(i); // Only public on paper
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.fastasyncworldedit.bukkit.adapter.CachedBukkitAdapter;
import com.fastasyncworldedit.bukkit.adapter.DelegateSemaphore;
import com.fastasyncworldedit.bukkit.adapter.NMSAdapter;
import com.fastasyncworldedit.bukkit.util.PaperSupport;
import com.fastasyncworldedit.core.Fawe;
import com.fastasyncworldedit.core.FaweCache;
import com.fastasyncworldedit.core.math.BitArrayUnstretched;
Expand All @@ -19,7 +20,6 @@
import com.sk89q.worldedit.world.biome.BiomeTypes;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockTypesCache;
import io.papermc.lib.PaperLib;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
import net.minecraft.core.IdMap;
Expand Down Expand Up @@ -153,7 +153,7 @@ public final class PaperweightPlatformAdapter extends NMSAdapter {
getVisibleChunkIfPresent.setAccessible(true);
methodGetVisibleChunk = lookup.unreflect(getVisibleChunkIfPresent);

if (!PaperLib.isPaper()) {
if (!PaperSupport.isPaper()) {
fieldThreadingDetector = PalettedContainer.class.getDeclaredField(Refraction.pickName("threadingDetector", "f"));
fieldThreadingDetector.setAccessible(true);
fieldLock = ThreadingDetector.class.getDeclaredField(Refraction.pickName("lock", "c"));
Expand Down Expand Up @@ -223,7 +223,7 @@ static boolean setSectionAtomic(
ThreadLocal.withInitial(() -> new DelegateSemaphore(1, null));

static DelegateSemaphore applyLock(LevelChunkSection section) {
if (PaperLib.isPaper()) {
if (PaperSupport.isPaper()) {
return SEMAPHORE_THREAD_LOCAL.get();
}
try {
Expand Down Expand Up @@ -251,19 +251,19 @@ public static CompletableFuture<LevelChunk> ensureLoaded(ServerLevel serverLevel
if (levelChunk != null) {
return CompletableFuture.completedFuture(levelChunk);
}
if (PaperLib.isPaper()) {
if (PaperSupport.isPaper()) {
CompletableFuture<LevelChunk> future = serverLevel
.getWorld()
.getChunkAtAsync(chunkX, chunkZ, true, true)
.thenApply(chunk -> {
addTicket(serverLevel, chunkX, chunkZ);
try {
return toLevelChunk(chunk);
} catch (Throwable e) {
LOGGER.error("Could not asynchronously load chunk at {},{}", chunkX, chunkZ, e);
return null;
}
});
.getWorld()
.getChunkAtAsync(chunkX, chunkZ, true, true)
.thenApply(chunk -> {
addTicket(serverLevel, chunkX, chunkZ);
try {
return toLevelChunk(chunk);
} catch (Throwable e) {
LOGGER.error("Could not asynchronously load chunk at {},{}", chunkX, chunkZ, e);
return null;
}
});
try {
if (!future.isCompletedExceptionally() || (future.isDone() && future.get() != null)) {
return future;
Expand All @@ -272,10 +272,10 @@ public static CompletableFuture<LevelChunk> ensureLoaded(ServerLevel serverLevel
LOGGER.error("Asynchronous chunk load at {},{} exceptionally completed immediately", chunkX, chunkZ, t);
} catch (InterruptedException | ExecutionException e) {
LOGGER.error(
"Unexpected error when getting completed future at chunk {},{}. Returning to default.",
chunkX,
chunkZ,
e
"Unexpected error when getting completed future at chunk {},{}. Returning to default.",
chunkX,
chunkZ,
e
);
}
}
Expand All @@ -287,7 +287,7 @@ private static LevelChunk toLevelChunk(Chunk chunk) {
}

public static @Nullable LevelChunk getChunkImmediatelyAsync(ServerLevel serverLevel, int chunkX, int chunkZ) {
if (!PaperLib.isPaper()) {
if (!PaperSupport.isPaper()) {
LevelChunk nmsChunk = serverLevel.getChunkSource().getChunk(chunkX, chunkZ, false);
if (nmsChunk != null) {
return nmsChunk;
Expand Down Expand Up @@ -339,7 +339,7 @@ public static void sendChunk(IntPair pair, ServerLevel nmsWorld, int chunkX, int
}
ChunkPos coordIntPair = new ChunkPos(chunkX, chunkZ);
LevelChunk levelChunk;
if (PaperLib.isPaper()) {
if (PaperSupport.isPaper()) {
// getChunkAtIfLoadedImmediately is paper only
levelChunk = nmsWorld.getChunkSource().getChunkAtIfLoadedImmediately(chunkX, chunkZ);
} else {
Expand All @@ -356,21 +356,21 @@ public static void sendChunk(IntPair pair, ServerLevel nmsWorld, int chunkX, int
MinecraftServer.getServer().execute(() -> {
try {
ClientboundLevelChunkWithLightPacket packet;
if (PaperLib.isPaper()) {
if (PaperSupport.isPaper()) {
packet = new ClientboundLevelChunkWithLightPacket(
levelChunk,
nmsWorld.getChunkSource().getLightEngine(),
null,
null,
false // last false is to not bother with x-ray
levelChunk,
nmsWorld.getChunkSource().getLightEngine(),
null,
null,
false // last false is to not bother with x-ray
);
} else {
// deprecated on paper - deprecation suppressed
packet = new ClientboundLevelChunkWithLightPacket(
levelChunk,
nmsWorld.getChunkSource().getLightEngine(),
null,
null
levelChunk,
nmsWorld.getChunkSource().getLightEngine(),
null,
null
);
}
nearbyPlayers(nmsWorld, coordIntPair).forEach(p -> p.connection.send(packet));
Expand Down Expand Up @@ -655,10 +655,10 @@ static void removeBeacon(BlockEntity beacon, LevelChunk levelChunk) {
}

static List<Entity> getEntities(LevelChunk chunk) {
if (PaperLib.isPaper()) {
if (PaperSupport.isPaper()) {
return Optional.ofNullable(chunk.level
.moonrise$getEntityLookup()
.getChunk(chunk.locX, chunk.locZ)).map(c -> {
.moonrise$getEntityLookup()
.getChunk(chunk.locX, chunk.locZ)).map(c -> {
try {
//noinspection unchecked
return (List<Entity>) PAPER_CHUNK_GEN_ALL_ENTITIES.invoke(c);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ plugins {
dependencies {
// https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.21.11-R0.1-20260310.030221-86")
compileOnly(libs.paperLib)
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fastasyncworldedit.bukkit.adapter.FaweAdapter;
import com.fastasyncworldedit.bukkit.adapter.NMSRelighterFactory;
import com.fastasyncworldedit.bukkit.util.PaperSupport;
import com.fastasyncworldedit.core.FaweCache;
import com.fastasyncworldedit.core.entity.LazyBaseEntity;
import com.fastasyncworldedit.core.extent.processor.PlacementStateProcessor;
Expand Down Expand Up @@ -54,7 +55,6 @@
import com.sk89q.worldedit.world.generation.TreeType;
import com.sk89q.worldedit.world.item.ItemType;
import com.sk89q.worldedit.world.registry.BlockMaterial;
import io.papermc.lib.PaperLib;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Registry;
import net.minecraft.core.RegistryAccess;
Expand Down Expand Up @@ -854,7 +854,7 @@ public Iterable<NamespacedKey> getRegisteredBiomes() {

@Override
public RelighterFactory getRelighterFactory() {
if (PaperLib.isPaper()) {
if (PaperSupport.isPaper()) {
return new PaperweightStarlightRelighterFactory();
} else {
return new NMSRelighterFactory();
Expand Down Expand Up @@ -886,7 +886,7 @@ public PlacementStateProcessor getPlatformPlacementProcessor(Extent extent, Bloc
}

private boolean wasAccessibleSinceLastSave(ChunkHolder holder) {
if (PaperLib.isPaper()) { // Papers new chunk system has no related replacement - therefor we assume true.
if (PaperSupport.isPaper()) { // Papers new chunk system has no related replacement - therefor we assume true.
return true;
}
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.fastasyncworldedit.bukkit.adapter.AbstractBukkitGetBlocks;
import com.fastasyncworldedit.bukkit.adapter.DelegateSemaphore;
import com.fastasyncworldedit.bukkit.adapter.NativeEntityFunctionSet;
import com.fastasyncworldedit.bukkit.util.PaperSupport;
import com.fastasyncworldedit.core.FaweCache;
import com.fastasyncworldedit.core.configuration.Settings;
import com.fastasyncworldedit.core.extent.processor.heightmap.HeightMapType;
Expand All @@ -24,7 +25,6 @@
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BlockTypesCache;
import io.papermc.lib.PaperLib;
import io.papermc.paper.event.block.BeaconDeactivatedEvent;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Holder;
Expand Down Expand Up @@ -358,7 +358,7 @@ protected <T extends Future<T>> T internalCall(
int ordinal = set.getBlock(lx, ly, lz).getOrdinal();
if (ordinal != BlockTypesCache.ReservedIDs.__RESERVED__) {
BlockEntity tile = entry.getValue();
if (PaperLib.isPaper() && tile instanceof BeaconBlockEntity) {
if (PaperSupport.isPaper() && tile instanceof BeaconBlockEntity) {
if (beacons == null) {
beacons = new ArrayList<>();
}
Expand Down Expand Up @@ -681,7 +681,7 @@ protected <T extends Future<T>> T internalCall(
if (!set.getSideEffectSet().shouldApply(SideEffect.ENTITY_EVENTS)) {
entity.spawnReason = CreatureSpawnEvent.SpawnReason.CUSTOM;
entity.generation = false;
if (PaperLib.isPaper()) {
if (PaperSupport.isPaper()) {
if (!nmsWorld.moonrise$getEntityLookup().addNewEntity(entity, false)) {
onError.run();
}
Expand Down
Loading
Loading