This commit is contained in:
cyberpwn
2021-08-21 21:41:37 -04:00
parent b62e542801
commit 33812b3f4a
22 changed files with 113 additions and 355 deletions

View File

@@ -193,17 +193,15 @@ public class IrisBlockData extends IrisRegistrant {
}
try {
return Integer.valueOf(string);
} catch (Throwable e) {
Iris.reportError(e);
return Integer.parseInt(string);
} catch (Throwable ignored) {
// Checks
}
try {
return Double.valueOf(string).intValue();
} catch (Throwable e) {
Iris.reportError(e);
} catch (Throwable ignored) {
// Checks
}
return string;

View File

@@ -81,13 +81,6 @@ public class IrisDimension extends IrisRegistrant {
@Desc("The human readable name of this dimension")
private String name = "A Dimension";
@Desc("You can create mutliple dimensions on top of each other taking up less height of the same world. Such as the nether with a floor + ceiling.")
@ArrayType(min = 1, type = IrisDimensionIndex.class)
private KList<IrisDimensionIndex> dimensionalComposite = new KList<>();
@Desc("Create an inverted dimension in the sky (like the nether)")
private IrisDimension sky = null;
@RegistryListResource(IrisJigsawStructure.class)
@Desc("If defined, Iris will place the given jigsaw structure where minecraft should place the overworld stronghold.")
private String stronghold;
@@ -285,12 +278,6 @@ public class IrisDimension extends IrisRegistrant {
@Desc("Change the size of regions")
private double regionZoom = 1;
@Desc("The terrain mode. NORMAL is normal... ISLANDS creates floating islands at varied heights")
private IrisTerrainMode terrainMode = IrisTerrainMode.NORMAL;
@Desc("The configuration for island mode dimensions")
private IrisTerrainIsland islandMode = new IrisTerrainIsland();
@Desc("Disable this to stop placing objects, entities, features & updates")
private boolean useMantle = true;
@@ -358,10 +345,6 @@ public class IrisDimension extends IrisRegistrant {
});
}
public boolean hasSky() {
return getSky() != null;
}
public CNG getCoordFracture(RNG rng, int signature) {
return coordFracture.aquire(() ->
{

View File

@@ -1,54 +0,0 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.engine.object.dimensional;
import com.volmit.iris.engine.object.annotations.Desc;
import com.volmit.iris.engine.object.annotations.MinNumber;
import com.volmit.iris.engine.object.annotations.RegistryListResource;
import com.volmit.iris.engine.object.annotations.Required;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@SuppressWarnings("DefaultAnnotationParam")
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@Desc("Represents an index for dimensions to take up vertical slots in the same world")
@Data
@EqualsAndHashCode(callSuper = false)
public class IrisDimensionIndex {
@Required
@Desc("The weight of this dimension. If there are 2 dimensions, if the weight is the same on both, both dimensions will take up 128 blocks of height.")
private double weight = 1D;
@Desc("If inverted is set to true, the dimension will be updide down in the world")
private boolean inverted = false;
@Desc("Only one dimension layer should be set to primary. The primary dimension layer is where players spawn, and the biomes that the vanilla structure system uses to figure out what structures to place.")
private boolean primary = false;
@Required
@RegistryListResource(IrisDimension.class)
@MinNumber(1)
@Desc("Name of dimension")
private String dimension = "";
}

View File

@@ -1,50 +0,0 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.engine.object.dimensional;
import com.volmit.iris.engine.object.annotations.Desc;
import com.volmit.iris.engine.object.annotations.MaxNumber;
import com.volmit.iris.engine.object.annotations.MinNumber;
import com.volmit.iris.engine.object.noise.IrisInterpolator;
import com.volmit.iris.engine.object.noise.IrisStyledRange;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@Desc("Translate objects")
@Data
public class IrisTerrainIsland {
@Desc("The height range")
private IrisStyledRange height = new IrisStyledRange().setMin(60).setMax(160);
@Desc("How deep the island can get")
private IrisStyledRange islandDepth = new IrisStyledRange().setMin(60).setMax(160);
@MinNumber(1)
@MaxNumber(10000)
@Desc("How often are regions islands instead of nothing?")
private double islandChance = 0.5;
@Desc("Interpolate the edges of islands")
private IrisInterpolator islandEdgeInterpolator = new IrisInterpolator();
}

View File

@@ -1,29 +0,0 @@
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
package com.volmit.iris.engine.object.dimensional;
import com.volmit.iris.engine.object.annotations.Desc;
@Desc("Terrain modes are used to decide the generator type currently used")
public enum IrisTerrainMode {
@Desc("Normal terrain, similar to the vanilla overworld")
NORMAL,
@Desc("Island terrain, more similar to the end, but endless possibilities!")
ISLANDS
}

View File

@@ -281,7 +281,7 @@ public class IrisObject extends IrisRegistrant {
this.h = din.readInt();
this.d = din.readInt();
if (!din.readUTF().equals("Iris V2 IOB;")) {
throw new IOException("Not V2 Format");
return;
}
center = new BlockVector(w / 2, h / 2, d / 2);
int s = din.readShort();