2025-03-11 00:23:54 +01:00
|
|
|
package game.item;
|
|
|
|
|
|
|
|
import game.biome.Biome;
|
|
|
|
import game.color.TextColor;
|
|
|
|
import game.entity.npc.EntityNPC;
|
|
|
|
import game.world.BlockPos;
|
|
|
|
import game.world.Vec3;
|
|
|
|
import game.world.WorldServer;
|
|
|
|
|
|
|
|
public class ItemInfoWand extends ItemWand {
|
|
|
|
public ItemInfoWand() {
|
|
|
|
this.setColor(TextColor.BLUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
public void onUse(ItemStack stack, EntityNPC player, WorldServer world, Vec3 vec)
|
|
|
|
{
|
|
|
|
Biome biome = world.getBiomeGenForCoords(new BlockPos(vec.xCoord, 0, vec.zCoord));
|
2025-03-26 12:22:32 +01:00
|
|
|
player.connection.addHotbar(TextColor.NEON + "* Position bei Level %d: %.3f %.3f %.3f, %s [%d], %.2f °C", world.dimension.getDimensionId(),
|
2025-03-11 00:23:54 +01:00
|
|
|
vec.xCoord, vec.yCoord, vec.zCoord,
|
|
|
|
biome.display, biome.id, world.getTemperatureC(new BlockPos(vec)));
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getRange(ItemStack stack, EntityNPC player) {
|
|
|
|
return 250;
|
|
|
|
}
|
|
|
|
}
|