From d1925201ef316224432056c7cd511d191ebfb791 Mon Sep 17 00:00:00 2001 From: Daniel Mills Date: Tue, 7 Jan 2020 08:26:39 -0500 Subject: [PATCH] Ye --- .../java/ninja/bytecode/iris/CommandIris.java | 2 +- src/main/java/ninja/bytecode/iris/Iris.java | 3 ++ .../java/ninja/bytecode/iris/Settings.java | 2 +- .../iris/generator/IrisGenerator.java | 5 +++ .../ninja/bytecode/iris/spec/IrisBiome.java | 42 ------------------- src/main/resources/pack/biomes/forest.json | 8 ++++ .../resources/pack/biomes/forest_birch.json | 8 ++++ .../pack/biomes/forest_birch_hills.json | 8 ++++ .../resources/pack/biomes/forest_dark.json | 8 ++++ .../resources/pack/biomes/forest_haunted.json | 23 ++++++++++ .../resources/pack/biomes/forest_hills.json | 8 ++++ .../pack/biomes/forest_mountains.json | 8 ++++ .../resources/pack/biomes/ice_mountains.json | 4 ++ .../resources/pack/biomes/ice_plains.json | 4 ++ src/main/resources/pack/biomes/mountains.json | 7 ++++ .../pack/biomes/mushroom_island.json | 7 ++++ .../resources/pack/biomes/redwood_forest.json | 13 ++++++ .../pack/biomes/redwood_forest_hills.json | 13 ++++++ src/main/resources/pack/biomes/taiga.json | 7 ++++ .../resources/pack/biomes/taiga_cold.json | 7 ++++ .../pack/biomes/taiga_cold_hills.json | 7 ++++ .../resources/pack/dimensions/overworld.json | 18 +++++++- 22 files changed, 167 insertions(+), 45 deletions(-) create mode 100644 src/main/resources/pack/biomes/forest.json create mode 100644 src/main/resources/pack/biomes/forest_birch.json create mode 100644 src/main/resources/pack/biomes/forest_birch_hills.json create mode 100644 src/main/resources/pack/biomes/forest_dark.json create mode 100644 src/main/resources/pack/biomes/forest_haunted.json create mode 100644 src/main/resources/pack/biomes/forest_hills.json create mode 100644 src/main/resources/pack/biomes/forest_mountains.json create mode 100644 src/main/resources/pack/biomes/ice_mountains.json create mode 100644 src/main/resources/pack/biomes/ice_plains.json create mode 100644 src/main/resources/pack/biomes/mountains.json create mode 100644 src/main/resources/pack/biomes/mushroom_island.json create mode 100644 src/main/resources/pack/biomes/redwood_forest.json create mode 100644 src/main/resources/pack/biomes/redwood_forest_hills.json create mode 100644 src/main/resources/pack/biomes/taiga.json create mode 100644 src/main/resources/pack/biomes/taiga_cold.json create mode 100644 src/main/resources/pack/biomes/taiga_cold_hills.json diff --git a/src/main/java/ninja/bytecode/iris/CommandIris.java b/src/main/java/ninja/bytecode/iris/CommandIris.java index c1e6908b1..fc4113eed 100644 --- a/src/main/java/ninja/bytecode/iris/CommandIris.java +++ b/src/main/java/ninja/bytecode/iris/CommandIris.java @@ -45,7 +45,7 @@ public class CommandIris implements CommandExecutor { IrisGenerator g = (IrisGenerator) w.getGenerator(); IrisBiome b = null; - for(IrisBiome i : IrisBiome.getBiomes()) + for(IrisBiome i : g.getLoadedBiomes()) { if(args[1].toLowerCase().equals(i.getName().toLowerCase().replaceAll("\\Q \\E", "_"))) { diff --git a/src/main/java/ninja/bytecode/iris/Iris.java b/src/main/java/ninja/bytecode/iris/Iris.java index e36317c46..d38dec12d 100644 --- a/src/main/java/ninja/bytecode/iris/Iris.java +++ b/src/main/java/ninja/bytecode/iris/Iris.java @@ -9,8 +9,10 @@ import org.bukkit.Bukkit; import org.bukkit.Chunk; import org.bukkit.GameMode; import org.bukkit.Location; +import org.bukkit.Material; import org.bukkit.World; import org.bukkit.WorldCreator; +import org.bukkit.block.Biome; import org.bukkit.entity.Player; import org.bukkit.event.HandlerList; import org.bukkit.event.Listener; @@ -188,6 +190,7 @@ public class Iris extends JavaPlugin implements Listener public static InputStream loadResource(String string) { + L.v("Loading Resource: " + "Iris.jar/" + string); return Iris.class.getResourceAsStream("/" + string); } } diff --git a/src/main/java/ninja/bytecode/iris/Settings.java b/src/main/java/ninja/bytecode/iris/Settings.java index 4d1df5cce..44305d2b9 100644 --- a/src/main/java/ninja/bytecode/iris/Settings.java +++ b/src/main/java/ninja/bytecode/iris/Settings.java @@ -19,7 +19,7 @@ public class Settings { public double horizontalZoom = 1; // 0.525 public double heightFracture = 155; - public double landScale = 0.125; + public double landScale = 0.205; public double landChance = 0.529; public double roughness = 1.333; public double heightMultiplier = 0.806; diff --git a/src/main/java/ninja/bytecode/iris/generator/IrisGenerator.java b/src/main/java/ninja/bytecode/iris/generator/IrisGenerator.java index d6bb4f4b8..b8f2b6773 100644 --- a/src/main/java/ninja/bytecode/iris/generator/IrisGenerator.java +++ b/src/main/java/ninja/bytecode/iris/generator/IrisGenerator.java @@ -83,6 +83,11 @@ public class IrisGenerator extends ParallelChunkGenerator this(Iris.dimensions.get("overworld")); } + public GList getLoadedBiomes() + { + return IrisBiome.getAllBiomes().copy().add(dim.getBiomes()); + } + public IrisGenerator(IrisDimension dim) { this.dim = dim; diff --git a/src/main/java/ninja/bytecode/iris/spec/IrisBiome.java b/src/main/java/ninja/bytecode/iris/spec/IrisBiome.java index ab19bea1f..bf7e56024 100644 --- a/src/main/java/ninja/bytecode/iris/spec/IrisBiome.java +++ b/src/main/java/ninja/bytecode/iris/spec/IrisBiome.java @@ -54,48 +54,6 @@ public class IrisBiome .surface(MB.of(Material.SAND), MB.of(Material.CLAY), MB.of(Material.GRAVEL)) .simplexSurface(); -// public static final IrisBiome FOREST = new IrisBiome("Forest", Biome.FOREST) -// .scatter(MB.of(Material.LONG_GRASS, 1), 0.23) -// .scatter(MB.of(Material.LONG_GRASS, 2), 0.13); -// public static final IrisBiome FOREST_HILLS = new IrisBiome("Forest Hills", Biome.FOREST_HILLS) -// .scatter(MB.of(Material.LONG_GRASS, 1), 0.23) -// .scatter(MB.of(Material.LONG_GRASS, 2), 0.13); -// public static final IrisBiome FOREST_MOUNTAINS = new IrisBiome("Forest Mountains", Biome.MUTATED_EXTREME_HILLS_WITH_TREES) -// .scatter(MB.of(Material.LONG_GRASS, 1), 0.13) -// .scatter(MB.of(Material.LONG_GRASS, 2), 0.13); -// public static final IrisBiome HAUNTED_FOREST = new IrisBiome("Haunted Forest", Biome.MUTATED_SWAMPLAND) -// .scatter(MB.of(Material.LONG_GRASS, 1), 0.13) -// .scatter(MB.of(Material.LONG_GRASS, 2), 0.13) -// .surface(MB.of(Material.GRASS), MB.of(Material.GRASS), MB.of(Material.GRASS), MB.of(Material.GRASS), MB.of(Material.SOUL_SAND), MB.of(Material.DIRT), MB.of(Material.DIRT, 1), MB.of(Material.DIRT, 2)) -// .scatterSurface(); -// public static final IrisBiome BIRCH_FOREST = new IrisBiome("Birch Forest", Biome.BIRCH_FOREST) -// .scatter(MB.of(Material.LONG_GRASS, 1), 0.23) -// .scatter(MB.of(Material.LONG_GRASS, 2), 0.13); -// public static final IrisBiome BIRCH_FOREST_HILLS = new IrisBiome("Birch Forest Hills", Biome.BIRCH_FOREST_HILLS) -// .scatter(MB.of(Material.LONG_GRASS, 1), 0.23) -// .scatter(MB.of(Material.LONG_GRASS, 2), 0.13); -// public static final IrisBiome ROOFED_FOREST = new IrisBiome("Roofed Forest", Biome.ROOFED_FOREST) -// .scatter(MB.of(Material.LONG_GRASS, 1), 0.23) -// .scatter(MB.of(Material.LONG_GRASS, 2), 0.13); -// public static final IrisBiome TAIGA = new IrisBiome("Taiga", Biome.TAIGA) -// .scatter(MB.of(Material.LONG_GRASS, 2), 0.07); -// public static final IrisBiome EXTREME_HILLS = new IrisBiome("Extreme Hills", Biome.EXTREME_HILLS) -// .scatter(MB.of(Material.LONG_GRASS, 2), 0.04) -// .height(0.28); -// public static final IrisBiome EXTREME_HILLS_TREES = new IrisBiome("Extreme Hills +", Biome.EXTREME_HILLS_WITH_TREES) -// .scatter(MB.of(Material.LONG_GRASS, 2), 0.09); -// public static final IrisBiome TAIGA_COLD = new IrisBiome("Taiga Cold", Biome.TAIGA_COLD) -// .scatter(MB.of(Material.LONG_GRASS, 2), 0.04); -// public static final IrisBiome TAIGA_COLD_HILLS = new IrisBiome("Taiga Cold Hills", Biome.TAIGA_COLD_HILLS); -// public static final IrisBiome ICE_FLATS = new IrisBiome("Ice Flats", Biome.ICE_FLATS); -// public static final IrisBiome ICE_MOUNTAINS = new IrisBiome("Ice Mountains", Biome.ICE_MOUNTAINS); -// public static final IrisBiome REDWOOD_TAIGA = new IrisBiome("Redwood Taiga", Biome.REDWOOD_TAIGA) -// .surface(MB.of(Material.DIRT, 2), MB.of(Material.DIRT, 1)) -// .simplexSurface(); -// public static final IrisBiome REDWOOD_TAIGA_HILLS = new IrisBiome("Redwood Taiga Hills", Biome.REDWOOD_TAIGA_HILLS) -// .surface(MB.of(Material.DIRT, 2), MB.of(Material.DIRT, 1)) -// .simplexSurface(); - //@done private static final GMap map = build(); private String name; diff --git a/src/main/resources/pack/biomes/forest.json b/src/main/resources/pack/biomes/forest.json new file mode 100644 index 000000000..2e25b6d10 --- /dev/null +++ b/src/main/resources/pack/biomes/forest.json @@ -0,0 +1,8 @@ +{ + "name": "Forest", + "derivative": "FOREST", + "scatter":[ + "LONG_GRASS:1=0.23", + "LONG_GRASS:2=0.13" + ] +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/forest_birch.json b/src/main/resources/pack/biomes/forest_birch.json new file mode 100644 index 000000000..2788fab64 --- /dev/null +++ b/src/main/resources/pack/biomes/forest_birch.json @@ -0,0 +1,8 @@ +{ + "name": "Birch Forest", + "derivative": "BIRCH_FOREST", + "scatter":[ + "LONG_GRASS:1=0.23", + "LONG_GRASS:2=0.13" + ] +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/forest_birch_hills.json b/src/main/resources/pack/biomes/forest_birch_hills.json new file mode 100644 index 000000000..5ef39593a --- /dev/null +++ b/src/main/resources/pack/biomes/forest_birch_hills.json @@ -0,0 +1,8 @@ +{ + "name": "Birch Forest Hills", + "derivative": "BIRCH_FOREST_HILLS", + "scatter":[ + "LONG_GRASS:1=0.23", + "LONG_GRASS:2=0.13" + ] +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/forest_dark.json b/src/main/resources/pack/biomes/forest_dark.json new file mode 100644 index 000000000..9a4b7e098 --- /dev/null +++ b/src/main/resources/pack/biomes/forest_dark.json @@ -0,0 +1,8 @@ +{ + "name": "Dark Forest", + "derivative": "ROOFED_FOREST", + "scatter":[ + "LONG_GRASS:1=0.23", + "LONG_GRASS:2=0.13" + ] +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/forest_haunted.json b/src/main/resources/pack/biomes/forest_haunted.json new file mode 100644 index 000000000..d37cc6aa4 --- /dev/null +++ b/src/main/resources/pack/biomes/forest_haunted.json @@ -0,0 +1,23 @@ +{ + "name": "Haunted Forest", + "derivative": "MUTATED_SWAMPLAND", + "surface": [ + "GRASS", + "GRASS", + "GRASS", + "GRASS", + "SOUL_SAND", + "DIRT", + "DIRT:1", + "DIRT:2" + ], + "dirt": [ + "DIRT", + "DIRT:1", + "SOUL_SAND" + ], + "scatter":[ + "LONG_GRASS:1=0.13" + ], + "surfaceType": "simplex" +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/forest_hills.json b/src/main/resources/pack/biomes/forest_hills.json new file mode 100644 index 000000000..401a252a8 --- /dev/null +++ b/src/main/resources/pack/biomes/forest_hills.json @@ -0,0 +1,8 @@ +{ + "name": "Forest Hills", + "derivative": "FOREST_HILLS", + "scatter":[ + "LONG_GRASS:1=0.23", + "LONG_GRASS:2=0.13" + ] +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/forest_mountains.json b/src/main/resources/pack/biomes/forest_mountains.json new file mode 100644 index 000000000..a7ce258bf --- /dev/null +++ b/src/main/resources/pack/biomes/forest_mountains.json @@ -0,0 +1,8 @@ +{ + "name": "Forest Mountains", + "derivative": "MUTATED_EXTREME_HILLS_WITH_TREES", + "scatter":[ + "LONG_GRASS:1=0.13", + "LONG_GRASS:2=0.13" + ] +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/ice_mountains.json b/src/main/resources/pack/biomes/ice_mountains.json new file mode 100644 index 000000000..c60ebc8b1 --- /dev/null +++ b/src/main/resources/pack/biomes/ice_mountains.json @@ -0,0 +1,4 @@ +{ + "name": "Ice Mountains", + "derivative": "ICE_MOUNTAINS" +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/ice_plains.json b/src/main/resources/pack/biomes/ice_plains.json new file mode 100644 index 000000000..5078d7416 --- /dev/null +++ b/src/main/resources/pack/biomes/ice_plains.json @@ -0,0 +1,4 @@ +{ + "name": "Ice Plains", + "derivative": "ICE_FLATS" +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/mountains.json b/src/main/resources/pack/biomes/mountains.json new file mode 100644 index 000000000..8e55b074f --- /dev/null +++ b/src/main/resources/pack/biomes/mountains.json @@ -0,0 +1,7 @@ +{ + "name": "Mountains", + "derivative": "EXTREME_HILLS", + "scatter":[ + "LONG_GRASS:2=0.04" + ] +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/mushroom_island.json b/src/main/resources/pack/biomes/mushroom_island.json new file mode 100644 index 000000000..bdccc5a14 --- /dev/null +++ b/src/main/resources/pack/biomes/mushroom_island.json @@ -0,0 +1,7 @@ +{ + "name": "Mushroom Island", + "derivative": "MUSHROOM_ISLAND", + "surface": [ + "MYCEL" + ] +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/redwood_forest.json b/src/main/resources/pack/biomes/redwood_forest.json new file mode 100644 index 000000000..b5351e76a --- /dev/null +++ b/src/main/resources/pack/biomes/redwood_forest.json @@ -0,0 +1,13 @@ +{ + "name": "Redwood Forest", + "derivative": "REDWOOD_TAIGA", + "surface": [ + "DIRT", + "DIRT:1", + "DIRT:2" + ], + "surfaceType": "simplex", + "scatter": [ + "LONG_GRASS:2=0.07" + ] +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/redwood_forest_hills.json b/src/main/resources/pack/biomes/redwood_forest_hills.json new file mode 100644 index 000000000..b5351e76a --- /dev/null +++ b/src/main/resources/pack/biomes/redwood_forest_hills.json @@ -0,0 +1,13 @@ +{ + "name": "Redwood Forest", + "derivative": "REDWOOD_TAIGA", + "surface": [ + "DIRT", + "DIRT:1", + "DIRT:2" + ], + "surfaceType": "simplex", + "scatter": [ + "LONG_GRASS:2=0.07" + ] +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/taiga.json b/src/main/resources/pack/biomes/taiga.json new file mode 100644 index 000000000..34ebfcd1d --- /dev/null +++ b/src/main/resources/pack/biomes/taiga.json @@ -0,0 +1,7 @@ +{ + "name": "Taiga", + "derivative": "TAIGA", + "scatter":[ + "LONG_GRASS:2=0.07" + ] +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/taiga_cold.json b/src/main/resources/pack/biomes/taiga_cold.json new file mode 100644 index 000000000..7244b286f --- /dev/null +++ b/src/main/resources/pack/biomes/taiga_cold.json @@ -0,0 +1,7 @@ +{ + "name": "Cold Taiga", + "derivative": "TAIGA_COLD", + "scatter":[ + "LONG_GRASS:2=0.04" + ] +} \ No newline at end of file diff --git a/src/main/resources/pack/biomes/taiga_cold_hills.json b/src/main/resources/pack/biomes/taiga_cold_hills.json new file mode 100644 index 000000000..7244b286f --- /dev/null +++ b/src/main/resources/pack/biomes/taiga_cold_hills.json @@ -0,0 +1,7 @@ +{ + "name": "Cold Taiga", + "derivative": "TAIGA_COLD", + "scatter":[ + "LONG_GRASS:2=0.04" + ] +} \ No newline at end of file diff --git a/src/main/resources/pack/dimensions/overworld.json b/src/main/resources/pack/dimensions/overworld.json index 940f8d138..048200ca5 100644 --- a/src/main/resources/pack/dimensions/overworld.json +++ b/src/main/resources/pack/dimensions/overworld.json @@ -11,6 +11,22 @@ "jungle", "jungle_hills", "swamp", - "plains" + "plains", + "forest", + "forest_hills", + "forest_mountains", + "forest_haunted", + "forest_birch", + "forest_birch_hills", + "forest_dark", + "taiga", + "taiga_cold", + "taiga_cold_hills", + "mountains", + "ice_plains", + "ice_mountains", + "redwood_forest", + "redwood_forest_hills", + "mushroom_island" ] } \ No newline at end of file