Forgot some stuff

This commit is contained in:
Waterpicker 2021-06-06 13:57:07 -05:00
parent 33c41db0d8
commit f5570c68ec
2 changed files with 50 additions and 50 deletions

View file

@ -54,9 +54,9 @@ repositories {
url = "https://maven.shedaniel.me/" url = "https://maven.shedaniel.me/"
} }
maven { // maven {
url = "https://bai.jfrog.io/artifactory/maven" // url = "https://bai.jfrog.io/artifactory/maven"
} // }
maven { maven {
url = "https://jitpack.io" url = "https://jitpack.io"
@ -127,36 +127,36 @@ dependencies {
includeCompile("com.github.DimensionalDevelopment", "Matrix", "1.0.0") includeCompile("com.github.DimensionalDevelopment", "Matrix", "1.0.0")
// includeCompile("io.github.BoogieMonster1O1", "OpenWorlds", "c57e3ef") // includeCompile("io.github.BoogieMonster1O1", "OpenWorlds", "c57e3ef")
// includeCompile("io.github.cottonmc", "LibGui", "4.0.0-alpha.1+21w11a") // includeCompile("io.github.cottonmc", "LibGui", "4.0.0-alpha.1+21w11a")
includeCompile("me.shedaniel.cloth", "cloth-config-fabric", "5.0.16") includeCompile("me.shedaniel.cloth", "cloth-config-fabric", "5.0.34")
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-base", "3.0.0-nightly.21w14a") includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-base", "3.0.0-nightly.1.17-pre2")
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-item", "3.0.0-nightly.21w14a") includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-item", "3.0.0-nightly.1.17-pre2")
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-entity", "3.0.0-nightly.21w14a") includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-entity", "3.0.0-nightly.1.17-pre2")
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-level", "3.0.0-nightly.21w14a") includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-level", "3.0.0-nightly.1.17-pre2")
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-util", "3.0.0-nightly.21w14a") includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-util", "3.0.0-nightly.1.17-pre2")
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-world", "3.0.0-nightly.21w14a") includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-world", "3.0.0-nightly.1.17-pre2")
includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-chunk", "3.0.0-nightly.21w14a") includeCompile("io.github.onyxstudios.Cardinal-Components-API", "cardinal-components-chunk", "3.0.0-nightly.1.17-pre2")
// includeCompile("me.sargunvohra.mcmods", "autoconfig1u", "3.3.1") // includeCompile("me.sargunvohra.mcmods", "autoconfig1u", "3.3.1")
includeCompile("dev.hephaestus", "seedy-behavior", "1.0.1") includeCompile("dev.hephaestus", "seedy-behavior", "1.0.1")
modCompileOnly("com.terraformersmc:modmenu:2.0.0-beta.4") { modCompileOnly("com.terraformersmc:modmenu:2.0.0-beta.7") {
exclude module: "fabric-api" exclude module: "fabric-api"
} }
modRuntime("com.terraformersmc:modmenu:2.0.0-beta.4") { modRuntime("com.terraformersmc:modmenu:2.0.0-beta.7") {
exclude module: "fabric-api" exclude module: "fabric-api"
} }
modCompileOnly('mcp.mobius.waila:wthit-fabric:3.2.3') { modCompileOnly('mcp.mobius.waila:wthit-fabric:3.5.1') {
exclude module: "modmenu" exclude module: "modmenu"
exclude module: "fabric-api" exclude module: "fabric-api"
} }
modRuntime('mcp.mobius.waila:wthit-fabric:3.2.3') { modRuntime('mcp.mobius.waila:wthit-fabric:3.5.1') {
exclude module: "modmenu" exclude module: "modmenu"
exclude module: "fabric-api" exclude module: "fabric-api"
} }
modCompileOnly "me.shedaniel.cloth.api:cloth-datagen-api-v1:2.0.0" modCompileOnly "me.shedaniel.cloth.api:cloth-datagen-api-v1:2.0.0"
modRuntime "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" // modCompileOnly "worldedit:worldedit:7.2.3"
modRuntime "worldedit:worldedit:7.2.3" // modRuntime "worldedit:worldedit:7.2.3"
// modImplementation "geckolib:geckolib:3.0.31" // modImplementation "geckolib:geckolib:3.0.31"

View file

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