initial commit
This commit is contained in:
parent
3c9ee26b06
commit
22186c33b9
1458 changed files with 282792 additions and 0 deletions
26
java/src/game/item/ItemInfoWand.java
Executable file
26
java/src/game/item/ItemInfoWand.java
Executable file
|
@ -0,0 +1,26 @@
|
|||
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.addFeed(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;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue