Make items on ground have a shadow.

There are 4 different states for things in the world:
- Regular node in world
- Item stack on ground
- Item entity (falling)
- Falling node entity

The entity states are not interactable at all, and regular node
doesn't rotate.  We can help differentiate node-in-air vs
node-stack-on-ground with a shadow visual.

Sometimes a node will get stuck as an entity inside another node's
negative space (e.g. a nodebox) and having a way to tell that it's
not a real one should maybe help.
This commit is contained in:
Aaron Suen 2019-01-06 18:46:00 -05:00
parent 714e2d40ac
commit 45441071ab
8 changed files with 13 additions and 7 deletions

View File

@ -15,8 +15,7 @@ ROADMAP (SHORT-TERM)
- Pick can break stone into cobble, then loose cobble.
- Shovel can dig solid dirt as-is.
- Stone tech.
- Dig up stone, ore using pick.
- Converts to loose cobble / loose ore (hand-diggable, falling)
- Dig up ore using pick.
- Tin, copper, iron.
- Combine loose cobble onto staffs to form stone tools
- Level 3

View File

@ -1,6 +1,6 @@
-- LUALOCALS < ---------------------------------------------------------
local minetest, nodecore, pairs, type
= minetest, nodecore, pairs, type
= minetest, nodecore, pairs, type
-- LUALOCALS > ---------------------------------------------------------
--[[

View File

@ -17,8 +17,15 @@ local function invdef(pos)
end
minetest.register_node(modname .. ":stack", {
drawtype = "airlike",
tiles = { "nc_items_matte.png" },
drawtype = "nodebox",
node_box = nodecore.fixedbox(
{-0.5, -0.5, -0.5, 0.5, -7/16, 0.5}
),
use_texture_alpha = true,
tiles = {
"nc_items_shadow.png",
"nc_items_blank.png",
},
walkable = true,
selection_box = stackbox,
collision_box = stackbox,

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

View File

@ -1,6 +1,6 @@
-- LUALOCALS < ---------------------------------------------------------
local ipairs, minetest, pairs
= ipairs, minetest, pairs
= ipairs, minetest, pairs
-- LUALOCALS > ---------------------------------------------------------
local modname = minetest.get_current_modname()

View File

@ -1,6 +1,6 @@
-- LUALOCALS < ---------------------------------------------------------
local ItemStack, minetest, nodecore
= ItemStack, minetest, nodecore
= ItemStack, minetest, nodecore
-- LUALOCALS > ---------------------------------------------------------
local modname = minetest.get_current_modname()