mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-29 20:19:06 +00:00
Bugfixes
This commit is contained in:
@@ -2,17 +2,20 @@ package com.volmit.iris.gen;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
import com.volmit.iris.gen.scaffold.TerrainTarget;
|
||||
import com.volmit.iris.object.InferredType;
|
||||
import com.volmit.iris.object.IrisBiome;
|
||||
import com.volmit.iris.object.IrisDimension;
|
||||
import com.volmit.iris.object.IrisRegion;
|
||||
import com.volmit.iris.util.B;
|
||||
import com.volmit.iris.util.MortarSender;
|
||||
import com.volmit.iris.util.RNG;
|
||||
|
||||
import lombok.Data;
|
||||
@@ -40,7 +43,23 @@ public abstract class DimensionalTerrainProvider extends ContextualTerrainProvid
|
||||
if(!folder.exists())
|
||||
{
|
||||
Iris.error("Missing World iris/dimensions folder! (" + folder.getAbsolutePath() + ")");
|
||||
setDimensionName("error-missing-dimension");
|
||||
setDimensionName(IrisSettings.get().getDefaultWorldType());
|
||||
Iris.proj.installIntoWorld(new MortarSender(Bukkit.getConsoleSender()), getDimensionName(), getTarget().getFolder());
|
||||
return;
|
||||
}
|
||||
|
||||
if(!folder.exists())
|
||||
{
|
||||
Iris.error("Missing World iris/dimensions folder! (" + folder.getAbsolutePath() + ")");
|
||||
try
|
||||
{
|
||||
throw new RuntimeException("Cant find dimension data!");
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
fail(e);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -53,9 +72,20 @@ public abstract class DimensionalTerrainProvider extends ContextualTerrainProvid
|
||||
}
|
||||
}
|
||||
|
||||
Iris.error("Missing World iris/dimensions/<dimension-name>.json file. Assuming overworld!");
|
||||
setDimensionName("error-missing-dimension");
|
||||
fail(new RuntimeException("Missing dimension folder/file in " + folder.getAbsolutePath()));
|
||||
if(!folder.exists())
|
||||
{
|
||||
Iris.error("Missing World iris/dimensions folder! (" + folder.getAbsolutePath() + ")");
|
||||
try
|
||||
{
|
||||
throw new RuntimeException("Cant find dimension data!");
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
fail(e);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
@@ -69,6 +99,11 @@ public abstract class DimensionalTerrainProvider extends ContextualTerrainProvid
|
||||
}
|
||||
}
|
||||
|
||||
protected void useDefaultDimensionSetupNOW()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void onPlayerLeft(Player p)
|
||||
{
|
||||
|
||||
|
||||
@@ -542,12 +542,22 @@ public class IrisTerrainProvider extends SkyTerrainProvider implements IrisConte
|
||||
@Override
|
||||
public boolean shouldGenerateCaves()
|
||||
{
|
||||
if(getDimension() == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return getDimension().isVanillaCaves();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldGenerateVanillaStructures()
|
||||
{
|
||||
if(getDimension() == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return getDimension().isVanillaStructures();
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import org.bukkit.World;
|
||||
import org.bukkit.WorldCreator;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.IrisSettings;
|
||||
|
||||
public class NMSCreator
|
||||
{
|
||||
@@ -15,31 +16,34 @@ public class NMSCreator
|
||||
|
||||
public static World createWorld(WorldCreator creator, boolean loadSpawn)
|
||||
{
|
||||
try
|
||||
if(IrisSettings.get().isSkipPrepareSpawnNMS())
|
||||
{
|
||||
String code = Iris.nmsTag();
|
||||
try
|
||||
{
|
||||
String code = Iris.nmsTag();
|
||||
|
||||
if(code.equals("v1_16_R2"))
|
||||
{
|
||||
return NMSCreator162.createWorld(creator, loadSpawn);
|
||||
if(code.equals("v1_16_R2"))
|
||||
{
|
||||
return NMSCreator162.createWorld(creator, loadSpawn);
|
||||
}
|
||||
else if(code.equals("v1_16_R1"))
|
||||
{
|
||||
return NMSCreator161.createWorld(creator, loadSpawn);
|
||||
}
|
||||
else if(code.equals("v1_15_R1"))
|
||||
{
|
||||
return NMSCreator151.createWorld(creator, loadSpawn);
|
||||
}
|
||||
else if(code.equals("v1_14_R1"))
|
||||
{
|
||||
return NMSCreator141.createWorld(creator, loadSpawn);
|
||||
}
|
||||
}
|
||||
else if(code.equals("v1_16_R1"))
|
||||
{
|
||||
return NMSCreator161.createWorld(creator, loadSpawn);
|
||||
}
|
||||
else if(code.equals("v1_15_R1"))
|
||||
{
|
||||
return NMSCreator151.createWorld(creator, loadSpawn);
|
||||
}
|
||||
else if(code.equals("v1_14_R1"))
|
||||
{
|
||||
return NMSCreator141.createWorld(creator, loadSpawn);
|
||||
}
|
||||
}
|
||||
|
||||
catch(Throwable e)
|
||||
{
|
||||
catch(Throwable e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return Bukkit.createWorld(creator);
|
||||
|
||||
Reference in New Issue
Block a user