forked from VoxeLibre/VoxeLibre
Compare commits
772 Commits
Author | SHA1 | Date |
---|---|---|
3raven | 1c5e5a94fd | |
3raven | b90e980fdf | |
3raven | 76855de5d6 | |
3raven | 5482ee3c96 | |
3raven | 54ad49fe10 | |
3raven | 501acefab3 | |
3raven | d54202976c | |
Aliaksei Urbanski | 32ef89aca3 | |
3raven | 0b979e4c64 | |
3raven | c32cccb6d0 | |
3raven | e9d9f880d0 | |
3raven | ec183f23f5 | |
3raven | 13196dd0d8 | |
3raven | 1740f9e88e | |
3raven | 74da1b5baa | |
3raven | 3d5f62640c | |
3raven | e0af2fba71 | |
3raven | 0b76146c39 | |
3raven | efa3df7f87 | |
3raven | 47ed21e71d | |
3raven | d2b39c90cd | |
3raven | 54d7a8f539 | |
3raven | c7fc123b7e | |
3raven | 0b5d157856 | |
3raven | 30a9a42a70 | |
3raven | b1b2690144 | |
3raven | b59a230ba1 | |
3raven | d07229d2ea | |
3raven | 07aab02429 | |
3raven | 085d19ca23 | |
3raven | 0d73bc9a7b | |
3raven | d80a3562f3 | |
the-real-herowl | accb8742dd | |
codiac | 71282e196e | |
codiac | 89c97690c8 | |
codiac | 06f9486e4d | |
codiac | ae5564e658 | |
the-real-herowl | fdf823fff6 | |
Araca | 52b65554d9 | |
the-real-herowl | 5a069af072 | |
the-real-herowl | 14f73a8c55 | |
the-real-herowl | dbab70ea38 | |
chmodsayshello | 952a96b57d | |
Dehydrate6684 | e5a260b563 | |
Dehydrate6684 | 9b2b8ee56e | |
seventeenthShulker | 00cfca5947 | |
seventeenthShulker | c37da143da | |
seventeenthShulker | 520fd773fb | |
seventeenthShulker | 378df76e5f | |
seventeenthShulker | 3e12b3c700 | |
seventeenthShulker | 0637182697 | |
seventeenthShulker | 0580b14310 | |
seventeenthShulker | 98cf3b7f7a | |
seventeenthShulker | e5829f719d | |
seventeenthShulker | 089e3d46f1 | |
seventeenthShulker | 5d8688dbeb | |
seventeenthShulker | 058684f17f | |
seventeenthShulker | 918b8eee38 | |
seventeenthShulker | af206ed8b3 | |
seventeenthShulker | f2eca64e42 | |
the-real-herowl | 262100be24 | |
Eliy21 | 69dc013799 | |
Michieal | a425d359f5 | |
Freedom | 83d6e2a5d2 | |
FossFanatic | ce403b9245 | |
Eliy21 | da911bd4d4 | |
the-real-herowl | 8789411ab7 | |
the-real-herowl | 5b1deedaf0 | |
SmokeyDope | fa1d8dfc47 | |
SmokeyDope | d2a4a6d042 | |
SmokeyDope | 5e194b33bd | |
Araca | 35bb569ee1 | |
chmodsayshello | 5be506830f | |
codiac | 4fcd1ae541 | |
the-real-herowl | f941817c39 | |
seventeenthShulker | bc3bde4cf8 | |
seventeenthShulker | 8099a4bd17 | |
seventeenthShulker | e2ed1ab4a6 | |
seventeenthShulker | e43a8e267d | |
seventeenthShulker | 570caf47eb | |
the-real-herowl | 59f3b53a51 | |
chmodsayshello | ec7e99019e | |
Dehydrate6684 | b320d008ca | |
the-real-herowl | 3d7155c1b9 | |
chmodsayshello | e3ab94809e | |
Dark | a66be39d9b | |
ancientmarinerdev | 3564f6ebde | |
chmodsayshello | f99ae93bf6 | |
Freedom | 8d440252a4 | |
the-real-herowl | d706833f21 | |
the-real-herowl | c874e01cf9 | |
the-real-herowl | 7ce82b9dcb | |
the-real-herowl | 645072507f | |
the-real-herowl | 924a6c1c47 | |
the-real-herowl | 20b0f0748d | |
the-real-herowl | d7c76e33d8 | |
the-real-herowl | 966712f4ff | |
the-real-herowl | e4102e6124 | |
the-real-herowl | 17c8f220e6 | |
the-real-herowl | df17688b7d | |
the-real-herowl | 729d8ec9e0 | |
the-real-herowl | c9dc12b081 | |
Nauta Turbidus | a1b6819756 | |
the-real-herowl | f1568483b3 | |
ThePython10110 | d7fa24ebf8 | |
Dehydrate6684 | 23468cc2dd | |
Dehydrate6684 | 0c48a46f7c | |
chmodsayshello | 712a6d6c66 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | a620d24ec8 | |
ancientmarinerdev | 178b24886f | |
ancientmarinerdev | 8333281b4f | |
Nicu | 6d3e55ce12 | |
ancientmarinerdev | 2c2f5595f3 | |
chmodsayshello | 8936313fb3 | |
ancientmarinerdev | c51442704c | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 2bd6678b08 | |
Codiac | e0c44244f9 | |
Codiac | 5b7352a23a | |
Michieal | e8c658658d | |
Michieal | e9d994b74d | |
Michieal | eafe6627d8 | |
chmodsayshello | 4046a68fbf | |
Blockhead | 882c3ef339 | |
codiac | 95db118361 | |
codiac | d2d7887e0f | |
Michieal | b2ebcf5d4f | |
Michieal | f57220f784 | |
codiac | 7577d37b38 | |
codiac | bf4c7e1913 | |
codiac | 11e3674926 | |
Dehydrate6684 | cc217d0089 | |
Dehydrate6684 | e6653b78ee | |
Dehydrate6684 | a960bf2e8e | |
Eliy21 | 2d9bffaa43 | |
Eliy21 | eb658a4996 | |
ancientmarinerdev | b4c693bb20 | |
ancientmarinerdev | bd46428d65 | |
ancientmarinerdev | 9e53efbc3e | |
ancientmarinerdev | 6b36abfe91 | |
ancientmarinerdev | 49e7449d7f | |
ancientmarinerdev | 1d28a8e4ac | |
Wbjitscool | c32e88e910 | |
thunder1035 | 969fa98f18 | |
PrairieWind | 107420c80f | |
PrairieWind | f9afc74077 | |
PrairieWind | 21f0c7750b | |
PrairieWind | 04b59b2190 | |
PrairieWind | 15bb4fa4bf | |
PrairieWind | 4c3e521779 | |
DinoNuggies4665 | 4c59b189dd | |
PrairieWind | 23d6c3d17b | |
DinoNuggies4665 | 61f489e71f | |
DinoNuggies4665 | 4616b6c3ec | |
DinoNuggies4665 | d92296712c | |
DinoNuggies4665 | 5b212dd3fe | |
PrairieWind | d3095fea57 | |
DinoNuggies4665 | 177196a8d2 | |
DinoNuggies4665 | 13d4841097 | |
DinoNuggies4665 | 0b7cec419a | |
DinoNuggies4665 | cef6c72a71 | |
DinoNuggies4665 | aca82fcafc | |
DinoNuggies4665 | a7fcd62999 | |
PrairieWind | d489c954f5 | |
PrairieWind | 8b0097df71 | |
ancientmarinerdev | cb407666a4 | |
ancientmarinerdev | 969a08b7be | |
ancientmarinerdev | 1749712318 | |
ancientmarinerdev | a648e53699 | |
Julien Palard | 878480d010 | |
ancientmarinerdev | b0208e622b | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 8c41fb53e3 | |
chmodsayshello | 408c7f71da | |
Sab Pyrope | 8b7a71f93e | |
Codiac | 98e7cd6e8e | |
ancientmarinerdev | 4853018bb0 | |
ancientmarinerdev | c6256295a7 | |
SmokeyDope | b911f99d23 | |
ancientmarinerdev | 273165ce3b | |
SmokeyDope | aa08a176fc | |
Van | 7b764adbc0 | |
chmodsayshello | 1502757732 | |
chmodsayshello | 49bd28e109 | |
chmodsayshello | 6c107ce990 | |
chmodsayshello | 7c43c15fda | |
Sab Pyrope | 5b4a79a26d | |
chmodsayshello | 291cbaf434 | |
chmodsayshello | fb74689f3d | |
chmodsayshello | da024bb4b8 | |
ancientmarinerdev | 3c266f5cfd | |
ancientmarinerdev | 5f0944062c | |
chmodsayshello | 2f8bb9726b | |
chmodsayshello | 8176e7319f | |
AFCMS | f008fa3323 | |
AFCMS | 2eabeb119a | |
Sebastian Riedel | 28d77a3e5b | |
AFCMS | 149cb5d17c | |
AFCMS | 1b5b2e4dc7 | |
AFCMS | 560aead57f | |
AFCMS | 438998de6a | |
AFCMS | 4f0620c7c1 | |
AFCMS | 4efb5bf8b9 | |
AFCMS | 158ff8e860 | |
AFCMS | e936cede03 | |
AFCMS | df2ab1fd8c | |
AFCMS | dc20267b4f | |
AFCMS | 9d184e9897 | |
AFCMS | 3fe3153a40 | |
AFCMS | bf28bab427 | |
AFCMS | f7c251e7f2 | |
AFCMS | 1bdbdc365d | |
AFCMS | a77930d4a1 | |
AFCMS | bb3771c0d2 | |
AFCMS | 40bc219a86 | |
AFCMS | 054dc22432 | |
AFCMS | 06e2022c6d | |
AFCMS | 2cb9eca8e1 | |
AFCMS | ae632fe773 | |
AFCMS | 4db0631133 | |
AFCMS | 0e13190ea4 | |
AFCMS | cd6dd4d851 | |
AFCMS | 653f82198e | |
AFCMS | 3bbae86baf | |
cora | ee4f7d1b88 | |
AFCMS | 7cf91c79cb | |
AFCMS | c8620685c0 | |
AFCMS | 6a2ad4e618 | |
AFCMS | 7d8a1e1e5f | |
AFCMS | ecb4c82600 | |
AFCMS | 9831f2c25b | |
AFCMS | 4055555ec1 | |
AFCMS | 7c15fe6ac9 | |
AFCMS | 5011e12209 | |
AFCMS | f6804600ba | |
AFCMS | bf57cf3aa3 | |
AFCMS | 093d55861c | |
AFCMS | 0da1822d26 | |
AFCMS | 0ae76776b1 | |
AFCMS | e5ee0c4afc | |
AFCMS | 842363464d | |
AFCMS | 37176976b6 | |
AFCMS | 1065eb4d8c | |
AFCMS | 452cd26558 | |
AFCMS | 9e83e531bd | |
AFCMS | 04a58ddd24 | |
AFCMS | fbb51835b3 | |
AFCMS | fb79465052 | |
AFCMS | e093c69328 | |
AFCMS | c2032fe4de | |
AFCMS | 691b93ac68 | |
AFCMS | 4ee6a67516 | |
AFCMS | 54b119cffa | |
AFCMS | 558df5e4bd | |
AFCMS | cf01c0630c | |
AFCMS | f20fbfb95a | |
AFCMS | 767c904258 | |
AFCMS | ac4db102b2 | |
codiac | 85c1c57e95 | |
chmodsayshello | 64bc57c6a4 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | d3fb221641 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 6756358307 | |
cora | dd96af15c4 | |
ancientmarinerdev | 6cdd679baf | |
Sebastian Riedel | 11d275a471 | |
Sebastian Riedel | d7ea628270 | |
codiac | 0d16acdd42 | |
codiac | 246a95f973 | |
codiac | 8c64fdfa5d | |
codiac | 034382c883 | |
cora | 898a183ccd | |
codiac | 6ae597c97f | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | e3bdedb4d5 | |
Mikita Wiśniewski | f884de5f87 | |
Mikita Wiśniewski | a609639585 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | aa3b3421d5 | |
codiac | 4f2cb955b8 | |
codiac | a3bbb3694c | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | b911da121e | |
Nicu | a99daf4294 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | f9eb31ed46 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 80b21759d9 | |
codiac | 2cf5183638 | |
Wbjitscool | 86b5648442 | |
ADLON | dd3969ff56 | |
ancientmarinerdev | 80ac4aa930 | |
ancientmarinerdev | 13fc47751d | |
ancientmarinerdev | 2ff98f0d27 | |
ancientmarinerdev | bfde7445df | |
ancientmarinerdev | 8cc0b1a85f | |
ancientmarinerdev | 9e7ade8ae2 | |
chmodsayshello | f83f11bdaa | |
ancientmarinerdev | 48bab788f0 | |
ancientmarinerdev | 0304091756 | |
ancientmarinerdev | b998066391 | |
ancientmarinerdev | 9bc48fec13 | |
ancientmarinerdev | 650cb39606 | |
ancientmarinerdev | 445370de09 | |
ancientmarinerdev | 73af332262 | |
seventeenthShulker | 4365f4df77 | |
seventeenthShulker | 99af25fba3 | |
seventeenthShulker | bd95528e73 | |
PrairieWind | 3255b7f754 | |
chmodsayshello | d346aa07ee | |
ancientmarinerdev | 40e072ab89 | |
ancientmarinerdev | cf95a31066 | |
chmodsayshello | 6e29ae5c6c | |
ancientmarinerdev | 39b614a038 | |
ancientmarinerdev | eded3b8dc4 | |
ancientmarinerdev | f4e84b9091 | |
ancientmarinerdev | 102f1a1490 | |
ancientmarinerdev | 47e78d473c | |
ancientmarinerdev | 543720d9a7 | |
ancientmarinerdev | 90a6fb8925 | |
ancientmarinerdev | 823f7ee5c7 | |
ancientmarinerdev | fe501e8021 | |
ancientmarinerdev | b05fa5562c | |
Isaac Dennis | 75a31a2106 | |
Isaac Dennis | 86cbca1d17 | |
ancientmarinerdev | f335171965 | |
ancientmarinerdev | 8530f4d863 | |
Kristian | d4e348a4bd | |
Kristian | 590cbc0c3c | |
Kristian | 6d767b7d11 | |
Kristian | 7ba0773769 | |
Kristian | 0f82364b3e | |
Kristian | 49a899170f | |
Kristian | b8887b079a | |
Kristian | 9c77cbc011 | |
Kristian | cc21b74125 | |
ancientmarinerdev | 5c69daf5ba | |
José Muñoz | 09732acf77 | |
José Muñoz | 008dd95f1f | |
José Muñoz | f6fb1d1121 | |
José Muñoz | c61df75370 | |
PrairieWind | 158a5311f9 | |
cora | d0e981e4db | |
PrairieWind | 70caacd369 | |
ancientmarinerdev | 03341ade2e | |
ancientmarinerdev | 3c4fb9abb2 | |
ancientmarinerdev | 852c2c5710 | |
ancientmarinerdev | 1dfbd612be | |
Wbjitscool | 81569a6917 | |
PrairieWind | 17371ad60b | |
Nicu | 36f5372fe8 | |
PrairieWind | 0902e137e3 | |
PrairieWind | 67078ba3b1 | |
PrairieWind | da71e7b521 | |
PrairieWind | 960f9adda8 | |
PrairieWind | 74742f7fc8 | |
PrairieWind | c5c35ca786 | |
PrairieWind | bba440b617 | |
PrairieWind | 101cde2a94 | |
ancientmarinerdev | 0f8b709677 | |
ancientmarinerdev | dd5d1dad29 | |
chmodsayshello | 378b413986 | |
ancientmarinerdev | a286cb5046 | |
ancientmarinerdev | 8b9b4b00e5 | |
ancientmarinerdev | 7d51519f4d | |
ancientmarinerdev | 088f8dec2f | |
ancientmarinerdev | 5806dd6017 | |
ancientmarinerdev | 658f244ae4 | |
PrairieWind | ed13590bb0 | |
ancientmarinerdev | 23711950c1 | |
ancientmarinerdev | baf6ae65e7 | |
chmodsayshello | 9ba503f99d | |
chmodsayshello | 9d1840f4ca | |
chmodsayshello | 5cc9038169 | |
chmodsayshello | 460ef23b50 | |
chmodsayshello | 1e16647fe9 | |
chmodsayshello | 16415ae577 | |
chmodsayshello | 2665980007 | |
ancientmarinerdev | 8c8b3be0f5 | |
chmodsayshello | 75d6509c3e | |
Temak | f7f8a72d08 | |
Niterux | 766c9efe33 | |
ancientmarinerdev | 52fba55910 | |
Nicu | 358432c52a | |
ancientmarinerdev | 4a17c8abc1 | |
ancientmarinerdev | da19aceb06 | |
ancientmarinerdev | 67260b16be | |
chmodsayshello | 7219f70d77 | |
chmodsayshello | bb2ce9ef92 | |
seventeenthShulker | 758d38894d | |
ancientmarinerdev | 1192a46b9c | |
SmokeyDope | fd07cbdd5a | |
SmokeyDope | b409610537 | |
SmokeyDope | deb703fbc2 | |
FossFanatic | ac31642ec9 | |
chmodsayshello | bc29e4dd95 | |
chmodsayshello | b76ed92aba | |
chmodsayshello | 703f1f46fc | |
chmodsayshello | 0b118c170e | |
chmodsayshello | 8431ac34d0 | |
ancientmarinerdev | f57f73681a | |
chmodsayshello | 049128972f | |
chmodsayshello | 0c65d9d11a | |
chmodsayshello | 311beeb31c | |
ancientmarinerdev | 60c996b5ac | |
chmodsayshello | bc3da8dab8 | |
chmodsayshello | ed5232411b | |
chmodsayshello | 6c6a27320d | |
chmodsayshello | 82f2f4784e | |
chmodsayshello | 8476865ea7 | |
chmodsayshello | b4273af245 | |
chmodsayshello | 483285a612 | |
chmodsayshello | b154f2def1 | |
chmodsayshello | c62195662c | |
chmodsayshello | 4dc5ad3bdb | |
chmodsayshello | cc186cc588 | |
chmodsayshello | df8c9625e4 | |
ancientmarinerdev | 47f64f63a3 | |
ancientmarinerdev | cc5a0971ac | |
epCode | df8592df41 | |
epCode | 5e4fa30aae | |
epCode | e49eac6d85 | |
epCode | e53b6c124c | |
epCode | 92887f5501 | |
epCode | 86cd5711ca | |
epCode | 908ba9fba6 | |
epCode | 91d94800d7 | |
epCode | 74e55ca361 | |
epCode | c049113f26 | |
epCode | 1f5247df06 | |
epCode | 2e2f56122d | |
ancientmarinerdev | 46d486c7cb | |
PrairieWind | 75e4000b30 | |
PrairieWind | 46f6731cf5 | |
PrairieWind | 0fba7eaed4 | |
Michieal | 7c46826958 | |
Michieal | d6858b7e2a | |
Michieal | 9e5a45e3fd | |
PrairieWind | 4b9fc7046b | |
ancientmarinerdev | 3eb2f745e2 | |
ancientmarinerdev | 4287a261c8 | |
ancientmarinerdev | 5cbb56d71b | |
ancientmarinerdev | c65f8c9e51 | |
ancientmarinerdev | 812269264b | |
ancientmarinerdev | afb4540408 | |
ancientmarinerdev | 4d3e8e25e5 | |
ancientmarinerdev | ae32ce4a0a | |
ancientmarinerdev | 4c3d726882 | |
ancientmarinerdev | 90842c5f25 | |
ancientmarinerdev | 428ae9ac0d | |
SmokeyDope | adee1a49af | |
megustanlosfrijoles | 06077d1633 | |
ancientmarinerdev | ae486fa525 | |
Lars Mueller | b866d5d98e | |
uqers | 7133031caf | |
ancientmarinerdev | 019717cab0 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | f1d17e2c69 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 26f033932e | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 1e63f3931a | |
ancientmarinerdev | bd37ed178c | |
PrairieWind | 5ed92a2695 | |
ancientmarinerdev | 8f60fb08d3 | |
ancientmarinerdev | 10a3d06360 | |
ancientmarinerdev | 08cbd95a5e | |
PrairieWind | a5a035d9bb | |
uqers | 9c8b942e26 | |
ancientmarinerdev | 4651bd7e7d | |
ancientmarinerdev | 62ca6faab1 | |
ancientmarinerdev | ccf063999e | |
ancientmarinerdev | 4a7a50e78c | |
ancientmarinerdev | 00a950721d | |
PrairieWind | 6294a61d0d | |
ancientmarinerdev | 393c24d32a | |
PrairieWind | 873297d2cf | |
ancientmarinerdev | 681ea9b515 | |
ancientmarinerdev | e2688c03e3 | |
ancientmarinerdev | d6192dda67 | |
PrairieWind | e2963f88a7 | |
ancientmarinerdev | 11b371a107 | |
PrairieWind | 5071a7c789 | |
PrairieWind | 0903ac60e4 | |
ancientmarinerdev | f093050c76 | |
PrairieWind | d467b80491 | |
ancientmarinerdev | 6ded4d2322 | |
ancientmarinerdev | 5a059379b2 | |
ancientmarinerdev | 952a90bfde | |
ancientmarinerdev | f326fa620f | |
ancientmarinerdev | 3d1fb8cf4a | |
ancientmarinerdev | 519b237ba8 | |
ancientmarinerdev | 72c3f87925 | |
ancientmarinerdev | 818052dc6c | |
ancientmarinerdev | b3a6970370 | |
ancientmarinerdev | 53637bbc19 | |
ancientmarinerdev | 92a8f23d22 | |
ancientmarinerdev | 2d89440972 | |
ancientmarinerdev | 92c0809dbe | |
ancientmarinerdev | 530c8ec0da | |
ancientmarinerdev | 47e26bbfe6 | |
PrairieWind | f019f4ae45 | |
FossFanatic | 998983445b | |
ancientmarinerdev | 0a0bb3ff9a | |
PrairieWind | be32ffde6b | |
PrairieWind | 0364c8d2a6 | |
ancientmarinerdev | 3aed71fb85 | |
PrairieWind | 8a2c90406f | |
ancientmarinerdev | d42260cea3 | |
3raven | 9518d47662 | |
ancientmarinerdev | ede98cda80 | |
ancientmarinerdev | 09619a62ee | |
ancientmarinerdev | 31e6e38013 | |
ancientmarinerdev | 8092fd573c | |
ancientmarinerdev | 0185609b01 | |
ancientmarinerdev | 7726e576f0 | |
ancientmarinerdev | d920441a01 | |
ancientmarinerdev | c62694f9e4 | |
ancientmarinerdev | 39872f8ef6 | |
ancientmarinerdev | 0787d7a988 | |
ancientmarinerdev | 8a771ebfce | |
megustanlosfrijoles | d14c074d6c | |
ancientmarinerdev | 42c70ee622 | |
ancientmarinerdev | ff426412ef | |
ancientmarinerdev | 6151507442 | |
ancientmarinerdev | 3785dcda48 | |
ancientmarinerdev | 1694780d3f | |
ancientmarinerdev | ea4ea3f05e | |
ancientmarinerdev | 453e90741d | |
ancientmarinerdev | 6f75932a4b | |
ancientmarinerdev | 2d00e1e203 | |
ancientmarinerdev | 8b45cb2672 | |
PrairieWind | 848003de85 | |
ancientmarinerdev | be8d9122ee | |
ancientmarinerdev | 5507e99582 | |
ancientmarinerdev | fb9a630a5b | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 10459f51b1 | |
Mikita Wiśniewski | 387b79e582 | |
Mikita Wiśniewski | 21694879be | |
SmokeyDope | 3b64ceb5b2 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 3e768c6a6f | |
SmokeyDope | 1448a5e098 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 8ef653fb77 | |
ancientmarinerdev | 938ee7a832 | |
ancientmarinerdev | c48510244e | |
ancientmarinerdev | 52e64a6f75 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 0568c18081 | |
cora | 13df9ec46c | |
ancientmarinerdev | 2c01240a56 | |
PrairieWind | b001e4e06f | |
FlamingRCCars | 1a7f9fe8ec | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | ec5b0903be | |
megustanlosfrijoles | 7dc09e3ebd | |
ancientmarinerdev | 0d80f1126c | |
ancientmarinerdev | b15482012e | |
chmodsayshello | a8c989edd8 | |
chmodsayshello | 1a1473e8c0 | |
chmodsayshello | 80cde37e65 | |
chmodsayshello | 181cb73e45 | |
chmodsayshello | 198eb630e1 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 6c99a63419 | |
chmodsayshello | 5db1e1876c | |
ancientmarinerdev | 32a60c888b | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | cdb2bc20b0 | |
ancientmarinerdev | becf98875f | |
ancientmarinerdev | b374301ebf | |
chmodsayshello | 326e805798 | |
chmodsayshello | 65aa185ffa | |
ancientmarinerdev | 90b9263f03 | |
ancientmarinerdev | 3b1464ecc8 | |
ancientmarinerdev | 1015f5a569 | |
ancientmarinerdev | 31b65bac91 | |
FossFanatic | 01ac9ad685 | |
FossFanatic | d28dcb1b10 | |
FossFanatic | aac6af4c20 | |
FossFanatic | d8d83dd21c | |
FossFanatic | 76bf98b26c | |
FossFanatic | d53ea65da8 | |
ancientmarinerdev | cf174c110a | |
ancientmarinerdev | 0de9685914 | |
ancientmarinerdev | 3ed3f16702 | |
chmodsayshello | 99918c192c | |
ancientmarinerdev | 20638c482d | |
PrairieWind | f8d338d731 | |
PrairieWind | 5165730da8 | |
ancientmarinerdev | d0f7d7c90d | |
chmodsayshello | 0719d6038c | |
chmodsayshello | bf9989beb9 | |
chmodsayshello | 62c014363d | |
chmodsayshello | 75595115a0 | |
chmodsayshello | d9ac803f5b | |
chmodsayshello | 899d619624 | |
chmodsayshello | 145be4c830 | |
chmodsayshello | a55cbaadd6 | |
ancientmarinerdev | 56175d839f | |
ancientmarinerdev | 7b748efa64 | |
syl | ac4073a259 | |
chmodsayshello | 2366969e00 | |
chmodsayshello | fca23ba47f | |
chmodsayshello | 4b1cc017a9 | |
chmodsayshello | 786aaf7a6d | |
ancientmarinerdev | 1b4d9cfab7 | |
ancientmarinerdev | 7fe1be2c18 | |
chmodsayshello | 645e20afa4 | |
chmodsayshello | a026bbd3c4 | |
chmodsayshello | 9c8463d2e3 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 93bc5bb5f8 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | b19cc8a5e6 | |
ancientmarinerdev | 6817a8535b | |
ancientmarinerdev | c83574802f | |
PrairieWind | 0f64fb79c5 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 87bf3aed59 | |
ancientmarinerdev | 0ee31bd322 | |
ancientmarinerdev | 3e6b43ad47 | |
ancientmarinerdev | ed8953dfe3 | |
ancientmarinerdev | 8edffeb40d | |
ancientmarinerdev | 80f038da4a | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 952c72c414 | |
PrairieWind | 088922dc33 | |
PrairieWind | a98f79763b | |
PrairieWind | 9c83755f53 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | acfcb7528c | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 771044236f | |
ancientmarinerdev | bfea20dd00 | |
ancientmarinerdev | 0abc0ffc48 | |
ancientmarinerdev | 4205915a0b | |
PrairieWind | f7bdf7481c | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 6e107a77b5 | |
ancientmarinerdev | 53923dd5fa | |
ancientmarinerdev | 59f4a62fd6 | |
ancientmarinerdev | f8e994ae78 | |
ancientmarinerdev | deb393ae32 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | bef204f548 | |
ancientmarinerdev | 80225bb8df | |
SmokeyDope | 8a1c885faf | |
SmokeyDope | c3e37cb840 | |
SmokeyDope | 4226b2a8ba | |
SmokeyDope | b08b6034ac | |
PrairieWind | 2a3fbdead0 | |
PrairieWind | f284b1ca0e | |
PrairieWind | 2bd36b5d66 | |
ancientmarinerdev | d5c150d46c | |
PrairieWind | 8a129fa00c | |
ancientmarinerdev | 12b9def9ad | |
ancientmarinerdev | 61a4595c1b | |
ancientmarinerdev | 2426570871 | |
PrairieWind | ce1393af0c | |
Wbjitscool | bfa5662421 | |
Wbjitscool | 87ca144c4e | |
Wbjitscool | a10235f330 | |
Wbjitscool | e3978c4d22 | |
Wbjitscool | c0fa2c38bd | |
Wbjitscool | 049a4a11f4 | |
PrairieWind | 114e640132 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 692758bd6d | |
ancientmarinerdev | 08990207cf | |
ancientmarinerdev | 3bdc77a1aa | |
ancientmarinerdev | 7f3734b6cb | |
ancientmarinerdev | b7079e8b19 | |
ancientmarinerdev | 9887958e4e | |
ancientmarinerdev | a806833e4a | |
ancientmarinerdev | 46eb4d11dc | |
ancientmarinerdev | 6c8113dec8 | |
ancientmarinerdev | b72dbf17a6 | |
ancientmarinerdev | 049406162e | |
ancientmarinerdev | 924d999ec2 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | a52931f986 | |
ancientmarinerdev | c499d20d25 | |
SmokeyDope | 47b6e54dad | |
SmokeyDope | 257e5f993b | |
ancientmarinerdev | f02afca62c | |
PrairieWind | 802ff3d984 | |
ancientmarinerdev | 9367c96525 | |
ancientmarinerdev | f319a8d903 | |
ancientmarinerdev | 5e8bc16a0c | |
ancientmarinerdev | c5a15192b3 | |
ancientmarinerdev | e41b166c1b | |
ancientmarinerdev | c393b15965 | |
ancientmarinerdev | f5ea3894cf | |
ancientmarinerdev | 0fbdc07402 | |
ancientmarinerdev | 41882e9e1f | |
ancientmarinerdev | 15fce1130e | |
ancientmarinerdev | 2440b73e67 | |
ancientmarinerdev | 109bf17723 | |
ancientmarinerdev | a513547958 | |
ancientmarinerdev | 1c0387b898 | |
ancientmarinerdev | 5409a382f9 | |
ancientmarinerdev | ecf72db684 | |
ancientmarinerdev | bcd7f38fa7 | |
ancientmarinerdev | 3eab946889 | |
anarquimico | f817fe7f72 | |
anarquimico | d5f01e88c4 | |
ancientmarinerdev | b4ea9f048b | |
ancientmarinerdev | 6989e00af7 | |
ancientmarinerdev | 23f0c9a83e | |
ancientmarinerdev | 81a258d33b | |
ancientmarinerdev | bd579314ba | |
ancientmarinerdev | e7449a65d8 | |
ancientmarinerdev | b8b47e55e1 | |
ancientmarinerdev | 1182ce349a | |
SmokeyDope | 3f80cc8f26 | |
SmokeyDope | 68a44d7824 | |
SmokeyDope | ced3b4dff1 | |
SmokeyDope | 44711369d9 | |
SmokeyDope | 3839250b38 | |
ancientmarinerdev | a4b4e4de69 | |
ancientmarinerdev | 002a63585f | |
SmokeyDope | 811f8ac516 | |
SmokeyDope | 89f2c06af2 | |
SmokeyDope | 20f8e18098 | |
ancientmarinerdev | 3b4fc04330 | |
ancientmarinerdev | d437f45f4a | |
ancientmarinerdev | ef633ce617 | |
ancientmarinerdev | a3f23d0b35 | |
ancientmarinerdev | 2c7039fdda | |
ancientmarinerdev | c6db032674 | |
ancientmarinerdev | 9f182dc63a | |
ancientmarinerdev | ff1b941d19 | |
ancientmarinerdev | be269b2034 | |
ancientmarinerdev | 97091de67f | |
ancientmarinerdev | ae7cfdff69 | |
ancientmarinerdev | 0dee7792f4 | |
ancientmarinerdev | 583d066587 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 150222583a | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | a3e6f90b09 | |
ancientmarinerdev | 9697591dd6 | |
FossFanatic | ae811ed703 | |
ancientmarinerdev | fa0a595009 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 75dffe5059 | |
ancientmarinerdev | 3063cc97f7 | |
ancientmarinerdev | db53e41ebd | |
ancientmarinerdev | 4917ea1478 | |
syl | 1d981876d9 | |
ancientmarinerdev | 7b53b6e45f | |
ancientmarinerdev | 270820125d | |
ancientmarinerdev | fc7eb135e6 | |
ancientmarinerdev | c97fef03b9 | |
ancientmarinerdev | 37ca0efe05 | |
syl | 8a7a8ce1bf | |
syl | 2d1c904368 | |
ancientmarinerdev | b49828e9cb | |
ancientmarinerdev | 03d8363ed1 | |
ancientmarinerdev | ede3123b1a | |
ancientmarinerdev | 32ffa32009 | |
ancientmarinerdev | 0f7efcf9c1 | |
ancientmarinerdev | 4fe4559e6d | |
ancientmarinerdev | 4e363049e1 | |
ancientmarinerdev | d5cb745def | |
ancientmarinerdev | 639cec4989 | |
ancientmarinerdev | 547973877a | |
ancientmarinerdev | 994f720385 | |
grorp | a766a6ac85 | |
grorp | 2b0c5549f4 | |
grorp | 79996f143e | |
grorp | 166f15f5c6 | |
grorp | c706d44d55 | |
grorp | feca77c1d7 | |
grorp | 9463d12a35 | |
grorp | fa07fab325 | |
grorp | df16065617 | |
grorp | 735904ce61 | |
grorp | 49a5e28398 | |
FossFanatic | f012dbf50a | |
FossFanatic | d8d44fce0f | |
ancientmarinerdev | 987760749f | |
ancientmarinerdev | 038d9ec014 | |
ancientmarinerdev | 6097dacbab | |
ancientmarinerdev | 5b7132ac5e | |
ancientmarinerdev | 5fc78bf6b0 | |
ancientmarinerdev | b47ef9275b | |
ancientmarinerdev | ce6d9d561f | |
syl | 21dbf583ee | |
syl | 96b2f6a01d | |
ancientmarinerdev | 85fe29e5d3 | |
ancientmarinerdev | 655c130956 | |
ancientmarinerdev | 325de7f2cd | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 3c9b3497bb | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 8d318dfaa2 | |
FossFanatic | 6304502173 | |
FossFanatic | b1a52a3243 | |
FossFanatic | 1a1ea29f6e | |
FossFanatic | af8c4ded93 | |
FossFanatic | 8b0d195906 |
|
@ -5,3 +5,4 @@
|
||||||
*.blend3
|
*.blend3
|
||||||
/.idea/
|
/.idea/
|
||||||
*.xcf
|
*.xcf
|
||||||
|
.Rproj.user
|
|
@ -1,3 +1,5 @@
|
||||||
|
---@diagnostic disable
|
||||||
|
|
||||||
unused_args = false
|
unused_args = false
|
||||||
allow_defined_top = true
|
allow_defined_top = true
|
||||||
max_line_length = false
|
max_line_length = false
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"runtime.version": "LuaJIT",
|
||||||
|
"diagnostics": { "disable": ["lowercase-global"] },
|
||||||
|
"diagnostics.globals": [
|
||||||
|
"minetest",
|
||||||
|
"dump",
|
||||||
|
"dump2",
|
||||||
|
"Raycast",
|
||||||
|
"Settings",
|
||||||
|
"PseudoRandom",
|
||||||
|
"PerlinNoise",
|
||||||
|
"VoxelManip",
|
||||||
|
"SecureRandom",
|
||||||
|
"VoxelArea",
|
||||||
|
"PerlinNoiseMap",
|
||||||
|
"PcgRandom",
|
||||||
|
"ItemStack",
|
||||||
|
"AreaStore",
|
||||||
|
"vector"
|
||||||
|
],
|
||||||
|
"workspace.ignoreDir": [".luacheckrc"]
|
||||||
|
}
|
|
@ -9,10 +9,9 @@ You can help with MineClone2's development in many different ways,
|
||||||
whether you're a programmer or not.
|
whether you're a programmer or not.
|
||||||
|
|
||||||
## MineClone2's development target is to...
|
## MineClone2's development target is to...
|
||||||
- Crucially, create a stable, moddable, free/libre clone of Minecraft
|
- Create a stable, peformant, moddable, free/libre game based on Minecraft
|
||||||
based on the Minetest engine with polished features, usable in both
|
using the Minetest engine, usable in both singleplayer and multiplayer.
|
||||||
singleplayer and multiplayer. Currently, a lot of Minecraft features
|
- Currently, a lot of features are already implemented.
|
||||||
are already implemented.
|
|
||||||
Polishing existing features is always welcome.
|
Polishing existing features is always welcome.
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
|
@ -76,7 +75,7 @@ in singleplayer, post a screenshot of the message that Minetest showed
|
||||||
when the crash happened (or copy the message into your issue). If you
|
when the crash happened (or copy the message into your issue). If you
|
||||||
are a server admin, you can find error messages in the log file of the
|
are a server admin, you can find error messages in the log file of the
|
||||||
server.
|
server.
|
||||||
* Tell us which MineClone2 and Minetest versions you are using.
|
* Tell us which MineClone2 and Minetest versions you are using (from Minetest 5.7 type /ver, for previous versions, check the game.conf or README.md file).
|
||||||
* Tell us how to reproduce the problem: What you were doing to trigger
|
* Tell us how to reproduce the problem: What you were doing to trigger
|
||||||
the bug, e.g. before the crash happened or what causes the faulty
|
the bug, e.g. before the crash happened or what causes the faulty
|
||||||
behavior.
|
behavior.
|
||||||
|
@ -120,11 +119,11 @@ It's also a good idea to join the Discord server
|
||||||
(or alternatively IRC or Matrix).
|
(or alternatively IRC or Matrix).
|
||||||
|
|
||||||
#### Textures
|
#### Textures
|
||||||
For textures we use the Pixel Perfection texture pack. For older Minecraft
|
For textures we prefer original art, but in the absence of that will accept
|
||||||
features that is mostly enough but a lot of the newer textures in it are
|
Pixel Perfection texture pack contributions. Be warned many of the newer
|
||||||
copies or slight modifications of the original MC textures so great caution
|
textures in it are copies or slight modifications of the original MC textures
|
||||||
needs to be taken when using any textures coming from Minecraft texture
|
so great caution needs to be taken when using any textures coming from
|
||||||
packs.
|
Minecraft texture packs.
|
||||||
If you want to make such contributions, join our Discord server. Demands
|
If you want to make such contributions, join our Discord server. Demands
|
||||||
for textures will be communicated there.
|
for textures will be communicated there.
|
||||||
|
|
||||||
|
@ -135,7 +134,10 @@ resource pack or minetest_game. Unfortunately, MineClone2 does not play
|
||||||
a sound in every situation you would get one in Minecraft. Any help with
|
a sound in every situation you would get one in Minecraft. Any help with
|
||||||
sounds is greatly appreciated, however if you add new sounds you should
|
sounds is greatly appreciated, however if you add new sounds you should
|
||||||
probably work together with a programmer, to write the code to actually
|
probably work together with a programmer, to write the code to actually
|
||||||
play these sounds in game.
|
play these sounds in game. All sounds should be released under an open
|
||||||
|
source license with clear information on the source, licencing and any
|
||||||
|
changes made by the contributor. Use the README files in the mod to
|
||||||
|
communicate this information.
|
||||||
|
|
||||||
#### 3D Models
|
#### 3D Models
|
||||||
Most of the 3D Models in MineClone2 come from
|
Most of the 3D Models in MineClone2 come from
|
||||||
|
@ -145,9 +147,9 @@ Blender on demand. Many of the models have to be patched, some new
|
||||||
animations have to be added etc.
|
animations have to be added etc.
|
||||||
|
|
||||||
#### Crediting
|
#### Crediting
|
||||||
Asset contributions will be credited in their own respective sections in
|
Asset contributions will be credited in their mods and their own respective
|
||||||
CREDITS.md. If you have commited the results yourself, you will also be
|
sections in CREDITS.md. If you have commited the results yourself, you will
|
||||||
credited in the Contributors section.
|
also be credited in the Contributors section.
|
||||||
|
|
||||||
### Contributing Translations
|
### Contributing Translations
|
||||||
|
|
||||||
|
@ -182,7 +184,12 @@ information about the game's performance and let us know places to
|
||||||
investigate optimization issues. This way we can make the game faster.
|
investigate optimization issues. This way we can make the game faster.
|
||||||
|
|
||||||
#### Using Minetest's profiler
|
#### Using Minetest's profiler
|
||||||
Minetest has a built in profiler. Simply set `profiler.load = true` in
|
We frequently will use profiling to optimise our code. We recommend use of
|
||||||
|
the JIT profiler (RIP Jude) to fully understand performance impact:
|
||||||
|
|
||||||
|
https://content.minetest.net/packages/jwmhjwmh/jitprofiler/
|
||||||
|
|
||||||
|
Minetest also has a built in profiler. Simply set `profiler.load = true` in
|
||||||
your configuration file and restart the server. After running the server
|
your configuration file and restart the server. After running the server
|
||||||
for some time, just run `/profiler save` in chat - then you will find a
|
for some time, just run `/profiler save` in chat - then you will find a
|
||||||
file in the world directory containing the results. Open a new issue and
|
file in the world directory containing the results. Open a new issue and
|
||||||
|
@ -213,10 +220,14 @@ they have made their donation Incognito).
|
||||||
* Fork the repository (in case you have not already)
|
* Fork the repository (in case you have not already)
|
||||||
* Do your change in a new branch
|
* Do your change in a new branch
|
||||||
* Create a pull request to get your changes merged into master
|
* Create a pull request to get your changes merged into master
|
||||||
* Keep your pull request up to date by regularly merging upstream. It is
|
* It is important that conflicts are resolved prior to merging the pull
|
||||||
imperative that conflicts are resolved prior to merging the pull
|
|
||||||
request.
|
request.
|
||||||
* After the pull request got merged, you can delete the branch
|
* We update our branches via rebasing. Please avoid merging master into
|
||||||
|
your branch unless it's the only way you can resolve a conflict. We can
|
||||||
|
rebase branches from the GUI if the user has not merged master into the
|
||||||
|
branch.
|
||||||
|
* After the pull request got merged, you can delete the branch if the
|
||||||
|
merger hasn't done this already.
|
||||||
|
|
||||||
### Discuss first
|
### Discuss first
|
||||||
If you feel like a problem needs to fixed or you want to make a new
|
If you feel like a problem needs to fixed or you want to make a new
|
||||||
|
@ -262,9 +273,7 @@ excessive git bureaucracy commits in master)
|
||||||
* Submodules should only be used if a) upstream is highly reliable and
|
* Submodules should only be used if a) upstream is highly reliable and
|
||||||
b) it is 100% certain that no mcl2 specific changes to the code will be
|
b) it is 100% certain that no mcl2 specific changes to the code will be
|
||||||
needed (this has never been the case before, hence mcl2 is submodule free so far)
|
needed (this has never been the case before, hence mcl2 is submodule free so far)
|
||||||
* Commit messages should be descriptive and never contain mcl2 specific
|
* Commit messages should be descriptive
|
||||||
issueids - there are other projects who might use commits from mcl2 and
|
|
||||||
it will confuse their issue trackers.
|
|
||||||
* Try to group your submissions best as you can:
|
* Try to group your submissions best as you can:
|
||||||
* Try to keep your PRs small: In some cases things reasonably be can't
|
* Try to keep your PRs small: In some cases things reasonably be can't
|
||||||
split up but in general multiple small PRs are better than a big one.
|
split up but in general multiple small PRs are better than a big one.
|
||||||
|
@ -348,18 +357,24 @@ end
|
||||||
|
|
||||||
### Developer status
|
### Developer status
|
||||||
Active and trusted contributors are often granted write access to the
|
Active and trusted contributors are often granted write access to the
|
||||||
MineClone2 repository.
|
MineClone2 repository as a contributor. Those that have demonstrated the right
|
||||||
|
technical skills and behaviours may be granted developer access. These are the
|
||||||
|
most trusted contributors who will contribute to ensure coding standards and
|
||||||
|
processes are followed.
|
||||||
|
|
||||||
#### Developer responsibilities
|
#### Developer responsibilities
|
||||||
- If you have developer privileges you can just open a new branch in the
|
- If you have developer/contributor privileges you can just open a new branch
|
||||||
mcl2 repository (which is preferred). From that you create a pull request.
|
in the mcl2 repository (which is preferred). From that you create a pull request.
|
||||||
This way other people can review your changes and make sure they work
|
This way other people can review your changes and make sure they work
|
||||||
before they get merged.
|
before they get merged.
|
||||||
- If you do not (yet) have developer privs you do your work on a branch
|
- If you do not (yet) have developer privs you do your work on a branch
|
||||||
on your private repository e.g. using the "fork" function on mesehub.
|
on your private repository e.g. using the "fork" function on mesehub.
|
||||||
- Any developer is welcome to review, test and merge PRs. A PR needs
|
- Any developer is welcome to review, test and approve PRs. A maintainer may prefer
|
||||||
at least one approval (by someone else than the author) but the maintainers
|
to merge the PR especially if it is in a similar area to what has been worked on
|
||||||
are usually relatively quick to react to new submissions.
|
and could result in merge conflicts for a larger older branch, or needs
|
||||||
|
art/licencing reviewing. A PR needs at least one approval (by someone else other
|
||||||
|
than the author).
|
||||||
|
- The maintainers are usually relatively quick to react to new submissions.
|
||||||
|
|
||||||
### Maintainer status
|
### Maintainer status
|
||||||
Maintainers carry the main responsibility for the project.
|
Maintainers carry the main responsibility for the project.
|
||||||
|
|
92
CREDITS.md
92
CREDITS.md
|
@ -6,39 +6,42 @@
|
||||||
## Creator of MineClone2
|
## Creator of MineClone2
|
||||||
* Wuzzy
|
* Wuzzy
|
||||||
|
|
||||||
|
|
||||||
## Maintainers
|
## Maintainers
|
||||||
* AncientMariner
|
* AncientMariner
|
||||||
* Nicu
|
* Nicu
|
||||||
|
|
||||||
## Previous Maintainers
|
## Previous Maintainers
|
||||||
* Fleckenstein
|
* Fleckenstein
|
||||||
* jordan4ibanez
|
|
||||||
* cora
|
* cora
|
||||||
|
|
||||||
## Developers
|
## Developers
|
||||||
* bzoss
|
|
||||||
* AFCMS
|
* AFCMS
|
||||||
* epCode
|
* epCode
|
||||||
* ryvnf
|
|
||||||
* iliekprogrammar
|
|
||||||
* MysticTempest
|
|
||||||
* Rootyjr
|
|
||||||
* aligator
|
|
||||||
* Code-Sploit
|
|
||||||
* NO11
|
|
||||||
* kabou
|
|
||||||
* rudzik8
|
|
||||||
* chmodsayshello
|
* chmodsayshello
|
||||||
* PrairieWind
|
* PrairieWind
|
||||||
* RandomLegoBrick
|
|
||||||
* SumianVoice
|
|
||||||
* MrRar
|
* MrRar
|
||||||
* talamh
|
|
||||||
* Faerraven / Michieal
|
|
||||||
* FossFanatic
|
* FossFanatic
|
||||||
|
* SmokeyDope
|
||||||
|
|
||||||
|
## Past Developers
|
||||||
|
* jordan4ibanez
|
||||||
|
* iliekprogrammar
|
||||||
|
* kabou
|
||||||
|
* kay27
|
||||||
|
* Faerraven / Michieal
|
||||||
|
* MysticTempest
|
||||||
|
* NO11
|
||||||
|
* SumianVoice
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
|
* RandomLegoBrick
|
||||||
|
* rudzik8
|
||||||
|
* Code-Sploit
|
||||||
|
* aligator
|
||||||
|
* Rootyjr
|
||||||
|
* ryvnf
|
||||||
|
* bzoss
|
||||||
|
* talamh
|
||||||
* Laurent Rocher
|
* Laurent Rocher
|
||||||
* HimbeerserverDE
|
* HimbeerserverDE
|
||||||
* TechDudie
|
* TechDudie
|
||||||
|
@ -67,6 +70,10 @@
|
||||||
* Marcin Serwin
|
* Marcin Serwin
|
||||||
* erlehmann
|
* erlehmann
|
||||||
* E
|
* E
|
||||||
|
* n_to
|
||||||
|
* debiankaios
|
||||||
|
* Gustavo6046 / wallabra
|
||||||
|
* CableGuy67
|
||||||
* Benjamin Schötz
|
* Benjamin Schötz
|
||||||
* Doloment
|
* Doloment
|
||||||
* Sydney Gems
|
* Sydney Gems
|
||||||
|
@ -81,15 +88,12 @@
|
||||||
* aldum
|
* aldum
|
||||||
* Dieter44
|
* Dieter44
|
||||||
* Pepebotella
|
* Pepebotella
|
||||||
* MrRar
|
|
||||||
* Lazerbeak12345
|
* Lazerbeak12345
|
||||||
* mrminer
|
* mrminer
|
||||||
* Thunder1035
|
* Thunder1035
|
||||||
* opfromthestart
|
* opfromthestart
|
||||||
* snowyu
|
* snowyu
|
||||||
* FaceDeer
|
* FaceDeer
|
||||||
* Faerraven / Michieal
|
|
||||||
* FossFanatic
|
|
||||||
* Herbert West
|
* Herbert West
|
||||||
* GuyLiner
|
* GuyLiner
|
||||||
* 3raven
|
* 3raven
|
||||||
|
@ -101,27 +105,20 @@
|
||||||
* b3nderman
|
* b3nderman
|
||||||
* CyberMango
|
* CyberMango
|
||||||
* gldrk
|
* gldrk
|
||||||
* SmokeyDope
|
|
||||||
* atomdmac
|
* atomdmac
|
||||||
|
* emptyshore
|
||||||
|
* FlamingRCCars
|
||||||
|
* uqers
|
||||||
|
* Niterux
|
||||||
|
* appgurueu
|
||||||
|
* seventeenthShulker
|
||||||
|
|
||||||
## MineClone5
|
## Music
|
||||||
* kay27
|
* Jordach for the jukebox music compilation from Big Freaking Dig
|
||||||
* Debiankaios
|
* Dark Reaven Music (https://soundcloud.com/dark-reaven-music) for the main menu theme (Calmed Cube) and Traitor (horizonchris96), which is licensed under https://creativecommons.org/licenses/by-sa/3.0/
|
||||||
* epCode
|
* Jester for helping to finely tune MineClone2 (https://www.youtube.com/@Jester-8-bit). Songs: Hailing Forest, Gift, 0dd BL0ck, Flock of One (License CC BY-SA 4.0)
|
||||||
* NO11
|
* Exhale & Tim Unwin for some wonderful MineClone2 tracks (https://www.youtube.com/channel/UClFo_JDWoG4NGrPQY0JPD_g). Songs: Valley of Ghosts, Lonely Blossom, Farmer (License CC BY-SA 4.0)
|
||||||
* j45
|
* Diminixed for 3 fantastic tracks and remastering and leveling volumes. Songs: Afternoon Lullaby (pianowtune02), Spooled (ambientwip02), Never Grow Up (License CC BY-SA 4.0)
|
||||||
* chmodsayshello
|
|
||||||
* 3raven
|
|
||||||
* PrairieWind
|
|
||||||
* Gustavo6046 / wallabra
|
|
||||||
* CableGuy67
|
|
||||||
* MrRar
|
|
||||||
|
|
||||||
## Mineclonia
|
|
||||||
* erlehmann
|
|
||||||
* Li0n
|
|
||||||
* E
|
|
||||||
* n_to
|
|
||||||
|
|
||||||
## Original Mod Authors
|
## Original Mod Authors
|
||||||
* Wuzzy
|
* Wuzzy
|
||||||
|
@ -153,14 +150,18 @@
|
||||||
* 4Evergreen4
|
* 4Evergreen4
|
||||||
* jordan4ibanez
|
* jordan4ibanez
|
||||||
* paramat
|
* paramat
|
||||||
|
* debian044 / debian44
|
||||||
|
* chmodsayshello
|
||||||
* cora
|
* cora
|
||||||
* Faerraven / Michieal
|
* Faerraven / Michieal
|
||||||
|
* PrairieWind
|
||||||
|
|
||||||
## 3D Models
|
## 3D Models
|
||||||
* 22i
|
* 22i
|
||||||
* tobyplowy
|
* tobyplowy
|
||||||
* epCode
|
* epCode
|
||||||
* Faerraven / Michieal
|
* Faerraven / Michieal
|
||||||
|
* SumianVoice
|
||||||
|
|
||||||
## Textures
|
## Textures
|
||||||
* XSSheep
|
* XSSheep
|
||||||
|
@ -176,6 +177,10 @@
|
||||||
* cora
|
* cora
|
||||||
* Faerraven / Michieal
|
* Faerraven / Michieal
|
||||||
* Nicu
|
* Nicu
|
||||||
|
* Exhale
|
||||||
|
* Aeonix_Aeon
|
||||||
|
* Wbjitscool
|
||||||
|
* SmokeyDope
|
||||||
|
|
||||||
## Translations
|
## Translations
|
||||||
* Wuzzy
|
* Wuzzy
|
||||||
|
@ -191,6 +196,10 @@
|
||||||
* 3raven
|
* 3raven
|
||||||
* SakuraRiu
|
* SakuraRiu
|
||||||
* anarquimico
|
* anarquimico
|
||||||
|
* syl
|
||||||
|
* Temak
|
||||||
|
* megustanlosfrijoles
|
||||||
|
* kbundg
|
||||||
|
|
||||||
## Funders
|
## Funders
|
||||||
* 40W
|
* 40W
|
||||||
|
@ -198,11 +207,6 @@
|
||||||
* Cora
|
* Cora
|
||||||
|
|
||||||
## Special thanks
|
## Special thanks
|
||||||
* celeron55 for creating Minetest
|
* The Minetest team for making and supporting an engine, and distribution infrastructure that makes this all possible
|
||||||
* Jordach for the jukebox music compilation from Big Freaking Dig
|
|
||||||
* wsor for working tirelessly in the shadows for the good of all of us, particularly helping with solving contentDB and copyright issues.
|
|
||||||
* The workaholics who spent way too much time writing for the Minecraft Wiki. It's an invaluable resource for creating this game
|
* The workaholics who spent way too much time writing for the Minecraft Wiki. It's an invaluable resource for creating this game
|
||||||
* Notch and Jeb for being the major forces behind Minecraft
|
* Notch and Jeb for being the major forces behind Minecraft
|
||||||
* Dark Reaven Music (https://soundcloud.com/dark-reaven-music) for the main menu theme (Calmed Cube), which is licensed under https://creativecommons.org/licenses/by-sa/3.0/
|
|
||||||
* Jester for helping to finely tune MineClone2 (https://www.youtube.com/@Jester-8-bit). Songs: Hailing Forest, Gift, 0dd BL0ck, Flock of One (License CC BY-SA 4.0)
|
|
||||||
* Exhale & Tim Unwin for some new wonderful MineClone2 tracks (https://www.youtube.com/channel/UClFo_JDWoG4NGrPQY0JPD_g). Songs: Valley of Ghosts, Lonely Blossom (License CC BY-SA 4.0)
|
|
10
LEGAL.md
10
LEGAL.md
|
@ -5,7 +5,7 @@ Copying is an act of love. Please copy and share! <3
|
||||||
Here's the detailed legalese for those who need it:
|
Here's the detailed legalese for those who need it:
|
||||||
|
|
||||||
## License of source code
|
## License of source code
|
||||||
MineClone 2 (by kay27, EliasFleckenstein, Wuzzy, davedevils and countless others)
|
MineClone 2 (by Lizzy Fleckenstein, Wuzzy, davedevils and countless others)
|
||||||
is an imitation of Minecraft.
|
is an imitation of Minecraft.
|
||||||
|
|
||||||
MineClone 2 is free software: you can redistribute it and/or modify
|
MineClone 2 is free software: you can redistribute it and/or modify
|
||||||
|
@ -38,11 +38,15 @@ No non-free licenses are used anywhere.
|
||||||
The textures, unless otherwise noted, are based on the Pixel Perfection resource pack for Minecraft 1.11,
|
The textures, unless otherwise noted, are based on the Pixel Perfection resource pack for Minecraft 1.11,
|
||||||
authored by XSSheep. Most textures are verbatim copies, while some textures have been changed or redone
|
authored by XSSheep. Most textures are verbatim copies, while some textures have been changed or redone
|
||||||
from scratch.
|
from scratch.
|
||||||
The glazed terracotta textures have been created by (MysticTempest)[https://github.com/MysticTempest].
|
The glazed terracotta textures have been created by [MysticTempest](https://github.com/MysticTempest).
|
||||||
Source: <https://www.planetminecraft.com/texture_pack/131pixel-perfection/>
|
Source: <https://www.planetminecraft.com/texture_pack/131pixel-perfection/>
|
||||||
License: [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)
|
License: [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)
|
||||||
|
|
||||||
The main menu images are release under: [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
|
Armor trim models were created by Aeonix_Aeon
|
||||||
|
Source: <https://www.curseforge.com/minecraft/texture-packs/ozocraft-remix>
|
||||||
|
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
|
||||||
|
|
||||||
|
The main menu images are released under: [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
|
||||||
|
|
||||||
All other files, unless mentioned otherwise, fall under:
|
All other files, unless mentioned otherwise, fall under:
|
||||||
Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
Models are an important part of all entities & unique nodes in Mineclone2. They provide a 3 dimensional map of an object for which textures are then applied to. This document is for modders, it quickly highlights some important information for the software needed to open models in Mineclone2.
|
Models are an important part of all entities & unique nodes in Mineclone2. They provide a 3 dimensional map of an object for which textures are then applied to. This document is for modders, it quickly highlights some important information for the software needed to open models in Mineclone2.
|
||||||
|
|
||||||
## Minetest Wiki
|
## Minetest Wiki
|
||||||
|
|
||||||
For more detailed information on actually using blender to create and modify models for Minetest/Mineclone2, please visit the Minetest wiki's page on using Blender [Here](https://wiki.minetest.net/Using_Blender)
|
For more detailed information on actually using blender to create and modify models for Minetest/Mineclone2, please visit the Minetest wiki's page on using Blender [Here](https://wiki.minetest.net/Using_Blender)
|
||||||
|
|
||||||
## Recommended software
|
## Recommended software
|
||||||
|
@ -22,11 +23,13 @@ The most up to date version of this Blender plugin can be downloaded [Here](http
|
||||||
## Types of model formats
|
## Types of model formats
|
||||||
|
|
||||||
### Animated, skinned models
|
### Animated, skinned models
|
||||||
|
|
||||||
* Blitz 3D files (.b3d)
|
* Blitz 3D files (.b3d)
|
||||||
|
|
||||||
* Microsoft DirectX (.x) (binary & text, compression is not supported)
|
* Microsoft DirectX (.x) (binary & text, compression is not supported)
|
||||||
|
|
||||||
### Static meshes
|
### Static meshes
|
||||||
|
|
||||||
* Wavefront OBJ (.obj)
|
* Wavefront OBJ (.obj)
|
||||||
|
|
||||||
Note: The sometimes accompanying .mtl files are not supported and can safely be deleted.
|
Note: The sometimes accompanying .mtl files are not supported and can safely be deleted.
|
||||||
|
@ -48,6 +51,7 @@ Note: Any formats not mentioned above but known to work in the past were removed
|
||||||
## Pros & Cons of .b3d vs .x
|
## Pros & Cons of .b3d vs .x
|
||||||
|
|
||||||
### B3D
|
### B3D
|
||||||
|
|
||||||
* [+] Binary format means a small size
|
* [+] Binary format means a small size
|
||||||
|
|
||||||
* [-] Difficult to postprocess after exporting
|
* [-] Difficult to postprocess after exporting
|
||||||
|
@ -55,6 +59,7 @@ Note: Any formats not mentioned above but known to work in the past were removed
|
||||||
* [-] Difficult to debug problems
|
* [-] Difficult to debug problems
|
||||||
|
|
||||||
### X (text version)
|
### X (text version)
|
||||||
|
|
||||||
* [+] Can be parsed easily with lua scripts
|
* [+] Can be parsed easily with lua scripts
|
||||||
|
|
||||||
* [+] Can be easily generated by scripts
|
* [+] Can be easily generated by scripts
|
||||||
|
|
44
README.md
44
README.md
|
@ -27,7 +27,7 @@ Or you can play in “creative mode” in which you can build almost anything in
|
||||||
## How to play (quick start)
|
## How to play (quick start)
|
||||||
### Getting started
|
### Getting started
|
||||||
* **Punch a tree** trunk until it breaks and collect wood
|
* **Punch a tree** trunk until it breaks and collect wood
|
||||||
* Place the **wood into the 2×2 grid** (your “crafting grid” in your inventory menu and craft 4 wood planks
|
* Place the **wood into the 2×2 grid** (your “crafting grid” in your inventory menu) and craft 4 wood planks
|
||||||
* Place the 4 wood planks in a 2×2 shape in the crafting grid to **make a crafting table**
|
* Place the 4 wood planks in a 2×2 shape in the crafting grid to **make a crafting table**
|
||||||
* **Rightclick the crafting table** for a 3×3 crafting grid to craft more complex things
|
* **Rightclick the crafting table** for a 3×3 crafting grid to craft more complex things
|
||||||
* Use the **crafting guide** (book icon) to learn all the possible crafting recipes
|
* Use the **crafting guide** (book icon) to learn all the possible crafting recipes
|
||||||
|
@ -37,15 +37,15 @@ Or you can play in “creative mode” in which you can build almost anything in
|
||||||
|
|
||||||
### Farming
|
### Farming
|
||||||
* Find seeds
|
* Find seeds
|
||||||
* Craft hoe
|
* Craft a hoe
|
||||||
* Rightclick dirt or similar block with hoe to create farmland
|
* Rightclick dirt or a similar block with a hoe to create farmland
|
||||||
* Place seeds on farmland and watch them grow
|
* Place seeds on farmland and watch them grow
|
||||||
* Collect plant when fully grown
|
* Collect plants when fully grown
|
||||||
* If near water, farmland becomes wet and speeds up growth
|
* If near water, farmland becomes wet and speeds up growth
|
||||||
|
|
||||||
### Furnace
|
### Furnace
|
||||||
* Craft furnace
|
* Craft a furnace
|
||||||
* Furnace allows you to obtain more items
|
* The furnace allows you to obtain more items
|
||||||
* Upper slot must contain a smeltable item (example: iron ore)
|
* Upper slot must contain a smeltable item (example: iron ore)
|
||||||
* Lower slot must contain a fuel item (example: coal)
|
* Lower slot must contain a fuel item (example: coal)
|
||||||
* See tooltips in crafting guide to learn about fuels and smeltable items
|
* See tooltips in crafting guide to learn about fuels and smeltable items
|
||||||
|
@ -78,35 +78,33 @@ The MineClone2 repository is hosted at Mesehub. To contribute or report issues,
|
||||||
|
|
||||||
* Mesehub: <https://git.minetest.land/MineClone2/MineClone2>
|
* Mesehub: <https://git.minetest.land/MineClone2/MineClone2>
|
||||||
* Discord: <https://discord.gg/xE4z8EEpDC>
|
* Discord: <https://discord.gg/xE4z8EEpDC>
|
||||||
* YouTube <https://www.youtube.com/channel/UClI_YcsXMF3KNeJtoBfnk9A>
|
* YouTube: <https://www.youtube.com/channel/UClI_YcsXMF3KNeJtoBfnk9A>
|
||||||
* IRC: <https://web.libera.chat/#mineclone2>
|
|
||||||
* Matrix: <https://app.element.io/#/room/#mc2:matrix.org>
|
|
||||||
* Reddit: <https://www.reddit.com/r/MineClone2/>
|
|
||||||
* Minetest forums: <https://forum.minetest.net/viewtopic.php?f=50&t=16407>
|
|
||||||
* ContentDB: <https://content.minetest.net/packages/wuzzy/mineclone2/>
|
* ContentDB: <https://content.minetest.net/packages/wuzzy/mineclone2/>
|
||||||
* OpenCollective: <https://opencollective.com/mineclone2>
|
* OpenCollective: <https://opencollective.com/mineclone2>
|
||||||
|
* Mastodon: <https://fosstodon.org/@MineClone2>
|
||||||
|
* Lemmy: <https://lemmy.world/c/mineclone2>
|
||||||
|
* Matrix space: <https://app.element.io/#/room/#mcl2:matrix.org>
|
||||||
|
* Minetest forums: <https://forum.minetest.net/viewtopic.php?f=50&t=16407>
|
||||||
|
* Reddit: <https://www.reddit.com/r/MineClone2/>
|
||||||
|
* IRC (barely used): <https://web.libera.chat/#mineclone2>
|
||||||
|
|
||||||
## Target
|
## Target
|
||||||
- Crucially, create a stable, moddable, free/libre clone of Minecraft
|
- Create a stable, moddable, free/libre game based on Minecraft
|
||||||
based on the Minetest engine with polished features, usable in both
|
on the Minetest engine with polished features, usable in both
|
||||||
singleplayer and multiplayer. Currently, a lot of **Minecraft Java
|
singleplayer and multiplayer. Currently, a lot of **Minecraft Java
|
||||||
Edition** features are already implemented and polishing existing
|
Edition** features are already implemented and polishing existing
|
||||||
features are prioritized over new feature requests.
|
features are prioritized over new feature requests.
|
||||||
- With lessened priority yet strictly, implement features targetting
|
- Implement features targetting
|
||||||
**Current Minecraft versions + OptiFine** (OptiFine only as far as supported
|
**Current Minecraft versions + OptiFine** (OptiFine only as far as supported
|
||||||
by the Minetest Engine). This means features in parity with the listed
|
by the Minetest Engine).
|
||||||
Minecraft experiences are prioritized over those that don't fulfill this
|
- Create a performant experience that will run relatively
|
||||||
scope.
|
well on really low spec computers.
|
||||||
- Optionally, create a performant experience that will run relatively
|
|
||||||
well on really low spec computers. Unfortunately, due to Minecraft's
|
|
||||||
mechanisms and Minetest engine's limitations along with a very small
|
|
||||||
playerbase on low spec computers, optimizations are hard to investigate.
|
|
||||||
|
|
||||||
## Completion status
|
## Completion status
|
||||||
This game is currently in **beta** stage.
|
This game is currently in **beta** stage.
|
||||||
It is playable, but not yet feature-complete.
|
It is playable, but not yet feature-complete.
|
||||||
Backwards-compability is not entirely guaranteed, updating your world might cause small bugs.
|
Backwards-compability is not entirely guaranteed, updating your world might cause small bugs.
|
||||||
If you want to use the development version of MineClone2 in production, the master branch is usually relatively stable. The testing branch often features some experimental PRs and should be considered less stable.
|
If you want to use the development version of MineClone2 in production, the master branch is usually relatively stable.
|
||||||
|
|
||||||
The following main features are available:
|
The following main features are available:
|
||||||
|
|
||||||
|
@ -164,7 +162,7 @@ Bonus features (not found in Minecraft):
|
||||||
* Built-in crafting guide which shows you crafting and smelting recipes
|
* Built-in crafting guide which shows you crafting and smelting recipes
|
||||||
* In-game help system containing extensive help about gameplay basics, blocks, items and more
|
* In-game help system containing extensive help about gameplay basics, blocks, items and more
|
||||||
* Temporary crafting recipes. They only exist to make some otherwise unaccessible items available when you're not in creative mode. These recipes will be removed as development goes on an more features become available
|
* Temporary crafting recipes. They only exist to make some otherwise unaccessible items available when you're not in creative mode. These recipes will be removed as development goes on an more features become available
|
||||||
* Saplings in chests in mapgen v6
|
* Saplings in chests in [mapgen v6](https://wiki.minetest.net/Map_generator#v6)
|
||||||
* Fully moddable (thanks to Minetest's powerful Lua API)
|
* Fully moddable (thanks to Minetest's powerful Lua API)
|
||||||
* New blocks and items:
|
* New blocks and items:
|
||||||
* Lookup tool, shows you the help for whatever it touches
|
* Lookup tool, shows you the help for whatever it touches
|
||||||
|
|
|
@ -1,48 +1,45 @@
|
||||||
# MineClone2
|
# MineClone2
|
||||||
Un jeu non-officiel similaire à Minecraft pour Minetest. Forké depuis Mineclone par davedevils. Développé par de nombreuses personnes. Ni développé ou supporté par Mojang AB.
|
Un jeu non-officiel similaire à Minecraft pour Minetest. Forké depuis Mineclone par davedevils. Développé par de nombreuses personnes. Pas développé ni supporté par Mojang AB.
|
||||||
|
|
||||||
Version: 0.79 (en dévelopment)
|
|
||||||
|
|
||||||
### Gameplay
|
### Gameplay
|
||||||
|
|
||||||
Vous atterissez dans un monde fait entièrement de cubes et généré aléatoirement. Vous pouvez explorer le monde, miner et construire presque n'importe quel bloc pour créer de nouvelles structures. Vous pouvez choisir de jouer en "mode survie" dans lequel vous devez combattre des monstres et la faim et progresser lentement dans différents aspects du jeu, comme l'extraction de minerai, l'agriculture, la construction de machines et ainsi de suite. Ou alors vous pouvez jouer en "mode créatif" où vous pouvez construire à peu près n'importe quoi instantanément.
|
Vous atterissez dans un monde fait entièrement de cubes et généré aléatoirement. Vous pouvez explorer le monde, miner et construire presque n'importe quel bloc pour créer de nouvelles structures. Vous pouvez choisir de jouer en "mode survie" dans lequel vous devez combattre des monstres et la faim et progresser lentement dans différents aspects du jeu, comme l'extraction de minerai, l'agriculture, la construction de machines et ainsi de suite. Ou alors vous pouvez jouer en "mode créatif" où vous pouvez construire à peu près n'importe quoi instantanément.
|
||||||
|
|
||||||
### Résumé du Gameplay
|
### Résumé du Gameplay
|
||||||
|
|
||||||
* Jeu de type bac-à-sable, sans objetifs
|
* Jeu de type bac-à-sable, sans objetifs
|
||||||
* Survie : combattre des monstres hostiles et la faim
|
* Survie : combattez des monstres hostiles et la faim
|
||||||
* Creuser pour du minerai et d'autres trésors
|
* Creusez pour du minerai et d'autres trésors
|
||||||
* Magie : gagner de l'expérience et enchanter les outils
|
* Magie : gagnez de l'expérience et enchantez les outils
|
||||||
* Utiliser les blocs ramassés pour construire de magnifiques bâtiments, votre imagination est la limite
|
* Utilisez les blocs ramassés pour construire de magnifiques bâtiments, votre imagination est la seule limite
|
||||||
* Ramasser des fleurs (et d'autres sources de teinture) et colorez votre monde
|
* Ramassez des fleurs (et d'autres sources de teinture) et colorez votre monde
|
||||||
* Trouvez des graines et commencez à cultiver
|
* Trouvez des graines et commencez à cultiver
|
||||||
* Trouvez ou fabriquez des centaines d'objets
|
* Trouvez ou fabriquez des centaines d'objets
|
||||||
* Construisez un réseau ferroviaire complexe et amusez vous avec les wagonnets
|
* Construisez un réseau ferroviaire complexe et amusez-vous avec les wagonnets
|
||||||
* En mode créatif vous pouvez construire presque n'importe quoi gratuitement et sans limite
|
* En mode créatif vous pouvez construire presque n'importe quoi gratuitement et sans limite
|
||||||
|
|
||||||
## Comment jouer (démarrer rapidement)
|
## Comment jouer (démarrer rapidement)
|
||||||
### Commencer
|
### Commencer
|
||||||
* **Frappez un arbre** jusqu'à ce qu'il casse et donne du bois
|
* **Frappez un arbre** jusqu'à ce qu'il casse et donne du bois
|
||||||
* Placez le **bois dans la grille 2x2** (la "grille de fabrication" de votre menu d'inventaire) et fabriquez 4 planches de bois
|
* Placez le **bois dans la grille 2x2** (la "grille de fabrication" de votre menu d'inventaire) et fabriquez 4 planches de bois
|
||||||
* Placer les 4 planches de bois dans la grille 2x2 et **fabriquez une table d'artisanat**
|
* Placer les 4 planches de bois dans la grille 2x2 et **fabriquez un établi**
|
||||||
* **Cliquez droit la table d'artisanat** (icone livre) pour apprendre toutes les recettes possibles
|
* **Faites un clic droit sur l'établi** (icone livre) pour apprendre toutes les recettes possibles
|
||||||
* **Fabriquez une pioche de bois** pour miner la pierre
|
* **Fabriquez une pioche de bois** pour miner la pierre
|
||||||
* Différents outils minent différentes sortes de blocs. Essayez les !
|
* Différents outils minent différentes sortes de blocs. Essayez-les !
|
||||||
* Continuez à jouer comme vous voulez. Amusez vous !
|
* Continuez à jouer comme vous voulez. Amusez-vous !
|
||||||
|
|
||||||
### Agriculture
|
### Agriculture
|
||||||
* Trouvez des graines
|
* Trouvez des graines
|
||||||
* Fabriquez une houe
|
* Fabriquez une houe
|
||||||
* Cliquez droit la terre ou des blocs similaires avec la houe pour créer des terres agricoles
|
* Faites un clic droit sur la terre ou des blocs similaires avec la houe pour créer des terres agricoles
|
||||||
* Placer des graines sur des terres agricoles et regardez les pousser
|
* Placer des graines sur des terres agricoles et regardez les pousser
|
||||||
* Récoltez les plantes une fois matûres
|
* Récoltez les plantes une fois matûres
|
||||||
* Les terres agricoles proche de l'eau deviennent humides et accélèrent la croissance
|
* Les terres agricoles proche de l'eau deviennent humides et accélèrent la croissance
|
||||||
|
|
||||||
### Four
|
### Four
|
||||||
* Fabriquer un Four
|
* Fabriquez un four
|
||||||
* Le four permet d'obtenir plus d'objets
|
* Le four permet d'obtenir plus d'objets
|
||||||
* L'emplacement du haut doit contienir un objet fondable (par ex : minerai de fer)
|
* L'emplacement du haut doit contenir un objet fondable (par ex : minerai de fer)
|
||||||
* L'emplacement du bas doit contienir un objet combustible (par ex : charbon)
|
* L'emplacement du bas doit contenir un objet combustible (par ex : charbon)
|
||||||
* Voir le guide d'artisanat pour en apprendre plus sur les objets fondables et combustibles
|
* Voir le guide d'artisanat pour en apprendre plus sur les objets fondables et combustibles
|
||||||
|
|
||||||
### Aide supplémentaire
|
### Aide supplémentaire
|
||||||
|
@ -62,43 +59,43 @@ Il n'y a pas de support de MineClone2 dans les versions développement de Minete
|
||||||
Pour installer MineClone2 (si ce n'est pas déjà fait), déplacez ce dossier dans le dossier “games” de Minetest. Consultez l'aide de Minetest pour en apprendre plus.
|
Pour installer MineClone2 (si ce n'est pas déjà fait), déplacez ce dossier dans le dossier “games” de Minetest. Consultez l'aide de Minetest pour en apprendre plus.
|
||||||
|
|
||||||
## Liens utiles
|
## Liens utiles
|
||||||
Le dépôt de MineClone2 est hébergé sur Mesehub. Pour contribuer ou rapporter des problèmes, aller là-bas.
|
Le dépôt de MineClone2 est hébergé sur Mesehub. Pour contribuer ou signaler des problèmes, allez là-bas.
|
||||||
|
|
||||||
* Mesehub : <https://git.minetest.land/MineClone2/MineClone2>
|
* Mesehub : <https://git.minetest.land/MineClone2/MineClone2>
|
||||||
* Discord : <https://discord.gg/xE4z8EEpDC>
|
* Discord : <https://discord.gg/xE4z8EEpDC>
|
||||||
* YouTube <https://www.youtube.com/channel/UClI_YcsXMF3KNeJtoBfnk9A>
|
* YouTube : <https://www.youtube.com/channel/UClI_YcsXMF3KNeJtoBfnk9A>
|
||||||
* IRC : <https://web.libera.chat/#mineclone2>
|
* IRC : <https://web.libera.chat/#mineclone2>
|
||||||
* Matrix : <https://app.element.io/#/room/#mc2:matrix.org>
|
* Matrix : <https://app.element.io/#/room/#mc2:matrix.org>
|
||||||
* Reddit : <https://www.reddit.com/r/MineClone2/>
|
* Reddit : <https://www.reddit.com/r/MineClone2/>
|
||||||
* Minetest forums: <https://forum.minetest.net/viewtopic.php?f=50&t=16407>
|
* Forums Minetest : <https://forum.minetest.net/viewtopic.php?f=50&t=16407>
|
||||||
* ContentDB : <https://content.minetest.net/packages/wuzzy/mineclone2/>
|
* ContentDB : <https://content.minetest.net/packages/wuzzy/mineclone2/>
|
||||||
* OpenCollective : <https://opencollective.com/mineclone2>
|
* OpenCollective : <https://opencollective.com/mineclone2>
|
||||||
|
|
||||||
## Objectif
|
## Objectif
|
||||||
* Créer un clone stable, moddable, libre et gratuit basé sur le moteur de jeu Minetest avec des fonctionalités abouties, utilisable à la fois en mode solo et multijoueur. Actuellement, beaucoup des fonctionalités de **Minecraft Java Edition** sont déjà implémentées et leur amélioration est prioritaire sur les nouvelles demandes.
|
* Essentiellement, créer un clone de Minecraft stable, moddable, libre et gratuit basé sur le moteur de jeu Minetest avec des fonctionnalités abouties, utilisable à la fois en mode solo et multijoueur. Actuellement, beaucoup des fonctionnalités de **Minecraft Java Edition** sont déjà implémentées et leur amélioration est prioritaire sur les nouvelles demandes.
|
||||||
* Avec une priorité moindre, implémenter les fonctionalités des versions **Minecraft + OptiFine** (OtiFine autant que supporté par le moteur Minetest). Cela signifie que les fonctionalités présentes dans les versions listées sont priorisées.
|
* Avec une priorité moindre, implémenter les fonctionnalités des versions **Minecraft + OptiFine** (OptiFine autant que supporté par le moteur Minetest). Cela signifie que les fonctionnalités présentes dans les versions listées sont priorisées.
|
||||||
* Dans l'idéal, créer une expérience performante qui tourne bien sur des ordinateurs à basse performance. Malheureusement, en raison des mécanismes de Minecraft et des limitations du moteur Minetest ainsi que de la petite taille de la communauté de joueurs sur des ordinateurs à basse performances, les optimisations sont difficiles à explorer.
|
* Dans l'idéal, créer une expérience performante qui tourne bien sur des ordinateurs à basse performance. Malheureusement, en raison des mécanismes de Minecraft et des limitations du moteur Minetest ainsi que de la petite taille de la communauté de joueurs sur des ordinateurs à basses performances, les optimisations sont difficiles à explorer.
|
||||||
|
|
||||||
## Statut de complétion
|
## Statut de complétion
|
||||||
Ce jeu est actuellement au stade **beta**.
|
Ce jeu est actuellement au stade **beta**.
|
||||||
Il est jouable mais incomplet en fonctionalités.
|
Il est jouable mais incomplet en fonctionnalités.
|
||||||
La rétro-compatibilité n'est pas entièrement garantie, mettre votre monde à jour peut causer de petits bugs.
|
La rétro-compatibilité n'est pas entièrement garantie, mettre votre monde à jour peut causer de petits bugs.
|
||||||
Si vous voulez utiliser la version de développement de MineClone2 en production, la branche master est habituellement relativement stable. Les branches de test fusionnent souvent des pull requests expérimentales et doivent être considérées comme moins stable.
|
Si vous voulez utiliser la version de développement de MineClone2 en production, la branche master est habituellement relativement stable. Les branches de test fusionnent souvent des pull requests expérimentales et doivent être considérées comme moins stable.
|
||||||
|
|
||||||
Les principales fonctionalités suivantes sont disponibles :
|
Les principales fonctionnalités suivantes sont disponibles :
|
||||||
|
|
||||||
* Outils, armes
|
* Outils, armes
|
||||||
* Armure
|
* Armure
|
||||||
* Système de fabrication : grille 2x2, table d'artisanat (grille 3x3), four, incluant un guide de fabrication
|
* Système de fabrication : grille 2x2, établi (grille 3x3), four, incluant un guide de fabrication
|
||||||
* Coffres, grands coffres, coffre ender, boite de shulker
|
* Coffres, grands coffres, coffre ender, boites de Shulker
|
||||||
* Fours, entonnoirs
|
* Fours, entonnoirs
|
||||||
* Faim
|
* Faim
|
||||||
* La plupart des monstres et animaux
|
* La plupart des monstres et animaux
|
||||||
* Tout les minerais de Minecraft
|
* Tous les minerais de Minecraft
|
||||||
* La plupart des blocs de l'overworld
|
* La plupart des blocs de l'overworld
|
||||||
* Eau et lave
|
* Eau et lave
|
||||||
* Météo
|
* Météo
|
||||||
* 28 biomes + 5 biomes du nether
|
* 28 biomes + 5 biomes du Nether
|
||||||
* Le Nether, monde souterrain brûlant dans une autre dimension
|
* Le Nether, monde souterrain brûlant dans une autre dimension
|
||||||
* Circuits Redstone (partiel)
|
* Circuits Redstone (partiel)
|
||||||
* Effets de Statut (partiel)
|
* Effets de Statut (partiel)
|
||||||
|
@ -107,10 +104,10 @@ Les principales fonctionalités suivantes sont disponibles :
|
||||||
* Brassage, potions, flèches trempées (partiel)
|
* Brassage, potions, flèches trempées (partiel)
|
||||||
* Bâteaux
|
* Bâteaux
|
||||||
* Feu
|
* Feu
|
||||||
* Blocs de construction : escaliers, dalles, portes, trappes, barrière, portillon, muret
|
* Blocs de construction : escaliers, dalles, portes, trappes, barrières, portillons, murets
|
||||||
* Horloge
|
* Horloge
|
||||||
* Boussole
|
* Boussole
|
||||||
* Eponge
|
* Éponge
|
||||||
* Bloc de slime
|
* Bloc de slime
|
||||||
* Petites plantes et pousses
|
* Petites plantes et pousses
|
||||||
* Teintures
|
* Teintures
|
||||||
|
@ -118,26 +115,30 @@ Les principales fonctionalités suivantes sont disponibles :
|
||||||
* Blocs de décoration : verre, verre teinté, vitres, barres de fer, terre cuites (et couleurs), têtes et plus
|
* Blocs de décoration : verre, verre teinté, vitres, barres de fer, terre cuites (et couleurs), têtes et plus
|
||||||
* Cadres d'objets
|
* Cadres d'objets
|
||||||
* Juke-boxes
|
* Juke-boxes
|
||||||
|
* Lits
|
||||||
|
* Menu d'inventaire
|
||||||
|
* Inventaire créatif
|
||||||
|
* Agriculture
|
||||||
* Livres pour écrire
|
* Livres pour écrire
|
||||||
* Commandes
|
* Commandes
|
||||||
* Villages
|
* Villages
|
||||||
* L'End
|
* L'End
|
||||||
* et plus !
|
* et plus !
|
||||||
|
|
||||||
Les fonctionalités suivantes sont incomplètes :
|
Les fonctionnalités suivantes sont incomplètes :
|
||||||
|
|
||||||
* certains monstres et animaux
|
* Certains monstres et animaux
|
||||||
* certains composants de Redstone
|
* Certains composants de Redstone
|
||||||
* Wagonnets spéciaux
|
* Wagonnets spéciaux
|
||||||
* quelques blocs et objets non-triviaux
|
* Quelques blocs et objets non-triviaux
|
||||||
|
|
||||||
Fonctionalités bonus (absentes de Minecraft) :
|
Fonctionnalités bonus (absentes de Minecraft) :
|
||||||
|
|
||||||
* Guide d'artisanat intégré au jeu qui montre les recettes d'artisanat et de cuisson
|
* Guide d'artisanat intégré au jeu qui montre les recettes d'artisanat et de cuisson
|
||||||
* Système d'aide intégré au jeu contenant des informations à propos des techniques de base, blocs, objets et plus
|
* Système d'aide intégré au jeu contenant des informations à propos des techniques de base, blocs, objets et plus
|
||||||
* Recettes d'artisanat temporaires. Elles existent uniquement pour rendre des objets accessibles qui ne le seraient pas autrement sauf en mode créatif. Elles seront retirées au cours de l'avancement du développement et de l'ajout de nouvelles fonctionalités.
|
* Recettes d'artisanat temporaires. Elles existent uniquement pour rendre des objets accessibles qui ne le seraient pas autrement sauf en mode créatif. Elles seront retirées au cours de l'avancement du développement et de l'ajout de nouvelles fonctionnalités.
|
||||||
* Pousses dans les coffres en mapgen v6
|
* Pousses dans les coffres en [mapgen v6](https://wiki.minetest.net/Map_generator#v6)
|
||||||
* Entièrement moddable (grâce la puissante API lua de Minetest)
|
* Entièrement moddable (grâce la puissante API Lua de Minetest)
|
||||||
* Nouveaux blocs et objets :
|
* Nouveaux blocs et objets :
|
||||||
* Outil de recherche, montre l'aide de ce qu'il touche
|
* Outil de recherche, montre l'aide de ce qu'il touche
|
||||||
* Plus de dalles et d'escaliers
|
* Plus de dalles et d'escaliers
|
||||||
|
@ -149,22 +150,24 @@ Fonctionalités bonus (absentes de Minecraft) :
|
||||||
* Avant-poste du Nether (Forteresse)
|
* Avant-poste du Nether (Forteresse)
|
||||||
|
|
||||||
Différences techniques avec Minecraft :
|
Différences techniques avec Minecraft :
|
||||||
|
|
||||||
* Limite en hauteur de 31000 blocs (bien plus grand que Minecraft)
|
* Limite en hauteur de 31000 blocs (bien plus grand que Minecraft)
|
||||||
* Taille horizontale du monde 62000×62000 blocs (bien plus petit que Minecraft mais toujours très grand)
|
* Taille horizontale du monde 62000×62000 blocs (bien plus petit que Minecraft mais toujours très grand)
|
||||||
* Toujours assez incomplet et buggé
|
* Toujours assez incomplet et buggé
|
||||||
* Des blocs, objets, ennemis et fonctionalités manquent
|
* Des blocs, objets, ennemis et fonctionnalités manquent
|
||||||
* Quelques objets ont des noms légèrement différents pour être plus faciles à distinguer
|
* Quelques objets ont des noms légèrement différents pour être plus faciles à distinguer
|
||||||
* Des musiques différentes pour le juke-boxe
|
* Des musiques différentes pour le juke-boxe
|
||||||
* Des textures différentes (Pixel Perfection)
|
* Des textures différentes (Pixel Perfection)
|
||||||
* Des sons différents (sources diverses)
|
* Des sons différents (sources diverses)
|
||||||
* Un moteur de jeu différent (Minetest)
|
* Un moteur de jeu différent (Minetest)
|
||||||
* Des bonus cachés différents
|
* Des bonus cachés différents
|
||||||
|
|
||||||
...et enfin MineClone2 est un logiciel libre !
|
...et enfin MineClone2 est un logiciel libre !
|
||||||
|
|
||||||
## Autres fichiers readme
|
## Autres fichiers readme
|
||||||
|
|
||||||
* `LICENSE.txt`: Le texte de la license GPLv3
|
* `LICENSE.txt` : Le texte de la licence GPLv3
|
||||||
* `CONTRIBUTING.md` : Information pour ceux qui veulent contribuer
|
* `CONTRIBUTING.md` : Information pour ceux qui veulent contribuer
|
||||||
* `API.md` : Pour les modders Minetest qui veulent modder ce jeu
|
* `API.md` : Pour les modders Minetest qui veulent modder ce jeu
|
||||||
* `LEGAL.md` : Information légale
|
* `LEGAL.md` : Information légale
|
||||||
* `CREDITS.md`: Liste des contributeurs
|
* `CREDITS.md` : Liste de toutes les personnes qui ont contribué
|
||||||
|
|
|
@ -0,0 +1,193 @@
|
||||||
|
# MineClone2
|
||||||
|
Неофициальная игра в стиле Minecraft для Minetest. Форк MineClone от davedevils.
|
||||||
|
Разработана многими людьми. Не разработана и не одобрена Mojang AB.
|
||||||
|
|
||||||
|
### Игровой процесс
|
||||||
|
Вы начинаете в случайно сгенерированном мире созданном целиком из кубов. Вы можете
|
||||||
|
исследовать мир, выкопать и поставить почти каждый блок в мире, чтобы создавать новые
|
||||||
|
структуры. Вы можете играть в “режиме выживания” в котором вам придется бороться с
|
||||||
|
монстрами и голодом за выживание и медленно проходить через различные аспекты игры,
|
||||||
|
такие как копание, фермерство, постройка механизмов и так далее. Или вы можете играть
|
||||||
|
в “творческом режиме” в котором вы сразу можете строить что угодно.
|
||||||
|
|
||||||
|
#### Итоги геймплея
|
||||||
|
|
||||||
|
* Геймплей в стиле песочницы, без целей
|
||||||
|
* Выживайте: сражайтесь с враждебными монстрами и голодом
|
||||||
|
* Добывайте руды и прочие ценные предметы
|
||||||
|
* Магия: получайте опыт и зачаруйте ваше снаряжение
|
||||||
|
* Создавайте из собранных блоков величественные постройки ограниченные только воображением
|
||||||
|
* Собирайте цветы и другие красители, чтобы раскрасить ваш мир
|
||||||
|
* Найдите семена и заведите ферму
|
||||||
|
* Найдите или создайте один из сотен предметов
|
||||||
|
* Проложите рельсы и повеселитесь с вагонетками
|
||||||
|
* Постройте сложные механизмы со схемами из редстоуна
|
||||||
|
* В творческом режиме вы можете свободно строить всё без лимитов
|
||||||
|
|
||||||
|
## Как играть (быстрый старт)
|
||||||
|
### Начнем
|
||||||
|
|
||||||
|
* **Бейте по стволу дерева** пока оно не сломается и соберите древесину
|
||||||
|
* Поставьте **древесину в сетку 2×2** (“сетка крафта” в вашем инвентаре) и скрафтите 4 доски
|
||||||
|
* Разложите 4 доски в форме 2×2 в сетке крафта, чтобы **сделать верстак**
|
||||||
|
* **Правым кликом по верстаку**, чтобы открыть сетку крафта 3×3 для более сложных предметов
|
||||||
|
* Используйте **книгу рецептов** (иконка книги), чтобы узнать все возможные рецепты крафтов
|
||||||
|
* **Скрафтите деревянную кирку**, чтобы вы могли копать камень
|
||||||
|
* Разные инструменты добывают разные виды блоков. Опробуйте их все!
|
||||||
|
* Продолжайте играть как пожелаете. Повеселитесь!
|
||||||
|
|
||||||
|
### Фермерство
|
||||||
|
* Найдите семена
|
||||||
|
* Скрафтите мотыгу
|
||||||
|
* Правой кнопкой мотыгой по земле или похожему блоку, чтобы создать грядку
|
||||||
|
* Посадите семена на грядку и ждите пока они вырастут
|
||||||
|
* Соберите растение когда оно полностью созреет
|
||||||
|
* Рядом с водой грядка становится влажной и растения растут быстрее
|
||||||
|
|
||||||
|
### Переплавка
|
||||||
|
* Скрафтите печь
|
||||||
|
* Печь позволит вам получить больше предметов
|
||||||
|
* Верхний слот должен содержать переплавляемый предмет (например: железную руду)
|
||||||
|
* Нижний слот должен содержать топливо (например: уголь)
|
||||||
|
* Смотрите книгу рецептов, чтобы узнать о других переплавляемых предметах и топливе
|
||||||
|
|
||||||
|
### Дополнительная помощь
|
||||||
|
Больше информации о геймплее, блоках, предметах и многое другое можно найти во
|
||||||
|
внутриигровой справке. Вы можете перейти в неё через ваш инвентарь.
|
||||||
|
|
||||||
|
### Особые предметы
|
||||||
|
Следующие предметы интересны для творческого режима и для строителей приключенческих
|
||||||
|
карт. Их нельзя получить в игре или через творческий инвентарь.
|
||||||
|
|
||||||
|
* Барьер: `mcl_core:barrier`
|
||||||
|
|
||||||
|
Используйте чат-команду `/giveme`, чтобы получить их.
|
||||||
|
Смотрите справку для дальнейшей информации.
|
||||||
|
|
||||||
|
## Установка
|
||||||
|
Эта игра требует [Minetest](http://minetest.net) для запуска (версия 5.4.1 или
|
||||||
|
выше). Вам нужно сперва установить Minetest. Только стабильные версии поддерживаются
|
||||||
|
официально. Не поддерживается запуск MineClone2 на разрабатываемых версиях Minetest.
|
||||||
|
|
||||||
|
Чтобы установить MineClone2 (если вы этого еще не сделали), переместите эту папку в
|
||||||
|
“games” в папке данных Minetest. Смотрите справку Minetest, чтобы узнать больше.
|
||||||
|
|
||||||
|
## Полезные ссылки
|
||||||
|
Репозиторий MineClone2 хранится на Mesehub. Зайдите туда, чтобы оставить запрос или
|
||||||
|
поучаствовать в разработке.
|
||||||
|
|
||||||
|
* Mesehub: <https://git.minetest.land/MineClone2/MineClone2>
|
||||||
|
* Discord: <https://discord.gg/xE4z8EEpDC>
|
||||||
|
* YouTube: <https://www.youtube.com/channel/UClI_YcsXMF3KNeJtoBfnk9A>
|
||||||
|
* ContentDB: <https://content.minetest.net/packages/wuzzy/mineclone2/>
|
||||||
|
* OpenCollective: <https://opencollective.com/mineclone2>
|
||||||
|
* Mastodon: <https://fosstodon.org/@MineClone2>
|
||||||
|
* Lemmy: <https://lemmy.world/c/mineclone2>
|
||||||
|
* Matrix space: <https://app.element.io/#/room/#mcl2:matrix.org>
|
||||||
|
* Форум Minetest: <https://forum.minetest.net/viewtopic.php?f=50&t=16407>
|
||||||
|
* Reddit: <https://www.reddit.com/r/MineClone2/>
|
||||||
|
* IRC (едва используется): <https://web.libera.chat/#mineclone2>
|
||||||
|
|
||||||
|
## Цели
|
||||||
|
- Создать стабильную, модифицируемую, бесплатную и свободную игру основанную на
|
||||||
|
Minecraft на движке Minetest с проработанными возможностями для одиночной игры и
|
||||||
|
для мультиплеера. На данный момент множество возможностей **Minecraft Java
|
||||||
|
Edition** уже реализовано и доработка имеющегося контента в приоритете над
|
||||||
|
добавлением нового.
|
||||||
|
- Реализовать возможности на уровне **текущей версии Minecraft + OptiFine** (OptiFine
|
||||||
|
настолько, насколько это поддерживается движком Minetest).
|
||||||
|
- Добиться производительности для запуска на действительно слабых компьютерах.
|
||||||
|
|
||||||
|
## Готовность
|
||||||
|
Игра сейчас на стадии **бета**. Она играбельна, но еще не имеет всех возможностей.
|
||||||
|
Обратная совместимость целиком не гарантируется, обновление вашего мира может повлечь
|
||||||
|
за собой небольшие ошибки. Если вы хотите использовать разрабатываемую версию
|
||||||
|
Mineclone2, то ветка master обычно относительно стабильна.
|
||||||
|
|
||||||
|
Следущие возможности уже доступны:
|
||||||
|
|
||||||
|
* Инструменты, оружие, броня
|
||||||
|
* Система крафта: сетка 2×2, верстак (сетка 3×3) и книга рецептов
|
||||||
|
* Сундуки, большие сундуки, эндер-сундуки, ящики шалкера
|
||||||
|
* Печи и воронки
|
||||||
|
* Система голода
|
||||||
|
* Большинство монстров и животных
|
||||||
|
* Все руды из Minecraft
|
||||||
|
* Большинство блоков из Верхнего мира
|
||||||
|
* Вода и лава
|
||||||
|
* Погода
|
||||||
|
* 28 биомов + 5 биомов в Незере
|
||||||
|
* Незер, пылающий подземный мир в другом измерении
|
||||||
|
* Схемы из редстоуна (частично)
|
||||||
|
* Вагонетки (частично)
|
||||||
|
* Статусные эффекты (частично)
|
||||||
|
* Опыт
|
||||||
|
* Зачарование
|
||||||
|
* Зельеварение, зелья, смоченные стрелы (частично)
|
||||||
|
* Лодки
|
||||||
|
* Огонь
|
||||||
|
* Строительные блоки: ступени, плиты, двери, люки, заборы, калитки, стены
|
||||||
|
* Часы
|
||||||
|
* Компас
|
||||||
|
* Губки
|
||||||
|
* Блоки слизи
|
||||||
|
* Растения и саженцы
|
||||||
|
* Красители
|
||||||
|
* Флаги
|
||||||
|
* Декоративные блоки: стекло, окрашенное стекло, стеклянные панели, железные решетки, цветная керамика, головы и многое другое
|
||||||
|
* Рамки для предметов
|
||||||
|
* Прогрыватели
|
||||||
|
* Кровати
|
||||||
|
* Меню инвентаря
|
||||||
|
* Творческий инвентарь
|
||||||
|
* Фермерство
|
||||||
|
* Книги с пером
|
||||||
|
* Команды
|
||||||
|
* Деревни
|
||||||
|
* Измерение Края
|
||||||
|
* И многое другое!
|
||||||
|
|
||||||
|
Следующие возможности еще не завершены:
|
||||||
|
|
||||||
|
* Некоторые монстры и животные
|
||||||
|
* Предметы связанные с редстоуном
|
||||||
|
* Некоторые вагонетки (с сундуком и с воронкой уже работают)
|
||||||
|
* Пара нетривиальных блоков и предметов
|
||||||
|
|
||||||
|
Бонусные возможности (нет в Minecraft-е):
|
||||||
|
|
||||||
|
* Встроенный гайд для крафта покажет вам рецепты крафта и переплавки
|
||||||
|
* Внутриигровая справка содержит всестороннюю информацию об основах игры, блоках, предметах и прочее
|
||||||
|
* Временные рецепты крафта. Они существуют, чтобы получить доступ к ранее недоступным предметам вне творческого режима. Они будут удалены как только разработка позволит им стать доступными
|
||||||
|
* Саженцы в сундуках в [mapgen v6](https://wiki.minetest.net/Map_generator#v6)
|
||||||
|
* Полностью модифицируема (благодаря мощному Lua API в Minetest)
|
||||||
|
* Новые блоки и предметы:
|
||||||
|
* Инструмент просмотра покажет справку о том чего коснется
|
||||||
|
* Больше ступеней и плит
|
||||||
|
* Калитки и заборы из адских кирпичей
|
||||||
|
* Замены структур - малые верии структур из Minecraft пока большие структуры не будут сделаны:
|
||||||
|
* Лесная хижина (Особняк)
|
||||||
|
* Форт Незера (Крепости)
|
||||||
|
|
||||||
|
Технические отличия от Minecraft:
|
||||||
|
|
||||||
|
* Лимит высоты - 31000 блоков (намного больше чем в Minecraft)
|
||||||
|
* Горизонтальный размер мира - 62000×62000 блоков (намного меньше чем в Minecraft, но всё еще очень большой)
|
||||||
|
* Всё еще не завершен и содержит много багов
|
||||||
|
* Недостающие блоки, предметы, мобы
|
||||||
|
* Некоторые предметы с другими названиями, чтобы лучше их различать
|
||||||
|
* Другая музыка для проигрывателей
|
||||||
|
* Другие текстуры (Pixel Perfection)
|
||||||
|
* Другие звуки (разные источники)
|
||||||
|
* Другой движок (Minetest)
|
||||||
|
* Другие пасхалки
|
||||||
|
|
||||||
|
… и наконец, MineClone2 это свободное программное обеспечение!
|
||||||
|
|
||||||
|
## Другие readme файлы
|
||||||
|
|
||||||
|
* `LICENSE.txt`: текст лицензии GPLv3
|
||||||
|
* `CONTRIBUTING.md`: информация для тех кто хочет поучаствовать в разработке
|
||||||
|
* `API.md`: для моддеров Minetest кто хочет изменить эту игру
|
||||||
|
* `LEGAL.md`: юридическая информация
|
||||||
|
* `CREDITS.md`: список участников проекта
|
30
RELEASE.md
30
RELEASE.md
|
@ -5,6 +5,7 @@
|
||||||
# Update CREDITS.md
|
# Update CREDITS.md
|
||||||
# Update version in game.conf
|
# Update version in game.conf
|
||||||
|
|
||||||
|
```
|
||||||
lua tools/generate_ingame_credits.lua
|
lua tools/generate_ingame_credits.lua
|
||||||
|
|
||||||
git add CREDITS.md
|
git add CREDITS.md
|
||||||
|
@ -13,15 +14,16 @@ git add game.conf
|
||||||
|
|
||||||
#git add RELEASE.md
|
#git add RELEASE.md
|
||||||
|
|
||||||
git commit -m "Pre-release update credits and set version 0.82.0"
|
git commit -m "Pre-release update credits and set version 0.83.0"
|
||||||
|
|
||||||
git tag 0.82.0
|
git tag 0.83.0
|
||||||
|
|
||||||
git push origin 0.82.0
|
git push origin 0.83.0
|
||||||
|
```
|
||||||
|
|
||||||
#Update version in game.conf to -SNAPSHOT
|
# Update version in game.conf to the next version with -SNAPSHOT suffix
|
||||||
|
|
||||||
git commit -m "Post-release set version 0.82.0-SNAPSHOT"
|
`git commit -m "Post-release set version 0.84.0-SNAPSHOT"`
|
||||||
|
|
||||||
### Hotfix Release
|
### Hotfix Release
|
||||||
|
|
||||||
|
@ -32,15 +34,17 @@ To mitigate this, you just release the last release, and the relevant bug fix. F
|
||||||
|
|
||||||
* Create release branch from the last release tag, push it:
|
* Create release branch from the last release tag, push it:
|
||||||
|
|
||||||
|
```
|
||||||
git checkout -b release/0.82.1 0.82.0
|
git checkout -b release/0.82.1 0.82.0
|
||||||
|
|
||||||
git push origin release/0.82.1
|
git push origin release/0.82.1
|
||||||
|
```
|
||||||
|
|
||||||
##### Prepare feature branch and fix
|
##### Prepare feature branch and fix
|
||||||
|
|
||||||
* Create feature branch from that release branch (can review it to check only fix is there, nothing else, and use to also merge into master separately)
|
* Create feature branch from that release branch (can review it to check only fix is there, nothing else, and use to also merge into master separately)
|
||||||
|
|
||||||
git checkout -b hotfix_bug_1_branch
|
`git checkout -b hotfix_bug_1_branch`
|
||||||
|
|
||||||
* Fix crash/serious bug and commit
|
* Fix crash/serious bug and commit
|
||||||
* Push branch and create pr to the release and also the master branch (Do not rebase, to reduce merge conflict risk. Do not delete after first merge or it needs to be repushed)
|
* Push branch and create pr to the release and also the master branch (Do not rebase, to reduce merge conflict risk. Do not delete after first merge or it needs to be repushed)
|
||||||
|
@ -53,11 +57,13 @@ git checkout -b hotfix_bug_1_branch
|
||||||
|
|
||||||
* Tag it, push tag and branch:
|
* Tag it, push tag and branch:
|
||||||
|
|
||||||
|
```
|
||||||
git tag 0.82.1
|
git tag 0.82.1
|
||||||
|
|
||||||
git push origin 0.82.1
|
git push origin 0.82.1
|
||||||
|
|
||||||
git push origin release/0.82.1
|
git push origin release/0.82.1
|
||||||
|
```
|
||||||
|
|
||||||
Note: If you have to do more than 1 hotfix release, can do it on the same release branch.
|
Note: If you have to do more than 1 hotfix release, can do it on the same release branch.
|
||||||
|
|
||||||
|
@ -71,5 +77,13 @@ Note: If you have to do more than 1 hotfix release, can do it on the same releas
|
||||||
|
|
||||||
##### Inform people
|
##### Inform people
|
||||||
|
|
||||||
* Add a comment to the forum post with the release number and what is involved, and maintainer will update main post.
|
* Upload video to YouTube
|
||||||
* Add a comment in Discord announcement
|
* Add a comment to the forum post with the release number and change log. Maintainer will update main post with code link.
|
||||||
|
* Add a Discord announcement post and @everyone with link to video, forum post and release notes.
|
||||||
|
* Share the news on reddit + Lemmy. Good subs to share with:
|
||||||
|
* r/linux_gaming
|
||||||
|
* r/opensourcegames
|
||||||
|
* r/opensource
|
||||||
|
* r/freesoftware
|
||||||
|
* r/linuxmasterrace
|
||||||
|
* r/MineClone2
|
||||||
|
|
|
@ -0,0 +1,57 @@
|
||||||
|
# Making Textures In Mineclone2
|
||||||
|
|
||||||
|
Textures are a crucial asset for all items, nodes, and models in mineclone2. This document is for artist who would like to make and modify textures for mineclone2. While no means comprehensive, this document contains the basic important information for beginners to get started with texture curation and optimization.
|
||||||
|
|
||||||
|
## Minetest Wiki
|
||||||
|
For more detailed information on creating and modifing texture packs for Minetest/Mineclone2, please visit the Minetest wiki's page on creating a texture pack. Click [here](https://wiki.minetest.net/Creating_texture_packs) to view the wiki page on creating texture packs.
|
||||||
|
|
||||||
|
## GIMP Tutorials Pixel Art Guide
|
||||||
|
GIMP Tutorials has an excellent guide to making pixel art in GIMP. If you would like further clarification as well as screenshots for what we are about to cover, it is an excellent resource to turn to. Click [here](https://thegimptutorials.com/how-to-make-pixel-art/) to view the guide
|
||||||
|
|
||||||
|
## Recommended Software
|
||||||
|
|
||||||
|
### GIMP
|
||||||
|
|
||||||
|
GIMP (GNU Image Manipulation Program) is a very popular and free image editing software supported on Windows, MacOS, and most Linux distributions. It is recommended to use GIMP to create and modify textures within the minetest engine.
|
||||||
|
|
||||||
|
Download GIMP [here](http://gimp.org/)
|
||||||
|
|
||||||
|
# Getting Started
|
||||||
|
## Creating a new file
|
||||||
|
the first thing to do is open GIMP and create a new file to work in by opening the File menu and choosing "New".
|
||||||
|
|
||||||
|
Choose width of 16 and height of 16 for the image size. While higher resolution textures are possible, The default size is 16x16. It is recommended you use this size as well, as it is universally supported on all systems.
|
||||||
|
|
||||||
|
## Zoom In
|
||||||
|
Next, you'll want to zoom in as the canvas is very small at the default zoom level. To do this either use CTRL + mousewheel, +/-, or navigate to the View menu > zoom > zoom in
|
||||||
|
|
||||||
|
## Configure Grid
|
||||||
|
Now, we'll want to turn on the grid. Open the edit menu and enable the 'show grid' option.
|
||||||
|
|
||||||
|
The default grid size is 10 pixels, we want to change it to a 1 pixel grid. Go to the Image menu and choose 'configure grid.
|
||||||
|
|
||||||
|
In the Spacing section, change both the Horizontal and Vertical pixel settings to 1.00 then click ok and the grid will update.
|
||||||
|
|
||||||
|
## Pencil Tool & Color Picking
|
||||||
|
The most useful brush type for pixel art is the Pencil tool. Its nested under the paintbrush tool in the toolbox, or you can use the keyboard shortcut 'N'.
|
||||||
|
|
||||||
|
Once the pencil tool is selected, navigate to the sliders on the left side of the canvas and change brush size to 1 pixel.
|
||||||
|
|
||||||
|
Now choose a color! You can do this by clicking on the two colored squares under the toolbox. The Color Picker tool is also a good option if you already have a reference image for color palette.
|
||||||
|
|
||||||
|
## How to export optimally
|
||||||
|
|
||||||
|
Once you have finished up a texture and are ready to export it, navigate to the file menu > export as... and make sure the file name extention is .png
|
||||||
|
|
||||||
|
After clicking 'Export', a menu will appear with a bunch of options checked. Make sure to uncheck all of these options!!! This will drastically reduce the file size from multiple kilobytes to a couple of hundred bytes. Finally click 'Export' one more time.
|
||||||
|
|
||||||
|
### Further optimization with OptiPNG
|
||||||
|
For those running a GNU/linux distribution, you most likely have the 'optipng' command available to you. If it does not come with your system by default, the software homepage can be found [here](https://optipng.sourceforge.net/) where you can download and install from source.
|
||||||
|
|
||||||
|
First, Open up the terminal in the directory where your exported texture is located (or navigate to the directory with the 'cd your/directory/path/to/textures'), then run this command
|
||||||
|
```
|
||||||
|
optipng -o7 -zm1-9 -nc -clobber -strip all *.png
|
||||||
|
```
|
||||||
|
This will further optimize all the textures in the directory.
|
||||||
|
|
||||||
|
NOTE: If you would like to further edit a texture that has been optipng'd in GIMP, you must manually set the color palette back to RBG after opening. Navigate to Image menu > Mode > select RGB
|
|
@ -1 +1 @@
|
||||||
A survival sandbox game. Survive, gather, hunt, mine, build, explore, and do much more. Faithful clone of Minecraft 1.12. This is a work in progress! Expect bugs!
|
A survival sandbox game. Survive, gather, hunt, mine, build, explore, and do much more.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
title = MineClone 2
|
title = MineClone 2
|
||||||
description = A survival sandbox game. Survive, gather, hunt, build, explore, and do much more.
|
description = A survival sandbox game. Survive, gather, hunt, build, explore, and do much more.
|
||||||
disallowed_mapgens = v6
|
disallowed_mapgens = v6
|
||||||
version=0.82.0-SNAPSHOT
|
version=0.85.0-SNAPSHOT
|
|
@ -215,6 +215,10 @@ function mcl_autogroup.can_harvest(nodename, toolname, player)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if minetest.get_item_group(nodename, "dig_immediate_piston") >= 1 then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
-- Check if it can be dug by tool
|
-- Check if it can be dug by tool
|
||||||
local tdef = minetest.registered_tools[toolname]
|
local tdef = minetest.registered_tools[toolname]
|
||||||
if tdef and tdef._mcl_diggroups then
|
if tdef and tdef._mcl_diggroups then
|
||||||
|
@ -300,6 +304,10 @@ end
|
||||||
-- loading order.
|
-- loading order.
|
||||||
function mcl_autogroup.get_wear(toolname, diggroup)
|
function mcl_autogroup.get_wear(toolname, diggroup)
|
||||||
local tdef = minetest.registered_tools[toolname]
|
local tdef = minetest.registered_tools[toolname]
|
||||||
|
if not tdef then
|
||||||
|
minetest.log("warning", "Adding wear for tool: " .. tostring(toolname) .. " failed with diggroup: " .. tostring(diggroup))
|
||||||
|
return nil
|
||||||
|
end
|
||||||
local uses = tdef._mcl_diggroups[diggroup].uses
|
local uses = tdef._mcl_diggroups[diggroup].uses
|
||||||
return math.ceil(65535 / uses)
|
return math.ceil(65535 / uses)
|
||||||
end
|
end
|
||||||
|
@ -362,12 +370,6 @@ local function overwrite()
|
||||||
minetest.override_item(tname, {
|
minetest.override_item(tname, {
|
||||||
tool_capabilities = toolcaps
|
tool_capabilities = toolcaps
|
||||||
})
|
})
|
||||||
else
|
|
||||||
-- This is needed to deal damage when punching mobs
|
|
||||||
-- with random items in hand in survival mode
|
|
||||||
minetest.override_item(tname, {
|
|
||||||
tool_capabilities = mcl_meshhand.survival_hand_tool_caps
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -96,8 +96,8 @@ function mcl_damage.finish_reason(mcl_reason)
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_damage.from_mt(mt_reason)
|
function mcl_damage.from_mt(mt_reason)
|
||||||
if mt_reason._mcl_chached_reason then
|
if mt_reason._mcl_cached_reason then
|
||||||
return mt_reason._mcl_chached_reason
|
return mt_reason._mcl_cached_reason
|
||||||
end
|
end
|
||||||
|
|
||||||
local mcl_reason
|
local mcl_reason
|
||||||
|
|
|
@ -13,6 +13,7 @@ under the LGPLv2.1 license.
|
||||||
mcl_explosions = {}
|
mcl_explosions = {}
|
||||||
|
|
||||||
local mod_fire = minetest.get_modpath("mcl_fire")
|
local mod_fire = minetest.get_modpath("mcl_fire")
|
||||||
|
local explosions_griefing = minetest.settings:get_bool("mcl_explosions_griefing", true)
|
||||||
--local CONTENT_FIRE = minetest.get_content_id("mcl_fire:fire")
|
--local CONTENT_FIRE = minetest.get_content_id("mcl_fire:fire")
|
||||||
|
|
||||||
local math = math
|
local math = math
|
||||||
|
@ -191,7 +192,7 @@ local function trace_explode(pos, strength, raydirs, radius, info, direct, sourc
|
||||||
local grief_protected = info.grief_protected
|
local grief_protected = info.grief_protected
|
||||||
|
|
||||||
-- Trace rays for environment destruction
|
-- Trace rays for environment destruction
|
||||||
if info.griefing then
|
if info.griefing and explosions_griefing then
|
||||||
for i = 1, #raydirs do
|
for i = 1, #raydirs do
|
||||||
local rpos_x = pos.x
|
local rpos_x = pos.x
|
||||||
local rpos_y = pos.y
|
local rpos_y = pos.y
|
||||||
|
@ -351,6 +352,23 @@ local function trace_explode(pos, strength, raydirs, radius, info, direct, sourc
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Punch End Crystals to make them explode
|
||||||
|
if ent and ent.name == "mcl_end:crystal" then
|
||||||
|
if direct then
|
||||||
|
local puncher = direct:get_luaentity()
|
||||||
|
if puncher and puncher.name == "mcl_end:crystal" then
|
||||||
|
ent.object:punch(direct, 1.0, { -- End Crystal nearby, trigger it.
|
||||||
|
full_punch_interval = 1.0,
|
||||||
|
damage_groups = {fleshy = 1},
|
||||||
|
}, nil, nil)
|
||||||
|
else
|
||||||
|
ent.object:remove() -- Direct Exists, but it is not an end crystal, remove crystal.
|
||||||
|
end
|
||||||
|
else
|
||||||
|
ent.object:remove() -- Node exploded the end crystal, remove it.
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local airs, fires = {}, {}
|
local airs, fires = {}, {}
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# textdomain:mcl_explosions
|
||||||
|
@1 was caught in an explosion.=@1 est mort dans une explosion
|
|
@ -0,0 +1,2 @@
|
||||||
|
# textdomain:mcl_explosions
|
||||||
|
@1 was caught in an explosion.=@1 попал(а) под взрыв.
|
|
@ -0,0 +1,2 @@
|
||||||
|
# textdomain:mcl_explosions
|
||||||
|
@1 was caught in an explosion.=
|
|
@ -0,0 +1,14 @@
|
||||||
|
# Oxidization API for MineClone 2
|
||||||
|
This mods adds the oxidization api, so that modders can easily use the same features that copper uses.
|
||||||
|
|
||||||
|
## API
|
||||||
|
To take advantage of the actual oxidization, put `oxidizable = 1` into the list of groups for the oxidizable node.
|
||||||
|
You would also need to put `_mcl_oxidized_variant = itemstring of node this node will oxidize into` into the node definition.
|
||||||
|
For example, a copper block oxidizes into exposed copper, so the defintion would be `_mcl_oxidized_variant = "mcl_copper:block_exposed"`.
|
||||||
|
|
||||||
|
To utilize the ability to wax the block for protection from oxidization, put `mcl_waxed_variant = item string of waxed variant of node` into the node definition table.
|
||||||
|
For example, Copper Blocks have the definition arguement of `_mcl_waxed_variant = "mcl_copper:waxed_block"`.
|
||||||
|
|
||||||
|
For waxed nodes, scraping is easy. Start by putting `waxed = 1` into the list of groups of the waxed node.
|
||||||
|
Next put `_mcl_stripped_variant = item string of the unwaxed variant of the node` into the defintion table.
|
||||||
|
Waxed Copper Blocks can be scrapped into normal Copper Blocks because of the definition `_mcl_stripped_variant = "mcl_copper:block"`.
|
|
@ -0,0 +1,12 @@
|
||||||
|
minetest.register_abm({
|
||||||
|
label = "Oxidatize Nodes",
|
||||||
|
nodenames = { "group:oxidizable" },
|
||||||
|
interval = 500,
|
||||||
|
chance = 3,
|
||||||
|
action = function(pos, node)
|
||||||
|
local def = minetest.registered_nodes[node.name]
|
||||||
|
if def and def._mcl_oxidized_variant then
|
||||||
|
minetest.set_node(pos, { name = def._mcl_oxidized_variant, param2 = node.param2 })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
|
@ -0,0 +1,4 @@
|
||||||
|
name = mcl_oxidation
|
||||||
|
title = Oxidation API for MineClone 2
|
||||||
|
author = PrairieWind, N011, Michael
|
||||||
|
description = API to allow oxidizing different nodes.
|
|
@ -34,6 +34,76 @@ function mcl_util.mcl_log(message, module, bypass_default_logger)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local player_timers = {}
|
||||||
|
|
||||||
|
-- This is a dtime timer than can be used in on_step functions so it works every x seconds
|
||||||
|
-- self - Object you want to store timer data on. E.g. mob or a minecart, or player_name
|
||||||
|
-- dtime - The time since last run of on_step, should be passed in to function
|
||||||
|
-- timer_name - This is the name of the timer and also the key to store the data. No spaces + lowercase.
|
||||||
|
-- threshold - The time before it returns successful. 0.2 if you want to run it 5 times a second.
|
||||||
|
function mcl_util.check_dtime_timer(self, dtime, timer_name, threshold)
|
||||||
|
if not self or not threshold or not dtime then return end
|
||||||
|
if not timer_name or timer_name == "" then return end
|
||||||
|
|
||||||
|
if type(self) == "string" then
|
||||||
|
local player_name = self
|
||||||
|
if not player_timers[player_name] then
|
||||||
|
player_timers[player_name] = {}
|
||||||
|
end
|
||||||
|
self = player_timers[player_name]
|
||||||
|
end
|
||||||
|
|
||||||
|
if not self._timers then
|
||||||
|
self._timers = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
if not self._timers[timer_name] then
|
||||||
|
self._timers[timer_name] = 0
|
||||||
|
else
|
||||||
|
self._timers[timer_name] = self._timers[timer_name] + dtime
|
||||||
|
--minetest.log("dtime: " .. tostring(self._timers[timer_name]))
|
||||||
|
end
|
||||||
|
|
||||||
|
if self._timers[timer_name] > threshold then
|
||||||
|
--minetest.log("Over threshold")
|
||||||
|
self._timers[timer_name] = 0
|
||||||
|
return true
|
||||||
|
--else
|
||||||
|
--minetest.log("Not over threshold")
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- While we should always favour the new minetest vector functions such as vector.new or vector.offset which validate on
|
||||||
|
-- creation. There may be cases where state gets corrupted and we may have to check the vector is valid if created the
|
||||||
|
-- old way. This allows us to do this as a tactical solution until old style vectors are completely removed.
|
||||||
|
function mcl_util.validate_vector (vect)
|
||||||
|
if vect then
|
||||||
|
if tonumber(vect.x) and tonumber(vect.y) and tonumber(vect.z) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Minetest 5.3.0 or less can only measure the light level. This came in at 5.4
|
||||||
|
-- This function has been known to fail in multiple places so the error handling is added increase safety and improve
|
||||||
|
-- debugging. See:
|
||||||
|
-- https://git.minetest.land/MineClone2/MineClone2/issues/1392
|
||||||
|
function mcl_util.get_natural_light (pos, time)
|
||||||
|
local status, retVal = pcall(minetest.get_natural_light, pos, time)
|
||||||
|
if status then
|
||||||
|
return retVal
|
||||||
|
else
|
||||||
|
minetest.log("warning", "Failed to get natural light at pos: " .. dump(pos) .. ", time: " .. dump(time))
|
||||||
|
if (pos) then
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
minetest.log("warning", "Node at pos: " .. dump(node.name))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
|
||||||
function mcl_util.file_exists(name)
|
function mcl_util.file_exists(name)
|
||||||
if type(name) ~= "string" then return end
|
if type(name) ~= "string" then return end
|
||||||
local f = io.open(name)
|
local f = io.open(name)
|
||||||
|
@ -545,21 +615,28 @@ function mcl_util.deal_damage(target, damage, mcl_reason)
|
||||||
if luaentity then
|
if luaentity then
|
||||||
if luaentity.deal_damage then
|
if luaentity.deal_damage then
|
||||||
luaentity:deal_damage(damage, mcl_reason or {type = "generic"})
|
luaentity:deal_damage(damage, mcl_reason or {type = "generic"})
|
||||||
else
|
return
|
||||||
local puncher = mcl_reason and mcl_reason.direct or target
|
elseif luaentity.is_mob then
|
||||||
local puncher_pos = puncher:get_pos()
|
-- local puncher = mcl_reason and mcl_reason.direct or target
|
||||||
local target_pos = target:get_pos()
|
-- target:punch(puncher, 1.0, {full_punch_interval = 1.0, damage_groups = {fleshy = damage}}, vector.direction(puncher:get_pos(), target:get_pos()), damage)
|
||||||
if not puncher_pos or not target_pos then return end
|
if luaentity.health > 0 then
|
||||||
target:punch(puncher, 1.0, {full_punch_interval = 1.0, damage_groups = {fleshy = damage}}, vector.direction(puncher_pos, target_pos), damage)
|
luaentity.health = luaentity.health - damage
|
||||||
end
|
end
|
||||||
else -- Player
|
return
|
||||||
|
end
|
||||||
|
elseif not target:is_player() then return end
|
||||||
|
|
||||||
|
local is_immortal = target:get_armor_groups().immortal or 0
|
||||||
|
if is_immortal>0 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local hp = target:get_hp()
|
local hp = target:get_hp()
|
||||||
|
|
||||||
if hp > 0 then
|
if hp > 0 then
|
||||||
target:set_hp(hp - damage, {_mcl_reason = mcl_reason})
|
target:set_hp(hp - damage, {_mcl_reason = mcl_reason})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
function mcl_util.get_hp(obj)
|
function mcl_util.get_hp(obj)
|
||||||
local luaentity = obj:get_luaentity()
|
local luaentity = obj:get_luaentity()
|
||||||
|
|
|
@ -62,8 +62,13 @@ end
|
||||||
local function set_double_attach(boat)
|
local function set_double_attach(boat)
|
||||||
boat._driver:set_attach(boat.object, "",
|
boat._driver:set_attach(boat.object, "",
|
||||||
{x = 0, y = 0.42, z = 0.8}, {x = 0, y = 0, z = 0})
|
{x = 0, y = 0.42, z = 0.8}, {x = 0, y = 0, z = 0})
|
||||||
|
if boat._passenger:is_player() then
|
||||||
boat._passenger:set_attach(boat.object, "",
|
boat._passenger:set_attach(boat.object, "",
|
||||||
{x = 0, y = 0.42, z = -2.2}, {x = 0, y = 0, z = 0})
|
{x = 0, y = 0.42, z = -6.2}, {x = 0, y = 0, z = 0})
|
||||||
|
else
|
||||||
|
boat._passenger:set_attach(boat.object, "",
|
||||||
|
{x = 0, y = 0.42, z = -4.5}, {x = 0, y = 270, z = 0})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
local function set_choat_attach(boat)
|
local function set_choat_attach(boat)
|
||||||
boat._driver:set_attach(boat.object, "",
|
boat._driver:set_attach(boat.object, "",
|
||||||
|
@ -155,7 +160,7 @@ local boat = {
|
||||||
minetest.register_on_respawnplayer(detach_object)
|
minetest.register_on_respawnplayer(detach_object)
|
||||||
|
|
||||||
function boat.on_rightclick(self, clicker)
|
function boat.on_rightclick(self, clicker)
|
||||||
if self._passenger or not clicker or clicker:get_attach() then
|
if self._passenger or not clicker or clicker:get_attach() or (self.name == "mcl_boats:chest_boat" and self._driver) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
attach_object(self, clicker)
|
attach_object(self, clicker)
|
||||||
|
@ -437,9 +442,9 @@ cboat.selectionbox = {-0.7, -0.15, -0.7, 0.7, 0.75, 0.7}
|
||||||
minetest.register_entity("mcl_boats:chest_boat", cboat)
|
minetest.register_entity("mcl_boats:chest_boat", cboat)
|
||||||
mcl_entity_invs.register_inv("mcl_boats:chest_boat","Boat",27)
|
mcl_entity_invs.register_inv("mcl_boats:chest_boat","Boat",27)
|
||||||
|
|
||||||
local boat_ids = { "boat", "boat_spruce", "boat_birch", "boat_jungle", "boat_acacia", "boat_dark_oak", "boat_obsidian", "boat_mangrove", "chest_boat", "chest_boat_spruce", "chest_boat_birch", "chest_boat_jungle", "chest_boat_acacia", "chest_boat_dark_oak", "chest_boat_mangrove" }
|
local boat_ids = { "boat", "boat_spruce", "boat_birch", "boat_jungle", "boat_acacia", "boat_dark_oak", "boat_obsidian", "boat_mangrove", "boat_cherry", "chest_boat", "chest_boat_spruce", "chest_boat_birch", "chest_boat_jungle", "chest_boat_acacia", "chest_boat_dark_oak", "chest_boat_mangrove", "chest_boat_cherry" }
|
||||||
local names = { S("Oak Boat"), S("Spruce Boat"), S("Birch Boat"), S("Jungle Boat"), S("Acacia Boat"), S("Dark Oak Boat"), S("Obsidian Boat"), S("Mangrove Boat"), S("Oak Chest Boat"), S("Spruce Chest Boat"), S("Birch Chest Boat"), S("Jungle Chest Boat"), S("Acacia Chest Boat"), S("Dark Oak Chest Boat"), S("Mangrove Chest Boat") }
|
local names = { S("Oak Boat"), S("Spruce Boat"), S("Birch Boat"), S("Jungle Boat"), S("Acacia Boat"), S("Dark Oak Boat"), S("Obsidian Boat"), S("Mangrove Boat"), S("Cherry Boat"), S("Oak Chest Boat"), S("Spruce Chest Boat"), S("Birch Chest Boat"), S("Jungle Chest Boat"), S("Acacia Chest Boat"), S("Dark Oak Chest Boat"), S("Mangrove Chest Boat"), S("Cherry Chest Boat") }
|
||||||
local craftstuffs = { "mcl_core:wood", "mcl_core:sprucewood", "mcl_core:birchwood", "mcl_core:junglewood", "mcl_core:acaciawood", "mcl_core:darkwood", "mcl_core:obsidian", "mcl_mangrove:mangrove_wood" }
|
local craftstuffs = { "mcl_core:wood", "mcl_core:sprucewood", "mcl_core:birchwood", "mcl_core:junglewood", "mcl_core:acaciawood", "mcl_core:darkwood", "mcl_core:obsidian", "mcl_mangrove:mangrove_wood", "mcl_cherry_blossom:cherrywood" }
|
||||||
|
|
||||||
for b=1, #boat_ids do
|
for b=1, #boat_ids do
|
||||||
local itemstring = "mcl_boats:"..boat_ids[b]
|
local itemstring = "mcl_boats:"..boat_ids[b]
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
# textdomain: mcl_boats
|
||||||
|
Acacia Boat=Akaciebåd
|
||||||
|
Birch Boat=Birkebåd
|
||||||
|
Boat=Båd
|
||||||
|
Boats are used to travel on the surface of water.=Både blier brugt til at rejse på vandoverflader.
|
||||||
|
Dark Oak Boat=Mørk egetræsbåd
|
||||||
|
Jungle Boat=Junglebåd
|
||||||
|
Oak Boat=Egetræsbåd
|
||||||
|
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.=Højre-klik på en vand for at placere båden. Højre-klik på båden for at gå ombord. Brug [Left] og [Right] til at styre. [Forwards] for at øge hastigheden, og [Backwards] for at sænke farten eller sejle bagud. Brug [Sneak] for at forlade båden, slå båden for at lave den om til en genstand.
|
||||||
|
Spruce Boat=Granbåd
|
||||||
|
Water vehicle=Vandfartøj
|
||||||
|
Sneak to dismount=Snig for at stige ud
|
||||||
|
Obsidian Boat=Obsidianbåd
|
|
@ -8,3 +8,6 @@ Jungle Boat=Barca de la selva
|
||||||
Oak Boat=Barca de roble
|
Oak Boat=Barca de roble
|
||||||
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.=Haga clic derecho en una fuente de agua para colocar el barco. Haga clic derecho en el barco para entrar. Utilice [Izquierda] y [Derecha] para dirigir, [Adelante] para acelerar y [Atrás] para reducir la velocidad o retroceder. Haga clic derecho en el barco nuevamente para dejarlo, golpee el barco para que se caiga como un artículo.
|
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.=Haga clic derecho en una fuente de agua para colocar el barco. Haga clic derecho en el barco para entrar. Utilice [Izquierda] y [Derecha] para dirigir, [Adelante] para acelerar y [Atrás] para reducir la velocidad o retroceder. Haga clic derecho en el barco nuevamente para dejarlo, golpee el barco para que se caiga como un artículo.
|
||||||
Spruce Boat=Barca de abeto
|
Spruce Boat=Barca de abeto
|
||||||
|
Water vehicle=Vehículo acuático
|
||||||
|
Sneak to dismount=Agáchate para bajar
|
||||||
|
Obsidian Boat=Barca de obsidiana
|
||||||
|
|
|
@ -1,13 +1,23 @@
|
||||||
# textdomain: mcl_boats
|
# textdomain: mcl_boats
|
||||||
Acacia Boat=Bateau en Acacia
|
Acacia Boat=Bateau en acacia
|
||||||
Birch Boat=Bateau en Bouleau
|
Birch Boat=Bateau en bouleau
|
||||||
Boat=Bateau
|
Boat=Bateau
|
||||||
Boats are used to travel on the surface of water.=Les bateaux sont utilisés pour voyager à la surface de l'eau.
|
Boats are used to travel on the surface of water.=Les bateaux sont utilisés pour voyager à la surface de l'eau.
|
||||||
Dark Oak Boat=Bateau en Chêne Noir
|
Dark Oak Boat=Bateau en chêne noir
|
||||||
Jungle Boat=Bateau en Acajou
|
Jungle Boat=Bateau en acajou
|
||||||
Oak Boat=Bateau en Chêne
|
Oak Boat=Bateau en chêne
|
||||||
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.=Faites un clic droit sur une source d'eau pour placer le bateau. Faites un clic droit sur le bateau pour y entrer. Utilisez [Gauche] et [Droite] pour diriger, [Avant] pour accélérer et [Arrière] pour ralentir ou reculer. Utilisez [Sneak] pour le quitter, frappez le bateau pour le faire tomber en tant qu'objet.
|
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.=Faites un clic droit sur une source d'eau pour placer le bateau. Faites un clic droit sur le bateau pour y entrer. Utilisez [Gauche] et [Droite] pour diriger, [Avant] pour accélérer et [Arrière] pour ralentir ou reculer. Utilisez [Sneak] pour le quitter, frappez le bateau pour le faire tomber en tant qu'objet.
|
||||||
Spruce Boat=Bateau en Sapin
|
Spruce Boat=Bateau en sapin
|
||||||
Water vehicle=Véhicule aquatique
|
Water vehicle=Véhicule aquatique
|
||||||
Sneak to dismount=Se baisser pour descendre
|
Sneak to dismount=Se baisser pour descendre
|
||||||
Obsidian Boat=Bateau en Obsidienne
|
Obsidian Boat=Bateau en obsidienne
|
||||||
|
Mangrove Boat=Bateau en palétuvier
|
||||||
|
Cherry Boat=Bateau en cerisier
|
||||||
|
Oak Chest Boat=Bateau en chêne avec coffre
|
||||||
|
Spruce Chest Boat=Bateau en sapin avec coffre
|
||||||
|
Birch Chest Boat=Bateau en bouleau avec coffre
|
||||||
|
Jungle Chest Boat=Bateau en acajou avec coffre
|
||||||
|
Acacia Chest Boat=Bateau en acacia avec coffre
|
||||||
|
Dark Oak Chest Boat=Bateau en chêne noir avec coffre
|
||||||
|
Mangrove Chest Boat=Bateau en palétuvier avec coffre
|
||||||
|
Cherry Chest Boat=Bateau en cerisier avec coffre
|
||||||
|
|
|
@ -1,11 +1,23 @@
|
||||||
# textdomain: mcl_boats
|
# textdomain: mcl_boats
|
||||||
Acacia Boat=Лодка из акации
|
Acacia Boat=Акациевая лодка
|
||||||
Birch Boat=Берёзовая лодка
|
Birch Boat=Берёзовая лодка
|
||||||
Boat=Лодка
|
Boat=Лодка
|
||||||
Boats are used to travel on the surface of water.=С помощью лодки можно путешествовать по водной поверхности.
|
Boats are used to travel on the surface of water.=На лодке можно плыть по водной поверхности.
|
||||||
Dark Oak Boat=Лодка из тёмного дуба
|
Dark Oak Boat=Лодка из тёмного дуба
|
||||||
Jungle Boat=Лодка из дерева джунглей
|
Jungle Boat=Лодка из тропического дерева
|
||||||
Oak Boat=Дубовая лодка
|
Oak Boat=Дубовая лодка
|
||||||
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.=Правый клик по воде спустит лодку на воду. Правый клик по лодке разместит вас в ней. [Влево] и [Вправо] - рулить, [Вперед] - разгоняться, [Назад] - тормозить или плыть назад. Правый клик по лодке, когда вы в ней, позволит выйти из неё. Удар по лодке превратит её обратно в предмет.
|
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.=Правый клик на воде, чтобы установить лодку. Правый клик по лодке, чтобы сесть в нее. [Влево] и [Вправо] - рулить, [Вперед] - разгоняться, [Назад] - тормозить или плыть назад. Нажмите [Красться] для высадки, бейте по лодке, чтобы забрать её.
|
||||||
Spruce Boat=Еловая лодка
|
Spruce Boat=Еловая лодка
|
||||||
Water vehicle=Водный транспорт
|
Water vehicle=Водный транспорт
|
||||||
|
Sneak to dismount=Нажмите [Красться] для высадки
|
||||||
|
Obsidian Boat=Обсидиановая лодка
|
||||||
|
Mangrove Boat=Мангровая лодка
|
||||||
|
Cherry Boat=Вишнёвая лодка
|
||||||
|
Oak Chest Boat=Дубовая лодка с сундуком
|
||||||
|
Spruce Chest Boat=Еловая лодка с сундуком
|
||||||
|
Birch Chest Boat=Берёзовая лодка с сундуком
|
||||||
|
Jungle Chest Boat=Лодка из тропического дерева с сундуком
|
||||||
|
Acacia Chest Boat=Акациевая лодка с сундуком
|
||||||
|
Dark Oak Chest Boat=Лодка из тёмного дуба с сундуком
|
||||||
|
Mangrove Chest Boat=Мангровая лодка с сундуком
|
||||||
|
Cherry Chest Boat=Вишнёвая лодка с сундуком
|
|
@ -11,3 +11,13 @@ Spruce Boat=
|
||||||
Water vehicle=
|
Water vehicle=
|
||||||
Sneak to dismount=
|
Sneak to dismount=
|
||||||
Obsidian Boat=
|
Obsidian Boat=
|
||||||
|
Mangrove Boat=
|
||||||
|
Cherry Boat=
|
||||||
|
Oak Chest Boat=
|
||||||
|
Spruce Chest Boat=
|
||||||
|
Birch Chest Boat=
|
||||||
|
Jungle Chest Boat=
|
||||||
|
Acacia Chest Boat=
|
||||||
|
Dark Oak Chest Boat=
|
||||||
|
Mangrove Chest Boat=
|
||||||
|
Cherry Chest Boat=
|
|
@ -5,7 +5,12 @@ function mcl_burning.get_storage(obj)
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_burning.is_burning(obj)
|
function mcl_burning.is_burning(obj)
|
||||||
|
local storage = mcl_burning.get_storage(obj)
|
||||||
|
if storage then
|
||||||
return mcl_burning.get_storage(obj).burn_time
|
return mcl_burning.get_storage(obj).burn_time
|
||||||
|
else
|
||||||
|
return false
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_burning.is_affected_by_rain(obj)
|
function mcl_burning.is_affected_by_rain(obj)
|
||||||
|
@ -153,6 +158,11 @@ function mcl_burning.extinguish(obj)
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_burning.tick(obj, dtime, storage)
|
function mcl_burning.tick(obj, dtime, storage)
|
||||||
|
if not storage then
|
||||||
|
minetest.log("warning", "No storage for burning tick. Should not happen: " .. dump(obj))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
if storage.burn_time then
|
if storage.burn_time then
|
||||||
storage.burn_time = storage.burn_time - dtime
|
storage.burn_time = storage.burn_time - dtime
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ mcl_dripping.register_drop({
|
||||||
-- The group the liquid's nodes belong to
|
-- The group the liquid's nodes belong to
|
||||||
liquid = "water",
|
liquid = "water",
|
||||||
-- The texture used (particles will take a random 2x2 area of it)
|
-- The texture used (particles will take a random 2x2 area of it)
|
||||||
texture = "default_water_source_animated.png",
|
texture = "mcl_core_water_source_animation.png",
|
||||||
-- Define particle glow, ranges from `0` to `minetest.LIGHT_MAX`
|
-- Define particle glow, ranges from `0` to `minetest.LIGHT_MAX`
|
||||||
light = 1,
|
light = 1,
|
||||||
-- The nodes (or node group) the particles will spawn under
|
-- The nodes (or node group) the particles will spawn under
|
||||||
|
|
|
@ -82,7 +82,7 @@ end
|
||||||
|
|
||||||
mcl_dripping.register_drop({
|
mcl_dripping.register_drop({
|
||||||
liquid = "water",
|
liquid = "water",
|
||||||
texture = "default_water_source_animated.png",
|
texture = "mcl_core_water_source_animation.png",
|
||||||
light = 1,
|
light = 1,
|
||||||
nodes = { "group:opaque", "group:leaves" },
|
nodes = { "group:opaque", "group:leaves" },
|
||||||
sound = "drippingwater_drip",
|
sound = "drippingwater_drip",
|
||||||
|
@ -92,7 +92,7 @@ mcl_dripping.register_drop({
|
||||||
|
|
||||||
mcl_dripping.register_drop({
|
mcl_dripping.register_drop({
|
||||||
liquid = "lava",
|
liquid = "lava",
|
||||||
texture = "default_lava_source_animated.png",
|
texture = "mcl_core_lava_source_animation.png",
|
||||||
light = math.max(7, minetest.registered_nodes["mcl_core:lava_source"].light_source - 3),
|
light = math.max(7, minetest.registered_nodes["mcl_core:lava_source"].light_source - 3),
|
||||||
nodes = { "group:opaque" },
|
nodes = { "group:opaque" },
|
||||||
sound = "drippingwater_lavadrip",
|
sound = "drippingwater_lavadrip",
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
# textdomain: mcl_falling_nodes
|
||||||
|
@1 was smashed by a falling anvil.=@1 blev smadret af en nedfaldende ambolt.
|
||||||
|
@1 was smashed by a falling block.=@1 blev smadret af en nedfaldende blok.
|
|
@ -0,0 +1,3 @@
|
||||||
|
# textdomain: mcl_falling_nodes
|
||||||
|
@1 was smashed by a falling anvil.=@1 fue aplastado por un yunque.
|
||||||
|
@1 was smashed by a falling block.=@1 fue aplastado por un bloque.
|
|
@ -0,0 +1,3 @@
|
||||||
|
# textdomain: mcl_falling_nodes
|
||||||
|
@1 was smashed by a falling anvil.=@1 a été écrasé par une enclume
|
||||||
|
@1 was smashed by a falling block.=@1 a été écrasé par un bloc
|
|
@ -0,0 +1,3 @@
|
||||||
|
# textdomain: mcl_falling_nodes
|
||||||
|
@1 was smashed by a falling anvil.=@1 был(а) раздавлен(а) падающей наковальней.
|
||||||
|
@1 was smashed by a falling block.=@1 был(а) раздавлен(а) падающим блоком.
|
|
@ -0,0 +1,3 @@
|
||||||
|
# textdomain: mcl_falling_nodes
|
||||||
|
@1 was smashed by a falling anvil.=
|
||||||
|
@1 was smashed by a falling block.=
|
|
@ -7,12 +7,7 @@ local pool = {}
|
||||||
local tick = false
|
local tick = false
|
||||||
|
|
||||||
|
|
||||||
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_item_entities", false)
|
|
||||||
local function mcl_log(message)
|
|
||||||
if LOGGING_ON then
|
|
||||||
mcl_util.mcl_log(message, "[Item Entities]", true)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
pool[player:get_player_name()] = 0
|
pool[player:get_player_name()] = 0
|
||||||
|
@ -408,114 +403,176 @@ local function cxcz(o, cw, one, zero)
|
||||||
return o
|
return o
|
||||||
end
|
end
|
||||||
|
|
||||||
local function hopper_take_item(self, pos)
|
local function nodes_destroy_items (self, moveresult, def, nn)
|
||||||
--mcl_log("self.itemstring: ".. self.itemstring)
|
local lg = minetest.get_item_group(nn, "lava")
|
||||||
--mcl_log("self.itemstring: ".. minetest.pos_to_string(pos))
|
local fg = minetest.get_item_group(nn, "fire")
|
||||||
|
local dg = minetest.get_item_group(nn, "destroys_items")
|
||||||
|
|
||||||
local objs = minetest.get_objects_inside_radius(pos, 2)
|
if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) then
|
||||||
|
local item_string = self.itemstring
|
||||||
|
local item_name = ItemStack(item_string):get_name()
|
||||||
|
|
||||||
if objs and self.itemstring then
|
--Wait 2 seconds to allow mob drops to be cooked, & picked up instead of instantly destroyed.
|
||||||
--mcl_log("there is an itemstring. Number of objs: ".. #objs)
|
if self.age > 2 and minetest.get_item_group(item_name, "fire_immune") == 0 then
|
||||||
|
if dg ~= 2 then
|
||||||
for k, v in pairs(objs) do
|
minetest.sound_play("builtin_item_lava", { pos = self.object:get_pos(), gain = 0.5 })
|
||||||
local ent = v:get_luaentity()
|
end
|
||||||
|
self._removed = true
|
||||||
-- Don't forget actual hoppers
|
self.object:remove()
|
||||||
if ent and ent.name == "mcl_minecarts:hopper_minecart" then
|
return true
|
||||||
local taken_items = false
|
end
|
||||||
|
|
||||||
mcl_log("ent.name: " .. tostring(ent.name))
|
|
||||||
mcl_log("ent pos: " .. tostring(ent.object:get_pos()))
|
|
||||||
|
|
||||||
local inv = mcl_entity_invs.load_inv(ent, 5)
|
|
||||||
|
|
||||||
if not inv then
|
|
||||||
mcl_log("No inv")
|
|
||||||
return false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local current_itemstack = ItemStack(self.itemstring)
|
-- Destroy item when it collides with a cactus
|
||||||
|
if moveresult and moveresult.collides then
|
||||||
mcl_log("inv. size: " .. ent._inv_size)
|
for _, collision in pairs(moveresult.collisions) do
|
||||||
if inv:room_for_item("main", current_itemstack) then
|
local pos = collision.node_pos
|
||||||
mcl_log("Room")
|
if collision.type == "node" and minetest.get_node(pos).name == "mcl_core:cactus" then
|
||||||
inv:add_item("main", current_itemstack)
|
-- TODO We need to play a sound when it gets destroyed
|
||||||
self.object:get_luaentity().itemstring = ""
|
self._removed = true
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
taken_items = true
|
return true
|
||||||
else
|
end
|
||||||
mcl_log("no Room")
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not taken_items then
|
local function push_out_item_stuck_in_solid(self, dtime, p, def, is_in_water)
|
||||||
local items_remaining = current_itemstack:get_count()
|
if not is_in_water and def and def.walkable and def.groups and def.groups.opaque == 1 then
|
||||||
|
local shootdir
|
||||||
|
local cx = (p.x % 1) - 0.5
|
||||||
|
local cz = (p.z % 1) - 0.5
|
||||||
|
local order = {}
|
||||||
|
|
||||||
-- This will take part of a floating item stack if no slot can hold the full amount
|
-- First prepare the order in which the 4 sides are to be checked.
|
||||||
for i = 1, ent._inv_size, 1 do
|
-- 1st: closest
|
||||||
local stack = inv:get_stack("main", i)
|
-- 2nd: other direction
|
||||||
|
-- 3rd and 4th: other axis
|
||||||
mcl_log("i: " .. tostring(i))
|
if math.abs(cx) < math.abs(cz) then
|
||||||
mcl_log("Items remaining: " .. items_remaining)
|
order = cxcz(order, cx, "x", "z")
|
||||||
mcl_log("Name: " .. tostring(stack:get_name()))
|
order = cxcz(order, cz, "z", "x")
|
||||||
|
|
||||||
if current_itemstack:get_name() == stack:get_name() then
|
|
||||||
mcl_log("We have a match. Name: " .. tostring(stack:get_name()))
|
|
||||||
|
|
||||||
local room_for = stack:get_stack_max() - stack:get_count()
|
|
||||||
mcl_log("Room for: " .. tostring(room_for))
|
|
||||||
|
|
||||||
if room_for == 0 then
|
|
||||||
-- Do nothing
|
|
||||||
mcl_log("No room")
|
|
||||||
elseif room_for < items_remaining then
|
|
||||||
mcl_log("We have more items remaining than space")
|
|
||||||
|
|
||||||
items_remaining = items_remaining - room_for
|
|
||||||
stack:set_count(stack:get_stack_max())
|
|
||||||
inv:set_stack("main", i, stack)
|
|
||||||
taken_items = true
|
|
||||||
else
|
else
|
||||||
local new_stack_size = stack:get_count() + items_remaining
|
order = cxcz(order, cz, "z", "x")
|
||||||
stack:set_count(new_stack_size)
|
order = cxcz(order, cx, "x", "z")
|
||||||
mcl_log("We have more than enough space. Now holds: " .. new_stack_size)
|
end
|
||||||
|
|
||||||
inv:set_stack("main", i, stack)
|
-- Check which one of the 4 sides is free
|
||||||
items_remaining = 0
|
for o = 1, #order do
|
||||||
|
local nn = minetest.get_node(vector.add(p, order[o])).name
|
||||||
self.object:get_luaentity().itemstring = ""
|
local def = minetest.registered_nodes[nn]
|
||||||
self.object:remove()
|
if def and def.walkable == false and nn ~= "ignore" then
|
||||||
|
shootdir = order[o]
|
||||||
taken_items = true
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_log("Count: " .. tostring(stack:get_count()))
|
|
||||||
mcl_log("stack max: " .. tostring(stack:get_stack_max()))
|
|
||||||
--mcl_log("Is it empty: " .. stack:to_string())
|
|
||||||
end
|
|
||||||
|
|
||||||
if i == ent._inv_size and taken_items then
|
|
||||||
mcl_log("We are on last item and still have items left. Set final stack size: " .. items_remaining)
|
|
||||||
current_itemstack:set_count(items_remaining)
|
|
||||||
--mcl_log("Itemstack2: " .. current_itemstack:to_string())
|
|
||||||
self.itemstring = current_itemstack:to_string()
|
|
||||||
end
|
end
|
||||||
|
-- If none of the 4 sides is free, shoot upwards
|
||||||
|
if shootdir == nil then
|
||||||
|
shootdir = vector.new(0, 1, 0)
|
||||||
|
local nn = minetest.get_node(vector.add(p, shootdir)).name
|
||||||
|
if nn == "ignore" then
|
||||||
|
-- Do not push into ignore
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--Add in, and delete
|
-- Set new item moving speed accordingly
|
||||||
if taken_items then
|
local newv = vector.multiply(shootdir, 3)
|
||||||
mcl_log("Saving")
|
self.object:set_acceleration(vector.zero())
|
||||||
mcl_entity_invs.save_inv(ent)
|
self.object:set_velocity(newv)
|
||||||
return taken_items
|
disable_physics(self.object, self, false, false)
|
||||||
|
|
||||||
|
|
||||||
|
if shootdir.y == 0 then
|
||||||
|
self._force = newv
|
||||||
|
p.x = math.floor(p.x)
|
||||||
|
p.y = math.floor(p.y)
|
||||||
|
p.z = math.floor(p.z)
|
||||||
|
self._forcestart = p
|
||||||
|
self._forcetimer = 1
|
||||||
|
end
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- This code is run after the entity got a push from above “push away” code.
|
||||||
|
-- It is responsible for making sure the entity is entirely outside the solid node
|
||||||
|
-- (with its full collision box), not just its center.
|
||||||
|
if self._forcetimer > 0 then
|
||||||
|
local cbox = self.object:get_properties().collisionbox
|
||||||
|
local ok = false
|
||||||
|
if self._force.x > 0 and (p.x > (self._forcestart.x + 0.5 + (cbox[4] - cbox[1]) / 2)) then ok = true
|
||||||
|
elseif self._force.x < 0 and (p.x < (self._forcestart.x + 0.5 - (cbox[4] - cbox[1]) / 2)) then ok = true
|
||||||
|
elseif self._force.z > 0 and (p.z > (self._forcestart.z + 0.5 + (cbox[6] - cbox[3]) / 2)) then ok = true
|
||||||
|
elseif self._force.z < 0 and (p.z < (self._forcestart.z + 0.5 - (cbox[6] - cbox[3]) / 2)) then ok = true end
|
||||||
|
-- Item was successfully forced out. No more pushing
|
||||||
|
if ok then
|
||||||
|
self._forcetimer = -1
|
||||||
|
self._force = nil
|
||||||
|
enable_physics(self.object, self)
|
||||||
else
|
else
|
||||||
mcl_log("No need to save")
|
self._forcetimer = self._forcetimer - dtime
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
return true
|
||||||
|
elseif self._force then
|
||||||
|
self._force = nil
|
||||||
|
enable_physics(self.object, self)
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
local function move_items_in_water (self, p, def, node, is_floating, is_in_water)
|
||||||
|
-- Move item around on flowing liquids; add 'source' check to allow items to continue flowing a bit in the source block of flowing water.
|
||||||
|
if def and not is_floating and (def.liquidtype == "flowing" or def.liquidtype == "source") then
|
||||||
|
self._flowing = true
|
||||||
|
|
||||||
|
--[[ Get flowing direction (function call from flowlib), if there's a liquid.
|
||||||
|
NOTE: According to Qwertymine, flowlib.quickflow is only reliable for liquids with a flowing distance of 7.
|
||||||
|
Luckily, this is exactly what we need if we only care about water, which has this flowing distance. ]]
|
||||||
|
local vec = flowlib.quick_flow(p, node)
|
||||||
|
-- Just to make sure we don't manipulate the speed for no reason
|
||||||
|
if vec.x ~= 0 or vec.y ~= 0 or vec.z ~= 0 then
|
||||||
|
-- Minecraft Wiki: Flowing speed is "about 1.39 meters per second"
|
||||||
|
local f = 1.2
|
||||||
|
-- Set new item moving speed into the direciton of the liquid
|
||||||
|
local newv = vector.multiply(vec, f)
|
||||||
|
-- Swap to acceleration instead of a static speed to better mimic MC mechanics.
|
||||||
|
self.object:set_acceleration(vector.new(newv.x, -0.22, newv.z))
|
||||||
|
|
||||||
|
self.physical_state = true
|
||||||
|
self._flowing = true
|
||||||
|
self.object:set_properties({
|
||||||
|
physical = true
|
||||||
|
})
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
if is_in_water and def.liquidtype == "source" then
|
||||||
|
local cur_vec = self.object:get_velocity()
|
||||||
|
-- apply some acceleration in the opposite direction so it doesn't slide forever
|
||||||
|
local vec = {
|
||||||
|
x = 0 - cur_vec.x * 0.9,
|
||||||
|
y = 3 - cur_vec.y * 0.9,
|
||||||
|
z = 0 - cur_vec.z * 0.9
|
||||||
|
}
|
||||||
|
self.object:set_acceleration(vec)
|
||||||
|
-- slow down the item in water
|
||||||
|
local vel = self.object:get_velocity()
|
||||||
|
if vel.y < 0 then
|
||||||
|
vel.y = vel.y * 0.9
|
||||||
|
end
|
||||||
|
self.object:set_velocity(vel)
|
||||||
|
if self.physical_state ~= false or self._flowing ~= true then
|
||||||
|
self.physical_state = true
|
||||||
|
self._flowing = true
|
||||||
|
self.object:set_properties({
|
||||||
|
physical = true
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif self._flowing == true and not is_in_water and not is_floating then
|
||||||
|
-- Disable flowing physics if not on/in flowing liquid
|
||||||
|
self._flowing = false
|
||||||
|
enable_physics(self.object, self, true)
|
||||||
|
return true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_entity(":__builtin:item", {
|
minetest.register_entity(":__builtin:item", {
|
||||||
|
@ -564,13 +621,17 @@ minetest.register_entity(":__builtin:item", {
|
||||||
if speed ~= nil then self.random_velocity = speed end
|
if speed ~= nil then self.random_velocity = speed end
|
||||||
|
|
||||||
local vel = self.object:get_velocity()
|
local vel = self.object:get_velocity()
|
||||||
|
|
||||||
|
-- There is perhaps a cleverer way of making this physical so it bounces off the wall like swords.
|
||||||
|
local max_vel = 6.5 -- Faster than this and it throws it into the wall / floor and turns black because of clipping.
|
||||||
|
|
||||||
if vel and vel.x == 0 and vel.z == 0 and self.random_velocity > 0 then
|
if vel and vel.x == 0 and vel.z == 0 and self.random_velocity > 0 then
|
||||||
local v = self.random_velocity
|
local v = self.random_velocity
|
||||||
local x = math.random(5, 10) / 10 * v
|
local x = math.random(5, max_vel) / 10 * v
|
||||||
if math.random(0, 10) < 5 then x = -x end
|
if math.random(0, 10) < 5 then x = -x end
|
||||||
local z = math.random(5, 10) / 10 * v
|
local z = math.random(5, max_vel) / 10 * v
|
||||||
if math.random(0, 10) < 5 then z = -z end
|
if math.random(0, 10) < 5 then z = -z end
|
||||||
local y = math.random(2, 4)
|
local y = math.random(1, 2)
|
||||||
self.object:set_velocity(vector.new(x, y, z))
|
self.object:set_velocity(vector.new(x, y, z))
|
||||||
end
|
end
|
||||||
self.random_velocity = 0
|
self.random_velocity = 0
|
||||||
|
@ -747,11 +808,19 @@ minetest.register_entity(":__builtin:item", {
|
||||||
if total_count > max_count then
|
if total_count > max_count then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
-- Merge the remote stack into this one
|
|
||||||
|
|
||||||
-- local pos = object:get_pos()
|
-- Merge the remote stack into this one
|
||||||
-- pos.y = pos.y + ((total_count - count) / max_count) * 0.15
|
local self_pos = self.object:get_pos()
|
||||||
-- self.object:move_to(pos)
|
local pos = object:get_pos()
|
||||||
|
|
||||||
|
--local y = pos.y + ((total_count - count) / max_count) * 0.15
|
||||||
|
local x_diff = (self_pos.x - pos.x) / 2
|
||||||
|
local z_diff = (self_pos.z - pos.z) / 2
|
||||||
|
|
||||||
|
local new_pos = vector.offset(pos, x_diff, 0, z_diff)
|
||||||
|
new_pos.y = math.max(self_pos.y, pos.y) + 0.1
|
||||||
|
|
||||||
|
self.object:move_to(new_pos)
|
||||||
|
|
||||||
self.age = 0 -- Handle as new entity
|
self.age = 0 -- Handle as new entity
|
||||||
own_stack:set_count(total_count)
|
own_stack:set_count(total_count)
|
||||||
|
@ -772,6 +841,7 @@ minetest.register_entity(":__builtin:item", {
|
||||||
self.object:set_acceleration(vector.zero())
|
self.object:set_acceleration(vector.zero())
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
self.age = self.age + dtime
|
self.age = self.age + dtime
|
||||||
if self._collector_timer then
|
if self._collector_timer then
|
||||||
self._collector_timer = self._collector_timer + dtime
|
self._collector_timer = self._collector_timer + dtime
|
||||||
|
@ -785,19 +855,13 @@ minetest.register_entity(":__builtin:item", {
|
||||||
-- otherwise there might have some data corruption.
|
-- otherwise there might have some data corruption.
|
||||||
if self.itemstring == "" then
|
if self.itemstring == "" then
|
||||||
minetest.log("warning",
|
minetest.log("warning",
|
||||||
"Item entity with empty itemstring found at " .. minetest.pos_to_string(self.object:get_pos()) ..
|
"Item entity with empty itemstring found and being deleted at: " .. minetest.pos_to_string(self.object:get_pos()))
|
||||||
"! Deleting it now.")
|
|
||||||
self._removed = true
|
self._removed = true
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local p = self.object:get_pos()
|
local p = self.object:get_pos()
|
||||||
-- If hopper has taken item, it has gone, and no operations should be conducted on this item
|
|
||||||
if hopper_take_item(self, p) then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
local node = minetest.get_node(p)
|
local node = minetest.get_node(p)
|
||||||
local in_unloaded = node.name == "ignore"
|
local in_unloaded = node.name == "ignore"
|
||||||
|
|
||||||
|
@ -807,6 +871,9 @@ minetest.register_entity(":__builtin:item", {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if self.is_clock then
|
if self.is_clock then
|
||||||
self.object:set_properties({
|
self.object:set_properties({
|
||||||
textures = { "mcl_clock:clock_" .. (mcl_worlds.clock_works(p) and mcl_clock.old_time or mcl_clock.random_frame) }
|
textures = { "mcl_clock:clock_" .. (mcl_worlds.clock_works(p) and mcl_clock.old_time or mcl_clock.random_frame) }
|
||||||
|
@ -842,167 +909,12 @@ minetest.register_entity(":__builtin:item", {
|
||||||
-- Destroy item in lava, fire or special nodes
|
-- Destroy item in lava, fire or special nodes
|
||||||
|
|
||||||
local def = minetest.registered_nodes[nn]
|
local def = minetest.registered_nodes[nn]
|
||||||
local lg = minetest.get_item_group(nn, "lava")
|
|
||||||
local fg = minetest.get_item_group(nn, "fire")
|
|
||||||
local dg = minetest.get_item_group(nn, "destroys_items")
|
|
||||||
if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) then
|
|
||||||
--Wait 2 seconds to allow mob drops to be cooked, & picked up instead of instantly destroyed.
|
|
||||||
if self.age > 2 and minetest.get_item_group(self.itemstring, "fire_immune") == 0 then
|
|
||||||
if dg ~= 2 then
|
|
||||||
minetest.sound_play("builtin_item_lava", { pos = self.object:get_pos(), gain = 0.5 })
|
|
||||||
end
|
|
||||||
self._removed = true
|
|
||||||
self.object:remove()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Destroy item when it collides with a cactus
|
if nodes_destroy_items(self, moveresult, def, nn) then return end
|
||||||
if moveresult and moveresult.collides then
|
|
||||||
for _, collision in pairs(moveresult.collisions) do
|
|
||||||
local pos = collision.node_pos
|
|
||||||
if collision.type == "node" and minetest.get_node(pos).name == "mcl_core:cactus" then
|
|
||||||
self._removed = true
|
|
||||||
self.object:remove()
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Push item out when stuck inside solid opaque node
|
if push_out_item_stuck_in_solid(self, dtime, p, def, is_in_water) then return end
|
||||||
if not is_in_water and def and def.walkable and def.groups and def.groups.opaque == 1 then
|
|
||||||
local shootdir
|
|
||||||
local cx = (p.x % 1) - 0.5
|
|
||||||
local cz = (p.z % 1) - 0.5
|
|
||||||
local order = {}
|
|
||||||
|
|
||||||
-- First prepare the order in which the 4 sides are to be checked.
|
if move_items_in_water (self, p, def, node, is_floating, is_in_water) then return end
|
||||||
-- 1st: closest
|
|
||||||
-- 2nd: other direction
|
|
||||||
-- 3rd and 4th: other axis
|
|
||||||
if math.abs(cx) < math.abs(cz) then
|
|
||||||
order = cxcz(order, cx, "x", "z")
|
|
||||||
order = cxcz(order, cz, "z", "x")
|
|
||||||
else
|
|
||||||
order = cxcz(order, cz, "z", "x")
|
|
||||||
order = cxcz(order, cx, "x", "z")
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Check which one of the 4 sides is free
|
|
||||||
for o = 1, #order do
|
|
||||||
local nn = minetest.get_node(vector.add(p, order[o])).name
|
|
||||||
local def = minetest.registered_nodes[nn]
|
|
||||||
if def and def.walkable == false and nn ~= "ignore" then
|
|
||||||
shootdir = order[o]
|
|
||||||
break
|
|
||||||
end
|
|
||||||
end
|
|
||||||
-- If none of the 4 sides is free, shoot upwards
|
|
||||||
if shootdir == nil then
|
|
||||||
shootdir = vector.new(0, 1, 0)
|
|
||||||
local nn = minetest.get_node(vector.add(p, shootdir)).name
|
|
||||||
if nn == "ignore" then
|
|
||||||
-- Do not push into ignore
|
|
||||||
return
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Set new item moving speed accordingly
|
|
||||||
local newv = vector.multiply(shootdir, 3)
|
|
||||||
self.object:set_acceleration(vector.zero())
|
|
||||||
self.object:set_velocity(newv)
|
|
||||||
disable_physics(self.object, self, false, false)
|
|
||||||
|
|
||||||
|
|
||||||
if shootdir.y == 0 then
|
|
||||||
self._force = newv
|
|
||||||
p.x = math.floor(p.x)
|
|
||||||
p.y = math.floor(p.y)
|
|
||||||
p.z = math.floor(p.z)
|
|
||||||
self._forcestart = p
|
|
||||||
self._forcetimer = 1
|
|
||||||
end
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- This code is run after the entity got a push from above “push away” code.
|
|
||||||
-- It is responsible for making sure the entity is entirely outside the solid node
|
|
||||||
-- (with its full collision box), not just its center.
|
|
||||||
if self._forcetimer > 0 then
|
|
||||||
local cbox = self.object:get_properties().collisionbox
|
|
||||||
local ok = false
|
|
||||||
if self._force.x > 0 and (p.x > (self._forcestart.x + 0.5 + (cbox[4] - cbox[1]) / 2)) then ok = true
|
|
||||||
elseif self._force.x < 0 and (p.x < (self._forcestart.x + 0.5 - (cbox[4] - cbox[1]) / 2)) then ok = true
|
|
||||||
elseif self._force.z > 0 and (p.z > (self._forcestart.z + 0.5 + (cbox[6] - cbox[3]) / 2)) then ok = true
|
|
||||||
elseif self._force.z < 0 and (p.z < (self._forcestart.z + 0.5 - (cbox[6] - cbox[3]) / 2)) then ok = true end
|
|
||||||
-- Item was successfully forced out. No more pushing
|
|
||||||
if ok then
|
|
||||||
self._forcetimer = -1
|
|
||||||
self._force = nil
|
|
||||||
enable_physics(self.object, self)
|
|
||||||
else
|
|
||||||
self._forcetimer = self._forcetimer - dtime
|
|
||||||
end
|
|
||||||
return
|
|
||||||
elseif self._force then
|
|
||||||
self._force = nil
|
|
||||||
enable_physics(self.object, self)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Move item around on flowing liquids; add 'source' check to allow items to continue flowing a bit in the source block of flowing water.
|
|
||||||
if def and not is_floating and (def.liquidtype == "flowing" or def.liquidtype == "source") then
|
|
||||||
self._flowing = true
|
|
||||||
|
|
||||||
--[[ Get flowing direction (function call from flowlib), if there's a liquid.
|
|
||||||
NOTE: According to Qwertymine, flowlib.quickflow is only reliable for liquids with a flowing distance of 7.
|
|
||||||
Luckily, this is exactly what we need if we only care about water, which has this flowing distance. ]]
|
|
||||||
local vec = flowlib.quick_flow(p, node)
|
|
||||||
-- Just to make sure we don't manipulate the speed for no reason
|
|
||||||
if vec.x ~= 0 or vec.y ~= 0 or vec.z ~= 0 then
|
|
||||||
-- Minecraft Wiki: Flowing speed is "about 1.39 meters per second"
|
|
||||||
local f = 1.2
|
|
||||||
-- Set new item moving speed into the direciton of the liquid
|
|
||||||
local newv = vector.multiply(vec, f)
|
|
||||||
-- Swap to acceleration instead of a static speed to better mimic MC mechanics.
|
|
||||||
self.object:set_acceleration(vector.new(newv.x, -0.22, newv.z))
|
|
||||||
|
|
||||||
self.physical_state = true
|
|
||||||
self._flowing = true
|
|
||||||
self.object:set_properties({
|
|
||||||
physical = true
|
|
||||||
})
|
|
||||||
return
|
|
||||||
end
|
|
||||||
if is_in_water and def.liquidtype == "source" then
|
|
||||||
local cur_vec = self.object:get_velocity()
|
|
||||||
-- apply some acceleration in the opposite direction so it doesn't slide forever
|
|
||||||
local vec = {
|
|
||||||
x = 0 - cur_vec.x * 0.9,
|
|
||||||
y = 3 - cur_vec.y * 0.9,
|
|
||||||
z = 0 - cur_vec.z * 0.9
|
|
||||||
}
|
|
||||||
self.object:set_acceleration(vec)
|
|
||||||
-- slow down the item in water
|
|
||||||
local vel = self.object:get_velocity()
|
|
||||||
if vel.y < 0 then
|
|
||||||
vel.y = vel.y * 0.9
|
|
||||||
end
|
|
||||||
self.object:set_velocity(vel)
|
|
||||||
if self.physical_state ~= false or self._flowing ~= true then
|
|
||||||
self.physical_state = true
|
|
||||||
self._flowing = true
|
|
||||||
self.object:set_properties({
|
|
||||||
physical = true
|
|
||||||
})
|
|
||||||
end
|
|
||||||
end
|
|
||||||
elseif self._flowing == true and not is_in_water and not is_floating then
|
|
||||||
-- Disable flowing physics if not on/in flowing liquid
|
|
||||||
self._flowing = false
|
|
||||||
enable_physics(self.object, self, true)
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
-- If node is not registered or node is walkably solid and resting on nodebox
|
-- If node is not registered or node is walkably solid and resting on nodebox
|
||||||
local nn = minetest.get_node(vector.offset(p, 0, -0.5, 0)).name
|
local nn = minetest.get_node(vector.offset(p, 0, -0.5, 0)).name
|
||||||
|
@ -1011,14 +923,13 @@ minetest.register_entity(":__builtin:item", {
|
||||||
local is_on_floor = def and (def.walkable
|
local is_on_floor = def and (def.walkable
|
||||||
and not def.groups.slippery and v.y == 0)
|
and not def.groups.slippery and v.y == 0)
|
||||||
|
|
||||||
if not minetest.registered_nodes[nn]
|
if not minetest.registered_nodes[nn] or is_floating or is_on_floor then
|
||||||
or is_floating or is_on_floor then
|
|
||||||
local own_stack = ItemStack(self.object:get_luaentity().itemstring)
|
local own_stack = ItemStack(self.object:get_luaentity().itemstring)
|
||||||
-- Merge with close entities of the same item
|
-- Merge with close entities of the same item
|
||||||
for _, object in pairs(minetest.get_objects_inside_radius(p, 0.8)) do
|
for _, object in pairs(minetest.get_objects_inside_radius(p, 0.8)) do
|
||||||
local obj = object:get_luaentity()
|
local obj = object:get_luaentity()
|
||||||
if obj and obj.name == "__builtin:item"
|
if obj and obj.name == "__builtin:item" and obj.physical_state == false then
|
||||||
and obj.physical_state == false then
|
|
||||||
if self:try_merge_with(own_stack, object, obj) then
|
if self:try_merge_with(own_stack, object, obj) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
|
@ -11,6 +11,14 @@ mcl_minecarts.check_float_time = 15
|
||||||
dofile(mcl_minecarts.modpath.."/functions.lua")
|
dofile(mcl_minecarts.modpath.."/functions.lua")
|
||||||
dofile(mcl_minecarts.modpath.."/rails.lua")
|
dofile(mcl_minecarts.modpath.."/rails.lua")
|
||||||
|
|
||||||
|
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_minecarts", false)
|
||||||
|
local function mcl_log(message)
|
||||||
|
if LOGGING_ON then
|
||||||
|
mcl_util.mcl_log(message, "[Minecarts]", true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
local function detach_driver(self)
|
local function detach_driver(self)
|
||||||
if not self._driver then
|
if not self._driver then
|
||||||
return
|
return
|
||||||
|
@ -51,6 +59,126 @@ end
|
||||||
|
|
||||||
local activate_normal_minecart = detach_driver
|
local activate_normal_minecart = detach_driver
|
||||||
|
|
||||||
|
local function hopper_take_item(self, dtime)
|
||||||
|
local pos = self.object:get_pos()
|
||||||
|
if not pos then return end
|
||||||
|
|
||||||
|
if not self or self.name ~= "mcl_minecarts:hopper_minecart" then return end
|
||||||
|
|
||||||
|
if mcl_util.check_dtime_timer(self, dtime, "hoppermc_take", 0.15) then
|
||||||
|
--minetest.log("The check timer was triggered: " .. dump(pos) .. ", name:" .. self.name)
|
||||||
|
else
|
||||||
|
--minetest.log("The check timer was not triggered")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
--mcl_log("self.itemstring: ".. self.itemstring)
|
||||||
|
|
||||||
|
local above_pos = vector.offset(pos, 0, 0.9, 0)
|
||||||
|
--mcl_log("self.itemstring: ".. minetest.pos_to_string(above_pos))
|
||||||
|
local objs = minetest.get_objects_inside_radius(above_pos, 1.25)
|
||||||
|
|
||||||
|
if objs then
|
||||||
|
|
||||||
|
mcl_log("there is an itemstring. Number of objs: ".. #objs)
|
||||||
|
|
||||||
|
for k, v in pairs(objs) do
|
||||||
|
local ent = v:get_luaentity()
|
||||||
|
|
||||||
|
if ent and not ent._removed and ent.itemstring and ent.itemstring ~= "" then
|
||||||
|
local taken_items = false
|
||||||
|
|
||||||
|
mcl_log("ent.name: " .. tostring(ent.name))
|
||||||
|
mcl_log("ent pos: " .. tostring(ent.object:get_pos()))
|
||||||
|
|
||||||
|
local inv = mcl_entity_invs.load_inv(self, 5)
|
||||||
|
if not inv then return false end
|
||||||
|
|
||||||
|
local current_itemstack = ItemStack(ent.itemstring)
|
||||||
|
|
||||||
|
mcl_log("inv. size: " .. self._inv_size)
|
||||||
|
if inv:room_for_item("main", current_itemstack) then
|
||||||
|
mcl_log("Room")
|
||||||
|
inv:add_item("main", current_itemstack)
|
||||||
|
ent.object:get_luaentity().itemstring = ""
|
||||||
|
ent.object:remove()
|
||||||
|
taken_items = true
|
||||||
|
else
|
||||||
|
mcl_log("no Room")
|
||||||
|
end
|
||||||
|
|
||||||
|
if not taken_items then
|
||||||
|
local items_remaining = current_itemstack:get_count()
|
||||||
|
|
||||||
|
-- This will take part of a floating item stack if no slot can hold the full amount
|
||||||
|
for i = 1, self._inv_size, 1 do
|
||||||
|
local stack = inv:get_stack("main", i)
|
||||||
|
|
||||||
|
mcl_log("i: " .. tostring(i))
|
||||||
|
mcl_log("Items remaining: " .. items_remaining)
|
||||||
|
mcl_log("Name: " .. tostring(stack:get_name()))
|
||||||
|
|
||||||
|
if current_itemstack:get_name() == stack:get_name() then
|
||||||
|
mcl_log("We have a match. Name: " .. tostring(stack:get_name()))
|
||||||
|
|
||||||
|
local room_for = stack:get_stack_max() - stack:get_count()
|
||||||
|
mcl_log("Room for: " .. tostring(room_for))
|
||||||
|
|
||||||
|
if room_for == 0 then
|
||||||
|
-- Do nothing
|
||||||
|
mcl_log("No room")
|
||||||
|
elseif room_for < items_remaining then
|
||||||
|
mcl_log("We have more items remaining than space")
|
||||||
|
|
||||||
|
items_remaining = items_remaining - room_for
|
||||||
|
stack:set_count(stack:get_stack_max())
|
||||||
|
inv:set_stack("main", i, stack)
|
||||||
|
taken_items = true
|
||||||
|
else
|
||||||
|
local new_stack_size = stack:get_count() + items_remaining
|
||||||
|
stack:set_count(new_stack_size)
|
||||||
|
mcl_log("We have more than enough space. Now holds: " .. new_stack_size)
|
||||||
|
|
||||||
|
inv:set_stack("main", i, stack)
|
||||||
|
items_remaining = 0
|
||||||
|
|
||||||
|
ent.object:get_luaentity().itemstring = ""
|
||||||
|
ent.object:remove()
|
||||||
|
|
||||||
|
taken_items = true
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
mcl_log("Count: " .. tostring(stack:get_count()))
|
||||||
|
mcl_log("stack max: " .. tostring(stack:get_stack_max()))
|
||||||
|
--mcl_log("Is it empty: " .. stack:to_string())
|
||||||
|
end
|
||||||
|
|
||||||
|
if i == self._inv_size and taken_items then
|
||||||
|
mcl_log("We are on last item and still have items left. Set final stack size: " .. items_remaining)
|
||||||
|
current_itemstack:set_count(items_remaining)
|
||||||
|
--mcl_log("Itemstack2: " .. current_itemstack:to_string())
|
||||||
|
ent.itemstring = current_itemstack:to_string()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--Add in, and delete
|
||||||
|
if taken_items then
|
||||||
|
mcl_log("Saving")
|
||||||
|
mcl_entity_invs.save_inv(ent)
|
||||||
|
return taken_items
|
||||||
|
else
|
||||||
|
mcl_log("No need to save")
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
-- Table for item-to-entity mapping. Keys: itemstring, Values: Corresponding entity ID
|
-- Table for item-to-entity mapping. Keys: itemstring, Values: Corresponding entity ID
|
||||||
local entity_mapping = {}
|
local entity_mapping = {}
|
||||||
|
|
||||||
|
@ -66,6 +194,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||||
on_rightclick = on_rightclick,
|
on_rightclick = on_rightclick,
|
||||||
|
|
||||||
_driver = nil, -- player who sits in and controls the minecart (only for minecart!)
|
_driver = nil, -- player who sits in and controls the minecart (only for minecart!)
|
||||||
|
_passenger = nil, -- for mobs
|
||||||
_punched = false, -- used to re-send _velocity and position
|
_punched = false, -- used to re-send _velocity and position
|
||||||
_velocity = {x=0, y=0, z=0}, -- only used on punch
|
_velocity = {x=0, y=0, z=0}, -- only used on punch
|
||||||
_start_pos = nil, -- Used to calculate distance for “On A Rail” achievement
|
_start_pos = nil, -- Used to calculate distance for “On A Rail” achievement
|
||||||
|
@ -86,6 +215,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||||
local data = minetest.deserialize(staticdata)
|
local data = minetest.deserialize(staticdata)
|
||||||
if type(data) == "table" then
|
if type(data) == "table" then
|
||||||
self._railtype = data._railtype
|
self._railtype = data._railtype
|
||||||
|
self._passenger = data._passenger
|
||||||
end
|
end
|
||||||
self.object:set_armor_groups({immortal=1})
|
self.object:set_armor_groups({immortal=1})
|
||||||
|
|
||||||
|
@ -177,7 +307,11 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||||
|
|
||||||
cart.on_activate_by_rail = on_activate_by_rail
|
cart.on_activate_by_rail = on_activate_by_rail
|
||||||
|
|
||||||
|
local passenger_attach_position = vector.new(0, -1.75, 0)
|
||||||
|
|
||||||
function cart:on_step(dtime)
|
function cart:on_step(dtime)
|
||||||
|
hopper_take_item(self, dtime)
|
||||||
|
|
||||||
local ctrl, player = nil, nil
|
local ctrl, player = nil, nil
|
||||||
if self._driver then
|
if self._driver then
|
||||||
player = minetest.get_player_by_name(self._driver)
|
player = minetest.get_player_by_name(self._driver)
|
||||||
|
@ -212,6 +346,29 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Grab mob
|
||||||
|
if math.random(1,20) > 15 and not self._passenger then
|
||||||
|
if self.name == "mcl_minecarts:minecart" then
|
||||||
|
local mobsnear = minetest.get_objects_inside_radius(self.object:get_pos(), 1.3)
|
||||||
|
for n=1, #mobsnear do
|
||||||
|
local mob = mobsnear[n]
|
||||||
|
if mob then
|
||||||
|
local entity = mob:get_luaentity()
|
||||||
|
if entity and entity.is_mob then
|
||||||
|
self._passenger = entity
|
||||||
|
mob:set_attach(self.object, "", passenger_attach_position, vector.zero())
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif self._passenger then
|
||||||
|
local passenger_pos = self._passenger.object:get_pos()
|
||||||
|
if not passenger_pos then
|
||||||
|
self._passenger = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Drop minecart if it isn't on a rail anymore
|
-- Drop minecart if it isn't on a rail anymore
|
||||||
if self._last_float_check >= mcl_minecarts.check_float_time then
|
if self._last_float_check >= mcl_minecarts.check_float_time then
|
||||||
pos = self.object:get_pos()
|
pos = self.object:get_pos()
|
||||||
|
@ -236,19 +393,8 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Drop items and remove cart entity
|
-- Do not drop minecart. It goes off the rails too frequently, and anyone using them for farms won't
|
||||||
local pname = ""
|
-- notice and lose their iron and not bother. Not cool until fixed.
|
||||||
if player then
|
|
||||||
pname = player:get_player_name()
|
|
||||||
end
|
|
||||||
if not minetest.is_creative_enabled(pname) then
|
|
||||||
for d=1, #drop do
|
|
||||||
minetest.add_item(self.object:get_pos(), drop[d])
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
self.object:remove()
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
self._last_float_check = 0
|
self._last_float_check = 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
# textdomain: mcl_minecarts
|
||||||
|
Minecart=Minevogn
|
||||||
|
Minecarts can be used for a quick transportion on rails.=Minevogne kan bruges til hurtig transport på spor.
|
||||||
|
Minecarts only ride on rails and always follow the tracks. At a T-junction with no straight way ahead, they turn left. The speed is affected by the rail type.=Minevogne kan kun køre på spor, og følger dem altid. Ved et T-kryds uden en vej ligeud drejer de altid til venstre. Farten påvirkes af sportypen.
|
||||||
|
You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving.=Du kan placere minevogne på spor. Højre-klik for at stige ombord.
|
||||||
|
To obtain the minecart, punch it while holding down the sneak key.=For at at få minevognen i din oppakning.
|
||||||
|
A minecart with TNT is an explosive vehicle that travels on rail.=En minevogn med TNT as et eksplosivt fartøj som kører på spor.
|
||||||
|
Place it on rails. Punch it to move it. The TNT is ignited with a flint and steel or when the minecart is on an powered activator rail.=Placér den på spor. Slå den for at flytte den. TNTet bliver antændt med flint og stål eller når minevognen er på et aktiveringsspor.
|
||||||
|
To obtain the minecart and TNT, punch them while holding down the sneak key. You can't do this if the TNT was ignited.=For at få minevognen med TNT i din oppakning skal du slå den mens du holder snigeknappen nede. Du kan ikke gøre dette hvis TNTen er antændt.
|
||||||
|
A minecart with furnace is a vehicle that travels on rails. It can propel itself with fuel.=En minevogn med ovn er et fartøj som kører på spor. Den kan køre af sig selv med brændstof.
|
||||||
|
Place it on rails. If you give it some coal, the furnace will start burning for a long time and the minecart will be able to move itself. Punch it to get it moving.=Placér den på spor. Hvis du putter kul i den vil ovnen brænde i lang tid, og minevognen vil køre af sig selv. Slå den for at sætte den i bevægelse.
|
||||||
|
To obtain the minecart and furnace, punch them while holding down the sneak key.=For at få minevognen med ovn i din oppakning skal du slå den mens du holder snigeknappen nede.
|
||||||
|
Minecart with Chest=Minevogn med kiste
|
||||||
|
Minecart with Furnace=Minevogn med ovn
|
||||||
|
Minecart with Command Block=Minevogn med kommandoblok
|
||||||
|
Minecart with Hopper=Minevogn med tragt
|
||||||
|
Minecart with TNT=Minevogn med TNT
|
||||||
|
Place them on the ground to build your railway, the rails will automatically connect to each other and will turn into curves, T-junctions, crossings and slopes as needed.=Placér dem på jorden for at bygge din jerbane. Sporene kobler sig automatisk sammen med hinanden og laver sving, T-kryds, kryds og skråninger efter behov.
|
||||||
|
Rail=Spor
|
||||||
|
Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction.=Spor kan bruges til at bygge jernbaner til minevogne. Normale spor sænker minevognene en smule på grund af friktionsmodstand.
|
||||||
|
Powered Rail=Strømspor
|
||||||
|
Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts.=Spor kan bruges til at bygge jernbaner til minevogne. Strømspor kan accelerere eller bremse minevogne.
|
||||||
|
Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power.=Uden redstonekraft vil sporet bremse minevognen. For at accelerere minevognen skal den bruge redstoneskraft.
|
||||||
|
Activator Rail=Aktiveringsspor
|
||||||
|
Rails can be used to build transport tracks for minecarts. Activator rails are used to activate special minecarts.=Spor kan bruges til at bygge jernbaner til minevogne. Aktiveringsspor bruges til at aktivere specielle minevogne.
|
||||||
|
To make this rail activate minecarts, power it with redstone power and send a minecart over this piece of rail.=For at få dette spor til at aktiere minevogne skal du give det redstonekraft og sende en minevogn over dette sporstykke.
|
||||||
|
Detector Rail=Detektorspor
|
||||||
|
Rails can be used to build transport tracks for minecarts. A detector rail is able to detect a minecart above it and powers redstone mechanisms.=Spor kan bruges til at bygge jernbaner til minevogne. Et detektorspor kan opdage en minevogn som kører over det og give kraft til redstonemekanismer.
|
||||||
|
To detect a minecart and provide redstone power, connect it to redstone trails or redstone mechanisms and send any minecart over the rail.=For at opdage en minevogn og give redstonekraft skal den forbindes til redstonestøv eller redstonemekanismer og send en hvilkensomhelst minevogn hen over sporet.
|
||||||
|
Track for minecarts=Spor til minevogne.
|
||||||
|
Speed up when powered, slow down when not powered=Accelerérer når der er strøm, sænk hastigheden når der ikke er strøm.
|
||||||
|
Activates minecarts when powered=Aktieverer minevogne når der er strøm.
|
||||||
|
Emits redstone power when a minecart is detected=Udsender redstonekraft når en minevogn bliver opdaget.
|
||||||
|
Vehicle for fast travel on rails=Fartøj til hurtig kørsel på spor.
|
||||||
|
Can be ignited by tools or powered activator rail=Kan antændes med værktøj eller et aktivatorspor med strøm.
|
||||||
|
Sneak to dismount=Snig for at stige af.
|
|
@ -10,15 +10,15 @@ To obtain the minecart and TNT, punch them while holding down the sneak key. You
|
||||||
A minecart with furnace is a vehicle that travels on rails. It can propel itself with fuel.=Une wagonnet avec un four est un véhicule qui se déplace sur rails. Il peut se propulser avec du carburant.
|
A minecart with furnace is a vehicle that travels on rails. It can propel itself with fuel.=Une wagonnet avec un four est un véhicule qui se déplace sur rails. Il peut se propulser avec du carburant.
|
||||||
Place it on rails. If you give it some coal, the furnace will start burning for a long time and the minecart will be able to move itself. Punch it to get it moving.=Placez-le sur des rails. Si vous lui donnez du charbon, le four commencera à brûler pendant longtemps et le wagonnet pourra se déplacer. Frappez-le pour le faire bouger.
|
Place it on rails. If you give it some coal, the furnace will start burning for a long time and the minecart will be able to move itself. Punch it to get it moving.=Placez-le sur des rails. Si vous lui donnez du charbon, le four commencera à brûler pendant longtemps et le wagonnet pourra se déplacer. Frappez-le pour le faire bouger.
|
||||||
To obtain the minecart and furnace, punch them while holding down the sneak key.=Pour obtenir le wagonnet et le four, frappez-les tout en maintenant la touche furtive enfoncée.
|
To obtain the minecart and furnace, punch them while holding down the sneak key.=Pour obtenir le wagonnet et le four, frappez-les tout en maintenant la touche furtive enfoncée.
|
||||||
Minecart with Chest=Wagonnet avec Coffre
|
Minecart with Chest=Wagonnet avec coffre
|
||||||
Minecart with Furnace=Wagonnet avec Four
|
Minecart with Furnace=Wagonnet avec four
|
||||||
Minecart with Command Block=Wagonnet avec Bloc de Commande
|
Minecart with Command Block=Wagonnet avec bloc de commande
|
||||||
Minecart with Hopper=Wagonnet avec Entonoir
|
Minecart with Hopper=Wagonnet avec entonnoir
|
||||||
Minecart with TNT=Wagonnet avec TNT
|
Minecart with TNT=Wagonnet avec TNT
|
||||||
Place them on the ground to build your railway, the rails will automatically connect to each other and will turn into curves, T-junctions, crossings and slopes as needed.=Placez-les sur le sol pour construire votre chemin de fer, les rails se connecteront automatiquement les uns aux autres et se transformeront en courbes, en jonctions en T, en traversées et en pentes au besoin.
|
Place them on the ground to build your railway, the rails will automatically connect to each other and will turn into curves, T-junctions, crossings and slopes as needed.=Placez-les sur le sol pour construire votre chemin de fer, les rails se connecteront automatiquement les uns aux autres et se transformeront en courbes, en jonctions en T, en traversées et en pentes au besoin.
|
||||||
Rail=Rail
|
Rail=Rail
|
||||||
Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction.=Les rails peuvent être utilisés pour construire des voies de transport pour les wagonnets. Les rails ralentissent légèrement les wagonnets en raison de la friction.
|
Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction.=Les rails peuvent être utilisés pour construire des voies de transport pour les wagonnets. Les rails ralentissent légèrement les wagonnets en raison de la friction.
|
||||||
Powered Rail=Rail allimenté
|
Powered Rail=Rail alimenté
|
||||||
Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts.=Les rails peuvent être utilisés pour construire des voies de transport pour les wagonnets. Les rails motorisés sont capables d'accélérer et de freiner les wagonnets.
|
Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts.=Les rails peuvent être utilisés pour construire des voies de transport pour les wagonnets. Les rails motorisés sont capables d'accélérer et de freiner les wagonnets.
|
||||||
Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power.=Sans énergie de redstone, le rail freinera les wagonnets. Pour que ce rail accélère les minecarts, alimentez-le avec une source d'énergie redstone.
|
Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power.=Sans énergie de redstone, le rail freinera les wagonnets. Pour que ce rail accélère les minecarts, alimentez-le avec une source d'énergie redstone.
|
||||||
Activator Rail=Rail d'activation
|
Activator Rail=Rail d'activation
|
||||||
|
|
|
@ -1,36 +1,36 @@
|
||||||
# textdomain: mcl_minecarts
|
# textdomain: mcl_minecarts
|
||||||
Minecart=Вагонетка
|
Minecart=Вагонетка
|
||||||
Minecarts can be used for a quick transportion on rails.=Вагонетки нужны, чтобы быстро перемещаться по рельсам.
|
Minecarts can be used for a quick transportion on rails.=Вагонетка может быть использована для быстрого перемещения по рельсам.
|
||||||
Minecarts only ride on rails and always follow the tracks. At a T-junction with no straight way ahead, they turn left. The speed is affected by the rail type.=Вагонетки едут строго по проложенному железнодорожному пути. На Т-образной развилке они поворачивают налево. Скорость зависит от типа рельсов.
|
Minecarts only ride on rails and always follow the tracks. At a T-junction with no straight way ahead, they turn left. The speed is affected by the rail type.=Вагонетки едут только по проложенным рельсам. На Т-образной развилке они поворачивают налево. Скорость зависит от типа рельсов.
|
||||||
You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving.=Вы ставите вагонетку на рельсы. Правым кликом садитесь в неё. Стукаете, чтобы начать движение.
|
You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving.=Вы можете поставить вагонетку на рельсы. Правым кликом сядьте в неё. Ударьте по ней, чтобы она поехала.
|
||||||
To obtain the minecart, punch it while holding down the sneak key.=Чтобы взять вагонетку, стукните её, удерживая клавишу [Красться].
|
To obtain the minecart, punch it while holding down the sneak key.=Чтобы забрать вагонетку, ударьте по ней, удерживая клавишу [Красться].
|
||||||
A minecart with TNT is an explosive vehicle that travels on rail.=Вагон тротила это подрывной железнодорожный транспорт.
|
A minecart with TNT is an explosive vehicle that travels on rail.=Вагонетка с ТНТ это взрывающийся железнодорожный транспорт.
|
||||||
Place it on rails. Punch it to move it. The TNT is ignited with a flint and steel or when the minecart is on an powered activator rail.=Поместите его на рельсы. Стукните, чтобы он поехал. Тротил воспламеняется, если его поджечь огнивом, либо при попадании на подключенный рельсовый активатор.
|
Place it on rails. Punch it to move it. The TNT is ignited with a flint and steel or when the minecart is on an powered activator rail.=Поместите вагонетку на рельсы. Ударьте по ней, чтобы она поехала. ТНТ активируется, если его поджечь огнивом или когда вагонетка проедет через подключенные активирующие рельсы.
|
||||||
To obtain the minecart and TNT, punch them while holding down the sneak key. You can't do this if the TNT was ignited.=Чтобы взять вагон тротила, стукните его, удерживая клавишу [Красться]. Если тротил воспламенён, сделать это нельзя.
|
To obtain the minecart and TNT, punch them while holding down the sneak key. You can't do this if the TNT was ignited.=Чтобы забрать вагонетку с ТНТ, ударьте по ней, удерживая клавишу [Красться]. Если ТНТ подожжён, сделать это нельзя.
|
||||||
A minecart with furnace is a vehicle that travels on rails. It can propel itself with fuel.=Вагон с печью - это железнодорожный транспорт. Он может двигаться за счёт топлива.
|
A minecart with furnace is a vehicle that travels on rails. It can propel itself with fuel.=Вагонетка с печью это железнодорожный транспорт. Она может ехать сама за счёт топлива.
|
||||||
Place it on rails. If you give it some coal, the furnace will start burning for a long time and the minecart will be able to move itself. Punch it to get it moving.=Поставьте его на рельсы. Если добавить немного угля, то печь зажжётся на продолжительное время и вагон сможет ехать. Стукните вагон для начала движения.
|
Place it on rails. If you give it some coal, the furnace will start burning for a long time and the minecart will be able to move itself. Punch it to get it moving.=Поставьте вагонетку на рельсы. Если добавить в неё угля, то печь будет гореть продолжительное время и вагонетка сможет поехать сама. Ударьте по ней, чтобы она поехала.
|
||||||
To obtain the minecart and furnace, punch them while holding down the sneak key.=Чтобы взять вагон с печью, стукните его, удерживая клавишу [Красться].
|
To obtain the minecart and furnace, punch them while holding down the sneak key.=Чтобы забрать вагонетку с печью, ударьте по ней, удерживая клавишу [Красться].
|
||||||
Minecart with Chest=Вагон с сундуком
|
Minecart with Chest=Вагонетка с сундуком
|
||||||
Minecart with Furnace=Вагон с печью
|
Minecart with Furnace=Вагонетка с печью
|
||||||
Minecart with Command Block=Вагон с командным блоком
|
Minecart with Command Block=Вагонетка с командным блоком
|
||||||
Minecart with Hopper=Вагон с бункером
|
Minecart with Hopper=Вагонетка с воронкой
|
||||||
Minecart with TNT=Вагон тротила
|
Minecart with TNT=Вагонетка с ТНТ
|
||||||
Place them on the ground to build your railway, the rails will automatically connect to each other and will turn into curves, T-junctions, crossings and slopes as needed.=Поместите на землю, чтобы сделать железную дорогу, рельсы автоматически соединятся между собой и будут превращаться в плавный повороты, T-образные развилки, перекрёстки и уклоны там, где это потребуется.
|
Place them on the ground to build your railway, the rails will automatically connect to each other and will turn into curves, T-junctions, crossings and slopes as needed.=Поместите рельсы на землю, чтобы сделать железную дорогу, рельсы автоматически соединятся между собой и будут образовывать повороты, T-образные развилки, перекрёстки и склоны там, где это потребуется.
|
||||||
Rail=Рельсы
|
Rail=Рельсы
|
||||||
Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction.=Рельсы используются для строительства железной дороги. Обычные рельсы немного замедляют движение вагонеток из-за трения.
|
Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction.=Рельсы используются для строительства железной дороги. Обычные рельсы немного замедляют движение вагонеток из-за трения.
|
||||||
Powered Rail=Подключаемые рельсы
|
Powered Rail=Энергорельсы
|
||||||
Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts.=Рельсы используются для строительства железной дороги. Подключённые рельсы могут разгонять и тормозить вагонетки.
|
Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts.=Энергорельсы используются для строительства железной дороги. Энергорельсы могут ускорять и тормозить вагонетки.
|
||||||
Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power.=Без энергии редстоуна рельсы будут тормозить вагонетки.
|
Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power.=Неподключенные энергорельсы замедляют вагонетки. Чтобы энергорельсы ускоряли вагонетки, проведите к ним сигнал редстоуна.
|
||||||
Activator Rail=Рельсовый активатор
|
Activator Rail=Активирующие рельсы
|
||||||
Rails can be used to build transport tracks for minecarts. Activator rails are used to activate special minecarts.=Рельсы используются для строительства железной дороги. Рельсовый активатор активирует особые вагонетки.
|
Rails can be used to build transport tracks for minecarts. Activator rails are used to activate special minecarts.=Активирующие рельсы используются для строительства железной дороги. Активирующие рельсы активируют некоторые особые вагонетки.
|
||||||
To make this rail activate minecarts, power it with redstone power and send a minecart over this piece of rail.=Чтобы этот блок рельсов активировал вагонетку, подключите его к энергии редстоуна и направьте вагонетку через него.
|
To make this rail activate minecarts, power it with redstone power and send a minecart over this piece of rail.=Чтобы эти рельсы активировали вагонетки, подключите активирующие рельсы к сигналу редстоуна и направьте вагонетку через них.
|
||||||
Detector Rail=Рельсовый детектор
|
Detector Rail=Нажимные рельсы
|
||||||
Rails can be used to build transport tracks for minecarts. A detector rail is able to detect a minecart above it and powers redstone mechanisms.=Рельсы используются для строительства железной дороги. Рельсовый детектор может обнаруживать вагонетку у себя наверху и подключать механизмы редстоуна.
|
Rails can be used to build transport tracks for minecarts. A detector rail is able to detect a minecart above it and powers redstone mechanisms.=Нажимные рельсы используются для строительства железной дороги. Нажимные рельсы реагируют на проезжающие по ним вагонетки и выдают сигнал для механизмов из редстоуна.
|
||||||
To detect a minecart and provide redstone power, connect it to redstone trails or redstone mechanisms and send any minecart over the rail.=Чтобы обнаруживать вагонетку и подавать энергию редстоуна, подключите его к дорожке редстоуна или механизму редстоуна, после чего направьте любую вагонетку через него.
|
To detect a minecart and provide redstone power, connect it to redstone trails or redstone mechanisms and send any minecart over the rail.=Подсоедините к нажимным рельсам редстоун или редстоуновые механизмы, чтобы активировать их когда по рельсам проезжает вагонетка.
|
||||||
Track for minecarts=Железная дорога
|
Track for minecarts=Железная дорога
|
||||||
Speed up when powered, slow down when not powered=Разгоняет, если подключён, тормозит, если не подключён
|
Speed up when powered, slow down when not powered=Если подключены - ускоряют, если нет - тормозят
|
||||||
Activates minecarts when powered=Активирует особые вагонетки, если подключён
|
Activates minecarts when powered=Активирует особые вагонетки, если подключены
|
||||||
Emits redstone power when a minecart is detected=Испускает энергию редстоуна при обнаружении вагонетки
|
Emits redstone power when a minecart is detected=Подает сигнал редстоуна при обнаружении вагонетки
|
||||||
Vehicle for fast travel on rails=Быстрый железнодорожный транспорт
|
Vehicle for fast travel on rails=Железнодорожный транспорт
|
||||||
Can be ignited by tools or powered activator rail=Можно воспламенить с помощью инструмента или подключенного рельсового активатора
|
Can be ignited by tools or powered activator rail=Можно поджечь инструментом или активирующими рельсами
|
||||||
Sneak to dismount=Нажмите [Красться] для высадки
|
Sneak to dismount=Нажмите [Красться] для высадки
|
||||||
|
|
|
@ -5,23 +5,18 @@ local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
|
||||||
|
|
||||||
local PATHFINDING = "gowp"
|
local PATHFINDING = "gowp"
|
||||||
local CRASH_WARN_FREQUENCY = 60
|
local CRASH_WARN_FREQUENCY = 60
|
||||||
|
local LIFETIMER_DISTANCE = 47
|
||||||
|
|
||||||
-- Localize
|
-- Localize
|
||||||
local S = minetest.get_translator("mcl_mobs")
|
local S = minetest.get_translator("mcl_mobs")
|
||||||
|
|
||||||
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_villager",false)
|
local DEVELOPMENT = minetest.settings:get_bool("mcl_development",false)
|
||||||
local function mcl_log (message)
|
|
||||||
if LOGGING_ON then
|
|
||||||
mcl_util.mcl_log (message, "[Mobs]", true)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Invisibility mod check
|
-- Invisibility mod check
|
||||||
mcl_mobs.invis = {}
|
mcl_mobs.invis = {}
|
||||||
|
|
||||||
local remove_far = true
|
local remove_far = true
|
||||||
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
|
|
||||||
local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= false
|
|
||||||
local mobs_debug = minetest.settings:get_bool("mobs_debug", false) -- Shows helpful debug info above each mob
|
local mobs_debug = minetest.settings:get_bool("mobs_debug", false) -- Shows helpful debug info above each mob
|
||||||
local spawn_logging = minetest.settings:get_bool("mcl_logging_mobs_spawn",true)
|
local spawn_logging = minetest.settings:get_bool("mcl_logging_mobs_spawn",true)
|
||||||
|
|
||||||
|
@ -38,15 +33,6 @@ if minetest.settings:get_bool("only_peaceful_mobs", false) then
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
local node_ok = function(pos, fallback)
|
|
||||||
fallback = fallback or mcl_mobs.fallback_node
|
|
||||||
local node = minetest.get_node_or_nil(pos)
|
|
||||||
if node and minetest.registered_nodes[node.name] then
|
|
||||||
return node
|
|
||||||
end
|
|
||||||
return minetest.registered_nodes[fallback]
|
|
||||||
end
|
|
||||||
|
|
||||||
function mob_class:update_tag() --update nametag and/or the debug box
|
function mob_class:update_tag() --update nametag and/or the debug box
|
||||||
local tag
|
local tag
|
||||||
if mobs_debug then
|
if mobs_debug then
|
||||||
|
@ -76,8 +62,11 @@ function mob_class:update_tag() --update nametag and/or the debug box
|
||||||
end
|
end
|
||||||
|
|
||||||
function mob_class:jock_to(mob, reletive_pos, rot)
|
function mob_class:jock_to(mob, reletive_pos, rot)
|
||||||
|
local pos = self.object:get_pos()
|
||||||
|
if not pos then return end
|
||||||
|
|
||||||
self.jockey = mob
|
self.jockey = mob
|
||||||
local jock = minetest.add_entity(self.object:get_pos(), mob)
|
local jock = minetest.add_entity(pos, mob)
|
||||||
if not jock then return end
|
if not jock then return end
|
||||||
jock:get_luaentity().docile_by_day = false
|
jock:get_luaentity().docile_by_day = false
|
||||||
jock:get_luaentity().riden_by_jock = true
|
jock:get_luaentity().riden_by_jock = true
|
||||||
|
@ -89,11 +78,10 @@ function mob_class:get_staticdata()
|
||||||
for _,p in pairs(minetest.get_connected_players()) do
|
for _,p in pairs(minetest.get_connected_players()) do
|
||||||
self:remove_particlespawners(p:get_player_name())
|
self:remove_particlespawners(p:get_player_name())
|
||||||
end
|
end
|
||||||
|
|
||||||
-- remove mob when out of range unless tamed
|
-- remove mob when out of range unless tamed
|
||||||
if remove_far
|
if remove_far
|
||||||
and self.can_despawn
|
and self:despawn_allowed()
|
||||||
and self.remove_ok
|
|
||||||
and ((not self.nametag) or (self.nametag == ""))
|
|
||||||
and self.lifetimer <= 20 then
|
and self.lifetimer <= 20 then
|
||||||
if spawn_logging then
|
if spawn_logging then
|
||||||
minetest.log("action", "[mcl_mobs] Mob "..tostring(self.name).." despawns at "..minetest.pos_to_string(vector.round(self.object:get_pos())) .. " - out of range")
|
minetest.log("action", "[mcl_mobs] Mob "..tostring(self.name).." despawns at "..minetest.pos_to_string(vector.round(self.object:get_pos())) .. " - out of range")
|
||||||
|
@ -102,7 +90,6 @@ function mob_class:get_staticdata()
|
||||||
return "remove"-- nil
|
return "remove"-- nil
|
||||||
end
|
end
|
||||||
|
|
||||||
self.remove_ok = true
|
|
||||||
self.attack = nil
|
self.attack = nil
|
||||||
self.following = nil
|
self.following = nil
|
||||||
self.state = "stand"
|
self.state = "stand"
|
||||||
|
@ -124,6 +111,21 @@ function mob_class:get_staticdata()
|
||||||
return minetest.serialize(tmp)
|
return minetest.serialize(tmp)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function valid_texture(self, def_textures)
|
||||||
|
if not self.base_texture then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.texture_selected then
|
||||||
|
if #def_textures < self.texture_selected then
|
||||||
|
self.texture_selected = nil
|
||||||
|
else
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
function mob_class:mob_activate(staticdata, def, dtime)
|
function mob_class:mob_activate(staticdata, def, dtime)
|
||||||
if not self.object:get_pos() or staticdata == "remove" then
|
if not self.object:get_pos() or staticdata == "remove" then
|
||||||
mcl_burning.extinguish(self.object)
|
mcl_burning.extinguish(self.object)
|
||||||
|
@ -146,16 +148,20 @@ function mob_class:mob_activate(staticdata, def, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
--If textures in definition change, reload textures
|
--If textures in definition change, reload textures
|
||||||
if not self.base_texture or (def.textures and table.indexof(def.textures, self.base_texture) == -1) then
|
if not valid_texture(self, def.textures) then
|
||||||
|
|
||||||
-- compatiblity with old simple mobs textures
|
-- compatiblity with old simple mobs textures
|
||||||
if type(def.textures[1]) == "string" then
|
if type(def.textures[1]) == "string" then
|
||||||
def.textures = {def.textures}
|
def.textures = {def.textures}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not self.texture_selected then
|
||||||
local c = 1
|
local c = 1
|
||||||
if #def.textures > c then c = #def.textures end
|
if #def.textures > c then c = #def.textures end
|
||||||
|
self.texture_selected = math.random(c)
|
||||||
|
end
|
||||||
|
|
||||||
self.base_texture = def.textures[math.random(c)]
|
self.base_texture = def.textures[self.texture_selected]
|
||||||
self.base_mesh = def.mesh
|
self.base_mesh = def.mesh
|
||||||
self.base_size = self.visual_size
|
self.base_size = self.visual_size
|
||||||
self.base_colbox = self.collisionbox
|
self.base_colbox = self.collisionbox
|
||||||
|
@ -310,46 +316,33 @@ end
|
||||||
|
|
||||||
-- execute current state (stand, walk, run, attacks)
|
-- execute current state (stand, walk, run, attacks)
|
||||||
-- returns true if mob has died
|
-- returns true if mob has died
|
||||||
function mob_class:do_states(dtime)
|
function mob_class:do_states(dtime, player_in_active_range)
|
||||||
--if self.can_open_doors then check_doors(self) end
|
--if self.can_open_doors then check_doors(self) end
|
||||||
|
|
||||||
if self.state == "stand" then
|
|
||||||
self:do_states_stand()
|
|
||||||
elseif self.state == PATHFINDING then
|
|
||||||
self:check_gowp(dtime)
|
|
||||||
elseif self.state == "walk" then
|
|
||||||
self:do_states_walk()
|
|
||||||
elseif self.state == "runaway" then
|
|
||||||
-- runaway when punched
|
|
||||||
self:do_states_runaway()
|
|
||||||
elseif self.state == "attack" then
|
|
||||||
-- attack routines (explode, dogfight, shoot, dogshoot)
|
|
||||||
if self:do_states_attack(dtime) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
local function update_timers (self, dtime)
|
|
||||||
-- knockback timer. set in on_punch
|
-- knockback timer. set in on_punch
|
||||||
if self.pause_timer > 0 then
|
if self.pause_timer > 0 then
|
||||||
self.pause_timer = self.pause_timer - dtime
|
self.pause_timer = self.pause_timer - dtime
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
self:env_danger_movement_checks(player_in_active_range)
|
||||||
|
|
||||||
|
if self.state == PATHFINDING then
|
||||||
|
self:check_gowp(dtime)
|
||||||
|
elseif self.state == "attack" then
|
||||||
|
if self:do_states_attack(dtime) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
else
|
||||||
-- attack timer. Not anymore, it seems. Used for also occassionally processing mob step too!
|
if mcl_util.check_dtime_timer(self, dtime, "onstep_dostates", 1) then
|
||||||
self.timer = self.timer + dtime
|
if self.state == "stand" then
|
||||||
|
self:do_states_stand(player_in_active_range)
|
||||||
if self.state ~= "attack" and self.state ~= PATHFINDING then
|
elseif self.state == "walk" then
|
||||||
if self.timer < 1 then
|
self:do_states_walk()
|
||||||
return true
|
elseif self.state == "runaway" then
|
||||||
|
self:do_states_runaway()
|
||||||
end
|
end
|
||||||
self.timer = 0
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- never go over 100
|
|
||||||
if self.timer > 100 then
|
|
||||||
self.timer = 1
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -377,6 +370,8 @@ function mob_class:outside_limits()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function on_step_work (self, dtime)
|
local function on_step_work (self, dtime)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
if not pos then return end
|
if not pos then return end
|
||||||
|
@ -392,71 +387,62 @@ local function on_step_work (self, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:falling(pos) then return end
|
if self:falling(pos) then return end
|
||||||
self:check_suspend()
|
if self:step_damage (dtime, pos) then return end
|
||||||
|
|
||||||
if not self.fire_resistant then
|
|
||||||
mcl_burning.tick(self.object, dtime, self)
|
|
||||||
if not self.object:get_pos() then return end -- mcl_burning.tick may remove object immediately
|
|
||||||
|
|
||||||
if self:check_for_death("fire", {type = "fire"}) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if self:env_damage (dtime, pos) then return end
|
|
||||||
|
|
||||||
if self.state == "die" then return end
|
if self.state == "die" then return end
|
||||||
-- End: Death/damage processing
|
-- End: Death/damage processing
|
||||||
|
|
||||||
|
local player_in_active_range = self:player_in_active_range()
|
||||||
|
self:check_suspend(player_in_active_range)
|
||||||
|
|
||||||
self:check_water_flow()
|
self:check_water_flow()
|
||||||
self:env_danger_movement_checks (dtime)
|
|
||||||
|
|
||||||
self:follow_flop() -- Mob following code.
|
if not self._jumping_cliff then
|
||||||
|
self._can_jump_cliff = self:can_jump_cliff()
|
||||||
|
else
|
||||||
|
self._can_jump_cliff = false
|
||||||
|
end
|
||||||
|
|
||||||
self:set_animation_speed() -- set animation speed relative to velocity
|
self:flop()
|
||||||
|
|
||||||
self:check_smooth_rotation(dtime)
|
self:check_smooth_rotation(dtime)
|
||||||
|
|
||||||
|
if player_in_active_range then
|
||||||
|
self:set_animation_speed() -- set animation speed relative to velocity
|
||||||
|
|
||||||
self:check_head_swivel(dtime)
|
self:check_head_swivel(dtime)
|
||||||
|
|
||||||
if self.jump_sound_cooloff > 0 then self.jump_sound_cooloff = self.jump_sound_cooloff - dtime end
|
if mcl_util.check_dtime_timer(self, dtime, "onstep_engage", 0.2) then
|
||||||
self:do_jump()
|
self:check_follow()
|
||||||
|
|
||||||
self:check_runaway_from()
|
self:check_runaway_from()
|
||||||
self:monster_attack()
|
self:monster_attack()
|
||||||
self:npc_attack()
|
self:npc_attack()
|
||||||
self:check_aggro(dtime)
|
|
||||||
|
|
||||||
if self.do_custom and self.do_custom(self, dtime) == false then return end
|
|
||||||
|
|
||||||
|
|
||||||
-- In certain circumstances, we abandon processing of certain functionality
|
|
||||||
local skip_processing = false
|
|
||||||
if update_timers(self, dtime) then
|
|
||||||
skip_processing = true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self:check_herd(dtime)
|
||||||
|
|
||||||
|
if self.jump_sound_cooloff > 0 then self.jump_sound_cooloff = self.jump_sound_cooloff - dtime end
|
||||||
|
self:do_jump()
|
||||||
|
end
|
||||||
|
|
||||||
if not skip_processing then
|
if mcl_util.check_dtime_timer(self, dtime, "onstep_occassional", 1) then
|
||||||
self:check_breeding()
|
|
||||||
|
|
||||||
|
if player_in_active_range then
|
||||||
self:check_item_pickup()
|
self:check_item_pickup()
|
||||||
self:set_armor_texture()
|
self:set_armor_texture()
|
||||||
|
self:step_opinion_sound(dtime)
|
||||||
|
end
|
||||||
|
|
||||||
|
self:check_breeding()
|
||||||
|
end
|
||||||
|
|
||||||
|
self:check_aggro(dtime)
|
||||||
|
|
||||||
self:check_particlespawners(dtime)
|
self:check_particlespawners(dtime)
|
||||||
|
|
||||||
if self.opinion_sound_cooloff > 0 then
|
if self.do_custom and self.do_custom(self, dtime) == false then return end
|
||||||
self.opinion_sound_cooloff = self.opinion_sound_cooloff - dtime
|
|
||||||
end
|
|
||||||
-- mob plays random sound at times. Should be 120. Zombie and mob farms are ridiculous
|
|
||||||
if math.random(1, 70) == 1 then
|
|
||||||
self:mob_sound("random", true)
|
|
||||||
end
|
|
||||||
|
|
||||||
if self:do_states(dtime) then return end
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
if self:do_states(dtime, player_in_active_range) then return end
|
||||||
|
|
||||||
if mobs_debug then self:update_tag() end
|
if mobs_debug then self:update_tag() end
|
||||||
|
|
||||||
|
@ -467,9 +453,17 @@ end
|
||||||
|
|
||||||
local last_crash_warn_time = 0
|
local last_crash_warn_time = 0
|
||||||
|
|
||||||
local on_step_error_handler = function ()
|
local function log_error (stack_trace, info, info2)
|
||||||
local info = debug.getinfo(1, "SnlufL")
|
minetest.log("action", "--- Bug report start (please provide a few lines before this also for context) ---")
|
||||||
|
minetest.log("action", "Error: " .. stack_trace)
|
||||||
|
minetest.log("action", "Bug info: " .. info)
|
||||||
|
if info2 then
|
||||||
|
minetest.log("action", "Bug info additional: " .. info2)
|
||||||
|
end
|
||||||
|
minetest.log("action", "--- Bug report end ---")
|
||||||
|
end
|
||||||
|
|
||||||
|
local function warn_user_error ()
|
||||||
local current_time = os.time()
|
local current_time = os.time()
|
||||||
local time_since_warning = current_time - last_crash_warn_time
|
local time_since_warning = current_time - last_crash_warn_time
|
||||||
|
|
||||||
|
@ -481,27 +475,48 @@ local on_step_error_handler = function ()
|
||||||
last_crash_warn_time = current_time
|
last_crash_warn_time = current_time
|
||||||
minetest.log("A game crashing bug was prevented. Please provide debug.log information to MineClone2 dev team for investigation. (Search for: --- Bug report start)")
|
minetest.log("A game crashing bug was prevented. Please provide debug.log information to MineClone2 dev team for investigation. (Search for: --- Bug report start)")
|
||||||
end
|
end
|
||||||
minetest.log("action", "--- Bug report start (please provide a few lines before this also for context) ---")
|
|
||||||
minetest.log("action", "Stack trace: ".. tostring(debug.traceback()))
|
|
||||||
minetest.log("action", "Bug info: ".. dump(info))
|
|
||||||
minetest.log("action", "--- Bug report end ---")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local on_step_error_handler = function ()
|
||||||
|
warn_user_error ()
|
||||||
|
local info = debug.getinfo(1, "SnlufL")
|
||||||
|
log_error(tostring(debug.traceback()), dump(info))
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- main mob function
|
-- main mob function
|
||||||
function mob_class:on_step(dtime)
|
function mob_class:on_step(dtime)
|
||||||
local status, retVal = xpcall(on_step_work, on_step_error_handler, self, dtime)
|
if not DEVELOPMENT then
|
||||||
|
-- Removed as bundled Lua (5.1 doesn't support xpcall)
|
||||||
|
--local status, retVal = xpcall(on_step_work, on_step_error_handler, self, dtime)
|
||||||
|
local status, retVal = pcall(on_step_work, self, dtime)
|
||||||
if status then
|
if status then
|
||||||
return retVal
|
return retVal
|
||||||
|
else
|
||||||
|
warn_user_error ()
|
||||||
|
local pos = self.object:get_pos()
|
||||||
|
if pos then
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
if node and node.name == "ignore" then
|
||||||
|
minetest.log("warning", "Pos is ignored: " .. dump(pos))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
log_error (dump(retVal), dump(pos), dump(self))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
return on_step_work (self, dtime)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local timer = 0
|
local timer = 0
|
||||||
minetest.register_globalstep(function(dtime)
|
|
||||||
|
local function update_lifetimer(dtime)
|
||||||
timer = timer + dtime
|
timer = timer + dtime
|
||||||
if timer < 1 then return end
|
if timer < 1 then return end
|
||||||
for _, player in pairs(minetest.get_connected_players()) do
|
for _, player in pairs(minetest.get_connected_players()) do
|
||||||
local pos = player:get_pos()
|
local pos = player:get_pos()
|
||||||
for _, obj in pairs(minetest.get_objects_inside_radius(pos, 47)) do
|
for _, obj in pairs(minetest.get_objects_inside_radius(pos, LIFETIMER_DISTANCE)) do
|
||||||
local lua = obj:get_luaentity()
|
local lua = obj:get_luaentity()
|
||||||
if lua and lua.is_mob then
|
if lua and lua.is_mob then
|
||||||
lua.lifetimer = math.max(20, lua.lifetimer)
|
lua.lifetimer = math.max(20, lua.lifetimer)
|
||||||
|
@ -510,23 +525,126 @@ minetest.register_globalstep(function(dtime)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
timer = 0
|
timer = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_globalstep(function(dtime)
|
||||||
|
update_lifetimer(dtime)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
minetest.register_chatcommand("clearmobs", {
|
minetest.register_chatcommand("clearmobs", {
|
||||||
privs = { maphack = true },
|
privs = { maphack = true },
|
||||||
params = "<all>|<nametagged>|<range>",
|
params = "[all|monster|passive|<mob name> [<range>|nametagged|tamed]]",
|
||||||
description=S("Removes all spawned mobs except nametagged and tamed ones. all removes all mobs, nametagged only nametagged ones and with the range paramter all mobs in a distance of the current player are removed."),
|
description = S("Removes specified mobs except nametagged and tamed ones. For the second parameter, use nametagged/tamed to select only nametagged/tamed mobs, or a range to specify a maximum distance from the player."),
|
||||||
func=function(n,param)
|
func = function(player, param)
|
||||||
local p = minetest.get_player_by_name(n)
|
local default = false
|
||||||
local num=tonumber(param)
|
if not param or param == "" then
|
||||||
|
default = true
|
||||||
|
minetest.chat_send_player(player,
|
||||||
|
S("Default usage. Clearing hostile mobs. For more options please type: /help clearmobs"))
|
||||||
|
end
|
||||||
|
local mob, unsafe = param:match("^([%w]+)[ ]?([%w%d]*)$")
|
||||||
|
|
||||||
|
local all = false
|
||||||
|
local nametagged = false
|
||||||
|
local tamed = false
|
||||||
|
|
||||||
|
local mob_name, mob_type, range
|
||||||
|
|
||||||
|
-- Param 1 resolve
|
||||||
|
if mob and mob ~= "" then
|
||||||
|
if mob == "all" then
|
||||||
|
all = true
|
||||||
|
elseif mob == "passive" or mob == "monster" then
|
||||||
|
mob_type = mob
|
||||||
|
elseif mob then
|
||||||
|
mob_name = mob
|
||||||
|
end
|
||||||
|
--minetest.log ("mob: [" .. mob .. "]")
|
||||||
|
else
|
||||||
|
--minetest.log("No valid first param")
|
||||||
|
if default then
|
||||||
|
--minetest.log("Use default")
|
||||||
|
mob_type = "monster"
|
||||||
|
end
|
||||||
|
--return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Param 2 resolve
|
||||||
|
if unsafe and unsafe ~= "" then
|
||||||
|
--minetest.log ("unsafe: [" .. unsafe .. "]")
|
||||||
|
if unsafe == "nametagged" then
|
||||||
|
nametagged = true
|
||||||
|
elseif unsafe == "tamed" then
|
||||||
|
tamed = true
|
||||||
|
end
|
||||||
|
|
||||||
|
local num = tonumber(unsafe)
|
||||||
|
if num then range = num end
|
||||||
|
end
|
||||||
|
|
||||||
|
local p = minetest.get_player_by_name(player)
|
||||||
|
|
||||||
for _,o in pairs(minetest.luaentities) do
|
for _,o in pairs(minetest.luaentities) do
|
||||||
if o.is_mob then
|
if o and o.is_mob then
|
||||||
if param == "all" or
|
local mob_match = false
|
||||||
( param == "nametagged" and o.nametag ) or
|
|
||||||
( param == "" and ( not o.nametag or o.nametag == "" ) and not o.tamed ) or
|
if all then
|
||||||
( num and num > 0 and vector.distance(p:get_pos(),o.object:get_pos()) <= num ) then
|
--minetest.log("Match - All mobs specified")
|
||||||
|
mob_match = true
|
||||||
|
elseif mob_type then
|
||||||
|
|
||||||
|
--minetest.log("Match - o.type: ".. tostring(o.type))
|
||||||
|
--minetest.log("mob_type: ".. tostring(mob_type))
|
||||||
|
if mob_type == "monster" and o.type == mob_type then
|
||||||
|
--minetest.log("Match - monster")
|
||||||
|
mob_match = true
|
||||||
|
elseif mob_type == "passive" and o.type ~= "monster" and o.type ~= "npc" then
|
||||||
|
--minetest.log("Match - passive")
|
||||||
|
mob_match = true
|
||||||
|
else
|
||||||
|
--minetest.log("No match for type.")
|
||||||
|
end
|
||||||
|
|
||||||
|
elseif mob_name and (o.name == mob_name or string.find(o.name, mob_name)) then
|
||||||
|
--minetest.log("Match - mob_name = ".. tostring(o.name))
|
||||||
|
mob_match = true
|
||||||
|
else
|
||||||
|
--minetest.log("No match - o.type = ".. tostring(o.type))
|
||||||
|
--minetest.log("No match - mob_name = ".. tostring(o.name))
|
||||||
|
--minetest.log("No match - mob_type = ".. tostring(mob_name))
|
||||||
|
end
|
||||||
|
|
||||||
|
if mob_match then
|
||||||
|
local in_range = true
|
||||||
|
if (not range or range <= 0 ) then
|
||||||
|
in_range = true
|
||||||
|
else
|
||||||
|
if ( vector.distance(p:get_pos(),o.object:get_pos()) <= range ) then
|
||||||
|
in_range = true
|
||||||
|
else
|
||||||
|
--minetest.log("Out of range")
|
||||||
|
in_range = false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--minetest.log("o.nametag: ".. tostring(o.nametag))
|
||||||
|
|
||||||
|
if nametagged then
|
||||||
|
if o.nametag then
|
||||||
|
--minetest.log("Namedtagged and it has a name tag. Kill it")
|
||||||
|
o.object:remove()
|
||||||
|
end
|
||||||
|
elseif tamed then
|
||||||
|
if o.tamed then
|
||||||
|
--minetest.log("Tamed. Kill it")
|
||||||
|
o.object:remove()
|
||||||
|
end
|
||||||
|
elseif in_range and (not o.nametag or o.nametag == "") and not o.tamed then
|
||||||
|
--minetest.log("No nametag or tamed. Kill it")
|
||||||
o.object:remove()
|
o.object:remove()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end})
|
end})
|
||||||
|
|
|
@ -262,6 +262,7 @@ functions needed for the mob to work properly which contains the following:
|
||||||
'custom_visual_size' will not reset visual_size from the base class on reload
|
'custom_visual_size' will not reset visual_size from the base class on reload
|
||||||
'noyaw' If true this mob will not automatically change yaw
|
'noyaw' If true this mob will not automatically change yaw
|
||||||
'particlespawners' Table of particlespawners attached to the mob. This is implemented in a coord safe manner i.e. spawners are only sent to players within the player_transfer_distance (and automatically removed). This enables infinitely lived particlespawners.
|
'particlespawners' Table of particlespawners attached to the mob. This is implemented in a coord safe manner i.e. spawners are only sent to players within the player_transfer_distance (and automatically removed). This enables infinitely lived particlespawners.
|
||||||
|
'attack_frequency' Attack frequency in seconds. If unset, this defaults to 1. Implemented for melee only atm.
|
||||||
|
|
||||||
mobs:gopath(self,target,callback_arrived) pathfind a way to target and run callback on arrival
|
mobs:gopath(self,target,callback_arrived) pathfind a way to target and run callback on arrival
|
||||||
|
|
||||||
|
|
|
@ -74,6 +74,7 @@ function mob_class:feed_tame(clicker, feed_count, breed, tame, notake)
|
||||||
if self.food >= feed_count then
|
if self.food >= feed_count then
|
||||||
self.food = 0
|
self.food = 0
|
||||||
self.horny = true
|
self.horny = true
|
||||||
|
self.persistent = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,8 @@ local stuck_path_timeout = 10 -- how long will mob follow path before giving up
|
||||||
|
|
||||||
local enable_pathfinding = true
|
local enable_pathfinding = true
|
||||||
|
|
||||||
|
local TIME_TO_FORGET_TARGET = 15
|
||||||
|
|
||||||
local atann = math.atan
|
local atann = math.atan
|
||||||
local function atan(x)
|
local function atan(x)
|
||||||
if not x or x ~= x then
|
if not x or x ~= x then
|
||||||
|
@ -19,6 +21,8 @@ local function atan(x)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
mcl_mobs.effect_functions = {}
|
||||||
|
|
||||||
|
|
||||||
-- check if daytime and also if mob is docile during daylight hours
|
-- check if daytime and also if mob is docile during daylight hours
|
||||||
function mob_class:day_docile()
|
function mob_class:day_docile()
|
||||||
|
@ -329,10 +333,7 @@ end
|
||||||
|
|
||||||
-- find someone to attack
|
-- find someone to attack
|
||||||
function mob_class:monster_attack()
|
function mob_class:monster_attack()
|
||||||
if not damage_enabled
|
if not damage_enabled or self.passive ~= false or self.state == "attack" or self:day_docile() then
|
||||||
or self.passive ~= false
|
|
||||||
or self.state == "attack"
|
|
||||||
or self:day_docile() then
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -341,9 +342,11 @@ function mob_class:monster_attack()
|
||||||
local player, obj, min_player
|
local player, obj, min_player
|
||||||
local type, name = "", ""
|
local type, name = "", ""
|
||||||
local min_dist = self.view_range + 1
|
local min_dist = self.view_range + 1
|
||||||
local objs = minetest.get_objects_inside_radius(s, self.view_range)
|
|
||||||
local blacklist_attack = {}
|
local blacklist_attack = {}
|
||||||
|
|
||||||
|
local objs = minetest.get_objects_inside_radius(s, self.view_range)
|
||||||
|
|
||||||
for n = 1, #objs do
|
for n = 1, #objs do
|
||||||
if not objs[n]:is_player() then
|
if not objs[n]:is_player() then
|
||||||
obj = objs[n]:get_luaentity()
|
obj = objs[n]:get_luaentity()
|
||||||
|
@ -359,32 +362,30 @@ function mob_class:monster_attack()
|
||||||
end
|
end
|
||||||
|
|
||||||
for n = 1, #objs do
|
for n = 1, #objs do
|
||||||
|
|
||||||
|
|
||||||
if objs[n]:is_player() then
|
if objs[n]:is_player() then
|
||||||
if mcl_mobs.invis[ objs[n]:get_player_name() ] or (not self:object_in_range(objs[n])) then
|
if mcl_mobs.invis[ objs[n]:get_player_name() ] or (not self:object_in_range(objs[n])) then
|
||||||
type = ""
|
type = ""
|
||||||
elseif (self.type == "monster" or self._aggro) then
|
elseif (self.type == "monster" or self._aggro) then
|
||||||
|
-- self.aggro made player be attacked by npc again if out of range then back in again
|
||||||
|
-- Does it serve a purpose other than that?
|
||||||
player = objs[n]
|
player = objs[n]
|
||||||
type = "player"
|
type = "player"
|
||||||
name = "player"
|
name = "player"
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
obj = objs[n]:get_luaentity()
|
obj = objs[n]:get_luaentity()
|
||||||
|
|
||||||
if obj then
|
if obj then
|
||||||
player = obj.object
|
player = obj.object
|
||||||
type = obj.type
|
type = obj.type
|
||||||
name = obj.name or ""
|
name = obj.name or ""
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- find specific mob to attack, failing that attack player/npc/animal
|
-- find specific mob to attack, failing that attack player/npc/animal
|
||||||
if specific_attack(self.specific_attack, name)
|
if specific_attack(self.specific_attack, name)
|
||||||
and (type == "player" or ( type == "npc" and self.attack_npcs )
|
and (type == "player" or ( type == "npc" and self.attack_npcs )
|
||||||
or (type == "animal" and self.attack_animals == true)) then
|
or (type == "animal" and self.attack_animals == true)
|
||||||
|
or (self.extra_hostile and not self.attack_exception(player))) then
|
||||||
p = player:get_pos()
|
p = player:get_pos()
|
||||||
sp = s
|
sp = s
|
||||||
|
|
||||||
|
@ -400,10 +401,10 @@ function mob_class:monster_attack()
|
||||||
attacked_p = true
|
attacked_p = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- choose closest player to attack
|
-- choose closest player to attack
|
||||||
if dist < min_dist
|
local line_of_sight = self:line_of_sight( sp, p, 2) == true
|
||||||
and not attacked_p
|
if dist < min_dist and not attacked_p and line_of_sight then
|
||||||
and self:line_of_sight( sp, p, 2) == true then
|
|
||||||
min_dist = dist
|
min_dist = dist
|
||||||
min_player = player
|
min_player = player
|
||||||
end
|
end
|
||||||
|
@ -434,11 +435,9 @@ function mob_class:npc_attack()
|
||||||
local objs = minetest.get_objects_inside_radius(s, self.view_range)
|
local objs = minetest.get_objects_inside_radius(s, self.view_range)
|
||||||
|
|
||||||
for n = 1, #objs do
|
for n = 1, #objs do
|
||||||
|
|
||||||
obj = objs[n]:get_luaentity()
|
obj = objs[n]:get_luaentity()
|
||||||
|
|
||||||
if obj and obj.type == "monster" then
|
if obj and obj.type == "monster" then
|
||||||
|
|
||||||
p = obj.object:get_pos()
|
p = obj.object:get_pos()
|
||||||
sp = s
|
sp = s
|
||||||
|
|
||||||
|
@ -448,8 +447,7 @@ function mob_class:npc_attack()
|
||||||
p.y = p.y + 1
|
p.y = p.y + 1
|
||||||
sp.y = sp.y + 1
|
sp.y = sp.y + 1
|
||||||
|
|
||||||
if dist < min_dist
|
if dist < min_dist and self:line_of_sight( sp, p, 2) == true then
|
||||||
and self:line_of_sight( sp, p, 2) == true then
|
|
||||||
min_dist = dist
|
min_dist = dist
|
||||||
min_player = obj.object
|
min_player = obj.object
|
||||||
end
|
end
|
||||||
|
@ -796,23 +794,57 @@ end
|
||||||
|
|
||||||
function mob_class:check_aggro(dtime)
|
function mob_class:check_aggro(dtime)
|
||||||
if not self._aggro or not self.attack then return end
|
if not self._aggro or not self.attack then return end
|
||||||
if not self._check_aggro_timer or self._check_aggro_timer > 5 then
|
|
||||||
|
if not self._check_aggro_timer then
|
||||||
self._check_aggro_timer = 0
|
self._check_aggro_timer = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
if self._check_aggro_timer > 5 then
|
||||||
|
self._check_aggro_timer = 0
|
||||||
|
|
||||||
|
if self.attack then
|
||||||
|
-- TODO consider removing this in favour of what is done in do_states_attack
|
||||||
|
-- Attack is dropped in do_states_attack if out of range, so won't even trigger here
|
||||||
|
-- I do not think this code does anything. Are mobs still loaded in at 128?
|
||||||
if not self.attack:get_pos() or vector.distance(self.attack:get_pos(),self.object:get_pos()) > 128 then
|
if not self.attack:get_pos() or vector.distance(self.attack:get_pos(),self.object:get_pos()) > 128 then
|
||||||
self._aggro = nil
|
self._aggro = nil
|
||||||
self.attack = nil
|
self.attack = nil
|
||||||
self.state = "stand"
|
self.state = "stand"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
self._check_aggro_timer = self._check_aggro_timer + dtime
|
self._check_aggro_timer = self._check_aggro_timer + dtime
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
local function clear_aggro(self)
|
||||||
|
self.state = "stand"
|
||||||
|
self:set_velocity( 0)
|
||||||
|
self:set_animation( "stand")
|
||||||
|
|
||||||
|
self.attack = nil
|
||||||
|
self._aggro = nil
|
||||||
|
|
||||||
|
self.v_start = false
|
||||||
|
self.timer = 0
|
||||||
|
self.blinktimer = 0
|
||||||
|
self.path.way = nil
|
||||||
|
end
|
||||||
|
|
||||||
function mob_class:do_states_attack (dtime)
|
function mob_class:do_states_attack (dtime)
|
||||||
local yaw = self.object:get_yaw() or 0
|
self.timer = self.timer + dtime
|
||||||
|
if self.timer > 100 then
|
||||||
|
self.timer = 1
|
||||||
|
end
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
|
if not s then return end
|
||||||
|
|
||||||
local p = self.attack:get_pos() or s
|
local p = self.attack:get_pos() or s
|
||||||
|
|
||||||
|
local yaw = self.object:get_yaw() or 0
|
||||||
|
|
||||||
-- stop attacking if player invisible or out of range
|
-- stop attacking if player invisible or out of range
|
||||||
if not self.attack
|
if not self.attack
|
||||||
or not self.attack:get_pos()
|
or not self.attack:get_pos()
|
||||||
|
@ -820,53 +852,53 @@ function mob_class:do_states_attack (dtime)
|
||||||
or self.attack:get_hp() <= 0
|
or self.attack:get_hp() <= 0
|
||||||
or (self.attack:is_player() and mcl_mobs.invis[ self.attack:get_player_name() ]) then
|
or (self.attack:is_player() and mcl_mobs.invis[ self.attack:get_player_name() ]) then
|
||||||
|
|
||||||
self.state = "stand"
|
clear_aggro(self)
|
||||||
self:set_velocity( 0)
|
|
||||||
self:set_animation( "stand")
|
|
||||||
self.attack = nil
|
|
||||||
self.v_start = false
|
|
||||||
self.timer = 0
|
|
||||||
self.blinktimer = 0
|
|
||||||
self.path.way = nil
|
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local target_line_of_sight = self:target_visible(s)
|
||||||
|
|
||||||
|
if not target_line_of_sight then
|
||||||
|
if self.target_time_lost then
|
||||||
|
local time_since_seen = os.time() - self.target_time_lost
|
||||||
|
if time_since_seen > TIME_TO_FORGET_TARGET then
|
||||||
|
self.target_time_lost = nil
|
||||||
|
clear_aggro(self)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self.target_time_lost = os.time()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
self.target_time_lost = nil
|
||||||
|
end
|
||||||
|
|
||||||
-- calculate distance from mob and enemy
|
-- calculate distance from mob and enemy
|
||||||
local dist = vector.distance(p, s)
|
local dist = vector.distance(p, s)
|
||||||
|
|
||||||
if self.attack_type == "explode" then
|
if self.attack_type == "explode" then
|
||||||
|
|
||||||
local vec = {
|
if target_line_of_sight then
|
||||||
x = p.x - s.x,
|
local vec = { x = p.x - s.x, z = p.z - s.z }
|
||||||
z = p.z - s.z
|
|
||||||
}
|
|
||||||
|
|
||||||
yaw = (atan(vec.z / vec.x) +math.pi/ 2) - self.rotate
|
yaw = (atan(vec.z / vec.x) +math.pi/ 2) - self.rotate
|
||||||
|
|
||||||
if p.x > s.x then yaw = yaw +math.pi end
|
if p.x > s.x then yaw = yaw +math.pi end
|
||||||
|
|
||||||
yaw = self:set_yaw( yaw, 0, dtime)
|
yaw = self:set_yaw( yaw, 0, dtime)
|
||||||
|
end
|
||||||
|
|
||||||
local node_break_radius = self.explosion_radius or 1
|
local node_break_radius = self.explosion_radius or 1
|
||||||
local entity_damage_radius = self.explosion_damage_radius
|
local entity_damage_radius = self.explosion_damage_radius
|
||||||
or (node_break_radius * 2)
|
or (node_break_radius * 2)
|
||||||
|
|
||||||
-- start timer when in reach and line of sight
|
-- start timer when in reach and line of sight
|
||||||
if not self.v_start
|
if not self.v_start and dist <= self.reach and target_line_of_sight then
|
||||||
and dist <= self.reach
|
|
||||||
and self:line_of_sight( s, p, 2) then
|
|
||||||
|
|
||||||
self.v_start = true
|
self.v_start = true
|
||||||
self.timer = 0
|
self.timer = 0
|
||||||
self.blinktimer = 0
|
self.blinktimer = 0
|
||||||
self:mob_sound("fuse", nil, false)
|
self:mob_sound("fuse", nil, false)
|
||||||
|
|
||||||
-- stop timer if out of reach or direct line of sight
|
-- stop timer if out of reach or direct line of sight
|
||||||
elseif self.allow_fuse_reset
|
elseif self.allow_fuse_reset and self.v_start
|
||||||
and self.v_start
|
and (dist >= self.explosiontimer_reset_radius or not target_line_of_sight) then
|
||||||
and (dist >= self.explosiontimer_reset_radius
|
|
||||||
or not self:line_of_sight( s, p, 2)) then
|
|
||||||
self.v_start = false
|
self.v_start = false
|
||||||
self.timer = 0
|
self.timer = 0
|
||||||
self.blinktimer = 0
|
self.blinktimer = 0
|
||||||
|
@ -875,7 +907,7 @@ function mob_class:do_states_attack (dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- walk right up to player unless the timer is active
|
-- walk right up to player unless the timer is active
|
||||||
if self.v_start and (self.stop_to_explode or dist < self.reach) then
|
if self.v_start and (self.stop_to_explode or dist < self.reach) or not target_line_of_sight then
|
||||||
self:set_velocity(0)
|
self:set_velocity(0)
|
||||||
else
|
else
|
||||||
self:set_velocity(self.run_velocity)
|
self:set_velocity(self.run_velocity)
|
||||||
|
@ -888,25 +920,20 @@ function mob_class:do_states_attack (dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.v_start then
|
if self.v_start then
|
||||||
|
|
||||||
self.timer = self.timer + dtime
|
self.timer = self.timer + dtime
|
||||||
self.blinktimer = (self.blinktimer or 0) + dtime
|
self.blinktimer = (self.blinktimer or 0) + dtime
|
||||||
|
|
||||||
if self.blinktimer > 0.2 then
|
if self.blinktimer > 0.2 then
|
||||||
|
|
||||||
self.blinktimer = 0
|
self.blinktimer = 0
|
||||||
|
|
||||||
if self.blinkstatus then
|
if self.blinkstatus then
|
||||||
self:remove_texture_mod("^[brighten")
|
self:remove_texture_mod("^[brighten")
|
||||||
else
|
else
|
||||||
self:add_texture_mod("^[brighten")
|
self:add_texture_mod("^[brighten")
|
||||||
end
|
end
|
||||||
|
|
||||||
self.blinkstatus = not self.blinkstatus
|
self.blinkstatus = not self.blinkstatus
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.timer > self.explosion_timer then
|
if self.timer > self.explosion_timer then
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
if mobs_griefing and not minetest.is_protected(pos, "") then
|
if mobs_griefing and not minetest.is_protected(pos, "") then
|
||||||
|
@ -1020,51 +1047,42 @@ function mob_class:do_states_attack (dtime)
|
||||||
|
|
||||||
-- move towards enemy if beyond mob reach
|
-- move towards enemy if beyond mob reach
|
||||||
if dist > self.reach then
|
if dist > self.reach then
|
||||||
|
|
||||||
-- path finding by rnd
|
-- path finding by rnd
|
||||||
if self.pathfinding -- only if mob has pathfinding enabled
|
if enable_pathfinding and self.pathfinding then
|
||||||
and enable_pathfinding then
|
|
||||||
|
|
||||||
self:smart_mobs(s, p, dist, dtime)
|
self:smart_mobs(s, p, dist, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:is_at_cliff_or_danger() then
|
if self:is_at_cliff_or_danger() then
|
||||||
|
|
||||||
self:set_velocity( 0)
|
self:set_velocity( 0)
|
||||||
self:set_animation( "stand")
|
self:set_animation( "stand")
|
||||||
local yaw = self.object:get_yaw() or 0
|
local yaw = self.object:get_yaw() or 0
|
||||||
yaw = self:set_yaw( yaw + 0.78, 8)
|
yaw = self:set_yaw( yaw + 0.78, 8)
|
||||||
else
|
else
|
||||||
|
|
||||||
if self.path.stuck then
|
if self.path.stuck then
|
||||||
self:set_velocity(self.walk_velocity)
|
self:set_velocity(self.walk_velocity)
|
||||||
else
|
else
|
||||||
self:set_velocity(self.run_velocity)
|
self:set_velocity(self.run_velocity)
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.animation and self.animation.run_start then
|
if self.animation and self.animation.run_start then
|
||||||
self:set_animation("run")
|
self:set_animation("run")
|
||||||
else
|
else
|
||||||
self:set_animation("walk")
|
self:set_animation("walk")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
else -- rnd: if inside reach range
|
else -- rnd: if inside reach range
|
||||||
|
|
||||||
self.path.stuck = false
|
self.path.stuck = false
|
||||||
self.path.stuck_timer = 0
|
self.path.stuck_timer = 0
|
||||||
self.path.following = false -- not stuck anymore
|
self.path.following = false -- not stuck anymore
|
||||||
|
|
||||||
self:set_velocity( 0)
|
self:set_velocity( 0)
|
||||||
|
|
||||||
if not self.custom_attack then
|
local attack_frequency = self.attack_frequency or 1
|
||||||
|
|
||||||
if self.timer > 1 then
|
|
||||||
|
|
||||||
|
if self.timer > attack_frequency then
|
||||||
self.timer = 0
|
self.timer = 0
|
||||||
|
|
||||||
if self.double_melee_attack
|
if not self.custom_attack then
|
||||||
and math.random(1, 2) == 1 then
|
if self.double_melee_attack and math.random(1, 2) == 1 then
|
||||||
self:set_animation("punch2")
|
self:set_animation("punch2")
|
||||||
else
|
else
|
||||||
self:set_animation("punch")
|
self:set_animation("punch")
|
||||||
|
@ -1077,8 +1095,6 @@ function mob_class:do_states_attack (dtime)
|
||||||
s2.y = s2.y + .5
|
s2.y = s2.y + .5
|
||||||
|
|
||||||
if self:line_of_sight( p2, s2) == true then
|
if self:line_of_sight( p2, s2) == true then
|
||||||
|
|
||||||
-- play attack sound
|
|
||||||
self:mob_sound("attack")
|
self:mob_sound("attack")
|
||||||
|
|
||||||
-- punch player (or what player is attached to)
|
-- punch player (or what player is attached to)
|
||||||
|
@ -1090,14 +1106,13 @@ function mob_class:do_states_attack (dtime)
|
||||||
full_punch_interval = 1.0,
|
full_punch_interval = 1.0,
|
||||||
damage_groups = {fleshy = self.damage}
|
damage_groups = {fleshy = self.damage}
|
||||||
}, nil)
|
}, nil)
|
||||||
|
if self.dealt_effect then
|
||||||
|
mcl_mobs.effect_functions[self.dealt_effect.name](
|
||||||
|
self.attack, self.dealt_effect.factor, self.dealt_effect.dur
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else -- call custom attack every second
|
else
|
||||||
if self.custom_attack
|
|
||||||
and self.timer > 1 then
|
|
||||||
|
|
||||||
self.timer = 0
|
|
||||||
|
|
||||||
self.custom_attack(self, p)
|
self.custom_attack(self, p)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -1123,7 +1138,7 @@ function mob_class:do_states_attack (dtime)
|
||||||
|
|
||||||
yaw = self:set_yaw( yaw, 0, dtime)
|
yaw = self:set_yaw( yaw, 0, dtime)
|
||||||
|
|
||||||
local stay_away_from_player = vector.new(0,0,0)
|
local stay_away_from_player = vector.zero()
|
||||||
|
|
||||||
--strafe back and fourth
|
--strafe back and fourth
|
||||||
|
|
||||||
|
@ -1140,7 +1155,13 @@ function mob_class:do_states_attack (dtime)
|
||||||
if math.random(40) == 1 then
|
if math.random(40) == 1 then
|
||||||
self.strafe_direction = self.strafe_direction*-1
|
self.strafe_direction = self.strafe_direction*-1
|
||||||
end
|
end
|
||||||
self.acc = vector.add(vector.multiply(vector.rotate_around_axis(vector.direction(s, p), vector.new(0,1,0), self.strafe_direction), 0.3*self.walk_velocity), stay_away_from_player)
|
|
||||||
|
local dir = vector.rotate_around_axis(vector.direction(s, p), vector.new(0,1,0), self.strafe_direction)
|
||||||
|
local dir2 = vector.multiply(dir, 0.3 * self.walk_velocity)
|
||||||
|
|
||||||
|
if dir2 and stay_away_from_player then
|
||||||
|
self.acc = vector.add(dir2, stay_away_from_player)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
self:set_velocity( 0)
|
self:set_velocity( 0)
|
||||||
end
|
end
|
||||||
|
@ -1196,6 +1217,9 @@ function mob_class:do_states_attack (dtime)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
elseif self.attack_type == "custom" and self.attack_state then
|
||||||
|
self.attack_state(self, dtime)
|
||||||
else
|
else
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,22 +1,16 @@
|
||||||
local math, tonumber, vector, minetest, mcl_mobs = math, tonumber, vector, minetest, mcl_mobs
|
local math, tonumber, vector, minetest, mcl_mobs = math, tonumber, vector, minetest, mcl_mobs
|
||||||
local mob_class = mcl_mobs.mob_class
|
local mob_class = mcl_mobs.mob_class
|
||||||
|
local validate_vector = mcl_util.validate_vector
|
||||||
|
|
||||||
local active_particlespawners = {}
|
local active_particlespawners = {}
|
||||||
local disable_blood = minetest.settings:get_bool("mobs_disable_blood")
|
local disable_blood = minetest.settings:get_bool("mobs_disable_blood")
|
||||||
local DEFAULT_FALL_SPEED = -9.81*1.5
|
local DEFAULT_FALL_SPEED = -9.81*1.5
|
||||||
|
|
||||||
|
local PATHFINDING = "gowp"
|
||||||
|
|
||||||
local player_transfer_distance = tonumber(minetest.settings:get("player_transfer_distance")) or 128
|
local player_transfer_distance = tonumber(minetest.settings:get("player_transfer_distance")) or 128
|
||||||
if player_transfer_distance == 0 then player_transfer_distance = math.huge end
|
if player_transfer_distance == 0 then player_transfer_distance = math.huge end
|
||||||
|
|
||||||
|
|
||||||
local function validate_vector (vect)
|
|
||||||
if vect then
|
|
||||||
if tonumber(vect.x) and tonumber(vect.y) and tonumber(vect.z) then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
-- custom particle effects
|
-- custom particle effects
|
||||||
function mcl_mobs.effect(pos, amount, texture, min_size, max_size, radius, gravity, glow, go_down)
|
function mcl_mobs.effect(pos, amount, texture, min_size, max_size, radius, gravity, glow, go_down)
|
||||||
|
|
||||||
|
@ -136,6 +130,19 @@ function mob_class:mob_sound(soundname, is_opinion, fixed_pitch)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function mob_class:step_opinion_sound(dtime)
|
||||||
|
if self.state ~= "attack" and self.state ~= PATHFINDING then
|
||||||
|
|
||||||
|
if self.opinion_sound_cooloff > 0 then
|
||||||
|
self.opinion_sound_cooloff = self.opinion_sound_cooloff - dtime
|
||||||
|
end
|
||||||
|
-- mob plays random sound at times. Should be 120. Zombie and mob farms are ridiculous
|
||||||
|
if math.random(1, 70) == 1 then
|
||||||
|
self:mob_sound("random", true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function mob_class:add_texture_mod(mod)
|
function mob_class:add_texture_mod(mod)
|
||||||
local full_mod = ""
|
local full_mod = ""
|
||||||
local already_added = false
|
local already_added = false
|
||||||
|
@ -254,7 +261,7 @@ function mob_class:set_animation(anim, fixed_frame)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if self:flight_check() and self.fly and anim == "walk" then anim = "fly" end
|
if self.fly and self:flight_check() and anim == "walk" then anim = "fly" end
|
||||||
|
|
||||||
self._current_animation = self._current_animation or ""
|
self._current_animation = self._current_animation or ""
|
||||||
|
|
||||||
|
@ -293,7 +300,7 @@ local function dir_to_pitch(dir)
|
||||||
return -math.atan2(-dir.y, xz)
|
return -math.atan2(-dir.y, xz)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function who_are_you_looking_at (self)
|
local function who_are_you_looking_at (self, dtime)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
local stop_look_at_player_chance = math.random(833/self.curiosity)
|
local stop_look_at_player_chance = math.random(833/self.curiosity)
|
||||||
|
@ -301,20 +308,26 @@ local function who_are_you_looking_at (self)
|
||||||
|
|
||||||
local stop_look_at_player = stop_look_at_player_chance == 1
|
local stop_look_at_player = stop_look_at_player_chance == 1
|
||||||
|
|
||||||
if self.attack or self.following then
|
if self.attack then
|
||||||
self._locked_object = self.attack or self.following
|
if not self.target_time_lost then
|
||||||
|
self._locked_object = self.attack
|
||||||
|
else
|
||||||
|
self._locked_object = nil
|
||||||
|
end
|
||||||
|
elseif self.following then
|
||||||
|
self._locked_object = self.following
|
||||||
elseif self._locked_object then
|
elseif self._locked_object then
|
||||||
if stop_look_at_player then
|
if stop_look_at_player then
|
||||||
--minetest.log("Stop look: ".. self.name)
|
--minetest.log("Stop look: ".. self.name)
|
||||||
self._locked_object = nil
|
self._locked_object = nil
|
||||||
end
|
end
|
||||||
elseif not self._locked_object then
|
elseif not self._locked_object then
|
||||||
if math.random(1, 30) then
|
if mcl_util.check_dtime_timer(self, dtime, "step_look_for_someone", 0.2) then
|
||||||
--minetest.log("Change look check: ".. self.name)
|
--minetest.log("Change look check: ".. self.name)
|
||||||
|
|
||||||
-- For the wither this was 20/60=0.33, so probably need to rebalance and divide rates.
|
-- For the wither this was 20/60=0.33, so probably need to rebalance and divide rates.
|
||||||
-- but frequency of check isn't good as it is costly. Making others too infrequent requires testing
|
-- but frequency of check isn't good as it is costly. Making others too infrequent requires testing
|
||||||
local chance = 20/self.curiosity
|
local chance = 150/self.curiosity
|
||||||
|
|
||||||
if chance < 1 then chance = 1 end
|
if chance < 1 then chance = 1 end
|
||||||
local look_at_player_chance = math.random(chance)
|
local look_at_player_chance = math.random(chance)
|
||||||
|
@ -346,9 +359,9 @@ function mob_class:check_head_swivel(dtime)
|
||||||
if not self.head_swivel or type(self.head_swivel) ~= "string" then return end
|
if not self.head_swivel or type(self.head_swivel) ~= "string" then return end
|
||||||
|
|
||||||
|
|
||||||
who_are_you_looking_at (self)
|
who_are_you_looking_at (self, dtime)
|
||||||
|
|
||||||
local final_rotation = vector.new(0,0,0)
|
local final_rotation = vector.zero()
|
||||||
local oldp,oldr = self.object:get_bone_position(self.head_swivel)
|
local oldp,oldr = self.object:get_bone_position(self.head_swivel)
|
||||||
|
|
||||||
if self._locked_object and (self._locked_object:is_player() or self._locked_object:get_luaentity()) and self._locked_object:get_hp() > 0 then
|
if self._locked_object and (self._locked_object:is_player() or self._locked_object:get_luaentity()) and self._locked_object:get_hp() > 0 then
|
||||||
|
@ -360,8 +373,11 @@ function mob_class:check_head_swivel(dtime)
|
||||||
_locked_object_eye_height = self._locked_object:get_properties().eye_height
|
_locked_object_eye_height = self._locked_object:get_properties().eye_height
|
||||||
end
|
end
|
||||||
if _locked_object_eye_height then
|
if _locked_object_eye_height then
|
||||||
|
|
||||||
local self_rot = self.object:get_rotation()
|
local self_rot = self.object:get_rotation()
|
||||||
if self.object:get_attach() then
|
-- If a mob is attached, should we really be messing with what they are looking at?
|
||||||
|
-- Should this be excluded?
|
||||||
|
if self.object:get_attach() and self.object:get_attach():get_rotation() then
|
||||||
self_rot = self.object:get_attach():get_rotation()
|
self_rot = self.object:get_attach():get_rotation()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -394,7 +410,7 @@ function mob_class:check_head_swivel(dtime)
|
||||||
--final_rotation = vector.new(0,0,0)
|
--final_rotation = vector.new(0,0,0)
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_util.set_bone_position(self.object,self.head_swivel, vector.new(0,self.bone_eye_height,self.horrizonatal_head_height), final_rotation)
|
mcl_util.set_bone_position(self.object,self.head_swivel, vector.new(0,self.bone_eye_height,self.horizontal_head_height), final_rotation)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -147,13 +147,14 @@ function mcl_mobs.register_mob(name, def)
|
||||||
head_eye_height = def.head_eye_height or def.bone_eye_height or 0, -- how hight aproximatly the mobs head is fromm the ground to tell the mob how high to look up at the player
|
head_eye_height = def.head_eye_height or def.bone_eye_height or 0, -- how hight aproximatly the mobs head is fromm the ground to tell the mob how high to look up at the player
|
||||||
curiosity = def.curiosity or 1, -- how often mob will look at player on idle
|
curiosity = def.curiosity or 1, -- how often mob will look at player on idle
|
||||||
head_yaw = def.head_yaw or "y", -- axis to rotate head on
|
head_yaw = def.head_yaw or "y", -- axis to rotate head on
|
||||||
horrizonatal_head_height = def.horrizonatal_head_height or 0,
|
horizontal_head_height = def.horizontal_head_height or 0,
|
||||||
wears_armor = def.wears_armor, -- a number value used to index texture slot for armor
|
wears_armor = def.wears_armor, -- a number value used to index texture slot for armor
|
||||||
stepheight = def.stepheight or 0.6,
|
stepheight = def.stepheight or 0.6,
|
||||||
name = name,
|
name = name,
|
||||||
description = def.description,
|
description = def.description,
|
||||||
type = def.type,
|
type = def.type,
|
||||||
attack_type = def.attack_type,
|
attack_type = def.attack_type,
|
||||||
|
attack_frequency = def.attack_frequency,
|
||||||
fly = def.fly or false,
|
fly = def.fly or false,
|
||||||
fly_in = def.fly_in or {"air", "__airlike"},
|
fly_in = def.fly_in or {"air", "__airlike"},
|
||||||
owner = def.owner or "",
|
owner = def.owner or "",
|
||||||
|
@ -216,6 +217,7 @@ function mcl_mobs.register_mob(name, def)
|
||||||
replace_with = def.replace_with,
|
replace_with = def.replace_with,
|
||||||
replace_offset = def.replace_offset or 0,
|
replace_offset = def.replace_offset or 0,
|
||||||
on_replace = def.on_replace,
|
on_replace = def.on_replace,
|
||||||
|
replace_delay = def.replace_delay or 0,
|
||||||
timer = 0,
|
timer = 0,
|
||||||
env_damage_timer = 0,
|
env_damage_timer = 0,
|
||||||
tamed = false,
|
tamed = false,
|
||||||
|
@ -285,6 +287,7 @@ function mcl_mobs.register_mob(name, def)
|
||||||
spawn_in_group_min = def.spawn_in_group_min,
|
spawn_in_group_min = def.spawn_in_group_min,
|
||||||
noyaw = def.noyaw or false,
|
noyaw = def.noyaw or false,
|
||||||
particlespawners = def.particlespawners,
|
particlespawners = def.particlespawners,
|
||||||
|
spawn_check = def.spawn_check,
|
||||||
-- End of MCL2 extensions
|
-- End of MCL2 extensions
|
||||||
on_spawn = def.on_spawn,
|
on_spawn = def.on_spawn,
|
||||||
on_blast = def.on_blast or function(self,damage)
|
on_blast = def.on_blast or function(self,damage)
|
||||||
|
@ -295,6 +298,7 @@ function mcl_mobs.register_mob(name, def)
|
||||||
return false, true, {}
|
return false, true, {}
|
||||||
end,
|
end,
|
||||||
do_punch = def.do_punch,
|
do_punch = def.do_punch,
|
||||||
|
deal_damage = def.deal_damage,
|
||||||
on_breed = def.on_breed,
|
on_breed = def.on_breed,
|
||||||
on_grown = def.on_grown,
|
on_grown = def.on_grown,
|
||||||
on_pick_up = def.on_pick_up,
|
on_pick_up = def.on_pick_up,
|
||||||
|
@ -309,8 +313,15 @@ function mcl_mobs.register_mob(name, def)
|
||||||
|
|
||||||
return self:mob_activate(staticdata, def, dtime)
|
return self:mob_activate(staticdata, def, dtime)
|
||||||
end,
|
end,
|
||||||
|
attack_state = def.attack_state,
|
||||||
harmed_by_heal = def.harmed_by_heal,
|
harmed_by_heal = def.harmed_by_heal,
|
||||||
on_lightning_strike = def.on_lightning_strike
|
is_boss = def.is_boss,
|
||||||
|
dealt_effect = def.dealt_effect,
|
||||||
|
on_lightning_strike = def.on_lightning_strike,
|
||||||
|
extra_hostile = def.extra_hostile,
|
||||||
|
attack_exception = def.attack_exception or function(p) return false end,
|
||||||
|
|
||||||
|
_spawner = def._spawner,
|
||||||
}
|
}
|
||||||
minetest.register_entity(name, setmetatable(final_def,mcl_mobs.mob_class_meta))
|
minetest.register_entity(name, setmetatable(final_def,mcl_mobs.mob_class_meta))
|
||||||
|
|
||||||
|
@ -341,9 +352,10 @@ function mcl_mobs.register_arrow(name, def)
|
||||||
collisionbox = {0, 0, 0, 0, 0, 0}, -- remove box around arrows
|
collisionbox = {0, 0, 0, 0, 0, 0}, -- remove box around arrows
|
||||||
timer = 0,
|
timer = 0,
|
||||||
switch = 0,
|
switch = 0,
|
||||||
|
_lifetime = def._lifetime or 150,
|
||||||
owner_id = def.owner_id,
|
owner_id = def.owner_id,
|
||||||
rotate = def.rotate,
|
rotate = def.rotate,
|
||||||
on_punch = function(self)
|
on_punch = def.on_punch or function(self)
|
||||||
local vel = self.object:get_velocity()
|
local vel = self.object:get_velocity()
|
||||||
self.object:set_velocity({x=vel.x * -1, y=vel.y * -1, z=vel.z * -1})
|
self.object:set_velocity({x=vel.x * -1, y=vel.y * -1, z=vel.z * -1})
|
||||||
end,
|
end,
|
||||||
|
@ -360,7 +372,7 @@ function mcl_mobs.register_arrow(name, def)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
if self.switch == 0
|
if self.switch == 0
|
||||||
or self.timer > 150
|
or self.timer > self._lifetime
|
||||||
or not within_limits(pos, 0) then
|
or not within_limits(pos, 0) then
|
||||||
mcl_burning.extinguish(self.object)
|
mcl_burning.extinguish(self.object)
|
||||||
self.object:remove();
|
self.object:remove();
|
||||||
|
@ -556,7 +568,7 @@ function mcl_mobs.register_egg(mob, desc, background_color, overlay_color, addeg
|
||||||
nametag = string.sub(nametag, 1, MAX_MOB_NAME_LENGTH)
|
nametag = string.sub(nametag, 1, MAX_MOB_NAME_LENGTH)
|
||||||
end
|
end
|
||||||
ent.nametag = nametag
|
ent.nametag = nametag
|
||||||
update_tag(ent)
|
ent:update_tag()
|
||||||
end
|
end
|
||||||
|
|
||||||
-- if not in creative then take item
|
-- if not in creative then take item
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
# textdomain: mcl_mobs
|
||||||
|
Peaceful mode active! No monsters will spawn.=Fredelig tilstand aktiveret! Ingen monstre vil spawne.
|
||||||
|
This allows you to place a single mob.=Dette gør dig i stand til at placere et enkelt monster.
|
||||||
|
Just place it where you want the mob to appear. Animals will spawn tamed, unless you hold down the sneak key while placing. If you place this on a mob spawner, you change the mob it spawns.=Placér det blot der hvor du ønsker, at monsteret skal komme. Dyr vil spawne tamme, medmindre du holder snige-knappen nede mens du placerer dem. Hvis du placerer denne på et monsterspawn, ændrer du hvilket monster det spawner.
|
||||||
|
You need the “maphack” privilege to change the mob spawner.=Du skal have "maphack" privilegier for at ændre monsterspawneren.
|
||||||
|
Name Tag=Navneskilt
|
||||||
|
A name tag is an item to name a mob.=Et navneskilt bruges til at navngive et monster.
|
||||||
|
Before you use the name tag, you need to set a name at an anvil. Then you can use the name tag to name a mob. This uses up the name tag.=Før du bruger navneskiltet, skal du vælge navnet ved en ambolt. Derefter kan du bruge navneskiltet til at navngive et monster. Dette opbruger navneskiltet.
|
||||||
|
Only peaceful mobs allowed!=Kun fredelige monstre er tilladt!
|
||||||
|
Give names to mobs=Giv navne til monstre
|
||||||
|
Set name at anvil=Vælg navn ved en ambolt.
|
|
@ -9,3 +9,5 @@ Before you use the name tag, you need to set a name at an anvil. Then you can us
|
||||||
Only peaceful mobs allowed!=Seuls les mobs pacifiques sont autorisées!
|
Only peaceful mobs allowed!=Seuls les mobs pacifiques sont autorisées!
|
||||||
Give names to mobs=Donne des noms aux mobs
|
Give names to mobs=Donne des noms aux mobs
|
||||||
Set name at anvil=Définir le nom sur l'enclume
|
Set name at anvil=Définir le nom sur l'enclume
|
||||||
|
Removes specified mobs except nametagged and tamed ones. For the second parameter, use nametagged/tamed to select only nametagged/tamed mobs, or a range to specify a maximum distance from the player.=Enlève les mobs spécifiés sauf ceux qui sont nommés et apprivoisés. Pour le deuxième paramètre, utiliser nametagged/tamed pour ne sélectionner que les mobs nommés/apprivoisés, ou une distance pour spécifier la distance maximale par rapport au joueur.
|
||||||
|
Default usage. Clearing hostile mobs. For more options please type: /help clearmobs=Usage par défaut. Enlève les mobs hostiles. Pour plus d'options saisir : /help clearmobs
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
# textdomain: mcl_mobs
|
# textdomain: mcl_mobs
|
||||||
Peaceful mode active! No monsters will spawn.=Мирный режим включён! Монстры не будут появляться.
|
Peaceful mode active! No monsters will spawn.=Мирный режим включён! Монстры не будут спауниться.
|
||||||
This allows you to place a single mob.=Позволяет вам разместить одного моба.
|
This allows you to place a single mob.=Позволяет вам заспаунить одного моба.
|
||||||
Just place it where you want the mob to appear. Animals will spawn tamed, unless you hold down the sneak key while placing. If you place this on a mob spawner, you change the mob it spawns.=Просто поместите это туда, где хотите, чтобы появился моб. Животные будут появляться уже прирученные, если это не нужно, удерживайте клавишу [Красться] при размещении. Если поместить это на спаунер, появляющийся из него моб будет изменён.
|
Just place it where you want the mob to appear. Animals will spawn tamed, unless you hold down the sneak key while placing. If you place this on a mob spawner, you change the mob it spawns.=Используйте предмет там, где вы хотите, чтобы заспаунился моб. Животные будут спауниться уже прирученные, если только вы не удерживаете клавишу [Красться] при размещении. Если использовать на спаунере мобов, изменится создаваемый им моб.
|
||||||
You need the “maphack” privilege to change the mob spawner.=Вам нужно обладать привилегией “maphack”, чтобы изменить спаунер моба.
|
You need the “maphack” privilege to change the mob spawner.=Вам нужна привилегия “maphack”, чтобы изменить спаунер мобов.
|
||||||
Name Tag=Именная бирка
|
Name Tag=Бирка
|
||||||
A name tag is an item to name a mob.=Именная бирка это предмет, чтобы дать мобу имя.
|
A name tag is an item to name a mob.=Бирка это предмет, дающий мобу имя.
|
||||||
Before you use the name tag, you need to set a name at an anvil. Then you can use the name tag to name a mob. This uses up the name tag.=Прежде чем использовать именную бирку, нужно задать имя на наковальне. Тогда вы сможете использовать бирку, чтобы дать имя мобу.
|
Before you use the name tag, you need to set a name at an anvil. Then you can use the name tag to name a mob. This uses up the name tag.=Прежде чем использовать бирку, нужно задать ей имя на наковальне. Тогда вы сможете использовать бирку, чтобы дать имя мобу.
|
||||||
Only peaceful mobs allowed!=Разрешены только мирные мобы!
|
Only peaceful mobs allowed!=Разрешены только мирные мобы!
|
||||||
Give names to mobs=Даёт имена мобам
|
Give names to mobs=Даёт имена мобам
|
||||||
Set name at anvil=Задайте имя при помощи наковальни
|
Set name at anvil=Задайте имя на наковальне
|
||||||
|
Removes specified mobs except nametagged and tamed ones. For the second parameter, use nametagged/tamed to select only nametagged/tamed mobs, or a range to specify a maximum distance from the player.=Удаляет указанных мобов кроме именованных и прирученных. Для второго параметра используйте nametagged/tamed, чтобы выбрать именованных/прирученных мобов или радиус указывающий максимальную дистанцию от игрока.
|
||||||
|
Default usage. Clearing hostile mobs. For more options please type: /help clearmobs=Параметры по умолчанию. Удаляем враждебных мобов. Для дополнительных опций введите: /help clearmobs
|
||||||
|
|
|
@ -9,3 +9,5 @@ Before you use the name tag, you need to set a name at an anvil. Then you can us
|
||||||
Only peaceful mobs allowed!=
|
Only peaceful mobs allowed!=
|
||||||
Give names to mobs=
|
Give names to mobs=
|
||||||
Set name at anvil=
|
Set name at anvil=
|
||||||
|
Removes specified mobs except nametagged and tamed ones. For the second parameter, use nametagged/tamed to select only nametagged/tamed mobs, or a range to specify a maximum distance from the player.=
|
||||||
|
Default usage. Clearing hostile mobs. For more options please type: /help clearmobs=
|
||||||
|
|
|
@ -2,4 +2,4 @@ name = mcl_mobs
|
||||||
author = PilzAdam
|
author = PilzAdam
|
||||||
description = Adds a mob API for mods to add animals or monsters, etc.
|
description = Adds a mob API for mods to add animals or monsters, etc.
|
||||||
depends = mcl_particles
|
depends = mcl_particles
|
||||||
optional_depends = mcl_weather, mcl_explosions, mcl_hunger, mcl_worlds, invisibility, lucky_block, cmi, doc_identifier, mcl_armor, mcl_portals, mcl_experience
|
optional_depends = mcl_weather, mcl_explosions, mcl_hunger, mcl_worlds, invisibility, lucky_block, cmi, doc_identifier, mcl_armor, mcl_portals, mcl_experience, mcl_sculk
|
||||||
|
|
|
@ -3,13 +3,13 @@ local mob_class = mcl_mobs.mob_class
|
||||||
local DEFAULT_FALL_SPEED = -9.81*1.5
|
local DEFAULT_FALL_SPEED = -9.81*1.5
|
||||||
local FLOP_HEIGHT = 6
|
local FLOP_HEIGHT = 6
|
||||||
local FLOP_HOR_SPEED = 1.5
|
local FLOP_HOR_SPEED = 1.5
|
||||||
|
|
||||||
|
local CHECK_HERD_FREQUENCY = 4
|
||||||
|
|
||||||
local PATHFINDING = "gowp"
|
local PATHFINDING = "gowp"
|
||||||
|
|
||||||
local node_ice = "mcl_core:ice"
|
|
||||||
local node_snowblock = "mcl_core:snowblock"
|
|
||||||
local node_snow = "mcl_core:snow"
|
local node_snow = "mcl_core:snow"
|
||||||
|
|
||||||
|
|
||||||
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
|
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
|
||||||
|
|
||||||
local atann = math.atan
|
local atann = math.atan
|
||||||
|
@ -21,14 +21,19 @@ local function atan(x)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local registered_fallback_node = minetest.registered_nodes[mcl_mobs.fallback_node]
|
||||||
|
|
||||||
-- get node but use fallback for nil or unknown
|
-- get node but use fallback for nil or unknown
|
||||||
local node_ok = function(pos, fallback)
|
local node_ok = function(pos, fallback)
|
||||||
fallback = fallback or mcl_mobs.fallback_node
|
|
||||||
local node = minetest.get_node_or_nil(pos)
|
local node = minetest.get_node_or_nil(pos)
|
||||||
if node and minetest.registered_nodes[node.name] then
|
if node and minetest.registered_nodes[node.name] then
|
||||||
return node
|
return node
|
||||||
end
|
end
|
||||||
|
if fallback then
|
||||||
return minetest.registered_nodes[fallback]
|
return minetest.registered_nodes[fallback]
|
||||||
|
else
|
||||||
|
return registered_fallback_node
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Returns true is node can deal damage to self
|
-- Returns true is node can deal damage to self
|
||||||
|
@ -71,6 +76,67 @@ function mob_class:is_node_waterhazard(nodename)
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function raycast_line_of_sight (origin, target)
|
||||||
|
local raycast = minetest.raycast(origin, target, false, true)
|
||||||
|
|
||||||
|
local los_blocked = false
|
||||||
|
|
||||||
|
for hitpoint in raycast do
|
||||||
|
if hitpoint.type == "node" then
|
||||||
|
--TODO type object could block vision, for example chests
|
||||||
|
local node = minetest.get_node(minetest.get_pointed_thing_position(hitpoint))
|
||||||
|
|
||||||
|
if node.name ~= "air" then
|
||||||
|
local nodef = minetest.registered_nodes[node.name]
|
||||||
|
if nodef and nodef.walkable then
|
||||||
|
los_blocked = true
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return not los_blocked
|
||||||
|
end
|
||||||
|
|
||||||
|
function mob_class:target_visible(origin)
|
||||||
|
if not origin then return end
|
||||||
|
|
||||||
|
if not self.attack then return end
|
||||||
|
local target_pos = self.attack:get_pos()
|
||||||
|
|
||||||
|
if not target_pos then return end
|
||||||
|
|
||||||
|
local origin_eye_pos = vector.offset(origin, 0, self.head_eye_height, 0)
|
||||||
|
|
||||||
|
--minetest.log("origin: " .. dump(origin))
|
||||||
|
--minetest.log("origin_eye_pos: " .. dump(origin_eye_pos))
|
||||||
|
|
||||||
|
local targ_head_height, targ_feet_height
|
||||||
|
if self.attack:is_player() then
|
||||||
|
local cbox = self.object:get_properties().collisionbox
|
||||||
|
targ_head_height = vector.offset(target_pos, 0, cbox[5], 0)
|
||||||
|
targ_feet_height = target_pos -- Cbox would put feet under ground which interferes with ray
|
||||||
|
else
|
||||||
|
targ_head_height = vector.offset(target_pos, 0, self.collisionbox[5], 0)
|
||||||
|
targ_feet_height = vector.offset(target_pos, 0, self.collisionbox[2], 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
--minetest.log("start targ_head_height: " .. dump(targ_head_height))
|
||||||
|
if raycast_line_of_sight (origin_eye_pos, targ_head_height) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
--minetest.log("Start targ_feet_height: " .. dump(targ_feet_height))
|
||||||
|
if raycast_line_of_sight (origin_eye_pos, targ_feet_height) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- TODO mid way between feet and head
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
-- check line of sight (BrunoMine)
|
-- check line of sight (BrunoMine)
|
||||||
function mob_class:line_of_sight(pos1, pos2, stepsize)
|
function mob_class:line_of_sight(pos1, pos2, stepsize)
|
||||||
|
|
||||||
|
@ -201,19 +267,21 @@ end
|
||||||
|
|
||||||
-- is mob facing a cliff or danger
|
-- is mob facing a cliff or danger
|
||||||
function mob_class:is_at_cliff_or_danger()
|
function mob_class:is_at_cliff_or_danger()
|
||||||
if self.fear_height == 0 or self:can_jump_cliff() or self._jumping_cliff or not self.object:get_luaentity() then -- 0 for no falling protection!
|
if self.fear_height == 0 or self._jumping_cliff or self._can_jump_cliff or not self.object:get_luaentity() then -- 0 for no falling protection!
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
local yaw = self.object:get_yaw()
|
local yaw = self.object:get_yaw()
|
||||||
local dir_x = -math.sin(yaw) * (self.collisionbox[4] + 0.5)
|
local dir_x = -math.sin(yaw) * (self.collisionbox[4] + 0.5)
|
||||||
local dir_z = math.cos(yaw) * (self.collisionbox[4] + 0.5)
|
local dir_z = math.cos(yaw) * (self.collisionbox[4] + 0.5)
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
local ypos = pos.y + self.collisionbox[2] -- just above floor
|
local ypos = pos.y + self.collisionbox[2] -- just above floor
|
||||||
|
|
||||||
local free_fall, blocker = minetest.line_of_sight(
|
local free_fall, blocker = minetest.line_of_sight(
|
||||||
{x = pos.x + dir_x, y = ypos, z = pos.z + dir_z},
|
vector.new(pos.x + dir_x, ypos, pos.z + dir_z),
|
||||||
{x = pos.x + dir_x, y = ypos - self.fear_height, z = pos.z + dir_z})
|
vector.new(pos.x + dir_x, ypos - self.fear_height, pos.z + dir_z))
|
||||||
|
|
||||||
if free_fall then
|
if free_fall then
|
||||||
return true
|
return true
|
||||||
else
|
else
|
||||||
|
@ -235,7 +303,15 @@ end
|
||||||
|
|
||||||
-- copy the 'mob facing cliff_or_danger check' from above, and rework to avoid water
|
-- copy the 'mob facing cliff_or_danger check' from above, and rework to avoid water
|
||||||
function mob_class:is_at_water_danger()
|
function mob_class:is_at_water_danger()
|
||||||
if not self.object:get_luaentity() or self:can_jump_cliff() or self._jumping_cliff then
|
if self.water_damage == 0 and self.breath_max == -1 then
|
||||||
|
--minetest.log("Do not need a water check for: " .. self.name)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local in_water_danger = self:is_node_waterhazard(self.standing_in) or self:is_node_waterhazard(self.standing_on)
|
||||||
|
if in_water_danger then return false end -- If you're in trouble, do not stop
|
||||||
|
|
||||||
|
if not self.object:get_luaentity() or self._jumping_cliff or self._can_jump_cliff then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
local yaw = self.object:get_yaw()
|
local yaw = self.object:get_yaw()
|
||||||
|
@ -250,54 +326,57 @@ function mob_class:is_at_water_danger()
|
||||||
|
|
||||||
local ypos = pos.y + self.collisionbox[2] -- just above floor
|
local ypos = pos.y + self.collisionbox[2] -- just above floor
|
||||||
|
|
||||||
local free_fall, blocker = minetest.line_of_sight(
|
local los, blocker = minetest.line_of_sight(
|
||||||
{x = pos.x + dir_x, y = ypos, z = pos.z + dir_z},
|
vector.new(pos.x + dir_x, ypos, pos.z + dir_z),
|
||||||
{x = pos.x + dir_x, y = ypos - 3, z = pos.z + dir_z})
|
vector.new(pos.x + dir_x, ypos - 3, pos.z + dir_z))
|
||||||
if free_fall then
|
|
||||||
return true
|
if not los then
|
||||||
else
|
|
||||||
local bnode = minetest.get_node(blocker)
|
local bnode = minetest.get_node(blocker)
|
||||||
local waterdanger = self:is_node_waterhazard(bnode.name)
|
local waterdanger = self:is_node_waterhazard(bnode.name)
|
||||||
if
|
|
||||||
waterdanger and (self:is_node_waterhazard(self.standing_in) or self:is_node_waterhazard( self.standing_on)) then
|
if waterdanger and not in_water_danger then
|
||||||
return false
|
|
||||||
elseif waterdanger and (self:is_node_waterhazard(self.standing_in) or self:is_node_waterhazard(self.standing_on)) == false then
|
|
||||||
return true
|
return true
|
||||||
else
|
|
||||||
local def = minetest.registered_nodes[bnode.name]
|
|
||||||
if def and def.walkable then
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
function mob_class:env_danger_movement_checks(dtime)
|
function mob_class:env_danger_movement_checks(player_in_active_range)
|
||||||
local yaw = 0
|
local yaw = 0
|
||||||
if self:is_at_water_danger() and self.state ~= "attack" then
|
|
||||||
if math.random(1, 10) <= 6 then
|
if not player_in_active_range then return end
|
||||||
|
|
||||||
|
if self.state == PATHFINDING
|
||||||
|
or self.state == "attack"
|
||||||
|
or self.state == "stand"
|
||||||
|
or self.state == "runaway" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if self:is_at_water_danger() then
|
||||||
|
--minetest.log("At water danger for mob, stop?: " .. self.name)
|
||||||
|
if math.random(1, 10) <= 7 then
|
||||||
|
if self.state ~= "stand" then
|
||||||
self:set_velocity(0)
|
self:set_velocity(0)
|
||||||
self.state = "stand"
|
self.state = "stand"
|
||||||
self:set_animation( "stand")
|
self:set_animation( "stand")
|
||||||
|
end
|
||||||
yaw = yaw + math.random(-0.5, 0.5)
|
yaw = yaw + math.random(-0.5, 0.5)
|
||||||
yaw = self:set_yaw( yaw, 8)
|
yaw = self:set_yaw( yaw, 8)
|
||||||
end
|
return
|
||||||
else
|
|
||||||
-- This code should probably be moved to movement code
|
|
||||||
if self.move_in_group ~= false then
|
|
||||||
self:check_herd(dtime)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if self:is_at_cliff_or_danger() then
|
--[[if self:is_at_cliff_or_danger(can_jump_cliff) then
|
||||||
|
if self.state ~= "stand" then
|
||||||
self:set_velocity(0)
|
self:set_velocity(0)
|
||||||
self.state = "stand"
|
self.state = "stand"
|
||||||
self:set_animation( "stand")
|
self:set_animation( "stand")
|
||||||
|
end
|
||||||
local yaw = self.object:get_yaw() or 0
|
local yaw = self.object:get_yaw() or 0
|
||||||
yaw = self:set_yaw( yaw + 0.78, 8)
|
yaw = self:set_yaw( yaw + 0.78, 8)
|
||||||
end
|
end--]]
|
||||||
end
|
end
|
||||||
|
|
||||||
-- jump if facing a solid node (not fences or gates)
|
-- jump if facing a solid node (not fences or gates)
|
||||||
|
@ -337,9 +416,11 @@ function mob_class:do_jump()
|
||||||
jump_c_multiplier = v2/self.walk_velocity/2
|
jump_c_multiplier = v2/self.walk_velocity/2
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local yaw_dir = minetest.yaw_to_dir(self.object:get_yaw())
|
||||||
|
|
||||||
-- where is front
|
-- where is front
|
||||||
local dir_x = -math.sin(yaw) * (self.collisionbox[4] + 0.5)*jump_c_multiplier+0.6
|
local dir_x = -math.sin(yaw) * (self.collisionbox[4] + 0.5)*jump_c_multiplier+yaw_dir.x
|
||||||
local dir_z = math.cos(yaw) * (self.collisionbox[4] + 0.5)*jump_c_multiplier+0.6
|
local dir_z = math.cos(yaw) * (self.collisionbox[4] + 0.5)*jump_c_multiplier+yaw_dir.z
|
||||||
|
|
||||||
-- what is in front of mob?
|
-- what is in front of mob?
|
||||||
nod = node_ok({
|
nod = node_ok({
|
||||||
|
@ -368,7 +449,7 @@ function mob_class:do_jump()
|
||||||
end
|
end
|
||||||
|
|
||||||
local ndef = minetest.registered_nodes[nod.name]
|
local ndef = minetest.registered_nodes[nod.name]
|
||||||
if self.walk_chance == 0 or ndef and ndef.walkable or self:can_jump_cliff() then
|
if self.walk_chance == 0 or ndef and ndef.walkable or self._can_jump_cliff then
|
||||||
|
|
||||||
if minetest.get_item_group(nod.name, "fence") == 0
|
if minetest.get_item_group(nod.name, "fence") == 0
|
||||||
and minetest.get_item_group(nod.name, "fence_gate") == 0
|
and minetest.get_item_group(nod.name, "fence_gate") == 0
|
||||||
|
@ -378,7 +459,7 @@ function mob_class:do_jump()
|
||||||
|
|
||||||
v.y = self.jump_height + 0.1 * 3
|
v.y = self.jump_height + 0.1 * 3
|
||||||
|
|
||||||
if self:can_jump_cliff() then
|
if self._can_jump_cliff then
|
||||||
v=vector.multiply(v, vector.new(2.8,1,2.8))
|
v=vector.multiply(v, vector.new(2.8,1,2.8))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -462,6 +543,7 @@ end
|
||||||
-- find and replace what mob is looking for (grass, wheat etc.)
|
-- find and replace what mob is looking for (grass, wheat etc.)
|
||||||
function mob_class:replace_node(pos)
|
function mob_class:replace_node(pos)
|
||||||
|
|
||||||
|
|
||||||
if not self.replace_rate
|
if not self.replace_rate
|
||||||
or not self.replace_what
|
or not self.replace_what
|
||||||
or self.child == true
|
or self.child == true
|
||||||
|
@ -492,18 +574,21 @@ function mob_class:replace_node(pos)
|
||||||
|
|
||||||
local oldnode = {name = what, param2 = node.param2}
|
local oldnode = {name = what, param2 = node.param2}
|
||||||
local newnode = {name = with, param2 = node.param2}
|
local newnode = {name = with, param2 = node.param2}
|
||||||
local on_replace_return
|
local on_replace_return = false
|
||||||
|
|
||||||
if self.on_replace then
|
if self.on_replace then
|
||||||
on_replace_return = self.on_replace(self, pos, oldnode, newnode)
|
on_replace_return = self.on_replace(self, pos, oldnode, newnode)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if on_replace_return ~= false then
|
if on_replace_return ~= false then
|
||||||
|
|
||||||
if mobs_griefing then
|
if mobs_griefing then
|
||||||
|
minetest.after(self.replace_delay, function()
|
||||||
|
if self and self.object and self.object:get_velocity() and self.health > 0 then
|
||||||
minetest.set_node(pos, newnode)
|
minetest.set_node(pos, newnode)
|
||||||
end
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -613,76 +698,52 @@ function mob_class:check_runaway_from()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- follow player if owner or holding item, if fish outta water then flop
|
-- follow player if owner or holding item
|
||||||
function mob_class:follow_flop()
|
function mob_class:check_follow()
|
||||||
|
|
||||||
-- find player to follow
|
-- find player to follow
|
||||||
if (self.follow ~= ""
|
if (self.follow ~= "" or self.order == "follow") and not self.following
|
||||||
or self.order == "follow")
|
|
||||||
and not self.following
|
|
||||||
and self.state ~= "attack"
|
and self.state ~= "attack"
|
||||||
and self.order ~= "sit"
|
and self.order ~= "sit"
|
||||||
and self.state ~= "runaway" then
|
and self.state ~= "runaway" then
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
local players = minetest.get_connected_players()
|
local players = minetest.get_connected_players()
|
||||||
|
|
||||||
for n = 1, #players do
|
for n = 1, #players do
|
||||||
|
if (self:object_in_range(players[n])) and not mcl_mobs.invis[ players[n]:get_player_name() ] then
|
||||||
if (self:object_in_range(players[n]))
|
|
||||||
and not mcl_mobs.invis[ players[n]:get_player_name() ] then
|
|
||||||
|
|
||||||
self.following = players[n]
|
self.following = players[n]
|
||||||
|
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.type == "npc"
|
if self.type == "npc" and self.order == "follow"
|
||||||
and self.order == "follow"
|
and self.state ~= "attack" and self.order ~= "sit" and self.owner ~= "" then
|
||||||
and self.state ~= "attack"
|
|
||||||
and self.order ~= "sit"
|
|
||||||
and self.owner ~= "" then
|
|
||||||
|
|
||||||
-- npc stop following player if not owner
|
if self.following and self.owner and self.owner ~= self.following:get_player_name() then
|
||||||
if self.following
|
|
||||||
and self.owner
|
|
||||||
and self.owner ~= self.following:get_player_name() then
|
|
||||||
self.following = nil
|
self.following = nil
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- stop following player if not holding specific item,
|
-- stop following player if not holding specific item,
|
||||||
-- mob is horny, fleeing or attacking
|
-- mob is horny, fleeing or attacking
|
||||||
if self.following
|
if self.following and self.following:is_player()
|
||||||
and self.following:is_player()
|
and (self:follow_holding(self.following) == false or self.horny or self.state == "runaway") then
|
||||||
and (self:follow_holding(self.following) == false or
|
|
||||||
self.horny or self.state == "runaway") then
|
|
||||||
self.following = nil
|
self.following = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- follow that thing
|
-- follow that thing
|
||||||
if self.following then
|
if self.following then
|
||||||
|
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
|
|
||||||
local p
|
local p
|
||||||
|
|
||||||
if self.following:is_player() then
|
if self.following:is_player() then
|
||||||
|
|
||||||
p = self.following:get_pos()
|
p = self.following:get_pos()
|
||||||
|
|
||||||
elseif self.following.object then
|
elseif self.following.object then
|
||||||
|
|
||||||
p = self.following.object:get_pos()
|
p = self.following.object:get_pos()
|
||||||
end
|
end
|
||||||
|
|
||||||
if p then
|
if p then
|
||||||
|
|
||||||
local dist = vector.distance(p, s)
|
local dist = vector.distance(p, s)
|
||||||
|
|
||||||
-- dont follow if out of range
|
|
||||||
if (not self:object_in_range(self.following)) then
|
if (not self:object_in_range(self.following)) then
|
||||||
self.following = nil
|
self.following = nil
|
||||||
else
|
else
|
||||||
|
@ -692,17 +753,12 @@ function mob_class:follow_flop()
|
||||||
}
|
}
|
||||||
|
|
||||||
local yaw = (atan(vec.z / vec.x) +math.pi/ 2) - self.rotate
|
local yaw = (atan(vec.z / vec.x) +math.pi/ 2) - self.rotate
|
||||||
|
|
||||||
if p.x > s.x then yaw = yaw +math.pi end
|
if p.x > s.x then yaw = yaw +math.pi end
|
||||||
|
|
||||||
self:set_yaw( yaw, 2.35)
|
self:set_yaw( yaw, 2.35)
|
||||||
|
|
||||||
-- anyone but standing npc's can move along
|
-- anyone but standing npc's can move along
|
||||||
if dist > 3
|
if dist > 3 and self.order ~= "stand" then
|
||||||
and self.order ~= "stand" then
|
|
||||||
|
|
||||||
self:set_velocity(self.follow_velocity)
|
self:set_velocity(self.follow_velocity)
|
||||||
|
|
||||||
if self.walk_chance ~= 0 then
|
if self.walk_chance ~= 0 then
|
||||||
self:set_animation( "run")
|
self:set_animation( "run")
|
||||||
end
|
end
|
||||||
|
@ -710,17 +766,18 @@ function mob_class:follow_flop()
|
||||||
self:set_velocity(0)
|
self:set_velocity(0)
|
||||||
self:set_animation( "stand")
|
self:set_animation( "stand")
|
||||||
end
|
end
|
||||||
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function mob_class:flop()
|
||||||
-- swimmers flop when out of their element, and swim again when back in
|
-- swimmers flop when out of their element, and swim again when back in
|
||||||
if self.fly then
|
if self.fly then
|
||||||
local s = self.object:get_pos()
|
local s = self.object:get_pos()
|
||||||
if self:flight_check( s) == false then
|
|
||||||
|
|
||||||
|
if self:flight_check(s) == false then
|
||||||
self.state = "flop"
|
self.state = "flop"
|
||||||
self.object:set_acceleration({x = 0, y = DEFAULT_FALL_SPEED, z = 0})
|
self.object:set_acceleration({x = 0, y = DEFAULT_FALL_SPEED, z = 0})
|
||||||
|
|
||||||
|
@ -739,11 +796,10 @@ function mob_class:follow_flop()
|
||||||
end
|
end
|
||||||
|
|
||||||
self:set_animation( "stand", true)
|
self:set_animation( "stand", true)
|
||||||
|
|
||||||
return
|
return
|
||||||
elseif self.state == "flop" then
|
elseif self.state == "flop" then
|
||||||
self.state = "stand"
|
self.state = "stand"
|
||||||
self.object:set_acceleration({x = 0, y = 0, z = 0})
|
self.object:set_acceleration(vector.zero())
|
||||||
self:set_velocity(0)
|
self:set_velocity(0)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -770,9 +826,12 @@ end
|
||||||
local check_herd_timer = 0
|
local check_herd_timer = 0
|
||||||
function mob_class:check_herd(dtime)
|
function mob_class:check_herd(dtime)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
if not pos then return end
|
if not pos or self.state == "attack" then return end
|
||||||
|
-- Does any mob not move in group. Weird check for something not set?
|
||||||
|
if self.move_in_group == false then return end
|
||||||
|
|
||||||
check_herd_timer = check_herd_timer + dtime
|
check_herd_timer = check_herd_timer + dtime
|
||||||
if check_herd_timer < 4 then return end
|
if check_herd_timer < CHECK_HERD_FREQUENCY then return end
|
||||||
check_herd_timer = 0
|
check_herd_timer = 0
|
||||||
for _,o in pairs(minetest.get_objects_inside_radius(pos,self.view_range)) do
|
for _,o in pairs(minetest.get_objects_inside_radius(pos,self.view_range)) do
|
||||||
local l = o:get_luaentity()
|
local l = o:get_luaentity()
|
||||||
|
@ -903,7 +962,7 @@ function mob_class:do_states_walk()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function mob_class:do_states_stand()
|
function mob_class:do_states_stand(player_in_active_range)
|
||||||
local yaw = self.object:get_yaw() or 0
|
local yaw = self.object:get_yaw() or 0
|
||||||
|
|
||||||
if math.random(1, 4) == 1 then
|
if math.random(1, 4) == 1 then
|
||||||
|
@ -947,6 +1006,7 @@ function mob_class:do_states_stand()
|
||||||
if self.order == "stand" or self.order == "sleep" or self.order == "work" then
|
if self.order == "stand" or self.order == "sleep" or self.order == "work" then
|
||||||
|
|
||||||
else
|
else
|
||||||
|
if player_in_active_range then
|
||||||
if self.walk_chance ~= 0
|
if self.walk_chance ~= 0
|
||||||
and self.facing_fence ~= true
|
and self.facing_fence ~= true
|
||||||
and math.random(1, 100) <= self.walk_chance
|
and math.random(1, 100) <= self.walk_chance
|
||||||
|
@ -958,6 +1018,7 @@ function mob_class:do_states_stand()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function mob_class:do_states_runaway()
|
function mob_class:do_states_runaway()
|
||||||
local yaw = self.object:get_yaw() or 0
|
local yaw = self.object:get_yaw() or 0
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
|
local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
|
||||||
local mob_class = mcl_mobs.mob_class
|
local mob_class = mcl_mobs.mob_class
|
||||||
|
local validate_vector = mcl_util.validate_vector
|
||||||
|
|
||||||
local ENTITY_CRAMMING_MAX = 24
|
local ENTITY_CRAMMING_MAX = 24
|
||||||
local CRAMMING_DAMAGE = 3
|
local CRAMMING_DAMAGE = 3
|
||||||
|
@ -184,7 +185,7 @@ function mob_class:collision()
|
||||||
end
|
end
|
||||||
|
|
||||||
function mob_class:check_death_and_slow_mob()
|
function mob_class:check_death_and_slow_mob()
|
||||||
local d = 0.85
|
local d = 0.7
|
||||||
local dying = self:check_dying()
|
local dying = self:check_dying()
|
||||||
if dying then d = 0.92 end
|
if dying then d = 0.92 end
|
||||||
|
|
||||||
|
@ -198,6 +199,8 @@ end
|
||||||
|
|
||||||
-- move mob in facing direction
|
-- move mob in facing direction
|
||||||
function mob_class:set_velocity(v)
|
function mob_class:set_velocity(v)
|
||||||
|
if not v then return end
|
||||||
|
|
||||||
local c_x, c_y = 0, 0
|
local c_x, c_y = 0, 0
|
||||||
|
|
||||||
-- can mob be pushed, if so calculate direction
|
-- can mob be pushed, if so calculate direction
|
||||||
|
@ -207,18 +210,15 @@ function mob_class:set_velocity(v)
|
||||||
|
|
||||||
-- halt mob if it has been ordered to stay
|
-- halt mob if it has been ordered to stay
|
||||||
if self.order == "stand" or self.order == "sit" then
|
if self.order == "stand" or self.order == "sit" then
|
||||||
self.acc=vector.new(0,0,0)
|
self.acc = vector.zero()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local yaw = (self.object:get_yaw() or 0) + self.rotate
|
local yaw = (self.object:get_yaw() or 0) + self.rotate
|
||||||
local vv = self.object:get_velocity()
|
local vv = self.object:get_velocity()
|
||||||
if vv then
|
|
||||||
self.acc={
|
if vv and yaw then
|
||||||
x = ((math.sin(yaw) * -v) + c_x)*.27,
|
self.acc = vector.new(((math.sin(yaw) * -v) + c_x) * .4, 0, ((math.cos(yaw) * v) + c_y) * .4)
|
||||||
y = 0,
|
|
||||||
z = ((math.cos(yaw) * v) + c_y)*.27,
|
|
||||||
}
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -328,9 +328,9 @@ function mob_class:set_yaw(yaw, delay, dtime)
|
||||||
end
|
end
|
||||||
|
|
||||||
if math.deg(yaw) > 360 then
|
if math.deg(yaw) > 360 then
|
||||||
yaw=yaw%360
|
yaw=math.rad(math.deg(yaw)%360)
|
||||||
elseif math.deg(yaw) < 0 then
|
elseif math.deg(yaw) < 0 then
|
||||||
yaw=((360*5)-yaw)%360
|
yaw=math.rad(((360*5)-math.deg(yaw))%360)
|
||||||
end
|
end
|
||||||
|
|
||||||
--calculate the shortest way to turn to find our target
|
--calculate the shortest way to turn to find our target
|
||||||
|
@ -354,9 +354,9 @@ function mob_class:set_yaw(yaw, delay, dtime)
|
||||||
ddtime = dtime
|
ddtime = dtime
|
||||||
end
|
end
|
||||||
|
|
||||||
if math.abs(target_shortest_path_nums) > 5 then
|
if math.abs(target_shortest_path_nums) > 10 then
|
||||||
self.object:set_yaw(self.object:get_yaw()+(target_shortest_path*(3.6*ddtime)))
|
self.object:set_yaw(self.object:get_yaw()+(target_shortest_path*(3.6*ddtime)))
|
||||||
if self.acc then
|
if validate_vector(self.acc) then
|
||||||
self.acc=vector.rotate_around_axis(self.acc,vector.new(0,1,0), target_shortest_path*(3.6*ddtime))
|
self.acc=vector.rotate_around_axis(self.acc,vector.new(0,1,0), target_shortest_path*(3.6*ddtime))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -488,11 +488,23 @@ function mob_class:check_for_death(cause, cmi_cause)
|
||||||
self:item_drop(cooked, looting)
|
self:item_drop(cooked, looting)
|
||||||
|
|
||||||
if ((not self.child) or self.type ~= "animal") and (minetest.get_us_time() - self.xp_timestamp <= math.huge) then
|
if ((not self.child) or self.type ~= "animal") and (minetest.get_us_time() - self.xp_timestamp <= math.huge) then
|
||||||
mcl_experience.throw_xp(self.object:get_pos(), math.random(self.xp_min, self.xp_max))
|
local pos = self.object:get_pos()
|
||||||
|
local xp_amount = math.random(self.xp_min, self.xp_max)
|
||||||
|
|
||||||
|
if not mcl_sculk.handle_death(pos, xp_amount) then
|
||||||
|
--minetest.log("Xp not thrown")
|
||||||
|
if minetest.is_creative_enabled("") ~= true then
|
||||||
|
mcl_experience.throw_xp(pos, xp_amount)
|
||||||
|
end
|
||||||
|
else
|
||||||
|
--minetest.log("xp thrown")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
-- execute custom death function
|
-- execute custom death function
|
||||||
if self.on_die then
|
if self.on_die then
|
||||||
|
|
||||||
|
@ -622,9 +634,17 @@ function mob_class:do_env_damage()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
local sunlight = minetest.get_natural_light(pos, self.time_of_day)
|
local node = minetest.get_node(pos)
|
||||||
|
if node then
|
||||||
|
if node.name ~= "ignore" then
|
||||||
|
-- put below code in this block if we can prove that unloaded maps are causing crash.
|
||||||
|
-- it should warn then error
|
||||||
|
else
|
||||||
|
--minetest.log("warning", "Pos is ignored: " .. dump(pos))
|
||||||
|
end
|
||||||
|
|
||||||
|
local sunlight = mcl_util.get_natural_light(pos, self.time_of_day)
|
||||||
|
|
||||||
-- bright light harms mob
|
|
||||||
if self.light_damage ~= 0 and (sunlight or 0) > 12 then
|
if self.light_damage ~= 0 and (sunlight or 0) > 12 then
|
||||||
if self:deal_light_damage(pos, self.light_damage) then
|
if self:deal_light_damage(pos, self.light_damage) then
|
||||||
return true
|
return true
|
||||||
|
@ -642,6 +662,8 @@ function mob_class:do_env_damage()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
local y_level = self.collisionbox[2]
|
local y_level = self.collisionbox[2]
|
||||||
|
|
||||||
if self.child then
|
if self.child then
|
||||||
|
@ -654,13 +676,20 @@ function mob_class:do_env_damage()
|
||||||
self.standing_in = node_ok(pos, "air").name
|
self.standing_in = node_ok(pos, "air").name
|
||||||
self.standing_on = node_ok(pos2, "air").name
|
self.standing_on = node_ok(pos2, "air").name
|
||||||
|
|
||||||
|
local pos3 = vector.offset(pos, 0, 1, 0)
|
||||||
|
self.standing_under = node_ok(pos3, "air").name
|
||||||
|
|
||||||
-- don't fall when on ignore, just stand still
|
-- don't fall when on ignore, just stand still
|
||||||
if self.standing_in == "ignore" then
|
if self.standing_in == "ignore" then
|
||||||
self.object:set_velocity({x = 0, y = 0, z = 0})
|
self.object:set_velocity({x = 0, y = 0, z = 0})
|
||||||
|
-- wither rose effect
|
||||||
|
elseif self.standing_in == "mcl_flowers:wither_rose" then
|
||||||
|
mcl_potions.withering_func(self.object, 1, 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
local nodef = minetest.registered_nodes[self.standing_in]
|
local nodef = minetest.registered_nodes[self.standing_in]
|
||||||
local nodef2 = minetest.registered_nodes[self.standing_on]
|
local nodef2 = minetest.registered_nodes[self.standing_on]
|
||||||
|
local nodef3 = minetest.registered_nodes[self.standing_under]
|
||||||
|
|
||||||
-- rain
|
-- rain
|
||||||
if self.rain_damage > 0 then
|
if self.rain_damage > 0 then
|
||||||
|
@ -740,7 +769,7 @@ function mob_class:do_env_damage()
|
||||||
if minetest.get_item_group(self.standing_in, "water") == 0 then
|
if minetest.get_item_group(self.standing_in, "water") == 0 then
|
||||||
drowning = true
|
drowning = true
|
||||||
end
|
end
|
||||||
elseif nodef.drowning > 0 then
|
elseif nodef.drowning > 0 and nodef3.drowning > 0 then
|
||||||
drowning = true
|
drowning = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -799,11 +828,19 @@ function mob_class:do_env_damage()
|
||||||
return self:check_for_death("unknown", {type = "unknown"})
|
return self:check_for_death("unknown", {type = "unknown"})
|
||||||
end
|
end
|
||||||
|
|
||||||
function mob_class:env_damage (dtime, pos)
|
function mob_class:step_damage (dtime, pos)
|
||||||
|
if not self.fire_resistant then
|
||||||
|
mcl_burning.tick(self.object, dtime, self)
|
||||||
|
if not self.object:get_pos() then return true end -- mcl_burning.tick may remove object immediately
|
||||||
|
|
||||||
|
if self:check_for_death("fire", {type = "fire"}) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- environmental damage timer (every 1 second)
|
-- environmental damage timer (every 1 second)
|
||||||
self.env_damage_timer = self.env_damage_timer + dtime
|
self.env_damage_timer = self.env_damage_timer + dtime
|
||||||
|
|
||||||
|
|
||||||
if self.env_damage_timer > 1 then
|
if self.env_damage_timer > 1 then
|
||||||
self.env_damage_timer = 0
|
self.env_damage_timer = 0
|
||||||
|
|
||||||
|
@ -882,47 +919,36 @@ function mob_class:falling(pos)
|
||||||
-- floating in water (or falling)
|
-- floating in water (or falling)
|
||||||
local v = self.object:get_velocity()
|
local v = self.object:get_velocity()
|
||||||
if v then
|
if v then
|
||||||
|
local new_acceleration
|
||||||
|
|
||||||
if v.y > 0 then
|
if v.y > 0 then
|
||||||
-- apply gravity when moving up
|
-- apply gravity when moving up
|
||||||
self.object:set_acceleration({
|
new_acceleration = vector.new(0, DEFAULT_FALL_SPEED, 0)
|
||||||
x = 0,
|
|
||||||
y = DEFAULT_FALL_SPEED,
|
|
||||||
z = 0
|
|
||||||
})
|
|
||||||
|
|
||||||
elseif v.y <= 0 and v.y > self.fall_speed then
|
elseif v.y <= 0 and v.y > self.fall_speed then
|
||||||
-- fall downwards at set speed
|
-- fall downwards at set speed
|
||||||
self.object:set_acceleration({
|
new_acceleration = vector.new(0, self.fall_speed, 0)
|
||||||
x = 0,
|
|
||||||
y = self.fall_speed,
|
|
||||||
z = 0
|
|
||||||
})
|
|
||||||
else
|
else
|
||||||
-- stop accelerating once max fall speed hit
|
-- stop accelerating once max fall speed hit
|
||||||
self.object:set_acceleration({x = 0, y = 0, z = 0})
|
new_acceleration =vector.zero()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
self.object:set_acceleration(new_acceleration)
|
||||||
end
|
end
|
||||||
|
|
||||||
local acc = self.object:get_acceleration()
|
local acc = self.object:get_acceleration()
|
||||||
|
|
||||||
if minetest.registered_nodes[node_ok(pos).name].groups.lava then
|
local registered_node = minetest.registered_nodes[node_ok(pos).name]
|
||||||
|
|
||||||
|
if registered_node.groups.lava then
|
||||||
if acc and self.floats_on_lava == 1 then
|
if acc and self.floats_on_lava == 1 then
|
||||||
self.object:set_acceleration({
|
self.object:set_acceleration(vector.new(0, -self.fall_speed / (math.max(1, v.y) ^ 2), 0))
|
||||||
x = 0,
|
|
||||||
y = -self.fall_speed / (math.max(1, v.y) ^ 2),
|
|
||||||
z = 0
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- in water then float up
|
-- in water then float up
|
||||||
if minetest.registered_nodes[node_ok(pos).name].groups.water then
|
if registered_node.groups.water then
|
||||||
if acc and self.floats == 1 then
|
if acc and self.floats == 1 and minetest.registered_nodes[node_ok(vector.offset(pos,0,self.collisionbox[5] -0.25,0)).name].groups.water then
|
||||||
self.object:set_acceleration({
|
self.object:set_acceleration(vector.new(0, -self.fall_speed / (math.max(1, v.y) ^ 2), 0))
|
||||||
x = 0,
|
|
||||||
y = -self.fall_speed / (math.max(1, v.y) ^ 2),
|
|
||||||
z = 0
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- fall damage onto solid ground
|
-- fall damage onto solid ground
|
||||||
|
@ -995,10 +1021,10 @@ function mob_class:check_dying()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function mob_class:check_suspend()
|
function mob_class:check_suspend(player_in_active_range)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
if pos and not self:player_in_active_range() then
|
if pos and not player_in_active_range then
|
||||||
local node_under = node_ok(vector.offset(pos,0,-1,0)).name
|
local node_under = node_ok(vector.offset(pos,0,-1,0)).name
|
||||||
|
|
||||||
self:set_animation( "stand", true)
|
self:set_animation( "stand", true)
|
||||||
|
@ -1006,11 +1032,8 @@ function mob_class:check_suspend()
|
||||||
local acc = self.object:get_acceleration()
|
local acc = self.object:get_acceleration()
|
||||||
if acc then
|
if acc then
|
||||||
if acc.y > 0 or node_under ~= "air" then
|
if acc.y > 0 or node_under ~= "air" then
|
||||||
self.object:set_acceleration(vector.new(0,0,0))
|
self.object:set_acceleration(vector.zero())
|
||||||
self.object:set_velocity(vector.new(0,0,0))
|
self.object:set_velocity(vector.zero())
|
||||||
end
|
|
||||||
if acc.y == 0 and node_under == "air" then
|
|
||||||
self:falling(pos)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -2,6 +2,13 @@
|
||||||
local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
|
local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
|
||||||
local mob_class = mcl_mobs.mob_class
|
local mob_class = mcl_mobs.mob_class
|
||||||
|
|
||||||
|
local modern_lighting = minetest.settings:get_bool("mcl_mobs_modern_lighting", true)
|
||||||
|
local nether_threshold = tonumber(minetest.settings:get("mcl_mobs_nether_threshold")) or 11
|
||||||
|
local end_threshold = tonumber(minetest.settings:get("mcl_mobs_end_threshold")) or 0
|
||||||
|
local overworld_threshold = tonumber(minetest.settings:get("mcl_mobs_overworld_threshold")) or 0
|
||||||
|
local overworld_sky_threshold = tonumber(minetest.settings:get("mcl_mobs_overworld_sky_threshold")) or 7
|
||||||
|
local overworld_passive_threshold = tonumber(minetest.settings:get("mcl_mobs_overworld_passive_threshold")) or 7
|
||||||
|
|
||||||
local get_node = minetest.get_node
|
local get_node = minetest.get_node
|
||||||
local get_item_group = minetest.get_item_group
|
local get_item_group = minetest.get_item_group
|
||||||
local get_node_light = minetest.get_node_light
|
local get_node_light = minetest.get_node_light
|
||||||
|
@ -27,8 +34,11 @@ local table_remove = table.remove
|
||||||
local pairs = pairs
|
local pairs = pairs
|
||||||
|
|
||||||
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_spawning", false)
|
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_spawning", false)
|
||||||
local function mcl_log (message)
|
local function mcl_log (message, property)
|
||||||
if LOGGING_ON then
|
if LOGGING_ON then
|
||||||
|
if property then
|
||||||
|
message = message .. ": " .. dump(property)
|
||||||
|
end
|
||||||
mcl_util.mcl_log (message, "[Mobs spawn]", true)
|
mcl_util.mcl_log (message, "[Mobs spawn]", true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -52,21 +62,25 @@ local MOB_CAP_INNER_RADIUS = 32
|
||||||
local aoc_range = 136
|
local aoc_range = 136
|
||||||
|
|
||||||
local MISSING_CAP_DEFAULT = 15
|
local MISSING_CAP_DEFAULT = 15
|
||||||
local MOBS_CAP_CLOSE = 5
|
local MOBS_CAP_CLOSE = 10
|
||||||
|
|
||||||
local SPAWN_MAPGEN_LIMIT = mcl_vars.mapgen_limit - 150
|
local SPAWN_MAPGEN_LIMIT = mcl_vars.mapgen_limit - 150
|
||||||
|
|
||||||
local mob_cap = {
|
local mob_cap = {
|
||||||
hostile = tonumber(minetest.settings:get("mcl_mob_cap_monster")) or 70,
|
hostile = tonumber(minetest.settings:get("mcl_mob_cap_monster")) or 70,
|
||||||
passive = tonumber(minetest.settings:get("mcl_mob_cap_animal")) or 13,
|
passive = tonumber(minetest.settings:get("mcl_mob_cap_animal")) or 10,
|
||||||
ambient = tonumber(minetest.settings:get("mcl_mob_cap_ambient")) or 15,
|
ambient = tonumber(minetest.settings:get("mcl_mob_cap_ambient")) or 15,
|
||||||
water = tonumber(minetest.settings:get("mcl_mob_cap_water")) or 8,
|
water = tonumber(minetest.settings:get("mcl_mob_cap_water")) or 8,
|
||||||
water_ambient = tonumber(minetest.settings:get("mcl_mob_cap_water_ambient")) or 20, --currently unused
|
water_ambient = tonumber(minetest.settings:get("mcl_mob_cap_water_ambient")) or 20,
|
||||||
|
water_underground = tonumber(minetest.settings:get("mcl_mob_cap_water_underground")) or 5,
|
||||||
|
axolotl = tonumber(minetest.settings:get("mcl_mob_cap_axolotl")) or 2, -- TODO should be 5 when lush caves added
|
||||||
player = tonumber(minetest.settings:get("mcl_mob_cap_player")) or 75,
|
player = tonumber(minetest.settings:get("mcl_mob_cap_player")) or 75,
|
||||||
|
global_hostile = tonumber(minetest.settings:get("mcl_mob_cap_hostile")) or 300,
|
||||||
|
global_non_hostile = tonumber(minetest.settings:get("mcl_mob_cap_non_hostile")) or 300,
|
||||||
total = tonumber(minetest.settings:get("mcl_mob_cap_total")) or 500,
|
total = tonumber(minetest.settings:get("mcl_mob_cap_total")) or 500,
|
||||||
}
|
}
|
||||||
|
|
||||||
local peaceful_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_peaceful_percentage_spawned")) or 35
|
local peaceful_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_peaceful_percentage_spawned")) or 30
|
||||||
local peaceful_group_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_peaceful_group_percentage_spawned")) or 15
|
local peaceful_group_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_peaceful_group_percentage_spawned")) or 15
|
||||||
local hostile_group_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_hostile_group_percentage_spawned")) or 20
|
local hostile_group_percentage_spawned = tonumber(minetest.settings:get("mcl_mob_hostile_group_percentage_spawned")) or 20
|
||||||
|
|
||||||
|
@ -340,15 +354,32 @@ local function count_mobs_all(categorise_by, pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function count_mobs_total_cap(mob_type)
|
local function count_mobs_total_cap(mob_type)
|
||||||
|
local total = 0
|
||||||
local num = 0
|
local num = 0
|
||||||
|
local hostile = 0
|
||||||
|
local non_hostile = 0
|
||||||
for _,l in pairs(minetest.luaentities) do
|
for _,l in pairs(minetest.luaentities) do
|
||||||
if l.is_mob then
|
if l.is_mob then
|
||||||
if ( mob_type == nil or l.type == mob_type ) and l.can_despawn and not l.nametag then
|
total = total + 1
|
||||||
|
local nametagged = l.nametag and l.nametag ~= ""
|
||||||
|
if ( mob_type == nil or l.type == mob_type ) and not nametagged then
|
||||||
|
if l.spawn_class == "hostile" then
|
||||||
|
hostile = hostile + 1
|
||||||
|
else
|
||||||
|
non_hostile = non_hostile + 1
|
||||||
|
end
|
||||||
num = num + 1
|
num = num + 1
|
||||||
|
else
|
||||||
|
mcl_log("l.name", l.name)
|
||||||
|
mcl_log("l.nametag", l.nametag)
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return num
|
mcl_log("Total mobs", total)
|
||||||
|
mcl_log("hostile", hostile)
|
||||||
|
mcl_log("non_hostile", non_hostile)
|
||||||
|
return num, non_hostile, hostile
|
||||||
end
|
end
|
||||||
|
|
||||||
local function output_mob_stats(mob_counts, total_mobs, chat_display)
|
local function output_mob_stats(mob_counts, total_mobs, chat_display)
|
||||||
|
@ -542,7 +573,7 @@ function mcl_mobs:non_spawn_specific(mob_name,dimension,min_light,max_light)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_light, max_light, interval, chance, aoc, min_height, max_height, day_toggle, on_spawn)
|
function mcl_mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_light, max_light, interval, chance, aoc, min_height, max_height, day_toggle, on_spawn, check_position)
|
||||||
|
|
||||||
-- Do mobs spawn at all?
|
-- Do mobs spawn at all?
|
||||||
if not mobs_spawn then
|
if not mobs_spawn then
|
||||||
|
@ -579,6 +610,7 @@ function mcl_mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_
|
||||||
spawn_dictionary[key]["min_height"] = min_height
|
spawn_dictionary[key]["min_height"] = min_height
|
||||||
spawn_dictionary[key]["max_height"] = max_height
|
spawn_dictionary[key]["max_height"] = max_height
|
||||||
spawn_dictionary[key]["day_toggle"] = day_toggle
|
spawn_dictionary[key]["day_toggle"] = day_toggle
|
||||||
|
spawn_dictionary[key]["check_position"] = check_position
|
||||||
|
|
||||||
summary_chance = summary_chance + chance
|
summary_chance = summary_chance + chance
|
||||||
end
|
end
|
||||||
|
@ -653,14 +685,17 @@ end
|
||||||
|
|
||||||
|
|
||||||
local function spawn_check(pos, spawn_def)
|
local function spawn_check(pos, spawn_def)
|
||||||
if not spawn_def then return end
|
if not spawn_def or not pos then return end
|
||||||
|
|
||||||
dbg_spawn_attempts = dbg_spawn_attempts + 1
|
dbg_spawn_attempts = dbg_spawn_attempts + 1
|
||||||
local dimension = mcl_worlds.pos_to_dimension(pos)
|
local dimension = mcl_worlds.pos_to_dimension(pos)
|
||||||
local mob_def = minetest.registered_entities[spawn_def.name]
|
local mob_def = minetest.registered_entities[spawn_def.name]
|
||||||
local mob_type = mob_def.type
|
local mob_type = mob_def.type
|
||||||
local gotten_node = get_node(pos).name
|
local gotten_node = get_node(pos).name
|
||||||
local gotten_biome = minetest.get_biome_data(pos)
|
local gotten_biome = minetest.get_biome_data(pos)
|
||||||
|
|
||||||
if not gotten_node or not gotten_biome then return end
|
if not gotten_node or not gotten_biome then return end
|
||||||
|
|
||||||
gotten_biome = get_biome_name(gotten_biome.biome) --makes it easier to work with
|
gotten_biome = get_biome_name(gotten_biome.biome) --makes it easier to work with
|
||||||
|
|
||||||
local is_ground = minetest.get_item_group(gotten_node,"solid") ~= 0
|
local is_ground = minetest.get_item_group(gotten_node,"solid") ~= 0
|
||||||
|
@ -676,25 +711,57 @@ local function spawn_check(pos, spawn_def)
|
||||||
local is_bedrock = gotten_node == "mcl_core:bedrock"
|
local is_bedrock = gotten_node == "mcl_core:bedrock"
|
||||||
local is_grass = minetest.get_item_group(gotten_node,"grass_block") ~= 0
|
local is_grass = minetest.get_item_group(gotten_node,"grass_block") ~= 0
|
||||||
|
|
||||||
if pos and spawn_def
|
if pos.y >= spawn_def.min_height
|
||||||
and pos.y >= spawn_def.min_height
|
|
||||||
and pos.y <= spawn_def.max_height
|
and pos.y <= spawn_def.max_height
|
||||||
and spawn_def.dimension == dimension
|
and spawn_def.dimension == dimension
|
||||||
and biome_check(spawn_def.biomes, gotten_biome)
|
and biome_check(spawn_def.biomes, gotten_biome) then
|
||||||
and (is_ground or spawn_def.type_of_spawning ~= "ground")
|
|
||||||
|
if (is_ground or spawn_def.type_of_spawning ~= "ground")
|
||||||
and (spawn_def.type_of_spawning ~= "ground" or not is_leaf)
|
and (spawn_def.type_of_spawning ~= "ground" or not is_leaf)
|
||||||
and has_room(mob_def,pos)
|
|
||||||
and (spawn_def.check_position and spawn_def.check_position(pos) or true)
|
|
||||||
and (not is_farm_animal(spawn_def.name) or is_grass)
|
and (not is_farm_animal(spawn_def.name) or is_grass)
|
||||||
and (spawn_def.type_of_spawning ~= "water" or is_water)
|
and (spawn_def.type_of_spawning ~= "water" or is_water)
|
||||||
and ( not spawn_protected or not minetest.is_protected(pos, "") )
|
and not is_bedrock
|
||||||
and not is_bedrock then
|
and has_room(mob_def,pos)
|
||||||
--only need to poll for node light if everything else worked
|
and (spawn_def.check_position and spawn_def.check_position(pos) or spawn_def.check_position == nil)
|
||||||
|
and ( not spawn_protected or not minetest.is_protected(pos, "") ) then
|
||||||
|
|
||||||
local gotten_light = get_node_light(pos)
|
local gotten_light = get_node_light(pos)
|
||||||
|
|
||||||
|
if modern_lighting then
|
||||||
|
local my_node = get_node(pos)
|
||||||
|
local sky_light = minetest.get_natural_light(pos)
|
||||||
|
local art_light = minetest.get_artificial_light(my_node.param1)
|
||||||
|
|
||||||
|
if dimension == "nether" then
|
||||||
|
if art_light <= nether_threshold then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
elseif dimension == "end" then
|
||||||
|
if art_light <= end_threshold then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
elseif dimension == "overworld" then
|
||||||
|
if mob_type == "monster" then
|
||||||
|
if mob_def.spawn_check then
|
||||||
|
return mob_def.spawn_check(pos, gotten_light, art_light, sky_light)
|
||||||
|
elseif art_light <= overworld_threshold and sky_light <= overworld_sky_threshold then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if mob_def.spawn_check then
|
||||||
|
return mob_def.spawn_check(pos, gotten_light, art_light, sky_light)
|
||||||
|
elseif gotten_light > overworld_passive_threshold then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
if gotten_light >= spawn_def.min_light and gotten_light <= spawn_def.max_light then
|
if gotten_light >= spawn_def.min_light and gotten_light <= spawn_def.max_light then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -814,7 +881,7 @@ if mobs_spawn then
|
||||||
-- Get pos to spawn, x and z are randomised, y is range
|
-- Get pos to spawn, x and z are randomised, y is range
|
||||||
|
|
||||||
|
|
||||||
local function mob_cap_space (pos, mob_type, mob_counts_close, mob_counts_wide)
|
local function mob_cap_space (pos, mob_type, mob_counts_close, mob_counts_wide, cap_space_hostile, cap_space_non_hostile)
|
||||||
|
|
||||||
-- Some mob examples
|
-- Some mob examples
|
||||||
--type = "monster", spawn_class = "hostile",
|
--type = "monster", spawn_class = "hostile",
|
||||||
|
@ -830,9 +897,18 @@ if mobs_spawn then
|
||||||
mob_total_wide = 0
|
mob_total_wide = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
local cap_space_wide = type_cap - mob_total_wide
|
local cap_space_wide = math.max(type_cap - mob_total_wide, 0)
|
||||||
if cap_space_wide < 1 then
|
|
||||||
cap_space_wide = 0
|
mcl_log("mob_type", mob_type)
|
||||||
|
mcl_log("cap_space_wide", cap_space_wide)
|
||||||
|
|
||||||
|
local cap_space_available = 0
|
||||||
|
if mob_type == "hostile" then
|
||||||
|
mcl_log("cap_space_global", cap_space_hostile)
|
||||||
|
cap_space_available = math.min(cap_space_hostile, cap_space_wide)
|
||||||
|
else
|
||||||
|
mcl_log("cap_space_global", cap_space_non_hostile)
|
||||||
|
cap_space_available = math.min(cap_space_non_hostile, cap_space_wide)
|
||||||
end
|
end
|
||||||
|
|
||||||
local mob_total_close = mob_counts_close[mob_type]
|
local mob_total_close = mob_counts_close[mob_type]
|
||||||
|
@ -841,12 +917,11 @@ if mobs_spawn then
|
||||||
mob_total_close = 0
|
mob_total_close = 0
|
||||||
end
|
end
|
||||||
|
|
||||||
local cap_space_close = close_zone_cap - mob_total_close
|
local cap_space_close = math.max(close_zone_cap - mob_total_close, 0)
|
||||||
if cap_space_close < 1 then
|
cap_space_available = math.min(cap_space_available, cap_space_close)
|
||||||
cap_space_close = 0
|
|
||||||
end
|
|
||||||
|
|
||||||
--mcl_log("spawn_class: " .. spawn_class)
|
mcl_log("cap_space_close", cap_space_close)
|
||||||
|
mcl_log("cap_space_available", cap_space_available)
|
||||||
|
|
||||||
if false and mob_type == "water" then
|
if false and mob_type == "water" then
|
||||||
mcl_log("mob_type: " .. mob_type .. " and pos: " .. minetest.pos_to_string(pos))
|
mcl_log("mob_type: " .. mob_type .. " and pos: " .. minetest.pos_to_string(pos))
|
||||||
|
@ -856,7 +931,7 @@ if mobs_spawn then
|
||||||
mcl_log("cap_space_close: " .. cap_space_close)
|
mcl_log("cap_space_close: " .. cap_space_close)
|
||||||
end
|
end
|
||||||
|
|
||||||
return cap_space_wide, cap_space_close
|
return cap_space_available
|
||||||
end
|
end
|
||||||
|
|
||||||
local function find_spawning_position(pos, max_times)
|
local function find_spawning_position(pos, max_times)
|
||||||
|
@ -867,7 +942,7 @@ if mobs_spawn then
|
||||||
|
|
||||||
local y_min, y_max = decypher_limits(pos.y)
|
local y_min, y_max = decypher_limits(pos.y)
|
||||||
|
|
||||||
mcl_log("mapgen_limit: " .. SPAWN_MAPGEN_LIMIT)
|
--mcl_log("mapgen_limit: " .. SPAWN_MAPGEN_LIMIT)
|
||||||
local i = 0
|
local i = 0
|
||||||
repeat
|
repeat
|
||||||
local goal_pos = get_next_mob_spawn_pos(pos)
|
local goal_pos = get_next_mob_spawn_pos(pos)
|
||||||
|
@ -899,7 +974,7 @@ if mobs_spawn then
|
||||||
return spawning_position
|
return spawning_position
|
||||||
end
|
end
|
||||||
|
|
||||||
local function spawn_a_mob(pos)
|
local function spawn_a_mob(pos, cap_space_hostile, cap_space_non_hostile)
|
||||||
--create a disconnected clone of the spawn dictionary, prevents memory leak
|
--create a disconnected clone of the spawn dictionary, prevents memory leak
|
||||||
local mob_library_worker_table = table_copy(spawn_dictionary)
|
local mob_library_worker_table = table_copy(spawn_dictionary)
|
||||||
|
|
||||||
|
@ -937,22 +1012,18 @@ if mobs_spawn then
|
||||||
if mob_def and mob_def.name and minetest.registered_entities[mob_def.name] then
|
if mob_def and mob_def.name and minetest.registered_entities[mob_def.name] then
|
||||||
|
|
||||||
local mob_def_ent = minetest.registered_entities[mob_def.name]
|
local mob_def_ent = minetest.registered_entities[mob_def.name]
|
||||||
--local mob_type = mob_def_ent.type
|
|
||||||
local mob_spawn_class = mob_def_ent.spawn_class
|
local mob_spawn_class = mob_def_ent.spawn_class
|
||||||
|
|
||||||
--mcl_log("mob_spawn_class: " .. mob_spawn_class)
|
local cap_space_available = mob_cap_space (spawning_position, mob_spawn_class, mob_counts_close, mob_counts_wide, cap_space_hostile, cap_space_non_hostile)
|
||||||
|
|
||||||
local cap_space_wide, cap_space_close = mob_cap_space (spawning_position, mob_spawn_class, mob_counts_close, mob_counts_wide)
|
if cap_space_available > 0 then
|
||||||
|
|
||||||
|
|
||||||
if cap_space_close > 0 and cap_space_wide > 0 then
|
|
||||||
--mcl_log("Cap space available")
|
--mcl_log("Cap space available")
|
||||||
|
|
||||||
-- Spawn caps for animals and water creatures fill up rapidly. Need to throttle this somewhat
|
-- Spawn caps for animals and water creatures fill up rapidly. Need to throttle this somewhat
|
||||||
-- for performance and for early game challenge. We don't want to reduce hostiles though.
|
-- for performance and for early game challenge. We don't want to reduce hostiles though.
|
||||||
local spawn_hostile = (mob_spawn_class == "hostile")
|
local spawn_hostile = (mob_spawn_class == "hostile")
|
||||||
local spawn_passive = (mob_spawn_class ~= "hostile") and math.random(100) < peaceful_percentage_spawned
|
local spawn_passive = (mob_spawn_class ~= "hostile") and math.random(100) < peaceful_percentage_spawned
|
||||||
-- or not hostile
|
|
||||||
--mcl_log("Spawn_passive: " .. tostring(spawn_passive))
|
--mcl_log("Spawn_passive: " .. tostring(spawn_passive))
|
||||||
--mcl_log("Spawn_hostile: " .. tostring(spawn_hostile))
|
--mcl_log("Spawn_hostile: " .. tostring(spawn_hostile))
|
||||||
|
|
||||||
|
@ -984,12 +1055,9 @@ if mobs_spawn then
|
||||||
if not group_min then group_min = 1 end
|
if not group_min then group_min = 1 end
|
||||||
|
|
||||||
local amount_to_spawn = math.random(group_min, spawn_in_group)
|
local amount_to_spawn = math.random(group_min, spawn_in_group)
|
||||||
|
|
||||||
if amount_to_spawn > cap_space_wide then
|
|
||||||
mcl_log("Spawning quantity: " .. amount_to_spawn)
|
mcl_log("Spawning quantity: " .. amount_to_spawn)
|
||||||
mcl_log("Throttle amount to cap space: " .. cap_space_wide)
|
amount_to_spawn = math.min(amount_to_spawn, cap_space_available)
|
||||||
amount_to_spawn = cap_space_wide
|
mcl_log("throttled spawning quantity: " .. amount_to_spawn)
|
||||||
end
|
|
||||||
|
|
||||||
if logging then
|
if logging then
|
||||||
minetest.log("action", "[mcl_mobs] A group of " ..amount_to_spawn .. " " .. mob_def.name .. " mob spawns on " ..minetest.get_node(vector.offset(spawning_position,0,-1,0)).name .." at " .. minetest.pos_to_string(spawning_position, 1))
|
minetest.log("action", "[mcl_mobs] A group of " ..amount_to_spawn .. " " .. mob_def.name .. " mob spawns on " ..minetest.get_node(vector.offset(spawning_position,0,-1,0)).name .." at " .. minetest.pos_to_string(spawning_position, 1))
|
||||||
|
@ -1004,7 +1072,7 @@ if mobs_spawn then
|
||||||
|
|
||||||
if spawned then
|
if spawned then
|
||||||
--mcl_log("We have spawned")
|
--mcl_log("We have spawned")
|
||||||
mob_counts_close, mob_counts_wide, total_mobs = count_mobs_all("type", pos)
|
mob_counts_close, mob_counts_wide, total_mobs = count_mobs_all("spawn_class", pos)
|
||||||
local new_spawning_position = find_spawning_position(pos, FIND_SPAWN_POS_RETRIES_SUCCESS_RESPIN)
|
local new_spawning_position = find_spawning_position(pos, FIND_SPAWN_POS_RETRIES_SUCCESS_RESPIN)
|
||||||
if new_spawning_position then
|
if new_spawning_position then
|
||||||
mcl_log("Setting new spawning position")
|
mcl_log("Setting new spawning position")
|
||||||
|
@ -1014,10 +1082,10 @@ if mobs_spawn then
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
mcl_log("Spawn check failed")
|
--mcl_log("Spawn check failed")
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
mcl_log("Cap space full")
|
--mcl_log("Cap space full")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -1037,7 +1105,13 @@ if mobs_spawn then
|
||||||
timer = 0
|
timer = 0
|
||||||
|
|
||||||
local players = get_connected_players()
|
local players = get_connected_players()
|
||||||
local total_mobs = count_mobs_total_cap()
|
local total_mobs, total_non_hostile, total_hostile = count_mobs_total_cap()
|
||||||
|
|
||||||
|
local cap_space_hostile = math.max(mob_cap.global_hostile - total_hostile, 0)
|
||||||
|
local cap_space_non_hostile = math.max(mob_cap.global_non_hostile - total_non_hostile, 0)
|
||||||
|
mcl_log("global cap_space_hostile", cap_space_hostile)
|
||||||
|
mcl_log("global cap_space_non_hostile", cap_space_non_hostile)
|
||||||
|
|
||||||
if total_mobs > mob_cap.total or total_mobs > #players * mob_cap.player then
|
if total_mobs > mob_cap.total or total_mobs > #players * mob_cap.player then
|
||||||
minetest.log("action","[mcl_mobs] global mob cap reached. no cycle spawning.")
|
minetest.log("action","[mcl_mobs] global mob cap reached. no cycle spawning.")
|
||||||
return
|
return
|
||||||
|
@ -1048,21 +1122,49 @@ if mobs_spawn then
|
||||||
local dimension = mcl_worlds.pos_to_dimension(pos)
|
local dimension = mcl_worlds.pos_to_dimension(pos)
|
||||||
-- ignore void and unloaded area
|
-- ignore void and unloaded area
|
||||||
if dimension ~= "void" and dimension ~= "default" then
|
if dimension ~= "void" and dimension ~= "default" then
|
||||||
spawn_a_mob(pos)
|
spawn_a_mob(pos, cap_space_hostile, cap_space_non_hostile)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function despawn_allowed(self)
|
||||||
|
local nametag = self.nametag and self.nametag ~= ""
|
||||||
|
local not_busy = self.state ~= "attack" and self.following == nil
|
||||||
|
if self.can_despawn == true then
|
||||||
|
if not nametag and not_busy and not self.tamed == true and not self.persistent == true then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function mob_class:despawn_allowed()
|
||||||
|
despawn_allowed(self)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
assert(despawn_allowed({can_despawn=false}) == false, "despawn_allowed - can_despawn false failed")
|
||||||
|
assert(despawn_allowed({can_despawn=true}) == true, "despawn_allowed - can_despawn true failed")
|
||||||
|
|
||||||
|
assert(despawn_allowed({can_despawn=true, nametag=""}) == true, "despawn_allowed - blank nametag failed")
|
||||||
|
assert(despawn_allowed({can_despawn=true, nametag=nil}) == true, "despawn_allowed - nil nametag failed")
|
||||||
|
assert(despawn_allowed({can_despawn=true, nametag="bob"}) == false, "despawn_allowed - nametag failed")
|
||||||
|
|
||||||
|
assert(despawn_allowed({can_despawn=true, state="attack"}) == false, "despawn_allowed - attack state failed")
|
||||||
|
assert(despawn_allowed({can_despawn=true, following="blah"}) == false, "despawn_allowed - following state failed")
|
||||||
|
|
||||||
|
assert(despawn_allowed({can_despawn=true, tamed=false}) == true, "despawn_allowed - not tamed")
|
||||||
|
assert(despawn_allowed({can_despawn=true, tamed=true}) == false, "despawn_allowed - tamed")
|
||||||
|
|
||||||
|
assert(despawn_allowed({can_despawn=true, persistent=true}) == false, "despawn_allowed - persistent")
|
||||||
|
assert(despawn_allowed({can_despawn=true, persistent=false}) == true, "despawn_allowed - not persistent")
|
||||||
|
|
||||||
function mob_class:check_despawn(pos, dtime)
|
function mob_class:check_despawn(pos, dtime)
|
||||||
self.lifetimer = self.lifetimer - dtime
|
self.lifetimer = self.lifetimer - dtime
|
||||||
|
|
||||||
-- Despawning: when lifetimer expires, remove mob
|
-- Despawning: when lifetimer expires, remove mob
|
||||||
if remove_far
|
if remove_far and despawn_allowed(self) then
|
||||||
and self.can_despawn == true
|
|
||||||
and ((not self.nametag) or (self.nametag == ""))
|
|
||||||
and self.state ~= "attack"
|
|
||||||
and self.following == nil then
|
|
||||||
if self.despawn_immediately or self.lifetimer <= 0 then
|
if self.despawn_immediately or self.lifetimer <= 0 then
|
||||||
if logging then
|
if logging then
|
||||||
minetest.log("action", "[mcl_mobs] Mob "..self.name.." despawns at "..minetest.pos_to_string(pos, 1) .. " lifetimer ran out")
|
minetest.log("action", "[mcl_mobs] Mob "..self.name.." despawns at "..minetest.pos_to_string(pos, 1) .. " lifetimer ran out")
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# textdomain:mcl_paintings
|
||||||
|
Painting=Maleri
|
|
@ -0,0 +1,2 @@
|
||||||
|
# textdomain:mcl_paintings
|
||||||
|
Painting=Cuadro
|
|
@ -1,2 +1,2 @@
|
||||||
# textdomain:mcl_paintings
|
# textdomain:mcl_paintings
|
||||||
Painting=Рисование
|
Painting=Картина
|
||||||
|
|
|
@ -2,6 +2,9 @@ local dim = {"x", "z"}
|
||||||
|
|
||||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||||
|
|
||||||
|
local anti_troll = minetest.settings:get_bool("wither_anti_troll_measures", false)
|
||||||
|
local peaceful = minetest.settings:get_bool("only_peaceful_mobs", false)
|
||||||
|
|
||||||
local function load_schem(filename)
|
local function load_schem(filename)
|
||||||
local file = io.open(modpath .. "/schems/" .. filename, "r")
|
local file = io.open(modpath .. "/schems/" .. filename, "r")
|
||||||
local data = minetest.deserialize(file:read())
|
local data = minetest.deserialize(file:read())
|
||||||
|
@ -9,6 +12,14 @@ local function load_schem(filename)
|
||||||
return data
|
return data
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local wboss_overworld = 0
|
||||||
|
local wboss_nether = 0
|
||||||
|
local wboss_end = 0
|
||||||
|
|
||||||
|
local LIM_OVERWORLD = tonumber(minetest.settings:get("wither_cap_overworld")) or 3
|
||||||
|
local LIM_NETHER = tonumber(minetest.settings:get("wither_cap_nether")) or 10
|
||||||
|
local LIM_END = tonumber(minetest.settings:get("wither_cap_end")) or 5
|
||||||
|
|
||||||
local wither_spawn_schems = {}
|
local wither_spawn_schems = {}
|
||||||
|
|
||||||
for _, d in pairs(dim) do
|
for _, d in pairs(dim) do
|
||||||
|
@ -16,8 +27,13 @@ for _, d in pairs(dim) do
|
||||||
end
|
end
|
||||||
|
|
||||||
local function check_schem(pos, schem)
|
local function check_schem(pos, schem)
|
||||||
|
local cn_name
|
||||||
for _, n in pairs(schem) do
|
for _, n in pairs(schem) do
|
||||||
if minetest.get_node(vector.add(pos, n)).name ~= n.name then
|
cn_name = minetest.get_node(vector.add(pos, n)).name
|
||||||
|
if string.find(cn_name, "mcl_heads:wither_skeleton") then
|
||||||
|
cn_name = "mcl_heads:wither_skeleton"
|
||||||
|
end
|
||||||
|
if cn_name ~= n.name then
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -30,14 +46,32 @@ local function remove_schem(pos, schem)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function wither_spawn(pos)
|
local function check_limit(pos)
|
||||||
|
local dim = mcl_worlds.pos_to_dimension(pos)
|
||||||
|
if dim == "overworld" and wboss_overworld >= LIM_OVERWORLD then return false
|
||||||
|
elseif dim == "end" and wboss_end >= LIM_END then return false
|
||||||
|
elseif wboss_nether >= LIM_NETHER then return false
|
||||||
|
else return true end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function wither_spawn(pos, player)
|
||||||
|
if peaceful then return end
|
||||||
for _, d in pairs(dim) do
|
for _, d in pairs(dim) do
|
||||||
for i = 0, 2 do
|
for i = 0, 2 do
|
||||||
local p = vector.add(pos, {x = 0, y = -2, z = 0, [d] = -i})
|
local p = vector.add(pos, {x = 0, y = -2, z = 0, [d] = -i})
|
||||||
local schem = wither_spawn_schems[d]
|
local schem = wither_spawn_schems[d]
|
||||||
if check_schem(p, schem) then
|
if check_schem(p, schem) and (not anti_troll or check_limit(pos)) then
|
||||||
remove_schem(p, schem)
|
remove_schem(p, schem)
|
||||||
minetest.add_entity(vector.add(p, {x = 0, y = 1, z = 0, [d] = 1}), "mobs_mc:wither")
|
local wither = minetest.add_entity(vector.add(p, {x = 0, y = 1, z = 0, [d] = 1}), "mobs_mc:wither")
|
||||||
|
if not wither then return end
|
||||||
|
local wither_ent = wither:get_luaentity()
|
||||||
|
wither_ent._spawner = player:get_player_name()
|
||||||
|
local dim = mcl_worlds.pos_to_dimension(pos)
|
||||||
|
if dim == "overworld" then
|
||||||
|
wboss_overworld = wboss_overworld + 1
|
||||||
|
elseif dim == "end" then
|
||||||
|
wboss_end = wboss_end + 1
|
||||||
|
else wboss_nether = wboss_nether + 1 end
|
||||||
local objects = minetest.get_objects_inside_radius(pos, 20)
|
local objects = minetest.get_objects_inside_radius(pos, 20)
|
||||||
for _, players in ipairs(objects) do
|
for _, players in ipairs(objects) do
|
||||||
if players:is_player() then
|
if players:is_player() then
|
||||||
|
@ -54,7 +88,19 @@ local old_on_place = wither_head.on_place
|
||||||
function wither_head.on_place(itemstack, placer, pointed)
|
function wither_head.on_place(itemstack, placer, pointed)
|
||||||
local n = minetest.get_node(vector.offset(pointed.above,0,-1,0))
|
local n = minetest.get_node(vector.offset(pointed.above,0,-1,0))
|
||||||
if n and n.name == "mcl_nether:soul_sand" then
|
if n and n.name == "mcl_nether:soul_sand" then
|
||||||
minetest.after(0, wither_spawn, pointed.above)
|
minetest.after(0, wither_spawn, pointed.above, placer)
|
||||||
end
|
end
|
||||||
return old_on_place(itemstack, placer, pointed)
|
return old_on_place(itemstack, placer, pointed)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if anti_troll then
|
||||||
|
-- pull wither counts per dimension
|
||||||
|
minetest.register_globalstep(function(dtime)
|
||||||
|
wboss_overworld = mobs_mc.wither_count_overworld
|
||||||
|
wboss_nether = mobs_mc.wither_count_nether
|
||||||
|
wboss_end = mobs_mc.wither_count_end
|
||||||
|
mobs_mc.wither_count_overworld = 0
|
||||||
|
mobs_mc.wither_count_nether = 0
|
||||||
|
mobs_mc.wither_count_end = 0
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
|
@ -191,9 +191,10 @@ Origin of those models:
|
||||||
* [Spennnyyy](https://freesound.org/people/Spennnyyy/) (CC0)
|
* [Spennnyyy](https://freesound.org/people/Spennnyyy/) (CC0)
|
||||||
* `mcl_totems_totem.ogg`
|
* `mcl_totems_totem.ogg`
|
||||||
* Source: <https://freesound.org/people/Spennnyyy/sounds/323502/>
|
* Source: <https://freesound.org/people/Spennnyyy/sounds/323502/>
|
||||||
* [Baŝto](https://opengameart.org/users/ba%C5%9Dto)
|
* [Baŝto](https://opengameart.org/users/ba%C5%9Dto) (remixer) and [kantouth](https://freesound.org/people/kantouth/) (original author)
|
||||||
* `mobs_mc_skeleton_random.*.ogg` (CC BY 3.0)
|
* `mobs_mc_skeleton_random.*.ogg` (CC BY 3.0)
|
||||||
* Source: <https://opengameart.org/content/walking-skeleton>
|
* Source: <https://opengameart.org/content/walking-skeleton>
|
||||||
|
* Based on: <https://freesound.org/people/kantouth/sounds/115113/>
|
||||||
* [spookymodem](https://freesound.org/people/spookymodem/)
|
* [spookymodem](https://freesound.org/people/spookymodem/)
|
||||||
* `mobs_mc_skeleton_death.ogg` (CC0)
|
* `mobs_mc_skeleton_death.ogg` (CC0)
|
||||||
* <https://freesound.org/people/spookymodem/sounds/202091/>
|
* <https://freesound.org/people/spookymodem/sounds/202091/>
|
||||||
|
@ -307,4 +308,4 @@ Origin of those models:
|
||||||
|
|
||||||
Note: Many of these sounds have been more or less modified to fit the game.
|
Note: Many of these sounds have been more or less modified to fit the game.
|
||||||
|
|
||||||
Sounds not mentioned hre are licensed under CC0.
|
Sounds not mentioned here are licensed under CC0.
|
||||||
|
|
|
@ -39,7 +39,7 @@ This mod adds mobs which closely resemble the mobs from the game Minecraft, vers
|
||||||
* Cave Spider
|
* Cave Spider
|
||||||
* Enderman
|
* Enderman
|
||||||
* Zombie Villager
|
* Zombie Villager
|
||||||
* Zombie Pigman
|
* Zombie Piglin
|
||||||
* Wither Skeleton
|
* Wither Skeleton
|
||||||
* Magma Cube
|
* Magma Cube
|
||||||
* Blaze
|
* Blaze
|
||||||
|
|
|
@ -2,7 +2,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
local axolotl = {
|
local axolotl = {
|
||||||
type = "animal",
|
type = "animal",
|
||||||
spawn_class = "water",
|
spawn_class = "axolotl",
|
||||||
can_despawn = true,
|
can_despawn = true,
|
||||||
passive = false,
|
passive = false,
|
||||||
hp_min = 14,
|
hp_min = 14,
|
||||||
|
@ -13,7 +13,7 @@ local axolotl = {
|
||||||
head_swivel = "head.control",
|
head_swivel = "head.control",
|
||||||
bone_eye_height = -1,
|
bone_eye_height = -1,
|
||||||
head_eye_height = -0.5,
|
head_eye_height = -0.5,
|
||||||
horrizonatal_head_height = 0,
|
horizontal_head_height = 0,
|
||||||
curiosity = 10,
|
curiosity = 10,
|
||||||
head_yaw="z",
|
head_yaw="z",
|
||||||
|
|
||||||
|
@ -78,7 +78,6 @@ local axolotl = {
|
||||||
attack_animals = true,
|
attack_animals = true,
|
||||||
specific_attack = {
|
specific_attack = {
|
||||||
"extra_mobs_cod",
|
"extra_mobs_cod",
|
||||||
"mobs_mc:sheep",
|
|
||||||
"extra_mobs_glow_squid",
|
"extra_mobs_glow_squid",
|
||||||
"extra_mobs_salmon",
|
"extra_mobs_salmon",
|
||||||
"extra_mobs_tropical_fish",
|
"extra_mobs_tropical_fish",
|
||||||
|
|
|
@ -2,6 +2,18 @@
|
||||||
|
|
||||||
local S = minetest.get_translator("mobs_mc")
|
local S = minetest.get_translator("mobs_mc")
|
||||||
|
|
||||||
|
local function spawn_check(pos, environmental_light, artificial_light, sky_light)
|
||||||
|
local date = os.date("*t")
|
||||||
|
local maxlight
|
||||||
|
if (date.month == 10 and date.day >= 20) or (date.month == 11 and date.day <= 3) then
|
||||||
|
maxlight = 6
|
||||||
|
else
|
||||||
|
maxlight = 3
|
||||||
|
end
|
||||||
|
|
||||||
|
return artificial_light <= maxlight
|
||||||
|
end
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:bat", {
|
mcl_mobs.register_mob("mobs_mc:bat", {
|
||||||
description = S("Bat"),
|
description = S("Bat"),
|
||||||
type = "animal",
|
type = "animal",
|
||||||
|
@ -50,6 +62,7 @@ mcl_mobs.register_mob("mobs_mc:bat", {
|
||||||
jump = false,
|
jump = false,
|
||||||
fly = true,
|
fly = true,
|
||||||
makes_footstep_sound = false,
|
makes_footstep_sound = false,
|
||||||
|
spawn_check = spawn_check,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,9 @@ local mod_target = minetest.get_modpath("mcl_target")
|
||||||
--################### BLAZE
|
--################### BLAZE
|
||||||
--###################
|
--###################
|
||||||
|
|
||||||
|
local function spawn_check(pos, environmental_light, artificial_light, sky_light)
|
||||||
|
return artificial_light <= 11
|
||||||
|
end
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:blaze", {
|
mcl_mobs.register_mob("mobs_mc:blaze", {
|
||||||
description = S("Blaze"),
|
description = S("Blaze"),
|
||||||
|
@ -137,6 +140,7 @@ mcl_mobs.register_mob("mobs_mc:blaze", {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
end,
|
end,
|
||||||
|
spawn_check = spawn_check,
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
|
|
|
@ -23,7 +23,7 @@ mcl_mobs.register_mob("mobs_mc:chicken", {
|
||||||
head_swivel = "head.control",
|
head_swivel = "head.control",
|
||||||
bone_eye_height = 4,
|
bone_eye_height = 4,
|
||||||
head_eye_height = 1.5,
|
head_eye_height = 1.5,
|
||||||
horrizonatal_head_height = -.3,
|
horizontal_head_height = -.3,
|
||||||
curiosity = 10,
|
curiosity = 10,
|
||||||
head_yaw="z",
|
head_yaw="z",
|
||||||
visual_size = {x=1,y=1},
|
visual_size = {x=1,y=1},
|
||||||
|
|
|
@ -31,7 +31,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
local cod = {
|
local cod = {
|
||||||
type = "animal",
|
type = "animal",
|
||||||
spawn_class = "water",
|
spawn_class = "water_ambient",
|
||||||
can_despawn = true,
|
can_despawn = true,
|
||||||
passive = true,
|
passive = true,
|
||||||
hp_min = 3,
|
hp_min = 3,
|
||||||
|
|
|
@ -24,7 +24,7 @@ local cow_def = {
|
||||||
head_swivel = "head.control",
|
head_swivel = "head.control",
|
||||||
bone_eye_height = 10,
|
bone_eye_height = 10,
|
||||||
head_eye_height = 1.1,
|
head_eye_height = 1.1,
|
||||||
horrizonatal_head_height=-1.8,
|
horizontal_head_height=-1.8,
|
||||||
curiosity = 2,
|
curiosity = 2,
|
||||||
head_yaw="z",
|
head_yaw="z",
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
|
@ -105,7 +105,7 @@ mooshroom_def.on_rightclick = function(self, clicker)
|
||||||
end
|
end
|
||||||
local item = clicker:get_wielded_item()
|
local item = clicker:get_wielded_item()
|
||||||
-- Use shears to get mushrooms and turn mooshroom into cow
|
-- Use shears to get mushrooms and turn mooshroom into cow
|
||||||
if item:get_name() == "mcl_tools:shears" then
|
if minetest.get_item_group(item:get_name(), "shears") > 0 then
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
minetest.sound_play("mcl_tools_shears_cut", {pos = pos}, true)
|
minetest.sound_play("mcl_tools_shears_cut", {pos = pos}, true)
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ local S = minetest.get_translator("mobs_mc")
|
||||||
|
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:creeper", {
|
mcl_mobs.register_mob("mobs_mc:creeper", {
|
||||||
|
description = S("Creeper"),
|
||||||
type = "monster",
|
type = "monster",
|
||||||
spawn_class = "hostile",
|
spawn_class = "hostile",
|
||||||
spawn_in_group = 1,
|
spawn_in_group = 1,
|
||||||
|
@ -23,6 +24,7 @@ mcl_mobs.register_mob("mobs_mc:creeper", {
|
||||||
mesh = "mobs_mc_creeper.b3d",
|
mesh = "mobs_mc_creeper.b3d",
|
||||||
head_swivel = "Head_Control",
|
head_swivel = "Head_Control",
|
||||||
bone_eye_height = 2.35,
|
bone_eye_height = 2.35,
|
||||||
|
head_eye_height = 1.8;
|
||||||
curiosity = 2,
|
curiosity = 2,
|
||||||
textures = {
|
textures = {
|
||||||
{"mobs_mc_creeper.png",
|
{"mobs_mc_creeper.png",
|
||||||
|
@ -39,7 +41,7 @@ mcl_mobs.register_mob("mobs_mc:creeper", {
|
||||||
},
|
},
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
walk_velocity = 1.05,
|
walk_velocity = 1.05,
|
||||||
run_velocity = 2.1,
|
run_velocity = 2.0,
|
||||||
runaway_from = { "mobs_mc:ocelot", "mobs_mc:cat" },
|
runaway_from = { "mobs_mc:ocelot", "mobs_mc:cat" },
|
||||||
attack_type = "explode",
|
attack_type = "explode",
|
||||||
|
|
||||||
|
@ -48,7 +50,7 @@ mcl_mobs.register_mob("mobs_mc:creeper", {
|
||||||
explosion_strength = 3,
|
explosion_strength = 3,
|
||||||
explosion_radius = 3.5,
|
explosion_radius = 3.5,
|
||||||
explosion_damage_radius = 3.5,
|
explosion_damage_radius = 3.5,
|
||||||
explosiontimer_reset_radius = 6,
|
explosiontimer_reset_radius = 3,
|
||||||
reach = 3,
|
reach = 3,
|
||||||
explosion_timer = 1.5,
|
explosion_timer = 1.5,
|
||||||
allow_fuse_reset = true,
|
allow_fuse_reset = true,
|
||||||
|
@ -170,7 +172,7 @@ mcl_mobs.register_mob("mobs_mc:creeper_charged", {
|
||||||
explosion_strength = 6,
|
explosion_strength = 6,
|
||||||
explosion_radius = 8,
|
explosion_radius = 8,
|
||||||
explosion_damage_radius = 8,
|
explosion_damage_radius = 8,
|
||||||
explosiontimer_reset_radius = 6,
|
explosiontimer_reset_radius = 3,
|
||||||
reach = 3,
|
reach = 3,
|
||||||
explosion_timer = 1.5,
|
explosion_timer = 1.5,
|
||||||
allow_fuse_reset = true,
|
allow_fuse_reset = true,
|
||||||
|
|
|
@ -136,6 +136,7 @@ mcl_mobs.register_mob("mobs_mc:enderdragon", {
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
fire_resistant = true,
|
fire_resistant = true,
|
||||||
|
is_boss = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,12 @@
|
||||||
-- added rain damage.
|
-- added rain damage.
|
||||||
-- fixed the grass_with_dirt issue.
|
-- fixed the grass_with_dirt issue.
|
||||||
|
|
||||||
|
-- How freqeuntly to take and place blocks, in seconds
|
||||||
|
local take_frequency_min = 235
|
||||||
|
local take_frequency_max = 245
|
||||||
|
local place_frequency_min = 235
|
||||||
|
local place_frequency_max = 245
|
||||||
|
|
||||||
minetest.register_entity("mobs_mc:ender_eyes", {
|
minetest.register_entity("mobs_mc:ender_eyes", {
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_spider.b3d",
|
mesh = "mobs_mc_spider.b3d",
|
||||||
|
@ -60,13 +66,6 @@ end
|
||||||
|
|
||||||
local pr = PseudoRandom(os.time()*(-334))
|
local pr = PseudoRandom(os.time()*(-334))
|
||||||
|
|
||||||
-- How freqeuntly to take and place blocks, in seconds
|
|
||||||
local take_frequency_min = 235
|
|
||||||
local take_frequency_max = 245
|
|
||||||
local place_frequency_min = 235
|
|
||||||
local place_frequency_max = 245
|
|
||||||
|
|
||||||
|
|
||||||
-- Texuture overrides for enderman block. Required for cactus because it's original is a nodebox
|
-- Texuture overrides for enderman block. Required for cactus because it's original is a nodebox
|
||||||
-- and the textures have tranparent pixels.
|
-- and the textures have tranparent pixels.
|
||||||
local block_texture_overrides
|
local block_texture_overrides
|
||||||
|
@ -491,7 +490,7 @@ mcl_mobs.register_mob("mobs_mc:enderman", {
|
||||||
local dug = minetest.get_node_or_nil(take_pos)
|
local dug = minetest.get_node_or_nil(take_pos)
|
||||||
if dug and dug.name == "air" then
|
if dug and dug.name == "air" then
|
||||||
self._taken_node = node.name
|
self._taken_node = node.name
|
||||||
self.can_despawn = false
|
self.persistent = true
|
||||||
local def = minetest.registered_nodes[self._taken_node]
|
local def = minetest.registered_nodes[self._taken_node]
|
||||||
-- Update animation and texture accordingly (adds visibly carried block)
|
-- Update animation and texture accordingly (adds visibly carried block)
|
||||||
local block_type
|
local block_type
|
||||||
|
@ -542,7 +541,7 @@ mcl_mobs.register_mob("mobs_mc:enderman", {
|
||||||
if success then
|
if success then
|
||||||
local def = minetest.registered_nodes[self._taken_node]
|
local def = minetest.registered_nodes[self._taken_node]
|
||||||
-- Update animation accordingly (removes visible block)
|
-- Update animation accordingly (removes visible block)
|
||||||
self.can_despawn = true
|
self.persistent = false
|
||||||
self.animation = select_enderman_animation("normal")
|
self.animation = select_enderman_animation("normal")
|
||||||
self:set_animation(self.animation.current)
|
self:set_animation(self.animation.current)
|
||||||
if def.sounds and def.sounds.place then
|
if def.sounds and def.sounds.place then
|
||||||
|
|
|
@ -31,7 +31,7 @@ end
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:glow_squid", {
|
mcl_mobs.register_mob("mobs_mc:glow_squid", {
|
||||||
type = "animal",
|
type = "animal",
|
||||||
spawn_class = "water",
|
spawn_class = "water_underground",
|
||||||
can_despawn = true,
|
can_despawn = true,
|
||||||
passive = true,
|
passive = true,
|
||||||
hp_min = 10,
|
hp_min = 10,
|
||||||
|
|
|
@ -10,6 +10,7 @@ local S = minetest.get_translator("mobs_mc")
|
||||||
--###################
|
--###################
|
||||||
|
|
||||||
local hoglin = {
|
local hoglin = {
|
||||||
|
description = S("Hoglin"),
|
||||||
type = "monster",
|
type = "monster",
|
||||||
passive = false,
|
passive = false,
|
||||||
spawn_class = "hostile",
|
spawn_class = "hostile",
|
||||||
|
@ -19,8 +20,9 @@ local hoglin = {
|
||||||
xp_max = 9,
|
xp_max = 9,
|
||||||
armor = {fleshy = 90},
|
armor = {fleshy = 90},
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
|
attack_frequency = 3;
|
||||||
damage = 4,
|
damage = 4,
|
||||||
reach = 3,
|
reach = 1.9,
|
||||||
collisionbox = {-.6, -0.01, -.6, .6, 1.4, .6},
|
collisionbox = {-.6, -0.01, -.6, .6, 1.4, .6},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "extra_mobs_hoglin.b3d",
|
mesh = "extra_mobs_hoglin.b3d",
|
||||||
|
@ -36,7 +38,7 @@ local hoglin = {
|
||||||
jump = true,
|
jump = true,
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
walk_velocity = 1,
|
walk_velocity = 1,
|
||||||
run_velocity = 4,
|
run_velocity = 2.8,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "mobs_mcitems:leather",
|
{name = "mobs_mcitems:leather",
|
||||||
chance = 1,
|
chance = 1,
|
||||||
|
@ -63,7 +65,7 @@ local hoglin = {
|
||||||
punch_end = 32,
|
punch_end = 32,
|
||||||
},
|
},
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
view_range = 32,
|
view_range = 16,
|
||||||
floats = 0,
|
floats = 0,
|
||||||
custom_attack = function(self)
|
custom_attack = function(self)
|
||||||
if self.state == "attack" and self.reach > vector.distance(self.object:get_pos(), self.attack:get_pos()) then
|
if self.state == "attack" and self.reach > vector.distance(self.object:get_pos(), self.attack:get_pos()) then
|
||||||
|
@ -87,6 +89,7 @@ local hoglin = {
|
||||||
mcl_mobs.register_mob("mobs_mc:hoglin", hoglin)
|
mcl_mobs.register_mob("mobs_mc:hoglin", hoglin)
|
||||||
|
|
||||||
local zoglin = table.copy(hoglin)
|
local zoglin = table.copy(hoglin)
|
||||||
|
zoglin.description = S("Zoglin")
|
||||||
zoglin.fire_resistant = 1
|
zoglin.fire_resistant = 1
|
||||||
zoglin.textures = {"extra_mobs_zoglin.png"}
|
zoglin.textures = {"extra_mobs_zoglin.png"}
|
||||||
zoglin.do_custom = function()
|
zoglin.do_custom = function()
|
||||||
|
@ -100,6 +103,7 @@ mcl_mobs.register_mob("mobs_mc:zoglin", zoglin)
|
||||||
-- Baby hoglin.
|
-- Baby hoglin.
|
||||||
|
|
||||||
local baby_hoglin = table.copy(hoglin)
|
local baby_hoglin = table.copy(hoglin)
|
||||||
|
baby_hoglin.description = S("Baby hoglin")
|
||||||
baby_hoglin.collisionbox = {-.3, -0.01, -.3, .3, 0.94, .3}
|
baby_hoglin.collisionbox = {-.3, -0.01, -.3, .3, 0.94, .3}
|
||||||
baby_hoglin.xp_min = 20
|
baby_hoglin.xp_min = 20
|
||||||
baby_hoglin.xp_max = 20
|
baby_hoglin.xp_max = 20
|
||||||
|
@ -120,7 +124,6 @@ mcl_mobs:spawn_specific(
|
||||||
"nether",
|
"nether",
|
||||||
"ground",
|
"ground",
|
||||||
{
|
{
|
||||||
"Nether",
|
|
||||||
"CrimsonForest"
|
"CrimsonForest"
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
|
|
|
@ -139,7 +139,6 @@ dofile(path .. "/silverfish.lua") -- maikerumine Mesh and animation by toby109tt
|
||||||
dofile(path .. "/skeleton+stray.lua") -- Mesh by Morn76 Animation by Pavel_S
|
dofile(path .. "/skeleton+stray.lua") -- Mesh by Morn76 Animation by Pavel_S
|
||||||
dofile(path .. "/skeleton_wither.lua") -- Mesh by Morn76 Animation by Pavel_S
|
dofile(path .. "/skeleton_wither.lua") -- Mesh by Morn76 Animation by Pavel_S
|
||||||
dofile(path .. "/zombie.lua") -- Mesh by Morn76 Animation by Pavel_S
|
dofile(path .. "/zombie.lua") -- Mesh by Morn76 Animation by Pavel_S
|
||||||
dofile(path .. "/zombiepig.lua") -- Mesh by Morn76 Animation by Pavel_S
|
|
||||||
dofile(path .. "/slime+magma_cube.lua") -- Wuzzy
|
dofile(path .. "/slime+magma_cube.lua") -- Wuzzy
|
||||||
dofile(path .. "/spider.lua") -- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture)
|
dofile(path .. "/spider.lua") -- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture)
|
||||||
dofile(path .. "/vex.lua") -- KrupnoPavel
|
dofile(path .. "/vex.lua") -- KrupnoPavel
|
||||||
|
@ -153,7 +152,7 @@ dofile(path .. "/dolphin.lua")
|
||||||
|
|
||||||
dofile(path .. "/glow_squid.lua")
|
dofile(path .. "/glow_squid.lua")
|
||||||
|
|
||||||
dofile(path .. "/piglin.lua")
|
dofile(path .. "/piglin.lua") -- "mobs_mc_zombie_pigman.b3d" Mesh by Morn76 Animation by Pavel_S
|
||||||
dofile(path .. "/hoglin+zoglin.lua")
|
dofile(path .. "/hoglin+zoglin.lua")
|
||||||
|
|
||||||
dofile(path .. "/strider.lua")
|
dofile(path .. "/strider.lua")
|
||||||
|
|
|
@ -4,12 +4,14 @@
|
||||||
--License for code WTFPL and otherwise stated in readmes
|
--License for code WTFPL and otherwise stated in readmes
|
||||||
|
|
||||||
local S = minetest.get_translator("mobs_mc")
|
local S = minetest.get_translator("mobs_mc")
|
||||||
|
local allow_nav_hacks = minetest.settings:get_bool("mcl_mob_allow_nav_hacks ",false)
|
||||||
|
|
||||||
--###################
|
--###################
|
||||||
--################### IRON GOLEM
|
--################### IRON GOLEM
|
||||||
--###################
|
--###################
|
||||||
|
|
||||||
local etime = 0
|
local walk_dist = 40
|
||||||
|
local tele_dist = 80
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:iron_golem", {
|
mcl_mobs.register_mob("mobs_mc:iron_golem", {
|
||||||
description = S("Iron Golem"),
|
description = S("Iron Golem"),
|
||||||
|
@ -85,11 +87,23 @@ mcl_mobs.register_mob("mobs_mc:iron_golem", {
|
||||||
punch_start = 40, punch_end = 50,
|
punch_start = 40, punch_end = 50,
|
||||||
},
|
},
|
||||||
jump = true,
|
jump = true,
|
||||||
on_step = function(self,dtime)
|
do_custom = function(self, dtime)
|
||||||
etime = etime + dtime
|
self.home_timer = (self.home_timer or 0) + dtime
|
||||||
if etime > 10 then
|
|
||||||
if self._home and vector.distance(self._home,self.object:get_pos()) > 50 then
|
if self.home_timer > 10 then
|
||||||
self:gopath(self._home)
|
self.home_timer = 0
|
||||||
|
if self._home and self.state ~= "attack" then
|
||||||
|
local dist = vector.distance(self._home,self.object:get_pos())
|
||||||
|
if allow_nav_hacks and dist >= tele_dist then
|
||||||
|
self.object:set_pos(self._home)
|
||||||
|
self.state = "stand"
|
||||||
|
self.order = "follow"
|
||||||
|
elseif dist >= walk_dist then
|
||||||
|
self:gopath(self._home, function(self)
|
||||||
|
self.state = "stand"
|
||||||
|
self.order = "follow"
|
||||||
|
end)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -62,7 +62,7 @@ mcl_mobs.register_mob("mobs_mc:llama", {
|
||||||
head_swivel = "head.control",
|
head_swivel = "head.control",
|
||||||
bone_eye_height = 11,
|
bone_eye_height = 11,
|
||||||
head_eye_height = 3,
|
head_eye_height = 3,
|
||||||
horrizonatal_head_height=0,
|
horizontal_head_height=0,
|
||||||
curiosity = 60,
|
curiosity = 60,
|
||||||
head_yaw = "z",
|
head_yaw = "z",
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ Wither=Wither
|
||||||
Wolf=Wolf
|
Wolf=Wolf
|
||||||
Husk=Wüstenzombie
|
Husk=Wüstenzombie
|
||||||
Zombie=Zombie
|
Zombie=Zombie
|
||||||
Zombie Pigman=Schweinezombie
|
Zombie Piglin=Schweinezombie
|
||||||
Farmer=Bauer
|
Farmer=Bauer
|
||||||
Fisherman=Fischer
|
Fisherman=Fischer
|
||||||
Fletcher=Pfeilmacher
|
Fletcher=Pfeilmacher
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
# textdomain: mobs_mc
|
||||||
|
Agent=Agent
|
||||||
|
Axolotl=Salamander
|
||||||
|
Bat=Flagermus
|
||||||
|
Blaze=Blaze
|
||||||
|
Chicken=Kylling
|
||||||
|
Cow=Ko
|
||||||
|
Mooshroom=Svamp
|
||||||
|
Creeper=Creeper
|
||||||
|
Ender Dragon=Enderdrage
|
||||||
|
Enderman=Enderman
|
||||||
|
Endermite=Endermide
|
||||||
|
Ghast=Ghast
|
||||||
|
Elder Guardian=Gammel beskytter
|
||||||
|
Guardian=Beskytter
|
||||||
|
Horse=Hest
|
||||||
|
Skeleton Horse=Skelethest
|
||||||
|
Zombie Horse=Zombiehest
|
||||||
|
Donkey=Æsel
|
||||||
|
Mule=Muldyr
|
||||||
|
Iron Golem=Jerngolem
|
||||||
|
Llama=Lama
|
||||||
|
Ocelot=Ozelot
|
||||||
|
Parrot=Papegøje
|
||||||
|
Pig=Gris
|
||||||
|
Polar Bear=Isbjørn
|
||||||
|
Rabbit=Kanin
|
||||||
|
Killer Bunny=Dræberkanin
|
||||||
|
Sheep=Får
|
||||||
|
Shulker=Shulker
|
||||||
|
Silverfish=Sølvfisk
|
||||||
|
Skeleton=Skelet
|
||||||
|
Stray=Omstrejfer
|
||||||
|
Wither Skeleton=Wither-skelet
|
||||||
|
Magma Cube=Magmakube
|
||||||
|
Slime=Slimklump
|
||||||
|
Snow Golem=Snegolem
|
||||||
|
Spider=Edderkop
|
||||||
|
Cave Spider=Huleedderkop
|
||||||
|
Squid=Blæksprutte
|
||||||
|
Vex=Vex
|
||||||
|
Evoker=Fremkalder
|
||||||
|
Illusioner=Illusionist
|
||||||
|
Villager=Landsbyboer
|
||||||
|
Vindicator=Hævner
|
||||||
|
Zombie Villager=Zombie landsbyboer
|
||||||
|
Witch=Heks
|
||||||
|
Wither=Wither
|
||||||
|
Wolf=Ulv
|
||||||
|
Husk=Udtørretskal
|
||||||
|
Zombie=Zombie
|
||||||
|
Zombie Pigman=Zombificeret piglin
|
||||||
|
Farmer=Landmand
|
||||||
|
Fisherman=Fisker
|
||||||
|
Fletcher=Pilemager
|
||||||
|
Shepherd=Fårehyrde
|
||||||
|
Librarian=Bibliotikar
|
||||||
|
Cartographer=Kartograf
|
||||||
|
Armorer=Rustningesmed
|
||||||
|
Leatherworker=Læderarbejder
|
||||||
|
Butcher=Slagter
|
||||||
|
Weapon Smith=Våbensmed
|
||||||
|
Tool Smith=Værktøjssmed
|
||||||
|
Cleric=Gejstlig
|
||||||
|
Nitwit=Tåbe
|
||||||
|
Cod=Torsk
|
||||||
|
Salmon=Laks
|
||||||
|
Dolphin=Delfin
|
||||||
|
Pillager=Plyndrer
|
||||||
|
Tropical fish=Tropisk fisk
|
|
@ -54,5 +54,21 @@ Baby Husk=Bebé Zombi Momificado
|
||||||
Baby Zombie=Bebé Zombi
|
Baby Zombie=Bebé Zombi
|
||||||
Husk=Zombi Momificado
|
Husk=Zombi Momificado
|
||||||
Zombie=Zombi
|
Zombie=Zombi
|
||||||
Baby Zombie Pigman=Bebé Hombrecerdo Zombi
|
Baby Zombie Piglin=Bebé Hombrecerdo Zombi
|
||||||
Zombie Pigman=Hombrecerdo Zombi
|
Zombie Piglin=Hombrecerdo Zombi
|
||||||
|
Cartographer=Cartógrafo
|
||||||
|
Armorer=Escudero
|
||||||
|
Leatherworker=Peletero
|
||||||
|
Butcher=Carnicero
|
||||||
|
Weapon Smith=Armero
|
||||||
|
Tool Smith=Herrero
|
||||||
|
Cleric=Clérigo
|
||||||
|
Nitwit=Holgazán
|
||||||
|
Cod=Bacalao
|
||||||
|
Salmon=Salmón
|
||||||
|
Dolphin=Delfín
|
||||||
|
Pillager=Saqueador
|
||||||
|
Tropical fish=Pez tropical
|
||||||
|
Hoglin=Hoglin
|
||||||
|
Strider=Lavagante
|
||||||
|
Glow Squid=Calamar luminoso
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# textdomain: mobs_mc
|
# textdomain: mobs_mc
|
||||||
Agent=Agent
|
Agent=Agent
|
||||||
|
Axolotl=Axolotl
|
||||||
Bat=Chauve-souris
|
Bat=Chauve-souris
|
||||||
Blaze=Blaze
|
Blaze=Blaze
|
||||||
Chicken=Poulet
|
Chicken=Poulet
|
||||||
|
@ -20,6 +21,7 @@ Mule=Mule
|
||||||
Iron Golem=Golem de fer
|
Iron Golem=Golem de fer
|
||||||
Llama=Lama
|
Llama=Lama
|
||||||
Ocelot=Ocelot
|
Ocelot=Ocelot
|
||||||
|
Cat=Chat
|
||||||
Parrot=Perroquet
|
Parrot=Perroquet
|
||||||
Pig=Cochon
|
Pig=Cochon
|
||||||
Polar Bear=Ours blanc
|
Polar Bear=Ours blanc
|
||||||
|
@ -47,8 +49,15 @@ Witch=Sorcière
|
||||||
Wither=Wither
|
Wither=Wither
|
||||||
Wolf=Loup
|
Wolf=Loup
|
||||||
Husk=Zombie Momifié
|
Husk=Zombie Momifié
|
||||||
|
Baby Husk=Bébé Zombie Momifié
|
||||||
Zombie=Zombie
|
Zombie=Zombie
|
||||||
Zombie Pigman=Zombie Cochon
|
Baby Zombie=Bébé Zombie
|
||||||
|
Piglin=Piglin
|
||||||
|
Baby Piglin=Bébé Piglin
|
||||||
|
Zombie Piglin=Piglin Zombie
|
||||||
|
Baby Zombie Piglin=Bébé Piglin Zombie
|
||||||
|
Sword Piglin=Piglin avec une épée
|
||||||
|
Piglin Brute=Piglin Barbare
|
||||||
Farmer=Fermier
|
Farmer=Fermier
|
||||||
Fisherman=Pêcheur
|
Fisherman=Pêcheur
|
||||||
Fletcher=Archer
|
Fletcher=Archer
|
||||||
|
@ -67,3 +76,8 @@ Salmon=Saumon
|
||||||
Dolphin=Dauphin
|
Dolphin=Dauphin
|
||||||
Pillager=Pilleur
|
Pillager=Pilleur
|
||||||
Tropical fish=Poisson tropical
|
Tropical fish=Poisson tropical
|
||||||
|
Hoglin=Hoglin
|
||||||
|
Baby hoglin=Bébé Hoglin
|
||||||
|
Zoglin=Zoglin
|
||||||
|
Strider=Arpenteur
|
||||||
|
Glow Squid=Poulpe Brillant
|
||||||
|
|
|
@ -49,7 +49,7 @@ Wither=ウィザー
|
||||||
Wolf=オオカミ
|
Wolf=オオカミ
|
||||||
Husk=ハスク
|
Husk=ハスク
|
||||||
Zombie=ゾンビ
|
Zombie=ゾンビ
|
||||||
Zombie Pigman=ゾンビピッグマン
|
Zombie Piglin=ゾンビピッグマン
|
||||||
Farmer=農民
|
Farmer=農民
|
||||||
Fisherman=漁師
|
Fisherman=漁師
|
||||||
Fletcher=矢師
|
Fletcher=矢師
|
||||||
|
|
|
@ -1,25 +1,27 @@
|
||||||
# textdomain: mobs_mc
|
# textdomain: mobs_mc
|
||||||
Agent=Агент
|
Agent=Агент
|
||||||
|
Axolotl=Аксолотль
|
||||||
Bat=Летучая мышь
|
Bat=Летучая мышь
|
||||||
Blaze=Ифрит
|
Blaze=Ифрит
|
||||||
Chicken=Курица
|
Chicken=Курица
|
||||||
Cow=Корова
|
Cow=Корова
|
||||||
Mooshroom=Гриб
|
Mooshroom=Грибная корова
|
||||||
Creeper=Крипер
|
Creeper=Крипер
|
||||||
Ender Dragon=Дракон Предела
|
Ender Dragon=Дракон Края
|
||||||
Enderman=Эндермен
|
Enderman=Эндермен
|
||||||
Endermite=Эндермит
|
Endermite=Эндермит
|
||||||
Ghast=Гаст
|
Ghast=Гаст
|
||||||
Elder Guardian=Древний страж
|
Elder Guardian=Древний страж
|
||||||
Guardian=Страж
|
Guardian=Страж
|
||||||
Horse=Лошадь
|
Horse=Лошадь
|
||||||
Skeleton Horse=Скелет лошади
|
Skeleton Horse=Лошадь-скелет
|
||||||
Zombie Horse=Зомби-лошадь
|
Zombie Horse=Лошадь-зомби
|
||||||
Donkey=Ослик
|
Donkey=Ослик
|
||||||
Mule=Мул
|
Mule=Мул
|
||||||
Iron Golem=Железный голем
|
Iron Golem=Железный голем
|
||||||
Llama=Лама
|
Llama=Лама
|
||||||
Ocelot=Оцелот
|
Ocelot=Оцелот
|
||||||
|
Cat=Кошка
|
||||||
Parrot=Попугай
|
Parrot=Попугай
|
||||||
Pig=Свинья
|
Pig=Свинья
|
||||||
Polar Bear=Полярный медведь
|
Polar Bear=Полярный медведь
|
||||||
|
@ -32,13 +34,13 @@ Skeleton=Скелет
|
||||||
Stray=Странник
|
Stray=Странник
|
||||||
Wither Skeleton=Скелет-иссушитель
|
Wither Skeleton=Скелет-иссушитель
|
||||||
Magma Cube=Лавовый куб
|
Magma Cube=Лавовый куб
|
||||||
Slime=Слизняк
|
Slime=Слизень
|
||||||
Snow Golem=Снежный голем
|
Snow Golem=Снежный голем
|
||||||
Spider=Паук
|
Spider=Паук
|
||||||
Cave Spider=Пещерный паук
|
Cave Spider=Пещерный паук
|
||||||
Squid=Кальмар
|
Squid=Спрут
|
||||||
Vex=Досаждатель
|
Vex=Досаждатель
|
||||||
Evoker=Маг
|
Evoker=Вызыватель
|
||||||
Illusioner=Иллюзор
|
Illusioner=Иллюзор
|
||||||
Villager=Житель
|
Villager=Житель
|
||||||
Vindicator=Поборник
|
Vindicator=Поборник
|
||||||
|
@ -47,8 +49,15 @@ Witch=Ведьма
|
||||||
Wither=Иссушитель
|
Wither=Иссушитель
|
||||||
Wolf=Волк
|
Wolf=Волк
|
||||||
Husk=Кадавр
|
Husk=Кадавр
|
||||||
|
Baby Husk=Кадавр-ребёнок
|
||||||
Zombie=Зомби
|
Zombie=Зомби
|
||||||
Zombie Pigman=Зомби-свиночеловек
|
Baby Zombie=Зомби-ребёнок
|
||||||
|
Piglin=Пиглин
|
||||||
|
Baby Piglin=Пиглин-ребёнок
|
||||||
|
Zombie Piglin=Зомби-пиглин
|
||||||
|
Baby Zombie Piglin=Зомби-пиглин-ребёнок
|
||||||
|
Sword Piglin=Пиглин-мечник
|
||||||
|
Piglin Brute=Жестокий пиглин
|
||||||
Farmer=Фермер
|
Farmer=Фермер
|
||||||
Fisherman=Рыбак
|
Fisherman=Рыбак
|
||||||
Fletcher=Лучник
|
Fletcher=Лучник
|
||||||
|
@ -62,3 +71,13 @@ Weapon Smith=Оружейник
|
||||||
Tool Smith=Инструментальщик
|
Tool Smith=Инструментальщик
|
||||||
Cleric=Церковник
|
Cleric=Церковник
|
||||||
Nitwit=Нищий
|
Nitwit=Нищий
|
||||||
|
Cod=Треска
|
||||||
|
Salmon=Лосось
|
||||||
|
Dolphin=Дельфин
|
||||||
|
Pillager=Разбойник
|
||||||
|
Tropical fish=Тропическая рыба
|
||||||
|
Hoglin=Хоглин
|
||||||
|
Baby hoglin=Детёныш хоглина
|
||||||
|
Zoglin=Зоглин
|
||||||
|
Strider=Страйдер
|
||||||
|
Glow Squid=Светящийся спрут
|
||||||
|
|
|
@ -21,6 +21,7 @@ Mule=
|
||||||
Iron Golem=
|
Iron Golem=
|
||||||
Llama=
|
Llama=
|
||||||
Ocelot=
|
Ocelot=
|
||||||
|
Cat=
|
||||||
Parrot=
|
Parrot=
|
||||||
Pig=
|
Pig=
|
||||||
Polar Bear=
|
Polar Bear=
|
||||||
|
@ -48,8 +49,15 @@ Witch=
|
||||||
Wither=
|
Wither=
|
||||||
Wolf=
|
Wolf=
|
||||||
Husk=
|
Husk=
|
||||||
|
Baby Husk=
|
||||||
Zombie=
|
Zombie=
|
||||||
Zombie Pigman=
|
Baby Zombie=
|
||||||
|
Piglin=
|
||||||
|
Baby Piglin=
|
||||||
|
Zombie Piglin=
|
||||||
|
Baby Zombie Piglin=
|
||||||
|
Sword Piglin=
|
||||||
|
Piglin Brute=
|
||||||
Farmer=
|
Farmer=
|
||||||
Fisherman=
|
Fisherman=
|
||||||
Fletcher=
|
Fletcher=
|
||||||
|
@ -68,3 +76,8 @@ Salmon=
|
||||||
Dolphin=
|
Dolphin=
|
||||||
Pillager=
|
Pillager=
|
||||||
Tropical fish=
|
Tropical fish=
|
||||||
|
Hoglin=
|
||||||
|
Baby hoglin=
|
||||||
|
Zoglin=
|
||||||
|
Strider=
|
||||||
|
Glow Squid=
|
||||||
|
|
|
@ -2,4 +2,4 @@ name = mobs_mc
|
||||||
author = maikerumine
|
author = maikerumine
|
||||||
description = Adds Minecraft-like monsters and animals.
|
description = Adds Minecraft-like monsters and animals.
|
||||||
depends = mcl_init, mcl_particles, mcl_mobs, mcl_wip, mcl_core, mcl_util
|
depends = mcl_init, mcl_particles, mcl_mobs, mcl_wip, mcl_core, mcl_util
|
||||||
optional_depends = default, mcl_tnt, mcl_bows, mcl_throwing, mcl_fishing, bones, mesecons_materials, doc_items
|
optional_depends = default, mcl_tnt, mcl_bows, mcl_throwing, mcl_fishing, bones, mesecons_materials, doc_items, mcl_worlds
|
||||||
|
|
Binary file not shown.
|
@ -39,7 +39,7 @@ local ocelot = {
|
||||||
head_swivel = "head.control",
|
head_swivel = "head.control",
|
||||||
bone_eye_height = 6.2,
|
bone_eye_height = 6.2,
|
||||||
head_eye_height = 0.4,
|
head_eye_height = 0.4,
|
||||||
horrizonatal_head_height=-0,
|
horizontal_head_height=-0,
|
||||||
head_yaw="z",
|
head_yaw="z",
|
||||||
curiosity = 4,
|
curiosity = 4,
|
||||||
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.69, 0.3},
|
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.69, 0.3},
|
||||||
|
|
|
@ -137,7 +137,7 @@ mcl_mobs.register_mob("mobs_mc:parrot", {
|
||||||
xp_max = 3,
|
xp_max = 3,
|
||||||
head_swivel = "head.control",
|
head_swivel = "head.control",
|
||||||
bone_eye_height = 1.1,
|
bone_eye_height = 1.1,
|
||||||
horrizonatal_head_height=0,
|
horizontal_head_height=0,
|
||||||
curiosity = 10,
|
curiosity = 10,
|
||||||
collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.89, 0.25},
|
collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.89, 0.25},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
|
|
|
@ -22,7 +22,7 @@ mcl_mobs.register_mob("mobs_mc:pig", {
|
||||||
head_swivel = "head.control",
|
head_swivel = "head.control",
|
||||||
bone_eye_height = 7.5,
|
bone_eye_height = 7.5,
|
||||||
head_eye_height = 0.8,
|
head_eye_height = 0.8,
|
||||||
horrizonatal_head_height=-1,
|
horizontal_head_height=-1,
|
||||||
curiosity = 3,
|
curiosity = 3,
|
||||||
head_yaw="z",
|
head_yaw="z",
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
|
@ -82,7 +82,7 @@ mcl_mobs.register_mob("mobs_mc:pig", {
|
||||||
end
|
end
|
||||||
|
|
||||||
-- if driver present allow control of horse
|
-- if driver present allow control of horse
|
||||||
if self.driver then
|
if self.driver and self.driver:get_wielded_item():get_name() == "mcl_mobitems:carrot_on_a_stick" then
|
||||||
|
|
||||||
mcl_mobs.drive(self, "walk", "stand", false, dtime)
|
mcl_mobs.drive(self, "walk", "stand", false, dtime)
|
||||||
|
|
||||||
|
@ -149,18 +149,14 @@ mcl_mobs.register_mob("mobs_mc:pig", {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Mount or detach player
|
-- Should make pig go faster when right clicked with carrot on a stick.
|
||||||
local name = clicker:get_player_name()
|
-- FIXME: needs work on the going faster part.
|
||||||
if self.driver and clicker == self.driver then
|
--[[if self.driver and clicker == self.driver and self.driver:get_wielded_item():get_name() == "mcl_mobitems:carrot_on_a_stick" then
|
||||||
-- Detach if already attached
|
if not self.v3 then
|
||||||
mcl_mobs.detach(clicker, {x=1, y=0, z=0})
|
self.v3 = 0
|
||||||
return
|
self.max_speed_forward = 100
|
||||||
|
self.accel = 10
|
||||||
elseif not self.driver and self.saddle == "yes" and wielditem:get_name() == "mcl_mobitems:carrot_on_a_stick" then
|
end
|
||||||
-- Ride pig if it has a saddle and player uses a carrot on a stick
|
|
||||||
|
|
||||||
mcl_mobs.attach(self, clicker)
|
|
||||||
|
|
||||||
if not minetest.is_creative_enabled(clicker:get_player_name()) then
|
if not minetest.is_creative_enabled(clicker:get_player_name()) then
|
||||||
|
|
||||||
local inv = self.driver:get_inventory()
|
local inv = self.driver:get_inventory()
|
||||||
|
@ -177,6 +173,19 @@ mcl_mobs.register_mob("mobs_mc:pig", {
|
||||||
end
|
end
|
||||||
inv:set_stack("main",self.driver:get_wield_index(), wielditem)
|
inv:set_stack("main",self.driver:get_wield_index(), wielditem)
|
||||||
end
|
end
|
||||||
|
end]]
|
||||||
|
|
||||||
|
-- Mount or detach player
|
||||||
|
local name = clicker:get_player_name()
|
||||||
|
if self.driver and clicker == self.driver then -- and self.driver:get_wielded_item():get_name() ~= "mcl_mobitems:carrot_on_a_stick" then -- Note: This is for when the ability to make the pig go faster is implemented
|
||||||
|
-- Detach if already attached
|
||||||
|
mcl_mobs.detach(clicker, {x=1, y=0, z=0})
|
||||||
|
return
|
||||||
|
|
||||||
|
elseif not self.driver and self.saddle == "yes" then
|
||||||
|
-- Ride pig if it has a saddle
|
||||||
|
|
||||||
|
mcl_mobs.attach(self, clicker)
|
||||||
return
|
return
|
||||||
|
|
||||||
-- Capture pig
|
-- Capture pig
|
||||||
|
@ -195,6 +204,18 @@ mcl_mobs.register_mob("mobs_mc:pig", {
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
after_activate = function(self, staticdata, def, dtime)
|
||||||
|
if self.saddle == "yes" then -- Make saddle load upon rejoin
|
||||||
|
self.base_texture = {
|
||||||
|
"mobs_mc_pig.png", -- base
|
||||||
|
"mobs_mc_pig_saddle.png", -- saddle
|
||||||
|
}
|
||||||
|
self.object:set_properties({
|
||||||
|
textures = self.base_texture
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
|
|
|
@ -25,7 +25,10 @@ function mobs_mc.player_wears_gold(player)
|
||||||
for i=1, 6 do
|
for i=1, 6 do
|
||||||
local stack = player:get_inventory():get_stack("armor", i)
|
local stack = player:get_inventory():get_stack("armor", i)
|
||||||
local item = stack:get_name()
|
local item = stack:get_name()
|
||||||
if item == "mcl_armor:chestplate_gold" or item == "mcl_armor:leggings_gold" or item == "mcl_armor:helmet_gold" or item == "mcl_armor:boots_gold" then
|
if string.find(item, "mcl_armor:chestplate_gold")
|
||||||
|
or string.find(item, "mcl_armor:leggings_gold")
|
||||||
|
or string.find(item, "mcl_armor:helmet_gold")
|
||||||
|
or string.find(item, "mcl_armor:boots_gold") then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -35,9 +38,11 @@ end
|
||||||
--################### piglin
|
--################### piglin
|
||||||
--###################
|
--###################
|
||||||
local piglin = {
|
local piglin = {
|
||||||
|
description = S("Piglin"),
|
||||||
type = "monster",
|
type = "monster",
|
||||||
passive = false,
|
passive = false,
|
||||||
spawn_class = "hostile",
|
spawn_class = "hostile",
|
||||||
|
group_attack = {"mobs_mc:piglin", "mobs_mc:sword_piglin", "mobs_mc:piglin_brute"},
|
||||||
hp_min = 16,
|
hp_min = 16,
|
||||||
hp_max = 16,
|
hp_max = 16,
|
||||||
xp_min = 9,
|
xp_min = 9,
|
||||||
|
@ -62,8 +67,8 @@ local piglin = {
|
||||||
},
|
},
|
||||||
jump = true,
|
jump = true,
|
||||||
makes_footstep_sound = true,
|
makes_footstep_sound = true,
|
||||||
walk_velocity = 4.317,
|
walk_velocity = 1.4,
|
||||||
run_velocity = 5.6121,
|
run_velocity = 2.8,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "mcl_bows:crossbow",
|
{name = "mcl_bows:crossbow",
|
||||||
chance = 10,
|
chance = 10,
|
||||||
|
@ -178,6 +183,7 @@ mcl_mobs.register_mob("mobs_mc:piglin", piglin)
|
||||||
|
|
||||||
|
|
||||||
local sword_piglin = table.copy(piglin)
|
local sword_piglin = table.copy(piglin)
|
||||||
|
sword_piglin.description = S("Sword Piglin")
|
||||||
sword_piglin.mesh = "extra_mobs_sword_piglin.b3d"
|
sword_piglin.mesh = "extra_mobs_sword_piglin.b3d"
|
||||||
sword_piglin.textures = {"extra_mobs_piglin.png", "default_tool_goldsword.png"}
|
sword_piglin.textures = {"extra_mobs_piglin.png", "default_tool_goldsword.png"}
|
||||||
sword_piglin.on_spawn = function(self)
|
sword_piglin.on_spawn = function(self)
|
||||||
|
@ -206,43 +212,132 @@ sword_piglin.animation = {
|
||||||
punch_start = 189,
|
punch_start = 189,
|
||||||
punch_end = 198,
|
punch_end = 198,
|
||||||
}
|
}
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:sword_piglin", sword_piglin)
|
mcl_mobs.register_mob("mobs_mc:sword_piglin", sword_piglin)
|
||||||
|
|
||||||
local zombified_piglin = table.copy(piglin)
|
|
||||||
zombified_piglin.fire_resistant = 1
|
-- Zombified Piglin --
|
||||||
zombified_piglin.do_custom = function()
|
|
||||||
return
|
|
||||||
|
local function spawn_check(pos, environmental_light, artificial_light, sky_light)
|
||||||
|
return artificial_light <= 11
|
||||||
end
|
end
|
||||||
zombified_piglin.on_spawn = function()
|
|
||||||
return
|
local zombified_piglin = {
|
||||||
end
|
description = S("Zombie Piglin"),
|
||||||
zombified_piglin.on_rightclick = function()
|
-- type="animal", passive=false: This combination is needed for a neutral mob which becomes hostile, if attacked
|
||||||
return
|
type = "animal",
|
||||||
end
|
passive = false,
|
||||||
zombified_piglin.lava_damage = 0
|
spawn_class = "passive",
|
||||||
zombified_piglin.fire_damage = 0
|
hp_min = 20,
|
||||||
zombified_piglin.attack_animals = true
|
hp_max = 20,
|
||||||
zombified_piglin.mesh = "extra_mobs_sword_piglin.b3d"
|
xp_min = 6,
|
||||||
zombified_piglin.textures = {"extra_mobs_zombified_piglin.png", "default_tool_goldsword.png", "extra_mobs_trans.png"}
|
xp_max = 6,
|
||||||
zombified_piglin.attack_type = "dogfight"
|
armor = {undead = 90, fleshy = 90},
|
||||||
zombified_piglin.animation = {
|
attack_type = "dogfight",
|
||||||
stand_speed = 30,
|
group_attack = {"mobs_mc:zombified_piglin", "mobs_mc:baby_zombified_piglin"},
|
||||||
walk_speed = 30,
|
damage = 9,
|
||||||
punch_speed = 45,
|
reach = 2,
|
||||||
run_speed = 30,
|
head_swivel = "head.control",
|
||||||
stand_start = 0,
|
bone_eye_height = 2.4,
|
||||||
stand_end = 79,
|
head_eye_height = 1.4,
|
||||||
walk_start = 168,
|
curiosity = 15,
|
||||||
walk_end = 187,
|
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3}, -- same
|
||||||
run_start = 440,
|
visual = "mesh",
|
||||||
run_end = 459,
|
mesh = "mobs_mc_zombie_pigman.b3d",
|
||||||
punch_start = 189,
|
textures = { {
|
||||||
punch_end = 198,
|
"blank.png", --baby
|
||||||
|
"default_tool_goldsword.png", --sword
|
||||||
|
"mobs_mc_zombie_pigman.png", --pigman
|
||||||
|
} },
|
||||||
|
visual_size = {x=3, y=3},
|
||||||
|
sounds = {
|
||||||
|
random = "mobs_mc_zombiepig_random",
|
||||||
|
war_cry = "mobs_mc_zombiepig_war_cry",
|
||||||
|
death = "mobs_mc_zombiepig_death",
|
||||||
|
damage = "mobs_mc_zombiepig_hurt",
|
||||||
|
distance = 16,
|
||||||
|
},
|
||||||
|
jump = true,
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
spawn_check = spawn_check,
|
||||||
|
walk_velocity = .8,
|
||||||
|
run_velocity = 2.6,
|
||||||
|
pathfinding = 1,
|
||||||
|
drops = {
|
||||||
|
{name = "mcl_mobitems:rotten_flesh",
|
||||||
|
chance = 1,
|
||||||
|
min = 1,
|
||||||
|
max = 1,
|
||||||
|
looting = "common"},
|
||||||
|
{name = "mcl_core:gold_nugget",
|
||||||
|
chance = 1,
|
||||||
|
min = 0,
|
||||||
|
max = 1,
|
||||||
|
looting = "common"},
|
||||||
|
{name = "mcl_core:gold_ingot",
|
||||||
|
chance = 40, -- 2.5%
|
||||||
|
min = 1,
|
||||||
|
max = 1,
|
||||||
|
looting = "rare"},
|
||||||
|
{name = "mcl_tools:sword_gold",
|
||||||
|
chance = 100 / 8.5,
|
||||||
|
min = 1,
|
||||||
|
max = 1,
|
||||||
|
looting = "rare"},
|
||||||
|
},
|
||||||
|
animation = {
|
||||||
|
stand_speed = 25,
|
||||||
|
walk_speed = 25,
|
||||||
|
run_speed = 50,
|
||||||
|
stand_start = 40,
|
||||||
|
stand_end = 80,
|
||||||
|
walk_start = 0,
|
||||||
|
walk_end = 40,
|
||||||
|
run_start = 0,
|
||||||
|
run_end = 40,
|
||||||
|
punch_start = 90,
|
||||||
|
punch_end = 130,
|
||||||
|
},
|
||||||
|
lava_damage = 0,
|
||||||
|
fire_damage = 0,
|
||||||
|
fear_height = 4,
|
||||||
|
view_range = 16,
|
||||||
|
harmed_by_heal = true,
|
||||||
|
fire_damage_resistant = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:zombified_piglin", zombified_piglin)
|
mcl_mobs.register_mob("mobs_mc:zombified_piglin", zombified_piglin)
|
||||||
|
|
||||||
|
local baby_zombified_piglin = table.copy(zombified_piglin)
|
||||||
|
baby_zombified_piglin.description = S("Baby Zombie Piglin")
|
||||||
|
baby_zombified_piglin.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25}
|
||||||
|
baby_zombified_piglin.xp_min = 13
|
||||||
|
baby_zombified_piglin.xp_max = 13
|
||||||
|
baby_zombified_piglin.textures = {
|
||||||
|
{
|
||||||
|
"mobs_mc_zombie_pigman.png", --baby
|
||||||
|
"default_tool_goldsword.png", --sword
|
||||||
|
"mobs_mc_zombie_pigman.png", --pigman
|
||||||
|
}
|
||||||
|
}
|
||||||
|
baby_zombified_piglin.walk_velocity = 1.2
|
||||||
|
baby_zombified_piglin.run_velocity = 2.4
|
||||||
|
baby_zombified_piglin.light_damage = 0
|
||||||
|
baby_zombified_piglin.child = 1
|
||||||
|
|
||||||
|
mcl_mobs.register_mob("mobs_mc:baby_zombified_piglin", baby_zombified_piglin)
|
||||||
|
|
||||||
|
-- Compatibility code. These were removed, and now are called zombie piglins. They don't spawn.
|
||||||
|
-- This is only to catch old cases. Maybe could be an alias?
|
||||||
|
mcl_mobs.register_mob("mobs_mc:pigman", zombified_piglin)
|
||||||
|
mcl_mobs.register_mob("mobs_mc:baby_pigman", baby_zombified_piglin)
|
||||||
|
|
||||||
|
|
||||||
|
-- Piglin Brute --
|
||||||
|
|
||||||
local piglin_brute = table.copy(piglin)
|
local piglin_brute = table.copy(piglin)
|
||||||
|
piglin_brute.description = S("Piglin Brute")
|
||||||
piglin_brute.xp_min = 20
|
piglin_brute.xp_min = 20
|
||||||
piglin_brute.xp_max = 20
|
piglin_brute.xp_max = 20
|
||||||
piglin_brute.hp_min = 50
|
piglin_brute.hp_min = 50
|
||||||
|
@ -279,11 +374,17 @@ piglin_brute.animation = {
|
||||||
punch_end = 198,
|
punch_end = 198,
|
||||||
}
|
}
|
||||||
piglin_brute.can_despawn = false
|
piglin_brute.can_despawn = false
|
||||||
piglin_brute.group_attack = { "mobs_mc:piglin", "mobs_mc:piglin_brute" }
|
|
||||||
|
piglin_brute.drops = {
|
||||||
|
{name = "mcl_tools:axe_gold",
|
||||||
|
chance = 8.5,
|
||||||
|
min = 1,
|
||||||
|
max = 1,},
|
||||||
|
}
|
||||||
mcl_mobs.register_mob("mobs_mc:piglin_brute", piglin_brute)
|
mcl_mobs.register_mob("mobs_mc:piglin_brute", piglin_brute)
|
||||||
|
|
||||||
|
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:piglin","overworld",0,7)
|
|
||||||
-- Regular spawning in the Nether
|
-- Regular spawning in the Nether
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
"mobs_mc:piglin",
|
"mobs_mc:piglin",
|
||||||
|
@ -300,7 +401,7 @@ minetest.LIGHT_MAX+1,
|
||||||
3,
|
3,
|
||||||
mcl_vars.mg_lava_nether_max,
|
mcl_vars.mg_lava_nether_max,
|
||||||
mcl_vars.mg_nether_max)
|
mcl_vars.mg_nether_max)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:sword_piglin","overworld",0,7)
|
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
"mobs_mc:sword_piglin",
|
"mobs_mc:sword_piglin",
|
||||||
"nether",
|
"nether",
|
||||||
|
@ -316,7 +417,45 @@ minetest.LIGHT_MAX+1,
|
||||||
3,
|
3,
|
||||||
mcl_vars.mg_lava_nether_max,
|
mcl_vars.mg_lava_nether_max,
|
||||||
mcl_vars.mg_nether_max)
|
mcl_vars.mg_nether_max)
|
||||||
-- spawn eggs
|
|
||||||
|
mcl_mobs:spawn_specific(
|
||||||
|
"mobs_mc:zombified_piglin",
|
||||||
|
"nether",
|
||||||
|
"ground",
|
||||||
|
{
|
||||||
|
"Nether",
|
||||||
|
"CrimsonForest",
|
||||||
|
},
|
||||||
|
0,
|
||||||
|
minetest.LIGHT_MAX+1,
|
||||||
|
30,
|
||||||
|
6000,
|
||||||
|
3,
|
||||||
|
mcl_vars.mg_nether_min,
|
||||||
|
mcl_vars.mg_nether_max)
|
||||||
|
|
||||||
|
-- Baby zombie is 20 times less likely than regular zombies
|
||||||
|
mcl_mobs:spawn_specific(
|
||||||
|
"mobs_mc:baby_zombified_piglin",
|
||||||
|
"nether",
|
||||||
|
"ground",
|
||||||
|
{
|
||||||
|
"Nether",
|
||||||
|
"CrimsonForest",
|
||||||
|
},
|
||||||
|
0,
|
||||||
|
minetest.LIGHT_MAX+1,
|
||||||
|
30,
|
||||||
|
100000,
|
||||||
|
4,
|
||||||
|
mcl_vars.mg_nether_min,
|
||||||
|
mcl_vars.mg_nether_max)
|
||||||
|
|
||||||
|
mcl_mobs:non_spawn_specific("mobs_mc:piglin","overworld",0,7)
|
||||||
|
mcl_mobs:non_spawn_specific("mobs_mc:sword_piglin","overworld",0,7)
|
||||||
|
mcl_mobs:non_spawn_specific("mobs_mc:piglin_brute","overworld",0,7)
|
||||||
|
mcl_mobs:non_spawn_specific("mobs_mc:zombified_piglin","overworld",0,minetest.LIGHT_MAX+1)
|
||||||
|
|
||||||
mcl_mobs.register_egg("mobs_mc:piglin", S("Piglin"), "#7b4a17","#d5c381", 0)
|
mcl_mobs.register_egg("mobs_mc:piglin", S("Piglin"), "#7b4a17","#d5c381", 0)
|
||||||
mcl_mobs.register_egg("mobs_mc:piglin_brute", S("Piglin Brute"), "#562b0c","#ddc89d", 0)
|
mcl_mobs.register_egg("mobs_mc:piglin_brute", S("Piglin Brute"), "#562b0c","#ddc89d", 0)
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:piglin_brute","overworld",0,7)
|
mcl_mobs.register_egg("mobs_mc:zombified_piglin", S("Zombie Piglin"), "#ea9393", "#4c7129", 0)
|
||||||
|
|
|
@ -27,7 +27,7 @@ mcl_mobs.register_mob("mobs_mc:polar_bear", {
|
||||||
head_swivel = "head.control",
|
head_swivel = "head.control",
|
||||||
bone_eye_height = 2.6,
|
bone_eye_height = 2.6,
|
||||||
head_eye_height = 1,
|
head_eye_height = 1,
|
||||||
horrizonatal_head_height = 0,
|
horizontal_head_height = 0,
|
||||||
curiosity = 20,
|
curiosity = 20,
|
||||||
head_yaw="z",
|
head_yaw="z",
|
||||||
visual_size = {x=3.0, y=3.0},
|
visual_size = {x=3.0, y=3.0},
|
||||||
|
|
|
@ -18,7 +18,7 @@ local rabbit = {
|
||||||
head_swivel = "head.control",
|
head_swivel = "head.control",
|
||||||
bone_eye_height = 2,
|
bone_eye_height = 2,
|
||||||
head_eye_height = 0.5,
|
head_eye_height = 0.5,
|
||||||
horrizonatal_head_height = -.3,
|
horizontal_head_height = -.3,
|
||||||
curiosity = 20,
|
curiosity = 20,
|
||||||
head_yaw="z",
|
head_yaw="z",
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
|
|
|
@ -11,7 +11,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
local salmon = {
|
local salmon = {
|
||||||
type = "animal",
|
type = "animal",
|
||||||
spawn_class = "water",
|
spawn_class = "water_ambient",
|
||||||
can_despawn = true,
|
can_despawn = true,
|
||||||
passive = true,
|
passive = true,
|
||||||
hp_min = 3,
|
hp_min = 3,
|
||||||
|
|
|
@ -6,6 +6,8 @@ local S = minetest.get_translator("mobs_mc")
|
||||||
--################### SHEEP
|
--################### SHEEP
|
||||||
--###################
|
--###################
|
||||||
|
|
||||||
|
local WOOL_REPLACE_RATE = 80
|
||||||
|
|
||||||
local colors = {
|
local colors = {
|
||||||
-- group = { wool, textures }
|
-- group = { wool, textures }
|
||||||
unicolor_white = { "mcl_wool:white", "#FFFFFF00" },
|
unicolor_white = { "mcl_wool:white", "#FFFFFF00" },
|
||||||
|
@ -65,7 +67,7 @@ mcl_mobs.register_mob("mobs_mc:sheep", {
|
||||||
head_swivel = "head.control",
|
head_swivel = "head.control",
|
||||||
bone_eye_height = 3.3,
|
bone_eye_height = 3.3,
|
||||||
head_eye_height = 1.1,
|
head_eye_height = 1.1,
|
||||||
horrizonatal_head_height=-.7,
|
horizontal_head_height=-.7,
|
||||||
curiosity = 6,
|
curiosity = 6,
|
||||||
head_yaw="z",
|
head_yaw="z",
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
|
@ -101,17 +103,20 @@ mcl_mobs.register_mob("mobs_mc:sheep", {
|
||||||
stand_start = 0, stand_end = 0,
|
stand_start = 0, stand_end = 0,
|
||||||
walk_start = 0, walk_end = 40, walk_speed = 30,
|
walk_start = 0, walk_end = 40, walk_speed = 30,
|
||||||
run_start = 0, run_end = 40, run_speed = 40,
|
run_start = 0, run_end = 40, run_speed = 40,
|
||||||
|
eat_start = 40, eat_end = 80, eat_loop = false,
|
||||||
},
|
},
|
||||||
child_animations = {
|
child_animations = {
|
||||||
stand_start = 81, stand_end = 81,
|
stand_start = 81, stand_end = 81,
|
||||||
walk_start = 81, walk_end = 121, walk_speed = 45,
|
walk_start = 81, walk_end = 121, walk_speed = 45,
|
||||||
run_start = 81, run_end = 121, run_speed = 60,
|
run_start = 81, run_end = 121, run_speed = 60,
|
||||||
|
eat_start = 121, eat_start = 161, eat_loop = false,
|
||||||
},
|
},
|
||||||
follow = { "mcl_farming:wheat_item" },
|
follow = { "mcl_farming:wheat_item" },
|
||||||
view_range = 12,
|
view_range = 12,
|
||||||
|
|
||||||
-- Eat grass
|
-- Eat grass
|
||||||
replace_rate = 20,
|
replace_rate = WOOL_REPLACE_RATE,
|
||||||
|
replace_delay = 1.3,
|
||||||
replace_what = {
|
replace_what = {
|
||||||
{ "mcl_core:dirt_with_grass", "mcl_core:dirt", -1 },
|
{ "mcl_core:dirt_with_grass", "mcl_core:dirt", -1 },
|
||||||
{ "mcl_flowers:tallgrass", "air", 0 },
|
{ "mcl_flowers:tallgrass", "air", 0 },
|
||||||
|
@ -121,9 +126,8 @@ mcl_mobs.register_mob("mobs_mc:sheep", {
|
||||||
if not self.color or not colors[self.color] then
|
if not self.color or not colors[self.color] then
|
||||||
self.color = "unicolor_white"
|
self.color = "unicolor_white"
|
||||||
end
|
end
|
||||||
self.gotten = false
|
|
||||||
self.base_texture = sheep_texture(self.color)
|
self.base_texture = sheep_texture(self.color)
|
||||||
self.object:set_properties({ textures = self.base_texture })
|
|
||||||
self.drops = {
|
self.drops = {
|
||||||
{name = "mcl_mobitems:mutton",
|
{name = "mcl_mobitems:mutton",
|
||||||
chance = 1,
|
chance = 1,
|
||||||
|
@ -134,6 +138,27 @@ mcl_mobs.register_mob("mobs_mc:sheep", {
|
||||||
min = 1,
|
min = 1,
|
||||||
max = 1,},
|
max = 1,},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.state = "eat"
|
||||||
|
self:set_animation("eat")
|
||||||
|
self:set_velocity(0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
minetest.after(self.replace_delay, function()
|
||||||
|
if self and self.object and self.object:get_velocity() and self.health > 0 then
|
||||||
|
self.object:set_velocity(vector.zero())
|
||||||
|
self.gotten = false
|
||||||
|
self.object:set_properties({ textures = self.base_texture })
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
minetest.after(2.5, function()
|
||||||
|
if self and self.object and self.state == 'eat' and self.health > 0 then
|
||||||
|
self.state = "walk"
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
end,
|
end,
|
||||||
|
|
||||||
-- Set random color on spawn
|
-- Set random color on spawn
|
||||||
|
@ -209,7 +234,7 @@ mcl_mobs.register_mob("mobs_mc:sheep", {
|
||||||
if self:feed_tame(clicker, 1, true, false) then return end
|
if self:feed_tame(clicker, 1, true, false) then return end
|
||||||
if mcl_mobs:protect(self, clicker) then return end
|
if mcl_mobs:protect(self, clicker) then return end
|
||||||
|
|
||||||
if item:get_name() == "mcl_tools:shears" and not self.gotten and not self.child then
|
if minetest.get_item_group(item:get_name(), "shears") > 0 and not self.gotten and not self.child then
|
||||||
self.gotten = true
|
self.gotten = true
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
minetest.sound_play("mcl_tools_shears_cut", {pos = pos}, true)
|
minetest.sound_play("mcl_tools_shears_cut", {pos = pos}, true)
|
||||||
|
@ -226,12 +251,6 @@ mcl_mobs.register_mob("mobs_mc:sheep", {
|
||||||
item:add_wear(mobs_mc.shears_wear)
|
item:add_wear(mobs_mc.shears_wear)
|
||||||
clicker:get_inventory():set_stack("main", clicker:get_wield_index(), item)
|
clicker:get_inventory():set_stack("main", clicker:get_wield_index(), item)
|
||||||
end
|
end
|
||||||
self.drops = {
|
|
||||||
{name = "mcl_mobitems:mutton",
|
|
||||||
chance = 1,
|
|
||||||
min = 1,
|
|
||||||
max = 2,},
|
|
||||||
}
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
-- Dye sheep
|
-- Dye sheep
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
|
|
||||||
local S = minetest.get_translator("mobs_mc")
|
local S = minetest.get_translator("mobs_mc")
|
||||||
|
|
||||||
|
local function spawn_check(pos, environmental_light, artificial_light, sky_light)
|
||||||
|
return artificial_light <= 11
|
||||||
|
end
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:silverfish", {
|
mcl_mobs.register_mob("mobs_mc:silverfish", {
|
||||||
description = S("Silverfish"),
|
description = S("Silverfish"),
|
||||||
type = "monster",
|
type = "monster",
|
||||||
|
@ -53,6 +57,7 @@ mcl_mobs.register_mob("mobs_mc:silverfish", {
|
||||||
view_range = 16,
|
view_range = 16,
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
damage = 1,
|
damage = 1,
|
||||||
|
spawn_check = spawn_check,
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_mobs.register_egg("mobs_mc:silverfish", S("Silverfish"), "#6d6d6d", "#313131", 0)
|
mcl_mobs.register_egg("mobs_mc:silverfish", S("Silverfish"), "#6d6d6d", "#313131", 0)
|
||||||
|
|
|
@ -45,7 +45,7 @@ local skeleton = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
walk_velocity = 1.2,
|
walk_velocity = 1.2,
|
||||||
run_velocity = 2.4,
|
run_velocity = 2.0,
|
||||||
damage = 2,
|
damage = 2,
|
||||||
reach = 2,
|
reach = 2,
|
||||||
drops = {
|
drops = {
|
||||||
|
@ -91,7 +91,7 @@ local skeleton = {
|
||||||
},
|
},
|
||||||
on_spawn = function(self)
|
on_spawn = function(self)
|
||||||
if math.random(100) == 1 then
|
if math.random(100) == 1 then
|
||||||
self:jock_to("mobs_mc:spider", vector.new(0,0,0), vector.new(0,0,0))
|
self:jock_to("mobs_mc:spider", vector.zero(), vector.zero())
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
|
@ -105,8 +105,7 @@ local skeleton = {
|
||||||
if self.attack then
|
if self.attack then
|
||||||
self.object:set_yaw(minetest.dir_to_yaw(vector.direction(self.object:get_pos(), self.attack:get_pos())))
|
self.object:set_yaw(minetest.dir_to_yaw(vector.direction(self.object:get_pos(), self.attack:get_pos())))
|
||||||
end
|
end
|
||||||
-- 2-4 damage per arrow
|
local dmg = math.random(2, 4)
|
||||||
local dmg = math.max(4, math.random(2, 8))
|
|
||||||
mcl_bows.shoot_arrow("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object, nil, dmg)
|
mcl_bows.shoot_arrow("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object, nil, dmg)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
|
@ -43,7 +43,7 @@ mcl_mobs.register_mob("mobs_mc:witherskeleton", {
|
||||||
distance = 16,
|
distance = 16,
|
||||||
},
|
},
|
||||||
walk_velocity = 1.2,
|
walk_velocity = 1.2,
|
||||||
run_velocity = 2.4,
|
run_velocity = 2.0,
|
||||||
damage = 7,
|
damage = 7,
|
||||||
reach = 2,
|
reach = 2,
|
||||||
drops = {
|
drops = {
|
||||||
|
@ -96,6 +96,11 @@ mcl_mobs.register_mob("mobs_mc:witherskeleton", {
|
||||||
fear_height = 4,
|
fear_height = 4,
|
||||||
harmed_by_heal = true,
|
harmed_by_heal = true,
|
||||||
fire_resistant = true,
|
fire_resistant = true,
|
||||||
|
dealt_effect = {
|
||||||
|
name = "withering",
|
||||||
|
factor = 1,
|
||||||
|
dur = 10,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
--spawn
|
--spawn
|
||||||
|
|
|
@ -1,10 +1,111 @@
|
||||||
--License for code WTFPL and otherwise stated in readmes
|
--License for code WTFPL and otherwise stated in readmes
|
||||||
|
|
||||||
-- FIXME: Slimes should spawn only in "slime chunks" which make up only
|
|
||||||
-- 10% of the map.
|
|
||||||
--
|
|
||||||
local S = minetest.get_translator("mobs_mc")
|
local S = minetest.get_translator("mobs_mc")
|
||||||
|
|
||||||
|
local MAPBLOCK_SIZE = 16
|
||||||
|
|
||||||
|
local seed = minetest.get_mapgen_setting("seed")
|
||||||
|
|
||||||
|
local slime_chunk_match
|
||||||
|
local x_modifier
|
||||||
|
local z_modifier
|
||||||
|
|
||||||
|
local function split_by_char (inputstr, sep, limit)
|
||||||
|
if sep == nil then
|
||||||
|
sep = "%d"
|
||||||
|
end
|
||||||
|
local t = {}
|
||||||
|
|
||||||
|
local i = 0
|
||||||
|
for str in string.gmatch(inputstr, "(["..sep.."])") do
|
||||||
|
i = i --+ 1
|
||||||
|
table.insert(t, tonumber(str))
|
||||||
|
if limit and i >= limit then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return t
|
||||||
|
end
|
||||||
|
|
||||||
|
--Seed: "16002933932875202103" == random seed
|
||||||
|
--Seed: "1807191622654296300" == cheese
|
||||||
|
--Seed: "1" = 1
|
||||||
|
local function process_seed (seed)
|
||||||
|
--minetest.log("seed: " .. seed)
|
||||||
|
|
||||||
|
local split_chars = split_by_char(tostring(seed), nil, 10)
|
||||||
|
|
||||||
|
slime_chunk_match = split_chars[1]
|
||||||
|
x_modifier = split_chars[2]
|
||||||
|
z_modifier = split_chars[3]
|
||||||
|
|
||||||
|
--minetest.log("x_modifier: " .. tostring(x_modifier))
|
||||||
|
--minetest.log("z_modifier: " .. tostring(z_modifier))
|
||||||
|
--minetest.log("slime_chunk_match: " .. tostring(slime_chunk_match))
|
||||||
|
end
|
||||||
|
|
||||||
|
local processed = process_seed (seed)
|
||||||
|
|
||||||
|
|
||||||
|
local function convert_to_chunk_value (co_ord, modifier)
|
||||||
|
local converted = math.floor(math.abs(co_ord) / MAPBLOCK_SIZE)
|
||||||
|
|
||||||
|
if modifier then
|
||||||
|
converted = (converted + modifier)
|
||||||
|
end
|
||||||
|
converted = converted % 10
|
||||||
|
|
||||||
|
--minetest.log("co_ord: " .. co_ord)
|
||||||
|
--minetest.log("converted: " .. converted)
|
||||||
|
return converted
|
||||||
|
end
|
||||||
|
|
||||||
|
assert(convert_to_chunk_value(-16) == 1, "Incorrect convert_to_chunk_value result")
|
||||||
|
assert(convert_to_chunk_value(-15) == 0, "Incorrect convert_to_chunk_value result")
|
||||||
|
assert(convert_to_chunk_value(-1) == 0, "Incorrect convert_to_chunk_value result")
|
||||||
|
assert(convert_to_chunk_value(0) == 0, "Incorrect convert_to_chunk_value result")
|
||||||
|
assert(convert_to_chunk_value(1) == 0, "Incorrect convert_to_chunk_value result")
|
||||||
|
assert(convert_to_chunk_value(15) == 0, "Incorrect convert_to_chunk_value result")
|
||||||
|
assert(convert_to_chunk_value(16) == 1, "Incorrect convert_to_chunk_value result")
|
||||||
|
assert(convert_to_chunk_value(31) == 1, "Incorrect convert_to_chunk_value result")
|
||||||
|
assert(convert_to_chunk_value(32) == 2, "Incorrect convert_to_chunk_value result")
|
||||||
|
assert(convert_to_chunk_value(1599) == 9, "Incorrect convert_to_chunk_value result")
|
||||||
|
assert(convert_to_chunk_value(1600) == 0, "Incorrect convert_to_chunk_value result")
|
||||||
|
|
||||||
|
assert(convert_to_chunk_value(0,9) == 9, "Incorrect convert_to_chunk_value result")
|
||||||
|
assert(convert_to_chunk_value(16,5) == 6, "Incorrect convert_to_chunk_value result")
|
||||||
|
assert(convert_to_chunk_value(1599,4) == 3, "Incorrect convert_to_chunk_value result")
|
||||||
|
|
||||||
|
local function calculate_chunk_value (pos, x_mod, z_mod)
|
||||||
|
local chunk_val = math.abs(convert_to_chunk_value(pos.x, x_mod) - convert_to_chunk_value(pos.z, z_mod)) % 10
|
||||||
|
return chunk_val
|
||||||
|
end
|
||||||
|
|
||||||
|
assert(calculate_chunk_value(vector.new(0,0,0)) == 0, "calculate_chunk_value failed")
|
||||||
|
assert(calculate_chunk_value(vector.new(0,0,0), 1, 1) == 0, "calculate_chunk_value failed")
|
||||||
|
assert(calculate_chunk_value(vector.new(0,0,0), 2, 1) == 1, "calculate_chunk_value failed")
|
||||||
|
assert(calculate_chunk_value(vector.new(64,0,16)) == (4-1), "calculate_chunk_value failed")
|
||||||
|
assert(calculate_chunk_value(vector.new(16,0,64)) == (3), "calculate_chunk_value failed")
|
||||||
|
assert(calculate_chunk_value(vector.new(-160,0,-160)) == 0, "calculate_chunk_value failed")
|
||||||
|
|
||||||
|
local function is_slime_chunk(pos)
|
||||||
|
if not pos then return end
|
||||||
|
|
||||||
|
local chunk_val = calculate_chunk_value (pos, x_modifier, z_modifier)
|
||||||
|
local slime_chunk = chunk_val == slime_chunk_match
|
||||||
|
|
||||||
|
--minetest.log("x: " ..pos.x .. ", z:" .. pos.z)
|
||||||
|
|
||||||
|
--minetest.log("seed slime_chunk_match: " .. tostring(slime_chunk_match))
|
||||||
|
--minetest.log("chunk_val: " .. tostring(chunk_val))
|
||||||
|
--minetest.log("Is slime chunk: " .. tostring(slime_chunk))
|
||||||
|
return slime_chunk
|
||||||
|
end
|
||||||
|
|
||||||
|
local check_position = function (pos)
|
||||||
|
return is_slime_chunk(pos)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
-- Returns a function that spawns children in a circle around pos.
|
-- Returns a function that spawns children in a circle around pos.
|
||||||
-- To be used as on_die callback.
|
-- To be used as on_die callback.
|
||||||
-- self: mob reference
|
-- self: mob reference
|
||||||
|
@ -60,6 +161,18 @@ local spawn_children_on_die = function(child_mob, spawn_distance, eject_speed)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local swamp_light_max = 7
|
||||||
|
|
||||||
|
local function slime_spawn_check(pos, environmental_light, artificial_light, sky_light)
|
||||||
|
local maxlight = swamp_light_max
|
||||||
|
|
||||||
|
if is_slime_chunk(pos) then
|
||||||
|
maxlight = minetest.LIGHT_MAX + 1
|
||||||
|
end
|
||||||
|
|
||||||
|
return artificial_light <= maxlight
|
||||||
|
end
|
||||||
|
|
||||||
-- Slime
|
-- Slime
|
||||||
local slime_big = {
|
local slime_big = {
|
||||||
description = S("Slime"),
|
description = S("Slime"),
|
||||||
|
@ -104,14 +217,15 @@ local slime_big = {
|
||||||
attack_type = "dogfight",
|
attack_type = "dogfight",
|
||||||
passive = false,
|
passive = false,
|
||||||
jump = true,
|
jump = true,
|
||||||
walk_velocity = 2.5,
|
walk_velocity = 1.9,
|
||||||
run_velocity = 2.5,
|
run_velocity = 1.9,
|
||||||
walk_chance = 0,
|
walk_chance = 0,
|
||||||
jump_height = 5.2,
|
jump_height = 5.2,
|
||||||
fear_height = 0,
|
fear_height = 0,
|
||||||
spawn_small_alternative = "mobs_mc:slime_small",
|
spawn_small_alternative = "mobs_mc:slime_small",
|
||||||
on_die = spawn_children_on_die("mobs_mc:slime_small", 1.0, 1.5),
|
on_die = spawn_children_on_die("mobs_mc:slime_small", 1.0, 1.5),
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = true,
|
||||||
|
spawn_check = slime_spawn_check,
|
||||||
}
|
}
|
||||||
mcl_mobs.register_mob("mobs_mc:slime_big", slime_big)
|
mcl_mobs.register_mob("mobs_mc:slime_big", slime_big)
|
||||||
|
|
||||||
|
@ -125,8 +239,8 @@ slime_small.collisionbox = {-0.51, -0.01, -0.51, 0.51, 1.00, 0.51}
|
||||||
slime_small.visual_size = {x=6.25, y=6.25}
|
slime_small.visual_size = {x=6.25, y=6.25}
|
||||||
slime_small.damage = 3
|
slime_small.damage = 3
|
||||||
slime_small.reach = 2.75
|
slime_small.reach = 2.75
|
||||||
slime_small.walk_velocity = 1.3
|
slime_small.walk_velocity = 1.8
|
||||||
slime_small.run_velocity = 1.3
|
slime_small.run_velocity = 1.8
|
||||||
slime_small.jump_height = 4.3
|
slime_small.jump_height = 4.3
|
||||||
slime_small.spawn_small_alternative = "mobs_mc:slime_tiny"
|
slime_small.spawn_small_alternative = "mobs_mc:slime_tiny"
|
||||||
slime_small.on_die = spawn_children_on_die("mobs_mc:slime_tiny", 0.6, 1.0)
|
slime_small.on_die = spawn_children_on_die("mobs_mc:slime_tiny", 0.6, 1.0)
|
||||||
|
@ -149,8 +263,8 @@ slime_tiny.drops = {
|
||||||
min = 0,
|
min = 0,
|
||||||
max = 2,},
|
max = 2,},
|
||||||
}
|
}
|
||||||
slime_tiny.walk_velocity = 0.7
|
slime_tiny.walk_velocity = 1.7
|
||||||
slime_tiny.run_velocity = 0.7
|
slime_tiny.run_velocity = 1.7
|
||||||
slime_tiny.jump_height = 3
|
slime_tiny.jump_height = 3
|
||||||
slime_tiny.spawn_small_alternative = nil
|
slime_tiny.spawn_small_alternative = nil
|
||||||
slime_tiny.on_die = nil
|
slime_tiny.on_die = nil
|
||||||
|
@ -168,7 +282,6 @@ local cave_biomes = {
|
||||||
"RoofedForest_underground",
|
"RoofedForest_underground",
|
||||||
"Jungle_underground",
|
"Jungle_underground",
|
||||||
"Swampland_underground",
|
"Swampland_underground",
|
||||||
"MushroomIsland_underground",
|
|
||||||
"BirchForest_underground",
|
"BirchForest_underground",
|
||||||
"Plains_underground",
|
"Plains_underground",
|
||||||
"MesaPlateauF_underground",
|
"MesaPlateauF_underground",
|
||||||
|
@ -197,7 +310,6 @@ local cave_min = mcl_vars.mg_overworld_min
|
||||||
local cave_max = water_level - 23
|
local cave_max = water_level - 23
|
||||||
|
|
||||||
local swampy_biomes = {"Swampland", "MangroveSwamp"}
|
local swampy_biomes = {"Swampland", "MangroveSwamp"}
|
||||||
local swamp_light_max = 7
|
|
||||||
local swamp_min = water_level
|
local swamp_min = water_level
|
||||||
local swamp_max = water_level + 27
|
local swamp_max = water_level + 27
|
||||||
|
|
||||||
|
@ -212,7 +324,8 @@ minetest.LIGHT_MAX+1,
|
||||||
12000,
|
12000,
|
||||||
4,
|
4,
|
||||||
cave_min,
|
cave_min,
|
||||||
cave_max)
|
cave_max,
|
||||||
|
nil, nil, check_position)
|
||||||
|
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
"mobs_mc:slime_tiny",
|
"mobs_mc:slime_tiny",
|
||||||
|
@ -238,7 +351,8 @@ minetest.LIGHT_MAX+1,
|
||||||
8500,
|
8500,
|
||||||
4,
|
4,
|
||||||
cave_min,
|
cave_min,
|
||||||
cave_max)
|
cave_max,
|
||||||
|
nil, nil, check_position)
|
||||||
|
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
"mobs_mc:slime_small",
|
"mobs_mc:slime_small",
|
||||||
|
@ -264,7 +378,8 @@ minetest.LIGHT_MAX+1,
|
||||||
10000,
|
10000,
|
||||||
4,
|
4,
|
||||||
cave_min,
|
cave_min,
|
||||||
cave_max)
|
cave_max,
|
||||||
|
nil, nil, check_position)
|
||||||
|
|
||||||
mcl_mobs:spawn_specific(
|
mcl_mobs:spawn_specific(
|
||||||
"mobs_mc:slime_big",
|
"mobs_mc:slime_big",
|
||||||
|
@ -278,6 +393,7 @@ swamp_light_max,
|
||||||
4,
|
4,
|
||||||
swamp_min,
|
swamp_min,
|
||||||
swamp_max)
|
swamp_max)
|
||||||
|
|
||||||
-- Magma cube
|
-- Magma cube
|
||||||
local magma_cube_big = {
|
local magma_cube_big = {
|
||||||
description = S("Magma Cube"),
|
description = S("Magma Cube"),
|
||||||
|
@ -299,8 +415,8 @@ local magma_cube_big = {
|
||||||
attack = "mobs_mc_magma_cube_attack",
|
attack = "mobs_mc_magma_cube_attack",
|
||||||
distance = 16,
|
distance = 16,
|
||||||
},
|
},
|
||||||
walk_velocity = 4,
|
walk_velocity = 2.5,
|
||||||
run_velocity = 4,
|
run_velocity = 2.5,
|
||||||
damage = 6,
|
damage = 6,
|
||||||
reach = 3,
|
reach = 3,
|
||||||
armor = 53,
|
armor = 53,
|
||||||
|
@ -352,7 +468,7 @@ magma_cube_small.visual_size = {x=6.25, y=6.25}
|
||||||
magma_cube_small.damage = 3
|
magma_cube_small.damage = 3
|
||||||
magma_cube_small.reach = 2.75
|
magma_cube_small.reach = 2.75
|
||||||
magma_cube_small.walk_velocity = .8
|
magma_cube_small.walk_velocity = .8
|
||||||
magma_cube_small.run_velocity = 2.6
|
magma_cube_small.run_velocity = 2.0
|
||||||
magma_cube_small.jump_height = 6
|
magma_cube_small.jump_height = 6
|
||||||
magma_cube_small.damage = 4
|
magma_cube_small.damage = 4
|
||||||
magma_cube_small.reach = 2.75
|
magma_cube_small.reach = 2.75
|
||||||
|
|
|
@ -114,7 +114,7 @@ mcl_mobs.register_mob("mobs_mc:snowman", {
|
||||||
-- Remove pumpkin if using shears
|
-- Remove pumpkin if using shears
|
||||||
on_rightclick = function(self, clicker)
|
on_rightclick = function(self, clicker)
|
||||||
local item = clicker:get_wielded_item()
|
local item = clicker:get_wielded_item()
|
||||||
if self.gotten ~= true and item:get_name() == "mcl_tools:shears" then
|
if self.gotten ~= true and minetest.get_item_group(item:get_name(), "shears") > 0 then
|
||||||
-- Remove pumpkin
|
-- Remove pumpkin
|
||||||
self.gotten = true
|
self.gotten = true
|
||||||
self.object:set_properties({
|
self.object:set_properties({
|
||||||
|
|
|
@ -83,7 +83,7 @@ local spider = {
|
||||||
distance = 16,
|
distance = 16,
|
||||||
},
|
},
|
||||||
walk_velocity = 1.3,
|
walk_velocity = 1.3,
|
||||||
run_velocity = 2.8,
|
run_velocity = 2.4,
|
||||||
jump = true,
|
jump = true,
|
||||||
jump_height = 4,
|
jump_height = 4,
|
||||||
view_range = 16,
|
view_range = 16,
|
||||||
|
@ -114,9 +114,7 @@ mcl_mobs.register_mob("mobs_mc:spider", spider)
|
||||||
local cave_spider = table.copy(spider)
|
local cave_spider = table.copy(spider)
|
||||||
cave_spider.description = S("Cave Spider")
|
cave_spider.description = S("Cave Spider")
|
||||||
cave_spider.textures = { {"mobs_mc_cave_spider.png^(mobs_mc_spider_eyes.png^[makealpha:0,0,0)"} }
|
cave_spider.textures = { {"mobs_mc_cave_spider.png^(mobs_mc_spider_eyes.png^[makealpha:0,0,0)"} }
|
||||||
-- TODO: Poison damage
|
cave_spider.damage = 2
|
||||||
-- TODO: Revert damage to 2
|
|
||||||
cave_spider.damage = 3 -- damage increased to undo non-existing poison
|
|
||||||
cave_spider.hp_min = 1
|
cave_spider.hp_min = 1
|
||||||
cave_spider.hp_max = 12
|
cave_spider.hp_max = 12
|
||||||
cave_spider.collisionbox = {-0.35, -0.01, -0.35, 0.35, 0.46, 0.35}
|
cave_spider.collisionbox = {-0.35, -0.01, -0.35, 0.35, 0.46, 0.35}
|
||||||
|
@ -138,6 +136,11 @@ cave_spider.walk_velocity = 1.3
|
||||||
cave_spider.run_velocity = 3.2
|
cave_spider.run_velocity = 3.2
|
||||||
cave_spider.sounds = table.copy(spider.sounds)
|
cave_spider.sounds = table.copy(spider.sounds)
|
||||||
cave_spider.sounds.base_pitch = 1.25
|
cave_spider.sounds.base_pitch = 1.25
|
||||||
|
cave_spider.dealt_effect = {
|
||||||
|
name = "poison",
|
||||||
|
factor = 2.5,
|
||||||
|
dur = 7,
|
||||||
|
}
|
||||||
mcl_mobs.register_mob("mobs_mc:cave_spider", cave_spider)
|
mcl_mobs.register_mob("mobs_mc:cave_spider", cave_spider)
|
||||||
|
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue