mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 03:05:28 +01:00
More 1.16.1 support
This commit is contained in:
parent
a8611738d6
commit
c649abbca2
@ -1898,7 +1898,6 @@ public class DynmapPlugin
|
|||||||
File f = new File(core.getDataFolder(), "forgeworlds.yml");
|
File f = new File(core.getDataFolder(), "forgeworlds.yml");
|
||||||
if(f.canRead() == false) {
|
if(f.canRead() == false) {
|
||||||
useSaveFolder = true;
|
useSaveFolder = true;
|
||||||
ForgeWorld.setSaveFolderMapping();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ConfigurationNode cn = new ConfigurationNode(f);
|
ConfigurationNode cn = new ConfigurationNode(f);
|
||||||
@ -1910,9 +1909,6 @@ public class DynmapPlugin
|
|||||||
if (cn.containsKey("useSaveFolderAsName")) {
|
if (cn.containsKey("useSaveFolderAsName")) {
|
||||||
useSaveFolder = cn.getBoolean("useSaveFolderAsName", useSaveFolder);
|
useSaveFolder = cn.getBoolean("useSaveFolderAsName", useSaveFolder);
|
||||||
}
|
}
|
||||||
if (useSaveFolder) {
|
|
||||||
ForgeWorld.setSaveFolderMapping();
|
|
||||||
}
|
|
||||||
List<Map<String,Object>> lst = cn.getMapList("worlds");
|
List<Map<String,Object>> lst = cn.getMapList("worlds");
|
||||||
if(lst == null) {
|
if(lst == null) {
|
||||||
Log.warning("Discarding bad forgeworlds.yml");
|
Log.warning("Discarding bad forgeworlds.yml");
|
||||||
|
@ -1,16 +1,12 @@
|
|||||||
package org.dynmap.forge_1_16_1;
|
package org.dynmap.forge_1_16_1;
|
||||||
import java.io.File;
|
|
||||||
/**
|
/**
|
||||||
* Forge specific implementation of DynmapWorld
|
* Forge specific implementation of DynmapWorld
|
||||||
*/
|
*/
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.util.RegistryKey;
|
import net.minecraft.util.RegistryKey;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.gen.Heightmap.Type;
|
import net.minecraft.world.gen.Heightmap.Type;
|
||||||
import net.minecraft.world.server.ServerWorld;
|
|
||||||
import net.minecraft.world.DimensionType;
|
|
||||||
import net.minecraft.world.IWorld;
|
import net.minecraft.world.IWorld;
|
||||||
import net.minecraft.world.LightType;
|
import net.minecraft.world.LightType;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@ -30,12 +26,8 @@ public class ForgeWorld extends DynmapWorld
|
|||||||
private final boolean istheend;
|
private final boolean istheend;
|
||||||
private final String env;
|
private final String env;
|
||||||
private DynmapLocation spawnloc = new DynmapLocation();
|
private DynmapLocation spawnloc = new DynmapLocation();
|
||||||
private static boolean doSaveFolderMapping = false;
|
|
||||||
private static int maxWorldHeight = 256; // Maximum allows world height
|
private static int maxWorldHeight = 256; // Maximum allows world height
|
||||||
|
|
||||||
public static void setSaveFolderMapping() {
|
|
||||||
doSaveFolderMapping = true;
|
|
||||||
}
|
|
||||||
public static int getMaxWorldHeight() {
|
public static int getMaxWorldHeight() {
|
||||||
return maxWorldHeight;
|
return maxWorldHeight;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user