From 1082c995fea448d13b53a68e56a147cf37dc7cd3 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 16 May 2018 19:22:55 +0200 Subject: [PATCH] Rework end portal node - Add 1/16 high collisionbox on bottom - Make walkable - Disable jump --- mods/ITEMS/mcl_portals/portal_end.lua | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/mods/ITEMS/mcl_portals/portal_end.lua b/mods/ITEMS/mcl_portals/portal_end.lua index eb304586e5..8461e446c6 100644 --- a/mods/ITEMS/mcl_portals/portal_end.lua +++ b/mods/ITEMS/mcl_portals/portal_end.lua @@ -19,17 +19,22 @@ minetest.register_node("mcl_portals:portal_end", { length = 1.0, }, }, - "blank.png", - "blank.png", - "blank.png", - "blank.png", + { + name = "mcl_portals_end_portal.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 6.0, + }, + }, "blank.png", }, drawtype = "nodebox", paramtype = "light", sunlight_propagates = true, use_texture_alpha = true, - walkable = false, + walkable = true, diggable = false, pointable = false, buildable_to = false, @@ -39,13 +44,20 @@ minetest.register_node("mcl_portals:portal_end", { light_source = 14, post_effect_color = {a = 192, r = 0, g = 0, b = 0}, alpha = 192, + -- This prevents “falling through” + collision_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -7/16, 0.5}, + }, + }, node_box = { type = "fixed", fixed = { {-0.5, -0.5, -0.5, 0.5, 4/16, 0.5}, }, }, - groups = {not_in_creative_inventory = 1}, + groups = {not_in_creative_inventory = 1, disable_jump = 1 }, _mcl_hardness = -1, _mcl_blast_resistance = 18000000,