Initial Commit
This commit is contained in:
commit
793d40cd11
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2023 ROllerozxa
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
2
README.md
Normal file
2
README.md
Normal file
@ -0,0 +1,2 @@
|
||||
# Get Biome Data
|
||||
Get the biome data available from minetest.get_biome_data() at a given node's position, using the Biome Data Wand (itemstring `get_biome_data:wand`)
|
18
init.lua
Normal file
18
init.lua
Normal file
@ -0,0 +1,18 @@
|
||||
|
||||
minetest.register_craftitem("get_biome_data:wand", {
|
||||
description = "Biome Data Wand\n(right-click to get biome data in node's position)",
|
||||
inventory_image = "get_biome_data_wand.png",
|
||||
groups = {tool = 1},
|
||||
on_place = function(itemstack, player, pointed_thing)
|
||||
local biomedata = minetest.get_biome_data(pointed_thing.under)
|
||||
|
||||
local str =
|
||||
minetest.colorize("#aaa", "Biome: ")
|
||||
.. minetest.colorize("#0f0", minetest.get_biome_name(biomedata.biome))
|
||||
.. " ( heat: " .. minetest.colorize("#f00", biomedata.heat) .. ", humidity: " .. minetest.colorize("#55f", biomedata.humidity) .. ")"
|
||||
|
||||
minetest.chat_send_player(player:get_player_name(), str)
|
||||
|
||||
return itemstack
|
||||
end,
|
||||
})
|
3
mod.conf
Normal file
3
mod.conf
Normal file
@ -0,0 +1,3 @@
|
||||
name = get_biome_data
|
||||
title = Get Biome Data
|
||||
description = Get the biome data available from minetest.get_biome_data() at a given node's position.
|
BIN
textures/get_biome_data_wand.png
Normal file
BIN
textures/get_biome_data_wand.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 124 B |
Loading…
Reference in New Issue
Block a user