mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-12-26 10:39:07 +00:00
@@ -45,7 +45,7 @@ import java.io.File;
|
||||
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 class CommandIris implements DecreeExecutor {
|
||||
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")
|
||||
|
||||
@@ -105,6 +105,9 @@ public class IrisCreator {
|
||||
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()));
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import com.volmit.iris.util.hunk.Hunk;
|
||||
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 class IrisCeilingDecorator extends IrisEngineDecorator {
|
||||
@Override
|
||||
public void decorate(int x, int z, int realX, int realX1, int realX_1, int realZ, int realZ1, int realZ_1, Hunk<BlockData> 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 class IrisCeilingDecorator extends IrisEngineDecorator {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +199,9 @@ public class B {
|
||||
STONE_BUTTON,
|
||||
WARPED_BUTTON,
|
||||
TORCH,
|
||||
SOUL_TORCH
|
||||
SOUL_TORCH,
|
||||
GLOW_LICHEN,
|
||||
VINE
|
||||
}).forEach((i) -> b.add(i.ordinal()));
|
||||
b.addAll(foliageCache);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user