mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-19 02:36:59 +00:00
Move NMS out of legacy
This commit is contained in:
parent
657f581a3d
commit
b85efcd85a
@ -1,28 +1,33 @@
|
|||||||
package com.minelazz.epicworldgenerator.structures;
|
package com.minelazz.epicworldgenerator.structures;
|
||||||
|
|
||||||
import java.io.File;
|
import com.volmit.iris.Iris;
|
||||||
import java.io.FileInputStream;
|
import com.volmit.iris.object.IrisObject;
|
||||||
import java.io.IOException;
|
import com.volmit.iris.util.B;
|
||||||
import java.io.ObjectInputStream;
|
import com.volmit.iris.util.DontObfuscate;
|
||||||
import java.io.Serializable;
|
|
||||||
import java.util.EnumSet;
|
|
||||||
|
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.block.data.BlockData;
|
import org.bukkit.block.data.BlockData;
|
||||||
import org.bukkit.util.BlockVector;
|
import org.bukkit.util.BlockVector;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import java.io.*;
|
||||||
import com.volmit.iris.object.IrisObject;
|
import java.util.EnumSet;
|
||||||
import com.volmit.iris.util.B;
|
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public class StructureObject implements Serializable
|
public class StructureObject implements Serializable
|
||||||
{
|
{
|
||||||
|
@DontObfuscate
|
||||||
public static final String MESSAGE0 = "This was created from .ewg serialization files";
|
public static final String MESSAGE0 = "This was created from .ewg serialization files";
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public static final String MESSAGE1 = "This is not copied code, it is intended to ";
|
public static final String MESSAGE1 = "This is not copied code, it is intended to ";
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public static final String MESSAGE2 = "be used so that people can convert EWG files";
|
public static final String MESSAGE2 = "be used so that people can convert EWG files";
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public static final String MESSAGE3 = "into .IOB files (iris objects)";
|
public static final String MESSAGE3 = "into .IOB files (iris objects)";
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public static IrisObject convert(File so) throws IOException, ClassNotFoundException
|
public static IrisObject convert(File so) throws IOException, ClassNotFoundException
|
||||||
{
|
{
|
||||||
FileInputStream fin = new FileInputStream(so);
|
FileInputStream fin = new FileInputStream(so);
|
||||||
@ -72,6 +77,7 @@ public class StructureObject implements Serializable
|
|||||||
return iob;
|
return iob;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
private static final BlockData map(int id, int dat)
|
private static final BlockData map(int id, int dat)
|
||||||
{
|
{
|
||||||
@ -93,23 +99,45 @@ public class StructureObject implements Serializable
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
private static final long serialVersionUID = -905274143366977303L;
|
private static final long serialVersionUID = -905274143366977303L;
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public SOBlock[] blocks;
|
public SOBlock[] blocks;
|
||||||
|
@DontObfuscate
|
||||||
public String name;
|
public String name;
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public final class SOBlock implements Serializable
|
public final class SOBlock implements Serializable
|
||||||
{
|
{
|
||||||
|
@DontObfuscate
|
||||||
private static final long serialVersionUID = 2610063934261982315L;
|
private static final long serialVersionUID = 2610063934261982315L;
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public final int x;
|
public final int x;
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public final int y;
|
public final int y;
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public final int z;
|
public final int z;
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public final int id;
|
public final int id;
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public final int data;
|
public final int data;
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public String meta;
|
public String meta;
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public String blockData;
|
public String blockData;
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
final StructureObject ref;
|
final StructureObject ref;
|
||||||
|
|
||||||
|
@DontObfuscate
|
||||||
public SOBlock(StructureObject structureObject, int x, int y, int z, String string)
|
public SOBlock(StructureObject structureObject, int x, int y, int z, String string)
|
||||||
{
|
{
|
||||||
this.ref = structureObject;
|
this.ref = structureObject;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
package com.volmit.iris;
|
package com.volmit.iris;
|
||||||
|
|
||||||
import com.volmit.iris.generator.legacy.nms.INMS;
|
import com.volmit.iris.nms.INMS;
|
||||||
import com.volmit.iris.manager.*;
|
import com.volmit.iris.manager.*;
|
||||||
import com.volmit.iris.manager.command.CommandIris;
|
import com.volmit.iris.manager.command.CommandIris;
|
||||||
import com.volmit.iris.manager.command.PermissionIris;
|
import com.volmit.iris.manager.command.PermissionIris;
|
||||||
|
@ -57,18 +57,15 @@ public class IrisComplex implements DataProvider
|
|||||||
{
|
{
|
||||||
case CAVE:
|
case CAVE:
|
||||||
return caveBiomeStream;
|
return caveBiomeStream;
|
||||||
case DEFER:
|
|
||||||
break;
|
|
||||||
case LAKE:
|
|
||||||
break;
|
|
||||||
case LAND:
|
case LAND:
|
||||||
return landBiomeStream;
|
return landBiomeStream;
|
||||||
case RIVER:
|
|
||||||
break;
|
|
||||||
case SEA:
|
case SEA:
|
||||||
return seaBiomeStream;
|
return seaBiomeStream;
|
||||||
case SHORE:
|
case SHORE:
|
||||||
return shoreBiomeStream;
|
return shoreBiomeStream;
|
||||||
|
case DEFER:
|
||||||
|
case LAKE:
|
||||||
|
case RIVER:
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ public class IrisEngineFramework implements EngineFramework {
|
|||||||
@Getter
|
@Getter
|
||||||
private final Engine engine;
|
private final Engine engine;
|
||||||
|
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
private final IrisComplex complex;
|
private final IrisComplex complex;
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ package com.volmit.iris.manager;
|
|||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.IrisSettings;
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.generator.legacy.nms.INMS;
|
import com.volmit.iris.nms.INMS;
|
||||||
import com.volmit.iris.object.*;
|
import com.volmit.iris.object.*;
|
||||||
import com.volmit.iris.scaffold.IrisWorldCreator;
|
import com.volmit.iris.scaffold.IrisWorldCreator;
|
||||||
import com.volmit.iris.scaffold.engine.IrisAccess;
|
import com.volmit.iris.scaffold.engine.IrisAccess;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.volmit.iris.manager.command;
|
package com.volmit.iris.manager.command;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.generator.legacy.nms.INMS;
|
import com.volmit.iris.nms.INMS;
|
||||||
import com.volmit.iris.object.IrisDimension;
|
import com.volmit.iris.object.IrisDimension;
|
||||||
import com.volmit.iris.scaffold.IrisWorldCreator;
|
import com.volmit.iris.scaffold.IrisWorldCreator;
|
||||||
import com.volmit.iris.scaffold.engine.IrisAccess;
|
import com.volmit.iris.scaffold.engine.IrisAccess;
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
package com.volmit.iris.generator.legacy.nms;
|
package com.volmit.iris.nms;
|
||||||
|
|
||||||
import com.volmit.iris.Iris;
|
import com.volmit.iris.Iris;
|
||||||
import com.volmit.iris.IrisSettings;
|
import com.volmit.iris.IrisSettings;
|
||||||
import com.volmit.iris.generator.legacy.nms.v1X.NMSBinding1X;
|
import com.volmit.iris.nms.v1X.NMSBinding1X;
|
||||||
import com.volmit.iris.util.KMap;
|
import com.volmit.iris.util.KMap;
|
||||||
import org.bukkit.Bukkit;
|
import org.bukkit.Bukkit;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.volmit.iris.generator.legacy.nms;
|
package com.volmit.iris.nms;
|
||||||
|
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.WorldCreator;
|
import org.bukkit.WorldCreator;
|
@ -1,4 +1,4 @@
|
|||||||
package com.volmit.iris.generator.legacy.nms;
|
package com.volmit.iris.nms;
|
||||||
|
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.WorldCreator;
|
import org.bukkit.WorldCreator;
|
@ -1,8 +1,8 @@
|
|||||||
package com.volmit.iris.generator.legacy.nms.v1X;
|
package com.volmit.iris.nms.v1X;
|
||||||
|
|
||||||
import com.volmit.iris.generator.legacy.atomics.AtomicCache;
|
import com.volmit.iris.generator.legacy.atomics.AtomicCache;
|
||||||
import com.volmit.iris.generator.legacy.nms.INMSBinding;
|
import com.volmit.iris.nms.INMSBinding;
|
||||||
import com.volmit.iris.generator.legacy.nms.INMSCreator;
|
import com.volmit.iris.nms.INMSCreator;
|
||||||
|
|
||||||
public class NMSBinding1X implements INMSBinding
|
public class NMSBinding1X implements INMSBinding
|
||||||
{
|
{
|
@ -1,9 +1,9 @@
|
|||||||
package com.volmit.iris.generator.legacy.nms.v1X;
|
package com.volmit.iris.nms.v1X;
|
||||||
|
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
import org.bukkit.WorldCreator;
|
import org.bukkit.WorldCreator;
|
||||||
|
|
||||||
import com.volmit.iris.generator.legacy.nms.INMSCreator;
|
import com.volmit.iris.nms.INMSCreator;
|
||||||
|
|
||||||
class NMSCreator1X implements INMSCreator
|
class NMSCreator1X implements INMSCreator
|
||||||
{
|
{
|
@ -93,6 +93,11 @@ public class IrisBiome extends IrisRegistrant implements IRare
|
|||||||
@Desc("The raw derivative of this biome. This is required or the terrain will not properly generate. Use any vanilla biome type. Look in examples/biome-list.txt")
|
@Desc("The raw derivative of this biome. This is required or the terrain will not properly generate. Use any vanilla biome type. Look in examples/biome-list.txt")
|
||||||
private Biome derivative = Biome.THE_VOID;
|
private Biome derivative = Biome.THE_VOID;
|
||||||
|
|
||||||
|
@Required
|
||||||
|
@DontObfuscate
|
||||||
|
@Desc("Override the derivative when vanilla places structures to this derivative. This is useful for example if you have an ocean biome, but you have set the derivative to desert to get a brown-ish color. To prevent desert structures from spawning on top of your ocean, you can set your vanillaDerivative to ocean, to allow for vanilla structures. Not defining this value will simply select the derivative.")
|
||||||
|
private Biome vanillaDerivative = null;
|
||||||
|
|
||||||
@ArrayType(min = 1, type = Biome.class)
|
@ArrayType(min = 1, type = Biome.class)
|
||||||
@DontObfuscate
|
@DontObfuscate
|
||||||
@Desc("You can instead specify multiple biome derivatives to randomly scatter colors in this biome")
|
@Desc("You can instead specify multiple biome derivatives to randomly scatter colors in this biome")
|
||||||
@ -185,6 +190,11 @@ public class IrisBiome extends IrisRegistrant implements IRare
|
|||||||
private final transient AtomicCache<KList<CNG>> layerHeightGenerators = new AtomicCache<>();
|
private final transient AtomicCache<KList<CNG>> layerHeightGenerators = new AtomicCache<>();
|
||||||
private final transient AtomicCache<KList<CNG>> layerSeaHeightGenerators = new AtomicCache<>();
|
private final transient AtomicCache<KList<CNG>> layerSeaHeightGenerators = new AtomicCache<>();
|
||||||
|
|
||||||
|
public Biome getVanillaDerivative()
|
||||||
|
{
|
||||||
|
return vanillaDerivative == null ? derivative : vanillaDerivative;
|
||||||
|
}
|
||||||
|
|
||||||
public double getGenLinkMax(String loadKey)
|
public double getGenLinkMax(String loadKey)
|
||||||
{
|
{
|
||||||
Integer v = genCacheMax.aquire(() ->
|
Integer v = genCacheMax.aquire(() ->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user