Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-10 05:20:04 +01:00
Added light level to the query tool.
Dieser Commit ist enthalten in:
Ursprung
3ffd67e7f3
Commit
3ada3a9774
@ -80,6 +80,14 @@ public abstract class LocalWorld {
|
||||
*/
|
||||
public abstract int getBlockData(Vector pt);
|
||||
|
||||
/**
|
||||
* Get block light level.
|
||||
*
|
||||
* @param pt
|
||||
* @return
|
||||
*/
|
||||
public abstract int getBlockLightLevel(Vector pt);
|
||||
|
||||
/**
|
||||
* Regenerate an area.
|
||||
*
|
||||
|
@ -113,6 +113,17 @@ public class BukkitWorld extends LocalWorld {
|
||||
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.
|
||||
*
|
||||
|
@ -37,10 +37,10 @@ public class QueryTool implements BlockTool {
|
||||
BaseBlock block = (new EditSession(world, 0)).rawGetBlock(clicked);
|
||||
|
||||
player.print("\u00A79@" + clicked + ": " + "\u00A7e"
|
||||
+ "Type: " + block.getType() + "\u00A77" + " ("
|
||||
+ "#" + block.getType() + "\u00A77" + " ("
|
||||
+ BlockType.fromID(block.getType()).getName() + ") "
|
||||
+ "\u00A7f"
|
||||
+ "[" + block.getData() + "]");
|
||||
+ "[" + block.getData() + "]" + " (" + world.getBlockLightLevel(clicked) + "/" + world.getBlockLightLevel(clicked.add(0, 1, 0)) + ")");
|
||||
|
||||
if (block instanceof MobSpawnerBlock) {
|
||||
player.printRaw("\u00A7e" + "Mob Type: "
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren