What block show more info

This commit is contained in:
Daniel Mills 2020-10-19 06:09:41 -04:00
parent 47c1b58aa5
commit 2317220666

View File

@ -5,7 +5,9 @@ import org.bukkit.block.data.BlockData;
import org.bukkit.entity.Player;
import com.volmit.iris.Iris;
import com.volmit.iris.util.B;
import com.volmit.iris.util.C;
import com.volmit.iris.util.FastBlockData;
import com.volmit.iris.util.MortarCommand;
import com.volmit.iris.util.MortarSender;
@ -27,9 +29,45 @@ public class CommandIrisWhatBlock extends MortarCommand
{
Player p = sender.player();
BlockData bd = p.getTargetBlockExact(128, FluidCollisionMode.NEVER).getBlockData();
if(bd != null) {
if(bd != null)
{
sender.sendMessage("Material: " + C.GREEN + bd.getMaterial().name());
sender.sendMessage("Full: " + C.WHITE + bd.getAsString(true));
if(B.isStorage(FastBlockData.of(bd)))
{
sender.sendMessage(C.YELLOW + "* Storage Block (Loot Capable)");
}
if(B.isLit(FastBlockData.of(bd)))
{
sender.sendMessage(C.YELLOW + "* Lit Block (Light Capable)");
}
if(B.isFoliage(FastBlockData.of(bd)))
{
sender.sendMessage(C.YELLOW + "* Foliage Block");
}
if(B.isDecorant(FastBlockData.of(bd)))
{
sender.sendMessage(C.YELLOW + "* Decorant Block");
}
if(B.isFluid(FastBlockData.of(bd)))
{
sender.sendMessage(C.YELLOW + "* Fluid Block");
}
if(B.isFoliagePlantable(FastBlockData.of(bd)))
{
sender.sendMessage(C.YELLOW + "* Plantable Foliage Block");
}
if(B.isSolid(FastBlockData.of(bd)))
{
sender.sendMessage(C.YELLOW + "* Solid Block");
}
}
}