diff --git a/build.gradle b/build.gradle index c14471705..ba92ed839 100644 --- a/build.gradle +++ b/build.gradle @@ -24,7 +24,7 @@ plugins { id "de.undercouch.download" version "5.0.1" } -version '2.2.3-1.19' // Needs to be version specific +version '2.2.4-1.19' // Needs to be version specific def nmsVersion = "1.19" def apiVersion = '1.19' def spigotJarVersion = '1.19-R0.1-SNAPSHOT' diff --git a/src/main/java/com/volmit/iris/core/commands/CommandIris.java b/src/main/java/com/volmit/iris/core/commands/CommandIris.java index 382bef832..c332e34cc 100644 --- a/src/main/java/com/volmit/iris/core/commands/CommandIris.java +++ b/src/main/java/com/volmit/iris/core/commands/CommandIris.java @@ -45,7 +45,7 @@ import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; -@Decree(name = "iris", aliases = {"ir", "irs"}, description = "Basic Command") +@Decree(name = "iris", aliases = {"ir", "irs", "i"}, description = "Basic Command") public class CommandIris implements DecreeExecutor { private CommandStudio studio; private CommandPregen pregen; @@ -107,6 +107,12 @@ public void height() { sender().sendMessage(C.GREEN + "Total Height: " + (sender().player().getWorld().getMaxHeight() - sender().player().getWorld().getMinHeight())); } + @Decree(description = "QOL command to open a overworld studio world.") + public void so() { + sender().sendMessage(C.GREEN + "Opening studio for the \"Overworld\" pack (seed: 1337)"); + Iris.service(StudioSVC.class).open(sender(), 1337, "overworld"); + } + @Decree(description = "Set aura spins") public void aura( @Param(description = "The h color value", defaultValue = "-20") diff --git a/src/main/java/com/volmit/iris/core/tools/IrisCreator.java b/src/main/java/com/volmit/iris/core/tools/IrisCreator.java index 39c6fcc1a..f6d2244f2 100644 --- a/src/main/java/com/volmit/iris/core/tools/IrisCreator.java +++ b/src/main/java/com/volmit/iris/core/tools/IrisCreator.java @@ -105,6 +105,9 @@ public World create() throws IrisException { throw new IrisException("Dimension cannot be found null for id " + dimension()); } + if(sender == null) + sender = Iris.getSender(); + if(!studio()) { Iris.service(StudioSVC.class).installIntoWorld(sender, d.getLoadKey(), new File(name())); } diff --git a/src/main/java/com/volmit/iris/engine/decorator/IrisCeilingDecorator.java b/src/main/java/com/volmit/iris/engine/decorator/IrisCeilingDecorator.java index 2ae96f130..f725ee47f 100644 --- a/src/main/java/com/volmit/iris/engine/decorator/IrisCeilingDecorator.java +++ b/src/main/java/com/volmit/iris/engine/decorator/IrisCeilingDecorator.java @@ -28,6 +28,7 @@ import org.bukkit.Material; import org.bukkit.block.BlockFace; import org.bukkit.block.data.BlockData; +import org.bukkit.block.data.MultipleFacing; import org.bukkit.block.data.type.PointedDripstone; public class IrisCeilingDecorator extends IrisEngineDecorator { @@ -39,11 +40,10 @@ public IrisCeilingDecorator(Engine engine) { @Override public void decorate(int x, int z, int realX, int realX1, int realX_1, int realZ, int realZ1, int realZ_1, Hunk data, IrisBiome biome, int height, int max) { IrisDecorator decorator = getDecorator(biome, realX, realZ); - if(decorator != null) { if(!decorator.isStacking()) { if(height >= 0 || height < getEngine().getHeight()) { - data.set(x, height, z, decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData())); + data.set(x, height, z, fixFaces(decorator.getBlockData100(biome, getRng(), realX, height, realZ, getData()), realX, height, realZ)); } } else { int stack = decorator.getHeight(getRng().nextParallelRNG(Cache.key(realX, realZ)), realX, realZ, getData()); @@ -98,4 +98,25 @@ public void decorate(int x, int z, int realX, int realX1, int realX_1, int realZ } } } + + private BlockData fixFaces(BlockData b, int x, int y, int z) { + Material mat = b.getMaterial(); + if(mat == Material.VINE || mat == Material.GLOW_LICHEN) { + MultipleFacing data = (MultipleFacing)b.clone(); + boolean found = false; + for(BlockFace f : BlockFace.values()) { + if(!f.isCartesian()) + continue; + Material m = getEngine().getMantle().get(x, y, z).getMaterial(); + if(m.isSolid()) { + found = true; + data.setFace(f, m.isSolid()); + } + } + if(!found) + data.setFace(BlockFace.UP, true); + return data; + } + return b; + } } diff --git a/src/main/java/com/volmit/iris/util/data/B.java b/src/main/java/com/volmit/iris/util/data/B.java index 5b7ba27a7..fe3ab6381 100644 --- a/src/main/java/com/volmit/iris/util/data/B.java +++ b/src/main/java/com/volmit/iris/util/data/B.java @@ -199,7 +199,9 @@ private static IntSet buildDecorantCache() { STONE_BUTTON, WARPED_BUTTON, TORCH, - SOUL_TORCH + SOUL_TORCH, + GLOW_LICHEN, + VINE }).forEach((i) -> b.add(i.ordinal())); b.addAll(foliageCache); diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index f00299923..807e2a6fe 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -19,7 +19,7 @@ libraries: - bsf:bsf:2.4.0 commands: iris: - aliases: [ ir, irs ] + aliases: [ ir, irs, i ] api-version: ${apiversion} hotload-dependencies: false softdepend: [ "Oraxen", "ItemsAdder", "IrisFeller", "WorldEdit", "PlaceholderAPI"] \ No newline at end of file