mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Added light level to the query tool.
This commit is contained in:
parent
3ffd67e7f3
commit
3ada3a9774
@ -80,6 +80,14 @@ public abstract class LocalWorld {
|
|||||||
*/
|
*/
|
||||||
public abstract int getBlockData(Vector pt);
|
public abstract int getBlockData(Vector pt);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get block light level.
|
||||||
|
*
|
||||||
|
* @param pt
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public abstract int getBlockLightLevel(Vector pt);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Regenerate an area.
|
* Regenerate an area.
|
||||||
*
|
*
|
||||||
|
@ -113,6 +113,17 @@ public class BukkitWorld extends LocalWorld {
|
|||||||
return world.getBlockAt(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()).getData();
|
return world.getBlockAt(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()).getData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get block light level.
|
||||||
|
*
|
||||||
|
* @param pt
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int getBlockLightLevel(Vector pt) {
|
||||||
|
return world.getBlockAt(pt.getBlockX(), pt.getBlockY(), pt.getBlockZ()).getLightLevel();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Regenerate an area.
|
* Regenerate an area.
|
||||||
*
|
*
|
||||||
|
@ -37,10 +37,10 @@ public class QueryTool implements BlockTool {
|
|||||||
BaseBlock block = (new EditSession(world, 0)).rawGetBlock(clicked);
|
BaseBlock block = (new EditSession(world, 0)).rawGetBlock(clicked);
|
||||||
|
|
||||||
player.print("\u00A79@" + clicked + ": " + "\u00A7e"
|
player.print("\u00A79@" + clicked + ": " + "\u00A7e"
|
||||||
+ "Type: " + block.getType() + "\u00A77" + " ("
|
+ "#" + block.getType() + "\u00A77" + " ("
|
||||||
+ BlockType.fromID(block.getType()).getName() + ") "
|
+ BlockType.fromID(block.getType()).getName() + ") "
|
||||||
+ "\u00A7f"
|
+ "\u00A7f"
|
||||||
+ "[" + block.getData() + "]");
|
+ "[" + block.getData() + "]" + " (" + world.getBlockLightLevel(clicked) + "/" + world.getBlockLightLevel(clicked.add(0, 1, 0)) + ")");
|
||||||
|
|
||||||
if (block instanceof MobSpawnerBlock) {
|
if (block instanceof MobSpawnerBlock) {
|
||||||
player.printRaw("\u00A7e" + "Mob Type: "
|
player.printRaw("\u00A7e" + "Mob Type: "
|
||||||
|
Loading…
Reference in New Issue
Block a user