diff --git a/BlueMapForge/build.gradle b/BlueMapForge/build.gradle index 88cf872c..59db953d 100644 --- a/BlueMapForge/build.gradle +++ b/BlueMapForge/build.gradle @@ -12,7 +12,7 @@ buildscript { apply plugin: 'net.minecraftforge.gradle' minecraft { - mappings channel: 'snapshot', version: '20190719-1.14.3' + mappings channel: 'snapshot', version: '20200514-1.16' } configurations { @@ -20,7 +20,7 @@ configurations { } dependencies { - minecraft 'net.minecraftforge:forge:1.15.2-31.1.0' + minecraft 'net.minecraftforge:forge:1.16.1-32.0.97' include (project(':BlueMapCommon')) { //exclude dependencies provided by forge @@ -33,7 +33,7 @@ dependencies { } build.dependsOn shadowJar { - destinationDir = file '../build/unsupported' + destinationDir = file '../build/release' archiveFileName = "BlueMap-${version}-forge.jar" configurations = [project.configurations.include] diff --git a/BlueMapForge/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java b/BlueMapForge/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java index 4f1c19a9..de44eef9 100644 --- a/BlueMapForge/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java +++ b/BlueMapForge/src/main/java/de/bluecolored/bluemap/forge/ForgeCommandSource.java @@ -33,7 +33,6 @@ import de.bluecolored.bluemap.common.plugin.serverinterface.CommandSource; import de.bluecolored.bluemap.common.plugin.text.Text; import de.bluecolored.bluemap.core.world.World; -import net.minecraft.util.math.Vec3d; import net.minecraft.util.text.ITextComponent; import net.minecraft.world.server.ServerWorld; @@ -51,7 +50,7 @@ public ForgeCommandSource(ForgeMod mod, Plugin plugin, net.minecraft.command.Com @Override public void sendMessage(Text text) { - delegate.sendFeedback(ITextComponent.Serializer.fromJson(text.toJSONString()), false); + delegate.sendFeedback(ITextComponent.Serializer.func_240643_a_(text.toJSONString()), false); } @Override @@ -61,7 +60,7 @@ public boolean hasPermission(String permission) { @Override public Optional getPosition() { - Vec3d pos = delegate.getPos(); + net.minecraft.util.math.vector.Vector3d pos = delegate.getPos(); if (pos != null) { return Optional.of(new Vector3d(pos.x, pos.y, pos.z)); } diff --git a/BlueMapForge/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java b/BlueMapForge/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java index 66cb7a9c..ff3fb865 100644 --- a/BlueMapForge/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java +++ b/BlueMapForge/src/main/java/de/bluecolored/bluemap/forge/ForgeMod.java @@ -42,6 +42,8 @@ import de.bluecolored.bluemap.common.plugin.serverinterface.ServerInterface; import de.bluecolored.bluemap.core.logger.Logger; import net.minecraft.command.CommandSource; +import net.minecraft.server.MinecraftServer; +import net.minecraft.world.DimensionType; import net.minecraft.world.server.ServerWorld; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.world.BlockEvent; @@ -88,7 +90,7 @@ public void onServerStarting(FMLServerStartingEvent event) { } //register commands - this.commands = new Commands<>(bluemap, event.getCommandDispatcher(), forgeSource -> new ForgeCommandSource(this, bluemap, forgeSource)); + this.commands = new Commands<>(bluemap, event.getServer().getCommandManager().getDispatcher(), forgeSource -> new ForgeCommandSource(this, bluemap, forgeSource)); new Thread(() -> { try { @@ -189,14 +191,11 @@ public UUID getUUIDForWorld(ServerWorld world) throws IOException { } private File getFolderForWorld(ServerWorld world) throws IOException { - File worldFolder = world.getSaveHandler().getWorldDirectory(); - - int dimensionId = world.getDimension().getType().getId(); - if (dimensionId != 0) { - worldFolder = new File(worldFolder, "DIM" + dimensionId); - } - - return worldFolder.getCanonicalFile(); + MinecraftServer server = world.getServer(); + String worldName = server.func_240793_aU_().getWorldName(); + File worldFolder = new File(world.getServer().getDataDirectory(), worldName); + File dimensionFolder = DimensionType.func_236031_a_(world.func_234923_W_(), worldFolder); + return dimensionFolder.getCanonicalFile(); } @Override diff --git a/BlueMapForge/src/main/resources/META-INF/mods.toml b/BlueMapForge/src/main/resources/META-INF/mods.toml index 253c1248..8f73789a 100644 --- a/BlueMapForge/src/main/resources/META-INF/mods.toml +++ b/BlueMapForge/src/main/resources/META-INF/mods.toml @@ -20,6 +20,6 @@ A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebG [[dependencies.bluemap]] modId="minecraft" mandatory=true - versionRange="[1.15.2]" + versionRange="[1.16.1]" ordering="NONE" side="SERVER" \ No newline at end of file diff --git a/BlueMapForge/src/main/resources/mcmod.info b/BlueMapForge/src/main/resources/mcmod.info deleted file mode 100644 index f510ab6c..00000000 --- a/BlueMapForge/src/main/resources/mcmod.info +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "modid": "bluemap", - "name": "BlueMap", - "version": "${version}", - "description": "A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)", - "url": "https://github.com/BlueMap-Minecraft", - "authorList": [ - "Blue (TBlueF, Lukas Rieger)" - ], - "dependencies": [], - "requiredMods": [] - } -] diff --git a/BlueMapForge/src/main/resources/pack.mcmeta b/BlueMapForge/src/main/resources/pack.mcmeta new file mode 100644 index 00000000..49259163 --- /dev/null +++ b/BlueMapForge/src/main/resources/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "description": "BlueMap - A 3d-map of your Minecraft worlds view-able in your browser using three.js (WebGL)", + "pack_format": 5 + } +}