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;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.Serializable;
|
||||
import java.util.EnumSet;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.object.IrisObject;
|
||||
import com.volmit.iris.util.B;
|
||||
import com.volmit.iris.util.DontObfuscate;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.util.BlockVector;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.object.IrisObject;
|
||||
import com.volmit.iris.util.B;
|
||||
import java.io.*;
|
||||
import java.util.EnumSet;
|
||||
|
||||
@DontObfuscate
|
||||
public class StructureObject implements Serializable
|
||||
{
|
||||
@DontObfuscate
|
||||
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 ";
|
||||
|
||||
@DontObfuscate
|
||||
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)";
|
||||
|
||||
@DontObfuscate
|
||||
public static IrisObject convert(File so) throws IOException, ClassNotFoundException
|
||||
{
|
||||
FileInputStream fin = new FileInputStream(so);
|
||||
@ -72,6 +77,7 @@ public class StructureObject implements Serializable
|
||||
return iob;
|
||||
}
|
||||
|
||||
@DontObfuscate
|
||||
@SuppressWarnings("deprecation")
|
||||
private static final BlockData map(int id, int dat)
|
||||
{
|
||||
@ -93,23 +99,45 @@ public class StructureObject implements Serializable
|
||||
return null;
|
||||
}
|
||||
|
||||
@DontObfuscate
|
||||
private static final long serialVersionUID = -905274143366977303L;
|
||||
|
||||
@DontObfuscate
|
||||
public SOBlock[] blocks;
|
||||
@DontObfuscate
|
||||
public String name;
|
||||
|
||||
@DontObfuscate
|
||||
public final class SOBlock implements Serializable
|
||||
{
|
||||
@DontObfuscate
|
||||
private static final long serialVersionUID = 2610063934261982315L;
|
||||
|
||||
@DontObfuscate
|
||||
public final int x;
|
||||
|
||||
@DontObfuscate
|
||||
public final int y;
|
||||
|
||||
@DontObfuscate
|
||||
public final int z;
|
||||
|
||||
@DontObfuscate
|
||||
public final int id;
|
||||
|
||||
@DontObfuscate
|
||||
public final int data;
|
||||
|
||||
@DontObfuscate
|
||||
public String meta;
|
||||
|
||||
@DontObfuscate
|
||||
public String blockData;
|
||||
|
||||
@DontObfuscate
|
||||
final StructureObject ref;
|
||||
|
||||
@DontObfuscate
|
||||
public SOBlock(StructureObject structureObject, int x, int y, int z, String string)
|
||||
{
|
||||
this.ref = structureObject;
|
||||
|
@ -1,6 +1,6 @@
|
||||
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.command.CommandIris;
|
||||
import com.volmit.iris.manager.command.PermissionIris;
|
||||
|
@ -57,18 +57,15 @@ public class IrisComplex implements DataProvider
|
||||
{
|
||||
case CAVE:
|
||||
return caveBiomeStream;
|
||||
case DEFER:
|
||||
break;
|
||||
case LAKE:
|
||||
break;
|
||||
case LAND:
|
||||
return landBiomeStream;
|
||||
case RIVER:
|
||||
break;
|
||||
case SEA:
|
||||
return seaBiomeStream;
|
||||
case SHORE:
|
||||
return shoreBiomeStream;
|
||||
case DEFER:
|
||||
case LAKE:
|
||||
case RIVER:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -15,7 +15,6 @@ public class IrisEngineFramework implements EngineFramework {
|
||||
@Getter
|
||||
private final Engine engine;
|
||||
|
||||
|
||||
@Getter
|
||||
private final IrisComplex complex;
|
||||
|
||||
|
@ -3,7 +3,7 @@ package com.volmit.iris.manager;
|
||||
import com.google.gson.Gson;
|
||||
import com.volmit.iris.Iris;
|
||||
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.scaffold.IrisWorldCreator;
|
||||
import com.volmit.iris.scaffold.engine.IrisAccess;
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.volmit.iris.manager.command;
|
||||
|
||||
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.scaffold.IrisWorldCreator;
|
||||
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.IrisSettings;
|
||||
import com.volmit.iris.generator.legacy.nms.v1X.NMSBinding1X;
|
||||
import com.volmit.iris.nms.v1X.NMSBinding1X;
|
||||
import com.volmit.iris.util.KMap;
|
||||
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.WorldCreator;
|
@ -1,4 +1,4 @@
|
||||
package com.volmit.iris.generator.legacy.nms;
|
||||
package com.volmit.iris.nms;
|
||||
|
||||
import org.bukkit.World;
|
||||
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.nms.INMSBinding;
|
||||
import com.volmit.iris.generator.legacy.nms.INMSCreator;
|
||||
import com.volmit.iris.nms.INMSBinding;
|
||||
import com.volmit.iris.nms.INMSCreator;
|
||||
|
||||
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.WorldCreator;
|
||||
|
||||
import com.volmit.iris.generator.legacy.nms.INMSCreator;
|
||||
import com.volmit.iris.nms.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")
|
||||
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)
|
||||
@DontObfuscate
|
||||
@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>> layerSeaHeightGenerators = new AtomicCache<>();
|
||||
|
||||
public Biome getVanillaDerivative()
|
||||
{
|
||||
return vanillaDerivative == null ? derivative : vanillaDerivative;
|
||||
}
|
||||
|
||||
public double getGenLinkMax(String loadKey)
|
||||
{
|
||||
Integer v = genCacheMax.aquire(() ->
|
||||
|
Loading…
x
Reference in New Issue
Block a user