Skip to content

Commit

Permalink
Release 2.5.5 (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
rainbowdashlabs authored Oct 27, 2023
2 parents dc618da + c7b8493 commit f749f17
Show file tree
Hide file tree
Showing 14 changed files with 65 additions and 37 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/javadocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
Expand All @@ -25,7 +25,7 @@ jobs:
echo "Creating .nojekyll to have Github pages deploy html as is:"
touch .nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.4.2
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: schematicbrushreborn-api/build/docs/javadoc # The folder the action should deploy.
2 changes: 1 addition & 1 deletion .github/workflows/publish_to_nexus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "de.eldoria"
version = "2.5.4"
version = "2.5.5"

var publishModules = setOf("schematicbrushreborn-api",
"schematicbrushreborn-core",
Expand Down Expand Up @@ -67,7 +67,7 @@ allprojects {
}
compileOnly(libs.fawe.bukkit)

testImplementation(platform("org.junit:junit-bom:5.9.3"))
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter", "junit-jupiter")
testImplementation(testlibs.mockbukkit)
testImplementation(libs.worldedit) {
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
22 changes: 13 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -130,26 +131,29 @@ location of your Java installation."
fi
else
JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi

# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -198,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
2 changes: 1 addition & 1 deletion schematicbrushreborn-core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies {

testImplementation(project(":schematicbrushreborn-api"))
testImplementation(libs.jetbrains.annotations)
testImplementation("org.mockito", "mockito-core", "5.3.1")
testImplementation("org.mockito", "mockito-core", "5.6.0")
testImplementation(libs.jackson.databind)
}
publishData {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public Operation buildpaste(EditSession editSession, BukkitPlayer owner, BlockVe
* Build a paste operation
*
* @param editSession edit session
* @param capturingExtent extend to caputure changes
* @param capturingExtent extend to capture changes
* @param owner owner of brush
* @param position position to paste
* @return operation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
package de.eldoria.schematicbrush.brush.config;

import de.eldoria.eldoutilities.container.Pair;
import de.eldoria.schematicbrush.SchematicBrushReborn;
import de.eldoria.schematicbrush.brush.PasteMutation;
import de.eldoria.schematicbrush.brush.PasteMutationImpl;
import de.eldoria.schematicbrush.brush.SchematicBrush;
import de.eldoria.schematicbrush.brush.config.builder.BrushBuilder;
import de.eldoria.schematicbrush.brush.config.builder.BrushBuilderImpl;
import de.eldoria.schematicbrush.brush.config.modifier.PlacementModifier;
import de.eldoria.schematicbrush.brush.config.provider.Mutator;
import de.eldoria.schematicbrush.brush.config.schematics.RandomSelection;
import de.eldoria.schematicbrush.brush.config.schematics.SchematicSelection;
import de.eldoria.schematicbrush.brush.config.util.Nameable;
import de.eldoria.schematicbrush.brush.config.util.ValueProvider;
Expand All @@ -25,6 +25,7 @@
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.logging.Level;

/**
* A brush configuration represents the settings of a single brush. A brush consists of one or more brushes represented
Expand All @@ -44,7 +45,7 @@ public final class BrushSettingsImpl implements BrushSettings {
* The total weight of all brushes in the {@link #schematicSets} list
*/
private int totalWeight;
private SchematicSelection schematicSelection;
private SchematicSelection schematicSelection;

public BrushSettingsImpl(SchematicSelection schematicSelection, List<SchematicSet> schematicSets, Map<Nameable, Mutator<?>> placementModifier) {
this.schematicSelection = schematicSelection;
Expand Down Expand Up @@ -135,7 +136,14 @@ public Mutator<?> getMutator(PlacementModifier type) {
*/
@Override
public void mutate(PasteMutation mutation) {
placementModifier.values().forEach(mod -> mod.invoke(mutation));
for (Mutator<?> mod : placementModifier.values()) {
try {
mod.invoke(mutation);
} catch (Throwable e) {
SchematicBrushReborn.logger().log(Level.WARNING, "Could not apply brush setting " + mod.name(), e);
if (mod.shiftable()) mod.shift();
}
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

package de.eldoria.schematicbrush.brush.config;

import de.eldoria.schematicbrush.SchematicBrushReborn;
import de.eldoria.schematicbrush.brush.PasteMutation;
import de.eldoria.schematicbrush.brush.config.builder.SchematicSetBuilderImpl;
import de.eldoria.schematicbrush.brush.config.modifier.SchematicModifier;
Expand All @@ -15,7 +16,12 @@
import de.eldoria.schematicbrush.brush.config.util.ValueProvider;
import de.eldoria.schematicbrush.schematics.Schematic;

import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;

/**
* The schematic set represents a part of a brush, which will be combined to a brush by the {@link BrushSettingsImpl} A
Expand Down Expand Up @@ -95,7 +101,14 @@ public int weight() {
*/
@Override
public void mutate(PasteMutation mutation) {
schematicModifier.values().forEach(mod -> mod.invoke(mutation));
for (Mutator<?> mod : schematicModifier.values()) {
try {
mod.invoke(mutation);
} catch (Throwable e) {
SchematicBrushReborn.logger().log(Level.WARNING, "Could not apply schematic modifier " + mod.name(), e);
if (mod.shiftable()) mod.shift();
}
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public FlipList(Map<String, Object> objectMap) {
var map = SerializationUtil.mapOf(objectMap);
List<String> flips = map.getValue("values");
values = flips.stream().map(Flip::valueOf).collect(Collectors.toList());
value(valueProvider());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class RotationList extends ARotation {
@JsonCreator
public RotationList(@JsonProperty("values") List<Rotation> values) {
this.values = values;
value(values.get(0));
}

public RotationList(Map<String, Object> objectMap) {
Expand Down
28 changes: 14 additions & 14 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
rootProject.name = "schematic-brush-reborn"
include(":")
include(":schematicbrushreborn-api")
include(":schematicbrushreborn-core")
include("schematicbrushreborn-paper")
Expand All @@ -22,19 +21,19 @@ dependencyResolutionManagement {
versionCatalogs {
create("libs") {
// jackson & serialization
version("jackson", "2.14.2")
library("jackson-databind", "com.fasterxml.jackson.core:jackson-databind:2.15.2")
library("jackson-annotations", "com.fasterxml.jackson.core:jackson-annotations:2.15.2")
library("jackson-yaml", "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.15.2")
library("snakeyaml", "org.yaml:snakeyaml:2.0")
version("jackson", "2.15.3")
library("jackson-databind", "com.fasterxml.jackson.core","jackson-databind").versionRef("jackson")
library("jackson-annotations", "com.fasterxml.jackson.core","jackson-annotations").versionRef("jackson")
library("jackson-yaml", "com.fasterxml.jackson.dataformat","jackson-dataformat-yaml").versionRef("jackson")
library("snakeyaml", "org.yaml:snakeyaml:2.2")
bundle("jackson", listOf("jackson-databind", "jackson-annotations", "jackson-yaml"))

// adventure
library("adventure-bukkit", "net.kyori:adventure-platform-bukkit:4.3.0")
library("adventure-bukkit", "net.kyori:adventure-platform-bukkit:4.3.1")
library("adventure-minimessage", "net.kyori:adventure-text-minimessage:4.14.0")
// utilities
library("eldoutil-legacy", "de.eldoria:eldo-util:1.14.4")
library("eldoutil-jackson", "de.eldoria.util:jackson-configuration:2.0.0-DEV")
library("eldoutil-jackson", "de.eldoria.util:jackson-configuration:2.0.3")
library("messageblocker", "de.eldoria:messageblocker:1.1.2")
// misc
library("jetbrains-annotations", "org.jetbrains:annotations:24.0.1")
Expand All @@ -46,15 +45,16 @@ dependencyResolutionManagement {
library("paper-v17", "io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT")
library("spigot-v16", "io.papermc.paper:paper-api:1.17.1-R0.1-SNAPSHOT")
// world edit
library("worldedit", "com.sk89q.worldedit:worldedit-bukkit:7.2.15")
library("fawe-core", "com.fastasyncworldedit:FastAsyncWorldEdit-Core:2.6.3")
library("fawe-bukkit", "com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit:2.6.3")
library("worldedit", "com.sk89q.worldedit:worldedit-bukkit:7.2.17")
version("fawe", "2.8.1")
library("fawe-core", "com.fastasyncworldedit","FastAsyncWorldEdit-Core").versionRef("fawe")
library("fawe-bukkit", "com.fastasyncworldedit","FastAsyncWorldEdit-Bukkit").versionRef("fawe")

// plugins
plugin("publishdata", "de.chojo.publishdata").version("1.2.4")
plugin("spotless", "com.diffplug.spotless").version("6.19.0")
plugin("publishdata", "de.chojo.publishdata").version("1.2.5")
plugin("spotless", "com.diffplug.spotless").version("6.22.0")
plugin("shadow", "com.github.johnrengelman.shadow").version("8.1.1")
plugin("pluginyml-bukkit", "net.minecrell.plugin-yml.bukkit").version("0.5.3")
plugin("pluginyml-bukkit", "net.minecrell.plugin-yml.bukkit").version("0.6.0")
//plugin("pluginyml-paper","net.minecrell.plugin-yml.paper").version( "0.5.3")

}
Expand Down

0 comments on commit f749f17

Please sign in to comment.