Compare commits

..
9 Commits
Author SHA1 Message Date
Andrew Wong 64301e74e0 Bump version 2022-06-20 19:27:28 +08:00
Andrew Wong 5a5a7fc5ef Bump version 2022-06-20 19:25:42 +08:00
Andrew Wong b928caf0c2 Bump worldedit 2022-06-20 19:19:49 +08:00
Andrew Wong 111f629787 Update dependencies and add adapter for 1.19 2022-06-11 00:59:19 +08:00
Andrew Wong 718474ca95 Update gradle wrapper 2022-06-10 23:37:12 +08:00
Andrew Wong 93b9df3e54 Update gradle wrapper to 7.4.1 2022-03-24 18:48:03 +08:00
Andrew Wong bad983a0b8 Update worldedit and fawe adapters 2022-03-24 18:47:02 +08:00
Andrew Wong e2c8b06b68 Bump dependency versions 2022-03-24 16:30:02 +08:00
Andrew Wong 7249e39c02 bump version 2022-03-24 16:27:49 +08:00
12 changed files with 33 additions and 32 deletions

No files matched your search

+1 -1
View File
@@ -46,7 +46,7 @@ dependencies {
runtimeOnly(projects.adapters.plugins.fastasyncworldedit)
runtimeOnly(project(":adapters:platform:bukkit-1-17", "reobf"))
runtimeOnly(project(":adapters:platform:bukkit-1-18", "reobf"))
runtimeOnly(project(":adapters:platform:bukkit-1-18-1", "reobf"))
runtimeOnly(project(":adapters:platform:bukkit-1-19", "reobf"))
}
repositories {
@@ -1,12 +1,12 @@
plugins.apply("io.papermc.paperweight.userdev")
dependencies {
paperDevBundle("1.18.1-R0.1-SNAPSHOT")
paperDevBundle("1.19-R0.1-SNAPSHOT")
compileOnly(projects.areashopInterface)
compileOnly(projects.areashopNms)
}
description = "AreaShop NMS Helper 1-18"
description = "AreaShop NMS Helper 1-19"
tasks {
@@ -1,4 +1,4 @@
package me.wiefferink.areashop.adapters.platform.v1_18_R1;
package me.wiefferink.areashop.adapters.platform.v1_19_R1;
import me.wiefferink.areashop.nms.BlockBehaviourHelper;
import net.minecraft.core.BlockPos;
@@ -7,10 +7,10 @@ import net.minecraft.world.level.block.state.BlockState;
import org.bukkit.Location;
import org.bukkit.block.Block;
import org.bukkit.block.data.BlockData;
import org.bukkit.craftbukkit.v1_18_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_18_R1.block.CraftBlock;
import org.bukkit.craftbukkit.v1_18_R1.block.CraftBlockState;
import org.bukkit.craftbukkit.v1_18_R1.block.data.CraftBlockData;
import org.bukkit.craftbukkit.v1_19_R1.CraftWorld;
import org.bukkit.craftbukkit.v1_19_R1.block.CraftBlock;
import org.bukkit.craftbukkit.v1_19_R1.block.CraftBlockState;
import org.bukkit.craftbukkit.v1_19_R1.block.data.CraftBlockData;
import java.util.Objects;
@@ -1,4 +1,4 @@
package me.wiefferink.areashop.adapters.platform.v1_18_R1;
package me.wiefferink.areashop.adapters.platform.v1_19_R1;
import me.wiefferink.areashop.nms.BlockBehaviourHelper;
import me.wiefferink.areashop.nms.NMS;
@@ -210,9 +210,7 @@ public class FastAsyncWorldEditHandler extends WorldEditInterface {
@Beta
public CompletableFuture<Boolean> saveRegionBlocksAsync(File file, GeneralRegionInterface regionInterface) {
// TODO implement using the FastAsyncWorldEdit api to save async
ClipboardFormat format = BuiltInClipboardFormat.FAST;
// TODO allow selecting FAWE format in the config? (when enabled you cannot go back to vanilla WorldEdit easily)
file = new File(file.getAbsolutePath() + "." + format.getPrimaryFileExtension());
pluginInterface.debugI("Trying to save region", regionInterface.getName(), " to file",
@@ -286,7 +284,6 @@ public class FastAsyncWorldEditHandler extends WorldEditInterface {
@Override
public boolean restoreRegionBlocks(File rawFile, GeneralRegionInterface regionInterface) {
// TODO implement using the FastAsyncWorldEdit api to paste async
File file = null;
for (ClipboardFormat formatOption : BuiltInClipboardFormat.values()) {
if (new File(rawFile.getAbsolutePath() + "." + formatOption.getPrimaryFileExtension())
@@ -367,7 +364,7 @@ public class FastAsyncWorldEditHandler extends WorldEditInterface {
editSession, origin);
copy.setTransform(clipboardHolder.getTransform());
// Mask to region (for polygon and other weird shaped regions)
// TODO make this more efficient (especially for polygon regions)
// FIXME make this more efficient (especially for polygon regions)
if (region.getType() != RegionType.CUBOID) {
copy.setSourceMask(new RegionBoundMask(region));
}
@@ -403,9 +400,7 @@ public class FastAsyncWorldEditHandler extends WorldEditInterface {
@Override
public boolean saveRegionBlocks(File file, GeneralRegionInterface regionInterface) {
// TODO implement using the FastAsyncWorldEdit api to save async
ClipboardFormat format = BuiltInClipboardFormat.FAST;
// TODO allow selecting FAWE format in the config? (when enabled you cannot go back to vanilla WorldEdit easily)
file = new File(file.getAbsolutePath() + "." + format.getPrimaryFileExtension());
pluginInterface.debugI("Trying to save region", regionInterface.getName(), " to file",
@@ -84,7 +84,10 @@ public class WorldEditHandler extends WorldEditInterface {
pluginInterface.getLogger().info("Did not restore region " + regionInterface.getName() + ", world not found: " + regionInterface.getWorldName());
return false;
}
EditSession editSession = pluginInterface.getWorldEdit().getWorldEdit().getEditSessionFactory().getEditSession(world, pluginInterface.getConfig().getInt("maximumBlocks"));
EditSession editSession = pluginInterface.getWorldEdit().getWorldEdit().newEditSessionBuilder()
.world(world)
.maxBlocks(pluginInterface.getConfig().getInt("maximumBlocks"))
.build();
ProtectedRegion region = regionInterface.getRegion();
// Get the origin and size of the region
BlockVector3 origin = BlockVector3.at(region.getMinimumPoint().getBlockX(), region.getMinimumPoint().getBlockY(), region.getMinimumPoint().getBlockZ());
@@ -142,7 +145,7 @@ public class WorldEditHandler extends WorldEditInterface {
pluginInterface.debugI(ExceptionUtils.getStackTrace(e));
return false;
}
editSession.flushSession();
editSession.close();
return true;
}
@@ -170,7 +173,10 @@ public class WorldEditHandler extends WorldEditInterface {
pluginInterface.getLogger().warning("Did not save region " + regionInterface.getName() + ", world not found: " + regionInterface.getWorldName());
return false;
}
EditSession editSession = pluginInterface.getWorldEdit().getWorldEdit().getEditSessionFactory().getEditSession(world, pluginInterface.getConfig().getInt("maximumBlocks"));
EditSession editSession = pluginInterface.getWorldEdit().getWorldEdit().newEditSessionBuilder()
.world(world)
.maxBlocks(pluginInterface.getConfig().getInt("maximumBlocks"))
.build();
// Create a clipboard
CuboidRegion selection = new CuboidRegion(world, regionInterface.getRegion().getMinimumPoint(), regionInterface.getRegion().getMaximumPoint());
+2 -2
View File
@@ -2,13 +2,13 @@ plugins {
java
`java-library`
`maven-publish`
id("io.papermc.paperweight.userdev") version "1.3.5" apply false
id("io.papermc.paperweight.userdev") version "1.3.6" apply false
idea
eclipse
}
group = "me.wiefferink"
version = "2.7.6"
version = "2.7.8-SNAPSHOT"
subprojects {
+5 -5
View File
@@ -4,12 +4,12 @@ minecraft = "1.17.1-R0.1-SNAPSHOT"
findbugs = "3.0.2"
# Minecraft Plugins
worldedit = "7.2.8"
worldguard = "7.0.6"
fawe = "2.0.1"
worldedit = "7.2.11-SNAPSHOT"
worldguard = "7.0.7"
fawe = "2.2.0"
# Gradle plugins
paperweight = "1.3.5"
paperweight = "1.3.7"
[libraries]
# Platform
@@ -26,4 +26,4 @@ fastasyncworldeditCore = { group = "com.fastasyncworldedit", name = "FastAsyncWo
[plugins]
# Gradle plugins
paperweightUserdev = { id = "io.papermc.paperweight.userdev", version.ref = "paperweight" }
paperweightUserdev = { id = "io.papermc.paperweight.userdev", version.ref = "paperweight" }
Binary file not shown.
+1 -1
View File
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Vendored
+5 -5
View File
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -32,10 +32,10 @@
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
+1 -1
View File
@@ -25,7 +25,7 @@ include(":areashop-nms")
// Adapters
include(":adapters:platform:bukkit-1-17")
include(":adapters:platform:bukkit-1-18")
include(":adapters:platform:bukkit-1-18-1")
include(":adapters:platform:bukkit-1-19")
include(":adapters:plugins:worldedit")
include(":adapters:plugins:worldguard")
include(":adapters:plugins:fastasyncworldedit")