mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-17 22:13:55 +00:00
This commit is contained in:
@ -21,6 +21,7 @@ configurations.all {
|
||||
|
||||
|
||||
dependencies {
|
||||
// url=https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/1.17.1-R0.1-SNAPSHOT
|
||||
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.17.1-R0.1-20220414.034903-210")
|
||||
compileOnly(libs.paperlib)
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// https://papermc.io/repo/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
|
||||
// url=https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/1.18.2-R0.1-SNAPSHOT
|
||||
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.18.2-R0.1-20220920.010157-167")
|
||||
compileOnly(libs.paperlib)
|
||||
}
|
||||
|
@ -11,6 +11,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// url=https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/1.19.4-R0.1-SNAPSHOT
|
||||
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.19.4-R0.1-20230608.201059-104")
|
||||
compileOnly(libs.paperlib)
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
|
||||
// url=https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/1.20.1-R0.1-SNAPSHOT
|
||||
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.20.1-R0.1-20230921.165944-178")
|
||||
compileOnly(libs.paperlib)
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
|
||||
// url=https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/1.20.2-R0.1-SNAPSHOT
|
||||
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.20.2-R0.1-20231203.034718-121")
|
||||
compileOnly(libs.paperlib)
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ repositories {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
|
||||
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.20.4-R0.1-20231221.211952-22")
|
||||
// url=https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/1.20.4-R0.1-SNAPSHOT
|
||||
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.20.4-R0.1-20240106.182028-62")
|
||||
compileOnly(libs.paperlib)
|
||||
}
|
||||
|
@ -141,20 +141,15 @@ tasks.named<Jar>("jar") {
|
||||
addJarManifest(WorldEditKind.Plugin, includeClasspath = true)
|
||||
|
||||
tasks.named<ShadowJar>("shadowJar") {
|
||||
dependsOn(project.project(":worldedit-bukkit:adapters").subprojects.map { it.tasks.named("assemble") })
|
||||
from(Callable {
|
||||
adapters.resolve()
|
||||
.map { f ->
|
||||
zipTree(f).matching {
|
||||
exclude("META-INF/")
|
||||
}
|
||||
}
|
||||
})
|
||||
configurations.add(adapters)
|
||||
archiveFileName.set("${rootProject.name}-Bukkit-${project.version}.${archiveExtension.getOrElse("jar")}")
|
||||
dependencies {
|
||||
// In tandem with not bundling log4j, we shouldn't relocate base package here.
|
||||
// relocate("org.apache.logging", "com.sk89q.worldedit.log4j")
|
||||
relocate("org.antlr.v4", "com.sk89q.worldedit.antlr4")
|
||||
|
||||
exclude(dependency("$group:$name"))
|
||||
|
||||
include(dependency(":worldedit-core"))
|
||||
include(dependency(":worldedit-libs:bukkit"))
|
||||
// Purposefully not included, we assume (even though no API exposes it) that Log4J will be present at runtime
|
||||
@ -192,6 +187,15 @@ tasks.named<ShadowJar>("shadowJar") {
|
||||
include(dependency("org.anarres:parallelgzip:1.0.5"))
|
||||
}
|
||||
}
|
||||
|
||||
project.project(":worldedit-bukkit:adapters").subprojects.forEach {
|
||||
dependencies {
|
||||
include(dependency("${it.group}:${it.name}"))
|
||||
}
|
||||
minimize {
|
||||
exclude(dependency("${it.group}:${it.name}"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named("assemble").configure {
|
||||
|
@ -16,6 +16,7 @@ import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.bukkit.BukkitAdapter;
|
||||
import com.sk89q.worldedit.extent.clipboard.BlockArrayClipboard;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
import com.sk89q.worldedit.extent.clipboard.io.ClipboardFormats;
|
||||
import com.sk89q.worldedit.function.FlatRegionFunction;
|
||||
@ -217,7 +218,6 @@ public class FaweDelegateRegionManager {
|
||||
) {
|
||||
TaskManager.taskManager().async(() -> {
|
||||
synchronized (FaweDelegateRegionManager.class) {
|
||||
//todo because of the following code this should probably be in the Bukkit module
|
||||
World pos1World = BukkitAdapter.adapt(getWorld(pos1.getWorldName()));
|
||||
World pos3World = BukkitAdapter.adapt(getWorld(swapPos.getWorldName()));
|
||||
EditSession sessionA = WorldEdit.getInstance().newEditSessionBuilder().world(pos1World)
|
||||
@ -236,14 +236,16 @@ public class FaweDelegateRegionManager {
|
||||
CuboidRegion regionB = new CuboidRegion(
|
||||
pos3World,
|
||||
swapPos.getBlockVector3(),
|
||||
swapPos.getBlockVector3().add(pos2.getBlockVector3()).subtract(pos1.getBlockVector3())
|
||||
swapPos.getBlockVector3().add(pos2.getBlockVector3().subtract(pos1.getBlockVector3())).withY(pos2.getY())
|
||||
);
|
||||
Clipboard clipA = Clipboard.create(regionA, UUID.randomUUID());
|
||||
Clipboard clipB = Clipboard.create(regionB, UUID.randomUUID());
|
||||
Clipboard clipA = new BlockArrayClipboard(regionA, UUID.randomUUID());
|
||||
Clipboard clipB = new BlockArrayClipboard(regionB, UUID.randomUUID());
|
||||
ForwardExtentCopy copyA = new ForwardExtentCopy(sessionA, regionA, clipA, clipA.getMinimumPoint());
|
||||
ForwardExtentCopy copyB = new ForwardExtentCopy(sessionB, regionB, clipB, clipB.getMinimumPoint());
|
||||
copyA.setCopyingBiomes(true);
|
||||
copyB.setCopyingBiomes(true);
|
||||
copyA.setCopyingEntities(true);
|
||||
copyB.setCopyingEntities(true);
|
||||
try {
|
||||
Operations.completeLegacy(copyA);
|
||||
Operations.completeLegacy(copyB);
|
||||
@ -257,17 +259,16 @@ public class FaweDelegateRegionManager {
|
||||
sessionA.close();
|
||||
sessionB.close();
|
||||
}
|
||||
FaweAPI.fixLighting(pos1World, new CuboidRegion(pos1.getBlockVector3(), pos2.getBlockVector3()), null,
|
||||
FaweAPI.fixLighting(
|
||||
pos1World,
|
||||
regionA,
|
||||
null,
|
||||
RelightMode.valueOf(com.fastasyncworldedit.core.configuration.Settings.settings().LIGHTING.MODE)
|
||||
);
|
||||
FaweAPI.fixLighting(pos1World, new CuboidRegion(
|
||||
swapPos.getBlockVector3(),
|
||||
BlockVector3.at(
|
||||
swapPos.getX() + pos2.getX() - pos1.getX(),
|
||||
0,
|
||||
swapPos.getZ() + pos2.getZ() - pos1.getZ()
|
||||
)
|
||||
), null,
|
||||
FaweAPI.fixLighting(
|
||||
pos1World,
|
||||
regionB,
|
||||
null,
|
||||
RelightMode.valueOf(com.fastasyncworldedit.core.configuration.Settings.settings().LIGHTING.MODE)
|
||||
);
|
||||
if (whenDone != null) {
|
||||
|
Reference in New Issue
Block a user