mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-04-08 00:36:19 +00:00
Probably wise to quicksave
This commit is contained in:
@@ -150,8 +150,9 @@ public class IrisObjectPlacement {
|
||||
@Desc("The loot tables to apply to these objects")
|
||||
private KList<IrisObjectLoot> loot = new KList<>();
|
||||
|
||||
@Desc("Tree growth overrides for these object placements")
|
||||
private IrisTreeOptions treeOptions = new IrisTreeOptions();
|
||||
@Desc("This objects overrides these trees when they grow...")
|
||||
@ArrayType(min = 1, type = IrisTree.class)
|
||||
private KList<IrisTree> trees = new KList<>();
|
||||
|
||||
public IrisObjectPlacement toPlacement(String... place) {
|
||||
IrisObjectPlacement p = new IrisObjectPlacement();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.volmit.iris.engine.object;
|
||||
|
||||
import com.volmit.iris.core.TreeManager;
|
||||
import com.volmit.iris.engine.object.annotations.*;
|
||||
import com.volmit.iris.util.collection.KList;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -18,11 +17,17 @@ public class IrisTree {
|
||||
|
||||
@Required
|
||||
@Desc("The types of trees overwritten by this object")
|
||||
@ArrayType(min = 1, type = IrisTreeType.class)
|
||||
private KList<IrisTreeType> treeTypes;
|
||||
@ArrayType(min = 1, type = TreeType.class)
|
||||
private KList<TreeType> treeTypes;
|
||||
|
||||
@Desc("If enabled, overrides any TreeType")
|
||||
private boolean anyTree = false;
|
||||
|
||||
@Required
|
||||
@Desc("The size of the square of saplings this applies to (2 means a 2 * 2 sapling area)")
|
||||
@ArrayType(min = 1, type = IrisTreeSize.class)
|
||||
private KList<IrisTreeSize> sizes = new KList<>();
|
||||
|
||||
@Desc("If enabled, overrides trees of any size")
|
||||
private boolean anySize;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
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.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Desc("Tree replace options for this object placer")
|
||||
@Data
|
||||
public class IrisTreeOptions {
|
||||
|
||||
@Desc("Toggles this object placer's tree overrides")
|
||||
private boolean enabled = false;
|
||||
|
||||
@Desc("Tree overrides affected by these object placements")
|
||||
@ArrayType(min = 1, type = IrisTree.class)
|
||||
private KList<IrisTree> trees = new KList<>();
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
package com.volmit.iris.engine.object;
|
||||
|
||||
import com.volmit.iris.engine.object.annotations.Desc;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.bukkit.TreeType;
|
||||
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
@Desc("Tree Types")
|
||||
public enum IrisTreeType {
|
||||
|
||||
@Desc("Oak tree (BIG_TREE, TREE)")
|
||||
OAK,
|
||||
|
||||
@Desc("Spruce tree (MEGA_REDWOOD, REDWOOD, SWAMP, TALL_REDWOOD)")
|
||||
SPRUCE,
|
||||
|
||||
@Desc("Birch tree (BIRCH, TALL_BIRCH)")
|
||||
BIRCH,
|
||||
|
||||
@Desc("Jungle tree (JUNGLE, SMALL_JUNGLE)")
|
||||
JUNGLE,
|
||||
|
||||
@Desc("Big red mushroom; short and fat")
|
||||
RED_MUSHROOM,
|
||||
|
||||
@Desc("Big brown mushroom; tall and umbrella-like")
|
||||
BROWN_MUSHROOM,
|
||||
|
||||
@Desc("Acacia tree")
|
||||
ACACIA,
|
||||
|
||||
@Desc("Dark Oak tree")
|
||||
DARK_OAK,
|
||||
|
||||
@Desc("Large crimson fungus native to the nether")
|
||||
CRIMSON_FUNGUS,
|
||||
|
||||
@Desc("Large warped fungus native to the nether")
|
||||
WARPED_FUNGUS,
|
||||
|
||||
@Desc("Tree with large roots which grows above lush caves")
|
||||
AZALEA,
|
||||
|
||||
@Desc("Any tree type (all will match, including mushrooms & nether trees")
|
||||
ANY,
|
||||
|
||||
@Desc("The fallback type for all other non-supported growth events")
|
||||
NONE;
|
||||
|
||||
public static IrisTreeType fromTreeType(TreeType type){
|
||||
return switch(type){
|
||||
case BIG_TREE, TREE -> IrisTreeType.OAK;
|
||||
case MEGA_REDWOOD, REDWOOD, SWAMP, TALL_REDWOOD -> IrisTreeType.SPRUCE;
|
||||
case BIRCH, TALL_BIRCH -> IrisTreeType.BIRCH;
|
||||
case JUNGLE, SMALL_JUNGLE -> IrisTreeType.JUNGLE;
|
||||
case RED_MUSHROOM -> IrisTreeType.RED_MUSHROOM;
|
||||
case BROWN_MUSHROOM -> IrisTreeType.BROWN_MUSHROOM;
|
||||
case ACACIA -> IrisTreeType.ACACIA;
|
||||
case DARK_OAK -> IrisTreeType.DARK_OAK;
|
||||
case CRIMSON_FUNGUS -> IrisTreeType.CRIMSON_FUNGUS;
|
||||
case WARPED_FUNGUS -> IrisTreeType.WARPED_FUNGUS;
|
||||
case AZALEA -> IrisTreeType.AZALEA;
|
||||
//case COCOA_TREE, CHORUS_PLANT, JUNGLE_BUSH -> IrisSaplingType.NONE;
|
||||
default -> IrisTreeType.NONE;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user