diff --git a/mods/ENTITIES/mcl_boats/init.lua b/mods/ENTITIES/mcl_boats/init.lua index 0b2d67730..6d9f5dc5e 100644 --- a/mods/ENTITIES/mcl_boats/init.lua +++ b/mods/ENTITIES/mcl_boats/init.lua @@ -413,13 +413,21 @@ end -- Register one entity for all boat types minetest.register_entity("mcl_boats:boat", boat) -local boat_ids = { "boat", "boat_spruce", "boat_birch", "boat_jungle", "boat_acacia", "boat_dark_oak", "boat_obsidian" } -local names = { S("Oak Boat"), S("Spruce Boat"), S("Birch Boat"), S("Jungle Boat"), S("Acacia Boat"), S("Dark Oak Boat"), S("Obsidian Boat") } +local cboat = table.copy(boat) +cboat.mesh = "mcl_boats_boat_with_chest.b3d" +cboat.textures = {"mcl_boats_texture_oak_chest_boat.png", "mcl_boats_texture_oak_chest_boat.png", "mcl_boats_texture_oak_chest_boat.png", "mcl_boats_texture_oak_chest_boat.png", "mcl_boats_texture_oak_chest_boat.png"} +cboat._itemstring = "mcl_boats:chest_boat" + +minetest.register_entity("mcl_boats:chest_boat", cboat) +mcl_entity_invs.register_inv("mcl_boats:chest_boat","Boat",27) + +local boat_ids = { "boat", "boat_spruce", "boat_birch", "boat_jungle", "boat_acacia", "boat_dark_oak", "boat_obsidian", "chest_boat", "chest_boat_spruce", "chest_boat_birch", "chest_boat_jungle", "chest_boat_acacia", "chest_boat_dark_oak" } +local names = { S("Oak Boat"), S("Spruce Boat"), S("Birch Boat"), S("Jungle Boat"), S("Acacia Boat"), S("Dark Oak Boat"), S("Obsidian Boat"), S("Oak Chest Boat"), S("Spruce Chest Boat"), S("Birch Chest Boat"), S("Jungle Chest Boat"), S("Acacia Chest Boat"), S("Dark Oak Chest Boat") } local craftstuffs = {} if minetest.get_modpath("mcl_core") then - craftstuffs = { "mcl_core:wood", "mcl_core:sprucewood", "mcl_core:birchwood", "mcl_core:junglewood", "mcl_core:acaciawood", "mcl_core:darkwood", "mcl_core:obsidian" } + craftstuffs = { "mcl_core:wood", "mcl_core:sprucewood", "mcl_core:birchwood", "mcl_core:junglewood", "mcl_core:acaciawood", "mcl_core:darkwood", "mcl_core:obsidian", "mcl_core:wood", "mcl_core:sprucewood", "mcl_core:birchwood", "mcl_core:junglewood", "mcl_core:acaciawood", "mcl_core:darkwood", } end -local images = { "oak", "spruce", "birch", "jungle", "acacia", "dark_oak", "obsidian" } +local images = { "oak", "spruce", "birch", "jungle", "acacia", "dark_oak", "obsidian", "oak_chest", "spruce_chest", "birch_chest", "jungle_chest", "acacia_chest", "dark_oak_chest" } for b=1, #boat_ids do local itemstring = "mcl_boats:"..boat_ids[b] @@ -469,7 +477,11 @@ for b=1, #boat_ids do else pos = vector.add(pos, vector.multiply(dir, boat_y_offset_ground)) end - local boat = minetest.add_entity(pos, "mcl_boats:boat") + local boat_ent = "mcl_boats:boat" + if itemstring:find("chest") then + boat_ent = "mcl_boats:chest_boat" + end + local boat = minetest.add_entity(pos, boat_ent) local texture = "mcl_boats_texture_"..images[b].."_boat.png" boat:get_luaentity()._itemstring = itemstring boat:set_properties({textures = { texture, texture, texture, texture, texture }}) diff --git a/mods/ENTITIES/mcl_boats/mod.conf b/mods/ENTITIES/mcl_boats/mod.conf index 61463b6ec..fcbe3f2f6 100644 --- a/mods/ENTITIES/mcl_boats/mod.conf +++ b/mods/ENTITIES/mcl_boats/mod.conf @@ -1,7 +1,5 @@ name = mcl_boats author = PilzAdam description = Adds drivable boats. -depends = mcl_player, flowlib, mcl_title +depends = mcl_player, flowlib, mcl_title, mcl_entity_invs optional_depends = mcl_core, doc_identifier - - diff --git a/mods/ENTITIES/mcl_boats/models/boat_with_chest.blend b/mods/ENTITIES/mcl_boats/models/boat_with_chest.blend new file mode 100644 index 000000000..e0c1bb841 Binary files /dev/null and b/mods/ENTITIES/mcl_boats/models/boat_with_chest.blend differ diff --git a/mods/ENTITIES/mcl_boats/models/mcl_boats_boat_with_chest.b3d b/mods/ENTITIES/mcl_boats/models/mcl_boats_boat_with_chest.b3d new file mode 100644 index 000000000..a42aeda6d Binary files /dev/null and b/mods/ENTITIES/mcl_boats/models/mcl_boats_boat_with_chest.b3d differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_acacia_chest_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_acacia_chest_boat.png new file mode 100644 index 000000000..5fb44b766 Binary files /dev/null and b/mods/ENTITIES/mcl_boats/textures/mcl_boats_acacia_chest_boat.png differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_birch_chest_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_birch_chest_boat.png new file mode 100644 index 000000000..c5671285f Binary files /dev/null and b/mods/ENTITIES/mcl_boats/textures/mcl_boats_birch_chest_boat.png differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_dark_oak_chest_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_dark_oak_chest_boat.png new file mode 100644 index 000000000..28ab392da Binary files /dev/null and b/mods/ENTITIES/mcl_boats/textures/mcl_boats_dark_oak_chest_boat.png differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_jungle_chest_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_jungle_chest_boat.png new file mode 100644 index 000000000..304fd771d Binary files /dev/null and b/mods/ENTITIES/mcl_boats/textures/mcl_boats_jungle_chest_boat.png differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_mangrove_chest_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_mangrove_chest_boat.png new file mode 100644 index 000000000..ec2acd07f Binary files /dev/null and b/mods/ENTITIES/mcl_boats/textures/mcl_boats_mangrove_chest_boat.png differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_oak_chest_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_oak_chest_boat.png new file mode 100644 index 000000000..0c7c2e0e2 Binary files /dev/null and b/mods/ENTITIES/mcl_boats/textures/mcl_boats_oak_chest_boat.png differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_spruce_chest_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_spruce_chest_boat.png new file mode 100644 index 000000000..e7f043e56 Binary files /dev/null and b/mods/ENTITIES/mcl_boats/textures/mcl_boats_spruce_chest_boat.png differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_acacia_chest_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_acacia_chest_boat.png new file mode 100644 index 000000000..6d2dd34e0 Binary files /dev/null and b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_acacia_chest_boat.png differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_birch_chest_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_birch_chest_boat.png new file mode 100644 index 000000000..a057d122a Binary files /dev/null and b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_birch_chest_boat.png differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_dark_oak_chest_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_dark_oak_chest_boat.png new file mode 100644 index 000000000..1e14fcd4e Binary files /dev/null and b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_dark_oak_chest_boat.png differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_jungle_chest_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_jungle_chest_boat.png new file mode 100644 index 000000000..82d57eafe Binary files /dev/null and b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_jungle_chest_boat.png differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_mangrove_chest_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_mangrove_chest_boat.png new file mode 100644 index 000000000..3d1bed4cd Binary files /dev/null and b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_mangrove_chest_boat.png differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_oak_chest_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_oak_chest_boat.png new file mode 100644 index 000000000..3f2117954 Binary files /dev/null and b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_oak_chest_boat.png differ diff --git a/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_spruce_chest_boat.png b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_spruce_chest_boat.png new file mode 100644 index 000000000..b722188ee Binary files /dev/null and b/mods/ENTITIES/mcl_boats/textures/mcl_boats_texture_spruce_chest_boat.png differ