mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-18 18:23:06 +00:00
Move files add what patches
This commit is contained in:
parent
3a7c8d660c
commit
1fa828ad1a
@ -26,25 +26,22 @@ import com.volmit.iris.util.decree.DecreeExecutor;
|
||||
import com.volmit.iris.util.decree.DecreeOrigin;
|
||||
import com.volmit.iris.util.decree.annotations.Decree;
|
||||
import com.volmit.iris.util.decree.annotations.Param;
|
||||
import com.volmit.iris.util.exceptions.IrisException;
|
||||
import com.volmit.iris.util.format.C;
|
||||
import org.bukkit.World;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Objects;
|
||||
|
||||
@Decree(name = "irisd", aliases = {"ird"}, description = "Basic Command")
|
||||
public class DecIris implements DecreeExecutor
|
||||
{
|
||||
private DecIrisStudio studio;
|
||||
private DecStudio studio;
|
||||
|
||||
private DecIrisPregen pregen;
|
||||
private DecPregen pregen;
|
||||
|
||||
private DecIrisWhat what;
|
||||
private DecWhat what;
|
||||
|
||||
@Decree(description = "Create a new world", aliases = "+")
|
||||
public void create(
|
||||
@Param(name = "name", aliases = "worldName", description = "The name of the world to create", defaultValue = "IrisWorld")
|
||||
@Param(name = "name", aliases = "world-name", description = "The name of the world to create", defaultValue = "IrisWorld")
|
||||
String name,
|
||||
@Param(name = "type", aliases = "dimension", description = "The dimension type to create the world with", defaultValue = "overworld")
|
||||
IrisDimension type,
|
||||
|
@ -1,10 +0,0 @@
|
||||
package com.volmit.iris.core.decrees;
|
||||
|
||||
import com.volmit.iris.util.decree.DecreeExecutor;
|
||||
import com.volmit.iris.util.decree.DecreeOrigin;
|
||||
import com.volmit.iris.util.decree.annotations.Decree;
|
||||
|
||||
@Decree(name = "what", aliases = "?", description = "Get information about the world around you", origin = DecreeOrigin.PLAYER)
|
||||
public class DecIrisWhat implements DecreeExecutor {
|
||||
|
||||
}
|
@ -14,7 +14,7 @@ import org.bukkit.World;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
@Decree(name = "pregen", aliases = "pregenerate", description = "Pregenerate your Iris worlds!")
|
||||
public class DecIrisPregen implements DecreeExecutor {
|
||||
public class DecPregen implements DecreeExecutor {
|
||||
@Decree(description = "Pregenerate a world")
|
||||
public void start(
|
||||
@Param(name = "world", description = "The world to pregen", contextual = true)
|
@ -76,7 +76,7 @@ import java.util.concurrent.ExecutionException;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
@Decree(name = "studio", aliases = {"std", "s"}, description = "Studio Commands", studio = true)
|
||||
public class DecIrisStudio implements DecreeExecutor {
|
||||
public class DecStudio implements DecreeExecutor {
|
||||
@Decree(description = "Open a new studio world", aliases = "o", sync = true)
|
||||
public void open(
|
||||
@Param(name = "dimension", defaultValue = "overworld", description = "The dimension to open a studio for", aliases = "dim")
|
||||
@ -123,7 +123,7 @@ public class DecIrisStudio implements DecreeExecutor {
|
||||
@Param(name = "fix-ids", defaultValue = "true", description = "Fixes any block ids used such as \"dirt\" will be converted to \"minecraft:dirt\"")
|
||||
boolean fixIds,
|
||||
|
||||
@Param(name = "rewriteObjects", defaultValue = "false", description = "Imports all objects and re-writes them cleaning up positions & block data in the process.")
|
||||
@Param(name = "rewrite-objects", defaultValue = "false", description = "Imports all objects and re-writes them cleaning up positions & block data in the process.")
|
||||
boolean rewriteObjects
|
||||
) {
|
||||
KList<Job> jobs = new KList<>();
|
59
src/main/java/com/volmit/iris/core/decrees/DecWhat.java
Normal file
59
src/main/java/com/volmit/iris/core/decrees/DecWhat.java
Normal file
@ -0,0 +1,59 @@
|
||||
package com.volmit.iris.core.decrees;
|
||||
|
||||
import com.volmit.iris.Iris;
|
||||
import com.volmit.iris.util.data.B;
|
||||
import com.volmit.iris.util.decree.DecreeExecutor;
|
||||
import com.volmit.iris.util.decree.DecreeOrigin;
|
||||
import com.volmit.iris.util.decree.annotations.Decree;
|
||||
import com.volmit.iris.util.format.C;
|
||||
import org.bukkit.FluidCollisionMode;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
|
||||
@Decree(name = "what", aliases = "?", description = "Get information about the world around you", origin = DecreeOrigin.PLAYER)
|
||||
public class DecWhat implements DecreeExecutor {
|
||||
|
||||
@Decree(description = "Get information about the block you're looking at")
|
||||
public void block(){
|
||||
|
||||
Block b = player().getTargetBlockExact(128, FluidCollisionMode.NEVER);
|
||||
|
||||
if (b == null) {
|
||||
sender().sendMessage("Please look at any block, not at the sky");
|
||||
return;
|
||||
}
|
||||
|
||||
BlockData bd = b.getBlockData();
|
||||
|
||||
sender().sendMessage("Material: " + C.GREEN + bd.getMaterial().name());
|
||||
sender().sendMessage("Full: " + C.WHITE + bd.getAsString(true));
|
||||
|
||||
if (B.isStorage(bd)) {
|
||||
sender().sendMessage(C.YELLOW + "* Storage Block (Loot Capable)");
|
||||
}
|
||||
|
||||
if (B.isLit(bd)) {
|
||||
sender().sendMessage(C.YELLOW + "* Lit Block (Light Capable)");
|
||||
}
|
||||
|
||||
if (B.isFoliage(bd)) {
|
||||
sender().sendMessage(C.YELLOW + "* Foliage Block");
|
||||
}
|
||||
|
||||
if (B.isDecorant(bd)) {
|
||||
sender().sendMessage(C.YELLOW + "* Decorant Block");
|
||||
}
|
||||
|
||||
if (B.isFluid(bd)) {
|
||||
sender().sendMessage(C.YELLOW + "* Fluid Block");
|
||||
}
|
||||
|
||||
if (B.isFoliagePlantable(bd)) {
|
||||
sender().sendMessage(C.YELLOW + "* Plantable Foliage Block");
|
||||
}
|
||||
|
||||
if (B.isSolid(bd)) {
|
||||
sender().sendMessage(C.YELLOW + "* Solid Block");
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user