Added new config menu lang (some still need to be fixed having placeholders)

Also readded world edit.
This commit is contained in:
Waterpicker 2021-06-06 15:02:29 -05:00
parent f5570c68ec
commit ed4ff473cf
4 changed files with 98 additions and 70 deletions

View file

@ -155,8 +155,8 @@ dependencies {
}
modCompileOnly "me.shedaniel.cloth.api:cloth-datagen-api-v1:2.0.0"
modRuntime "me.shedaniel.cloth.api:cloth-datagen-api-v1:2.0.0"
// modCompileOnly "worldedit:worldedit:7.2.3"
// modRuntime "worldedit:worldedit:7.2.3"
modCompileOnly "worldedit:worldedit:7.2.6"
modRuntime "worldedit:worldedit:7.2.6"
// modImplementation "geckolib:geckolib:3.0.31"

Binary file not shown.

View file

@ -8,12 +8,12 @@ import java.util.function.Consumer;
import com.mojang.brigadier.Command;
import com.mojang.brigadier.exceptions.CommandSyntaxException;
//import com.sk89q.jnbt.NBTInputStream;
//import com.sk89q.worldedit.WorldEdit;
//import com.sk89q.worldedit.extent.clipboard.Clipboard;
//import com.sk89q.worldedit.extent.clipboard.io.SpongeSchematicReader;
//import com.sk89q.worldedit.fabric.FabricAdapter;
//import com.sk89q.worldedit.session.ClipboardHolder;
import com.sk89q.jnbt.NBTInputStream;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.extent.clipboard.Clipboard;
import com.sk89q.worldedit.extent.clipboard.io.SpongeSchematicReader;
import com.sk89q.worldedit.fabric.FabricAdapter;
import com.sk89q.worldedit.session.ClipboardHolder;
import org.dimdev.dimdoors.DimensionalDoorsInitializer;
import org.dimdev.dimdoors.pockets.PocketTemplate;
import org.dimdev.dimdoors.util.schematic.Schematic;
@ -26,33 +26,33 @@ import net.minecraft.text.TranslatableText;
public class WorldeditHelper {
static int load(ServerCommandSource source, PocketTemplate template) throws CommandSyntaxException {
// ServerPlayerEntity player = source.getPlayer();
// boolean async = DimensionalDoorsInitializer.getConfig().getPocketsConfig().asyncWorldEditPocketLoading;
// Consumer<Runnable> taskAcceptor = async ? r -> source.getMinecraftServer().execute(r) : Runnable::run;
// Runnable task = () -> {
// NbtCompound nbt = Schematic.toNbt(template.getSchematic());
// ByteArrayOutputStream stream = new ByteArrayOutputStream();
// try {
// NbtIo.writeCompressed(nbt, stream);
// } catch (IOException e) {
// throw new RuntimeException(e); // Can't happen, the stream is a ByteArrayOutputStream
// }
// Clipboard clipboard;
// try {
// clipboard = new SpongeSchematicReader(new NBTInputStream(new ByteArrayInputStream(stream.toByteArray()))).read();
// } catch (IOException e) {
// throw new RuntimeException(e); // Can't happen, the stream is a ByteArrayInputStream
// }
// taskAcceptor.accept(() -> {
// WorldEdit.getInstance().getSessionManager().get(FabricAdapter.adaptPlayer(player)).setClipboard(new ClipboardHolder(clipboard));
// source.sendFeedback(new TranslatableText("commands.pocket.loadedSchem", template.getId()), true);
// });
// };
// if (async) {
// CompletableFuture.runAsync(task);
// } else {
// task.run();
// }
ServerPlayerEntity player = source.getPlayer();
boolean async = DimensionalDoorsInitializer.getConfig().getPocketsConfig().asyncWorldEditPocketLoading;
Consumer<Runnable> taskAcceptor = async ? r -> source.getMinecraftServer().execute(r) : Runnable::run;
Runnable task = () -> {
NbtCompound nbt = Schematic.toNbt(template.getSchematic());
ByteArrayOutputStream stream = new ByteArrayOutputStream();
try {
NbtIo.writeCompressed(nbt, stream);
} catch (IOException e) {
throw new RuntimeException(e); // Can't happen, the stream is a ByteArrayOutputStream
}
Clipboard clipboard;
try {
clipboard = new SpongeSchematicReader(new NBTInputStream(new ByteArrayInputStream(stream.toByteArray()))).read();
} catch (IOException e) {
throw new RuntimeException(e); // Can't happen, the stream is a ByteArrayInputStream
}
taskAcceptor.accept(() -> {
WorldEdit.getInstance().getSessionManager().get(FabricAdapter.adaptPlayer(player)).setClipboard(new ClipboardHolder(clipboard));
source.sendFeedback(new TranslatableText("commands.pocket.loadedSchem", template.getId()), true);
});
};
if (async) {
CompletableFuture.runAsync(task);
} else {
task.run();
}
return Command.SINGLE_SUCCESS;
}

View file

@ -160,93 +160,121 @@
"tools.rift_miss": "You can only use this item on a rift's core",
"tools.signature_blocked": "Usage of the signature was block",
"tools.target_became_block": "Failed, there is now a block at the stored location",
"text.autoconfig.dimdoors.title": "Dimensional Doors",
"text.autoconfig.dimdoors.category.general": "General Settings",
"text.autoconfig.dimdoors.option.general.depthSpreadFactor": "Depth Spread Factor",
"text.autoconfig.dimdoors.option.general.depthSpreadFactor@Tooltip": "The scale of the dispersion when escaping from a pocket or limbo, in blocks/depth. Limbo is treated as depth 50.",
"text.autoconfig.dimdoors.option.general.depthSpreadFactor.@Tooltip": "The scale of the dispersion when escaping from a pocket or limbo, in blocks/depth. Limbo is treated as depth 50.",
"text.autoconfig.dimdoors.option.general.riftCloseSpeed": "Rift Close Speed",
"text.autoconfig.dimdoors.option.general.riftCloseSpeed@Tooltip": "The speed at which rifts close when using the rift remover, in units of rift size per tick.",
"text.autoconfig.dimdoors.option.general.riftCloseSpeed.@Tooltip": "The speed at which rifts close when using the rift remover, in units of rift size per tick.",
"text.autoconfig.dimdoors.option.general.riftGrowthSpeed": "Rift Growth Speed",
"text.autoconfig.dimdoors.option.general.riftGrowthSpeed@Tooltip": "The speed at which rifts grow, in units of rift size per tick.",
"text.autoconfig.dimdoors.option.general.riftGrowthSpeed.@Tooltip": "The speed at which rifts grow, in units of rift size per tick.",
"text.autoconfig.dimdoors.option.general.teleportOffset": "Teleport Offset",
"text.autoconfig.dimdoors.option.general.teleportOffset@Tooltip": "Distance in blocks to teleport the player in front of the dimensional door.",
"text.autoconfig.dimdoors.option.general.teleportOffset.@Tooltip": "Distance in blocks to teleport the player in front of the dimensional door.",
"text.autoconfig.dimdoors.option.general.riftBoundingBoxInCreative": "Rift Bounding Box in Creative",
"text.autoconfig.dimdoors.option.general.riftBoundingBoxInCreative@Tooltip": "When true, shows the bounding boxes of floating rifts when the player is in creative.",
"text.autoconfig.dimdoors.option.general.riftBoundingBoxInCreative.@Tooltip": "When true, shows the bounding boxes of floating rifts when the player is in creative.",
"text.autoconfig.dimdoors.option.general.endermanSpawnChance": "Enderman spawn chance",
"text.autoconfig.dimdoors.option.general.endermanSpawnChance@Tooltip": "The chance that an enderman spawns at a detached rift.",
"text.autoconfig.dimdoors.option.general.endermanSpawnChance.@Tooltip": "The chance that an enderman spawns at a detached rift.",
"text.autoconfig.dimdoors.option.general.endermanAggressiveChance": "Enderman aggressive chance",
"text.autoconfig.dimdoors.option.general.endermanAggressiveChance@Tooltip": "The chance that an enderman spawned by a detached rift attacks the closest player.",
"text.autoconfig.dimdoors.option.general.endermanAggressiveChance.@Tooltip": "The chance that an enderman spawned by a detached rift attacks the closest player.",
"text.autoconfig.dimdoors.category.doors": "Doors Settings",
"text.autoconfig.dimdoors.option.doors.closeDoorBehind": "Close Door Behind",
"text.autoconfig.dimdoors.option.doors.closeDoorBehind@Tooltip": "When true, Dimensional Doors will automatically close when the player enters their portal.",
"text.autoconfig.dimdoors.option.doors.closeDoorBehind.@Tooltip": "When true, Dimensional Doors will automatically close when the player enters their portal.",
"text.autoconfig.dimdoors.option.doors.doorList": "Doors",
"text.autoconfig.dimdoors.option.doors.doorList@Tooltip": "Set overrides for enabling/disabling certain doors",
"text.autoconfig.dimdoors.option.doors.doorList.@Tooltip": "Set overrides for enabling/disabling certain doors",
"text.autoconfig.dimdoors.option.doors.doorList.mode": "Mode",
"text.autoconfig.dimdoors.option.doors.doorList.mode@Tooltip": "Enable - Only generate dimensional variants of these doors. Disable - Prevent generating dimensional variants of these doors",
"text.autoconfig.dimdoors.option.doors.doorList.mode.@Tooltip": "Enable - Only generate dimensional variants of these doors. Disable - Prevent generating dimensional variants of these doors",
"text.autoconfig.dimdoors.option.doors.doorList.doors": "Doors",
"text.autoconfig.dimdoors.option.doors.doorList.doors@Tooltip": "A list of block ids for doors. If the door's item id is different than the block id, add that as well.",
"text.autoconfig.dimdoors.option.doors.doorList.placeRiftsInCreativeMode": "Place Rifts in Creative Mode",
"text.autoconfig.dimdoors.option.doors.doorList.placeRiftsInCreativeMode@Tooltip": "If enabled, breaking a door in creative mode will spawn a rift",
"text.autoconfig.dimdoors.option.doors.doorList.doors.@Tooltip": "A list of block ids for doors. If the door's item id is different than the block id, add that as well.",
"text.autoconfig.dimdoors.option.doors.placeRiftsInCreativeMode": "Place Rifts in Creative Mode",
"text.autoconfig.dimdoors.option.doors.placeRiftsInCreativeMode.@Tooltip": "If enabled, breaking a door in creative mode will spawn a rift",
"text.autoconfig.dimdoors.category.pockets": "Pocket Settings",
"text.autoconfig.dimdoors.option.pockets.pocketGridSize": "Pocket Grid Size",
"text.autoconfig.dimdoors.option.pockets.pocketGridSize@Tooltip": "Sets how many chunks apart all pockets in any pocket dimensions should be placed.",
"text.autoconfig.dimdoors.option.pockets.pocketGridSize.@Tooltip": "Sets how many chunks apart all pockets in any pocket dimensions should be placed.",
"text.autoconfig.dimdoors.option.pockets.maxPocketSize": "Maximum Pocket Size",
"text.autoconfig.dimdoors.option.pockets.maxPocketSize@Tooltip": "Sets the maximum size of any pocket. A size of x will allow for pockets up to (x + 1) * (x + 1) chunks.",
"text.autoconfig.dimdoors.option.pockets.maxPocketSize.@Tooltip": "Sets the maximum size of any pocket. A size of x will allow for pockets up to (x + 1) * (x + 1) chunks.",
"text.autoconfig.dimdoors.option.pockets.privatePocketSize": "Private Pocket Size",
"text.autoconfig.dimdoors.option.pockets.privatePocketSize@Tooltip": "Sets the minimum size of a newly created Private Pocket. If this is set to any value bigger than maxPocketSize, the value of maxPocketSize will be used instead.",
"text.autoconfig.dimdoors.option.pockets.privatePocketSize.@Tooltip": "Sets the minimum size of a newly created Private Pocket. If this is set to any value bigger than maxPocketSize, the value of maxPocketSize will be used instead.",
"text.autoconfig.dimdoors.option.pockets.publicPocketSize": "Public Pocket Size",
"text.autoconfig.dimdoors.option.pockets.publicPocketSize@Tooltip": "Sets the minimum size of a newly created Public Pocket. If this is set to any value bigger than privatePocketSize, the value of privatePocketSize will be used instead.",
"text.autoconfig.dimdoors.option.pockets.publicPocketSize.@Tooltip": "Sets the minimum size of a newly created Public Pocket. If this is set to any value bigger than privatePocketSize, the value of privatePocketSize will be used instead.",
"text.autoconfig.dimdoors.option.pockets.defaultWeightEquation": "Default Weight Equation",
"text.autoconfig.dimdoors.option.pockets.defaultWeightEquation@Tooltip": "Sets the equation to be used to compute weight when there is no / invalid weight equation present in the pocket generator json",
"text.autoconfig.dimdoors.option.pockets.defaultWeightEquation.@Tooltip": "Sets the equation to be used to compute weight when there is no / invalid weight equation present in the pocket generator json",
"text.autoconfig.dimdoors.option.pockets.fallbackWeight": "Fallback weight",
"text.autoconfig.dimdoors.option.pockets.fallbackWeight@Tooltip": "Sets the fallback weight to be used if the default weight equation fails.",
"text.autoconfig.dimdoors.option.pockets.fallbackWeight.@Tooltip": "Sets the fallback weight to be used if the default weight equation fails.",
"text.autoconfig.dimdoors.option.pockets.classicPocketsResourcePackActivationType": "Classic Resource Pack Activation Type",
"text.autoconfig.dimdoors.option.pockets.classicPocketsResourcePackActivationType@Tooltip": "Default - Disabled but can be enabled, Default Enabled - Enabled but can be disabled, Always Enabled - Can not be disabled",
"text.autoconfig.dimdoors.option.pockets.classicPocketsResourcePackActivationType.@Tooltip": "Default - Disabled but can be enabled, Default Enabled - Enabled but can be disabled, Always Enabled - Can not be disabled",
"text.autoconfig.dimdoors.option.pockets.defaultPocketsResourcePackActivationType": "Default Resource Pack Activation Type",
"text.autoconfig.dimdoors.option.pockets.asyncWorldEditPocketLoading": "Async WorldEdit Pocket Loading",
"text.autoconfig.dimdoors.option.pockets.asyncWorldEditPocketLoading@Tooltip": "Sets loading pockets to your WorldEdit clipboard asynchronous or synchronous. Only affects when WorldEdit is installed.",
"text.autoconfig.dimdoors.option.pockets.asyncWorldEditPocketLoading.@Tooltip": "Sets loading pockets to your WorldEdit clipboard asynchronous or synchronous. Only affects when WorldEdit is installed.",
"text.autoconfig.dimdoors.option.pockets.canUseRiftSignatureInPrivatePockets": "Can use Rift Signature in Private Pockets",
"text.autoconfig.dimdoors.option.pockets.canUseRiftSignatureInPrivatePockets.@Tooltip": "If Enabled, rift signatures can be used within private pockets.",
"dimdoors.pocket.dyeAlreadyAbsorbed": "The pocket is already that color, so the rift didn't absorb the dye.",
"dimdoors.pocket.pocketHasBeenDyed": "The pocket has been dyed %s.",
"dimdoors.pocket.remainingNeededDyes": "The pocket has %s/%s of the dyes needed to be colored %s.",
"text.autoconfig.dimdoors.category.world": "Worldgen Settings",
"text.autoconfig.dimdoors.option.world.clusterGenChance": "Cluster Generation Chance",
"text.autoconfig.dimdoors.option.world.clusterGenChance@Tooltip": "Sets the chance (out of 1) that a cluster of rifts will generate in a given chunk.",
"text.autoconfig.dimdoors.option.world.clusterGenChance.@Tooltip": "Sets the chance (out of 1) that a cluster of rifts will generate in a given chunk.",
"text.autoconfig.dimdoors.option.world.gatewayGenChance": "Gateway Generation Chance",
"text.autoconfig.dimdoors.option.world.gatewayGenChance@Tooltip": "Sets the chance (out of 1) that a dimensional gateway will generate in a given chunk.",
"text.autoconfig.dimdoors.option.world.gatewayGenChance.@Tooltip": "Sets the chance (out of 1) that a dimensional gateway will generate in a given chunk.",
"text.autoconfig.dimdoors.option.world.clusterDimBlacklist": "Cluster Dimension Blacklist",
"text.autoconfig.dimdoors.option.world.clusterDimBlacklist@Tooltip": "Dimension Blacklist for the generation of Rift Scar clusters. Add a dimension ID here to prevent generation in certain dimensions.",
"text.autoconfig.dimdoors.option.world.clusterDimBlacklist.@Tooltip": "Dimension Blacklist for the generation of Rift Scar clusters. Add a dimension ID here to prevent generation in certain dimensions.",
"text.autoconfig.dimdoors.option.world.gatewayDimBlacklist": "Gateway Dimension Blacklist",
"text.autoconfig.dimdoors.option.world.gatewayDimBlacklist@Tooltip": "Dimension Blacklist for the generation of Dimensional Portal gateways. Add a dimension ID here to prevent generation in certain dimensions.",
"text.autoconfig.dimdoors.option.world.gatewayDimBlacklist.@Tooltip": "Dimension Blacklist for the generation of Dimensional Portal gateways. Add a dimension ID here to prevent generation in certain dimensions.",
"text.autoconfig.dimdoors.category.dungeons": "Dungeon Settings",
"text.autoconfig.dimdoors.option.dungeons.maxDungeonDepth": "Maximum Dungeon Depth",
"text.autoconfig.dimdoors.option.dungeons.maxDungeonDepth@Tooltip": "The depth at which limbo is located. If a Rift reaches any deeper than this while searching for a new destination, the player trying to enter the Rift will be sent straight to Limbo.",
"text.autoconfig.dimdoors.option.dungeons.maxDungeonDepth.@Tooltip": "The depth at which limbo is located. If a Rift reaches any deeper than this while searching for a new destination, the player trying to enter the Rift will be sent straight to Limbo.",
"text.autoconfig.dimdoors.category.monoliths": "Monolith Settings",
"text.autoconfig.dimdoors.option.monoliths.dangerousLimboMonoliths": "Dangerous Limbo Monoliths",
"text.autoconfig.dimdoors.option.monoliths.dangerousLimboMonoliths@Tooltip": "When true, Monoliths in Limbo attack the player and deal damage.",
"text.autoconfig.dimdoors.option.monoliths.dangerousLimboMonoliths.@Tooltip": "When true, Monoliths in Limbo attack the player and deal damage.",
"text.autoconfig.dimdoors.option.monoliths.monolithTeleportation": "Monolith Teleportation",
"text.autoconfig.dimdoors.option.monoliths.monolithTeleportation@Tooltip": "When true, being exposed to the gaze of Monoliths for too long, will cause the player to be teleported to the void above Limbo.",
"text.autoconfig.dimdoors.option.monoliths.monolithTeleportation.@Tooltip": "When true, being exposed to the gaze of Monoliths for too long, will cause the player to be teleported to the void above Limbo.",
"text.autoconfig.dimdoors.category.limbo": "Limbo Settings",
"text.autoconfig.dimdoors.option.limbo.universalLimbo": "Universal Limbo",
"text.autoconfig.dimdoors.option.limbo.universalLimbo@Tooltip": "When true, players are also teleported to Limbo when they die in any non-Pocket Dimension (except Limbo itself). Otherwise, players only go to Limbo if they die in a Pocket Dimension.",
"text.autoconfig.dimdoors.option.limbo.universalLimbo.@Tooltip": "When true, players are also teleported to Limbo when they die in any non-Pocket Dimension (except Limbo itself). Otherwise, players only go to Limbo if they die in a Pocket Dimension.",
"text.autoconfig.dimdoors.option.limbo.hardcoreLimbo": "Hardcore Limbo",
"text.autoconfig.dimdoors.option.limbo.hardcoreLimbo@Tooltip": "When true, a player dying in Limbo will respawn in Limbo, making Eternal Fluid or Golden Dimensional Doors the only way to escape Limbo.",
"text.autoconfig.dimdoors.option.limbo.hardcoreLimbo.@Tooltip": "When true, a player dying in Limbo will respawn in Limbo, making Eternal Fluid or Golden Dimensional Doors the only way to escape Limbo.",
"text.autoconfig.dimdoors.option.limbo.decaySpreadChance": "Decay Spread Chance",
"text.autoconfig.dimdoors.option.limbo.decaySpreadChance.@Tooltip": "To be filled out.",
"text.autoconfig.dimdoors.category.player": "Player",
"text.autoconfig.dimdoors.option.player.fray": "Fray",
"text.autoconfig.dimdoors.option.player.fray.@Tooltip": "To be filled out.",
"text.autoconfig.dimdoors.option.player.fray.maxFray": "Max Fray",
"text.autoconfig.dimdoors.option.player.fray.maxFray.@Tooltip": "Title",
"text.autoconfig.dimdoors.option.player.fray.riftFrayIncrement": "Rift Fray Increment",
"text.autoconfig.dimdoors.option.player.fray.riftFrayIncrement.@Tooltip": "Title",
"text.autoconfig.dimdoors.option.player.fray.monolithTeleportationIncrement": "Monolith Teleportation Increment",
"text.autoconfig.dimdoors.option.player.fray.monolithTeleportationIncrement.@Tooltip": "Title",
"text.autoconfig.dimdoors.option.player.fray.eternalFluidFrayDecrease": "Eternal Fluid Fray Decrease",
"text.autoconfig.dimdoors.option.player.fray.eternalFluidFrayDecrease.@Tooltip": "Title",
"text.autoconfig.dimdoors.option.player.fray.nameplateGlitchFray": "Nameplate Glitch Fray",
"text.autoconfig.dimdoors.option.player.fray.nameplateGlitchFray.@Tooltip": "Amount of fray needed for nameplate to glitch.",
"text.autoconfig.dimdoors.option.player.fray.staticOverlayFray": "Static Overlay Fray",
"text.autoconfig.dimdoors.option.player.fray.staticOverlayFray.@Tooltip": "Amount of fray needed for screen to start having static",
"text.autoconfig.dimdoors.option.player.fray.armorDamageFray": "Armor Damage Fray",
"text.autoconfig.dimdoors.option.player.fray.armorDamageFray.@Tooltip": "Amount of fray needed for your armor to start taking damage",
"text.autoconfig.dimdoors.option.player.fray.grayScreenFray": "Gray Screen Fray",
"text.autoconfig.dimdoors.option.player.fray.grayScreenFray.@Tooltip": "Title",
"text.autoconfig.dimdoors.option.player.fray.unravelledStatueFray": "Unravelled Statue Fray",
"text.autoconfig.dimdoors.option.player.fray.unravelledStatueFray.@Tooltip": "Title",
"text.autoconfig.dimdoors.category.graphics": "Graphics Settings",
"text.autoconfig.dimdoors.option.graphics.highlightRiftCoreFor": "Time to Highlight Rift Core",
"text.autoconfig.dimdoors.option.graphics.highlightRiftCoreFor@Tooltip": "How long, in milliseconds, the rift's core (tesseract animation) should be shown for when attempting to place a door near a large rift but not directly on it. Set to -1 to disable.",
"text.autoconfig.dimdoors.option.graphics.highlightRiftCoreFor.@Tooltip": "How long, in milliseconds, the rift's core (tesseract animation) should be shown for when attempting to place a door near a large rift but not directly on it. Set to -1 to disable.",
"text.autoconfig.dimdoors.option.graphics.showRiftCore": "Always Show Rift Cores",
"text.autoconfig.dimdoors.option.graphics.showRiftCore@Tooltip": "Set this to true to always show rifts' cores (tesseract animation).",
"text.autoconfig.dimdoors.option.graphics.showRiftCore.@Tooltip": "Set this to true to always show rifts' cores (tesseract animation).",
"text.autoconfig.dimdoors.option.graphics.riftSize": "Rift Size",
"text.autoconfig.dimdoors.option.graphics.riftSize@Tooltip": "Multiplier affecting how large rifts should be rendered, 1 being the default size.",
"text.autoconfig.dimdoors.option.graphics.riftSize.@Tooltip": "Multiplier affecting how large rifts should be rendered, 1 being the default size.",
"text.autoconfig.dimdoors.option.graphics.riftJitter": "Rift Jitter",
"text.autoconfig.dimdoors.option.graphics.riftJitter@Tooltip": "Multiplier affecting how much rifts should jitter, 1 being the default size.",
"text.autoconfig.dimdoors.option.graphics.riftJitter.@Tooltip": "Multiplier affecting how much rifts should jitter, 1 being the default size.",
"argument.dimdoors.schematic.invalidNamespace": "Invalid schematic namespace. Expected one of %s, found %s.",
"command.dimdoors.schematicv2.unknownSchematic": "Unknown schematic \"%s\" in namespace \"%s\" ",