From 4a10d2f68cde6ff7a2184f54447660c0c610ec0f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 8 Mar 2024 12:27:24 +0100 Subject: [PATCH] Make trampoline a nodebox, add bottom texture --- src/nodes.lua | 19 +++++++++++++++++-- textures/xdecor_trampoline.png | Bin 174 -> 273 bytes textures/xdecor_trampoline_bottom.png | Bin 0 -> 237 bytes textures/xdecor_trampoline_sides.png | Bin 288 -> 165 bytes 4 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 textures/xdecor_trampoline_bottom.png diff --git a/src/nodes.lua b/src/nodes.lua index 2380e33..64c0e39 100644 --- a/src/nodes.lua +++ b/src/nodes.lua @@ -806,11 +806,26 @@ xdecor.register("tatami", { xdecor.register("trampoline", { description = S("Trampoline"), - tiles = {"xdecor_trampoline.png", "mailbox_blank16.png", "xdecor_trampoline_sides.png"}, + tiles = {"xdecor_trampoline.png", "xdecor_trampoline_bottom.png", "xdecor_trampoline_sides.png"}, use_texture_alpha = ALPHA_CLIP, groups = {cracky = 3, oddly_breakable_by_hand = 1, fall_damage_add_percent = -80, bouncy = 90}, is_ground_content = false, - node_box = xdecor.nodebox.slab_y(0.5), + node_box = { + type = "fixed", + fixed = { + { -0.5, -1/16, -0.5, 0.5, 0, 0.5 }, -- bouncy top + { -0.5, -0.5, -0.5, -3/16, 0, -3/16 }, -- leg 1 + { 3/16, -0.5, -0.5, 0.5, 0, -3/16 }, -- leg 2 + { -0.5, -0.5, 3/16, -3/16, 0, 0.5 }, -- leg 3 + { 3/16, -0.5, 3/16, 0.5, 0, 0.5 }, -- leg 4 + { -3/16, -5/16, -0.5, 3/16, -1/16, -7/16 }, -- connector 1 + { -0.5, -5/16, -3/16, -7/16, -1/16, 3/16 }, -- connector 2 + { -3/16, -5/16, 7/16, 3/16, -1/16, 0.5 }, -- connector 3 + { 7/16, -5/16, -3/16, 0.5, -1/16, 3/16 }, -- connector 4 + }, + }, + selection_box = xdecor.nodebox.slab_y(0.5), + collision_box = xdecor.nodebox.slab_y(0.5), sounds = default.node_sound_defaults({ footstep = { name = "xdecor_bouncy", diff --git a/textures/xdecor_trampoline.png b/textures/xdecor_trampoline.png index a8536c2185d9f452afac58d4df7548d4142cf0f0..3b6792082c86d6f4b45eb971d9d824d964080cfe 100644 GIT binary patch delta 256 zcmV+b0ssE40g(cb8Gi%-006c6H|hWY0N6=HK~yNueb6yWLSYz&;ro3P0{I-`h{w+p z3Q3a(9D=CzOb*R0?XCU3mVQ99yC_OTe?aJXo(7AS&-1Jo&vIK705sG9)EofAao`(= zXW$WMf!RIh+|uQW4#n{q74@R1C-r&IK$QlXD^sZpl?vjIqj~gifRQw2?gMnZ_t!nu$IK|{ly^nL)*9dy2fm)K)S3_(d)=j(KfcT&600000NkvXXu0mjfN_l18 literal 0 HcmV?d00001 diff --git a/textures/xdecor_trampoline_sides.png b/textures/xdecor_trampoline_sides.png index 497a86a59329a5f820cfc3cfd1ad02cfefcdf8e7..165be13b29fdd7c33babb14ab5e7888252614be2 100644 GIT binary patch delta 137 zcmV;40CxYN0;K_vB!6s4L_t(2&+X1ZN(NyJgW)Hg0m1uU)rH{Kx|sUo!XubPp>LBC z{sqy#e2PXpOG}B{TZy=gMqEna+Aa6`kCMghh*81~jxtXI5iuC*)n>%(DNC5=LpkF8 rSNV@EJGIW%n|sth^L`orQp-0wgdig;EV7XR0000UDI{xVK^NUaca7U>0PlqT!z!cP(=#Uhkf66>DvIC)TA!D3sq<~ z>D%sII;1p|lAFg}MyMc7Q|g*nI)OCIm407oyY63d6zAU+-!Dy#Oo5gc}}LTi+@S~v+%lhNPhvIse{mOg#=pw0000< KMNUMnLSTYQyLMdw