diff --git a/mods/boats/README.txt b/mods/boats/README.txt new file mode 100644 index 00000000..3fa40f25 --- /dev/null +++ b/mods/boats/README.txt @@ -0,0 +1,20 @@ +Minetest 0.4 mod: boats +======================= +by PilzAdam, slightly modified for NeXt +changed by TenPlus1 to add some new features + - boat is destroyed when crashing (drops 3 wood) + - boat turns faster + - used model from ds_rowboat mod + +License of source code: +----------------------- +WTFPL + +License of media (textures and sounds): +--------------------------------------- +WTFPL + +Authors of media files: +----------------------- +textures: Zeg9 +model: thetoon and Zeg9, modified by PavelS(SokolovPavel) diff --git a/mods/boats/depends.txt b/mods/boats/depends.txt new file mode 100644 index 00000000..7c506cfb --- /dev/null +++ b/mods/boats/depends.txt @@ -0,0 +1,2 @@ +default +mobs? \ No newline at end of file diff --git a/mods/boats/models/boat.obj b/mods/boats/models/boat.obj new file mode 100644 index 00000000..0f21e47f --- /dev/null +++ b/mods/boats/models/boat.obj @@ -0,0 +1,358 @@ +# Blender v2.76 (sub 11) OBJ File: 'boat.blend' +# www.blender.org +mtllib boat.mtl +o boats_boat +v -6.786140 -3.033999 -9.415440 +v -6.786140 -1.967150 -9.415440 +v -6.786140 -1.967150 8.793510 +v -6.786140 -3.033999 8.793510 +v 5.732520 -1.967150 -9.415440 +v 5.732520 -3.033999 -9.415440 +v 5.732520 -3.033999 8.793510 +v 5.732520 -1.967150 8.793510 +v -2.233900 -3.033999 -9.415440 +v -2.233900 -1.967150 -9.415440 +v -2.233900 -1.967150 8.793510 +v -2.233900 -3.033999 8.793510 +v 2.318340 -3.033999 -9.415440 +v 2.318340 -1.967150 -9.415440 +v 2.318340 -1.967150 8.793510 +v 2.318340 -3.033999 8.793510 +v -3.371960 -3.033999 8.793510 +v -3.371960 -1.967150 8.793510 +v -3.371960 -1.967150 -9.415440 +v -3.371960 -3.033999 -9.415440 +v 2.318340 0.276645 8.793510 +v 1.180280 -1.967150 8.793510 +v 5.732520 0.276645 8.793510 +v 5.732520 1.039180 8.793510 +v 6.870580 0.276645 8.793510 +v 6.870580 -1.967150 8.793510 +v 2.318340 1.039180 8.793510 +v 1.180280 0.276645 8.793510 +v 1.180280 1.039180 8.793510 +v 1.180280 -3.033999 8.793510 +v -2.233900 0.276645 8.793510 +v -3.371960 0.276645 8.793510 +v -2.233900 1.039180 8.793510 +v -3.371960 1.039180 8.793510 +v -6.786140 0.276645 8.793510 +v -7.786200 0.276645 8.793510 +v -7.786200 -1.967150 8.793510 +v -6.786140 1.039180 8.793510 +v 1.180280 -1.967150 -9.415440 +v 1.180280 -3.033999 -9.415440 +v 2.318340 0.276645 -9.415440 +v 1.180280 0.276645 -9.415440 +v 2.318340 1.039180 -9.415440 +v 5.732520 0.276645 -9.415440 +v 6.870580 -1.967150 -9.415440 +v 5.732520 1.039180 -9.415440 +v 6.870580 0.276645 -9.415440 +v 0.042220 1.039180 -9.415440 +v 1.180280 1.039180 -9.415440 +v 0.042220 -1.967150 -9.415440 +v -1.095840 -1.967150 -9.415440 +v -2.233900 0.276645 -9.415440 +v -3.371960 0.276645 -9.415440 +v -2.233900 1.039180 -9.415440 +v -1.095840 1.039180 -9.415440 +v -3.371960 1.039180 -9.415440 +v -6.786140 0.276645 -9.415440 +v -6.786140 1.039180 -9.415440 +v -7.786200 -1.967150 -9.415440 +v -7.786200 0.276645 -9.415440 +v -1.095840 0.156645 -12.044100 +v -1.095840 -4.601110 -9.415440 +v -1.095840 1.039181 -10.802900 +v -1.095840 2.868579 -10.802900 +v -1.095840 2.868580 -7.883420 +v -1.095840 3.746069 -12.034100 +v -1.095840 3.746070 -7.883420 +v -1.095840 0.156645 -14.294900 +v -1.095840 -4.601110 -14.284900 +v 0.042220 -4.601110 -14.284900 +v 0.042220 -4.601110 -9.415440 +v 0.042220 1.039181 -10.802900 +v 0.042220 0.156645 -12.044100 +v 0.042220 2.868579 -10.802900 +v 0.042220 0.156645 -14.294900 +v 0.042220 3.746069 -12.034100 +v 0.042220 3.746070 -7.883420 +v 0.042220 2.868580 -7.883420 +v -1.096322 -3.033999 -9.415440 +v 0.044046 -3.035397 -9.415440 +vt 1.000000 0.187500 +vt -1.000000 0.312500 +vt 1.000000 0.312500 +vt 0.687500 1.000000 +vt 0.500000 0.875000 +vt 0.500000 0.625000 +vt -1.000000 0.062500 +vt 1.000000 0.062500 +vt 1.000000 -0.000000 +vt -1.000000 0.125000 +vt 1.000000 0.125000 +vt 0.437500 0.125000 +vt 0.312500 0.500000 +vt 0.312500 0.125000 +vt 1.000000 0.625000 +vt -1.000000 0.500000 +vt 1.000000 0.500000 +vt 0.187500 0.687500 +vt -0.187500 0.687500 +vt -0.187500 0.312500 +vt 1.000000 0.812500 +vt -1.000000 0.937500 +vt -1.000000 0.812500 +vt 0.812500 0.687500 +vt 1.187500 0.687500 +vt 0.812500 0.312500 +vt 1.000000 0.562500 +vt 0.312500 0.437500 +vt 1.000000 0.437500 +vt 1.000000 0.750000 +vt -1.000000 0.875000 +vt -1.000000 0.750000 +vt -1.000000 1.000000 +vt 1.000000 1.000000 +vt 0.437500 0.625000 +vt 0.562500 0.437500 +vt 0.562500 0.625000 +vt -1.000000 0.437500 +vt -1.000000 0.000000 +vt 0.500000 0.062500 +vt 0.375000 0.750000 +vt 0.500000 0.750000 +vt -1.000000 0.250000 +vt -1.000000 0.687500 +vt 1.000000 0.687500 +vt 0.625000 0.375000 +vt 1.000000 0.375000 +vt 1.000000 0.250000 +vt 1.000000 0.937500 +vt 0.437500 0.812500 +vt 0.312500 0.312500 +vt 0.312500 0.812500 +vt 0.437500 0.312500 +vt 0.437500 0.437500 +vt 0.687500 0.812500 +vt 0.000000 0.687500 +vt 0.000000 0.812500 +vt -1.000000 0.562500 +vt 0.875000 0.812500 +vt 0.875000 0.687500 +vt 0.250000 0.312500 +vt 0.562500 0.187500 +vt 0.250000 0.187500 +vt -1.000000 0.187500 +vt 0.312500 0.625000 +vt 0.312500 0.187500 +vt 0.312500 -0.187500 +vt 1.000000 -0.187500 +vt 0.687500 0.500000 +vt -0.000000 1.000000 +vt 0.000000 0.875000 +vt 0.437500 0.500000 +vt -1.000000 0.625000 +vt 0.812500 0.187500 +vt 1.187500 0.187500 +vt 1.187500 0.312500 +vt 1.312500 0.312500 +vt 1.312500 0.687500 +vt 0.687500 0.187500 +vt 0.687500 0.312500 +vt 1.187500 0.812500 +vt 0.812500 0.812500 +vt 0.187500 0.312500 +vt 0.312500 0.687500 +vt 0.687500 0.687500 +vt -0.187500 0.187500 +vt 0.187500 0.187500 +vt -0.312500 0.687500 +vt -0.312500 0.312500 +vt 0.187500 0.812500 +vt -0.187500 0.812500 +vt 0.437500 0.687500 +vt 0.437500 0.187500 +vt 0.562500 0.812500 +vt 0.562500 0.687500 +vt 0.312500 0.562500 +vt 1.000000 0.875000 +vt 0.375000 0.062500 +vt -1.000000 0.375000 +vt 0.625000 0.500000 +vt 0.875000 0.562500 +vt 0.937500 0.812500 +vt 0.937500 0.687500 +vt 0.875000 0.937500 +vt 0.562500 0.312500 +vn -1.000000 0.000000 0.000000 +vn 1.000000 0.000000 0.000000 +vn 0.000000 0.000000 1.000000 +vn 0.000000 0.000000 -1.000000 +vn 0.000000 -1.000000 0.000000 +vn 0.000000 1.000000 0.000000 +vn 0.000000 -0.002100 -1.000000 +vn 0.001200 -1.000000 0.000000 +vn 0.000000 0.002800 -1.000000 +vn -0.001200 -1.000000 0.000200 +g boats_boat_boats_boat_None +usemtl None +s off +f 41/1/1 27/2/1 43/3/1 +f 76/4/2 74/5/2 72/6/2 +f 8/7/2 6/1/2 5/8/2 +f 15/9/1 13/10/1 16/11/1 +f 51/12/3 71/13/3 50/14/3 +f 56/15/2 32/16/2 53/17/2 +f 15/18/3 8/19/3 23/20/3 +f 22/21/2 40/22/2 39/23/2 +f 19/24/4 2/25/4 53/26/4 +f 70/27/5 62/28/5 69/29/5 +f 11/30/5 19/31/5 10/32/5 +f 4/15/5 20/33/5 17/34/5 +f 72/35/3 64/36/3 63/37/3 +f 13/8/5 7/38/5 16/7/5 +f 23/39/6 47/11/6 44/9/6 +f 68/40/7 70/41/7 69/42/7 +f 80/43/8 40/10/8 30/11/8 +f 3/15/1 1/32/1 4/30/1 +f 20/44/2 18/27/2 17/45/2 +f 74/17/5 65/46/5 64/47/5 +f 31/43/1 54/47/1 52/48/1 +f 22/47/5 14/43/5 15/48/5 +f 46/1/2 23/7/2 44/8/2 +f 57/21/1 38/22/1 58/49/1 +f 61/50/9 76/51/9 73/52/9 +f 37/45/5 2/23/5 3/21/5 +f 78/28/3 67/53/3 65/54/3 +f 64/5/1 66/4/1 63/6/1 +f 76/55/6 67/56/6 77/57/6 +f 47/17/2 26/10/2 45/11/2 +f 5/16/5 26/47/5 8/17/5 +f 33/58/6 48/59/6 55/60/6 +f 29/38/2 42/3/2 49/29/2 +f 32/44/6 52/21/6 53/45/6 +f 58/15/6 34/33/6 56/34/6 +f 27/7/6 46/29/6 43/8/6 +f 73/61/6 68/62/6 61/63/6 +f 21/58/6 42/29/6 28/38/6 +f 11/29/1 9/58/1 12/27/1 +f 59/45/1 36/2/1 60/3/1 +f 60/9/6 35/10/6 57/11/6 +f 41/1/1 21/64/1 27/2/1 +f 72/6/2 48/65/2 50/66/2 +f 50/66/2 71/67/2 70/68/2 +f 70/68/2 75/17/2 73/69/2 +f 76/4/2 77/70/2 74/5/2 +f 77/70/2 78/71/2 74/5/2 +f 50/66/2 70/68/2 73/69/2 +f 73/69/2 76/4/2 72/6/2 +f 72/6/2 50/66/2 73/69/2 +f 8/7/2 7/64/2 6/1/2 +f 15/9/1 14/39/1 13/10/1 +f 51/12/3 62/72/3 71/13/3 +f 56/15/2 34/73/2 32/16/2 +f 32/26/3 34/74/3 38/75/3 +f 35/76/3 36/77/3 37/78/3 +f 32/26/3 38/75/3 35/76/3 +f 29/66/3 33/79/3 31/80/3 +f 32/26/3 35/76/3 3/25/3 +f 28/51/3 29/66/3 31/80/3 +f 31/80/3 32/26/3 18/24/3 +f 3/25/3 4/81/3 17/82/3 +f 35/76/3 37/78/3 3/25/3 +f 21/83/3 28/51/3 22/84/3 +f 3/25/3 17/82/3 18/24/3 +f 11/85/3 12/55/3 30/52/3 +f 32/26/3 3/25/3 18/24/3 +f 11/85/3 30/52/3 22/84/3 +f 31/80/3 18/24/3 11/85/3 +f 24/86/3 27/87/3 21/83/3 +f 28/51/3 31/80/3 11/85/3 +f 11/85/3 22/84/3 28/51/3 +f 24/86/3 21/83/3 23/20/3 +f 26/88/3 25/89/3 23/20/3 +f 23/20/3 21/83/3 15/18/3 +f 15/18/3 16/90/3 7/91/3 +f 21/83/3 22/84/3 15/18/3 +f 8/19/3 26/88/3 23/20/3 +f 15/18/3 7/91/3 8/19/3 +f 22/21/2 30/49/2 40/22/2 +f 47/89/4 45/88/4 5/19/4 +f 5/19/4 6/91/4 13/90/4 +f 5/19/4 13/90/4 14/18/4 +f 44/20/4 47/89/4 5/19/4 +f 43/87/4 46/86/4 44/20/4 +f 41/83/4 43/87/4 44/20/4 +f 44/20/4 5/19/4 14/18/4 +f 39/84/4 40/52/4 80/50/4 +f 44/20/4 14/18/4 41/83/4 +f 42/51/4 41/83/4 39/84/4 +f 39/84/4 80/50/4 50/92/4 +f 41/83/4 14/18/4 39/84/4 +f 48/93/4 49/66/4 42/51/4 +f 50/92/4 48/93/4 42/51/4 +f 80/50/4 79/94/4 50/92/4 +f 50/92/4 42/51/4 39/84/4 +f 54/79/4 55/62/4 52/80/4 +f 50/92/4 79/94/4 51/95/4 +f 52/80/4 55/62/4 51/95/4 +f 51/95/4 79/94/4 10/85/4 +f 79/94/4 9/55/4 10/85/4 +f 53/26/4 52/80/4 10/85/4 +f 58/75/4 56/74/4 53/26/4 +f 59/78/4 60/77/4 57/76/4 +f 57/76/4 58/75/4 53/26/4 +f 52/80/4 51/95/4 10/85/4 +f 19/24/4 20/82/4 1/81/4 +f 53/26/4 10/85/4 19/24/4 +f 59/78/4 57/76/4 2/25/4 +f 19/24/4 1/81/4 2/25/4 +f 2/25/4 57/76/4 53/26/4 +f 70/27/5 71/96/5 62/28/5 +f 11/30/5 18/97/5 19/31/5 +f 4/15/5 1/73/5 20/33/5 +f 72/35/3 74/54/3 64/36/3 +f 13/8/5 6/29/5 7/38/5 +f 23/39/6 25/10/6 47/11/6 +f 68/40/7 75/98/7 70/41/7 +f 30/11/5 12/17/5 79/99/5 +f 79/99/10 80/43/10 30/11/10 +f 12/17/5 9/16/5 79/99/5 +f 3/15/1 2/73/1 1/32/1 +f 20/44/2 19/58/2 18/27/2 +f 74/17/5 78/100/5 65/46/5 +f 31/43/1 33/99/1 54/47/1 +f 22/47/5 39/99/5 14/43/5 +f 46/1/2 24/64/2 23/7/2 +f 57/21/1 35/23/1 38/22/1 +f 61/50/9 66/53/9 76/51/9 +f 37/45/5 59/44/5 2/23/5 +f 78/28/3 77/51/3 67/53/3 +f 62/67/1 51/66/1 69/68/1 +f 51/66/1 55/65/1 63/6/1 +f 68/17/1 69/68/1 61/69/1 +f 61/69/1 69/68/1 51/66/1 +f 61/69/1 51/66/1 63/6/1 +f 65/71/1 67/70/1 64/5/1 +f 61/69/1 63/6/1 66/4/1 +f 64/5/1 67/70/1 66/4/1 +f 76/55/6 66/85/6 67/56/6 +f 47/17/2 25/16/2 26/10/2 +f 5/16/5 45/99/5 26/47/5 +f 55/60/6 54/101/6 33/58/6 +f 33/58/6 29/22/6 48/59/6 +f 48/59/6 72/102/6 63/103/6 +f 29/22/6 49/104/6 48/59/6 +f 48/59/6 63/103/6 55/60/6 +f 29/38/2 28/2/2 42/3/2 +f 32/44/6 31/23/6 52/21/6 +f 58/15/6 38/73/6 34/33/6 +f 27/7/6 24/38/6 46/29/6 +f 73/61/6 75/105/6 68/62/6 +f 21/58/6 41/27/6 42/29/6 +f 11/29/1 10/38/1 9/58/1 +f 59/45/1 37/44/1 36/2/1 +f 60/9/6 36/39/6 35/10/6 diff --git a/mods/boats/models/rowboat.x b/mods/boats/models/rowboat.x new file mode 100644 index 00000000..73a61df3 --- /dev/null +++ b/mods/boats/models/rowboat.x @@ -0,0 +1,760 @@ +xof 0303txt 0032 + +Frame Root { + FrameTransformMatrix { + 1.000000, 0.000000, 0.000000, 0.000000, + 0.000000,-0.000000, 1.000000, 0.000000, + 0.000000, 1.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 1.000000;; + } + Frame Cube_000 { + FrameTransformMatrix { + 1.000000, 0.000000, 0.000000, 0.000000, + 0.000000, 1.000000, 0.000000, 0.000000, + 0.000000, 0.000000, 1.000000, 0.000000, + 0.000000, 0.000000, 0.000000, 1.000000;; + } + Mesh { // Cube_000 mesh + 240; + 6.000000; 3.999999; 2.376923;, + 5.999998;-8.000001; 2.376923;, + 5.999998;-8.000001; 4.376923;, + 6.000001; 3.999999; 4.376923;, + -2.000000; 8.000000; 2.376923;, + 2.000000; 8.000000; 2.376923;, + 2.000001; 8.000000; 4.376923;, + -1.999999; 8.000000; 4.376923;, + -6.000000; 4.000000; 4.376923;, + -6.000001;-8.000000; 4.376923;, + -6.000001;-7.999999; 2.376923;, + -6.000000; 4.000000; 2.376923;, + -3.999999; 6.000001; 2.376923;, + -1.999999; 6.000000; 2.376923;, + -2.000001;-8.000002; 2.376923;, + -4.000001;-8.000000; 2.376923;, + -2.000000; 4.000000;-1.623077;, + -2.000001;-7.999999;-1.623077;, + 1.999999;-8.000001;-1.623077;, + 2.000000; 4.000000;-1.623077;, + -2.000000; 4.000000; 0.376923;, + 2.000000; 3.999999; 0.376923;, + 1.999999;-8.000001; 0.376923;, + -2.000001;-8.000000; 0.376923;, + -2.000000; 4.000000;-1.623077;, + 2.000000; 4.000000;-1.623077;, + 2.000000; 3.999999; 0.376923;, + -2.000000; 4.000000; 0.376923;, + 2.000000; 4.000000;-1.623077;, + 1.999999;-8.000001;-1.623077;, + 1.999999;-8.000001; 0.376923;, + 2.000000; 3.999999; 0.376923;, + 1.999999;-8.000001;-1.623077;, + -2.000001;-7.999999;-1.623077;, + -2.000001;-8.000000; 0.376923;, + 1.999999;-8.000001; 0.376923;, + -2.000000; 4.000000; 0.376923;, + -2.000001;-8.000000; 0.376923;, + -2.000001;-7.999999;-1.623077;, + -2.000000; 4.000000;-1.623077;, + -4.000001;-8.000000; 0.376923;, + -4.000001;-10.000000; 0.376923;, + 4.000000;-10.000000; 0.376923;, + 3.999999;-8.000000; 0.376923;, + -4.000000;-7.999999; 4.376923;, + 4.000000;-8.000001; 4.376923;, + 3.999999;-10.000001; 4.376923;, + -4.000001;-10.000000; 4.376923;, + -4.000001;-8.000000; 0.376923;, + 3.999999;-8.000000; 0.376923;, + 4.000000;-8.000001; 4.376923;, + -4.000000;-7.999999; 4.376923;, + 3.999999;-8.000000; 0.376923;, + 4.000000;-10.000000; 0.376923;, + 3.999999;-10.000001; 4.376923;, + 4.000000;-8.000001; 4.376923;, + 4.000000;-10.000000; 0.376923;, + -4.000001;-10.000000; 0.376923;, + -4.000001;-10.000000; 4.376923;, + 3.999999;-10.000001; 4.376923;, + -4.000000;-7.999999; 4.376923;, + -4.000001;-10.000000; 4.376923;, + -4.000001;-10.000000; 0.376923;, + -4.000001;-8.000000; 0.376923;, + 4.000000; 4.000000; 2.376923;, + 3.999999;-8.000001; 2.376923;, + 5.999998;-8.000001; 2.376923;, + 6.000000; 3.999999; 2.376923;, + 4.000001; 4.000000; 4.376923;, + 6.000001; 3.999999; 4.376923;, + 5.999998;-8.000001; 4.376923;, + 4.000000;-8.000001; 4.376923;, + 4.000000; 4.000000; 2.376923;, + 6.000000; 3.999999; 2.376923;, + 6.000001; 3.999999; 4.376923;, + 4.000001; 4.000000; 4.376923;, + 5.999998;-8.000001; 2.376923;, + 3.999999;-8.000001; 2.376923;, + 4.000000;-8.000001; 4.376923;, + 5.999998;-8.000001; 4.376923;, + 4.000001; 4.000000; 4.376923;, + 4.000000;-8.000001; 4.376923;, + 3.999999;-8.000001; 2.376923;, + 4.000000; 4.000000; 2.376923;, + 2.000000; 6.000000; 0.376923;, + 1.999999;-8.000001; 0.376923;, + 3.999999;-8.000000; 0.376923;, + 4.000000; 6.000000; 0.376923;, + 2.000001; 6.000000; 2.376923;, + 4.000001; 5.999999; 2.376923;, + 3.999999;-8.000001; 2.376923;, + 1.999999;-8.000000; 2.376923;, + 2.000000; 6.000000; 0.376923;, + 4.000000; 6.000000; 0.376923;, + 4.000001; 5.999999; 2.376923;, + 2.000001; 6.000000; 2.376923;, + 4.000000; 6.000000; 0.376923;, + 3.999999;-8.000000; 0.376923;, + 3.999999;-8.000001; 2.376923;, + 4.000001; 5.999999; 2.376923;, + 3.999999;-8.000000; 0.376923;, + 1.999999;-8.000001; 0.376923;, + 1.999999;-8.000000; 2.376923;, + 3.999999;-8.000001; 2.376923;, + 2.000001; 6.000000; 2.376923;, + 1.999999;-8.000000; 2.376923;, + 1.999999;-8.000001; 0.376923;, + 2.000000; 6.000000; 0.376923;, + 2.000001; 6.000000; 2.376923;, + 2.000000; 4.000000; 2.376923;, + 4.000000; 4.000000; 2.376923;, + 4.000001; 5.999999; 2.376923;, + 2.000001; 6.000000; 4.376923;, + 4.000001; 5.999999; 4.376923;, + 4.000001; 4.000000; 4.376923;, + 2.000000; 4.000000; 4.376923;, + 2.000001; 6.000000; 2.376923;, + 4.000001; 5.999999; 2.376923;, + 4.000001; 5.999999; 4.376923;, + 2.000001; 6.000000; 4.376923;, + 4.000001; 5.999999; 2.376923;, + 4.000000; 4.000000; 2.376923;, + 4.000001; 4.000000; 4.376923;, + 4.000001; 5.999999; 4.376923;, + 4.000000; 4.000000; 2.376923;, + 2.000000; 4.000000; 2.376923;, + 2.000000; 4.000000; 4.376923;, + 4.000001; 4.000000; 4.376923;, + 2.000001; 6.000000; 4.376923;, + 2.000000; 4.000000; 4.376923;, + 2.000000; 4.000000; 2.376923;, + 2.000001; 6.000000; 2.376923;, + -3.999999; 6.000001; 2.376923;, + -4.000000; 4.000000; 2.376923;, + -2.000000; 4.000000; 2.376923;, + -1.999999; 6.000000; 2.376923;, + -3.999999; 6.000001; 4.376923;, + -1.999999; 6.000000; 4.376923;, + -2.000000; 4.000000; 4.376923;, + -4.000000; 3.999999; 4.376923;, + -3.999999; 6.000001; 2.376923;, + -1.999999; 6.000000; 2.376923;, + -1.999999; 6.000000; 4.376923;, + -3.999999; 6.000001; 4.376923;, + -1.999999; 6.000000; 2.376923;, + -2.000000; 4.000000; 2.376923;, + -2.000000; 4.000000; 4.376923;, + -1.999999; 6.000000; 4.376923;, + -2.000000; 4.000000; 2.376923;, + -4.000000; 4.000000; 2.376923;, + -4.000000; 3.999999; 4.376923;, + -2.000000; 4.000000; 4.376923;, + -3.999999; 6.000001; 4.376923;, + -4.000000; 3.999999; 4.376923;, + -4.000000; 4.000000; 2.376923;, + -3.999999; 6.000001; 2.376923;, + -2.000000; 8.000000; 2.376923;, + -1.999999; 6.000000; 2.376923;, + 2.000001; 6.000000; 2.376923;, + 2.000000; 8.000000; 2.376923;, + -1.999999; 8.000000; 4.376923;, + 2.000001; 8.000000; 4.376923;, + 2.000001; 6.000000; 4.376923;, + -1.999999; 6.000000; 4.376923;, + 2.000000; 8.000000; 2.376923;, + 2.000001; 6.000000; 2.376923;, + 2.000001; 6.000000; 4.376923;, + 2.000001; 8.000000; 4.376923;, + 2.000001; 6.000000; 2.376923;, + -1.999999; 6.000000; 2.376923;, + -1.999999; 6.000000; 4.376923;, + 2.000001; 6.000000; 4.376923;, + -1.999999; 8.000000; 4.376923;, + -1.999999; 6.000000; 4.376923;, + -1.999999; 6.000000; 2.376923;, + -2.000000; 8.000000; 2.376923;, + -2.000000; 6.000000; 0.376923;, + -2.000000; 4.000000; 0.376923;, + 2.000000; 3.999999; 0.376923;, + 2.000000; 6.000000; 0.376923;, + -1.999999; 6.000000; 2.376923;, + 2.000001; 6.000000; 2.376923;, + 2.000000; 4.000000; 2.376923;, + -2.000000; 4.000000; 2.376923;, + -2.000000; 6.000000; 0.376923;, + 2.000000; 6.000000; 0.376923;, + 2.000001; 6.000000; 2.376923;, + -1.999999; 6.000000; 2.376923;, + 2.000000; 6.000000; 0.376923;, + 2.000000; 3.999999; 0.376923;, + 2.000000; 4.000000; 2.376923;, + 2.000001; 6.000000; 2.376923;, + 2.000000; 3.999999; 0.376923;, + -2.000000; 4.000000; 0.376923;, + -2.000000; 4.000000; 2.376923;, + 2.000000; 4.000000; 2.376923;, + -1.999999; 6.000000; 2.376923;, + -2.000000; 4.000000; 2.376923;, + -2.000000; 4.000000; 0.376923;, + -2.000000; 6.000000; 0.376923;, + -6.000000; 4.000000; 2.376923;, + -6.000001;-7.999999; 2.376923;, + -4.000001;-8.000000; 2.376923;, + -4.000000; 4.000000; 2.376923;, + -6.000000; 4.000000; 4.376923;, + -4.000000; 3.999999; 4.376923;, + -4.000000;-7.999999; 4.376923;, + -6.000001;-8.000000; 4.376923;, + -6.000000; 4.000000; 2.376923;, + -4.000000; 4.000000; 2.376923;, + -4.000000; 3.999999; 4.376923;, + -6.000000; 4.000000; 4.376923;, + -4.000000; 4.000000; 2.376923;, + -4.000001;-8.000000; 2.376923;, + -4.000000;-7.999999; 4.376923;, + -4.000000; 3.999999; 4.376923;, + -4.000001;-8.000000; 2.376923;, + -6.000001;-7.999999; 2.376923;, + -6.000001;-8.000000; 4.376923;, + -4.000000;-7.999999; 4.376923;, + -4.000000; 6.000001; 0.376923;, + -4.000001;-8.000000; 0.376923;, + -2.000001;-8.000000; 0.376923;, + -2.000000; 6.000000; 0.376923;, + -4.000000; 6.000001; 0.376923;, + -2.000000; 6.000000; 0.376923;, + -1.999999; 6.000000; 2.376923;, + -3.999999; 6.000001; 2.376923;, + -2.000000; 6.000000; 0.376923;, + -2.000001;-8.000000; 0.376923;, + -2.000001;-8.000002; 2.376923;, + -1.999999; 6.000000; 2.376923;, + -2.000001;-8.000000; 0.376923;, + -4.000001;-8.000000; 0.376923;, + -4.000001;-8.000000; 2.376923;, + -2.000001;-8.000002; 2.376923;, + -3.999999; 6.000001; 2.376923;, + -4.000001;-8.000000; 2.376923;, + -4.000001;-8.000000; 0.376923;, + -4.000000; 6.000001; 0.376923;; + 60; + 4;0,1,2,3;, + 4;4,5,6,7;, + 4;8,9,10,11;, + 4;12,13,14,15;, + 4;16,17,18,19;, + 4;20,21,22,23;, + 4;24,25,26,27;, + 4;28,29,30,31;, + 4;32,33,34,35;, + 4;36,37,38,39;, + 4;40,41,42,43;, + 4;44,45,46,47;, + 4;48,49,50,51;, + 4;52,53,54,55;, + 4;56,57,58,59;, + 4;60,61,62,63;, + 4;64,65,66,67;, + 4;68,69,70,71;, + 4;72,73,74,75;, + 4;76,77,78,79;, + 4;80,81,82,83;, + 4;84,85,86,87;, + 4;88,89,90,91;, + 4;92,93,94,95;, + 4;96,97,98,99;, + 4;100,101,102,103;, + 4;104,105,106,107;, + 4;108,109,110,111;, + 4;112,113,114,115;, + 4;116,117,118,119;, + 4;120,121,122,123;, + 4;124,125,126,127;, + 4;128,129,130,131;, + 4;132,133,134,135;, + 4;136,137,138,139;, + 4;140,141,142,143;, + 4;144,145,146,147;, + 4;148,149,150,151;, + 4;152,153,154,155;, + 4;156,157,158,159;, + 4;160,161,162,163;, + 4;164,165,166,167;, + 4;168,169,170,171;, + 4;172,173,174,175;, + 4;176,177,178,179;, + 4;180,181,182,183;, + 4;184,185,186,187;, + 4;188,189,190,191;, + 4;192,193,194,195;, + 4;196,197,198,199;, + 4;200,201,202,203;, + 4;204,205,206,207;, + 4;208,209,210,211;, + 4;212,213,214,215;, + 4;216,217,218,219;, + 4;220,221,222,223;, + 4;224,225,226,227;, + 4;228,229,230,231;, + 4;232,233,234,235;, + 4;236,237,238,239;; + MeshNormals { // Cube_000 normals + 60; + -1.000000; 0.000000; 0.000000;, + 0.000000;-1.000000;-0.000000;, + 1.000000;-0.000000; 0.000000;, + 0.000000; 0.000000;-1.000000;, + 0.000000; 0.000000; 1.000000;, + 0.000000; 0.000000;-1.000000;, + -0.000000;-1.000000;-0.000000;, + -1.000000; 0.000000; 0.000000;, + 0.000000; 1.000000; 0.000000;, + 1.000000;-0.000000;-0.000000;, + 0.000000; 0.000000; 1.000000;, + 0.000000; 0.000000;-1.000000;, + -0.000000;-1.000000;-0.000000;, + -1.000000; 0.000000;-0.000000;, + 0.000000; 1.000000; 0.000000;, + 1.000000;-0.000000;-0.000000;, + 0.000000; 0.000000; 1.000000;, + 0.000000; 0.000000;-1.000000;, + -0.000000;-1.000000;-0.000000;, + 0.000000; 1.000000; 0.000000;, + 1.000000;-0.000000;-0.000000;, + 0.000000; 0.000000; 1.000000;, + 0.000000; 0.000000;-1.000000;, + -0.000000;-1.000000;-0.000001;, + -1.000000; 0.000000; 0.000000;, + 0.000000; 1.000000; 0.000000;, + 1.000000;-0.000000;-0.000000;, + 0.000000; 0.000000; 1.000000;, + 0.000000; 0.000000;-1.000000;, + -0.000000;-1.000000; 0.000000;, + -1.000000; 0.000000; 0.000000;, + 0.000000; 1.000000; 0.000000;, + 1.000000;-0.000001;-0.000000;, + 0.000000; 0.000000; 1.000000;, + 0.000000; 0.000000;-1.000000;, + -0.000001;-1.000000; 0.000000;, + -1.000000; 0.000001;-0.000000;, + -0.000000; 1.000000; 0.000000;, + 1.000000;-0.000000;-0.000000;, + 0.000000; 0.000000; 1.000000;, + 0.000000; 0.000000;-1.000000;, + -1.000000;-0.000000; 0.000000;, + -0.000000; 1.000000;-0.000000;, + 1.000000; 0.000000;-0.000000;, + 0.000000; 0.000000; 1.000000;, + 0.000000; 0.000000;-1.000000;, + 0.000000;-1.000000;-0.000000;, + -1.000000; 0.000000; 0.000000;, + 0.000000; 1.000000;-0.000000;, + 1.000000;-0.000000;-0.000000;, + 0.000000; 0.000000; 1.000000;, + 0.000000; 0.000000;-1.000000;, + -0.000000;-1.000000;-0.000000;, + -1.000000; 0.000000; 0.000000;, + 0.000000; 1.000000; 0.000000;, + 0.000000; 0.000000; 1.000000;, + -0.000000;-1.000000;-0.000000;, + -1.000000; 0.000000; 0.000000;, + 0.000001; 1.000000; 0.000001;, + 1.000000;-0.000000;-0.000000;; + 60; + 4;0,0,0,0;, + 4;1,1,1,1;, + 4;2,2,2,2;, + 4;3,3,3,3;, + 4;4,4,4,4;, + 4;5,5,5,5;, + 4;6,6,6,6;, + 4;7,7,7,7;, + 4;8,8,8,8;, + 4;9,9,9,9;, + 4;10,10,10,10;, + 4;11,11,11,11;, + 4;12,12,12,12;, + 4;13,13,13,13;, + 4;14,14,14,14;, + 4;15,15,15,15;, + 4;16,16,16,16;, + 4;17,17,17,17;, + 4;18,18,18,18;, + 4;19,19,19,19;, + 4;20,20,20,20;, + 4;21,21,21,21;, + 4;22,22,22,22;, + 4;23,23,23,23;, + 4;24,24,24,24;, + 4;25,25,25,25;, + 4;26,26,26,26;, + 4;27,27,27,27;, + 4;28,28,28,28;, + 4;29,29,29,29;, + 4;30,30,30,30;, + 4;31,31,31,31;, + 4;32,32,32,32;, + 4;33,33,33,33;, + 4;34,34,34,34;, + 4;35,35,35,35;, + 4;36,36,36,36;, + 4;37,37,37,37;, + 4;38,38,38,38;, + 4;39,39,39,39;, + 4;40,40,40,40;, + 4;41,41,41,41;, + 4;42,42,42,42;, + 4;43,43,43,43;, + 4;44,44,44,44;, + 4;45,45,45,45;, + 4;46,46,46,46;, + 4;47,47,47,47;, + 4;48,48,48,48;, + 4;49,49,49,49;, + 4;50,50,50,50;, + 4;51,51,51,51;, + 4;52,52,52,52;, + 4;53,53,53,53;, + 4;54,54,54,54;, + 4;55,55,55,55;, + 4;56,56,56,56;, + 4;57,57,57,57;, + 4;58,58,58,58;, + 4;59,59,59,59;; + } // End of Cube_000 normals + MeshTextureCoords { // Cube_000 UV coordinates + 240; + 6.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 6.000000; 0.000000;, + 2.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 2.000000; 0.000000;, + 6.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 6.000000; 0.000000;, + 7.000000; 0.000000;, + 7.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 5.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000;-1.000000;, + 5.000000;-1.000000;, + 6.000000;-1.000000;, + 6.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000;-1.000000;, + 2.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 2.000000; 0.000000;, + 6.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 6.000000; 0.000000;, + 3.000000; 0.999999;, + 0.000000; 1.000000;, + 0.000000; 0.000001;, + 3.000000; 0.000000;, + 7.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 7.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000001; 1.000000;, + 0.000000;-4.000000;, + 1.000000;-4.000000;, + 1.000000;-3.000000;, + 0.999999; 1.000000;, + 0.000000; 1.000000;, + 0.000000;-3.000000;, + 4.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000;-1.000000;, + 4.000000;-1.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000;-1.000000;, + 1.000000;-1.000000;, + 5.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000;-0.999999;, + 5.000000;-1.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000;-1.000000;, + 1.000000;-1.000000;, + 5.375000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 5.375000; 0.000000;, + 5.375000; 0.000000;, + 5.375000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 7.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 7.000000; 0.000000;, + 6.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 6.000000; 0.000000;, + 7.000000; 0.000000;, + 7.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 7.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 7.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 7.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 7.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000;-1.000000;, + 1.000000;-1.000000;, + 1.000000;-1.000000;, + 0.999999; 1.000000;, + 0.000000; 1.000000;, + 0.000000;-1.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 2.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000001;, + 2.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000;-1.000000;, + 1.000000;-1.000000;, + 1.000000;-1.000000;, + 0.999999; 1.000000;, + 0.000000; 1.000000;, + 0.000000;-1.000000;, + 2.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 2.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 2.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000001;, + 2.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 7.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 7.000000; 0.000000;, + 7.000000; 0.000000;, + 7.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 7.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 7.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 6.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 6.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 7.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 7.000000; 0.000000;, + 1.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 1.000000; 0.000000;, + 7.000000; 1.000000;, + 0.000000; 1.000000;, + 0.000000; 0.000000;, + 7.000000; 0.000000;; + } // End of Cube_000 UV coordinates + MeshMaterialList { // Cube_000 material list + 1; + 60; + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0;; + Material Material { + 0.640000; 0.640000; 0.640000; 1.000000;; + 96.078431; + 0.500000; 0.500000; 0.500000;; + 0.000000; 0.000000; 0.000000;; + TextureFilename {"default_wood.png";} + } + } // End of Cube_000 material list + } // End of Cube_000 mesh + } // End of Cube_000 +} // End of Root diff --git a/mods/boats/textures/boats_inventory.png b/mods/boats/textures/boats_inventory.png new file mode 100644 index 00000000..f9d082e3 Binary files /dev/null and b/mods/boats/textures/boats_inventory.png differ diff --git a/mods/boats/textures/boats_wield.png b/mods/boats/textures/boats_wield.png new file mode 100644 index 00000000..f998b5bb Binary files /dev/null and b/mods/boats/textures/boats_wield.png differ diff --git a/mods/boats/textures/rowboat_inventory.png b/mods/boats/textures/rowboat_inventory.png new file mode 100644 index 00000000..086bb92b Binary files /dev/null and b/mods/boats/textures/rowboat_inventory.png differ diff --git a/mods/boats/textures/rowboat_wield.png b/mods/boats/textures/rowboat_wield.png new file mode 100644 index 00000000..ea60fd6a Binary files /dev/null and b/mods/boats/textures/rowboat_wield.png differ diff --git a/mods/farming/README.txt b/mods/farming/README.txt new file mode 100644 index 00000000..86a5fe3e --- /dev/null +++ b/mods/farming/README.txt @@ -0,0 +1,150 @@ +Farming Redo Mod +by TenPlus1 + +https://forum.minetest.net/viewtopic.php?id=9019 + +Farming Redo is a simplified version of the built-in farming mod in minetest and comes with wheat, cotton, carrot, cucumber, potato and tomato to start out with which spawn throughout the map... new foods need only be planted on tilled soil so no seeds are required, original wheat and cotton will require seeds which are found inside normal and jungle grass... + +This mod works by adding your new plant to the {growing=1} group and numbering the stages from _1 to as many stages as you like, but the underscore MUST be used only once in the node name to separate plant from stage number e.g. + +"farming:cotton_1" through to "farming:cotton_8" +"farming:wheat_1" through to "farming:wheat_8" +"farming:cucumber_4" through to "farming:cucumber_4" + +Changelog: + +1.23 - Huge code tweak and tidy done and added barley seeds to be found in dry grass, barley can make flour for bread also. +1.22 - Added grape bushes at high climates which can be cultivated into grape vines using trellis (9 sticks). +1.21 - Added auto-refill code for planting crops (thanks crabman77), also fixed a few bugs +1.20b- Tidied code, made api compatible with new 0.4.13 changes and changed to soil texture overlays +1.20 - NEW growing routine added that allows crops to grow while player is away doing other things (thanks prestidigitator) +1.14 - Added Green Beans from Crops mod (thanks sofar), little bushels in the wild but need to be grown using beanpoles crafted with 4 sticks (2 either side) +1.13 - Fixed seed double-placement glitch. Mapgen now uses 0.4.12+ for plant generation +1.12 - Player cannot place seeds in protected area, also growing speeds changed to match defaults +1.11 - Added Straw Bale, streamlined growing abm a little, fixed melon rotation bug with screwdriver +1.10 - Added Blueberry Bush and Blueberry Muffins, also Pumpkin/Melon easier to pick up, added check for unloaded map +1.09 - Corn now uses single nodes instead of 1 ontop of the other, Ethanol recipe is more expensive (requires 5 corn) and some code cleanup. +1.08 - Added Farming Plus compatibility, plus can be removed and no more missing nodes +1.07 - Added Rhubarb and Rhubarb Pie +1.06 - register_hoe and register_plant added for compatibility with default farming mod, although any plants registered will use farming redo to grow +1.05 - Added Raspberry Bushels and Raspberry Smoothie +1.04 - Added Donuts... normal, chocolate and apple... and a few code cleanups and now compatible with jungletree's from MoreTrees mod +1.03 - Bug fixes and more compatibility as drop-in replacement for built-in farming mod +1.02 - Added farming.mod string to help other mods identify which farming mod is running, if it returns "redo" then you're using this one, "" empty is built-in mod +1.01 - Crafting coffee or ethanol returns empty bucket/bottle, also Cocoa spawns a little rarer +1.0 - Added Cocoa which randomly grows on jungle tree's, pods give cocoa beans which can be used to farm more pods on a jungle trunk or make Cookies which have been added (or other treats) +0.9 - Added Pumpkin, Jack 'O Lantern, Pumpkin Slice and Sugar +(a huge thanks to painterly.net for allowing me to use their textures) +0.8 - Added Watermelon and Melon Slice +0.7 - Added Coffee, Coffee Beans, Drinking Cup, Cold and Hot Cup of Coffee +0.6 - Added Corn, Corn on the Cob... Also reworked Abm +0.5 - Added Carrot, Cucumber, Potato (and Baked Potato), Tomato +0.4 - Checks for Protection, also performance changes +0.3 - Added Diamond and Mese hoe +0.2 - Fixed check for wet soil +0.1 - Fixed growing bug +0.0 - Initial release + +License of media (textures): +---------------------------- +Created by PilzAdam (License: WTFPL): + farming_bread.png + farming_soil.png + farming_soil_wet.png + farming_soil_wet_side.png + farming_string.png + +Created by Calinou (License: CC BY-SA): + farming_tool_bronzehoe.png + farming_tool_steelhoe.png + farming_tool_stonehoe.png + farming_tool_woodhoe.png + farming_tool_mesehoe.png + farming_tool_diamondhoe.png + +Created by VanessaE (License: WTFPL): + farming_cotton_seed.png + farming_wheat_seed.png + farming_flour.png + farming_wheat.png + farming_wheat_1.png + farming_wheat_2.png + farming_wheat_3.png + farming_wheat_4.png + farming_wheat_5.png + farming_wheat_5.png + farming_wheat_7.png + farming_wheat_8.png + farming_cotton_1.png + farming_cotton_2.png + farming_cotton_3.png + farming_cotton_4.png + farming_cotton_5.png + farming_cotton_6.png + farming_cotton_7.png + farming_cotton_8.png + +Created by Doc (License: WTFPL): + farming_cucumber.png + farming_cucumber_1.png + farming_cucumber_2.png + farming_cucumber_3.png + farming_cucumber_4.png + farming_potato.png + farming_potato_1.png + farming_potato_2.png + farming_potato_3.png + farming_potato_4.png + farming_raspberries.png + farming_raspberry_1.png + farming_raspberry_2.png + farming_raspberry_3.png + farming_raspberry_4.png + +Created by Gambit: + default_junglegrass.png + farming_carrot.png + farming_carrot_1.png + farming_carrot_2.png + farming_carrot_3.png + farming_carrot_4.png + farming_carrot_5.png + farming_carrot_6.png + farming_carrot_7.png + farming_carrot_8.png + +Created by JoseTheCrafter and edited by TenPlus1: + farming_tomato.png + farming_tomato_1.png + farming_tomato_2.png + farming_tomato_3.png + farming_tomato_4.png + farming_tomato_5.png + farming_tomato_6.png + farming_tomato_7.png + farming_tomato_8.png + +Created by GeMinecraft and edited by TenPlus1: + farming_corn.png + farming_corn_cob.png + farming_corn_1.png + farming_corn_2.png + farming_corn_3.png + farming_corn_4.png + farming_corn_5.png + farming_corn_6.png + farming_corn_7.png + farming_corn_8.png + +Created by TenPlus1 + farming_cocoa_1.png + farming_cocoa_2.png + farming_cocoa_3.png + farming_cocoa_beans.png + farming_cookie.png + farming_raspberry_smoothie.png + farming_rhubarb_1.png + farming_rhubarb_2.png + farming_rhubarb_3.png + farming_rhubarb.png + farming_rhubarb_pie.png \ No newline at end of file diff --git a/mods/farming/banana.lua b/mods/farming/banana.lua new file mode 100644 index 00000000..492d1cf7 --- /dev/null +++ b/mods/farming/banana.lua @@ -0,0 +1,70 @@ +minetest.register_node("farming:banana_sapling", { + description = "Banana Tree Sapling", + drawtype = "plantlike", + tiles = {"farming_banana_sapling.png"}, + inventory_image = "farming_banana_sapling.png", + wield_image = "farming_banana_sapling.png", + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} + }, + groups = {dig_immediate=3,flammable=2}, + sounds = default.node_sound_defaults(), +}) + +minetest.register_node("farming:banana_leaves", { + drawtype = "allfaces_optional", + tiles = {"farming_banana_leaves.png"}, + paramtype = "light", + groups = {snappy=3, leafdecay=3, flammable=2, not_in_creative_inventory=1}, + drop = { + max_items = 1, + items = { + { + items = {'farming:banana_sapling'}, + rarity = 20, + }, + { + items = {'farming:banana_leaves'}, + } + } +}, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_abm({ + nodenames = {"farming:banana_sapling"}, + interval = 60, + chance = 20, + action = function(pos, node) + farming.generate_tree(pos, "default:tree", "farming:banana_leaves", {"default:dirt", "default:dirt_with_grass"}, {["farming:banana"]=20}) + end +}) + +minetest.register_on_generated(function(minp, maxp, blockseed) + if math.random(1, 100) > 5 then + return + end + local tmp = {x=(maxp.x-minp.x)/2+minp.x, y=(maxp.y-minp.y)/2+minp.y, z=(maxp.z-minp.z)/2+minp.z} + local pos = minetest.find_node_near(tmp, maxp.x-minp.x, {"default:dirt_with_grass"}) + if pos ~= nil then + farming.generate_tree({x=pos.x, y=pos.y+1, z=pos.z}, "default:tree", "farming:banana_leaves", {"default:dirt", "default:dirt_with_grass"}, {["farming:banana"]=10}) + end +end) + +minetest.register_node("farming:banana", { + description = "Banana", + tiles = {"farming_banana.png"}, + inventory_image = "farming_banana.png", + wield_image = "farming_banana.png", + drawtype = "torchlike", + paramtype = "light", + sunlight_propagates = true, + walkable = false, + groups = {fleshy=3,dig_immediate=3,flammable=2,leafdecay=3,leafdecay_drop=1}, + sounds = default.node_sound_defaults(), + + on_use = minetest.item_eat(6), +}) diff --git a/mods/farming/barley.lua b/mods/farming/barley.lua new file mode 100644 index 00000000..d69b0bad --- /dev/null +++ b/mods/farming/barley.lua @@ -0,0 +1,96 @@ + +-- barley seeds +minetest.register_node("farming:seed_barley", { + description = "Barley Seed", + tiles = {"farming_barley_seed.png"}, + inventory_image = "farming_barley_seed.png", + wield_image = "farming_barley_seed.png", + drawtype = "signlike", + groups = {seed = 1, snappy = 3, attached_node = 1}, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = farming.select, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:barley_1") + end, +}) + +-- harvested barley +minetest.register_craftitem("farming:barley", { + description = "barley", + inventory_image = "farming_barley.png", +}) + +-- flour +minetest.register_craft({ + type = "shapeless", + output = "farming:flour", + recipe = {"farming:barley", "farming:barley", "farming:barley", "farming:barley"} +}) + +-- barley definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_barley_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:barley_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_barley_2.png"} +minetest.register_node("farming:barley_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_barley_3.png"} +minetest.register_node("farming:barley_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_barley_4.png"} +minetest.register_node("farming:barley_4", table.copy(crop_def)) + +-- stage 5 +crop_def.tiles = {"farming_barley_5.png"} +crop_def.drop = { + items = { + {items = {'farming:barley'}, rarity = 2}, + {items = {'farming:seed_barley'}, rarity = 2}, + } +} +minetest.register_node("farming:barley_5", table.copy(crop_def)) + +-- stage 6 +crop_def.tiles = {"farming_barley_6.png"} +crop_def.drop = { + items = { + {items = {'farming:barley'}, rarity = 2}, + {items = {'farming:seed_barley'}, rarity = 1}, + } +} +minetest.register_node("farming:barley_6", table.copy(crop_def)) + +-- stage 7 (final) +crop_def.tiles = {"farming_barley_7.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:barley'}, rarity = 1}, + {items = {'farming:barley'}, rarity = 3}, + {items = {'farming:seed_barley'}, rarity = 1}, + {items = {'farming:seed_barley'}, rarity = 3}, + } +} +minetest.register_node("farming:barley_7", table.copy(crop_def)) diff --git a/mods/farming/beanpole.lua b/mods/farming/beanpole.lua new file mode 100644 index 00000000..cda736f9 --- /dev/null +++ b/mods/farming/beanpole.lua @@ -0,0 +1,194 @@ +--[[ + All textures by + (C) Auke Kok + CC-BY-SA-3.0 +]] + +-- beans +minetest.register_craftitem("farming:beans", { + description = "Green Beans", + inventory_image = "farming_beans.png", + on_use = minetest.item_eat(1), + + on_place = function(itemstack, placer, pointed_thing) + + if minetest.is_protected(pointed_thing.under, placer:get_player_name()) then + return + end + + local nodename = minetest.get_node(pointed_thing.under).name + + if nodename == "farming:beanpole" then + minetest.set_node(pointed_thing.under, {name = "farming:beanpole_1"}) + + minetest.sound_play("default_place_node", {pos = pointed_thing.above, gain = 1.0}) + else + return + end + + if not minetest.setting_getbool("creative_mode") then + + itemstack:take_item() + + -- check for refill + if itemstack:get_count() == 0 then + + minetest.after(0.20, + farming.refill_plant, + placer, + "farming:beans", + placer:get_wield_index() + ) + end + end + + return itemstack + end +}) + +-- beans can be used for green dye +minetest.register_craft({ + output = "dye:green", + recipe = { + {'farming:beans'}, + } +}) + +-- beanpole +minetest.register_node("farming:beanpole", { + description = "Bean Pole (place on soil before planting beans)", + drawtype = "plantlike", + tiles = {"farming_beanpole.png"}, + inventory_image = "farming_beanpole.png", + visual_scale = 1.45, + paramtype = "light", + walkable = false, + buildable_to = true, + sunlight_propagates = true, + drop = "farming:beanpole", + selection_box = farming.select, + groups = {snappy = 3, flammable = 2, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_place = function(itemstack, placer, pointed_thing) + + if minetest.is_protected(pointed_thing.under, placer:get_player_name()) then + return + end + + local nodename = minetest.get_node(pointed_thing.under).name + + if minetest.get_item_group(nodename, "soil") < 2 then + return + end + + local top = { + x = pointed_thing.above.x, + y = pointed_thing.above.y + 1, + z = pointed_thing.above.z + } + + nodename = minetest.get_node(top).name + + if nodename ~= "air" then + return + end + + minetest.set_node(pointed_thing.above, {name = "farming:beanpole"}) + + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end + + return itemstack + end +}) + +minetest.register_craft({ + output = "farming:beanpole", + recipe = { + {'', '', ''}, + {'default:stick', '', 'default:stick'}, + {'default:stick', '', 'default:stick'}, + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:beanpole", + burntime = 10, +}) + +-- green bean definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_beanpole_1.png"}, + visual_scale = 1.45, + paramtype = "light", + walkable = false, + buildable_to = true, + sunlight_propagates = true, + drop = { + items = { + {items = {'farming:beanpole'}, rarity = 1}, + } + }, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 3, not_in_creative_inventory = 1, + attached_node = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:beanpole_1", table.copy(crop_def)) + +-- stage2 +crop_def.tiles = {"farming_beanpole_2.png"} +minetest.register_node("farming:beanpole_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_beanpole_3.png"} +minetest.register_node("farming:beanpole_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_beanpole_4.png"} +minetest.register_node("farming:beanpole_4", table.copy(crop_def)) + +-- stage 5 (final) +crop_def.tiles = {"farming_beanpole_5.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:beanpole'}, rarity = 1}, + {items = {'farming:beans 3'}, rarity = 1}, + {items = {'farming:beans 2'}, rarity = 2}, + {items = {'farming:beans 2'}, rarity = 3}, + } +} +minetest.register_node("farming:beanpole_5", table.copy(crop_def)) + +-- wild green bean bush (this is what you find on the map) +minetest.register_node("farming:beanbush", { + drawtype = "plantlike", + tiles = {"farming_beanbush.png"}, + paramtype = "light", + waving = 1, + walkable = false, + buildable_to = true, + sunlight_propagates = true, + drop = { + items = { + {items = {'farming:beans 1'}, rarity = 1}, + {items = {'farming:beans 1'}, rarity = 2}, + {items = {'farming:beans 1'}, rarity = 3}, + } + }, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory=1 + }, + sounds = default.node_sound_leaves_defaults(), +}) diff --git a/mods/farming/blueberry.lua b/mods/farming/blueberry.lua new file mode 100644 index 00000000..6a29ba97 --- /dev/null +++ b/mods/farming/blueberry.lua @@ -0,0 +1,65 @@ + +-- blueberries +minetest.register_craftitem("farming:blueberries", { + description = "Blueberries", + inventory_image = "farming_blueberries.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:blueberry_1") + end, + on_use = minetest.item_eat(1), +}) + +-- blueberry muffin (thanks to sosogirl123 @ deviantart.com for muffin image) + +minetest.register_craftitem("farming:muffin_blueberry", { + description = "Blueberry Muffin", + inventory_image = "farming_blueberry_muffin.png", + on_use = minetest.item_eat(2), +}) + +minetest.register_craft({ + output = "farming:muffin_blueberry 2", + recipe = { + {"farming:blueberries", "farming:bread", "farming:blueberries"}, + } +}) + +-- blueberry definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_blueberry_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:blueberry_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_blueberry_2.png"} +minetest.register_node("farming:blueberry_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_blueberry_3.png"} +minetest.register_node("farming:blueberry_3", table.copy(crop_def)) + +-- stage 4 (final) +crop_def.tiles = {"farming_blueberry_4.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:blueberries 2'}, rarity = 1}, + {items = {'farming:blueberries'}, rarity = 2}, + {items = {'farming:blueberries'}, rarity = 3}, + } +} +minetest.register_node("farming:blueberry_4", table.copy(crop_def)) diff --git a/mods/farming/carrot.lua b/mods/farming/carrot.lua new file mode 100644 index 00000000..90c1b918 --- /dev/null +++ b/mods/farming/carrot.lua @@ -0,0 +1,103 @@ + +--[[ + Original textures from PixelBox texture pack + https://forum.minetest.net/viewtopic.php?id=4990 +]] + +minetest.register_craftitem("farming:carrot_seed", { + description = "Carrot Seeds", + inventory_image = "farming_carrot_seed.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:carrot_1") + end +}) + +-- carrot +minetest.register_craftitem("farming:carrot", { + description = "Carrot", + inventory_image = "farming_carrot.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:carrot_1") + end, + on_use = minetest.item_eat(4), +}) + +-- golden carrot +minetest.register_craftitem("farming:carrot_gold", { + description = "Golden Carrot", + inventory_image = "farming_carrot_gold.png", + on_use = minetest.item_eat(6), +}) + +minetest.register_craft({ + output = "farming:carrot_gold", + recipe = { + {"", "default:gold_lump", ""}, + {"default:gold_lump", "farming:carrot", "default:gold_lump"}, + {"", "default:gold_lump", ""}, + } +}) + +-- carrot definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_carrot_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + + +-- stage 1 +minetest.register_node("farming:carrot_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_carrot_2.png"} +minetest.register_node("farming:carrot_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_carrot_3.png"} +minetest.register_node("farming:carrot_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_carrot_4.png"} +minetest.register_node("farming:carrot_4", table.copy(crop_def)) + +-- stage 5 +crop_def.tiles = {"farming_carrot_5.png"} +minetest.register_node("farming:carrot_5", table.copy(crop_def)) + +-- stage 6 +crop_def.tiles = {"farming_carrot_6.png"} +minetest.register_node("farming:carrot_6", table.copy(crop_def)) + +-- stage 7 +crop_def.tiles = {"farming_carrot_7.png"} +crop_def.drop = { + items = { + {items = {'farming:carrot'}, rarity = 1}, + {items = {'farming:carrot_seed'}, rarity = 1}, + {items = {'farming:carrot 2'}, rarity = 3}, + } +} +minetest.register_node("farming:carrot_7", table.copy(crop_def)) + +-- stage 8 (final) +crop_def.tiles = {"farming_carrot_8.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:carrot 2'}, rarity = 1}, + {items = {'farming:carrot_seed'}, rarity = 1}, + {items = {'farming:carrot 3'}, rarity = 2}, + } +} +minetest.register_node("farming:carrot_8", table.copy(crop_def)) diff --git a/mods/farming/cocoa.lua b/mods/farming/cocoa.lua new file mode 100644 index 00000000..a11a6110 --- /dev/null +++ b/mods/farming/cocoa.lua @@ -0,0 +1,172 @@ + +-- place cocoa +function place_cocoa(itemstack, placer, pointed_thing, plantname) + + local pt = pointed_thing + + -- check if pointing at a node + if not pt or pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + + -- return if any of the nodes are not registered + if not minetest.registered_nodes[under.name] then + return + end + + -- check if pointing at jungletree + if under.name ~= "default:jungletree" + or minetest.get_node(pt.above).name ~= "air" then + return + end + + -- add the node and remove 1 item from the itemstack + minetest.set_node(pt.above, {name = plantname}) + + minetest.sound_play("default_place_node", {pos = pt.above, gain = 1.0}) + + if not minetest.setting_getbool("creative_mode") then + + itemstack:take_item() + + -- check for refill + if itemstack:get_count() == 0 then + + minetest.after(0.20, + farming.refill_plant, + placer, + "farming:cocoa_beans", + placer:get_wield_index() + ) + end + end + + return itemstack +end + +-- cocoa beans +minetest.register_craftitem("farming:cocoa_beans", { + description = "Cocoa Beans", + inventory_image = "farming_cocoa_beans.png", + on_place = function(itemstack, placer, pointed_thing) + return place_cocoa(itemstack, placer, pointed_thing, "farming:cocoa_1") + end, +}) + +minetest.register_craft( { + output = "dye:brown 2", + recipe = { + { "farming:cocoa_beans" }, + } +}) + +-- chocolate cookie +minetest.register_craftitem("farming:cookie", { + description = "Cookie", + inventory_image = "farming_cookie.png", + on_use = minetest.item_eat(2), +}) + +minetest.register_craft( { + output = "farming:cookie 8", + recipe = { + { "farming:wheat", "farming:cocoa_beans", "farming:wheat" }, + } +}) + +-- bar of dark chocolate (thanks to Ice Pandora for her deviantart.com chocolate tutorial) +minetest.register_craftitem("farming:chocolate_dark", { + description = "Bar of Dark Chocolate", + inventory_image = "farming_chocolate_dark.png", + on_use = minetest.item_eat(3), +}) + +minetest.register_craft( { + output = "farming:chocolate_dark", + recipe = { + { "farming:cocoa_beans", "farming:cocoa_beans", "farming:cocoa_beans" }, + } +}) + +-- cocoa definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_cocoa_1.png"}, + paramtype = "light", + walkable = true, + drop = { + items = { + {items = {'farming:cocoa_beans 1'}, rarity = 2}, + } + }, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3} + }, + groups = { + snappy = 3, flammable = 2, plant = 1, growing = 1, + not_in_creative_inventory=1, leafdecay = 1, leafdecay_drop = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:cocoa_1", table.copy(crop_def)) + +-- stage2 +crop_def.tiles = {"farming_cocoa_2.png"} +crop_def.drop = { + items = { + {items = {'farming:cocoa_beans 1'}, rarity = 1}, + } +} +minetest.register_node("farming:cocoa_2", table.copy(crop_def)) + +-- stage 3 (final) +crop_def.tiles = {"farming_cocoa_3.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:cocoa_beans 2'}, rarity = 1}, + {items = {'farming:cocoa_beans 1'}, rarity = 2}, + } +} +minetest.register_node("farming:cocoa_3", table.copy(crop_def)) + +-- add random cocoa pods to jungle tree trunks +minetest.register_abm({ + nodenames = {"default:jungletree"}, + neighbors = {"default:jungleleaves", "moretrees:jungletree_leaves_green"}, + interval = 8, + chance = 80, + catch_up = false, + action = function(pos, node) + + local dir = math.random(1, 50) + + if dir == 1 then + pos.x = pos.x + 1 + elseif dir == 2 then + pos.x = pos.x - 1 + elseif dir == 3 then + pos.z = pos.z + 1 + elseif dir == 4 then + pos.z = pos.z -1 + else return + end + + local nodename = minetest.get_node(pos).name + + if nodename == "air" + and minetest.get_node_light(pos) > 12 then + + --print ("Cocoa Pod added at " .. minetest.pos_to_string(pos)) + + minetest.set_node(pos, { + name = "farming:cocoa_" .. tostring(math.random(1, 3)) + }) + end + end, +}) diff --git a/mods/farming/coffee.lua b/mods/farming/coffee.lua new file mode 100644 index 00000000..c9854e6e --- /dev/null +++ b/mods/farming/coffee.lua @@ -0,0 +1,130 @@ + +-- coffee +minetest.register_craftitem("farming:coffee_beans", { + description = "Coffee Beans", + inventory_image = "farming_coffee_beans.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:coffee_1") + end, +}) + + +-- drinking cup +minetest.register_node("farming:drinking_cup", { + description = "Drinking Cup (empty)", + drawtype = "plantlike", + tiles = {"vessels_drinking_cup.png"}, + inventory_image = "vessels_drinking_cup.png", + wield_image = "vessels_drinking_cup.png", + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.25, 0.25} + }, + groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_craft( { + output = "farming:drinking_cup 5", + recipe = { + { "default:glass", "", "default:glass" }, + {"", "default:glass",""}, + } +}) + +-- cold cup of coffee +minetest.register_node("farming:coffee_cup", { + description = "Cold Cup of Coffee", + drawtype = "plantlike", + tiles = {"farming_coffee_cup.png"}, + inventory_image = "farming_coffee_cup.png", + wield_image = "farming_coffee_cup.png", + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.25, 0.25} + }, + groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + on_use = minetest.item_eat(2, "farming:drinking_cup"), + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_craft( { + output = "farming:coffee_cup", + recipe = { + {"farming:drinking_cup", "farming:coffee_beans","bucket:bucket_water"}, + }, + replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}} +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 5, + output = "farming:coffee_cup_hot", + recipe = "farming:coffee_cup" +}) + +-- hot cup of coffee +minetest.register_node("farming:coffee_cup_hot", { + description = "Hot Cup of Coffee", + drawtype = "plantlike", + tiles = {"farming_coffee_cup_hot.png"}, + inventory_image = "farming_coffee_cup_hot.png", + wield_image = "farming_coffee_cup_hot.png", + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.25, 0.25} + }, + groups = {vessel = 1, dig_immediate = 3, attached_node = 1}, + on_use = minetest.item_eat(3, "farming:drinking_cup"), + sounds = default.node_sound_glass_defaults(), +}) + +-- coffee definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_coffee_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:coffee_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_coffee_2.png"} +minetest.register_node("farming:coffee_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_coffee_3.png"} +minetest.register_node("farming:coffee_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_coffee_4.png"} +minetest.register_node("farming:coffee_4", table.copy(crop_def)) + +-- stage 5 (final) +crop_def.tiles = {"farming_coffee_5.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:coffee_beans 2'}, rarity = 1}, + {items = {'farming:coffee_beans 2'}, rarity = 2}, + {items = {'farming:coffee_beans 2'}, rarity = 3}, + } +} +minetest.register_node("farming:coffee_5", table.copy(crop_def)) diff --git a/mods/farming/compatibility.lua b/mods/farming/compatibility.lua new file mode 100644 index 00000000..07a53404 --- /dev/null +++ b/mods/farming/compatibility.lua @@ -0,0 +1,78 @@ +-- Banana +minetest.register_alias("farming_plus:banana_sapling", "farming:banana_sapling") +minetest.register_alias("farming_plus:banana_leaves", "farming:banana_leaves") +minetest.register_alias("farming_plus:banana", "farming:banana") + +-- Carrot +minetest.register_alias("farming_plus:carrot_seed", "farming:carrot_seed") +minetest.register_alias("farming_plus:carrot_1", "farming:carrot_1") +minetest.register_alias("farming_plus:carrot_2", "farming:carrot_4") +minetest.register_alias("farming_plus:carrot_3", "farming:carrot_6") +minetest.register_alias("farming_plus:carrot", "farming:carrot_8") +minetest.register_alias("farming_plus:carrot_item", "farming:carrot") + +-- Cocoa +minetest.register_alias("farming_plus:cocoa_sapling", "farming:cocoa_beans") +minetest.register_alias("farming_plus:cocoa_leaves", "default:leaves") +minetest.register_alias("farming_plus:cocoa", "default:apple") +minetest.register_alias("farming_plus:cocoa_bean", "farming:cocoa_beans") + +-- Orange +minetest.register_alias("farming_plus:orange_1", "farming:orange_1") +minetest.register_alias("farming_plus:orange_2", "farming:orange_2") +minetest.register_alias("farming_plus:orange_3", "farming:orange_3") +minetest.register_alias("farming_plus:orange", "farming:orange_4") +minetest.register_alias("farming_plus:orange_8", "farming:orange") +minetest.register_alias("farming_plus:orange_item", "farming:orange_item") +minetest.register_alias("farming_plus:orange_seed", "farming:orange_seed") +minetest.register_alias("farming:orange", "farming:orange_4") + +-- Potato +minetest.register_alias("farming_plus:potato_item", "farming:potato") +minetest.register_alias("farming_plus:potato_1", "farming:potato_1") +minetest.register_alias("farming_plus:potato_2", "farming:potato_2") +minetest.register_alias("farming_plus:potato", "farming:potato_3") +minetest.register_alias("farming_plus:potato_seed", "farming:potato_seed") + +-- Pumpkin +minetest.register_alias("farming:pumpkin_seed", "farming:pumpkin_slice") +minetest.register_alias("farming:pumpkin_face", "farming:pumpkin") +minetest.register_alias("farming:pumpkin_face_light", "farming:jackolantern") +minetest.register_alias("farming:big_pumpkin", "farming:pumpkin") +minetest.register_alias("farming:big_pumpkin_side", "air") +minetest.register_alias("farming:big_pumpkin_corner", "air") +minetest.register_alias("farming:big_pumpkin_top", "air") +minetest.register_alias("farming:pumpkin_flour", "farming:pumpkin_dough") + +-- Rhubarb +minetest.register_alias("farming_plus:rhubarb_seed", "farming:rhubarb_seed") +minetest.register_alias("farming_plus:rhubarb_1", "farming:rhubarb_1") +minetest.register_alias("farming_plus:rhubarb_2", "farming:rhubarb_2") +minetest.register_alias("farming_plus:rhubarb", "farming:rhubarb_3") +minetest.register_alias("farming_plus:rhubarb_item", "farming:rhubarb") + +-- Strawberry +minetest.register_alias("farming_plus:strawberry_item", "farming:strawberry_item") +minetest.register_alias("farming_plus:strawberry_seed", "farming:strawberry_seed") +minetest.register_alias("farming_plus:strawberry_1", "farming:strawberry_1") +minetest.register_alias("farming_plus:strawberry_2", "farming:strawberry_2") +minetest.register_alias("farming_plus:strawberry_3", "farming:strawberry_3") +minetest.register_alias("farming_plus:strawberry", "farming:strawberry_3") +minetest.register_alias("farming:strawberry", "farming:strawberry_item") +minetest.register_alias("farming_plus:strawberry", "farming:strawberry_3") + +-- Raspberry +--minetest.register_alias("farming_plus:raspberry_seed", "farming:raspberry_seed") +--minetest.register_alias("farming_plus:raspberrys", "farming:raspberrys") +--minetest.register_alias("farming_plus:raspberry_seed", "farming:raspberry_seed") + +-- Tomato +minetest.register_alias("farming_plus:tomato_seed", "farming:tomato_seed") +minetest.register_alias("farming_plus:tomato_item", "farming:tomato") +minetest.register_alias("farming_plus:tomato_1", "farming:tomato_2") +minetest.register_alias("farming_plus:tomato_2", "farming:tomato_4") +minetest.register_alias("farming_plus:tomato_3", "farming:tomato_6") +minetest.register_alias("farming_plus:tomato", "farming:tomato_8") + +-- Weed +minetest.register_alias("farming:weed", "default:grass_2") diff --git a/mods/farming/corn.lua b/mods/farming/corn.lua new file mode 100644 index 00000000..43707575 --- /dev/null +++ b/mods/farming/corn.lua @@ -0,0 +1,114 @@ + +--[[ + Original textures from GeMinecraft + http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/wip-mods/1440575-1-2-5-generation-minecraft-beta-1-2-farming-and +]] + +-- corn +minetest.register_craftitem("farming:corn", { + description = "Corn", + inventory_image = "farming_corn.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:corn_1") + end, + on_use = minetest.item_eat(3), +}) + +-- corn on the cob (texture by TenPlus1) +minetest.register_craftitem("farming:corn_cob", { + description = "Corn on the Cob", + inventory_image = "farming_corn_cob.png", + on_use = minetest.item_eat(5), +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 10, + output = "farming:corn_cob", + recipe = "farming:corn" +}) + +-- ethanol (thanks to JKMurray for this idea) +minetest.register_craftitem("farming:bottle_ethanol", { + description = "Bottle of Ethanol", + inventory_image = "farming_bottle_ethanol.png", +}) + +minetest.register_craft( { + output = "farming:bottle_ethanol", + recipe = { + { "vessels:glass_bottle", "farming:corn", "farming:corn"}, + { "farming:corn", "farming:corn", "farming:corn"}, + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:bottle_ethanol", + burntime = 240, + replacements = {{ "farming:bottle_ethanol", "vessels:glass_bottle"}} +}) + +-- corn definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_corn_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:corn_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_corn_2.png"} +minetest.register_node("farming:corn_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_corn_3.png"} +minetest.register_node("farming:corn_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_corn_4.png"} +minetest.register_node("farming:corn_4", table.copy(crop_def)) + +-- stage 5 +crop_def.tiles = {"farming_corn_5.png"} +minetest.register_node("farming:corn_5", table.copy(crop_def)) + +-- stage 6 +crop_def.tiles = {"farming_corn_6.png"} +crop_def.visual_scale = 1.45 +minetest.register_node("farming:corn_6", table.copy(crop_def)) + +-- stage 7 +crop_def.tiles = {"farming_corn_7.png"} +crop_def.drop = { + items = { + {items = {'farming:corn'}, rarity = 1}, + {items = {'farming:corn'}, rarity = 2}, + {items = {'farming:corn'}, rarity = 3}, + } +} +minetest.register_node("farming:corn_7", table.copy(crop_def)) + +-- stage 8 (final) +crop_def.tiles = {"farming_corn_8.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:corn 2'}, rarity = 1}, + {items = {'farming:corn 2'}, rarity = 2}, + {items = {'farming:corn 2'}, rarity = 2}, + } +} +minetest.register_node("farming:corn_8", table.copy(crop_def)) diff --git a/mods/farming/cotton.lua b/mods/farming/cotton.lua new file mode 100644 index 00000000..2ddf88e2 --- /dev/null +++ b/mods/farming/cotton.lua @@ -0,0 +1,114 @@ + +-- cotton seeds +minetest.register_node("farming:seed_cotton", { + description = "Cotton Seed", + tiles = {"farming_cotton_seed.png"}, + inventory_image = "farming_cotton_seed.png", + wield_image = "farming_cotton_seed.png", + drawtype = "signlike", + groups = {seed = 1, snappy = 3, attached_node = 1}, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = farming.select, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:cotton_1") + end, +}) + +-- cotton / string + +minetest.register_craftitem("farming:cotton", { + description = "Cotton", + inventory_image = "farming_cotton.png", +}) + +minetest.register_alias("farming:string", "farming:cotton") + +-- cotton to wool +minetest.register_craft({ + output = "wool:white", + recipe = { + {"farming:string", "farming:string"}, + {"farming:string", "farming:string"}, + } +}) + +-- cotton definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_cotton_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:cotton_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_cotton_2.png"} +minetest.register_node("farming:cotton_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_cotton_3.png"} +minetest.register_node("farming:cotton_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_cotton_4.png"} +minetest.register_node("farming:cotton_4", table.copy(crop_def)) + +-- stage 5 +crop_def.tiles = {"farming_cotton_5.png"} +crop_def.drop = { + items = { + {items = {"farming:seed_cotton"}, rarity = 1}, + } +} +minetest.register_node("farming:cotton_5", table.copy(crop_def)) + +-- stage 6 +crop_def.tiles = {"farming_cotton_6.png"} +crop_def.drop = { + items = { + {items = {"farming:cotton"}, rarity = 1}, + {items = {"farming:cotton"}, rarity = 2}, + } +} +minetest.register_node("farming:cotton_6", table.copy(crop_def)) + +-- stage 7 +crop_def.tiles = {"farming_cotton_7.png"} +crop_def.drop = { + items = { + {items = {"farming:cotton"}, rarity = 1}, + {items = {"farming:cotton"}, rarity = 2}, + {items = {"farming:seed_cotton"}, rarity = 1}, + {items = {"farming:seed_cotton"}, rarity = 2}, + } +} +minetest.register_node("farming:cotton_7", table.copy(crop_def)) + +-- stage 8 (final) +crop_def.tiles = {"farming_cotton_8.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {"farming:string"}, rarity = 1}, + {items = {"farming:string"}, rarity = 2}, + {items = {"farming:string"}, rarity = 3}, + {items = {"farming:seed_cotton"}, rarity = 1}, + {items = {"farming:seed_cotton"}, rarity = 2}, + {items = {"farming:seed_cotton"}, rarity = 3}, + } +} +minetest.register_node("farming:cotton_8", table.copy(crop_def)) diff --git a/mods/farming/cucumber.lua b/mods/farming/cucumber.lua new file mode 100644 index 00000000..22e367bc --- /dev/null +++ b/mods/farming/cucumber.lua @@ -0,0 +1,53 @@ + +--[[ + Original textures from DocFarming mod + https://forum.minetest.net/viewtopic.php?id=3948 +]] + +-- cucumber +minetest.register_craftitem("farming:cucumber", { + description = "Cucumber", + inventory_image = "farming_cucumber.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:cucumber_1") + end, + on_use = minetest.item_eat(4), +}) + +-- cucumber definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_cucumber_1.png"}, + paramtype = "light", + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:cucumber_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_cucumber_2.png"} +minetest.register_node("farming:cucumber_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_cucumber_3.png"} +minetest.register_node("farming:cucumber_3", table.copy(crop_def)) + +-- stage 4 (final) +crop_def.tiles = {"farming_cucumber_4.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:cucumber'}, rarity = 1}, + {items = {'farming:cucumber 2'}, rarity = 2}, + } +} +minetest.register_node("farming:cucumber_4", table.copy(crop_def)) diff --git a/mods/farming/depends.txt b/mods/farming/depends.txt new file mode 100644 index 00000000..be420a35 --- /dev/null +++ b/mods/farming/depends.txt @@ -0,0 +1,2 @@ +default +wool \ No newline at end of file diff --git a/mods/farming/description.txt b/mods/farming/description.txt new file mode 100644 index 00000000..58bdc810 --- /dev/null +++ b/mods/farming/description.txt @@ -0,0 +1 @@ +Adds many plants and food to Minetest \ No newline at end of file diff --git a/mods/farming/donut.lua b/mods/farming/donut.lua new file mode 100644 index 00000000..1b49848b --- /dev/null +++ b/mods/farming/donut.lua @@ -0,0 +1,45 @@ +-- Donut (thanks to Bockwurst for making the donut images) +minetest.register_craftitem("farming:donut", { + description = "Donut", + inventory_image = "farming_donut.png", + on_use = minetest.item_eat(4), +}) + +minetest.register_craft({ + output = "farming:donut 3", + recipe = { + {'', 'farming:wheat', ''}, + {'farming:wheat', '', 'farming:wheat'}, + {'', 'farming:wheat', ''}, + } +}) + +-- Chocolate Donut +minetest.register_craftitem("farming:donut_chocolate", { + description = "Chocolate Donut", + inventory_image = "farming_donut_chocolate.png", + on_use = minetest.item_eat(6), +}) + +minetest.register_craft({ + output = "farming:donut_chocolate", + recipe = { + {'farming:cocoa_beans'}, + {'farming:donut'}, + } +}) + +-- Apple Donut +minetest.register_craftitem("farming:donut_apple", { + description = "Apple Donut", + inventory_image = "farming_donut_apple.png", + on_use = minetest.item_eat(6), +}) + +minetest.register_craft({ + output = "farming:donut_apple", + recipe = { + {'default:apple'}, + {'farming:donut'}, + } +}) \ No newline at end of file diff --git a/mods/farming/grapes.lua b/mods/farming/grapes.lua new file mode 100644 index 00000000..9c93016b --- /dev/null +++ b/mods/farming/grapes.lua @@ -0,0 +1,201 @@ + +-- grapes +minetest.register_craftitem("farming:grapes", { + description = "Grapes", + inventory_image = "farming_grapes.png", + on_use = minetest.item_eat(2), + + on_place = function(itemstack, placer, pointed_thing) + + if minetest.is_protected(pointed_thing.under, placer:get_player_name()) then + return + end + + local nodename = minetest.get_node(pointed_thing.under).name + + if nodename == "farming:trellis" then + minetest.set_node(pointed_thing.under, {name = "farming:grapes_1"}) + + minetest.sound_play("default_place_node", {pos = pointed_thing.above, gain = 1.0}) + else + return + end + + if not minetest.setting_getbool("creative_mode") then + + itemstack:take_item() + + -- check for refill + if itemstack:get_count() == 0 then + + minetest.after(0.20, + farming.refill_plant, + placer, + "farming:grapes", + placer:get_wield_index() + ) + end + end + + return itemstack + end +}) + +-- grapes can be used for violet dye +minetest.register_craft({ + output = "dye:violet", + recipe = { + {'farming:grapes'}, + } +}) + +-- trellis +minetest.register_node("farming:trellis", { + description = "Trellis (place on soil before planting grapes)", + drawtype = "plantlike", + tiles = {"farming_trellis.png"}, + inventory_image = "farming_trellis.png", + visual_scale = 1.45, + paramtype = "light", + walkable = false, + buildable_to = true, + sunlight_propagates = true, + drop = "farming:trellis", + selection_box = farming.select, + groups = {snappy = 3, flammable = 2, attached_node = 1}, + sounds = default.node_sound_leaves_defaults(), + + on_place = function(itemstack, placer, pointed_thing) + + if minetest.is_protected(pointed_thing.under, placer:get_player_name()) then + return + end + + local nodename = minetest.get_node(pointed_thing.under).name + + if minetest.get_item_group(nodename, "soil") < 2 then + return + end + + local top = { + x = pointed_thing.above.x, + y = pointed_thing.above.y + 1, + z = pointed_thing.above.z + } + + nodename = minetest.get_node(top).name + + if nodename ~= "air" then + return + end + + minetest.set_node(pointed_thing.above, {name = "farming:trellis"}) + + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end + + return itemstack + end +}) + +minetest.register_craft({ + output = "farming:trellis", + recipe = { + {'default:stick', 'default:stick', 'default:stick'}, + {'default:stick', 'default:stick', 'default:stick'}, + {'default:stick', 'default:stick', 'default:stick'}, + } +}) + +minetest.register_craft({ + type = "fuel", + recipe = "farming:trellis", + burntime = 15, +}) + +-- grapes definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_grapes_1.png"}, + visual_scale = 1.45, + paramtype = "light", + walkable = false, + buildable_to = true, + sunlight_propagates = true, + drop = { + items = { + {items = {'farming:trellis'}, rarity = 1}, + } + }, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 3, not_in_creative_inventory = 1, + attached_node = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:grapes_1", table.copy(crop_def)) + +-- stage2 +crop_def.tiles = {"farming_grapes_2.png"} +minetest.register_node("farming:grapes_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_grapes_3.png"} +minetest.register_node("farming:grapes_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_grapes_4.png"} +minetest.register_node("farming:grapes_4", table.copy(crop_def)) + +-- stage 5 +crop_def.tiles = {"farming_grapes_5.png"} +minetest.register_node("farming:grapes_5", table.copy(crop_def)) + +-- stage 6 +crop_def.tiles = {"farming_grapes_6.png"} +minetest.register_node("farming:grapes_6", table.copy(crop_def)) + +-- stage 7 +crop_def.tiles = {"farming_grapes_7.png"} +minetest.register_node("farming:grapes_7", table.copy(crop_def)) + +-- stage 8 (final) +crop_def.tiles = {"farming_grapes_8.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:trellis'}, rarity = 1}, + {items = {'farming:grapes 3'}, rarity = 1}, + {items = {'farming:grapes 1'}, rarity = 2}, + {items = {'farming:grapes 1'}, rarity = 3}, + } +} +minetest.register_node("farming:grapes_8", table.copy(crop_def)) + +-- wild grape vine (this is what you find on the map) +minetest.register_node("farming:grapebush", { + drawtype = "plantlike", + tiles = {"farming_grapebush.png"}, + paramtype = "light", + waving = 1, + walkable = false, + buildable_to = true, + sunlight_propagates = true, + drop = { + items = { + {items = {'farming:grapes 1'}, rarity = 1}, + {items = {'farming:grapes 1'}, rarity = 2}, + {items = {'farming:grapes 1'}, rarity = 3}, + } + }, + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory=1 + }, + sounds = default.node_sound_leaves_defaults(), +}) diff --git a/mods/farming/grass.lua b/mods/farming/grass.lua new file mode 100644 index 00000000..aacb220f --- /dev/null +++ b/mods/farming/grass.lua @@ -0,0 +1,42 @@ + +for i = 3, 5 do + + -- Override default grass and have it drop Wheat Seeds + + minetest.override_item("default:grass_" .. i, { + drop = { + max_items = 1, + items = { + {items = {'farming:seed_wheat'}, rarity = 5}, + {items = {'default:grass_1'}}, + } + }, + }) + + -- Override default dry grass and have it drop Barley Seeds + if minetest.registered_nodes["default:dry_grass_1"] then + + minetest.override_item("default:dry_grass_" .. i, { + drop = { + max_items = 1, + items = { + {items = {'farming:seed_barley'}, rarity = 6}, + {items = {'default:dry_grass_1'}}, + } + }, + }) + end + +end + +-- Override default Jungle Grass and have it drop Cotton Seeds + +minetest.override_item("default:junglegrass", { + drop = { + max_items = 1, + items = { + {items = {'farming:seed_cotton'}, rarity = 8}, + {items = {'default:junglegrass'}}, + } + }, +}) diff --git a/mods/farming/hoes.lua b/mods/farming/hoes.lua new file mode 100644 index 00000000..ef27d420 --- /dev/null +++ b/mods/farming/hoes.lua @@ -0,0 +1,151 @@ + +-- Hoe registration function + +farming.register_hoe = function(name, def) + + -- Check for : prefix (register new hoes in your mod's namespace) + if name:sub(1,1) ~= ":" then + name = ":" .. name + end + + -- Check def table + if def.description == nil then + def.description = "Hoe" + end + + if def.inventory_image == nil then + def.inventory_image = "unknown_item.png" + end + + if def.recipe == nil then + def.recipe = { + {"air","air",""}, + {"","group:stick",""}, + {"","group:stick",""} + } + end + + if def.max_uses == nil then + def.max_uses = 30 + end + + -- Register the tool + minetest.register_tool(name, { + description = def.description, + inventory_image = def.inventory_image, + on_use = function(itemstack, user, pointed_thing) + return farming.hoe_on_use(itemstack, user, pointed_thing, def.max_uses) + end + }) + + -- Register its recipe + if def.material == nil then + minetest.register_craft({ + output = name:sub(2), + recipe = def.recipe + }) + else + minetest.register_craft({ + output = name:sub(2), + recipe = { + {def.material, def.material, ""}, + {"", "group:stick", ""}, + {"", "group:stick", ""} + } + }) + end +end + +-- Turns dirt with group soil=1 into soil + +function farming.hoe_on_use(itemstack, user, pointed_thing, uses) + + local pt = pointed_thing + + -- check if pointing at a node + if not pt or pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + local upos = pointed_thing.under + + if minetest.is_protected(upos, user:get_player_name()) then + minetest.record_protection_violation(upos, user:get_player_name()) + return + end + + local p = {x = pt.under.x, y = pt.under.y + 1, z = pt.under.z} + local above = minetest.get_node(p) + + -- return if any of the nodes is not registered + if not minetest.registered_nodes[under.name] + or not minetest.registered_nodes[above.name] then + return + end + + -- check if the node above the pointed thing is air + if above.name ~= "air" then + return + end + + -- check if pointing at dirt + if minetest.get_item_group(under.name, "soil") ~= 1 then + return + end + + -- turn the node into soil, wear out item and play sound + minetest.set_node(pt.under, {name = "farming:soil"}) + + minetest.sound_play("default_dig_crumbly", {pos = pt.under, gain = 0.5}) + + if not minetest.setting_getbool("creative_mode") then + itemstack:add_wear(65535/(uses-1)) + end + + return itemstack +end + +-- Define Hoes + +farming.register_hoe(":farming:hoe_wood", { + description = "Wooden Hoe", + inventory_image = "farming_tool_woodhoe.png", + max_uses = 30, + material = "group:wood" +}) + +farming.register_hoe(":farming:hoe_stone", { + description = "Stone Hoe", + inventory_image = "farming_tool_stonehoe.png", + max_uses = 90, + material = "group:stone" +}) + +farming.register_hoe(":farming:hoe_steel", { + description = "Steel Hoe", + inventory_image = "farming_tool_steelhoe.png", + max_uses = 200, + material = "default:steel_ingot" +}) + +farming.register_hoe(":farming:hoe_bronze", { + description = "Bronze Hoe", + inventory_image = "farming_tool_bronzehoe.png", + max_uses = 220, + material = "default:bronze_ingot" +}) + +farming.register_hoe(":farming:hoe_mese", { + description = "Mese Hoe", + inventory_image = "farming_tool_mesehoe.png", + max_uses = 350, + material = "default:mese_crystal" +}) + +farming.register_hoe(":farming:hoe_diamond", { + description = "Diamond Hoe", + inventory_image = "farming_tool_diamondhoe.png", + max_uses = 500, + material = "default:diamond" +}) diff --git a/mods/farming/init.lua b/mods/farming/init.lua new file mode 100644 index 00000000..2d92e094 --- /dev/null +++ b/mods/farming/init.lua @@ -0,0 +1,797 @@ +--[[ + Minetest Farming Redo Mod 1.22 (31st March 2016) + by TenPlus1 + NEW growing routine by prestidigitator + auto-refill by crabman77 +]] + +farming = {} +farming.mod = "redo" +farming.path = minetest.get_modpath("farming") +farming.hoe_on_use = default.hoe_on_use +farming.select = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5} +} + +farming.DEBUG = false +-- farming.DEBUG = {} -- Uncomment to turn on profiling code/functions + +local DEBUG_abm_runs = 0 +local DEBUG_abm_time = 0 +local DEBUG_timer_runs = 0 +local DEBUG_timer_time = 0 + +if farming.DEBUG then + + function farming.DEBUG.reset_times() + DEBUG_abm_runs = 0 + DEBUG_abm_time = 0 + DEBUG_timer_runs = 0 + DEBUG_timer_time = 0 + end + + function farming.DEBUG.report_times() + + local abm_n = DEBUG_abm_runs + local abm_dt = DEBUG_abm_time + local abm_avg = (abm_n > 0 and abm_dt / abm_n) or 0 + local timer_n = DEBUG_timer_runs + local timer_dt = DEBUG_timer_time + local timer_avg = (timer_n > 0 and timer_dt / timer_n) or 0 + local dt = abm_dt + timer_dt + + print("ABM ran for "..abm_dt.."µs over "..abm_n.." runs: "..abm_avg.."µs/run") + print("Timer ran for "..timer_dt.."µs over "..timer_n.." runs: "..timer_avg.."µs/run") + print("Total farming time: "..dt.."µs") + end +end + +local statistics = dofile(farming.path.."/statistics.lua") + +dofile(farming.path.."/soil.lua") +dofile(farming.path.."/banana.lua") +dofile(farming.path.."/hoes.lua") +dofile(farming.path.."/grass.lua") +dofile(farming.path.."/wheat.lua") +dofile(farming.path.."/cotton.lua") +dofile(farming.path.."/carrot.lua") +dofile(farming.path.."/potato.lua") +dofile(farming.path.."/tomato.lua") +dofile(farming.path.."/cucumber.lua") +dofile(farming.path.."/corn.lua") +dofile(farming.path.."/coffee.lua") +dofile(farming.path.."/melon.lua") +dofile(farming.path.."/sugar.lua") +dofile(farming.path.."/pumpkin.lua") +dofile(farming.path.."/cocoa.lua") +dofile(farming.path.."/raspberry.lua") +dofile(farming.path.."/strawberry.lua") +dofile(farming.path.."/blueberry.lua") +dofile(farming.path.."/rhubarb.lua") +dofile(farming.path.."/beanpole.lua") +dofile(farming.path.."/grapes.lua") +dofile(farming.path.."/barley.lua") +dofile(farming.path.."/oranges.lua") +dofile(farming.path.."/donut.lua") +dofile(farming.path.."/mapgen.lua") +dofile(farming.path.."/compatibility.lua") -- Farming Plus compatibility + +-- Utility Functions + +local time_speed = tonumber(minetest.setting_get("time_speed")) or 72 +local SECS_PER_CYCLE = (time_speed > 0 and 24 * 60 * 60 / time_speed) or 0 + +local function clamp(x, min, max) + return (x < min and min) or (x > max and max) or x +end + +local function in_range(x, min, max) + return min <= x and x <= max +end + +--- Tests the amount of day or night time between two times. + -- + -- @param t_game + -- The current time, as reported by mintest.get_gametime(). + -- @param t_day + -- The current time, as reported by mintest.get_timeofday(). + -- @param dt + -- The amount of elapsed time. + -- @param count_day + -- If true, count elapsed day time. Otherwise, count elapsed night time. + -- @return + -- The amount of day or night time that has elapsed. + +local function day_or_night_time(t_game, t_day, dt, count_day) + + local t1_day = t_day - dt / SECS_PER_CYCLE + local t1_c, t2_c -- t1_c < t2_c and t2_c always in [0, 1) + + if count_day then + + if t_day < 0.25 then + t1_c = t1_day + 0.75 -- Relative to sunup, yesterday + t2_c = t_day + 0.75 + else + t1_c = t1_day - 0.25 -- Relative to sunup, today + t2_c = t_day - 0.25 + end + else + if t_day < 0.75 then + t1_c = t1_day + 0.25 -- Relative to sundown, yesterday + t2_c = t_day + 0.25 + else + t1_c = t1_day - 0.75 -- Relative to sundown, today + t2_c = t_day - 0.75 + end + end + + local dt_c = clamp(t2_c, 0, 0.5) - clamp(t1_c, 0, 0.5) -- this cycle + + if t1_c < -0.5 then + local nc = math.floor(-t1_c) + t1_c = t1_c + nc + dt_c = dt_c + 0.5 * nc + clamp(-t1_c - 0.5, 0, 0.5) + end + + return dt_c * SECS_PER_CYCLE +end + +--- Tests the amount of elapsed day time. + -- + -- @param dt + -- The amount of elapsed time. + -- @return + -- The amount of day time that has elapsed. + -- +local function day_time(dt) + return day_or_night_time(minetest.get_gametime(), minetest.get_timeofday(), dt, true) +end + +--- Tests the amount of elapsed night time. + -- + -- @param dt + -- The amount of elapsed time. + -- @return + -- The amount of night time that has elapsed. + -- +local function night_time(time_game, time_day, dt, count_day) + return day_or_night_time(minetest.get_gametime(), minetest.get_timeofday(), dt, false) +end + + +-- Growth Logic + +local STAGE_LENGTH_AVG = 160.0 +local STAGE_LENGTH_DEV = STAGE_LENGTH_AVG / 6 +local MIN_LIGHT = 13 +local MAX_LIGHT = 1000 + +--- Determines plant name and stage from node. + -- + -- Separates node name on the last underscore (_). + -- + -- @param node + -- Node or position table, or node name. + -- @return + -- List (plant_name, stage), or nothing (nil) if node isn't loaded + +local function plant_name_stage(node) + + local name + + if type(node) == 'table' then + + if node.name then + name = node.name + elseif node.x and node.y and node.z then + node = minetest.get_node_or_nil(node) + name = node and node.name + end + else + name = tostring(node) + end + + if not name or name == "ignore" then + return nil + end + + local sep_pos = name:find("_[^_]+$") + + if sep_pos and sep_pos > 1 then + + local stage = tonumber(name:sub(sep_pos + 1)) + + if stage and stage >= 0 then + return name:sub(1, sep_pos - 1), stage + end + end + + return name, 0 +end + +-- Map from node name to +-- { plant_name = ..., name = ..., stage = n, stages_left = { node_name, ... } } + +local plant_stages = {} + +farming.plant_stages = plant_stages + +--- Registers the stages of growth of a (possible plant) node. + -- + -- @param node + -- Node or position table, or node name. + -- @return + -- The (possibly zero) number of stages of growth the plant will go through + -- before being fully grown, or nil if not a plant. + +local register_plant_node + +-- Recursive helper +local function reg_plant_stages(plant_name, stage, force_last) + + local node_name = plant_name and plant_name .. "_" .. stage + local node_def = node_name and minetest.registered_nodes[node_name] + + if not node_def then + return nil + end + + local stages = plant_stages[node_name] + + if stages then + return stages + end + + if minetest.get_item_group(node_name, "growing") > 0 then + + local ns = reg_plant_stages(plant_name, stage + 1, true) + local stages_left = (ns and { ns.name, unpack(ns.stages_left) }) or {} + + stages = { + plant_name = plant_name, + name = node_name, + stage = stage, + stages_left = stages_left + } + + if #stages_left > 0 then + + local old_constr = node_def.on_construct + local old_destr = node_def.on_destruct + + minetest.override_item(node_name, + { + on_construct = function(pos) + + if old_constr then + old_constr(pos) + end + + farming.handle_growth(pos) + end, + + on_destruct = function(pos) + + minetest.get_node_timer(pos):stop() + + if old_destr then + old_destr(pos) + end + end, + + on_timer = function(pos, elapsed) + return farming.plant_growth_timer(pos, elapsed, node_name) + end, + }) + end + + elseif force_last then + + stages = { + plant_name = plant_name, + name = node_name, + stage = stage, + stages_left = {} + } + else + return nil + end + + plant_stages[node_name] = stages + + return stages +end + +register_plant_node = function(node) + + local plant_name, stage = plant_name_stage(node) + + if plant_name then + + local stages = reg_plant_stages(plant_name, stage, false) + return stages and #stages.stages_left + else + return nil + end +end + +local function set_growing(pos, stages_left) + + if not stages_left then + return + end + + local timer = minetest.get_node_timer(pos) + + if stages_left > 0 then + + if not timer:is_started() then + + local stage_length = statistics.normal(STAGE_LENGTH_AVG, STAGE_LENGTH_DEV) + + stage_length = clamp(stage_length, 0.5 * STAGE_LENGTH_AVG, 3.0 * STAGE_LENGTH_AVG) + + timer:set(stage_length, -0.5 * math.random() * STAGE_LENGTH_AVG) + end + + elseif timer:is_started() then + timer:stop() + end +end + +-- https://git.tchncs.de/Illuna-Minetest/farming_plus/blob/master/init.lua#L54 + +function farming.generate_tree(pos, trunk, leaves, underground, replacements) + pos.y = pos.y-1 + local nodename = minetest.get_node(pos).name + local ret = true + for _,name in ipairs(underground) do + if nodename == name then + ret = false + break + end + end + pos.y = pos.y+1 + if not minetest.get_node_light(pos) then + return + end + if ret or minetest.get_node_light(pos) < 8 then + return + end + + node = {name = ""} + for dy=1,4 do + pos.y = pos.y+dy + if minetest.get_node(pos).name ~= "air" then + return + end + pos.y = pos.y-dy + end + node.name = trunk + for dy=0,4 do + pos.y = pos.y+dy + minetest.set_node(pos, node) + pos.y = pos.y-dy + end + + if not replacements then + replacements = {} + end + + node.name = leaves + pos.y = pos.y+3 + for dx=-2,2 do + for dz=-2,2 do + for dy=0,3 do + pos.x = pos.x+dx + pos.y = pos.y+dy + pos.z = pos.z+dz + + if dx == 0 and dz == 0 and dy==3 then + if minetest.get_node(pos).name == "air" and math.random(1, 5) <= 4 then + minetest.set_node(pos, node) + for name,rarity in pairs(replacements) do + if math.random(1, rarity) == 1 then + minetest.set_node(pos, {name=name}) + end + end + end + elseif dx == 0 and dz == 0 and dy==4 then + if minetest.get_node(pos).name == "air" and math.random(1, 5) <= 4 then + minetest.set_node(pos, node) + for name,rarity in pairs(replacements) do + if math.random(1, rarity) == 1 then + minetest.set_node(pos, {name=name}) + end + end + end + elseif math.abs(dx) ~= 2 and math.abs(dz) ~= 2 then + if minetest.get_node(pos).name == "air" then + minetest.set_node(pos, node) + for name,rarity in pairs(replacements) do + if math.random(1, rarity) == 1 then + minetest.set_node(pos, {name=name}) + end + end + end + else + if math.abs(dx) ~= 2 or math.abs(dz) ~= 2 then + if minetest.get_node(pos).name == "air" and math.random(1, 5) <= 4 then + minetest.set_node(pos, node) + for name,rarity in pairs(replacements) do + if math.random(1, rarity) == 1 then + minetest.set_node(pos, {name=name}) + end + end + end + end + end + + pos.x = pos.x-dx + pos.y = pos.y-dy + pos.z = pos.z-dz + end + end + end +end + +-- Detects a plant type node at the given position, starting +-- or stopping the plant growth timer as appopriate + +-- @param pos +-- The node's position. +-- @param node +-- The cached node table if available, or nil. + +function farming.handle_growth(pos, node) + + if not pos then + return + end + + local stages_left = register_plant_node(node or pos) + + if stages_left then + set_growing(pos, stages_left) + end +end + +minetest.after(0, function() + + for _, node_def in pairs(minetest.registered_nodes) do + register_plant_node(node_def) + end +end) + +local abm_func = farming.handle_growth + +if farming.DEBUG then + + local normal_abm_func = abm_func + + abm_func = function(...) + + local t0 = minetest.get_us_time() + local r = { normal_abm_func(...) } + local t1 = minetest.get_us_time() + + DEBUG_abm_runs = DEBUG_abm_runs + 1 + DEBUG_abm_time = DEBUG_abm_time + (t1 - t0) + + return unpack(r) + end +end + +-- Just in case a growing type or added node is missed (also catches existing +-- nodes added to map before timers were incorporated). + +minetest.register_abm({ + nodenames = { "group:growing" }, + interval = 300, + chance = 1, + action = abm_func +}) + +-- Plant timer function. +-- Grows plants under the right conditions. + +function farming.plant_growth_timer(pos, elapsed, node_name) + + local stages = plant_stages[node_name] + + if not stages then + return false + end + + local max_growth = #stages.stages_left + + if max_growth <= 0 then + return false + end + + if stages.plant_name == "farming:cocoa" then + + if not minetest.find_node_near(pos, 1, + {"default:jungletree", "moretrees:jungletree_leaves_green"}) then + + return true + end + else + local under = minetest.get_node_or_nil({ x = pos.x, y = pos.y - 1, z = pos.z }) + + if not under or under.name ~= "farming:soil_wet" then + return true + end + end + + local growth + local light_pos = {x = pos.x, y = pos.y, z = pos.z} + local lambda = elapsed / STAGE_LENGTH_AVG + + if lambda < 0.1 then + return true + end + + if max_growth == 1 or lambda < 2.0 then + + local light = (minetest.get_node_light(light_pos) or 0) + --print ("light level:", light) + + if not in_range(light, MIN_LIGHT, MAX_LIGHT) then + return true + end + + growth = 1 + else + local night_light = (minetest.get_node_light(light_pos, 0) or 0) + local day_light = (minetest.get_node_light(light_pos, 0.5) or 0) + local night_growth = in_range(night_light, MIN_LIGHT, MAX_LIGHT) + local day_growth = in_range(day_light, MIN_LIGHT, MAX_LIGHT) + + if not night_growth then + + if not day_growth then + return true + end + + lambda = day_time(elapsed) / STAGE_LENGTH_AVG + + elseif not day_growth then + + lambda = night_time(elapsed) / STAGE_LENGTH_AVG + end + + growth = statistics.poisson(lambda, max_growth) + + if growth < 1 then + return true + end + end + + if minetest.registered_nodes[stages.stages_left[growth]] then + minetest.swap_node(pos, {name = stages.stages_left[growth]}) + else + return true + end + + return growth ~= max_growth +end + +if farming.DEBUG then + + local timer_func = farming.plant_growth_timer; + + farming.plant_growth_timer = function(pos, elapsed, node_name) + + local t0 = minetest.get_us_time() + local r = { timer_func(pos, elapsed, node_name) } + local t1 = minetest.get_us_time() + + DEBUG_timer_runs = DEBUG_timer_runs + 1 + DEBUG_timer_time = DEBUG_timer_time + (t1 - t0) + + return unpack(r) + end +end + +-- refill placed plant by crabman (26/08/2015) +local can_refill_plant = { + ["farming:blueberry_1"] = "farming:blueberries", + ["farming:carrot_1"] = "farming:carrot", + ["farming:coffee_1"] = "farming:coffee_beans", + ["farming:corn_1"] = "farming:corn", + ["farming:cotton_1"] = "farming:seed_cotton", + ["farming:cucumber_1"] = "farming:cucumber", + ["farming:melon_1"] = "farming:melon_slice", + ["farming:potato_1"] = "farming:potato", + ["farming:pumpkin_1"] = "farming:pumpkin_slice", + ["farming:raspberry_1"] = "farming:raspberries", + ["farming:rhubarb_1"] = "farming:rhubarb", + ["farming:tomato_1"] = "farming:tomato", + ["farming:wheat_1"] = "farming:seed_wheat", + ["farming:grapes_1"] = "farming:grapes", + ["farming:beans_1"] = "farming:beans", + ["farming:rhubarb_1"] = "farming:rhubarb", + ["farming:cocoa_1"] = "farming:cocoa_beans", + ["farming:orange_1"] = "farming:orange_item", +} + +function farming.refill_plant(player, plantname, index) + + local inv = player:get_inventory() + local old_stack = inv:get_stack("main", index) + + if old_stack:get_name() ~= "" then + return + end + + for i, stack in pairs(inv:get_list("main")) do + + if stack:get_name() == plantname and i ~= index then + + inv:set_stack("main", index, stack) + stack:clear() + inv:set_stack("main", i, stack) + --minetest.log("action", "farming: refilled stack("..plantname..") of " .. player:get_player_name() ) + return + end + end +end + +-- Place Seeds on Soil + +function farming.place_seed(itemstack, placer, pointed_thing, plantname) + + local pt = pointed_thing + + -- check if pointing at a node + if not pt or pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + local above = minetest.get_node(pt.above) + + -- check if pointing at the top of the node + if pt.above.y ~= pt.under.y + 1 then + return + end + + -- return if any of the nodes is not registered + if not minetest.registered_nodes[under.name] + or not minetest.registered_nodes[above.name] then + return + end + + -- can I replace above node, and am I pointing at soil + if not minetest.registered_nodes[above.name].buildable_to + or minetest.get_item_group(under.name, "soil") < 2 + -- avoid multiple seed placement bug + or minetest.get_item_group(above.name, "plant") ~= 0 then + return + end + + -- if not protected then add node and remove 1 item from the itemstack + if not minetest.is_protected(pt.above, placer:get_player_name()) then + + minetest.set_node(pt.above, {name = plantname, param2 = 1}) + + minetest.sound_play("default_place_node", {pos = pt.above, gain = 1.0}) + + if not minetest.setting_getbool("creative_mode") then + + itemstack:take_item() + + -- check for refill + if itemstack:get_count() == 0 + and can_refill_plant[plantname] then + + minetest.after(0.10, + farming.refill_plant, + placer, + can_refill_plant[plantname], + placer:get_wield_index() + ) + end + end + + return itemstack + end +end + +-- Function to register plants (for compatibility) + +farming.register_plant = function(name, def) + + local mname = name:split(":")[1] + local pname = name:split(":")[2] + + -- Check def table + if not def.description then + def.description = "Seed" + end + + if not def.inventory_image then + def.inventory_image = "unknown_item.png" + end + + if not def.steps then + return nil + end + + -- Register seed + minetest.register_node(":" .. mname .. ":seed_" .. pname, { + + description = def.description, + tiles = {def.inventory_image}, + inventory_image = def.inventory_image, + wield_image = def.inventory_image, + drawtype = "signlike", + groups = {seed = 1, snappy = 3, attached_node = 1}, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = farming.select, + + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, mname .. ":"..pname.."_1") + end, + }) + + -- Register harvest + minetest.register_craftitem(":" .. mname .. ":" .. pname, { + description = pname:gsub("^%l", string.upper), + inventory_image = mname .. "_" .. pname .. ".png", + }) + + -- Register growing steps + for i = 1, def.steps do + + local drop = { + items = { + {items = {mname .. ":" .. pname}, rarity = 9 - i}, + {items = {mname .. ":" .. pname}, rarity= 18 - i * 2}, + {items = {mname .. ":seed_" .. pname}, rarity = 9 - i}, + {items = {mname .. ":seed_" .. pname}, rarity = 18 - i * 2}, + } + } + + local g = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, growing = 1} + + -- Last step doesn't need growing=1 so Abm never has to check these + if i == def.steps then + g = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1} + end + + local node_name = mname .. ":" .. pname .. "_" .. i + + minetest.register_node(node_name, { + drawtype = "plantlike", + waving = 1, + tiles = {mname .. "_" .. pname .. "_" .. i .. ".png"}, + paramtype = "light", + walkable = false, + buildable_to = true, + drop = drop, + selection_box = farming.select, + groups = g, + sounds = default.node_sound_leaves_defaults(), + }) + + register_plant_node(node_name) + end + + -- Return info + local r = {seed = mname .. ":seed_" .. pname, harvest = mname .. ":" .. pname} + return r +end + +--[[ Cotton (example, is already registered in cotton.lua) +farming.register_plant("farming:cotton", { + description = "Cotton2 seed", + inventory_image = "farming_cotton_seed.png", + steps = 8, +})]] diff --git a/mods/farming/init.lua_orig b/mods/farming/init.lua_orig new file mode 100644 index 00000000..aee9976f --- /dev/null +++ b/mods/farming/init.lua_orig @@ -0,0 +1,192 @@ +--[[ + Minetest Farming Redo Mod 1.14 (11th May 2015) + by TenPlus1 +]] + +farming = {} +farming.mod = "redo" +farming.path = minetest.get_modpath("farming") +farming.hoe_on_use = default.hoe_on_use + +dofile(farming.path.."/soil.lua") +dofile(farming.path.."/hoes.lua") +dofile(farming.path.."/grass.lua") +dofile(farming.path.."/wheat.lua") +dofile(farming.path.."/cotton.lua") +dofile(farming.path.."/carrot.lua") +dofile(farming.path.."/potato.lua") +dofile(farming.path.."/tomato.lua") +dofile(farming.path.."/cucumber.lua") +dofile(farming.path.."/corn.lua") +dofile(farming.path.."/coffee.lua") +dofile(farming.path.."/melon.lua") +dofile(farming.path.."/sugar.lua") +dofile(farming.path.."/pumpkin.lua") +dofile(farming.path.."/cocoa.lua") +dofile(farming.path.."/raspberry.lua") +dofile(farming.path.."/blueberry.lua") +dofile(farming.path.."/rhubarb.lua") +dofile(farming.path.."/beanpole.lua") +dofile(farming.path.."/donut.lua") +dofile(farming.path.."/mapgen.lua") +dofile(farming.path.."/compatibility.lua") -- Farming Plus compatibility + +-- Place Seeds on Soil + +function farming.place_seed(itemstack, placer, pointed_thing, plantname) + local pt = pointed_thing + + -- check if pointing at a node + if not pt and pt.type ~= "node" then + return + end + + local under = minetest.get_node(pt.under) + local above = minetest.get_node(pt.above) + + -- check if pointing at the top of the node + if pt.above.y ~= pt.under.y+1 then + return + end + + -- return if any of the nodes is not registered + if not minetest.registered_nodes[under.name] + or not minetest.registered_nodes[above.name] then + return + end + + -- can I replace above node, and am I pointing at soil + if not minetest.registered_nodes[above.name].buildable_to + or minetest.get_item_group(under.name, "soil") < 2 + or minetest.get_item_group(above.name, "plant") ~= 0 then -- ADDED this line for multiple seed placement bug + return + end + + -- add the node and remove 1 item from the itemstack + if not minetest.is_protected(pt.above, placer:get_player_name()) then + minetest.add_node(pt.above, {name=plantname}) + if not minetest.setting_getbool("creative_mode") then + itemstack:take_item() + end + return itemstack + end +end + +-- Single ABM Handles Growing of All Plants + +minetest.register_abm({ + nodenames = {"group:growing"}, + neighbors = {"farming:soil_wet", "default:jungletree"}, + interval = 80, + chance = 2, + + action = function(pos, node) + + -- split plant name (e.g. farming:wheat_1) + local plant = node.name:split("_")[1].."_" + local numb = node.name:split("_")[2] + + -- fully grown ? + if not minetest.registered_nodes[plant..(numb + 1)] then return end + + -- cocoa pod on jungle tree ? + if plant ~= "farming:cocoa_" then + + -- growing on wet soil ? + if minetest.get_node({x=pos.x,y=pos.y-1,z=pos.z}).name ~= "farming:soil_wet" then return end + end + + -- enough light ? + if minetest.get_node_light(pos) < 13 then return end + + -- grow + minetest.set_node(pos, {name=plant..(numb + 1)}) + + end +}) + +-- Function to register plants (for compatibility) + +farming.register_plant = function(name, def) + local mname = name:split(":")[1] + local pname = name:split(":")[2] + + -- Check def table + if not def.description then + def.description = "Seed" + end + if not def.inventory_image then + def.inventory_image = "unknown_item.png" + end + if not def.steps then + return nil + end + + -- Register seed + minetest.register_node(":" .. mname .. ":seed_" .. pname, { + description = def.description, + tiles = {def.inventory_image}, + inventory_image = def.inventory_image, + wield_image = def.inventory_image, + drawtype = "signlike", + groups = {seed = 1, snappy = 3, attached_node = 1}, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},}, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, mname .. ":"..pname.."_1") + end + }) + + -- Register harvest + minetest.register_craftitem(":" .. mname .. ":" .. pname, { + description = pname:gsub("^%l", string.upper), + inventory_image = mname .. "_" .. pname .. ".png", + }) + + -- Register growing steps + for i=1,def.steps do + local drop = { + items = { + {items = {mname .. ":" .. pname}, rarity = 9 - i}, + {items = {mname .. ":" .. pname}, rarity= 18 - i * 2}, + {items = {mname .. ":seed_" .. pname}, rarity = 9 - i}, + {items = {mname .. ":seed_" .. pname}, rarity = 18 - i * 2}, + } + } + + local g = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1, growing = 1} + -- Last step doesn't need growing=1 so Abm never has to check these + if i == def.steps then + g = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1} + end + + minetest.register_node(mname .. ":" .. pname .. "_" .. i, { + drawtype = "plantlike", + waving = 1, + tiles = {mname .. "_" .. pname .. "_" .. i .. ".png"}, + paramtype = "light", + walkable = false, + buildable_to = true, + is_ground_content = true, + drop = drop, + selection_box = {type = "fixed", fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},}, + groups = g, + sounds = default.node_sound_leaves_defaults(), + }) + end + + -- Return info + local r = {seed = mname .. ":seed_" .. pname, harvest = mname .. ":" .. pname} + return r +end + +--[[ Cotton (example, is already registered in cotton.lua) +farming.register_plant("farming:cotton", { + description = "Cotton seed", + inventory_image = "farming_cotton_seed.png", + steps = 8, +}) +--]] diff --git a/mods/farming/license.txt b/mods/farming/license.txt new file mode 100644 index 00000000..5d30c149 --- /dev/null +++ b/mods/farming/license.txt @@ -0,0 +1,14 @@ + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2004 Sam Hocevar + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. \ No newline at end of file diff --git a/mods/farming/mapgen.lua b/mods/farming/mapgen.lua new file mode 100644 index 00000000..1cb46ca2 --- /dev/null +++ b/mods/farming/mapgen.lua @@ -0,0 +1,65 @@ +-- decoration function +local function register_plant(name, min, max, spawnby, num) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.006, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = min, + y_max = max, + decoration = "farming:" .. name, + spawn_by = spawnby, + num_spawn_by = num, + }) +end + +function farming.register_mgv6_decorations() + register_plant("potato_3", 15, 40, "", -1) + register_plant("tomato_7", 5, 20, "", -1) + register_plant("carrot_8", 1, 30, "group:water", 1) + register_plant("cucumber_4", 1, 20, "group:water", 1) + register_plant("corn_7", 12, 22, "", -1) + register_plant("corn_8", 10, 20, "", -1) + register_plant("coffee_5", 20, 45, "", -1) + register_plant("melon_8", 1, 20, "group:water", 1) + register_plant("pumpkin_8", 1, 20, "group:water", 1) + register_plant("raspberry_4", 3, 10, "", -1) + register_plant("rhubarb_3", 3, 15, "", -1) + register_plant("blueberry_4", 3, 10, "", -1) + register_plant("beanbush", 18, 35, "", -1) + register_plant("grapebush", 25, 45, "", -1) + register_plant("strawberry_4", 3, 10, "", -1) +end + +-- v7 maps have a beach so plants growing near water is limited to 6 high +function farming.register_mgv7_decorations() + register_plant("potato_3", 15, 40, "", -1) + register_plant("tomato_7", 5, 20, "", -1) + register_plant("carrot_8", 1, 6, "", -1) + register_plant("cucumber_4", 1, 6, "", -1) + register_plant("corn_7", 12, 22, "", -1) + register_plant("corn_8", 10, 20, "", -1) + register_plant("coffee_5", 20, 45, "", -1) + register_plant("melon_8", 1, 6, "", -1) + register_plant("pumpkin_8", 1, 6, "", -1) + register_plant("raspberry_4", 3, 10, "", -1) + register_plant("rhubarb_3", 3, 15, "", -1) + register_plant("blueberry_4", 3, 10, "", -1) + register_plant("beanbush", 18, 35, "", -1) + register_plant("grapebush", 25, 45, "", -1) + register_plant("strawberry_4", 3, 10, "", -1) +end + +-- detect mapgen +if minetest.get_mapgen_params().mgname == "v6" then + farming.register_mgv6_decorations() +else + farming.register_mgv7_decorations() +end diff --git a/mods/farming/melon.lua b/mods/farming/melon.lua new file mode 100644 index 00000000..fb59e7bf --- /dev/null +++ b/mods/farming/melon.lua @@ -0,0 +1,80 @@ + +-- melon +minetest.register_craftitem("farming:melon_slice", { + description = "Melon Slice", + inventory_image = "farming_melon_slice.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:melon_1") + end, + on_use = minetest.item_eat(2), +}) + +minetest.register_craft({ + output = "farming:melon_8", + recipe = { + {"farming:melon_slice", "farming:melon_slice", "farming:melon_slice"}, + {"farming:melon_slice", "farming:melon_slice", "farming:melon_slice"}, + {"farming:melon_slice", "farming:melon_slice", "farming:melon_slice"}, + } +}) + +minetest.register_craft({ + output = "farming:melon_slice 9", + recipe = { + {"", "farming:melon_8", ""}, + } +}) + +-- melon definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_melon_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:melon_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_melon_2.png"} +minetest.register_node("farming:melon_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_melon_3.png"} +minetest.register_node("farming:melon_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_melon_4.png"} +minetest.register_node("farming:melon_4", table.copy(crop_def)) + +-- stage 5 +crop_def.tiles = {"farming_melon_5.png"} +minetest.register_node("farming:melon_5", table.copy(crop_def)) + +-- stage 6 +crop_def.tiles = {"farming_melon_6.png"} +minetest.register_node("farming:melon_6", table.copy(crop_def)) + +-- stage 7 +crop_def.tiles = {"farming_melon_7.png"} +minetest.register_node("farming:melon_7", table.copy(crop_def)) + +-- stage 8 (final) +crop_def.drawtype = "nodebox" +crop_def.description = "Melon" +crop_def.tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png"} +crop_def.selection_box = {-.5, -.5, -.5, .5, .5, .5} +crop_def.walkable = true +crop_def.groups = {snappy = 3, oddly_breakable_by_hand = 1, flammable = 2, plant = 1} +crop_def.drop = "farming:melon_slice 9" +minetest.register_node("farming:melon_8", table.copy(crop_def)) diff --git a/mods/farming/mod.conf b/mods/farming/mod.conf new file mode 100644 index 00000000..80ab8b0b --- /dev/null +++ b/mods/farming/mod.conf @@ -0,0 +1 @@ +name = farming \ No newline at end of file diff --git a/mods/farming/oranges.lua b/mods/farming/oranges.lua new file mode 100644 index 00000000..88e39afa --- /dev/null +++ b/mods/farming/oranges.lua @@ -0,0 +1,58 @@ +minetest.register_craftitem("farming:orange_seed", { + description = "Orange Seeds", + inventory_image = "farming_orange_seed.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:orange_1") + end +}) + +minetest.register_craftitem("farming:orange_item", { + description = "Orange", + inventory_image = "farming_orange.png", + on_use = minetest.item_eat(4), + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:orange_1") + end +}) + +-- orange definition +local crop_def = { + paramtype = "plantlike", + walkable = false, + paramtype = "light", + sunlight_propagates = true, + buildable_to = true, + drawtype = "plantlike", + drop = "", + tiles = {"farming_orange_1.png"}, + selection_box = farming.select, + groups = {snappy=3, flammable=2, not_in_creative_inventory=1,plant=1,growing=1}, + sounds = default.node_sound_leaves_defaults(), +} + +-- stage 1 +minetest.register_node("farming:orange_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_orange_2.png"} +minetest.register_node("farming:orange_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_orange_3.png"} +minetest.register_node("farming:orange_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_orange_4.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + { items = {'farming:orange_seed'} }, + { items = {'farming:orange_seed'}, rarity = 2}, + { items = {'farming:orange_seed'}, rarity = 5}, + { items = {'farming:orange_item'} }, + { items = {'farming:orange_item'}, rarity = 2 }, + { items = {'farming:orange_item'}, rarity = 5 }, + } +} + +minetest.register_node("farming:orange_4", table.copy(crop_def)) diff --git a/mods/farming/potato.lua b/mods/farming/potato.lua new file mode 100644 index 00000000..fa95442c --- /dev/null +++ b/mods/farming/potato.lua @@ -0,0 +1,85 @@ + +--[[ + Original textures from DocFarming mod + https://forum.minetest.net/viewtopic.php?id=3948 +]] + +minetest.register_craftitem("farming:potato_seed", { + description = "Potato Seeds", + inventory_image = "farming_potato_seed.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1") + end +}) + +-- potato +minetest.register_craftitem("farming:potato", { + description = "Potato", + inventory_image = "farming_potato.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:potato_1") + end, + on_use = minetest.item_eat(1), +}) + +-- baked potato +minetest.register_craftitem("farming:baked_potato", { + description = "Baked Potato", + inventory_image = "farming_baked_potato.png", + on_use = minetest.item_eat(6), +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 10, + output = "farming:baked_potato", + recipe = "farming:potato" +}) + +-- potato definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_potato_1.png"}, + paramtype = "light", + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:potato_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_potato_2.png"} +minetest.register_node("farming:potato_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_potato_3.png"} +crop_def.drop = { + items = { + {items = {'farming:potato'}, rarity = 1}, + {items = {'farming:potato_seed'}, rarity = 1}, + {items = {'farming:potato'}, rarity = 3}, + } +} +minetest.register_node("farming:potato_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_potato_4.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:potato 2'}, rarity = 1}, + {items = {'farming:potato_seed 2'}, rarity = 1}, + {items = {'farming:potato 3'}, rarity = 2}, + } +} +minetest.register_node("farming:potato_4", table.copy(crop_def)) diff --git a/mods/farming/pumpkin.lua b/mods/farming/pumpkin.lua new file mode 100644 index 00000000..67ecb9c5 --- /dev/null +++ b/mods/farming/pumpkin.lua @@ -0,0 +1,346 @@ + +--[[ + Big thanks to PainterlyPack.net for allowing me to use these textures +]] + +minetest.register_craftitem("farming:pumpkin_seed", { + description = "Pumpkin Seed", + inventory_image = "farming_pumpkin_seed.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:pumpkin_1") + end +}) + +-- pumpkin +minetest.register_node("farming:pumpkin", { + description = "Pumpkin", + tiles = { + "farming_pumpkin_top.png", + "farming_pumpkin_top.png", + "farming_pumpkin_side.png" + }, + groups = { + choppy = 1, oddly_breakable_by_hand = 1, + flammable = 2, plant = 1 + }, + drop = { + items = { + {items = {'farming:pumpkin_slice 9'}, rarity = 1}, + } + }, + sounds = default.node_sound_wood_defaults(), +}) + +-- pumpkin slice +minetest.register_craftitem("farming:pumpkin_slice", { + description = "Pumpkin Slice", + inventory_image = "farming_pumpkin_slice.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:pumpkin_1") + end, + on_use = minetest.item_eat(2), +}) + +minetest.register_craft({ + output = "farming:pumpkin", + recipe = { + {"farming:pumpkin_slice", "farming:pumpkin_slice", "farming:pumpkin_slice"}, + {"farming:pumpkin_slice", "farming:pumpkin_slice", "farming:pumpkin_slice"}, + {"farming:pumpkin_slice", "farming:pumpkin_slice", "farming:pumpkin_slice"}, + } +}) + +minetest.register_craft({ + output = "farming:pumpkin_slice 9", + recipe = { + {"", "farming:pumpkin", ""}, + } +}) + +-- jack 'o lantern +minetest.register_node("farming:jackolantern", { + description = "Jack 'O Lantern", + tiles = { + "farming_pumpkin_top.png", + "farming_pumpkin_top.png", + "farming_pumpkin_side.png", + "farming_pumpkin_side.png", + "farming_pumpkin_side.png", + "farming_pumpkin_face_off.png" + }, + paramtype2 = "facedir", + groups = {choppy = 1, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + on_punch = function(pos, node, puncher) + node.name = "farming:jackolantern_on" + minetest.swap_node(pos, node) + end, +}) + +minetest.register_node("farming:jackolantern_on", { + description = "Jack 'O Lantern", + tiles = { + "farming_pumpkin_top.png", + "farming_pumpkin_top.png", + "farming_pumpkin_side.png", + "farming_pumpkin_side.png", + "farming_pumpkin_side.png", + "farming_pumpkin_face_on.png" + }, + light_source = default.LIGHT_MAX - 1, + paramtype2 = "facedir", + groups = {choppy = 1, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + drop = "farming:jackolantern", + on_punch = function(pos, node, puncher) + node.name = "farming:jackolantern" + minetest.swap_node(pos, node) + end, +}) + +minetest.register_craft({ + output = "farming:jackolantern", + recipe = { + {"", "", ""}, + {"", "default:torch", ""}, + {"", "farming:pumpkin", ""}, + } +}) + +-- scarecrow +local box1 = { + {-1, -8, -1, 1, 8, 1}, +} + +local box2 = { + {-1, -8, -1, 1, 8, 1}, + {-12, -8, -1, 12, -7, 1}, + {-5, -2, -5, 5, 8, 5} +} + +for j,list in ipairs(box1) do + for i,int in ipairs(list) do + list[i] = int/16 + end + box1[j] = list +end + +for j,list in ipairs(box2) do + for i,int in ipairs(list) do + list[i] = int/16 + end + box2[j] = list +end + +minetest.register_node("farming:scarecrow", { + description = "Scarecrow", + paramtype = "light", + sunlight_propagates = true, + paramtype2 = "facedir", + tiles = {"farming_scarecrow_top.png", "farming_scarecrow_top.png", "farming_scarecrow_side.png", "farming_scarecrow_side.png", "farming_scarecrow_side.png", "farming_scarecrow_front.png"}, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = box2 + }, + selection_box = { + type = "fixed", + fixed = { + {-12/16, -1.5, -0.5, 12/16, 0.5, 0.5} + } + }, + groups = {choppy=2, oddly_breakable_by_hand=2, flammable=2}, + + after_place_node = function(pos, placer) + local node = minetest.get_node(pos) + local param2 = node.param2 + pos.y = pos.y+1 + if minetest.get_node(pos).name ~= "air" then + pos.y = pos.y-1 + minetest.remove_node(pos) + minetest.after(0.1, function(placer) + local inv = placer:get_inventory() + local index = placer:get_wield_index() + inv:set_stack("main", index, ItemStack("farming:scarecrow")) + end, placer) + return + end + minetest.set_node(pos, node) + pos.y = pos.y-1 + node.name = "farming:scarecrow_bottom" + minetest.set_node(pos, node) + end, + + after_destruct = function(pos, oldnode) + pos.y = pos.y-1 + if minetest.get_node(pos).name == "farming:scarecrow_bottom" then + minetest.remove_node(pos) + end + end +}) + +minetest.register_node("farming:scarecrow_bottom", { + paramtype = "light", + sunlight_propagates = true, + paramtype2 = "facedir", + tiles = {"default_wood.png"}, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = box1 + }, + groups = {not_in_creative_inventory=1}, + selection_box = { + type = "fixed", + fixed = { + {0, 0, 0, 0, 0, 0} + } + } +}) + +minetest.register_craft({ + output = "farming:scarecrow", + recipe = { + {"", "farming:pumpkin_face", "",}, + {"default:stick", "default:stick", "default:stick",}, + {"", "default:stick", "",} + } +}) + +minetest.register_node("farming:scarecrow_light", { + description = "Scarecrow With light", + paramtype = "light", + sunlight_propagates = true, + paramtype2 = "facedir", + light_source = LIGHT_MAX-2, + tiles = {"farming_scarecrow_top.png", "farming_scarecrow_top.png", "farming_scarecrow_side.png", "farming_scarecrow_side.png", "farming_scarecrow_side.png", "farming_scarecrow_front_light.png"}, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = box2 + }, + selection_box = { + type = "fixed", + fixed = { + {-12/16, -1.5, -0.5, 12/16, 0.5, 0.5} + } + }, + groups = {choppy=2, oddly_breakable_by_hand=2, flammable=2}, + + after_place_node = function(pos, placer) + local node = minetest.get_node(pos) + local param2 = node.param2 + pos.y = pos.y+1 + if minetest.get_node(pos).name ~= "air" then + pos.y = pos.y-1 + minetest.remove_node(pos) + minetest.after(0.1, function(placer) + local inv = placer:get_inventory() + local index = placer:get_wield_index() + inv:set_stack("main", index, ItemStack("farming:scarecrow_light")) + end, placer) + return + end + minetest.set_node(pos, node) + pos.y = pos.y-1 + node.name = "farming:scarecrow_bottom" + minetest.set_node(pos, node) + end, + + after_destruct = function(pos, oldnode) + pos.y = pos.y-1 + if minetest.get_node(pos).name == "farming:scarecrow_bottom" then + minetest.remove_node(pos) + end + end +}) + +minetest.register_craft({ + output = "farming:scarecrow_light", + recipe = { + {"", "farming:pumpkin_face_light", "",}, + {"default:stick", "default:stick", "default:stick",}, + {"", "default:stick", "",} + } +}) + +-- pumpkin bread +minetest.register_craftitem("farming:pumpkin_bread", { + description = ("Pumpkin Bread"), + inventory_image = "farming_pumpkin_bread.png", + on_use = minetest.item_eat(8) +}) + +minetest.register_craftitem("farming:pumpkin_dough", { + description = "Pumpkin Dough", + inventory_image = "farming_pumpkin_dough.png", +}) + +minetest.register_craft({ + output = "farming:pumpkin_dough", + type = "shapeless", + recipe = {"farming:flour", "farming:pumpkin_slice", "farming:pumpkin_slice"} +}) + +minetest.register_craft({ + type = "cooking", + output = "farming:pumpkin_bread", + recipe = "farming:pumpkin_dough", + cooktime = 10 +}) + +-- pumpkin definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_pumpkin_1.png"}, + paramtype = "light", + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:pumpkin_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_pumpkin_2.png"} +minetest.register_node("farming:pumpkin_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_pumpkin_3.png"} +minetest.register_node("farming:pumpkin_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_pumpkin_4.png"} +minetest.register_node("farming:pumpkin_4", table.copy(crop_def)) + +-- stage 5 +crop_def.tiles = {"farming_pumpkin_5.png"} +minetest.register_node("farming:pumpkin_5", table.copy(crop_def)) + +-- stage 6 +crop_def.tiles = {"farming_pumpkin_6.png"} +minetest.register_node("farming:pumpkin_6", table.copy(crop_def)) + +-- stage 7 +crop_def.tiles = {"farming_pumpkin_7.png"} +minetest.register_node("farming:pumpkin_7", table.copy(crop_def)) + +-- stage 8 (final) +crop_def.tiles = {"farming_pumpkin_8.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:pumpkin_slice 9'}, rarity = 1}, + {items = {'farming:pumpkin_slice 4'}, rarity = 1}, + } +} +minetest.register_node("farming:pumpkin_8", table.copy(crop_def)) diff --git a/mods/farming/raspberry.lua b/mods/farming/raspberry.lua new file mode 100644 index 00000000..686ea5a7 --- /dev/null +++ b/mods/farming/raspberry.lua @@ -0,0 +1,74 @@ +minetest.register_craftitem("farming:raspberry_seed", { + description = "Raspberry Seeds", + inventory_image = "farming_raspberry_seed.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1") + end +}) + +-- raspberries +minetest.register_craftitem("farming:raspberries", { + description = "Raspberries", + inventory_image = "farming_raspberries.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:raspberry_1") + end, + on_use = minetest.item_eat(1), +}) + +-- raspberry smoothie +minetest.register_craftitem("farming:smoothie_raspberry", { + description = "Raspberry Smoothie", + inventory_image = "farming_raspberry_smoothie.png", + on_use = minetest.item_eat(2, "vessels:drinking_glass"), +}) + +minetest.register_craft({ + output = "farming:smoothie_raspberry", + recipe = { + {"default:snow"}, + {"farming:raspberries"}, + {"vessels:drinking_glass"}, + } +}) + +-- raspberries definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_raspberry_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:raspberry_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_raspberry_2.png"} +minetest.register_node("farming:raspberry_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_raspberry_3.png"} +minetest.register_node("farming:raspberry_3", table.copy(crop_def)) + +-- stage 4 (final) +crop_def.tiles = {"farming_raspberry_4.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:raspberries 2'}, rarity = 1}, + {items = {'farming:raspberries'}, rarity = 2}, + {items = {'farming:raspberries'}, rarity = 3}, + {items = {'farming:raspberry_seed 4'}, rarity = 1}, + } +} +minetest.register_node("farming:raspberry_4", table.copy(crop_def)) diff --git a/mods/farming/rhubarb.lua b/mods/farming/rhubarb.lua new file mode 100644 index 00000000..aaf50866 --- /dev/null +++ b/mods/farming/rhubarb.lua @@ -0,0 +1,70 @@ +minetest.register_craftitem("farming:rhubarb_seed", { + description = "Rhubarb Seeds", + inventory_image = "farming_rhubarb_seed.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:rhubarb_1") + end +}) + +-- rhubarb +minetest.register_craftitem("farming:rhubarb", { + description = "Rhubarb", + inventory_image = "farming_rhubarb.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:rhubarb_1") + end, + on_use = minetest.item_eat(1), +}) + +-- rhubarb pie +minetest.register_craftitem("farming:rhubarb_pie", { + description = "Rhubarb Pie", + inventory_image = "farming_rhubarb_pie.png", + on_use = minetest.item_eat(6), +}) + +minetest.register_craft({ + output = "farming:rhubarb_pie", + recipe = { + {"", "farming:sugar", ""}, + {"farming:rhubarb", "farming:rhubarb", "farming:rhubarb"}, + {"farming:wheat", "farming:wheat", "farming:wheat"}, + } +}) + +-- rhubarb definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_rhubarb_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:rhubarb_1", table.copy(crop_def)) + +-- stage2 +crop_def.tiles = {"farming_rhubarb_2.png"} +minetest.register_node("farming:rhubarb_2", table.copy(crop_def)) + +-- stage 3 (final) +crop_def.tiles = {"farming_rhubarb_3.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:rhubarb 2'}, rarity = 1}, + {items = {'farming:rhubarb'}, rarity = 2}, + {items = {'farming:rhubarb_seed 2'}, rarity = 2}, + {items = {'farming:rhubarb'}, rarity = 3}, + } +} +minetest.register_node("farming:rhubarb_3", table.copy(crop_def)) diff --git a/mods/farming/screenshot.png b/mods/farming/screenshot.png new file mode 100644 index 00000000..aba30f01 Binary files /dev/null and b/mods/farming/screenshot.png differ diff --git a/mods/farming/soil.lua b/mods/farming/soil.lua new file mode 100644 index 00000000..e748d5c0 --- /dev/null +++ b/mods/farming/soil.lua @@ -0,0 +1,64 @@ +-- normal soil +minetest.register_node("farming:soil", { + description = "Soil", + tiles = {"default_dirt.png^farming_soil.png", "default_dirt.png"}, + drop = "default:dirt", + groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 2}, + sounds = default.node_sound_dirt_defaults(), +}) + +-- wet soil +minetest.register_node("farming:soil_wet", { + description = "Wet Soil", + tiles = {"default_dirt.png^farming_soil_wet.png", "default_dirt.png^farming_soil_wet_side.png"}, + drop = "default:dirt", + groups = {crumbly = 3, not_in_creative_inventory = 1, soil = 3}, + sounds = default.node_sound_dirt_defaults(), +}) + +-- sand is not soil, change existing sand-soil to use normal soil +minetest.register_alias("farming:desert_sand_soil", "farming:soil") +minetest.register_alias("farming:desert_sand_soil_wet", "farming:soil_wet") + +-- if water near soil then change to wet soil +minetest.register_abm({ + nodenames = {"farming:soil", "farming:soil_wet"}, + interval = 15, + chance = 4, + catch_up = false, + + action = function(pos, node) + + pos.y = pos.y + 1 + local nn = minetest.get_node_or_nil(pos) + pos.y = pos.y - 1 + + if nn then nn = nn.name else return end + + -- what's on top of soil, if solid/not plant change soil to dirt + if minetest.registered_nodes[nn] + and minetest.registered_nodes[nn].walkable + and minetest.get_item_group(nn, "plant") == 0 then + minetest.set_node(pos, {name = "default:dirt"}) + return + end + + -- if map around soil not loaded then skip until loaded + if minetest.find_node_near(pos, 3, {"ignore"}) then + return + end + + -- check if there is water nearby and change soil accordingly + if minetest.find_node_near(pos, 3, {"group:water"}) then + if node.name == "farming:soil" then + minetest.set_node(pos, {name = "farming:soil_wet"}) + end + + elseif node.name == "farming:soil_wet" then + minetest.set_node(pos, {name = "farming:soil"}) + + elseif node.name == "farming:soil" then + minetest.set_node(pos, {name = "default:dirt"}) + end + end, +}) \ No newline at end of file diff --git a/mods/farming/statistics.lua b/mods/farming/statistics.lua new file mode 100644 index 00000000..c8defa2f --- /dev/null +++ b/mods/farming/statistics.lua @@ -0,0 +1,174 @@ +local statistics = {} +local ROOT_2 = math.sqrt(2.0) + +-- Approximations for erf(x) and erfInv(x) from +-- https://en.wikipedia.org/wiki/Error_function + +local erf +local erf_inv + +local A = 8 * (math.pi - 3.0)/(3.0 * math.pi * (4.0 - math.pi)) +local B = 4.0 / math.pi +local C = 2.0/(math.pi * A) +local D = 1.0 / A + +erf = function(x) + + if x == 0 then return 0; end + + local xSq = x * x + local aXSq = A * xSq + local v = math.sqrt(1.0 - math.exp(-xSq * (B + aXSq) / (1.0 + aXSq))) + + return (x > 0 and v) or -v +end + +erf_inv = function(x) + + if x == 0 then return 0; end + + if x <= -1 or x >= 1 then return nil; end + + local y = math.log(1 - x * x) + local u = C + 0.5 * y + local v = math.sqrt(math.sqrt(u * u - D * y) - u) + + return (x > 0 and v) or -v +end + +local function std_normal(u) + return ROOT_2 * erf_inv(2.0 * u - 1.0) +end + +local poisson +local cdf_table = {} + +local function generate_cdf(lambda_index, lambda) + + local max = math.ceil(4 * lambda) + local pdf = math.exp(-lambda) + local cdf = pdf + local t = { [0] = pdf } + + for i = 1, max - 1 do + pdf = pdf * lambda / i + cdf = cdf + pdf + t[i] = cdf + end + + return t +end + +for li = 1, 100 do + cdf_table[li] = generate_cdf(li, 0.25 * li) +end + +poisson = function(lambda, max) + + if max < 2 then + return (math.random() < math.exp(-lambda) and 0) or 1 + elseif lambda >= 2 * max then + return max + end + + local u = math.random() + local lambda_index = math.floor(4 * lambda + 0.5) + local cdfs = cdf_table[lambda_index] + + if cdfs then + + lambda = 0.25 * lambda_index + + if u < cdfs[0] then return 0; end + if max > #cdfs then max = #cdfs + 1 else max = math.floor(max); end + if u >= cdfs[max - 1] then return max; end + + if max > 4 then -- Binary search + + local s = 0 + + while s + 1 < max do + + local m = math.floor(0.5 * (s + max)) + + if u < cdfs[m] then max = m; else s = m; end + end + else + for i = 1, max - 1 do + if u < cdfs[i] then return i; end + end + end + + return max + else + local x = lambda + math.sqrt(lambda) * std_normal(u) + + return (x < 0.5 and 0) or (x >= max - 0.5 and max) or math.floor(x + 0.5) + end +end + +-- Error function. +statistics.erf = erf + +-- Inverse error function. +statistics.erf_inv = erf_inv + +--- Standard normal distribution function (mean 0, standard deviation 1). + -- + -- @return + -- Any real number (actually between -3.0 and 3.0). + +statistics.std_normal = function() + + local u = math.random() + + if u < 0.001 then + return -3.0 + elseif u > 0.999 then + return 3.0 + end + + return std_normal(u) +end + +--- Standard normal distribution function (mean 0, standard deviation 1). + -- + -- @param mu + -- The distribution mean. + -- @param sigma + -- The distribution standard deviation. + -- @return + -- Any real number (actually between -3*sigma and 3*sigma). + +statistics.normal = function(mu, sigma) + + local u = math.random() + + if u < 0.001 then + return mu - 3.0 * sigma + elseif u > 0.999 then + return mu + 3.0 * sigma + end + + return mu + sigma * std_normal(u) +end + +--- Poisson distribution function. + -- + -- @param lambda + -- The distribution mean and variance. + -- @param max + -- The distribution maximum. + -- @return + -- An integer between 0 and max (both inclusive). + +statistics.poisson = function(lambda, max) + + lambda, max = tonumber(lambda), tonumber(max) + + if not lambda or not max or lambda <= 0 or max < 1 then return 0; end + + return poisson(lambda, max) +end + +return statistics diff --git a/mods/farming/strawberry.lua b/mods/farming/strawberry.lua new file mode 100644 index 00000000..919a8e8f --- /dev/null +++ b/mods/farming/strawberry.lua @@ -0,0 +1,133 @@ +-- [ strawberrys from github.com/tenplus1/farming ] +-- +-- Strawberry (can also be planted as seed) +minetest.register_craftitem("farming:strawberry_item", { + description = "Strawberry", + inventory_image = "farming_strawberry.png", + wield_image = "farming_strawberry.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:strawberry_1") + end, + on_use = minetest.item_eat(1), +}) + +-- added by illuna +minetest.register_craftitem("farming:strawberry_seed", { + description = "Strawberry Seeds", + inventory_image = "farming_strawberry_seed.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:strawberry_1") + end, +}) + +-- Define Strawberry Bush growth stages +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_strawberry_1.png"}, + paramtype = "light", + sunlight_propagates = true, + waving = 1, + walkable = false, + buildable_to = true, + drop = "", + selection_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5} + }, + groups = { + snappy = 3, flammable =2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults(), +} + +--stage 1 +minetest.register_node("farming:strawberry_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_strawberry_2.png"} +minetest.register_node("farming:strawberry_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_strawberry_3.png"} +minetest.register_node("farming:strawberry_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_strawberry_4.png"} +minetest.register_node("farming:strawberry_4", table.copy(crop_def)) + +-- stage 5 +crop_def.tiles = {"farming_strawberry_5.png"} +minetest.register_node("farming:strawberry_5", table.copy(crop_def)) + +-- stage 6 +crop_def.tiles = {"farming_strawberry_6.png"} +crop_def.drop = { + items = { + {items = {"farming:strawberry 1"},rarity = 2}, + {items = {"farming:strawberry 2"},rarity = 3}, + } +} +minetest.register_node("farming:strawberry_6", table.copy(crop_def)) + +-- stage 7 +crop_def.tiles = {"farming_strawberry_7.png"} +crop_def.drop = { + items = { + {items = {"farming:strawberry 1"},rarity = 1}, + {items = {"farming:strawberry_item 2"},rarity = 3}, + } +} +minetest.register_node("farming:strawberry_7", table.copy(crop_def)) + +-- stage 8 +crop_def.tiles = {"farming_strawberry_8.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {"farming:strawberry 2"},rarity = 1}, + {items = {"farming:strawberry_item 3"},rarity = 3}, + } +} +minetest.register_node("farming:strawberry_8", table.copy(crop_def)) + +-- growing routine if farming redo isn't present +if not farming or not farming.mod or farming.mod ~= "redo" then + +minetest.register_abm({ + nodenames = { + "farming:strawberry_1", "farming:strawberry_2", "farming:strawberry_3", + "farming:strawberry_4", "farming:strawberry_5", "farming:strawberry_6", + "farming:strawberry_7" + }, + neighbors = {"farming:soil_wet"}, + interval = 9, + chance = 20, + catch_up = false, + action = function(pos, node) + + -- are we on wet soil? + pos.y = pos.y - 1 + if minetest.get_item_group(minetest.get_node(pos).name, "soil") < 3 then + return + end + pos.y = pos.y + 1 + + -- do we have enough light? + local light = minetest.get_node_light(pos) + + if not light + or light < 13 then + return + end + + -- grow to next stage + local num = node.name:split("_")[2] + + node.name = "farming:strawberry_" .. tonumber(num + 1) + + minetest.swap_node(pos, node) + end +}) + +end -- END IF diff --git a/mods/farming/sugar.lua b/mods/farming/sugar.lua new file mode 100644 index 00000000..efc92efd --- /dev/null +++ b/mods/farming/sugar.lua @@ -0,0 +1,14 @@ + +--= Sugar + +minetest.register_craftitem("farming:sugar", { + description = "Sugar", + inventory_image = "farming_sugar.png", +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 3, + output = "farming:sugar 2", + recipe = "default:papyrus", +}) \ No newline at end of file diff --git a/mods/farming/textures/farming_baked_potato.png b/mods/farming/textures/farming_baked_potato.png new file mode 100644 index 00000000..425c4ae3 Binary files /dev/null and b/mods/farming/textures/farming_baked_potato.png differ diff --git a/mods/farming/textures/farming_banana.png b/mods/farming/textures/farming_banana.png new file mode 100644 index 00000000..f775e14c Binary files /dev/null and b/mods/farming/textures/farming_banana.png differ diff --git a/mods/farming/textures/farming_banana_leaves.png b/mods/farming/textures/farming_banana_leaves.png new file mode 100644 index 00000000..cf8eecbf Binary files /dev/null and b/mods/farming/textures/farming_banana_leaves.png differ diff --git a/mods/farming/textures/farming_banana_sapling.png b/mods/farming/textures/farming_banana_sapling.png new file mode 100644 index 00000000..821c64ff Binary files /dev/null and b/mods/farming/textures/farming_banana_sapling.png differ diff --git a/mods/farming/textures/farming_barley.png b/mods/farming/textures/farming_barley.png new file mode 100644 index 00000000..ca929e0e Binary files /dev/null and b/mods/farming/textures/farming_barley.png differ diff --git a/mods/farming/textures/farming_barley_1.png b/mods/farming/textures/farming_barley_1.png new file mode 100644 index 00000000..4a458b16 Binary files /dev/null and b/mods/farming/textures/farming_barley_1.png differ diff --git a/mods/farming/textures/farming_barley_2.png b/mods/farming/textures/farming_barley_2.png new file mode 100644 index 00000000..96610c2f Binary files /dev/null and b/mods/farming/textures/farming_barley_2.png differ diff --git a/mods/farming/textures/farming_barley_3.png b/mods/farming/textures/farming_barley_3.png new file mode 100644 index 00000000..ef14b5b3 Binary files /dev/null and b/mods/farming/textures/farming_barley_3.png differ diff --git a/mods/farming/textures/farming_barley_4.png b/mods/farming/textures/farming_barley_4.png new file mode 100644 index 00000000..f7c90544 Binary files /dev/null and b/mods/farming/textures/farming_barley_4.png differ diff --git a/mods/farming/textures/farming_barley_5.png b/mods/farming/textures/farming_barley_5.png new file mode 100644 index 00000000..68c0d683 Binary files /dev/null and b/mods/farming/textures/farming_barley_5.png differ diff --git a/mods/farming/textures/farming_barley_6.png b/mods/farming/textures/farming_barley_6.png new file mode 100644 index 00000000..496a2185 Binary files /dev/null and b/mods/farming/textures/farming_barley_6.png differ diff --git a/mods/farming/textures/farming_barley_7.png b/mods/farming/textures/farming_barley_7.png new file mode 100644 index 00000000..1c636afb Binary files /dev/null and b/mods/farming/textures/farming_barley_7.png differ diff --git a/mods/farming/textures/farming_barley_seed.png b/mods/farming/textures/farming_barley_seed.png new file mode 100644 index 00000000..2f00a20a Binary files /dev/null and b/mods/farming/textures/farming_barley_seed.png differ diff --git a/mods/farming/textures/farming_beanbush.png b/mods/farming/textures/farming_beanbush.png new file mode 100644 index 00000000..637e7162 Binary files /dev/null and b/mods/farming/textures/farming_beanbush.png differ diff --git a/mods/farming/textures/farming_beanpole.png b/mods/farming/textures/farming_beanpole.png new file mode 100644 index 00000000..ed07572e Binary files /dev/null and b/mods/farming/textures/farming_beanpole.png differ diff --git a/mods/farming/textures/farming_beanpole_1.png b/mods/farming/textures/farming_beanpole_1.png new file mode 100644 index 00000000..ef2bd5ab Binary files /dev/null and b/mods/farming/textures/farming_beanpole_1.png differ diff --git a/mods/farming/textures/farming_beanpole_2.png b/mods/farming/textures/farming_beanpole_2.png new file mode 100644 index 00000000..34143e47 Binary files /dev/null and b/mods/farming/textures/farming_beanpole_2.png differ diff --git a/mods/farming/textures/farming_beanpole_3.png b/mods/farming/textures/farming_beanpole_3.png new file mode 100644 index 00000000..d693f170 Binary files /dev/null and b/mods/farming/textures/farming_beanpole_3.png differ diff --git a/mods/farming/textures/farming_beanpole_4.png b/mods/farming/textures/farming_beanpole_4.png new file mode 100644 index 00000000..c779b254 Binary files /dev/null and b/mods/farming/textures/farming_beanpole_4.png differ diff --git a/mods/farming/textures/farming_beanpole_5.png b/mods/farming/textures/farming_beanpole_5.png new file mode 100644 index 00000000..910f8a07 Binary files /dev/null and b/mods/farming/textures/farming_beanpole_5.png differ diff --git a/mods/farming/textures/farming_beans.png b/mods/farming/textures/farming_beans.png new file mode 100644 index 00000000..ad5cf859 Binary files /dev/null and b/mods/farming/textures/farming_beans.png differ diff --git a/mods/farming/textures/farming_blueberries.png b/mods/farming/textures/farming_blueberries.png new file mode 100644 index 00000000..b0c49319 Binary files /dev/null and b/mods/farming/textures/farming_blueberries.png differ diff --git a/mods/farming/textures/farming_blueberry_1.png b/mods/farming/textures/farming_blueberry_1.png new file mode 100644 index 00000000..83832c86 Binary files /dev/null and b/mods/farming/textures/farming_blueberry_1.png differ diff --git a/mods/farming/textures/farming_blueberry_2.png b/mods/farming/textures/farming_blueberry_2.png new file mode 100644 index 00000000..308a0caf Binary files /dev/null and b/mods/farming/textures/farming_blueberry_2.png differ diff --git a/mods/farming/textures/farming_blueberry_3.png b/mods/farming/textures/farming_blueberry_3.png new file mode 100644 index 00000000..43d2ab13 Binary files /dev/null and b/mods/farming/textures/farming_blueberry_3.png differ diff --git a/mods/farming/textures/farming_blueberry_4.png b/mods/farming/textures/farming_blueberry_4.png new file mode 100644 index 00000000..75fb69a0 Binary files /dev/null and b/mods/farming/textures/farming_blueberry_4.png differ diff --git a/mods/farming/textures/farming_blueberry_muffin.png b/mods/farming/textures/farming_blueberry_muffin.png new file mode 100644 index 00000000..b1253d70 Binary files /dev/null and b/mods/farming/textures/farming_blueberry_muffin.png differ diff --git a/mods/farming/textures/farming_bottle_ethanol.png b/mods/farming/textures/farming_bottle_ethanol.png new file mode 100644 index 00000000..84e6162d Binary files /dev/null and b/mods/farming/textures/farming_bottle_ethanol.png differ diff --git a/mods/farming/textures/farming_bread.png b/mods/farming/textures/farming_bread.png new file mode 100644 index 00000000..bd00e3e1 Binary files /dev/null and b/mods/farming/textures/farming_bread.png differ diff --git a/mods/farming/textures/farming_carrot.png b/mods/farming/textures/farming_carrot.png new file mode 100644 index 00000000..73f2fd47 Binary files /dev/null and b/mods/farming/textures/farming_carrot.png differ diff --git a/mods/farming/textures/farming_carrot_1.png b/mods/farming/textures/farming_carrot_1.png new file mode 100644 index 00000000..bbeae7e8 Binary files /dev/null and b/mods/farming/textures/farming_carrot_1.png differ diff --git a/mods/farming/textures/farming_carrot_2.png b/mods/farming/textures/farming_carrot_2.png new file mode 100644 index 00000000..b24ecc05 Binary files /dev/null and b/mods/farming/textures/farming_carrot_2.png differ diff --git a/mods/farming/textures/farming_carrot_3.png b/mods/farming/textures/farming_carrot_3.png new file mode 100644 index 00000000..84005057 Binary files /dev/null and b/mods/farming/textures/farming_carrot_3.png differ diff --git a/mods/farming/textures/farming_carrot_4.png b/mods/farming/textures/farming_carrot_4.png new file mode 100644 index 00000000..32ee2624 Binary files /dev/null and b/mods/farming/textures/farming_carrot_4.png differ diff --git a/mods/farming/textures/farming_carrot_5.png b/mods/farming/textures/farming_carrot_5.png new file mode 100644 index 00000000..0bcd9c1e Binary files /dev/null and b/mods/farming/textures/farming_carrot_5.png differ diff --git a/mods/farming/textures/farming_carrot_6.png b/mods/farming/textures/farming_carrot_6.png new file mode 100644 index 00000000..a17c6b2b Binary files /dev/null and b/mods/farming/textures/farming_carrot_6.png differ diff --git a/mods/farming/textures/farming_carrot_7.png b/mods/farming/textures/farming_carrot_7.png new file mode 100644 index 00000000..d26eee7c Binary files /dev/null and b/mods/farming/textures/farming_carrot_7.png differ diff --git a/mods/farming/textures/farming_carrot_8.png b/mods/farming/textures/farming_carrot_8.png new file mode 100644 index 00000000..00b6d928 Binary files /dev/null and b/mods/farming/textures/farming_carrot_8.png differ diff --git a/mods/farming/textures/farming_carrot_gold.png b/mods/farming/textures/farming_carrot_gold.png new file mode 100644 index 00000000..b817101d Binary files /dev/null and b/mods/farming/textures/farming_carrot_gold.png differ diff --git a/mods/farming/textures/farming_chocolate_dark.png b/mods/farming/textures/farming_chocolate_dark.png new file mode 100644 index 00000000..03243b27 Binary files /dev/null and b/mods/farming/textures/farming_chocolate_dark.png differ diff --git a/mods/farming/textures/farming_cocoa_1.png b/mods/farming/textures/farming_cocoa_1.png new file mode 100644 index 00000000..f887a1fb Binary files /dev/null and b/mods/farming/textures/farming_cocoa_1.png differ diff --git a/mods/farming/textures/farming_cocoa_2.png b/mods/farming/textures/farming_cocoa_2.png new file mode 100644 index 00000000..f0d39353 Binary files /dev/null and b/mods/farming/textures/farming_cocoa_2.png differ diff --git a/mods/farming/textures/farming_cocoa_3.png b/mods/farming/textures/farming_cocoa_3.png new file mode 100644 index 00000000..8eaf67eb Binary files /dev/null and b/mods/farming/textures/farming_cocoa_3.png differ diff --git a/mods/farming/textures/farming_cocoa_beans.png b/mods/farming/textures/farming_cocoa_beans.png new file mode 100644 index 00000000..4022f8e8 Binary files /dev/null and b/mods/farming/textures/farming_cocoa_beans.png differ diff --git a/mods/farming/textures/farming_coffee_1.png b/mods/farming/textures/farming_coffee_1.png new file mode 100644 index 00000000..97c207a3 Binary files /dev/null and b/mods/farming/textures/farming_coffee_1.png differ diff --git a/mods/farming/textures/farming_coffee_2.png b/mods/farming/textures/farming_coffee_2.png new file mode 100644 index 00000000..a659f851 Binary files /dev/null and b/mods/farming/textures/farming_coffee_2.png differ diff --git a/mods/farming/textures/farming_coffee_3.png b/mods/farming/textures/farming_coffee_3.png new file mode 100644 index 00000000..93088c80 Binary files /dev/null and b/mods/farming/textures/farming_coffee_3.png differ diff --git a/mods/farming/textures/farming_coffee_4.png b/mods/farming/textures/farming_coffee_4.png new file mode 100644 index 00000000..37a609f6 Binary files /dev/null and b/mods/farming/textures/farming_coffee_4.png differ diff --git a/mods/farming/textures/farming_coffee_5.png b/mods/farming/textures/farming_coffee_5.png new file mode 100644 index 00000000..e624fbeb Binary files /dev/null and b/mods/farming/textures/farming_coffee_5.png differ diff --git a/mods/farming/textures/farming_coffee_beans.png b/mods/farming/textures/farming_coffee_beans.png new file mode 100644 index 00000000..0786f4e7 Binary files /dev/null and b/mods/farming/textures/farming_coffee_beans.png differ diff --git a/mods/farming/textures/farming_coffee_cup.png b/mods/farming/textures/farming_coffee_cup.png new file mode 100644 index 00000000..d3820bc7 Binary files /dev/null and b/mods/farming/textures/farming_coffee_cup.png differ diff --git a/mods/farming/textures/farming_coffee_cup_hot.png b/mods/farming/textures/farming_coffee_cup_hot.png new file mode 100644 index 00000000..f4fae904 Binary files /dev/null and b/mods/farming/textures/farming_coffee_cup_hot.png differ diff --git a/mods/farming/textures/farming_cookie.png b/mods/farming/textures/farming_cookie.png new file mode 100644 index 00000000..e80be358 Binary files /dev/null and b/mods/farming/textures/farming_cookie.png differ diff --git a/mods/farming/textures/farming_corn.png b/mods/farming/textures/farming_corn.png new file mode 100644 index 00000000..2a2894a4 Binary files /dev/null and b/mods/farming/textures/farming_corn.png differ diff --git a/mods/farming/textures/farming_corn_1.png b/mods/farming/textures/farming_corn_1.png new file mode 100644 index 00000000..60e8b997 Binary files /dev/null and b/mods/farming/textures/farming_corn_1.png differ diff --git a/mods/farming/textures/farming_corn_2.png b/mods/farming/textures/farming_corn_2.png new file mode 100644 index 00000000..6ba6cc97 Binary files /dev/null and b/mods/farming/textures/farming_corn_2.png differ diff --git a/mods/farming/textures/farming_corn_3.png b/mods/farming/textures/farming_corn_3.png new file mode 100644 index 00000000..c5fa80b1 Binary files /dev/null and b/mods/farming/textures/farming_corn_3.png differ diff --git a/mods/farming/textures/farming_corn_4.png b/mods/farming/textures/farming_corn_4.png new file mode 100644 index 00000000..a43632dd Binary files /dev/null and b/mods/farming/textures/farming_corn_4.png differ diff --git a/mods/farming/textures/farming_corn_5.png b/mods/farming/textures/farming_corn_5.png new file mode 100644 index 00000000..7b6fb02b Binary files /dev/null and b/mods/farming/textures/farming_corn_5.png differ diff --git a/mods/farming/textures/farming_corn_6.png b/mods/farming/textures/farming_corn_6.png new file mode 100644 index 00000000..313697b9 Binary files /dev/null and b/mods/farming/textures/farming_corn_6.png differ diff --git a/mods/farming/textures/farming_corn_7.png b/mods/farming/textures/farming_corn_7.png new file mode 100644 index 00000000..6a937e79 Binary files /dev/null and b/mods/farming/textures/farming_corn_7.png differ diff --git a/mods/farming/textures/farming_corn_8.png b/mods/farming/textures/farming_corn_8.png new file mode 100644 index 00000000..77e442b0 Binary files /dev/null and b/mods/farming/textures/farming_corn_8.png differ diff --git a/mods/farming/textures/farming_corn_cob.png b/mods/farming/textures/farming_corn_cob.png new file mode 100644 index 00000000..a2fd9da7 Binary files /dev/null and b/mods/farming/textures/farming_corn_cob.png differ diff --git a/mods/farming/textures/farming_cotton.png b/mods/farming/textures/farming_cotton.png new file mode 100644 index 00000000..e2bbfd7a Binary files /dev/null and b/mods/farming/textures/farming_cotton.png differ diff --git a/mods/farming/textures/farming_cotton_1.png b/mods/farming/textures/farming_cotton_1.png new file mode 100644 index 00000000..5fc21807 Binary files /dev/null and b/mods/farming/textures/farming_cotton_1.png differ diff --git a/mods/farming/textures/farming_cotton_2.png b/mods/farming/textures/farming_cotton_2.png new file mode 100644 index 00000000..db4f4a3e Binary files /dev/null and b/mods/farming/textures/farming_cotton_2.png differ diff --git a/mods/farming/textures/farming_cotton_3.png b/mods/farming/textures/farming_cotton_3.png new file mode 100644 index 00000000..df3d7a77 Binary files /dev/null and b/mods/farming/textures/farming_cotton_3.png differ diff --git a/mods/farming/textures/farming_cotton_4.png b/mods/farming/textures/farming_cotton_4.png new file mode 100644 index 00000000..f314b07b Binary files /dev/null and b/mods/farming/textures/farming_cotton_4.png differ diff --git a/mods/farming/textures/farming_cotton_5.png b/mods/farming/textures/farming_cotton_5.png new file mode 100644 index 00000000..3e890855 Binary files /dev/null and b/mods/farming/textures/farming_cotton_5.png differ diff --git a/mods/farming/textures/farming_cotton_6.png b/mods/farming/textures/farming_cotton_6.png new file mode 100644 index 00000000..f4bd4fb3 Binary files /dev/null and b/mods/farming/textures/farming_cotton_6.png differ diff --git a/mods/farming/textures/farming_cotton_7.png b/mods/farming/textures/farming_cotton_7.png new file mode 100644 index 00000000..466d40a2 Binary files /dev/null and b/mods/farming/textures/farming_cotton_7.png differ diff --git a/mods/farming/textures/farming_cotton_8.png b/mods/farming/textures/farming_cotton_8.png new file mode 100644 index 00000000..f835ba5b Binary files /dev/null and b/mods/farming/textures/farming_cotton_8.png differ diff --git a/mods/farming/textures/farming_cotton_seed.png b/mods/farming/textures/farming_cotton_seed.png new file mode 100644 index 00000000..f1d5b8ab Binary files /dev/null and b/mods/farming/textures/farming_cotton_seed.png differ diff --git a/mods/farming/textures/farming_cucumber.png b/mods/farming/textures/farming_cucumber.png new file mode 100644 index 00000000..2acb7b2f Binary files /dev/null and b/mods/farming/textures/farming_cucumber.png differ diff --git a/mods/farming/textures/farming_cucumber_1.png b/mods/farming/textures/farming_cucumber_1.png new file mode 100644 index 00000000..e008fd12 Binary files /dev/null and b/mods/farming/textures/farming_cucumber_1.png differ diff --git a/mods/farming/textures/farming_cucumber_2.png b/mods/farming/textures/farming_cucumber_2.png new file mode 100644 index 00000000..9c345ff4 Binary files /dev/null and b/mods/farming/textures/farming_cucumber_2.png differ diff --git a/mods/farming/textures/farming_cucumber_3.png b/mods/farming/textures/farming_cucumber_3.png new file mode 100644 index 00000000..25f3c54f Binary files /dev/null and b/mods/farming/textures/farming_cucumber_3.png differ diff --git a/mods/farming/textures/farming_cucumber_4.png b/mods/farming/textures/farming_cucumber_4.png new file mode 100644 index 00000000..fc62f2f4 Binary files /dev/null and b/mods/farming/textures/farming_cucumber_4.png differ diff --git a/mods/farming/textures/farming_desert_sand_soil.png b/mods/farming/textures/farming_desert_sand_soil.png new file mode 100644 index 00000000..1450e014 Binary files /dev/null and b/mods/farming/textures/farming_desert_sand_soil.png differ diff --git a/mods/farming/textures/farming_desert_sand_soil_wet.png b/mods/farming/textures/farming_desert_sand_soil_wet.png new file mode 100644 index 00000000..cffa955d Binary files /dev/null and b/mods/farming/textures/farming_desert_sand_soil_wet.png differ diff --git a/mods/farming/textures/farming_desert_sand_soil_wet_side.png b/mods/farming/textures/farming_desert_sand_soil_wet_side.png new file mode 100644 index 00000000..fbb2815e Binary files /dev/null and b/mods/farming/textures/farming_desert_sand_soil_wet_side.png differ diff --git a/mods/farming/textures/farming_donut.png b/mods/farming/textures/farming_donut.png new file mode 100644 index 00000000..8985299b Binary files /dev/null and b/mods/farming/textures/farming_donut.png differ diff --git a/mods/farming/textures/farming_donut_apple.png b/mods/farming/textures/farming_donut_apple.png new file mode 100644 index 00000000..6dfe63d5 Binary files /dev/null and b/mods/farming/textures/farming_donut_apple.png differ diff --git a/mods/farming/textures/farming_donut_chocolate.png b/mods/farming/textures/farming_donut_chocolate.png new file mode 100644 index 00000000..aa4b93fa Binary files /dev/null and b/mods/farming/textures/farming_donut_chocolate.png differ diff --git a/mods/farming/textures/farming_flour.png b/mods/farming/textures/farming_flour.png new file mode 100644 index 00000000..b1a97836 Binary files /dev/null and b/mods/farming/textures/farming_flour.png differ diff --git a/mods/farming/textures/farming_grapebush.png b/mods/farming/textures/farming_grapebush.png new file mode 100644 index 00000000..c2e66205 Binary files /dev/null and b/mods/farming/textures/farming_grapebush.png differ diff --git a/mods/farming/textures/farming_grapes.png b/mods/farming/textures/farming_grapes.png new file mode 100644 index 00000000..aa00ed63 Binary files /dev/null and b/mods/farming/textures/farming_grapes.png differ diff --git a/mods/farming/textures/farming_grapes_1.png b/mods/farming/textures/farming_grapes_1.png new file mode 100644 index 00000000..64a935d2 Binary files /dev/null and b/mods/farming/textures/farming_grapes_1.png differ diff --git a/mods/farming/textures/farming_grapes_2.png b/mods/farming/textures/farming_grapes_2.png new file mode 100644 index 00000000..6cc2a337 Binary files /dev/null and b/mods/farming/textures/farming_grapes_2.png differ diff --git a/mods/farming/textures/farming_grapes_3.png b/mods/farming/textures/farming_grapes_3.png new file mode 100644 index 00000000..66d63109 Binary files /dev/null and b/mods/farming/textures/farming_grapes_3.png differ diff --git a/mods/farming/textures/farming_grapes_4.png b/mods/farming/textures/farming_grapes_4.png new file mode 100644 index 00000000..57cdc73f Binary files /dev/null and b/mods/farming/textures/farming_grapes_4.png differ diff --git a/mods/farming/textures/farming_grapes_5.png b/mods/farming/textures/farming_grapes_5.png new file mode 100644 index 00000000..aad41f41 Binary files /dev/null and b/mods/farming/textures/farming_grapes_5.png differ diff --git a/mods/farming/textures/farming_grapes_6.png b/mods/farming/textures/farming_grapes_6.png new file mode 100644 index 00000000..2e23a3ca Binary files /dev/null and b/mods/farming/textures/farming_grapes_6.png differ diff --git a/mods/farming/textures/farming_grapes_7.png b/mods/farming/textures/farming_grapes_7.png new file mode 100644 index 00000000..9e70b6d5 Binary files /dev/null and b/mods/farming/textures/farming_grapes_7.png differ diff --git a/mods/farming/textures/farming_grapes_8.png b/mods/farming/textures/farming_grapes_8.png new file mode 100644 index 00000000..5093a066 Binary files /dev/null and b/mods/farming/textures/farming_grapes_8.png differ diff --git a/mods/farming/textures/farming_melon_1.png b/mods/farming/textures/farming_melon_1.png new file mode 100644 index 00000000..3c6ea6d8 Binary files /dev/null and b/mods/farming/textures/farming_melon_1.png differ diff --git a/mods/farming/textures/farming_melon_2.png b/mods/farming/textures/farming_melon_2.png new file mode 100644 index 00000000..185ed826 Binary files /dev/null and b/mods/farming/textures/farming_melon_2.png differ diff --git a/mods/farming/textures/farming_melon_3.png b/mods/farming/textures/farming_melon_3.png new file mode 100644 index 00000000..6e661f92 Binary files /dev/null and b/mods/farming/textures/farming_melon_3.png differ diff --git a/mods/farming/textures/farming_melon_4.png b/mods/farming/textures/farming_melon_4.png new file mode 100644 index 00000000..d9199f3c Binary files /dev/null and b/mods/farming/textures/farming_melon_4.png differ diff --git a/mods/farming/textures/farming_melon_5.png b/mods/farming/textures/farming_melon_5.png new file mode 100644 index 00000000..755cbd34 Binary files /dev/null and b/mods/farming/textures/farming_melon_5.png differ diff --git a/mods/farming/textures/farming_melon_6.png b/mods/farming/textures/farming_melon_6.png new file mode 100644 index 00000000..b31a5b4c Binary files /dev/null and b/mods/farming/textures/farming_melon_6.png differ diff --git a/mods/farming/textures/farming_melon_7.png b/mods/farming/textures/farming_melon_7.png new file mode 100644 index 00000000..3aebfdd6 Binary files /dev/null and b/mods/farming/textures/farming_melon_7.png differ diff --git a/mods/farming/textures/farming_melon_side.png b/mods/farming/textures/farming_melon_side.png new file mode 100644 index 00000000..88e40c6a Binary files /dev/null and b/mods/farming/textures/farming_melon_side.png differ diff --git a/mods/farming/textures/farming_melon_slice.png b/mods/farming/textures/farming_melon_slice.png new file mode 100644 index 00000000..6ee97757 Binary files /dev/null and b/mods/farming/textures/farming_melon_slice.png differ diff --git a/mods/farming/textures/farming_melon_top.png b/mods/farming/textures/farming_melon_top.png new file mode 100644 index 00000000..f387dbd0 Binary files /dev/null and b/mods/farming/textures/farming_melon_top.png differ diff --git a/mods/farming/textures/farming_orange.png b/mods/farming/textures/farming_orange.png new file mode 100644 index 00000000..4c5e0459 Binary files /dev/null and b/mods/farming/textures/farming_orange.png differ diff --git a/mods/farming/textures/farming_orange_1.png b/mods/farming/textures/farming_orange_1.png new file mode 100644 index 00000000..5a2aaa27 Binary files /dev/null and b/mods/farming/textures/farming_orange_1.png differ diff --git a/mods/farming/textures/farming_orange_2.png b/mods/farming/textures/farming_orange_2.png new file mode 100644 index 00000000..3de46238 Binary files /dev/null and b/mods/farming/textures/farming_orange_2.png differ diff --git a/mods/farming/textures/farming_orange_3.png b/mods/farming/textures/farming_orange_3.png new file mode 100644 index 00000000..851cd67b Binary files /dev/null and b/mods/farming/textures/farming_orange_3.png differ diff --git a/mods/farming/textures/farming_orange_4.png b/mods/farming/textures/farming_orange_4.png new file mode 100644 index 00000000..accb7b7f Binary files /dev/null and b/mods/farming/textures/farming_orange_4.png differ diff --git a/mods/farming/textures/farming_orange_seed.png b/mods/farming/textures/farming_orange_seed.png new file mode 100644 index 00000000..3873bade Binary files /dev/null and b/mods/farming/textures/farming_orange_seed.png differ diff --git a/mods/farming/textures/farming_potato.png b/mods/farming/textures/farming_potato.png new file mode 100644 index 00000000..6e91d6ae Binary files /dev/null and b/mods/farming/textures/farming_potato.png differ diff --git a/mods/farming/textures/farming_potato_1.png b/mods/farming/textures/farming_potato_1.png new file mode 100644 index 00000000..a9c00409 Binary files /dev/null and b/mods/farming/textures/farming_potato_1.png differ diff --git a/mods/farming/textures/farming_potato_2.png b/mods/farming/textures/farming_potato_2.png new file mode 100644 index 00000000..c81830c4 Binary files /dev/null and b/mods/farming/textures/farming_potato_2.png differ diff --git a/mods/farming/textures/farming_potato_3.png b/mods/farming/textures/farming_potato_3.png new file mode 100644 index 00000000..a3d79209 Binary files /dev/null and b/mods/farming/textures/farming_potato_3.png differ diff --git a/mods/farming/textures/farming_potato_4.png b/mods/farming/textures/farming_potato_4.png new file mode 100644 index 00000000..405b7e56 Binary files /dev/null and b/mods/farming/textures/farming_potato_4.png differ diff --git a/mods/farming/textures/farming_potato_seed.png b/mods/farming/textures/farming_potato_seed.png new file mode 100644 index 00000000..74e440df Binary files /dev/null and b/mods/farming/textures/farming_potato_seed.png differ diff --git a/mods/farming/textures/farming_pumpkin_1.png b/mods/farming/textures/farming_pumpkin_1.png new file mode 100644 index 00000000..e5b9a2bf Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_1.png differ diff --git a/mods/farming/textures/farming_pumpkin_2.png b/mods/farming/textures/farming_pumpkin_2.png new file mode 100644 index 00000000..d977e8c2 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_2.png differ diff --git a/mods/farming/textures/farming_pumpkin_3.png b/mods/farming/textures/farming_pumpkin_3.png new file mode 100644 index 00000000..83f81905 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_3.png differ diff --git a/mods/farming/textures/farming_pumpkin_4.png b/mods/farming/textures/farming_pumpkin_4.png new file mode 100644 index 00000000..20de004a Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_4.png differ diff --git a/mods/farming/textures/farming_pumpkin_5.png b/mods/farming/textures/farming_pumpkin_5.png new file mode 100644 index 00000000..59fa78eb Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_5.png differ diff --git a/mods/farming/textures/farming_pumpkin_6.png b/mods/farming/textures/farming_pumpkin_6.png new file mode 100644 index 00000000..6ae543e4 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_6.png differ diff --git a/mods/farming/textures/farming_pumpkin_7.png b/mods/farming/textures/farming_pumpkin_7.png new file mode 100644 index 00000000..79190e09 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_7.png differ diff --git a/mods/farming/textures/farming_pumpkin_8.png b/mods/farming/textures/farming_pumpkin_8.png new file mode 100644 index 00000000..b941442c Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_8.png differ diff --git a/mods/farming/textures/farming_pumpkin_bread.png b/mods/farming/textures/farming_pumpkin_bread.png new file mode 100644 index 00000000..0dfae08f Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_bread.png differ diff --git a/mods/farming/textures/farming_pumpkin_dough.png b/mods/farming/textures/farming_pumpkin_dough.png new file mode 100644 index 00000000..62ea7a65 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_dough.png differ diff --git a/mods/farming/textures/farming_pumpkin_face_off.png b/mods/farming/textures/farming_pumpkin_face_off.png new file mode 100644 index 00000000..df701714 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_face_off.png differ diff --git a/mods/farming/textures/farming_pumpkin_face_on.png b/mods/farming/textures/farming_pumpkin_face_on.png new file mode 100644 index 00000000..fa71c9d4 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_face_on.png differ diff --git a/mods/farming/textures/farming_pumpkin_seed.png b/mods/farming/textures/farming_pumpkin_seed.png new file mode 100644 index 00000000..6933bc38 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_seed.png differ diff --git a/mods/farming/textures/farming_pumpkin_side.png b/mods/farming/textures/farming_pumpkin_side.png new file mode 100644 index 00000000..2d30f203 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_side.png differ diff --git a/mods/farming/textures/farming_pumpkin_slice.png b/mods/farming/textures/farming_pumpkin_slice.png new file mode 100644 index 00000000..1fb659e2 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_slice.png differ diff --git a/mods/farming/textures/farming_pumpkin_top.png b/mods/farming/textures/farming_pumpkin_top.png new file mode 100644 index 00000000..79283454 Binary files /dev/null and b/mods/farming/textures/farming_pumpkin_top.png differ diff --git a/mods/farming/textures/farming_raspberries.png b/mods/farming/textures/farming_raspberries.png new file mode 100644 index 00000000..ab96e1bf Binary files /dev/null and b/mods/farming/textures/farming_raspberries.png differ diff --git a/mods/farming/textures/farming_raspberry_1.png b/mods/farming/textures/farming_raspberry_1.png new file mode 100644 index 00000000..d1a7ffca Binary files /dev/null and b/mods/farming/textures/farming_raspberry_1.png differ diff --git a/mods/farming/textures/farming_raspberry_2.png b/mods/farming/textures/farming_raspberry_2.png new file mode 100644 index 00000000..308a0caf Binary files /dev/null and b/mods/farming/textures/farming_raspberry_2.png differ diff --git a/mods/farming/textures/farming_raspberry_3.png b/mods/farming/textures/farming_raspberry_3.png new file mode 100644 index 00000000..43d2ab13 Binary files /dev/null and b/mods/farming/textures/farming_raspberry_3.png differ diff --git a/mods/farming/textures/farming_raspberry_4.png b/mods/farming/textures/farming_raspberry_4.png new file mode 100644 index 00000000..32da6b9f Binary files /dev/null and b/mods/farming/textures/farming_raspberry_4.png differ diff --git a/mods/farming/textures/farming_raspberry_seed.png b/mods/farming/textures/farming_raspberry_seed.png new file mode 100644 index 00000000..08c958d9 Binary files /dev/null and b/mods/farming/textures/farming_raspberry_seed.png differ diff --git a/mods/farming/textures/farming_raspberry_smoothie.png b/mods/farming/textures/farming_raspberry_smoothie.png new file mode 100644 index 00000000..fe178d11 Binary files /dev/null and b/mods/farming/textures/farming_raspberry_smoothie.png differ diff --git a/mods/farming/textures/farming_rhubarb.png b/mods/farming/textures/farming_rhubarb.png new file mode 100644 index 00000000..7d416ab2 Binary files /dev/null and b/mods/farming/textures/farming_rhubarb.png differ diff --git a/mods/farming/textures/farming_rhubarb_1.png b/mods/farming/textures/farming_rhubarb_1.png new file mode 100644 index 00000000..01585b1b Binary files /dev/null and b/mods/farming/textures/farming_rhubarb_1.png differ diff --git a/mods/farming/textures/farming_rhubarb_2.png b/mods/farming/textures/farming_rhubarb_2.png new file mode 100644 index 00000000..71845c75 Binary files /dev/null and b/mods/farming/textures/farming_rhubarb_2.png differ diff --git a/mods/farming/textures/farming_rhubarb_3.png b/mods/farming/textures/farming_rhubarb_3.png new file mode 100644 index 00000000..b412f7e0 Binary files /dev/null and b/mods/farming/textures/farming_rhubarb_3.png differ diff --git a/mods/farming/textures/farming_rhubarb_pie.png b/mods/farming/textures/farming_rhubarb_pie.png new file mode 100644 index 00000000..1f77b535 Binary files /dev/null and b/mods/farming/textures/farming_rhubarb_pie.png differ diff --git a/mods/farming/textures/farming_rhubarb_seed.png b/mods/farming/textures/farming_rhubarb_seed.png new file mode 100644 index 00000000..c16527d9 Binary files /dev/null and b/mods/farming/textures/farming_rhubarb_seed.png differ diff --git a/mods/farming/textures/farming_scarecrow_front.png b/mods/farming/textures/farming_scarecrow_front.png new file mode 100644 index 00000000..364738fd Binary files /dev/null and b/mods/farming/textures/farming_scarecrow_front.png differ diff --git a/mods/farming/textures/farming_scarecrow_front_light.png b/mods/farming/textures/farming_scarecrow_front_light.png new file mode 100644 index 00000000..b4b3cf28 Binary files /dev/null and b/mods/farming/textures/farming_scarecrow_front_light.png differ diff --git a/mods/farming/textures/farming_scarecrow_side.png b/mods/farming/textures/farming_scarecrow_side.png new file mode 100644 index 00000000..e22e84ba Binary files /dev/null and b/mods/farming/textures/farming_scarecrow_side.png differ diff --git a/mods/farming/textures/farming_scarecrow_top.png b/mods/farming/textures/farming_scarecrow_top.png new file mode 100644 index 00000000..3a4addcd Binary files /dev/null and b/mods/farming/textures/farming_scarecrow_top.png differ diff --git a/mods/farming/textures/farming_soil.png b/mods/farming/textures/farming_soil.png new file mode 100644 index 00000000..5cd3e681 Binary files /dev/null and b/mods/farming/textures/farming_soil.png differ diff --git a/mods/farming/textures/farming_soil_wet.png b/mods/farming/textures/farming_soil_wet.png new file mode 100644 index 00000000..0b4487d8 Binary files /dev/null and b/mods/farming/textures/farming_soil_wet.png differ diff --git a/mods/farming/textures/farming_soil_wet_side.png b/mods/farming/textures/farming_soil_wet_side.png new file mode 100644 index 00000000..f0b1bd45 Binary files /dev/null and b/mods/farming/textures/farming_soil_wet_side.png differ diff --git a/mods/farming/textures/farming_straw.png b/mods/farming/textures/farming_straw.png new file mode 100644 index 00000000..e4277723 Binary files /dev/null and b/mods/farming/textures/farming_straw.png differ diff --git a/mods/farming/textures/farming_strawberry.png b/mods/farming/textures/farming_strawberry.png new file mode 100644 index 00000000..5b43e6bc Binary files /dev/null and b/mods/farming/textures/farming_strawberry.png differ diff --git a/mods/farming/textures/farming_strawberry_1.png b/mods/farming/textures/farming_strawberry_1.png new file mode 100644 index 00000000..3fa21edc Binary files /dev/null and b/mods/farming/textures/farming_strawberry_1.png differ diff --git a/mods/farming/textures/farming_strawberry_2.png b/mods/farming/textures/farming_strawberry_2.png new file mode 100644 index 00000000..751115e9 Binary files /dev/null and b/mods/farming/textures/farming_strawberry_2.png differ diff --git a/mods/farming/textures/farming_strawberry_3.png b/mods/farming/textures/farming_strawberry_3.png new file mode 100644 index 00000000..8b7a7b8c Binary files /dev/null and b/mods/farming/textures/farming_strawberry_3.png differ diff --git a/mods/farming/textures/farming_strawberry_4.png b/mods/farming/textures/farming_strawberry_4.png new file mode 100644 index 00000000..dcf00175 Binary files /dev/null and b/mods/farming/textures/farming_strawberry_4.png differ diff --git a/mods/farming/textures/farming_strawberry_5.png b/mods/farming/textures/farming_strawberry_5.png new file mode 100644 index 00000000..a2decaae Binary files /dev/null and b/mods/farming/textures/farming_strawberry_5.png differ diff --git a/mods/farming/textures/farming_strawberry_6.png b/mods/farming/textures/farming_strawberry_6.png new file mode 100644 index 00000000..a4d0d603 Binary files /dev/null and b/mods/farming/textures/farming_strawberry_6.png differ diff --git a/mods/farming/textures/farming_strawberry_7.png b/mods/farming/textures/farming_strawberry_7.png new file mode 100644 index 00000000..ace223cd Binary files /dev/null and b/mods/farming/textures/farming_strawberry_7.png differ diff --git a/mods/farming/textures/farming_strawberry_8.png b/mods/farming/textures/farming_strawberry_8.png new file mode 100644 index 00000000..6d7280b6 Binary files /dev/null and b/mods/farming/textures/farming_strawberry_8.png differ diff --git a/mods/farming/textures/farming_sugar.png b/mods/farming/textures/farming_sugar.png new file mode 100644 index 00000000..5cb7fa01 Binary files /dev/null and b/mods/farming/textures/farming_sugar.png differ diff --git a/mods/farming/textures/farming_tomato.png b/mods/farming/textures/farming_tomato.png new file mode 100644 index 00000000..586aa56d Binary files /dev/null and b/mods/farming/textures/farming_tomato.png differ diff --git a/mods/farming/textures/farming_tomato_1.png b/mods/farming/textures/farming_tomato_1.png new file mode 100644 index 00000000..d858e586 Binary files /dev/null and b/mods/farming/textures/farming_tomato_1.png differ diff --git a/mods/farming/textures/farming_tomato_2.png b/mods/farming/textures/farming_tomato_2.png new file mode 100644 index 00000000..9d9ed6d0 Binary files /dev/null and b/mods/farming/textures/farming_tomato_2.png differ diff --git a/mods/farming/textures/farming_tomato_3.png b/mods/farming/textures/farming_tomato_3.png new file mode 100644 index 00000000..fe3dcf0a Binary files /dev/null and b/mods/farming/textures/farming_tomato_3.png differ diff --git a/mods/farming/textures/farming_tomato_4.png b/mods/farming/textures/farming_tomato_4.png new file mode 100644 index 00000000..27c32828 Binary files /dev/null and b/mods/farming/textures/farming_tomato_4.png differ diff --git a/mods/farming/textures/farming_tomato_5.png b/mods/farming/textures/farming_tomato_5.png new file mode 100644 index 00000000..f369a68f Binary files /dev/null and b/mods/farming/textures/farming_tomato_5.png differ diff --git a/mods/farming/textures/farming_tomato_6.png b/mods/farming/textures/farming_tomato_6.png new file mode 100644 index 00000000..0135cb53 Binary files /dev/null and b/mods/farming/textures/farming_tomato_6.png differ diff --git a/mods/farming/textures/farming_tomato_7.png b/mods/farming/textures/farming_tomato_7.png new file mode 100644 index 00000000..4cd85f5f Binary files /dev/null and b/mods/farming/textures/farming_tomato_7.png differ diff --git a/mods/farming/textures/farming_tomato_8.png b/mods/farming/textures/farming_tomato_8.png new file mode 100644 index 00000000..0b490257 Binary files /dev/null and b/mods/farming/textures/farming_tomato_8.png differ diff --git a/mods/farming/textures/farming_tomato_seed.png b/mods/farming/textures/farming_tomato_seed.png new file mode 100644 index 00000000..dbef76e7 Binary files /dev/null and b/mods/farming/textures/farming_tomato_seed.png differ diff --git a/mods/farming/textures/farming_tool_bronzehoe.png b/mods/farming/textures/farming_tool_bronzehoe.png new file mode 100644 index 00000000..ef07a80a Binary files /dev/null and b/mods/farming/textures/farming_tool_bronzehoe.png differ diff --git a/mods/farming/textures/farming_tool_diamondhoe.png b/mods/farming/textures/farming_tool_diamondhoe.png new file mode 100644 index 00000000..093acb82 Binary files /dev/null and b/mods/farming/textures/farming_tool_diamondhoe.png differ diff --git a/mods/farming/textures/farming_tool_mesehoe.png b/mods/farming/textures/farming_tool_mesehoe.png new file mode 100644 index 00000000..ffd597a4 Binary files /dev/null and b/mods/farming/textures/farming_tool_mesehoe.png differ diff --git a/mods/farming/textures/farming_tool_steelhoe.png b/mods/farming/textures/farming_tool_steelhoe.png new file mode 100644 index 00000000..893a6958 Binary files /dev/null and b/mods/farming/textures/farming_tool_steelhoe.png differ diff --git a/mods/farming/textures/farming_tool_stonehoe.png b/mods/farming/textures/farming_tool_stonehoe.png new file mode 100644 index 00000000..4f8dade0 Binary files /dev/null and b/mods/farming/textures/farming_tool_stonehoe.png differ diff --git a/mods/farming/textures/farming_tool_woodhoe.png b/mods/farming/textures/farming_tool_woodhoe.png new file mode 100644 index 00000000..8b20d2dc Binary files /dev/null and b/mods/farming/textures/farming_tool_woodhoe.png differ diff --git a/mods/farming/textures/farming_trellis.png b/mods/farming/textures/farming_trellis.png new file mode 100644 index 00000000..855b9326 Binary files /dev/null and b/mods/farming/textures/farming_trellis.png differ diff --git a/mods/farming/textures/farming_wheat.png b/mods/farming/textures/farming_wheat.png new file mode 100644 index 00000000..1e0ad3b3 Binary files /dev/null and b/mods/farming/textures/farming_wheat.png differ diff --git a/mods/farming/textures/farming_wheat_1.png b/mods/farming/textures/farming_wheat_1.png new file mode 100644 index 00000000..c16ad94b Binary files /dev/null and b/mods/farming/textures/farming_wheat_1.png differ diff --git a/mods/farming/textures/farming_wheat_2.png b/mods/farming/textures/farming_wheat_2.png new file mode 100644 index 00000000..baddb4c5 Binary files /dev/null and b/mods/farming/textures/farming_wheat_2.png differ diff --git a/mods/farming/textures/farming_wheat_3.png b/mods/farming/textures/farming_wheat_3.png new file mode 100644 index 00000000..36ebb192 Binary files /dev/null and b/mods/farming/textures/farming_wheat_3.png differ diff --git a/mods/farming/textures/farming_wheat_4.png b/mods/farming/textures/farming_wheat_4.png new file mode 100644 index 00000000..735ed777 Binary files /dev/null and b/mods/farming/textures/farming_wheat_4.png differ diff --git a/mods/farming/textures/farming_wheat_5.png b/mods/farming/textures/farming_wheat_5.png new file mode 100644 index 00000000..f40b5f04 Binary files /dev/null and b/mods/farming/textures/farming_wheat_5.png differ diff --git a/mods/farming/textures/farming_wheat_6.png b/mods/farming/textures/farming_wheat_6.png new file mode 100644 index 00000000..e9c78e00 Binary files /dev/null and b/mods/farming/textures/farming_wheat_6.png differ diff --git a/mods/farming/textures/farming_wheat_7.png b/mods/farming/textures/farming_wheat_7.png new file mode 100644 index 00000000..cc26ca96 Binary files /dev/null and b/mods/farming/textures/farming_wheat_7.png differ diff --git a/mods/farming/textures/farming_wheat_8.png b/mods/farming/textures/farming_wheat_8.png new file mode 100644 index 00000000..d0500934 Binary files /dev/null and b/mods/farming/textures/farming_wheat_8.png differ diff --git a/mods/farming/textures/farming_wheat_seed.png b/mods/farming/textures/farming_wheat_seed.png new file mode 100644 index 00000000..a9031fba Binary files /dev/null and b/mods/farming/textures/farming_wheat_seed.png differ diff --git a/mods/farming/textures/vessels_drinking_cup.png b/mods/farming/textures/vessels_drinking_cup.png new file mode 100644 index 00000000..2eba2321 Binary files /dev/null and b/mods/farming/textures/vessels_drinking_cup.png differ diff --git a/mods/farming/todo.md b/mods/farming/todo.md new file mode 100644 index 00000000..55870270 --- /dev/null +++ b/mods/farming/todo.md @@ -0,0 +1,12 @@ +* [x] orange trees from farming_plus +* [ ] optional - cocoa sapling +* [x] banana trees from farming_plus +* [x] carrot_seed +* [x] orange_seed +* [x] tomato_seed +* [x] potatoe_seed +* [x] rhubarb_seed +* [x] raspberry_seed +* [x] strawberry_seed +* [x] pumpkin_seed +* [x] aliases diff --git a/mods/farming/tomato.lua b/mods/farming/tomato.lua new file mode 100644 index 00000000..4ff6b643 --- /dev/null +++ b/mods/farming/tomato.lua @@ -0,0 +1,86 @@ + +--[[ + Textures edited from: + http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/1288375-food-plus-mod-more-food-than-you-can-imagine-v2-9) +]] + +minetest.register_craftitem("farming:tomato_seed", { + description = "Tomato Seeds", + inventory_image = "farming_tomato_seed.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:tomato_1") + end +}) + +-- tomato +minetest.register_craftitem("farming:tomato", { + description = "Tomato", + inventory_image = "farming_tomato.png", + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:tomato_1") + end, + on_use = minetest.item_eat(4), +}) + +-- tomato definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_tomato_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:tomato_1", table.copy(crop_def)) + +-- stage2 +crop_def.tiles = {"farming_tomato_2.png"} +minetest.register_node("farming:tomato_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_tomato_3.png"} +minetest.register_node("farming:tomato_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_tomato_4.png"} +minetest.register_node("farming:tomato_4", table.copy(crop_def)) + +-- stage 5 +crop_def.tiles = {"farming_tomato_5.png"} +minetest.register_node("farming:tomato_5", table.copy(crop_def)) + +-- stage 6 +crop_def.tiles = {"farming_tomato_6.png"} +minetest.register_node("farming:tomato_6", table.copy(crop_def)) + +-- stage 7 +crop_def.tiles = {"farming_tomato_7.png"} +crop_def.drop = { + items = { + {items = {'farming:tomato'}, rarity = 1}, + {items = {'farming:tomato_seed'}, rarity = 1}, + {items = {'farming:tomato'}, rarity = 3}, + } +} +minetest.register_node("farming:tomato_7", table.copy(crop_def)) + +-- stage 8 (final) +crop_def.tiles = {"farming_tomato_8.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:tomato 3'}, rarity = 1}, + {items = {'farming:tomato_seed 4'}, rarity = 1}, + {items = {'farming:tomato 3'}, rarity = 2}, + } +} +minetest.register_node("farming:tomato_8", table.copy(crop_def)) diff --git a/mods/farming/wheat.lua b/mods/farming/wheat.lua new file mode 100644 index 00000000..72d65c42 --- /dev/null +++ b/mods/farming/wheat.lua @@ -0,0 +1,152 @@ + +-- wheat seeds +minetest.register_node("farming:seed_wheat", { + description = "Wheat Seed", + tiles = {"farming_wheat_seed.png"}, + inventory_image = "farming_wheat_seed.png", + wield_image = "farming_wheat_seed.png", + drawtype = "signlike", + groups = {seed = 1, snappy = 3, attached_node = 1}, + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + sunlight_propagates = true, + selection_box = farming.select, + on_place = function(itemstack, placer, pointed_thing) + return farming.place_seed(itemstack, placer, pointed_thing, "farming:wheat_1") + end, +}) + +-- harvested wheat +minetest.register_craftitem("farming:wheat", { + description = "Wheat", + inventory_image = "farming_wheat.png", +}) + +-- straw +minetest.register_node("farming:straw", { + description = "Straw", + tiles = {"farming_straw.png"}, + is_ground_content = false, + groups = {snappy = 3, flammable = 4, fall_damage_add_percent=-30}, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_craft({ + output = "farming:straw 3", + recipe = { + {"farming:wheat", "farming:wheat", "farming:wheat"}, + {"farming:wheat", "farming:wheat", "farming:wheat"}, + {"farming:wheat", "farming:wheat", "farming:wheat"}, + } +}) + +minetest.register_craft({ + output = "farming:wheat 3", + recipe = { + {"farming:straw"}, + } +}) + +-- flour +minetest.register_craftitem("farming:flour", { + description = "Flour", + inventory_image = "farming_flour.png", +}) + +minetest.register_craft({ + type = "shapeless", + output = "farming:flour", + recipe = {"farming:wheat", "farming:wheat", "farming:wheat", "farming:wheat"} +}) + +-- bread +minetest.register_craftitem("farming:bread", { + description = "Bread", + inventory_image = "farming_bread.png", + on_use = minetest.item_eat(5), +}) + +minetest.register_craft({ + type = "cooking", + cooktime = 15, + output = "farming:bread", + recipe = "farming:flour" +}) + +-- wheat definition +local crop_def = { + drawtype = "plantlike", + tiles = {"farming_wheat_1.png"}, + paramtype = "light", + sunlight_propagates = true, + walkable = false, + buildable_to = true, + drop = "", + selection_box = farming.select, + groups = { + snappy = 3, flammable = 2, plant = 1, attached_node = 1, + not_in_creative_inventory = 1, growing = 1 + }, + sounds = default.node_sound_leaves_defaults() +} + +-- stage 1 +minetest.register_node("farming:wheat_1", table.copy(crop_def)) + +-- stage 2 +crop_def.tiles = {"farming_wheat_2.png"} +minetest.register_node("farming:wheat_2", table.copy(crop_def)) + +-- stage 3 +crop_def.tiles = {"farming_wheat_3.png"} +minetest.register_node("farming:wheat_3", table.copy(crop_def)) + +-- stage 4 +crop_def.tiles = {"farming_wheat_4.png"} +minetest.register_node("farming:wheat_4", table.copy(crop_def)) + +-- stage 5 +crop_def.tiles = {"farming_wheat_5.png"} +crop_def.drop = { + items = { + {items = {'farming:wheat'}, rarity = 2}, + {items = {'farming:seed_wheat'}, rarity = 2}, + } +} +minetest.register_node("farming:wheat_5", table.copy(crop_def)) + +-- stage 6 +crop_def.tiles = {"farming_wheat_6.png"} +crop_def.drop = { + items = { + {items = {'farming:wheat'}, rarity = 2}, + {items = {'farming:seed_wheat'}, rarity = 1}, + } +} +minetest.register_node("farming:wheat_6", table.copy(crop_def)) + +-- stage 7 +crop_def.tiles = {"farming_wheat_7.png"} +crop_def.drop = { + items = { + {items = {'farming:wheat'}, rarity = 1}, + {items = {'farming:wheat'}, rarity = 3}, + {items = {'farming:seed_wheat'}, rarity = 1}, + {items = {'farming:seed_wheat'}, rarity = 3}, + } +} +minetest.register_node("farming:wheat_7", table.copy(crop_def)) + +-- stage 8 (final) +crop_def.tiles = {"farming_wheat_8.png"} +crop_def.groups.growing = 0 +crop_def.drop = { + items = { + {items = {'farming:wheat'}, rarity = 1}, + {items = {'farming:wheat'}, rarity = 3}, + {items = {'farming:seed_wheat'}, rarity = 1}, + {items = {'farming:seed_wheat'}, rarity = 3}, + } +} +minetest.register_node("farming:wheat_8", table.copy(crop_def))