mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-08 16:56:25 +00:00
everything reworked
This commit is contained in:
@@ -82,8 +82,8 @@ public class IrisBiome extends IrisRegistrant implements IRare {
|
||||
private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>();
|
||||
|
||||
@Desc("Sapling override settings")
|
||||
@ArrayType(min = 1, type = IrisSapling.class)
|
||||
private KList<IrisSapling> saplings = new KList<>();
|
||||
@ArrayType(min = 1, type = IrisTree.class)
|
||||
private KList<IrisTree> saplings = new KList<>();
|
||||
|
||||
@ArrayType(min = 1, type = IrisEffect.class)
|
||||
@Desc("Effects are ambient effects such as potion effects, random sounds, or even particles around each player. All of these effects are played via packets so two players won't see/hear each others effects.\nDue to performance reasons, effects will play arround the player even if where the effect was played is no longer in the biome the player is in.")
|
||||
|
||||
@@ -74,11 +74,7 @@ public class IrisDimension extends IrisRegistrant {
|
||||
private boolean aggressiveBiomeReshuffle = false;
|
||||
|
||||
@Desc("Sapling override settings")
|
||||
@ArrayType(min = 1, type = IrisSapling.class)
|
||||
private KList<IrisSapling> saplings = new KList<>();
|
||||
|
||||
@Desc("Enable sapling overrides")
|
||||
private boolean overrideSaplings = false;
|
||||
private IrisTreeSettings saplingSettings = new IrisTreeSettings();
|
||||
|
||||
|
||||
@Desc("Instead of a flat bottom, applies a clamp (using this noise style) to the bottom instead of a flat bottom. Useful for carving out center-dimensions in a dimension composite world.")
|
||||
|
||||
@@ -80,8 +80,8 @@ public class IrisRegion extends IrisRegistrant implements IRare {
|
||||
private KList<IrisEntityInitialSpawn> entityInitialSpawns = new KList<>();
|
||||
|
||||
@Desc("Sapling override settings")
|
||||
@ArrayType(min = 1, type = IrisSapling.class)
|
||||
private KList<IrisSapling> saplings = new KList<>();
|
||||
@ArrayType(min = 1, type = IrisTree.class)
|
||||
private KList<IrisTree> saplings = new KList<>();
|
||||
|
||||
@MinNumber(1)
|
||||
@MaxNumber(128)
|
||||
|
||||
@@ -11,23 +11,23 @@ import org.bukkit.TreeType;
|
||||
@Accessors(chain = true)
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Desc("Sapling override settings")
|
||||
@Desc("Tree replace options")
|
||||
@Data
|
||||
public class IrisSapling {
|
||||
public class IrisTree {
|
||||
|
||||
@Required
|
||||
@Desc("The types of saplings overwritten")
|
||||
@Desc("The types of trees overwritten")
|
||||
@ArrayType(min = 1, type = TreeType.class)
|
||||
private KList<TreeType> types;
|
||||
private KList<IrisTreeType> treeTypes;
|
||||
|
||||
@RegistryListObject
|
||||
@Required
|
||||
@ArrayType(min = 1, type = String.class)
|
||||
@Desc("List of objects to overwrite saplings with")
|
||||
private KList<String> replace = new KList<>();
|
||||
@Desc("List of objects to replace trees with")
|
||||
private KList<String> objects = new KList<>();
|
||||
|
||||
@Desc("The size of the square of saplings this applies to (two means a 2 by 2 sapling area)")
|
||||
@Desc("The size of the square of saplings this applies to (2 means a 2 * 2 sapling area)")
|
||||
@MinNumber(1)
|
||||
@MaxNumber(4)
|
||||
@MaxNumber(5)
|
||||
private int size = 1;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.volmit.iris.engine.object;
|
||||
|
||||
import com.volmit.iris.engine.object.annotations.Desc;
|
||||
|
||||
@Desc("Sapling override object picking options")
|
||||
public enum IrisTreeModes {
|
||||
@Desc("Check biome, then region, then dimension, pick the first one that has options")
|
||||
FIRST,
|
||||
|
||||
@Desc("Check biome, regions, and dimensions, and pick any option from the total list")
|
||||
ALL
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.volmit.iris.engine.object;
|
||||
|
||||
import com.volmit.iris.engine.object.annotations.ArrayType;
|
||||
import com.volmit.iris.engine.object.annotations.Desc;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Desc("Tree growth override settings")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
public class IrisTreeSettings {
|
||||
|
||||
@Desc("Turn replacing on and off")
|
||||
boolean enabled = false;
|
||||
|
||||
@Desc("Object picking modes")
|
||||
IrisTreeModes mode = IrisTreeModes.FIRST;
|
||||
|
||||
@Desc("Tree override list")
|
||||
@ArrayType(min = 1, type = IrisTree.class)
|
||||
private KList<IrisTree> saplings = new KList<>();
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.volmit.iris.engine.object;
|
||||
|
||||
import org.bukkit.TreeType;
|
||||
|
||||
public enum IrisTreeType {
|
||||
|
||||
/**
|
||||
* Oak tree (BIG_TREE, TREE)
|
||||
*/
|
||||
OAK,
|
||||
/**
|
||||
* Spruce tree (MEGA_REDWOOD, REDWOOD, SWAMP, TALL_REDWOOD)
|
||||
*/
|
||||
SPRUCE,
|
||||
/**
|
||||
* Birch tree (BIRCH, TALL_BIRCH)
|
||||
*/
|
||||
BIRCH,
|
||||
/**
|
||||
* Jungle tree (JUNGLE, SMALL_JUNGLE)
|
||||
*/
|
||||
JUNGLE,
|
||||
/**
|
||||
* Big red mushroom; short and fat
|
||||
*/
|
||||
RED_MUSHROOM,
|
||||
/**
|
||||
* Big brown mushroom; tall and umbrella-like
|
||||
*/
|
||||
BROWN_MUSHROOM,
|
||||
/**
|
||||
* Acacia tree
|
||||
*/
|
||||
ACACIA,
|
||||
/**
|
||||
* Dark Oak tree
|
||||
*/
|
||||
DARK_OAK,
|
||||
/**
|
||||
* Large crimson fungus native to the nether
|
||||
*/
|
||||
CRIMSON_FUNGUS,
|
||||
/**
|
||||
* Large warped fungus native to the nether
|
||||
*/
|
||||
WARPED_FUNGUS,
|
||||
/**
|
||||
* Tree with large roots which grows above lush caves
|
||||
*/
|
||||
AZALEA,
|
||||
/**
|
||||
* The fallback type for all other non-supported growth events
|
||||
*/
|
||||
NONE;
|
||||
|
||||
public static IrisTreeType fromTreeType(TreeType type){
|
||||
IrisTreeType irisType;
|
||||
switch(type){
|
||||
case BIG_TREE, TREE -> irisType = IrisTreeType.OAK;
|
||||
case MEGA_REDWOOD, REDWOOD, SWAMP, TALL_REDWOOD -> irisType = IrisTreeType.SPRUCE;
|
||||
case BIRCH, TALL_BIRCH -> irisType = IrisTreeType.BIRCH;
|
||||
case JUNGLE, SMALL_JUNGLE -> irisType = IrisTreeType.JUNGLE;
|
||||
case RED_MUSHROOM -> irisType = IrisTreeType.RED_MUSHROOM;
|
||||
case BROWN_MUSHROOM -> irisType = IrisTreeType.BROWN_MUSHROOM;
|
||||
case ACACIA -> irisType = IrisTreeType.ACACIA;
|
||||
case DARK_OAK -> irisType = IrisTreeType.DARK_OAK;
|
||||
case CRIMSON_FUNGUS -> irisType = IrisTreeType.CRIMSON_FUNGUS;
|
||||
case WARPED_FUNGUS -> irisType = IrisTreeType.WARPED_FUNGUS;
|
||||
case AZALEA -> irisType = IrisTreeType.AZALEA;
|
||||
//case COCOA_TREE, CHORUS_PLANT, JUNGLE_BUSH -> irisType = IrisSaplingType.NONE;
|
||||
default -> irisType = IrisTreeType.NONE;
|
||||
}
|
||||
return irisType;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user