From bf37c06de4b3e9c0383e3750df54196decbde83d Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 13 May 2018 01:52:38 +0200 Subject: [PATCH] Add inner nodeboxes for banner nodes --- mods/ITEMS/mcl_banners/init.lua | 24 +++++++++++++++--- .../textures/mcl_banners_fallback_wood.png | Bin 0 -> 127 bytes tools/Conversion_Table.csv | 1 + 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100644 mods/ITEMS/mcl_banners/textures/mcl_banners_fallback_wood.png diff --git a/mods/ITEMS/mcl_banners/init.lua b/mods/ITEMS/mcl_banners/init.lua index 699063262..610f8b711 100644 --- a/mods/ITEMS/mcl_banners/init.lua +++ b/mods/ITEMS/mcl_banners/init.lua @@ -117,10 +117,20 @@ minetest.register_node("mcl_banners:standing_banner", { is_ground_content = false, paramtype = "light", sunlight_propagates = true, - drawtype = "airlike", + drawtype = "nodebox", + -- Nodebox is drawn as fallback when the entity is missing, so that the + -- banner node is never truly invisible. + -- If the entity is drawn, the nodebox disappears within the real banner mesh. + node_box = { + type = "fixed", + fixed = { -1/32, -0.49, -1/32, 1/32, 1.49, 1/32 }, + }, + -- This texture is based on the banner base texture + tiles = { "mcl_banners_fallback_wood.png" }, + inventory_image = "mcl_banners_item_base.png", wield_image = "mcl_banners_item_base.png", - tiles = { "blank.png" }, + selection_box = {type = "fixed", fixed= {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} }, groups = {axey=1,handy=1, attached_node = 1, not_in_creative_inventory = 1, not_in_craft_guide = 1, material_wood=1 }, stack_max = 16, @@ -139,10 +149,16 @@ minetest.register_node("mcl_banners:hanging_banner", { paramtype = "light", paramtype2 = "wallmounted", sunlight_propagates = true, - drawtype = "airlike", + drawtype = "nodebox", inventory_image = "mcl_banners_item_base.png", wield_image = "mcl_banners_item_base.png", - tiles = { "blank.png" }, + tiles = { "mcl_banners_fallback_wood.png" }, + node_box = { + type = "wallmounted", + wall_side = { -0.49, 0.41, -0.49, -0.41, 0.49, 0.49 }, + wall_top = { -0.49, 0.41, -0.49, -0.41, 0.49, 0.49 }, + wall_bottom = { -0.49, -0.49, -0.49, -0.41, -0.41, 0.49 }, + }, selection_box = {type = "wallmounted", wall_side = {-0.5, -0.5, -0.5, -4/16, 0.5, 0.5} }, groups = {axey=1,handy=1, attached_node = 1, not_in_creative_inventory = 1, not_in_craft_guide = 1, material_wood=1 }, stack_max = 16, diff --git a/mods/ITEMS/mcl_banners/textures/mcl_banners_fallback_wood.png b/mods/ITEMS/mcl_banners/textures/mcl_banners_fallback_wood.png new file mode 100644 index 0000000000000000000000000000000000000000..4960f4fc5da0d35df99e9df7e208514b858589ce GIT binary patch literal 127 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!93?!50ihlx9oB=)|u94pMDPbOY34vw||GonS z4Lw~PLn;`PQ<4)B5=xi_Cp#Qbve+o#qQfebP0l+XkK1I-`Y literal 0 HcmV?d00001 diff --git a/tools/Conversion_Table.csv b/tools/Conversion_Table.csv index 15b330759..44bdc62ba 100644 --- a/tools/Conversion_Table.csv +++ b/tools/Conversion_Table.csv @@ -871,6 +871,7 @@ Source path,Source file,Target path,Target file,xs,ys,xl,yl,xt,yt,Blacklisted? /assets/minecraft/textures/entity,sign.png,/mods/ITEMS/mcl_signs/textures,mcl_signs_sign.png,,,,,,, /assets/minecraft/textures/entity,banner_base.png,/mods/ITEMS/mcl_banners/textures,mcl_banners_banner_base.png,,,,,,, /assets/minecraft/textures/entity/banner,base.png,/mods/ITEMS/mcl_banners/textures,mcl_banners_base.png,,,,,,, +/assets/minecraft/textures/blocks,planks_oak.png,/mods/ITEMS/mcl_banners/textures,mcl_banners_fallback_wood.png,,,,,,, /assets/minecraft/textures/items,banner_base.png,/mods/ITEMS/mcl_banners/textures,mcl_banners_item_base.png,,,,,,, /assets/minecraft/textures/items,banner_overlay.png,/mods/ITEMS/mcl_banners/textures,mcl_banners_item_overlay.png,,,,,,, /assets/minecraft/textures/blocks,portal.png,/mods/ITEMS/mcl_portals/textures,mcl_portals_portal.png,,,,,,,