mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-28 19:29:07 +00:00
Fix allow tnt duplication name in world configuration
This commit is contained in:
@@ -29,7 +29,7 @@ import java.util.Map;
|
||||
public final class WorldConfiguration extends ConfigurationPart {
|
||||
|
||||
private static final Logger LOGGER = LogUtils.getClassLogger();
|
||||
static final int CURRENT_VERSION = 6; // (when you change the version, change the comment, so it conflicts on rebases): rename filter bad nbt from spawn eggs
|
||||
static final int CURRENT_VERSION = 7; // (when you change the version, change the comment, so it conflicts on rebases): rename filter bad nbt from spawn eggs
|
||||
|
||||
private transient final ResourceLocation worldKey;
|
||||
WorldConfiguration(ResourceLocation worldKey) {
|
||||
@@ -133,7 +133,7 @@ public final class WorldConfiguration extends ConfigurationPart {
|
||||
"Allow TNT duplication while `allow-piston-duplication` is disabled.\n" +
|
||||
"This exists so servers can enable TNT duplication without reintroducing the other forms of piston duplication."
|
||||
)
|
||||
public boolean allowTNTDuplication = false;
|
||||
public boolean allowTntDuplication = false;
|
||||
}
|
||||
|
||||
public Players players;
|
||||
|
||||
@@ -24,6 +24,7 @@ public final class ConfigurationTransformations {
|
||||
V4_RenameNonStrictMergeLevel.apply(versionedBuilder);
|
||||
V5_CombineLoadChunksOptions.apply(versionedBuilder);
|
||||
V6_FixIncorrectExtraKnockback.apply(versionedBuilder);
|
||||
V7_FixTntDuplicationName.apply(versionedBuilder);
|
||||
// ADD FUTURE VERSIONED TRANSFORMS TO versionedBuilder HERE
|
||||
versionedBuilder.build().apply(node);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
package me.samsuik.sakura.configuration.transformation.world;
|
||||
|
||||
import org.spongepowered.configurate.NodePath;
|
||||
import org.spongepowered.configurate.transformation.ConfigurationTransformation;
|
||||
import org.spongepowered.configurate.transformation.TransformAction;
|
||||
|
||||
public final class V7_FixTntDuplicationName {
|
||||
private static final int VERSION = 7;
|
||||
private static final NodePath OLD_PATH = NodePath.path("technical", "allow-t-n-t-duplication");
|
||||
private static final String NEW_NAME = "allow-tnt-duplication";
|
||||
|
||||
public static void apply(ConfigurationTransformation.VersionedBuilder builder) {
|
||||
builder.addVersion(VERSION, ConfigurationTransformation.builder().addAction(OLD_PATH, TransformAction.rename(NEW_NAME)).build());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user