From f2ed6f126eb13a660059bd4577b9e414c11d80b2 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 28 Aug 2017 14:19:46 +0200 Subject: [PATCH] =?UTF-8?q?Add=205=20=E2=80=9CMinecart=20with=20X=E2=80=9D?= =?UTF-8?q?=20entities?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Minecart with Chest * Minecart with Furnace * Minecart with TNT * Minecart with Hopper * Minecart with Command Block --- mods/ENTITIES/mcl_minecarts/depends.txt | 5 + mods/ENTITIES/mcl_minecarts/init.lua | 696 +++++++++++------- .../models/mcl_minecarts_minecart_block.b3d | Bin 0 -> 6323 bytes .../models/mcl_minecarts_minecart_chest.b3d | Bin 0 -> 7614 bytes .../models/mcl_minecarts_minecart_hopper.b3d | Bin 0 -> 10577 bytes .../textures/mcl_minecarts_minecart_chest.png | Bin 0 -> 271 bytes .../mcl_minecarts_minecart_command_block.png | Bin 0 -> 243 bytes .../mcl_minecarts_minecart_furnace.png | Bin 0 -> 271 bytes .../mcl_minecarts_minecart_hopper.png | Bin 0 -> 236 bytes .../textures/mcl_minecarts_minecart_tnt.png | Bin 0 -> 249 bytes mods/MISC/mcl_wip/depends.txt | 1 + mods/MISC/mcl_wip/init.lua | 5 + tools/Texture_Conversion_Table.csv | 5 + 13 files changed, 435 insertions(+), 277 deletions(-) create mode 100644 mods/ENTITIES/mcl_minecarts/models/mcl_minecarts_minecart_block.b3d create mode 100644 mods/ENTITIES/mcl_minecarts/models/mcl_minecarts_minecart_chest.b3d create mode 100644 mods/ENTITIES/mcl_minecarts/models/mcl_minecarts_minecart_hopper.b3d create mode 100644 mods/ENTITIES/mcl_minecarts/textures/mcl_minecarts_minecart_chest.png create mode 100644 mods/ENTITIES/mcl_minecarts/textures/mcl_minecarts_minecart_command_block.png create mode 100644 mods/ENTITIES/mcl_minecarts/textures/mcl_minecarts_minecart_furnace.png create mode 100644 mods/ENTITIES/mcl_minecarts/textures/mcl_minecarts_minecart_hopper.png create mode 100644 mods/ENTITIES/mcl_minecarts/textures/mcl_minecarts_minecart_tnt.png diff --git a/mods/ENTITIES/mcl_minecarts/depends.txt b/mods/ENTITIES/mcl_minecarts/depends.txt index 5774b1e5..13828b3c 100644 --- a/mods/ENTITIES/mcl_minecarts/depends.txt +++ b/mods/ENTITIES/mcl_minecarts/depends.txt @@ -2,5 +2,10 @@ mcl_core mcl_sounds mcl_player mcl_achievements +mcl_chests +mcl_furnaces +mesecons_commandblock +mcl_hoppers +mcl_tnt mesecons? doc_identifier? diff --git a/mods/ENTITIES/mcl_minecarts/init.lua b/mods/ENTITIES/mcl_minecarts/init.lua index 6766e843..f20935ae 100644 --- a/mods/ENTITIES/mcl_minecarts/init.lua +++ b/mods/ENTITIES/mcl_minecarts/init.lua @@ -13,312 +13,422 @@ end dofile(mcl_minecarts.modpath.."/functions.lua") dofile(mcl_minecarts.modpath.."/rails.lua") -mcl_minecarts.cart = { - physical = false, - collisionbox = {-10/16., -0.5, -10/16, 10/16, 0.25, 10/16}, - visual = "mesh", - mesh = "mcl_minecarts_minecart.b3d", - visual_size = {x=1, y=1}, - textures = {"mcl_minecarts_minecart.png"}, - - _driver = nil, - _punched = false, -- used to re-send _velocity and position - _velocity = {x=0, y=0, z=0}, -- only used on punch - _start_pos = nil, -- Used to calculate distance for “On A Rail” achievement - _old_dir = {x=0, y=0, z=0}, - _old_pos = nil, - _old_switch = 0, - _railtype = nil, -} -function mcl_minecarts.cart:on_rightclick(clicker) - if not clicker or not clicker:is_player() then - return - end - local player_name = clicker:get_player_name() - if self._driver and player_name == self._driver then - self._driver = nil - self._start_pos = nil - clicker:set_detach() - elseif not self._driver then - self._driver = player_name - self._start_pos = self.object:getpos() - mcl_player.player_attached[player_name] = true - clicker:set_attach(self.object, "", {x=0, y=3, z=0}, {x=0, y=0, z=0}) - end -end +local function register_entity(entity_id, mesh, textures, drop) + local cart = { + physical = false, + collisionbox = {-10/16., -0.5, -10/16, 10/16, 0.25, 10/16}, + visual = "mesh", + mesh = mesh, + visual_size = {x=1, y=1}, + textures = textures, -function mcl_minecarts.cart:on_activate(staticdata, dtime_s) - self.object:set_armor_groups({immortal=1}) -end + _driver = nil, + _punched = false, -- used to re-send _velocity and position + _velocity = {x=0, y=0, z=0}, -- only used on punch + _start_pos = nil, -- Used to calculate distance for “On A Rail” achievement + _old_dir = {x=0, y=0, z=0}, + _old_pos = nil, + _old_switch = 0, + _railtype = nil, + } -function mcl_minecarts.cart:on_punch(puncher, time_from_last_punch, tool_capabilities, direction) - local pos = self.object:getpos() - if not self._railtype then - local node = minetest.get_node(vector_floor(pos)).name - self._railtype = minetest.get_item_group(node, "connect_to_raillike") + function cart:on_rightclick(clicker) + if not clicker or not clicker:is_player() then + return + end + local player_name = clicker:get_player_name() + if self._driver and player_name == self._driver then + self._driver = nil + self._start_pos = nil + clicker:set_detach() + elseif not self._driver then + self._driver = player_name + self._start_pos = self.object:getpos() + mcl_player.player_attached[player_name] = true + clicker:set_attach(self.object, "", {x=0, y=3, z=0}, {x=0, y=0, z=0}) + end end - - if not puncher or not puncher:is_player() then - local cart_dir = mcl_minecarts:get_rail_direction(pos, {x=1, y=0, z=0}, nil, nil, self._railtype) + + function cart:on_activate(staticdata, dtime_s) + self.object:set_armor_groups({immortal=1}) + end + + function cart:on_punch(puncher, time_from_last_punch, tool_capabilities, direction) + local pos = self.object:getpos() + if not self._railtype then + local node = minetest.get_node(vector_floor(pos)).name + self._railtype = minetest.get_item_group(node, "connect_to_raillike") + end + + if not puncher or not puncher:is_player() then + local cart_dir = mcl_minecarts:get_rail_direction(pos, {x=1, y=0, z=0}, nil, nil, self._railtype) + if vector.equals(cart_dir, {x=0, y=0, z=0}) then + return + end + self._velocity = vector.multiply(cart_dir, 3) + self._old_pos = nil + self._punched = true + return + end + + if puncher:get_player_control().sneak then + if self._driver then + if self._old_pos then + self.object:setpos(self._old_pos) + end + mcl_player.player_attached[self._driver] = nil + local player = minetest.get_player_by_name(self._driver) + if player then + player:set_detach() + end + end + + if not minetest.settings:get_bool("creative_mode") then + for d=1, #drop do + minetest.add_item(self.object:getpos(), drop[d]) + end + end + self.object:remove() + return + end + + local vel = self.object:getvelocity() + if puncher:get_player_name() == self._driver then + if math.abs(vel.x + vel.z) > 7 then + return + end + end + + local punch_dir = mcl_minecarts:velocity_to_dir(puncher:get_look_dir()) + punch_dir.y = 0 + local cart_dir = mcl_minecarts:get_rail_direction(pos, punch_dir, nil, nil, self._railtype) if vector.equals(cart_dir, {x=0, y=0, z=0}) then return end - self._velocity = vector.multiply(cart_dir, 3) + + time_from_last_punch = math.min(time_from_last_punch, tool_capabilities.full_punch_interval) + local f = 3 * (time_from_last_punch / tool_capabilities.full_punch_interval) + + self._velocity = vector.multiply(cart_dir, f) self._old_pos = nil self._punched = true - return end - if puncher:get_player_control().sneak then + function cart:on_step(dtime) + local vel = self.object:getvelocity() + local update = {} + if self._punched then + vel = vector.add(vel, self._velocity) + self.object:setvelocity(vel) + self._old_dir.y = 0 + elseif vector.equals(vel, {x=0, y=0, z=0}) then + return + end + + local dir, last_switch = nil, nil + local pos = self.object:getpos() + if self._old_pos and not self._punched then + local flo_pos = vector_floor(pos) + local flo_old = vector_floor(self._old_pos) + if vector.equals(flo_pos, flo_old) then + return + end + end + + local ctrl, player = nil, nil if self._driver then - if self._old_pos then - self.object:setpos(self._old_pos) - end - mcl_player.player_attached[self._driver] = nil - local player = minetest.get_player_by_name(self._driver) + player = minetest.get_player_by_name(self._driver) if player then - player:set_detach() + ctrl = player:get_player_control() end end - - if not minetest.settings:get_bool("creative_mode") then - minetest.add_item(self.object:getpos(), "mcl_minecarts:minecart") - end - self.object:remove() - return - end - - local vel = self.object:getvelocity() - if puncher:get_player_name() == self._driver then - if math.abs(vel.x + vel.z) > 7 then - return - end - end - - local punch_dir = mcl_minecarts:velocity_to_dir(puncher:get_look_dir()) - punch_dir.y = 0 - local cart_dir = mcl_minecarts:get_rail_direction(pos, punch_dir, nil, nil, self._railtype) - if vector.equals(cart_dir, {x=0, y=0, z=0}) then - return - end - - time_from_last_punch = math.min(time_from_last_punch, tool_capabilities.full_punch_interval) - local f = 3 * (time_from_last_punch / tool_capabilities.full_punch_interval) - - self._velocity = vector.multiply(cart_dir, f) - self._old_pos = nil - self._punched = true -end - -function mcl_minecarts.cart:on_step(dtime) - local vel = self.object:getvelocity() - local update = {} - if self._punched then - vel = vector.add(vel, self._velocity) - self.object:setvelocity(vel) - self._old_dir.y = 0 - elseif vector.equals(vel, {x=0, y=0, z=0}) then - return - end - - local dir, last_switch = nil, nil - local pos = self.object:getpos() - if self._old_pos and not self._punched then - local flo_pos = vector_floor(pos) - local flo_old = vector_floor(self._old_pos) - if vector.equals(flo_pos, flo_old) then - return - end - end - - local ctrl, player = nil, nil - if self._driver then - player = minetest.get_player_by_name(self._driver) - if player then - ctrl = player:get_player_control() - end - end - if self._old_pos then - local diff = vector.subtract(self._old_pos, pos) - for _,v in ipairs({"x","y","z"}) do - if math.abs(diff[v]) > 1.1 then - local expected_pos = vector.add(self._old_pos, self._old_dir) - dir, last_switch = mcl_minecarts:get_rail_direction(pos, self._old_dir, ctrl, self._old_switch, self._railtype) - if vector.equals(dir, {x=0, y=0, z=0}) then - dir = false - pos = vector.new(expected_pos) - update.pos = true + if self._old_pos then + local diff = vector.subtract(self._old_pos, pos) + for _,v in ipairs({"x","y","z"}) do + if math.abs(diff[v]) > 1.1 then + local expected_pos = vector.add(self._old_pos, self._old_dir) + dir, last_switch = mcl_minecarts:get_rail_direction(pos, self._old_dir, ctrl, self._old_switch, self._railtype) + if vector.equals(dir, {x=0, y=0, z=0}) then + dir = false + pos = vector.new(expected_pos) + update.pos = true + end + break end - break end end - end - - if vel.y == 0 then - for _,v in ipairs({"x", "z"}) do - if vel[v] ~= 0 and math.abs(vel[v]) < 0.9 then - vel[v] = 0 + + if vel.y == 0 then + for _,v in ipairs({"x", "z"}) do + if vel[v] ~= 0 and math.abs(vel[v]) < 0.9 then + vel[v] = 0 + update.vel = true + end + end + end + + local cart_dir = mcl_minecarts:velocity_to_dir(vel) + local max_vel = mcl_minecarts.speed_max + if not dir then + dir, last_switch = mcl_minecarts:get_rail_direction(pos, cart_dir, ctrl, self._old_switch, self._railtype) + end + + local new_acc = {x=0, y=0, z=0} + if vector.equals(dir, {x=0, y=0, z=0}) then + vel = {x=0, y=0, z=0} + update.vel = true + else + -- If the direction changed + if dir.x ~= 0 and self._old_dir.z ~= 0 then + vel.x = dir.x * math.abs(vel.z) + vel.z = 0 + pos.z = math.floor(pos.z + 0.5) + update.pos = true + end + if dir.z ~= 0 and self._old_dir.x ~= 0 then + vel.z = dir.z * math.abs(vel.x) + vel.x = 0 + pos.x = math.floor(pos.x + 0.5) + update.pos = true + end + -- Up, down? + if dir.y ~= self._old_dir.y then + vel.y = dir.y * math.abs(vel.x + vel.z) + pos = vector.round(pos) + update.pos = true + end + + -- Slow down or speed up + local acc = dir.y * -1.8 + + local speed_mod = tonumber(minetest.get_meta(pos):get_string("cart_acceleration")) + if speed_mod and speed_mod ~= 0 then + if speed_mod > 0 then + for _,v in ipairs({"x","y","z"}) do + if math.abs(vel[v]) >= max_vel then + speed_mod = 0 + break + end + end + end + acc = acc + (speed_mod * 8) + else + acc = acc - 0.4 + end + + new_acc = vector.multiply(dir, acc) + end + + self.object:setacceleration(new_acc) + self._old_pos = vector.new(pos) + self._old_dir = vector.new(dir) + self._old_switch = last_switch + + -- Limits + for _,v in ipairs({"x","y","z"}) do + if math.abs(vel[v]) > max_vel then + vel[v] = mcl_minecarts:get_sign(vel[v]) * max_vel update.vel = true end end + + -- Give achievement when player reached a distance of 1000 nodes from the start position + if self._driver and (vector.distance(self._start_pos, pos) >= 1000) then + awards.unlock(self._driver, "mcl:onARail") + end + + if update.pos or self._punched then + local yaw = 0 + if dir.x < 0 then + yaw = 0.5 + elseif dir.x > 0 then + yaw = 1.5 + elseif dir.z < 0 then + yaw = 1 + end + self.object:setyaw(yaw * math.pi) + end + + if self._punched then + self._punched = false + end + + if not (update.vel or update.pos) then + return + end + + + local anim = {x=0, y=0} + if dir.y == -1 then + anim = {x=1, y=1} + elseif dir.y == 1 then + anim = {x=2, y=2} + end + self.object:set_animation(anim, 1, 0) + + self.object:setvelocity(vel) + if update.pos then + self.object:setpos(pos) + end + update = nil end - - local cart_dir = mcl_minecarts:velocity_to_dir(vel) - local max_vel = mcl_minecarts.speed_max - if not dir then - dir, last_switch = mcl_minecarts:get_rail_direction(pos, cart_dir, ctrl, self._old_switch, self._railtype) - end - - local new_acc = {x=0, y=0, z=0} - if vector.equals(dir, {x=0, y=0, z=0}) then - vel = {x=0, y=0, z=0} - update.vel = true - else - -- If the direction changed - if dir.x ~= 0 and self._old_dir.z ~= 0 then - vel.x = dir.x * math.abs(vel.z) - vel.z = 0 - pos.z = math.floor(pos.z + 0.5) - update.pos = true - end - if dir.z ~= 0 and self._old_dir.x ~= 0 then - vel.z = dir.z * math.abs(vel.x) - vel.x = 0 - pos.x = math.floor(pos.x + 0.5) - update.pos = true - end - -- Up, down? - if dir.y ~= self._old_dir.y then - vel.y = dir.y * math.abs(vel.x + vel.z) - pos = vector.round(pos) - update.pos = true - end - - -- Slow down or speed up.. - local acc = dir.y * -1.8 - - local speed_mod = tonumber(minetest.get_meta(pos):get_string("cart_acceleration")) - if speed_mod and speed_mod ~= 0 then - if speed_mod > 0 then - for _,v in ipairs({"x","y","z"}) do - if math.abs(vel[v]) >= max_vel then - speed_mod = 0 - break - end + + minetest.register_entity(entity_id, cart) +end + +register_entity("mcl_minecarts:minecart", + "mcl_minecarts_minecart.b3d", + {"mcl_minecarts_minecart.png"}, + {"mcl_minecarts:minecart"}) +register_entity("mcl_minecarts:chest_minecart", + "mcl_minecarts_minecart_chest.b3d", + { "mcl_chests_normal.png", "mcl_minecarts_minecart.png" }, + {"mcl_minecarts:minecart", "mcl_chests:chest"}) +register_entity("mcl_minecarts:furnace_minecart", + "mcl_minecarts_minecart_block.b3d", + { + "default_furnace_top.png", + "default_furnace_top.png", + "default_furnace_front.png", + "default_furnace_side.png", + "default_furnace_side.png", + "default_furnace_side.png", + "mcl_minecarts_minecart.png", + }, + {"mcl_minecarts:minecart", "mcl_furnaces:furnace"}) +register_entity("mcl_minecarts:tnt_minecart", + "mcl_minecarts_minecart_block.b3d", + { + "default_tnt_top.png", + "default_tnt_bottom.png", + "default_tnt_side.png", + "default_tnt_side.png", + "default_tnt_side.png", + "default_tnt_side.png", + "mcl_minecarts_minecart.png", + }, + {"mcl_minecarts:minecart", "mcl_tnt:tnt"}) +register_entity("mcl_minecarts:hopper_minecart", + "mcl_minecarts_minecart_hopper.b3d", + { + "mcl_hoppers_hopper_inside.png", + "mcl_minecarts_minecart.png", + "mcl_hoppers_hopper_outside.png", + "mcl_hoppers_hopper_top.png", + }, + {"mcl_minecarts:minecart", "mcl_hoppers:hopper"}) +register_entity("mcl_minecarts:command_block_minecart", + "mcl_minecarts_minecart_block.b3d", + { + "jeija_commandblock_off.png^[verticalframe:2:0", + "jeija_commandblock_off.png^[verticalframe:2:0", + "jeija_commandblock_off.png^[verticalframe:2:0", + "jeija_commandblock_off.png^[verticalframe:2:0", + "jeija_commandblock_off.png^[verticalframe:2:0", + "jeija_commandblock_off.png^[verticalframe:2:0", + "mcl_minecarts_minecart.png", + }, + {"mcl_minecarts:minecart"}) + +local register_craftitem = function(itemstring, entity_id, description, longdesc, usagehelp, icon) + local def = { + stack_max = 1, + on_place = function(itemstack, placer, pointed_thing) + if not pointed_thing.type == "node" then + return + end + + -- Call on_rightclick if the pointed node defines it + local node = minetest.get_node(pointed_thing.under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then + return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack end end - acc = acc + (speed_mod * 8) - else - acc = acc - 0.4 - end - - new_acc = vector.multiply(dir, acc) - end - - self.object:setacceleration(new_acc) - self._old_pos = vector.new(pos) - self._old_dir = vector.new(dir) - self._old_switch = last_switch - - -- Limits - for _,v in ipairs({"x","y","z"}) do - if math.abs(vel[v]) > max_vel then - vel[v] = mcl_minecarts:get_sign(vel[v]) * max_vel - update.vel = true - end - end - -- Give achievement when player reached a distance of 1000 nodes from the start position - if self._driver and (vector.distance(self._start_pos, pos) >= 1000) then - awards.unlock(self._driver, "mcl:onARail") - end - - if update.pos or self._punched then - local yaw = 0 - if dir.x < 0 then - yaw = 0.5 - elseif dir.x > 0 then - yaw = 1.5 - elseif dir.z < 0 then - yaw = 1 - end - self.object:setyaw(yaw * math.pi) - end - - if self._punched then - self._punched = false - end - - if not (update.vel or update.pos) then - return - end - - - local anim = {x=0, y=0} - if dir.y == -1 then - anim = {x=1, y=1} - elseif dir.y == 1 then - anim = {x=2, y=2} - end - self.object:set_animation(anim, 1, 0) - - self.object:setvelocity(vel) - if update.pos then - self.object:setpos(pos) - end - update = nil -end - -minetest.register_entity("mcl_minecarts:minecart", mcl_minecarts.cart) -minetest.register_craftitem("mcl_minecarts:minecart", { - description = "Minecart", - _doc_items_longdesc = "Minecarts can be used for a quick transportion on rails." .. "\n" .. - "Minecarts only ride on rails and always follow the tracks. At a T-junction with no straight way ahead, they turn left. The speed is affected by the rail type.", - _doc_items_usagehelp = "You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving." .. "\n" .. - "To obtain the minecart, punch it while holding down the sneak key.", - - inventory_image = "mcl_minecarts_minecart_normal.png", - wield_image = "mcl_minecarts_minecart_normal.png", - stack_max = 1, - on_place = function(itemstack, placer, pointed_thing) - if not pointed_thing.type == "node" then - return - end - - -- Call on_rightclick if the pointed node defines it - local node = minetest.get_node(pointed_thing.under) - if placer and not placer:get_player_control().sneak then - if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack + local railpos + if mcl_minecarts:is_rail(pointed_thing.under) then + railpos = pointed_thing.under + elseif mcl_minecarts:is_rail(pointed_thing.above) then + railpos = pointed_thing.under + else + return end - end + local cart = minetest.add_entity(railpos, entity_id) + local railtype = minetest.get_item_group(node.name, "connect_to_raillike") + local cart_dir = mcl_minecarts:get_rail_direction(railpos, {x=1, y=0, z=0}, nil, nil, railtype) + cart:setyaw(minetest.dir_to_yaw(cart_dir)) - local railpos - if mcl_minecarts:is_rail(pointed_thing.under) then - railpos = pointed_thing.under - elseif mcl_minecarts:is_rail(pointed_thing.above) then - railpos = pointed_thing.under - else - return - end - local cart = minetest.add_entity(railpos, "mcl_minecarts:minecart") - local railtype = minetest.get_item_group(node.name, "connect_to_raillike") - local cart_dir = mcl_minecarts:get_rail_direction(railpos, {x=1, y=0, z=0}, nil, nil, railtype) - cart:setyaw(minetest.dir_to_yaw(cart_dir)) - - if not minetest.settings:get_bool("creative_mode") then - itemstack:take_item() - end - return itemstack - end, - groups = { minecart = 1, transport = 1}, -}) - -if minetest.get_modpath("doc_identifier") ~= nil then - doc.sub.identifier.register_object("mcl_minecarts:minecart", "craftitems", "mcl_minecarts:minecart") + if not minetest.settings:get_bool("creative_mode") then + itemstack:take_item() + end + return itemstack + end, + groups = { minecart = 1, transport = 1}, + } + def.description = description + def._doc_items_longdec = longdesc + def._doc_items_usagehelp = usagehelp + def.inventory_image = icon + def.wield_image = icon + minetest.register_craftitem(itemstring, def) end +register_craftitem( + "mcl_minecarts:minecart", + "mcl_minecarts:minecart", + "Minecart", + "Minecarts can be used for a quick transportion on rails." .. "\n" .. + "Minecarts only ride on rails and always follow the tracks. At a T-junction with no straight way ahead, they turn left. The speed is affected by the rail type.", + + "You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving." .. "\n" .. + "To obtain the minecart, punch it while holding down the sneak key.", + "mcl_minecarts_minecart_normal.png" +) + +register_craftitem( + "mcl_minecarts:hopper_minecart", + "mcl_minecarts:hopper_minecart", + "Minecart with Hopper", + nil, nil, + "mcl_minecarts_minecart_hopper.png" +) + +register_craftitem( + "mcl_minecarts:tnt_minecart", + "mcl_minecarts:tnt_minecart", + "Minecart with TNT", + nil, nil, + "mcl_minecarts_minecart_tnt.png" +) + +register_craftitem( + "mcl_minecarts:chest_minecart", + "mcl_minecarts:chest_minecart", + "Minecart with Chest", + nil, nil, + "mcl_minecarts_minecart_chest.png" +) + +register_craftitem( + "mcl_minecarts:furnace_minecart", + "mcl_minecarts:furnace_minecart", + "Minecart with Furnace", + nil, nil, + "mcl_minecarts_minecart_furnace.png" +) + +register_craftitem( + "mcl_minecarts:command_block_minecart", + "mcl_minecarts:command_block_minecart", + "Minecart with Command Block", + nil, nil, + "mcl_minecarts_minecart_command_block.png" +) + + + minetest.register_craft({ output = "mcl_minecarts:minecart", recipe = { @@ -326,3 +436,35 @@ minetest.register_craft({ {"mcl_core:iron_ingot", "mcl_core:iron_ingot", "mcl_core:iron_ingot"}, }, }) + +minetest.register_craft({ + output = "mcl_minecarts:hopper_minecart", + recipe = { + {"mcl_hoppers:hopper"}, + {"mcl_minecarts:minecart"}, + }, +}) + +minetest.register_craft({ + output = "mcl_minecarts:chest_minecart", + recipe = { + {"mcl_chests:chest"}, + {"mcl_minecarts:minecart"}, + }, +}) + +minetest.register_craft({ + output = "mcl_minecarts:tnt_minecart", + recipe = { + {"mcl_tnt:tnt"}, + {"mcl_minecarts:minecart"}, + }, +}) + +minetest.register_craft({ + output = "mcl_minecarts:furnace_minecart", + recipe = { + {"mcl_furnaces:furnace"}, + {"mcl_minecarts:minecart"}, + }, +}) diff --git a/mods/ENTITIES/mcl_minecarts/models/mcl_minecarts_minecart_block.b3d b/mods/ENTITIES/mcl_minecarts/models/mcl_minecarts_minecart_block.b3d new file mode 100644 index 0000000000000000000000000000000000000000..211446bd4d005ac263e47f98961751f30aa836ad GIT binary patch literal 6323 zcmcIoOOq5u5Kci65f#Pvi}Af8;PUc4-LQay3X8i7imzD~7Fa-bT^98?Kfr@OVXo@M zs}aV|+zBH*_yah5(g+9v!SVYtvwC`FyL$GpcEmT8*!^J_Y4hf-TmXkBDaXh z(8!_DO=wk~y>R~2roq9@(CcY8>2D~zE=)|;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WeL%dS)2 z0`PC{L13%vlwSe11KWUCU8np8@H+4s@TTjOF>$(h-$JXK8!hD_U?;Ex*ac9h{5G%$ z*bThnI^}nPeZXGeJ=ZB80QLj#1H-OU9sxc84g#aDQ$7qF0>*$3U8nppa0K`W_{4R} zp97x(p8_@4DNg`LfpOp%K%MdlU=lbEoOGS?XtHV1HN{h@_(TxVK@K) literal 0 HcmV?d00001 diff --git a/mods/ENTITIES/mcl_minecarts/models/mcl_minecarts_minecart_chest.b3d b/mods/ENTITIES/mcl_minecarts/models/mcl_minecarts_minecart_chest.b3d new file mode 100644 index 0000000000000000000000000000000000000000..5ede1c6486fcdde0f01fa46b613c36f0f251ac11 GIT binary patch literal 7614 zcmeHLONG9?MPPj4ihv-Zh)nmgf&vN)y9)_eczh>bWijoCr!P^ zxt+Ur9Xuq1XWS^%I5+o)4ZUA|dnDys)e0?tHm)69cWSDt-8L{ZIPGdRg$9oY_AH(; za-zR?WY*HpT0K9_%m6v7oNLy}pZ@W98t^HQnUx@%KF9%lggb z$NXRM%ZIIBSElXy_gVc?2IdbZ&Mi#IZ~642G~m;mpP2Dq{Q0qr(>ArwHJnqP@&lgo zQAj2BMj_hft^pSksCeeDWecrG3T=r}7zJ(;4_Ke=2LWDgmjKJG&-TN>a^NB05$m(P z5_l9?0X$}XwwX9y9(aJW$k=DQ4_FQK0*?div;73H7FYv3X??bNBVL4{ZrrnP*UlXW z4q?c-?-uTF^F7|xR(r6BIp!Z;iq9ewyo<}F7+D$zk{A!1>$GT7GSRu#-U-VIo6n*h z#durz^PNsImj4;!!jEu1fx+PUlPf|JeS%_<*;_#-%;EnAx4hPi&-Z1Qx8! zp?{RGvT1P*-HvE_Rq(kQS*!rl- zZ#+I~Kk6QFs-+h?^O!ruNgnD);Gc7do5Tw1E4BQ~H=ww#xlzKdT8d3G-TL){7J&CR zm_xo%*Z9{`#$P$lQ+}f!uP@DCygs>p+EO>rmHZAnkzd&2oYoKdrso}b*2dWS$oPcz z2lHV+%(}Bzn6~*vi>MTrb~Xj|3&$ueT};LR}dd>zr?4&zvb{jdO?n{z{ix`~#Wxrf%{&-kpE)luy3Mf31HA6u#Sj#+R1_<}V)qs{BEJ%K6>v zkM>D?z`NuU)~C;%zR5SauR*`VK3*daTb)y0tOisK@22{c-!$ z{`mf^`m6SjxP8n|S^bi4R-SJbpXmCIpHK8JJO6NTEIuERu1J1egZ4pxq&}GGvi(*4 zkH=U2*Zr0I3(j}@!KCNA<}begYX0KqpVptohwCHrpXUeaRO>H(zH0uJ*Yy>gABZja zMm;WH?T_21_FH}n_Ak|sAj4MKe=pm=RDaw)jep#~F#bjNFXp#t_p_q>kZ*7girA<6 z3@eBPgVuPn-s>c=M$`!s&wQ=njf!zk8|@s9hS-A`Dj9Ebkl6!ksA zFRy|P!Tr?ucFF$8_0^`2EzYkv-wV#ahU_2l{f+iDdH*c652|Tv#6Pi*d_jDuzwCai z_QmgiYF}Kx$}gW^7C*`_%Ma!I`+rgWX#K_af6C_%aoQmB<^1z!Bq;DapLl<+NuBU~ z%z3|l<$f*q#BQGFYx(>t{qf(Aw9o&(DDuAvyBqcR{y|>q3vccpm;b)e{Wl&z-GBK{ zkyF^@`S68xAkY8*6#4J}Q)B}&wH{apJO!}N_9kE>@HEhGeYOXHEx=}A(E4m|1GWM~ zz%$lo`#E4c@GS7W_1S(2coBF3c-i`FzXI$4hJl>``)t1k>;hf|UbjBmdx1T`Zr}~; kv%L>^3wRTF+xl!D0Nw%i0|%|o_PfAgfd3VG&-!ft3;pxC_5c6? literal 0 HcmV?d00001 diff --git a/mods/ENTITIES/mcl_minecarts/models/mcl_minecarts_minecart_hopper.b3d b/mods/ENTITIES/mcl_minecarts/models/mcl_minecarts_minecart_hopper.b3d new file mode 100644 index 0000000000000000000000000000000000000000..b6441f0615c9b7aa05ec1bd93222e0eb9aae3d32 GIT binary patch literal 10577 zcmeHNON<>y6|LAX31I>TLm)u#B>V;w8^<4hVY=Hth=F9xj2$ou%!@-3J0u=wJca-k z)0VwJ!blb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N{8=Keoo|HVAy5ob?gb@e|Rf`dI&+{=g=m^Iz=8dDWNs(e_XF$F#nWU+Uk^pYuT1 zU!1S)xBa7jou8Fx{cC<_bp0!T=})It$p_Duk|%vWEi3ZW4|wE{_AA+cn4h-3_fPU` zdC}GTKjRnsMPNU8{vogW0Y9)lK*!rp=r`@#{5bmqs)zP%e9pe*#eTxSrv0|Qw_h3G!ZGO=D4JJGP519T>u%)99A6e%A2{RL$r?>xZ`QGB{ zsWbSl_4n+_-9OI%dh@nI_bUvx2fu5bg@*gCHHmikT?^e`;r)911H^auYS zCHxIHma?Zb`5yluUvYed$DUpD5q;h_slOBZ)6d)E=|>NL$X32RUi{>Ls3I6ggXa&DpEhqwk~oBK>kIGoZ++^*KravVr7iYf r_{&O!@6jjGZ}U{E`L;g!GUvX^kFz|GYndBtueE))CxHLO9|ZmbV;G(K literal 0 HcmV?d00001 diff --git a/mods/ENTITIES/mcl_minecarts/textures/mcl_minecarts_minecart_chest.png b/mods/ENTITIES/mcl_minecarts/textures/mcl_minecarts_minecart_chest.png new file mode 100644 index 0000000000000000000000000000000000000000..451d8092099564797a0bd2d79827dce2af8652bd GIT binary patch literal 271 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!aez;VYoLSa|NsAWbaZTOZGr4a zH}fQKYh`6+PfyR9c%Q;Bm(DCd85tQ#Ny+SlNT4#H)Q0EV9s;!smIV0$jRES01E8qv zt@somRpsg87*fIL+rysJV8FvH%ejbQ-R=MTwkYQ?O=I1y6z=61JRo~aGILFNMR#x_@sBE#C z!5NljVP2l}0|`~k0ZaBga(Ujv%wxQ4y1ad%(26uSSJ$H-&rRmxDStn2XZ7mdKI;Vst0LJc3Z2$lO literal 0 HcmV?d00001 diff --git a/mods/ENTITIES/mcl_minecarts/textures/mcl_minecarts_minecart_furnace.png b/mods/ENTITIES/mcl_minecarts/textures/mcl_minecarts_minecart_furnace.png new file mode 100644 index 0000000000000000000000000000000000000000..7beaaa1c71597592d9f8b7510eeea7f676ae9e46 GIT binary patch literal 271 zcmV+q0r38bP)>chMMgv6{CKLarT&Frv>JrLF-px;<&uBx7otpXyVY5?S%YnAPO zMI@`b$LJb!N~r-Pl61SAiGwf+rx51%=Y9YjU?%nwI^Ah*9k4he%))$y{eXbj)w+YJ z^`W9Uo(u4DFq2@^AYh(>Lt8~b%K@TODP`~Ew=U0S^G~m!F(TTpY()p7zTFA1Doy|Z002ovPDHLkV1g!ncu4>N literal 0 HcmV?d00001 diff --git a/mods/ENTITIES/mcl_minecarts/textures/mcl_minecarts_minecart_hopper.png b/mods/ENTITIES/mcl_minecarts/textures/mcl_minecarts_minecart_hopper.png new file mode 100644 index 0000000000000000000000000000000000000000..f16a007f7b4bfe91a77a9c193585dc622446f351 GIT binary patch literal 236 zcmV!=|RD|Izt)4M>O%{|_jY3~~Sjff)D>5^h}i|M%3Sj7&p!}M_g+i20B7!u@%ZAzOMTi7%2)g z4V>bUfXNOJYvwB)8^FX=d4d>yKG8j{YaqFZ+2E)^gIEKLmW~=_1q8OO@UH1v6z{%* mVtZ$_vL{*?@x=i?zi80000>WWeKEJt0r_ ziKBiz^75B#x*6V$hE=lpnm-KZgK5>^TW>-GMS(MyoXU?mB*ss_iNmYp3mu3 z-4$ubl~LWk({I7yjuf_M461G_9KogP8SeeED;4=0PG@{$QetCx%NG%4&h$$60^?GV x?nlwpJFnUN5;yo