From 00ef72c6467f9862315dffd3f02636f8df0d2431 Mon Sep 17 00:00:00 2001 From: the-real-herowl Date: Sat, 14 Dec 2024 01:11:30 +0100 Subject: [PATCH] Graphical changes and preparations - added mesh - added adjusted texture - marked lines in need of attention --- .../models/mcl_fireworks_rocket.obj | 30 ++++++++++++++++++ mods/ITEMS/mcl_fireworks/register.lua | 17 +++++----- textures/mcl_fireworks_entity.png | Bin 0 -> 199 bytes 3 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 mods/ITEMS/mcl_fireworks/models/mcl_fireworks_rocket.obj create mode 100644 textures/mcl_fireworks_entity.png diff --git a/mods/ITEMS/mcl_fireworks/models/mcl_fireworks_rocket.obj b/mods/ITEMS/mcl_fireworks/models/mcl_fireworks_rocket.obj new file mode 100644 index 000000000..dbda78990 --- /dev/null +++ b/mods/ITEMS/mcl_fireworks/models/mcl_fireworks_rocket.obj @@ -0,0 +1,30 @@ +# Blender 3.6.7 +# www.blender.org +o Plane +v -0.500000 1.000000 0.500000 +v 0.500000 1.000000 0.500000 +v -0.500000 1.000000 -0.500000 +v 0.500000 1.000000 -0.500000 +v -0.300517 0.000000 0.300517 +v 0.300517 0.000000 -0.300517 +v -0.300517 1.500000 0.300517 +v 0.300517 1.500000 -0.300517 +v 0.300517 0.000000 0.300517 +v -0.300517 0.000000 -0.300517 +v 0.300517 1.500000 0.300517 +v -0.300517 1.500000 -0.300517 +vn -0.0000 1.0000 -0.0000 +vn 0.7071 -0.0000 0.7071 +vn 0.7071 -0.0000 -0.7071 +vt 0.562500 0.562500 +vt 1.000000 0.562500 +vt 1.000000 1.000000 +vt 0.562500 1.000000 +vt -0.000000 0.125000 +vt 0.437500 0.125000 +vt 0.437500 0.937500 +vt -0.000000 0.937500 +s 0 +f 1/1/1 2/2/1 4/3/1 3/4/1 +f 5/5/2 6/6/2 8/7/2 7/8/2 +f 9/5/3 10/6/3 12/7/3 11/8/3 diff --git a/mods/ITEMS/mcl_fireworks/register.lua b/mods/ITEMS/mcl_fireworks/register.lua index e8c6badc7..ec83e019f 100644 --- a/mods/ITEMS/mcl_fireworks/register.lua +++ b/mods/ITEMS/mcl_fireworks/register.lua @@ -12,10 +12,11 @@ local firework_entity = { physical = true, pointable = false, visual = "mesh", - mesh = "mcl_bows_arrow.obj", - visual_size = {x=-1, y=1}, - textures = {"mcl_fireworks_rocket.png"}, - collisionbox = {-0.19, -0.125, -0.19, 0.19, 0.125, 0.19}, + visual_size = {x=1, y=2}, -- TODO adjust + mesh = "mcl_fireworks_rocket.obj", + textures = {"mcl_fireworks_entity.png"}, + backface_culling = false, + collisionbox = {-0.19, -0.125, -0.19, 0.19, 0.125, 0.19}, -- TODO verify collide_with_objects = false, liquid_drag = true, _fire_damage_resistant = true, @@ -44,7 +45,7 @@ local firework_entity = { vl_projectile.has_tracer, function(self, dtime) - self.object:add_velocity(vector.new(0, dtime, 0)) + self.object:add_velocity(vector.new(0, dtime, 0)) -- TODO timeout end, vl_projectile.collides_with_solids, @@ -119,8 +120,8 @@ local firework_entity = { local function register_rocket(n, duration, force) def = table.copy(firework_entity) - vl_projectile.register("mcl_fireworks:rocket_" .. n, def) - minetest.register_craftitem("mcl_fireworks:rocket_" .. n, { + vl_projectile.register("mcl_fireworks:rocket_" .. n, def) -- TODO one entity + minetest.register_craftitem("mcl_fireworks:rocket_" .. n, { -- TODO one item, use metadata description = description, _tt_help = tt_help .. " " .. duration, inventory_image = "mcl_fireworks_rocket.png", @@ -138,7 +139,7 @@ local function register_rocket(n, duration, force) end, on_place = function(itemstack, user, pointed_thing) local pos = pointed_thing.above - pos.y = pos.y + 1 +-- pos.y = pos.y + 1 vl_projectile.create("mcl_fireworks:rocket_" .. n, { pos=pos, velocity=vector.new(0,1,0) diff --git a/textures/mcl_fireworks_entity.png b/textures/mcl_fireworks_entity.png new file mode 100644 index 0000000000000000000000000000000000000000..bbc17db32ad3864a2b6d4af87e1a068ddb7268f4 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd7G?$phPQVgfdsSyd_r6q6d4#87(5qF`TzgF zv6ga1OhBQWM0