tcr/java/src/game/item/ItemInfoWand.java

26 lines
849 B
Java
Executable file

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));
player.connection.addHotbar(TextColor.NEON + "* Position bei Level %d: %.3f %.3f %.3f, %s [%d], %.2f °C", world.dimension.getDimensionId(),
vec.xCoord, vec.yCoord, vec.zCoord,
biome.display, biome.id, world.getTemperatureC(new BlockPos(vec)));
}
public int getRange(ItemStack stack, EntityNPC player) {
return 250;
}
}