Merge pull request 'Cocoa Pods Cleanup' (#2974) from FossFanatic/MineClone2:cocoa_pod_fixes into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2974
Reviewed-by: cora <cora@noreply.git.minetest.land>
This commit is contained in:
cora 2022-11-27 13:49:24 +00:00
commit 19dc86c951
7 changed files with 292 additions and 43 deletions

View File

@ -66,32 +66,19 @@ end
-- Cocoa definition
-- 1st stage
--[[ TODO: Use a mesh for cocoas for perfect texture compability. ]]
local crop_def = {
description = S("Premature Cocoa Pod"),
_doc_items_create_entry = true,
_doc_items_longdesc = S("Cocoa pods grow on the side of jungle trees in 3 stages."),
drawtype = "nodebox",
tiles = {
"[combine:16x16:6,1=mcl_cocoas_cocoa_stage_0.png", "[combine:16x16:6,11=mcl_cocoas_cocoa_stage_0.png",
"mcl_cocoas_cocoa_stage_0.png", "mcl_cocoas_cocoa_stage_0.png^[transformFX",
"[combine:16x16:-5,0=mcl_cocoas_cocoa_stage_0.png", "[combine:16x16:-5,0=mcl_cocoas_cocoa_stage_0.png",
},
drawtype = "mesh",
mesh = "mcl_cocoas_cocoa_stage_0.obj",
tiles = {"mcl_cocoas_cocoa_stage_0.png"},
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
paramtype = "light",
sunlight_propagates = true,
paramtype2 = "facedir",
walkable = true,
drop = "mcl_dye:brown",
node_box = {
type = "fixed",
fixed = {
{-0.125, -0.0625, 0.1875, 0.125, 0.25, 0.4375}, -- Pod
-- FIXME: This has a thickness of 0. Is this OK in Minetest?
{0, 0.25, 0.25, 0, 0.5, 0.5}, -- Stem
},
},
collision_box = {
type = "fixed",
fixed = {
@ -119,18 +106,8 @@ minetest.register_node("mcl_cocoas:cocoa_1", table.copy(crop_def))
crop_def.description = S("Medium Cocoa Pod")
crop_def._doc_items_create_entry = false
crop_def.groups.cocoa = 2
crop_def.tiles = {
"[combine:16x16:5,1=mcl_cocoas_cocoa_stage_1.png", "[combine:16x16:5,9=mcl_cocoas_cocoa_stage_1.png",
"mcl_cocoas_cocoa_stage_1.png", "mcl_cocoas_cocoa_stage_1.png^[transformFX",
"[combine:16x16:-4,0=mcl_cocoas_cocoa_stage_1.png", "[combine:16x16:-4,0=mcl_cocoas_cocoa_stage_1.png",
}
crop_def.node_box = {
type = "fixed",
fixed = {
{-0.1875, -0.1875, 0.0625, 0.1875, 0.25, 0.4375}, -- Pod
{0, 0.25, 0.25, 0, 0.5, 0.5}, -- Stem
},
}
crop_def.mesh = "mcl_cocoas_cocoa_stage_1.obj"
crop_def.tiles = {"mcl_cocoas_cocoa_stage_1.png"}
crop_def.collision_box = {
type = "fixed",
fixed = {
@ -151,20 +128,8 @@ crop_def.description = S("Mature Cocoa Pod")
crop_def._doc_items_longdesc = S("A mature cocoa pod grew on a jungle tree to its full size and it is ready to be harvested for cocoa beans. It won't grow any further.")
crop_def._doc_items_create_entry = true
crop_def.groups.cocoa = 3
crop_def.tiles = {
-- The following 2 textures were derived from the original because the size of the top/bottom is slightly different :-(
-- TODO: Find a way to *only* use the base texture
"mcl_cocoas_cocoa_top_stage_2.png", "mcl_cocoas_cocoa_top_stage_2.png^[transformFY",
"mcl_cocoas_cocoa_stage_2.png", "mcl_cocoas_cocoa_stage_2.png^[transformFX",
"[combine:16x16:-3,0=mcl_cocoas_cocoa_stage_2.png", "[combine:16x16:-3,0=mcl_cocoas_cocoa_stage_2.png",
}
crop_def.node_box = {
type = "fixed",
fixed = {
{-0.25, -0.3125, -0.0625, 0.25, 0.25, 0.4375}, -- Pod
{0, 0.25, 0.25, 0, 0.5, 0.5}, -- Stem
},
}
crop_def.mesh = "mcl_cocoas_cocoa_stage_2.obj"
crop_def.tiles = {"mcl_cocoas_cocoa_stage_2.png"}
crop_def.collision_box = {
type = "fixed",
fixed = {
@ -197,4 +162,3 @@ minetest.register_abm({
if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", "mcl_cocoas:cocoa_1", "nodes", "mcl_cocoas:cocoa_2")
end

View File

@ -0,0 +1,95 @@
# Made in Blockbench 4.5.1
mtllib Cocoa Pod 0.mtl
o cube
v 0.125 0.25 0.4375
v 0.125 0.25 0.1875
v 0.125 -0.0625 0.4375
v 0.125 -0.0625 0.1875
v -0.125 0.25 0.1875
v -0.125 0.25 0.4375
v -0.125 -0.0625 0.1875
v -0.125 -0.0625 0.4375
vt 0.6875 0.75
vt 0.9375 0.75
vt 0.9375 0.4375
vt 0.6875 0.4375
vt 0.6875 0.75
vt 0.9375 0.75
vt 0.9375 0.4375
vt 0.6875 0.4375
vt 0.6875 0.75
vt 0.9375 0.75
vt 0.9375 0.4375
vt 0.6875 0.4375
vt 0.6875 0.75
vt 0.9375 0.75
vt 0.9375 0.4375
vt 0.6875 0.4375
vt 0 1
vt 0.25 1
vt 0.25 0.75
vt 0 0.75
vt 0 1
vt 0.25 1
vt 0.25 0.75
vt 0 0.75
vn 0 0 -1
vn 1 0 0
vn 0 0 1
vn -1 0 0
vn 0 1 0
vn 0 -1 0
usemtl m_a7cd0525-4079-c203-6c53-7d43da5fa1e5
f 4/4/1 7/3/1 5/2/1 2/1/1
f 3/8/2 4/7/2 2/6/2 1/5/2
f 8/12/3 3/11/3 1/10/3 6/9/3
f 7/16/4 8/15/4 6/14/4 5/13/4
f 6/20/5 1/19/5 2/18/5 5/17/5
f 7/24/6 4/23/6 3/22/6 8/21/6
o cube
v 0 0.5 0.5
v 0 0.5 0.25
v 0 0.25 0.5
v 0 0.25 0.25
v 0 0.5 0.25
v 0 0.5 0.5
v 0 0.25 0.25
v 0 0.25 0.5
vt 0 0.25
vt 0 0.25
vt 0 0
vt 0 0
vt 0 0.25
vt 0 0
vt 0 0
vt 0 0.25
vt 0 0.25
vt 0 0.25
vt 0 0
vt 0 0
vt 0.75 1
vt 1 1
vt 1 0.75
vt 0.75 0.75
vt 0 0.25
vt 0 0.25
vt 0 0
vt 0 0
vt 0 0.25
vt 0 0.25
vt 0 0
vt 0 0
vn 0 0 -1
vn 1 0 0
vn 0 0 1
vn -1 0 0
vn 0 1 0
vn 0 -1 0
usemtl m_a7cd0525-4079-c203-6c53-7d43da5fa1e5
f 12/28/7 15/27/7 13/26/7 10/25/7
f 11/32/8 12/31/8 10/30/8 9/29/8
f 16/36/9 11/35/9 9/34/9 14/33/9
f 15/40/10 16/39/10 14/38/10 13/37/10
f 14/44/11 9/43/11 10/42/11 13/41/11
f 15/48/12 12/47/12 11/46/12 16/45/12

View File

@ -0,0 +1,95 @@
# Made in Blockbench 4.5.1
mtllib Cocoa Pod 1.mtl
o cube
v 0.1875 0.25 0.4375
v 0.1875 0.25 0.0625
v 0.1875 -0.1875 0.4375
v 0.1875 -0.1875 0.0625
v -0.1875 0.25 0.0625
v -0.1875 0.25 0.4375
v -0.1875 -0.1875 0.0625
v -0.1875 -0.1875 0.4375
vt 0.5625 0.75
vt 0.9375 0.75
vt 0.9375 0.3125
vt 0.5625 0.3125
vt 0.5625 0.75
vt 0.9375 0.75
vt 0.9375 0.3125
vt 0.5625 0.3125
vt 0.5625 0.75
vt 0.9375 0.75
vt 0.9375 0.3125
vt 0.5625 0.3125
vt 0.5625 0.75
vt 0.9375 0.75
vt 0.9375 0.3125
vt 0.5625 0.3125
vt 0 1
vt 0.375 1
vt 0.375 0.625
vt 0 0.625
vt 0 1
vt 0.375 1
vt 0.375 0.625
vt 0 0.625
vn 0 0 -1
vn 1 0 0
vn 0 0 1
vn -1 0 0
vn 0 1 0
vn 0 -1 0
usemtl m_3316e529-b95a-149b-2db3-3eee58b06c25
f 4/4/1 7/3/1 5/2/1 2/1/1
f 3/8/2 4/7/2 2/6/2 1/5/2
f 8/12/3 3/11/3 1/10/3 6/9/3
f 7/16/4 8/15/4 6/14/4 5/13/4
f 6/20/5 1/19/5 2/18/5 5/17/5
f 7/24/6 4/23/6 3/22/6 8/21/6
o cube
v 0 0.5 0.5
v 0 0.5 0.25
v 0 0.25 0.5
v 0 0.25 0.25
v 0 0.5 0.25
v 0 0.5 0.5
v 0 0.25 0.25
v 0 0.25 0.5
vt 0 0.25
vt 0 0.25
vt 0 0
vt 0 0
vt 0 0.25
vt 0 0.25
vt 0 0
vt 0 0
vt 0 0.25
vt 0 0.25
vt 0 0
vt 0 0
vt 0.75 1
vt 1 1
vt 1 0.75
vt 0.75 0.75
vt 0 0.25
vt 0 0.25
vt 0 0
vt 0 0
vt 0 0.25
vt 0 0.25
vt 0 0
vt 0 0
vn 0 0 -1
vn 1 0 0
vn 0 0 1
vn -1 0 0
vn 0 1 0
vn 0 -1 0
usemtl m_3316e529-b95a-149b-2db3-3eee58b06c25
f 12/28/7 15/27/7 13/26/7 10/25/7
f 11/32/8 12/31/8 10/30/8 9/29/8
f 16/36/9 11/35/9 9/34/9 14/33/9
f 15/40/10 16/39/10 14/38/10 13/37/10
f 14/44/11 9/43/11 10/42/11 13/41/11
f 15/48/12 12/47/12 11/46/12 16/45/12

View File

@ -0,0 +1,95 @@
# Made in Blockbench 4.5.1
mtllib Cocoa Pod 2 Fixed.mtl
o cube
v 0.25 0.25 0.4375
v 0.25 0.25 -0.0625
v 0.25 -0.3125 0.4375
v 0.25 -0.3125 -0.0625
v -0.25 0.25 -0.0625
v -0.25 0.25 0.4375
v -0.25 -0.3125 -0.0625
v -0.25 -0.3125 0.4375
vt 0.5 0.75
vt 1 0.75
vt 1 0.1875
vt 0.5 0.1875
vt 0.5 0.75
vt 1 0.75
vt 1 0.1875
vt 0.5 0.1875
vt 0.5 0.75
vt 1 0.75
vt 1 0.1875
vt 0.5 0.1875
vt 0.5 0.75
vt 1 0.75
vt 1 0.1875
vt 0.5 0.1875
vt 0 1
vt 0.5 1
vt 0.5 0.5
vt 0 0.5
vt 0 1
vt 0.5 1
vt 0.5 0.5
vt 0 0.5
vn 0 0 -1
vn 1 0 0
vn 0 0 1
vn -1 0 0
vn 0 1 0
vn 0 -1 0
usemtl m_9809ffe0-030e-1955-c510-8df6b242b4e2
f 4/4/1 7/3/1 5/2/1 2/1/1
f 3/8/2 4/7/2 2/6/2 1/5/2
f 8/12/3 3/11/3 1/10/3 6/9/3
f 7/16/4 8/15/4 6/14/4 5/13/4
f 6/20/5 1/19/5 2/18/5 5/17/5
f 7/24/6 4/23/6 3/22/6 8/21/6
o cube
v 0 0.5 0.5
v 0 0.5 0.25
v 0 0.25 0.5
v 0 0.25 0.25
v 0 0.5 0.25
v 0 0.5 0.5
v 0 0.25 0.25
v 0 0.25 0.5
vt 0 0.25
vt 0 0.25
vt 0 0
vt 0 0
vt 0 0.25
vt 0 0.25
vt 0 0
vt 0 0
vt 0 0.25
vt 0 0.25
vt 0 0
vt 0 0
vt 0.75 1
vt 1 1
vt 1 0.75
vt 0.75 0.75
vt 0 0.25
vt 0 0.25
vt 0 0
vt 0 0
vt 0 0.25
vt 0 0.25
vt 0 0
vt 0 0
vn 0 0 -1
vn 1 0 0
vn 0 0 1
vn -1 0 0
vn 0 1 0
vn 0 -1 0
usemtl m_9809ffe0-030e-1955-c510-8df6b242b4e2
f 12/28/7 15/27/7 13/26/7 10/25/7
f 11/32/8 12/31/8 10/30/8 9/29/8
f 16/36/9 11/35/9 9/34/9 14/33/9
f 15/40/10 16/39/10 14/38/10 13/37/10
f 14/44/11 9/43/11 10/42/11 13/41/11
f 15/48/12 12/47/12 11/46/12 16/45/12

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 B

After

Width:  |  Height:  |  Size: 204 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 B

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 242 B