Compare commits
484 Commits
cherry_gro
...
master
Author | SHA1 | Date |
---|---|---|
the-real-herowl | 72435933e4 | |
the-real-herowl | 35e14dd415 | |
the-real-herowl | 173f8a0bca | |
teknomunk | 1f32b47208 | |
SmokeyDope | bf67fd52e1 | |
WillConker | fd4e1484af | |
teknomunk | 1b0deae026 | |
teknomunk | 313c1f558b | |
teknomunk | 5cafa97dd1 | |
teknomunk | ddab68b87c | |
JoseDouglas26 | 2dafbae64b | |
the-real-herowl | 65d6cb1d83 | |
the-real-herowl | acf72be89c | |
the-real-herowl | 1153a81b65 | |
the-real-herowl | f423c1ea25 | |
the-real-herowl | d8aeb4ce12 | |
the-real-herowl | 21c182fc0e | |
teknomunk | ca033d0e8d | |
teknomunk | beccbacc73 | |
teknomunk | ecf12b85cc | |
the-real-herowl | f53bedc131 | |
the-real-herowl | 3e6ec9cf10 | |
teknomunk | 6c8771485c | |
teknomunk | f621e3c1de | |
teknomunk | 7d0f49a218 | |
teknomunk | 468c2bc68f | |
teknomunk | 2fc3d92550 | |
teknomunk | 95228500a9 | |
teknomunk | c7e43e31d4 | |
JoseDouglas26 | 067ad7b78b | |
teknomunk | add9cbe3bc | |
teknomunk | c4f4e7b6fc | |
teknomunk | 6394371e4f | |
the-real-herowl | e097c87e7c | |
the-real-herowl | 9e0136e3c4 | |
the-real-herowl | b2d93f3265 | |
the-real-herowl | dfddea76fb | |
the-real-herowl | da491b8505 | |
the-real-herowl | 18571d072c | |
the-real-herowl | cae554bc2b | |
teknomunk | 8feecf2492 | |
Mikita Wiśniewski | 68e5c19df4 | |
the-real-herowl | 54957e6191 | |
syl | 48482521ca | |
syl | d086bc5176 | |
the-real-herowl | 2bd24120e9 | |
syl | 4d7060cddd | |
Nicu | f119259e67 | |
teknomunk | 0a14a74860 | |
the-real-herowl | cb4396d424 | |
the-real-herowl | a499d292f8 | |
the-real-herowl | 52d5ec4248 | |
the-real-herowl | 07fac026dd | |
the-real-herowl | 0c57469c6b | |
the-real-herowl | 018814c362 | |
the-real-herowl | 496360a1c4 | |
the-real-herowl | 191dd1b950 | |
the-real-herowl | 551bc99517 | |
the-real-herowl | 651fb74be1 | |
the-real-herowl | 664993ca75 | |
the-real-herowl | 7a4c1ceba5 | |
the-real-herowl | dbea863553 | |
the-real-herowl | d306260c7e | |
the-real-herowl | cafa36d0b4 | |
the-real-herowl | 747bf16a94 | |
the-real-herowl | 55ce6f0f4b | |
the-real-herowl | e36b7f413b | |
the-real-herowl | dc7b1869b7 | |
the-real-herowl | bdaff930e0 | |
the-real-herowl | a039e056a5 | |
the-real-herowl | 53d640028e | |
the-real-herowl | 9e9507efeb | |
the-real-herowl | 63b2da7aa0 | |
the-real-herowl | e806d5f3ce | |
the-real-herowl | 914e3c6c2a | |
the-real-herowl | a4eaaad1a9 | |
the-real-herowl | 78ae5ddc26 | |
the-real-herowl | 8f4d5d2e27 | |
the-real-herowl | 70d8dfe558 | |
the-real-herowl | 9b501bfa7e | |
the-real-herowl | 75e5ca8d49 | |
the-real-herowl | dcbc9d2398 | |
the-real-herowl | 7c2d74e983 | |
the-real-herowl | 7c1f9805e2 | |
the-real-herowl | b5367a77a7 | |
the-real-herowl | 8cfe96a955 | |
the-real-herowl | ced2741686 | |
the-real-herowl | a9c2a89f16 | |
the-real-herowl | c4bedb37e0 | |
the-real-herowl | f60f50041d | |
the-real-herowl | 09be413e3f | |
the-real-herowl | 7ae31790bf | |
the-real-herowl | 6dab6158b9 | |
the-real-herowl | 7cd0cfede8 | |
the-real-herowl | 42778a3a6d | |
the-real-herowl | b28467d348 | |
the-real-herowl | c503a5fb8c | |
the-real-herowl | bbe2964d48 | |
the-real-herowl | 5263740a80 | |
the-real-herowl | ddbc7cd826 | |
the-real-herowl | 6d7fe91047 | |
the-real-herowl | 0c4094596e | |
the-real-herowl | 1ac81e440c | |
the-real-herowl | bf82241e82 | |
the-real-herowl | 456d205161 | |
the-real-herowl | 0e33947258 | |
the-real-herowl | 03c73b7820 | |
the-real-herowl | e039642446 | |
the-real-herowl | b6484a6d15 | |
the-real-herowl | 394b090c83 | |
the-real-herowl | 65b923c43c | |
the-real-herowl | aa4ff1827d | |
the-real-herowl | 92a77a7dbb | |
the-real-herowl | 31adc45da9 | |
the-real-herowl | 5610fa1c4b | |
the-real-herowl | 3f5cea3046 | |
the-real-herowl | a8054e8112 | |
the-real-herowl | 007500613a | |
the-real-herowl | fce73ab2bf | |
the-real-herowl | 08942d3b25 | |
the-real-herowl | 40580843d5 | |
the-real-herowl | a6c9bc8a01 | |
the-real-herowl | 209299b791 | |
the-real-herowl | b84d36b3ff | |
the-real-herowl | eac63f93d5 | |
the-real-herowl | 3663a62374 | |
the-real-herowl | a429a462cd | |
the-real-herowl | 5a7a533bf6 | |
the-real-herowl | 0b1cc6ad57 | |
the-real-herowl | 93572d71f2 | |
the-real-herowl | 7d3e2d3dbc | |
the-real-herowl | 83530b4298 | |
the-real-herowl | dc35f43bfa | |
the-real-herowl | a8fcae0f51 | |
the-real-herowl | 6d927ab1a1 | |
the-real-herowl | ef2ce7e0d7 | |
the-real-herowl | 9383b903ef | |
the-real-herowl | f1e9c3b563 | |
the-real-herowl | d85e582e8c | |
the-real-herowl | 5827a7638d | |
the-real-herowl | d1ca0f23f0 | |
the-real-herowl | 5750284e8f | |
the-real-herowl | 8477d13c79 | |
the-real-herowl | 753545d714 | |
the-real-herowl | 48e6ffa935 | |
teknomunk | bbc20d5f06 | |
the-real-herowl | 221800a4be | |
teknomunk | 0279dde3d0 | |
teknomunk | 2a014ca79c | |
teknomunk | 1bc0a0b411 | |
teknomunk | bd6c8d35c3 | |
teknomunk | 3850fc1a9f | |
teknomunk | 74cf14ef0f | |
teknomunk | 3a4a8799ea | |
the-real-herowl | a3f6bc1a6f | |
the-real-herowl | 691ba9f5b3 | |
Nicu | a1a74a2072 | |
Wbjitscool | cd66dc28a4 | |
qoheniac | ff4fd24c42 | |
the-real-herowl | 841f68ad13 | |
syl | 157cf695fc | |
the-real-herowl | 51eb62f771 | |
the-real-herowl | f2c19946ab | |
the-real-herowl | d22d26b971 | |
the-real-herowl | af13bd0635 | |
the-real-herowl | 3cf21b3559 | |
the-real-herowl | 4353f0dd99 | |
the-real-herowl | 1c9594ae27 | |
the-real-herowl | 18af03b99c | |
the-real-herowl | 22b6c25458 | |
the-real-herowl | 0dcf38094c | |
the-real-herowl | 970f6cf377 | |
teknomunk | 0003c1888d | |
teknomunk | 412aae9a58 | |
teknomunk | 98eed36938 | |
Mikita Wiśniewski | a23a57c62d | |
teknomunk | 5f6a9f3a0c | |
teknomunk | b37e9818b7 | |
teknomunk | aabd80d54b | |
the-real-herowl | 3b202eab34 | |
the-real-herowl | ebd9be84fd | |
the-real-herowl | cd8d82aa60 | |
the-real-herowl | 71c0d493ed | |
the-real-herowl | 4b83aaaa77 | |
the-real-herowl | 4264606609 | |
the-real-herowl | fdb0549d32 | |
the-real-herowl | b86c2e338a | |
the-real-herowl | d826a587da | |
teknomunk | d2a49799ae | |
the-real-herowl | a36c6481cb | |
the-real-herowl | fbeb977441 | |
the-real-herowl | 1219b09851 | |
the-real-herowl | b9ec1a4611 | |
the-real-herowl | 25321a5ac7 | |
teknomunk | 2fc283a42a | |
Mikita Wiśniewski | 3b1c55c234 | |
Mikita Wiśniewski | 0ef81681ba | |
the-real-herowl | efc6ab0bbf | |
Bram van den Heuvel | 69acc5074b | |
the-real-herowl | 7d999535e7 | |
teknomunk | 81ca224bb8 | |
nixnoxus | 3975449ad2 | |
teknomunk | 6756658ee9 | |
the-real-herowl | 4dde321a04 | |
Araca | cd0509c2e6 | |
the-real-herowl | cc1e01ad78 | |
the-real-herowl | b9428e3438 | |
teknomunk | 0c372f987d | |
Bakawun | 22c4daab22 | |
nixnoxus | 760fe1aa68 | |
Eliy21 | f78ad93fd3 | |
the-real-herowl | d321b166ea | |
JoseDouglas26 | 18342e44c8 | |
JoseDouglas26 | 2430953a81 | |
the-real-herowl | a25e2b8eb3 | |
the-real-herowl | ee2998e21b | |
the-real-herowl | e0aadc7996 | |
the-real-herowl | 9f65c5efb7 | |
the-real-herowl | 7ad4ca2dbe | |
JoseDouglas26 | 1161d5cd36 | |
SmokeyDope | 538c206985 | |
Doods | 31facbd902 | |
the-real-herowl | 5f70189e08 | |
the-real-herowl | 4e12c6747c | |
the-real-herowl | 1d8fc7abac | |
teknomunk | 09c595c363 | |
teknomunk | 6fbe60f1ac | |
teknomunk | 3705be24d7 | |
teknomunk | 681075df5a | |
teknomunk | 6ecb304946 | |
teknomunk | 034b0142c6 | |
teknomunk | e02d1c0e27 | |
teknomunk | bdcd89e1bf | |
teknomunk | 62ab68637a | |
teknomunk | 0839f35a12 | |
teknomunk | 84d6b593b2 | |
the-real-herowl | 3bcbb99878 | |
the-real-herowl | 9e8661ae95 | |
SOS-Games | 4f37c1600f | |
Doods | bd4337a2dc | |
MysticTempest | 57409973b9 | |
Mikita Wiśniewski | 312ad5b63b | |
Mikita Wiśniewski | 46ed6a6dda | |
the-real-herowl | 0f20e18e53 | |
the-real-herowl | 69d3fa5f85 | |
the-real-herowl | 5e673b8fee | |
Araca | 596c56d31f | |
the-real-herowl | e582c3bb97 | |
the-real-herowl | b5b8d4f336 | |
Doods | c1971b662a | |
nixnoxus | a86e8e2c8e | |
Doods | a3db7bd504 | |
ancientmarinerdev | ac4aff12ea | |
emptyshore | 003288bc80 | |
teknomunk | 13ce4f9092 | |
teknomunk | 0a294c55a1 | |
teknomunk | 44bb07507d | |
cora | 3509b85a3e | |
emptyshore | 55653fe37b | |
the-real-herowl | 0170619866 | |
ancientmarinerdev | 0b521ef92b | |
nixnoxus | 8931576c50 | |
the-real-herowl | c65176af81 | |
the-real-herowl | a71a634168 | |
the-real-herowl | 89e8cf0213 | |
nixnoxus | 08b41a3b39 | |
the-real-herowl | 26fc0cd4d8 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | e50ad7d6de | |
the-real-herowl | 4b6d63739c | |
the-real-herowl | c6a112d200 | |
the-real-herowl | ade2a1a6a2 | |
the-real-herowl | b04493dcb6 | |
the-real-herowl | a5740f8edf | |
nixnoxus | 9809c627dc | |
syl | 21dbc25f13 | |
CyberMango | 4a22287eb6 | |
nixnoxus | 497f1dcd80 | |
nixnoxus | 01cace413f | |
Eliy21 | 7bfbaac772 | |
the-real-herowl | 8d5c9996a2 | |
the-real-herowl | 87abd0f4dc | |
the-real-herowl | 03b8ad15e3 | |
the-real-herowl | fc6fe3f1ed | |
the-real-herowl | 3fa4cf6d52 | |
the-real-herowl | 3d799266c3 | |
AFCMS | caa82c40c9 | |
the-real-herowl | 8c19d4b9b8 | |
the-real-herowl | 1476c7ae59 | |
the-real-herowl | 13825763b0 | |
the-real-herowl | c31226041f | |
the-real-herowl | b3bcd949b9 | |
the-real-herowl | a8ad631864 | |
the-real-herowl | 1478960b7f | |
the-real-herowl | f41990c1d0 | |
José Douglas da Silva Souza | 77a6ac1ef3 | |
José Douglas da Silva Souza | 9b9271e5df | |
the-real-herowl | 1175be45fb | |
the-real-herowl | f444efbb03 | |
chmodsayshello | a2a38b7b3d | |
Eliy21 | aa4f8ba6cc | |
Eliy21 | b645a2ab67 | |
Eliy21 | d41d29be58 | |
Eliy21 | 434bb33f72 | |
Eliy21 | d37840e022 | |
Eliy21 | aea5c6f7be | |
Eliy21 | 5154dce8d0 | |
Eliy21 | c0a5c63601 | |
Eliy21 | 473c85c543 | |
Eliy21 | 86c10002a6 | |
Eliy21 | b56424a0b6 | |
Eliy21 | 93dff87a5e | |
Eliy21 | be711ea727 | |
Eliy21 | 7b42779fe2 | |
Eliy21 | 11d0062255 | |
Eliy21 | 4dd04b4c91 | |
Eliy21 | 109aed75df | |
James Clarke | 184f1575ee | |
Eliy21 | 7561e1dc95 | |
Eliy21 | bee44f41b6 | |
Eliy21 | b2b2dc4090 | |
Eliy21 | a78b308a75 | |
Eliy21 | cc7a2e0b41 | |
Eliy21 | 996a5a6d47 | |
Eliy21 | 4c8efca4e6 | |
SmokeyDope | 2d2b64006b | |
emptyshore | 8e103cf615 | |
the-real-herowl | d1ac98a019 | |
codiac | d3c591915f | |
the-real-herowl | b507838e13 | |
Doods | b944a70059 | |
Doods | 9397e736a8 | |
Doods | b7ea609422 | |
Doods | 23a3d53ca6 | |
Doods | 7e31f015fe | |
Doods | f1fda9b412 | |
James Clarke | 1a2b9e5930 | |
Doods | bb29dade32 | |
James Clarke | 961ee13ba1 | |
James Clarke | efd19bd0ee | |
James Clarke | fe8612d944 | |
James Clarke | c586e480ed | |
James Clarke | 0da8428eef | |
James Clarke | ddfbd331c9 | |
James Clarke | 47b6bd5539 | |
James Clarke | 16cdc9fd12 | |
James Clarke | 2904e3119f | |
James Clarke | e04f4d3b2a | |
James Clarke | 0584fc4ebf | |
James Clarke | 1147a9715a | |
James Clarke | e05e46bc59 | |
Doods | 7793a31f0e | |
James Clarke | a6753806cc | |
Doods | a25bdfbc90 | |
James Clarke | 254fe4d98e | |
James Clarke | 6324c805eb | |
James Clarke | 3103969bdc | |
Doods | 7cb17eefa1 | |
James Clarke | 4f0ad6de6d | |
James Clarke | 59ffda6e86 | |
James Clarke | 1b7cde697a | |
James Clarke | bae95fea09 | |
James Clarke | 5f6173b999 | |
James Clarke | bd113dd902 | |
James Clarke | 557ea75c5d | |
James Clarke | 98a5f07ef8 | |
James Clarke | 29fe5e5b40 | |
James Clarke | a5573aab26 | |
James Clarke | 17da379269 | |
James Clarke | 566bc8a02b | |
Eliy21 | 44bd1c7b71 | |
the-real-herowl | ac8ff800ec | |
JoseDouglas26 | 3b60a8eb18 | |
the-real-herowl | 681175c463 | |
the-real-herowl | 3dafeb7505 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | 4c0bad754e | |
PrWalterB | 899c45534f | |
the-real-herowl | cfd41d458a | |
the-real-herowl | 41c6773fd4 | |
the-real-herowl | 27c3760da1 | |
James Clarke | aa4d5738c7 | |
the-real-herowl | 59ad110e6b | |
James Clarke | ee24b24c68 | |
James Clarke | f94e7fc52f | |
chmodsayshello | 45c84b1f1d | |
chmodsayshello | 96dbcc45d0 | |
chmodsayshello | bfe333ef60 | |
chmodsayshello | 89eb0f9b3e | |
chmodsayshello | 146b0ade37 | |
chmodsayshello | 0f91b763e9 | |
chmodsayshello | aeccc94687 | |
the-real-herowl | d3881fc1d1 | |
chmodsayshello | b47fae0ed4 | |
chmodsayshello | 180c8fb73e | |
the-real-herowl | c70ae8e535 | |
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 | c1115c9cef | |
pineaulo | 7af5e79afc | |
the-real-herowl | 12b3e34f88 | |
bakawun | 4d90dfab0e | |
bakawun | b2b63266b7 | |
bakawun | d151e79fb9 | |
bakawun | e419e6d63b | |
cora | 55517154bd | |
bakawun | 402e4e7b79 | |
the-real-herowl | 59c5d54cbe | |
tuxilio | 4b5afee4bb | |
the-real-herowl | 3c2247d7c8 | |
the-real-herowl | 324fd0dc4a | |
bakawun | cd033aa4ff | |
bakawun | 1f3c7913dd | |
bakawun | 49aa32d2ee | |
the-real-herowl | 18db66c431 | |
JoseDouglas26 | cc3f092185 | |
the-real-herowl | 9f64facbf9 | |
JoseDouglas26 | 6694babbde | |
SmokeyDope | fc204c8717 | |
SmokeyDope | c664216104 | |
SmokeyDope | cd3426b5ce | |
the-real-herowl | 9867c73eb3 | |
the-real-herowl | 3db02bb022 | |
SmokeyDope | 3c7597b75e | |
SmokeyDope | 7bf3fbf13c | |
SmokeyDope | fc7133f1a8 | |
SmokeyDope | 05eb3bb8aa | |
SmokeyDope | 7583caca9b | |
pineaulo | 411e3e161f | |
the-real-herowl | 882531b9fc | |
the-real-herowl | 0b5c15d05f | |
the-real-herowl | cd930365b0 | |
the-real-herowl | 24eca01c3f | |
the-real-herowl | 4e3cf9e04b | |
cora | 29d40ef553 | |
bakawun | a786b66d9e | |
bakawun | cc470b9d88 | |
bakawun | ee51a500b2 | |
bakawun | 7f823f0155 | |
bakawun | f5ba0b7981 | |
bakawun | e202f20869 | |
bakawun | 692b101212 | |
Bakawun | 5f3c901f11 | |
michaljmalinowski | 9be5de980e | |
bakawun | 25fa21ddbd | |
Nils Dagsson Moskopp | aad231f5e4 | |
Nils Dagsson Moskopp | 10022c93ef | |
Nils Dagsson Moskopp | 01bcbbf927 | |
Nils Dagsson Moskopp | 12a33e458f | |
Nils Dagsson Moskopp | 5dcf714cd1 | |
Nils Dagsson Moskopp | 0c6d9a4d85 | |
Nils Dagsson Moskopp | ef65de54c0 | |
Nils Dagsson Moskopp | 4d57ba62bf | |
Nils Dagsson Moskopp | 4064333b06 | |
Nils Dagsson Moskopp | e87a8fc332 | |
Nils Dagsson Moskopp | bb68ceb38d | |
Nils Dagsson Moskopp | 4dd3833f3b | |
Nils Dagsson Moskopp | 3029147ed7 | |
Nils Dagsson Moskopp | 5bf0e79c6f | |
Nils Dagsson Moskopp | e9862f5f24 | |
Nils Dagsson Moskopp | 685bdcb379 | |
Nils Dagsson Moskopp | 7446a275b5 | |
Nils Dagsson Moskopp | 83348bf3ac | |
Nils Dagsson Moskopp | 45e405982a | |
Nils Dagsson Moskopp | e83894fcfa | |
Nils Dagsson Moskopp | 9f9b78eed9 | |
Nils Dagsson Moskopp | ed061e68ff | |
Nils Dagsson Moskopp | 1f9c446a98 | |
Nils Dagsson Moskopp | 7b94fc026d | |
Nils Dagsson Moskopp | fa23775bf9 | |
Nils Dagsson Moskopp | 36ee45ebe3 | |
Nils Dagsson Moskopp | 2112637faf | |
Nils Dagsson Moskopp | 5b79bc6fb7 | |
Nils Dagsson Moskopp | 759b0a188f | |
Nils Dagsson Moskopp | 376b6404b2 | |
Nils Dagsson Moskopp | 9bd1702d60 | |
Nils Dagsson Moskopp | 5640e19c94 | |
Nils Dagsson Moskopp | 25b7b30945 | |
Nils Dagsson Moskopp | 9af0719df8 | |
Nils Dagsson Moskopp | 1b48c3f539 | |
Nils Dagsson Moskopp | 13552f16f2 | |
Nils Dagsson Moskopp | 4f6ea5d035 | |
Nils Dagsson Moskopp | c00b0d50c6 | |
Nils Dagsson Moskopp | adb8e45d67 | |
Nils Dagsson Moskopp | 3f60b5baa6 | |
Nils Dagsson Moskopp | 52e5c955f0 | |
Lizzy Fleckenstein | b88579b52e | |
Lizzy Fleckenstein | eaa4dc99d7 |
|
@ -4,7 +4,7 @@ root = true
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
|
|
||||||
[*.lua]
|
[*.lua]
|
||||||
charset = utf8
|
charset = utf-8
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
|
@ -20,11 +20,11 @@ https://git.minetest.land/MineClone2/MineClone2/src/branch/master/CODE_OF_CONDUC
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
What version of MineClone2 are you using? We do not provide support for outdated versions of MineClone2.
|
What version of VoxeLibre are you using? We do not provide support for outdated versions of VoxeLibre.
|
||||||
Current latest version is listed here, at the top:
|
Current latest version is listed here, at the top:
|
||||||
https://git.minetest.land/MineClone2/MineClone2/tags
|
https://git.minetest.land/MineClone2/MineClone2/tags
|
||||||
-->
|
-->
|
||||||
MineClone2 version:
|
VoxeLibre version:
|
||||||
|
|
||||||
### What happened?
|
### What happened?
|
||||||
Report about the bug! Please send large log snippets as an attachement file.
|
Report about the bug! Please send large log snippets as an attachement file.
|
||||||
|
|
|
@ -21,5 +21,5 @@ https://git.minetest.land/MineClone2/MineClone2/src/branch/master/CODE_OF_CONDUC
|
||||||
### Current feature in Minecraft
|
### Current feature in Minecraft
|
||||||
Tell us about the feature currently in Minecraft! What is it like on Minecraft?
|
Tell us about the feature currently in Minecraft! What is it like on Minecraft?
|
||||||
|
|
||||||
### Current feature in MineClone2
|
### Current feature in VoxeLibre
|
||||||
Tell us about the feature currently in MineClone2! What is different?
|
Tell us about the feature currently in VoxeLibre! What is different?
|
||||||
|
|
|
@ -6,3 +6,5 @@
|
||||||
/.idea/
|
/.idea/
|
||||||
*.xcf
|
*.xcf
|
||||||
.Rproj.user
|
.Rproj.user
|
||||||
|
prompt.txt
|
||||||
|
__pycache__
|
||||||
|
|
14
API.md
|
@ -1,10 +1,10 @@
|
||||||
# API
|
# API
|
||||||
## Groups
|
## Groups
|
||||||
MineClone 2 makes very extensive use of groups. Making sure your items and objects have the correct group memberships is very important.
|
VoxeLibre makes very extensive use of groups. Making sure your items and objects have the correct group memberships is very important.
|
||||||
Groups are explained in `GROUPS.md`.
|
Groups are explained in `GROUPS.md`.
|
||||||
|
|
||||||
## Mod naming convention
|
## Mod naming convention
|
||||||
Mods mods in MineClone 2 follow a simple naming convention: Mods with the prefix “`mcl_`” are specific to MineClone 2, although they may be based on an existing standalone. Mods which lack this prefix are *usually* verbatim copies of a standalone mod. Some modifications may still have been applied, but the APIs are held compatible.
|
Mods mods in VoxeLibre follow a simple naming convention: Mods with the prefix "`vl_`" and “`mcl_`” are specific to VoxeLibre (formerly known as MineClone2), although they may be based on an existing standalone. Mods which lack this prefix are *usually* verbatim copies of a standalone mod. Some modifications may still have been applied, but the APIs are held compatible.
|
||||||
|
|
||||||
## Adding items
|
## Adding items
|
||||||
### Special fields
|
### Special fields
|
||||||
|
@ -31,7 +31,7 @@ All nodes can have these fields:
|
||||||
Use the `mcl_sounds` mod for the sounds.
|
Use the `mcl_sounds` mod for the sounds.
|
||||||
|
|
||||||
## APIs
|
## APIs
|
||||||
A lot of things are possible by using one of the APIs in the mods. Note that not all APIs are documented yet, but it is planned. The following APIs should be more or less stable but keep in mind that MineClone 2 is still unfinished. All directory names are relative to `mods/`
|
A lot of things are possible by using one of the APIs in the mods. Many of them are documented in `API.md` files located in the directories of the specific mods. Some use `.txt` files or have some documentation in the comments along the code. Note that not all APIs are documented yet, but it is planned. The following APIs should be more or less stable but keep in mind that VoxeLibre is still unfinished. All directory names are relative to `mods/`
|
||||||
|
|
||||||
### Items
|
### Items
|
||||||
* Doors: `ITEMS/mcl_doors`
|
* Doors: `ITEMS/mcl_doors`
|
||||||
|
@ -46,8 +46,7 @@ A lot of things are possible by using one of the APIs in the mods. Note that not
|
||||||
### Mobs
|
### Mobs
|
||||||
* Mobs: `ENTITIES/mcl_mobs`
|
* Mobs: `ENTITIES/mcl_mobs`
|
||||||
|
|
||||||
MineClone 2 uses its own mobs framework, called “Mobs Redo: MineClone 2 Edition” or “MRM” for short.
|
VoxeLibre uses its own mobs framework, which is a fork of Mobs Redo [`mobs`] by TenPlus1.
|
||||||
This is a fork of Mobs Redo [`mobs`] by TenPlus1.
|
|
||||||
|
|
||||||
You can add your own mobs, spawn eggs and spawning rules with this mod.
|
You can add your own mobs, spawn eggs and spawning rules with this mod.
|
||||||
API documnetation is included in `ENTITIES/mcl_mobs/api.txt`.
|
API documnetation is included in `ENTITIES/mcl_mobs/api.txt`.
|
||||||
|
@ -55,7 +54,7 @@ API documnetation is included in `ENTITIES/mcl_mobs/api.txt`.
|
||||||
This mod includes modificiations from the original Mobs Redo. Some items have been removed or moved to other mods.
|
This mod includes modificiations from the original Mobs Redo. Some items have been removed or moved to other mods.
|
||||||
The API is mostly identical, but a few features have been added. Compability is not really a goal,
|
The API is mostly identical, but a few features have been added. Compability is not really a goal,
|
||||||
but function and attribute names of Mobs Redo 1.41 are kept.
|
but function and attribute names of Mobs Redo 1.41 are kept.
|
||||||
If you have code for a mod which works fine under Mobs Redo, it should be easy to make it work in MineClone 2,
|
If you have code for a mod which works fine under Mobs Redo, it should be easy to make it work in VoxeLibre.
|
||||||
chances are good that it works out of the box.
|
chances are good that it works out of the box.
|
||||||
|
|
||||||
### Help
|
### Help
|
||||||
|
@ -68,6 +67,7 @@ chances are good that it works out of the box.
|
||||||
|
|
||||||
### Utility APIs
|
### Utility APIs
|
||||||
* Change player physics: `PLAYER/playerphysics`
|
* Change player physics: `PLAYER/playerphysics`
|
||||||
|
* Change player FOV: `PLAYER/mcl_fovapi`
|
||||||
* Select random treasures: `CORE/mcl_loot`
|
* Select random treasures: `CORE/mcl_loot`
|
||||||
* Get flowing direction of liquids: `CORE/flowlib`
|
* Get flowing direction of liquids: `CORE/flowlib`
|
||||||
* `on_walk_over` callback for nodes: `CORE/walkover`
|
* `on_walk_over` callback for nodes: `CORE/walkover`
|
||||||
|
@ -77,7 +77,7 @@ chances are good that it works out of the box.
|
||||||
* Flowers and flower pots
|
* Flowers and flower pots
|
||||||
|
|
||||||
### Unstable APIs
|
### Unstable APIs
|
||||||
The following APIs may be subject to change in future. You could already use these APIs but there will probably be breaking changes in the future, or the API is not as fleshed out as it should be. Use at your own risk!
|
The following APIs may be subject to change in the future. You could already use these APIs but there will probably be breaking changes in the future, or the API is not as fleshed out as it should be. Use at your own risk!
|
||||||
|
|
||||||
* Panes (like glass panes and iron bars): `ITEMS/xpanes`
|
* Panes (like glass panes and iron bars): `ITEMS/xpanes`
|
||||||
* `_on_ignite` callback: `ITEMS/mcl_fire`
|
* `_on_ignite` callback: `ITEMS/mcl_fire`
|
||||||
|
|
159
CONTRIBUTING.md
|
@ -1,48 +1,47 @@
|
||||||
# Contributing to MineClone2
|
# Contributing to VoxeLibre
|
||||||
So you want to contribute to MineClone2?
|
So you want to contribute to VoxeLibre?
|
||||||
Wow, thank you! :-)
|
Wow, thank you! :-)
|
||||||
|
|
||||||
MineClone2 is maintained by AncientMariner and Nicu. If you have any
|
VoxeLibre is maintained by AncientMariner and Herowl. If you have any
|
||||||
problems or questions, contact us on Discord/Matrix (See Links section below).
|
problems or questions, contact us on Discord/Matrix (See Links section below).
|
||||||
|
|
||||||
You can help with MineClone2's development in many different ways,
|
You can help with VoxeLibre'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...
|
## VoxeLibre's development target is to...
|
||||||
- Create a stable, peformant, moddable, free/libre game based on Minecraft
|
- Create a stable, peformant, moddable, free/libre game inspired by Minecraft
|
||||||
using the Minetest engine, usable in both singleplayer and multiplayer.
|
using the Minetest engine, usable in both singleplayer and multiplayer.
|
||||||
- Currently, a lot of features are already implemented.
|
- Currently, a lot of features are already implemented.
|
||||||
Polishing existing features is always welcome.
|
Polishing existing features is always welcome.
|
||||||
|
|
||||||
## Links
|
## Links
|
||||||
* [Mesehub](https://git.minetest.land/MineClone2/MineClone2)
|
* [Mesehub](https://git.minetest.land/VoxeLibre/VoxeLibre)
|
||||||
* [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/#voxelibre:matrix.org)
|
||||||
* [Matrix](https://app.element.io/#/room/#mc2:matrix.org)
|
* [Reddit](https://www.reddit.com/r/VoxeLibre/)
|
||||||
* [Reddit](https://www.reddit.com/r/MineClone2/)
|
|
||||||
* [Minetest forums](https://forum.minetest.net/viewtopic.php?f=50&t=16407)
|
* [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)
|
||||||
|
|
||||||
## Using git
|
## Using git
|
||||||
MineClone2 is developed using the version control system
|
VoxeLibre is developed using the version control system
|
||||||
[git](https://git-scm.com/). If you want to contribute code to the
|
[git](https://git-scm.com/). If you want to contribute code to the
|
||||||
project, it is **highly recommended** that you learn the git basics.
|
project, it is **highly recommended** that you learn the git basics.
|
||||||
For non-programmers and people who do not plan to contribute code to
|
For non-programmers and people who do not plan to contribute code to
|
||||||
MineClone2, git is not required. However, git is a tool that will be
|
VoxeLibre, git is not required. However, git is a tool that will be
|
||||||
referenced frequently because of its usefulness. As such, it is valuable
|
referenced frequently because of its usefulness. As such, it is valuable
|
||||||
in learning how git works and its terminology. It can also help you
|
in learning how git works and its terminology. It can also help you
|
||||||
keeping your game updated, and easily test pull requests.
|
keeping your game updated, and easily test pull requests.
|
||||||
|
|
||||||
Look at our wiki for some concrete guides:
|
Look at our wiki for some concrete guides:
|
||||||
https://git.minetest.land/MineClone2/MineClone2/wiki/
|
https://git.minetest.land/VoxeLibre/VoxeLibre/wiki/
|
||||||
|
|
||||||
## How you can help as a non-programmer
|
## How you can help as a non-programmer
|
||||||
As someone who does not know how to write programs in Lua or does not
|
As someone who does not know how to write programs in Lua or does not
|
||||||
know how to use the Minetest API, you can still help us out a lot. For
|
know how to use the Minetest API, you can still help us out a lot. For
|
||||||
example, by opening an issue in the
|
example, by opening an issue in the
|
||||||
[Issue tracker](https://git.minetest.land/MineClone2/MineClone2/issues),
|
[Issue tracker](https://git.minetest.land/VoxeLibre/VoxeLibre/issues),
|
||||||
you can report a bug or request a feature.
|
you can report a bug or request a feature.
|
||||||
|
|
||||||
### Rules about both bugs and feature requests
|
### Rules about both bugs and feature requests
|
||||||
|
@ -60,8 +59,7 @@ actually an issue with Minetest itself, and if it is, head to the
|
||||||
[Minetest issue tracker](https://github.com/minetest/minetest/issues)
|
[Minetest issue tracker](https://github.com/minetest/minetest/issues)
|
||||||
instead.
|
instead.
|
||||||
* If you need any help regarding creating a Mesehub account or opening
|
* If you need any help regarding creating a Mesehub account or opening
|
||||||
an issue, feel free to ask on the Discord / Matrix server or the IRC
|
an issue, feel free to ask on the Discord or Matrix space.
|
||||||
channel.
|
|
||||||
|
|
||||||
The link to the mesehub registration page is: https://git.minetest.land/user/sign_up
|
The link to the mesehub registration page is: https://git.minetest.land/user/sign_up
|
||||||
(It appears to sometimes get lost on the page itsself)
|
(It appears to sometimes get lost on the page itsself)
|
||||||
|
@ -75,7 +73,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 (from Minetest 5.7 type /ver, for previous versions, check the game.conf or README.md file).
|
* Tell us which VoxeLibre 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.
|
||||||
|
@ -84,14 +82,14 @@ behavior.
|
||||||
* Ensure the requested feature fulfills our development targets and
|
* Ensure the requested feature fulfills our development targets and
|
||||||
goals.
|
goals.
|
||||||
* Begging or excessive attention seeking does not help us in the
|
* Begging or excessive attention seeking does not help us in the
|
||||||
slightest, and may very well disrupt MineClone2 development. It's better
|
slightest, and may very well disrupt VoxeLibre development. It's better
|
||||||
to put that energy into helping or researching the feature in question.
|
to put that energy into helping or researching the feature in question.
|
||||||
After all, we're just volunteers working on our spare time.
|
After all, we're just volunteers working on our spare time.
|
||||||
* Ensure the requested feature has not been implemented in MineClone2
|
* Ensure the requested feature has not been implemented in VoxeLibre
|
||||||
latest or development versions.
|
latest or development versions.
|
||||||
|
|
||||||
### Testing code
|
### Testing code
|
||||||
If you want to help us with speeding up MineClone2 development and
|
If you want to help us with speeding up VoxeLibre development and
|
||||||
making the game more stable, a great way to do that is by testing out
|
making the game more stable, a great way to do that is by testing out
|
||||||
new features from contributors. For most new things that get into the
|
new features from contributors. For most new things that get into the
|
||||||
game, a pull request is created. A pull request is essentially a
|
game, a pull request is created. A pull request is essentially a
|
||||||
|
@ -103,20 +101,21 @@ tell us if the code works as expected without any issues. Ideally, you
|
||||||
would report issues will pull requests similar to when you were
|
would report issues will pull requests similar to when you were
|
||||||
reporting bugs that are the mainline (See Reporting bugs section). You
|
reporting bugs that are the mainline (See Reporting bugs section). You
|
||||||
can find currently open pull requests here:
|
can find currently open pull requests here:
|
||||||
<https://git.minetest.land/MineClone2/MineClone2/pulls>. Note that pull
|
<https://git.minetest.land/VoxeLibre/VoxeLibre/pulls>. Note that pull
|
||||||
requests that start with a `WIP:` are not done yet and therefore could
|
requests that start with a `WIP:` are not done yet and therefore could
|
||||||
still undergo substantial change. Testing these is still helpful however
|
still undergo substantial change. Testing these is still helpful however
|
||||||
because that is the reason developers put them up as WIP so other people
|
because that is the reason developers put them up as WIP so other people
|
||||||
can have a look at the PR.
|
can have a look at the PR. The wiki has an article with instructions
|
||||||
|
on how to test Pull Requests:
|
||||||
|
<https://git.minetest.land/VoxeLibre/VoxeLibre/wiki/Testing-Pull-Requests>.
|
||||||
|
|
||||||
### Contributing assets
|
### Contributing assets
|
||||||
Due to license problems, MineClone2 cannot use Minecraft's assets,
|
Due to license problems, VoxeLibre cannot use Minecraft's assets,
|
||||||
therefore we are always looking for asset contributions.
|
therefore we are always looking for asset contributions.
|
||||||
|
|
||||||
To contribute assets, it can be useful to learn git basics and read
|
To contribute assets, it can be useful to learn git basics and read
|
||||||
the section for Programmers of this document, however this is not required.
|
the section for Programmers of this document, however this is not required.
|
||||||
It's also a good idea to join the Discord server
|
It's also a good idea to join the Discord server and/or Matrix space.
|
||||||
(or alternatively IRC or Matrix).
|
|
||||||
|
|
||||||
#### Textures
|
#### Textures
|
||||||
For textures we prefer original art, but in the absence of that will accept
|
For textures we prefer original art, but in the absence of that will accept
|
||||||
|
@ -128,9 +127,9 @@ If you want to make such contributions, join our Discord server. Demands
|
||||||
for textures will be communicated there.
|
for textures will be communicated there.
|
||||||
|
|
||||||
#### Sounds
|
#### Sounds
|
||||||
MineClone2 currently does not have a consistent way to handle sounds.
|
VoxeLibre currently does not have a consistent way to handle sounds.
|
||||||
The sounds in the game come from different sources, like the SnowZone
|
The sounds in the game come from different sources, like the SnowZone
|
||||||
resource pack or minetest_game. Unfortunately, MineClone2 does not play
|
resource pack or minetest_game. Unfortunately, VoxeLibre 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
|
||||||
|
@ -140,7 +139,7 @@ changes made by the contributor. Use the README files in the mod to
|
||||||
communicate this information.
|
communicate this information.
|
||||||
|
|
||||||
#### 3D Models
|
#### 3D Models
|
||||||
Most of the 3D Models in MineClone2 come from
|
Many of the 3D Models in VoxeLibre come from
|
||||||
[22i's repository](https://github.com/22i/minecraft-voxel-blender-models).
|
[22i's repository](https://github.com/22i/minecraft-voxel-blender-models).
|
||||||
Similar to the textures, we need people that can make 3D Models with
|
Similar to the textures, we need people that can make 3D Models with
|
||||||
Blender on demand. Many of the models have to be patched, some new
|
Blender on demand. Many of the models have to be patched, some new
|
||||||
|
@ -154,13 +153,13 @@ also be credited in the Contributors section.
|
||||||
### Contributing Translations
|
### Contributing Translations
|
||||||
|
|
||||||
#### Workflow
|
#### Workflow
|
||||||
To add/update support for your language to MineClone2, you should take
|
To add/update support for your language to VoxeLibre, you should take
|
||||||
the steps documented in the section for Programmers, add/update the
|
the steps documented in the section for Programmers, add/update the
|
||||||
translation files of the mods that you want to update. You can add
|
translation files of the mods that you want to update. You can add
|
||||||
support for all mods, just some of them or only one mod; you can update
|
support for all mods, just some of them or only one mod; you can update
|
||||||
the translation file entirely or only partly; basically any effort is
|
the translation file entirely or only partly; basically any effort is
|
||||||
valued. If your changes are small, you can also send them to developers
|
valued. If your changes are small, you can also send them to developers
|
||||||
via E-Mail, Discord, IRC or Matrix - they will credit you appropriately.
|
via E-Mail, Discord or Matrix - they will credit you appropriately.
|
||||||
|
|
||||||
#### Things to note
|
#### Things to note
|
||||||
You can use the script at `tools/check_translate_files.py` to compare
|
You can use the script at `tools/check_translate_files.py` to compare
|
||||||
|
@ -178,7 +177,7 @@ If you have commited the results yourself, you will also be credited in
|
||||||
the Contributors section.
|
the Contributors section.
|
||||||
|
|
||||||
### Profiling
|
### Profiling
|
||||||
If you own a server, a great way to help us improve MineClone2's code
|
If you own a server, a great way to help us improve VoxeLibre's code
|
||||||
is by giving us profiler results. Profiler results give us detailed
|
is by giving us profiler results. Profiler results give us detailed
|
||||||
information about the game's performance and let us know places to
|
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.
|
||||||
|
@ -203,18 +202,23 @@ decisions. Also, note that a lot of discussion takes place on the
|
||||||
Discord server, so it's definitely worth checking it out.
|
Discord server, so it's definitely worth checking it out.
|
||||||
|
|
||||||
### Funding
|
### Funding
|
||||||
You can help pay for our infrastructure (Mesehub) by donating to our
|
You can help pay for our infrastructure (Mesehub) and other unforeseen
|
||||||
OpenCollective link (See Links section).
|
expenses (in the last few years, only payments for Mesehub have been done)
|
||||||
|
by donating to our OpenCollective link (See Links section).
|
||||||
|
|
||||||
### Crediting
|
### Crediting
|
||||||
If you opened or have contributed to an issue, you receive the
|
If you opened or have contributed to an issue, you receive the
|
||||||
`Community` role on our Discord (after asking for it).
|
`Community` role on our Discord (after asking for it).
|
||||||
|
If you have been an author of a PR that got merged or contributed
|
||||||
|
significantly to art that got merged into the game, you receive the
|
||||||
|
`Contributor` role on our Discord (after asking for it).
|
||||||
|
Please note that what counts as "significant" is decided by Maintainers.
|
||||||
OpenCollective Funders are credited in their own section in
|
OpenCollective Funders are credited in their own section in
|
||||||
`CREDITS.md` and receive a special role "Funder" on our discord (unless
|
`CREDITS.md` and receive a special role "Funder" on our discord (unless
|
||||||
they have made their donation Incognito).
|
they have made their donation Incognito).
|
||||||
|
|
||||||
## How you can help as a programmer
|
## How you can help as a programmer
|
||||||
(Almost) all the MineClone2 development is done using pull requests.
|
(Almost) all the VoxeLibre development is done using pull requests.
|
||||||
|
|
||||||
### Recommended workflow
|
### Recommended workflow
|
||||||
* Fork the repository (in case you have not already)
|
* Fork the repository (in case you have not already)
|
||||||
|
@ -237,11 +241,11 @@ is no issue on the topic, open one. If there is an issue, tell us that
|
||||||
you'd like to take care of it, to avoid duplicate work.
|
you'd like to take care of it, to avoid duplicate work.
|
||||||
|
|
||||||
### Don't hesitate to ask for help
|
### Don't hesitate to ask for help
|
||||||
We appreciate any contributing effort to MineClone2. If you are a
|
We appreciate any contributing effort to VoxeLibre. If you are a
|
||||||
relatively new programmer, you can reach us on Discord, Matrix or IRC
|
relatively new programmer, you can reach us on Discord or Matrix
|
||||||
for questions about git, Lua, Minetest API, MineClone2 codebase or
|
for questions about git, Lua, Minetest API, VoxeLibre codebase or
|
||||||
anything related to MineClone2. We can help you avoid writing code that
|
anything related to VoxeLibre. We can help you avoid writing code that
|
||||||
would be deemed inadequate, or help you become familiar with MineClone2
|
would be deemed inadequate, or help you become familiar with VoxeLibre
|
||||||
better, or assist you use development tools.
|
better, or assist you use development tools.
|
||||||
|
|
||||||
### Maintain your own code, even if already got merged
|
### Maintain your own code, even if already got merged
|
||||||
|
@ -250,40 +254,52 @@ scenarios by testing every time before merging it, but if your merged
|
||||||
work causes problems, we ask you fix the issues as soon as possible.
|
work causes problems, we ask you fix the issues as soon as possible.
|
||||||
|
|
||||||
### Changing Gameplay
|
### Changing Gameplay
|
||||||
Pull Requests that change gameplay have to be properly researched and
|
Pull Requests that change gameplay are always subject to discussion.
|
||||||
need to state their sources. These PRs also need the maintainer's approval
|
Opinions from the community on such PRs are valued, and Maintainer
|
||||||
before they are merged.
|
should approve the concept (which is usually granted) as well as
|
||||||
You can use these sources:
|
the implementation (for which changes are often requested for either
|
||||||
|
code quality or game design reasons).
|
||||||
* Testing things inside of Minecraft (Attach screenshots / video footage
|
|
||||||
of the results)
|
|
||||||
* Looking at [Minestom](https://github.com/Minestom/Minestom) code. An open source Minecraft Server implementation
|
|
||||||
* [Official Minecraft Wiki](https://minecraft.fandom.com/wiki/Minecraft_Wiki)
|
|
||||||
(Include a link to the specific page you used)
|
|
||||||
|
|
||||||
### Guidelines
|
### Guidelines
|
||||||
|
|
||||||
#### Git Guidelines
|
#### Git Guidelines
|
||||||
* Pushing to master is disabled - don't even try it.
|
* Pushing to master is disabled - don't even try it!
|
||||||
* Every change is tracked as a PR.
|
* Every change is tracked as a PR
|
||||||
* All but the tiniest changes require at least one approval from a Developer
|
* All changes require at least one approval from a Developer
|
||||||
|
* Maintainers may merge PRs without formal approval, but should also
|
||||||
|
take others' opinions and testing into account
|
||||||
* To update branches we use rebase not merge (so we don't end up with
|
* To update branches we use rebase not merge (so we don't end up with
|
||||||
excessive git bureaucracy commits in master)
|
excessive git bureaucracy commits in master)
|
||||||
* We use merge to add the commits from a PR/branch to master
|
* We use merge to add the commits from a PR/branch to master
|
||||||
|
* Smaller PRs may be squashed before merging (especially if the commit history
|
||||||
|
on them isn't valuable), but when in doubt prefer merging
|
||||||
|
* Manual merging may be done by a Maintainer if there are technical problems
|
||||||
|
with the branch, with Gitea, or the PR had been merged to from master and
|
||||||
|
the author can't fix it for whatever reason
|
||||||
|
* PR from a fork (usually the author has no contributor/developer privileges)
|
||||||
|
can be retargeted and merged first into a buffer (normal new) branch on the repo
|
||||||
|
when adopted by a Developer, and only later into 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 VL 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 VL is submodule free so far)
|
||||||
|
* Subtrees may be used for including outside mods that don't need changes
|
||||||
|
in the foreseeable future
|
||||||
* Commit messages should be descriptive
|
* Commit messages should be descriptive
|
||||||
* 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
|
||||||
* Similarly multiple small commits are better than a giant one. (use git commit -p)
|
* Similarly multiple small commits are better than a giant one. (use git commit -p)
|
||||||
|
|
||||||
#### Code Guidelines
|
#### Code Guidelines
|
||||||
* Each mod must provide `mod.conf`.
|
* Each mod must provide `mod.conf`.
|
||||||
* Mod names are snake case, and newly added mods start with `mcl_`, e.g.
|
* Mod names are snake case, and newly added mods (or substantially changed mods
|
||||||
`mcl_core`, `mcl_farming`, `mcl_monster_eggs`. Keep in mind Minetest
|
that are included from the outside) start with `vl_`, e.g.
|
||||||
|
`vl_hollow_logs`, . Keep in mind Minetest
|
||||||
does not support capital letters in mod names.
|
does not support capital letters in mod names.
|
||||||
|
* In the past mods were prefixed with `mcl_`, e.g.
|
||||||
|
`mcl_core`, `mcl_farming`, `mcl_monster_eggs`. New mods should **never** use this prefix.
|
||||||
|
* Mods included from outside with no significant changes to the API
|
||||||
|
(especially those using git-subtree or such) aren't prefixed.
|
||||||
* To export functions, store them inside a global table named like the
|
* To export functions, store them inside a global table named like the
|
||||||
mod, e.g.
|
mod, e.g.
|
||||||
|
|
||||||
|
@ -357,17 +373,21 @@ 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 as a contributor. Those that have demonstrated the right
|
VoxeLibre repository as a contributor. This means that they can push
|
||||||
technical skills and behaviours may be granted developer access. These are the
|
directly to the branches of our repo (except for `master`).
|
||||||
most trusted contributors who will contribute to ensure coding standards and
|
Pushing to others' branches without asking is discouraged, open a PR
|
||||||
processes are followed.
|
targeting that branch instead (PRs can target any branch).
|
||||||
|
|
||||||
|
Those that have demonstrated the right technical skills and behaviour
|
||||||
|
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/contributor privileges you can just open a new branch
|
- If you have developer/contributor privileges you can just open a new branch
|
||||||
in the mcl2 repository (which is preferred). From that you create a pull request.
|
in the VL 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 contributor or 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 approve PRs. A maintainer may prefer
|
- Any developer is welcome to review, test and approve PRs. A maintainer may prefer
|
||||||
to merge the PR especially if it is in a similar area to what has been worked on
|
to merge the PR especially if it is in a similar area to what has been worked on
|
||||||
|
@ -390,14 +410,14 @@ merged.
|
||||||
- Resolving conflicts and problems within the community
|
- Resolving conflicts and problems within the community
|
||||||
|
|
||||||
#### Current maintainers
|
#### Current maintainers
|
||||||
* AncientMariner - responsible for gameplay review, publishing releases,
|
* AncientMariner - responsible for gameplay review, publishing releases
|
||||||
|
* Herowl - responsible for gameplay review, publishing releases,
|
||||||
technical guidelines
|
technical guidelines
|
||||||
* Nicu - responsible for community related issues
|
|
||||||
|
|
||||||
#### Release process
|
#### Release process
|
||||||
* Run `tools/generate_ingame_credits.lua` to update the ingame credits
|
* Run `tools/generate_ingame_credits.lua` to update the ingame credits
|
||||||
from `CREDITS.md` and commit the result (if anything changed)
|
from `CREDITS.md` and commit the result (if anything changed)
|
||||||
* Launch MineClone2 to make sure it still runs
|
* Launch VoxeLibre to make sure it still runs
|
||||||
* Update the version number in README.md
|
* Update the version number in README.md
|
||||||
* Use `git tag <version number>` to tag the latest commit with the
|
* Use `git tag <version number>` to tag the latest commit with the
|
||||||
version number
|
version number
|
||||||
|
@ -415,6 +435,5 @@ become part of a free/libre software.
|
||||||
|
|
||||||
### Crediting
|
### Crediting
|
||||||
Contributors, Developers and Maintainers will be credited in
|
Contributors, Developers and Maintainers will be credited in
|
||||||
`CREDITS.md`. If you make your first time contribution, please add
|
`CREDITS.md`. There are also Discord roles for Contributors,
|
||||||
yourself to this file. There are also Discord roles for Contributors,
|
|
||||||
Developers and Maintainers.
|
Developers and Maintainers.
|
||||||
|
|
19
CREDITS.md
|
@ -3,7 +3,7 @@
|
||||||
## Creator of MineClone
|
## Creator of MineClone
|
||||||
* davedevils
|
* davedevils
|
||||||
|
|
||||||
## Creator of MineClone2
|
## Creator of VoxeLibre
|
||||||
* Wuzzy
|
* Wuzzy
|
||||||
|
|
||||||
## Maintainers
|
## Maintainers
|
||||||
|
@ -24,6 +24,8 @@
|
||||||
* SmokeyDope
|
* SmokeyDope
|
||||||
* Faerraven / Michieal
|
* Faerraven / Michieal
|
||||||
* Codiac
|
* Codiac
|
||||||
|
* rudzik8
|
||||||
|
* teknomunk
|
||||||
|
|
||||||
## Past Developers
|
## Past Developers
|
||||||
* jordan4ibanez
|
* jordan4ibanez
|
||||||
|
@ -37,7 +39,6 @@
|
||||||
|
|
||||||
## Contributors
|
## Contributors
|
||||||
* RandomLegoBrick
|
* RandomLegoBrick
|
||||||
* rudzik8
|
|
||||||
* Code-Sploit
|
* Code-Sploit
|
||||||
* aligator
|
* aligator
|
||||||
* Rootyjr
|
* Rootyjr
|
||||||
|
@ -129,12 +130,22 @@
|
||||||
* Bakawun
|
* Bakawun
|
||||||
* JoseDouglas26
|
* JoseDouglas26
|
||||||
* Zasco
|
* Zasco
|
||||||
|
* PrWalterB
|
||||||
|
* michaljmalinowski
|
||||||
|
* nixnoxus
|
||||||
|
* Potiron
|
||||||
|
* Tuxilio
|
||||||
|
* Impulse
|
||||||
|
* Doods
|
||||||
|
* SOS-Games
|
||||||
|
* Bram
|
||||||
|
* qoheniac
|
||||||
|
|
||||||
## Music
|
## Music
|
||||||
* Jordach for the jukebox music compilation from Big Freaking Dig
|
* Jordach for the jukebox music compilation from Big Freaking Dig
|
||||||
* 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/
|
* 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/
|
||||||
* 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)
|
* Jester for helping to finely tune VoxeLibre (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 wonderful MineClone2 tracks (https://www.youtube.com/channel/UClFo_JDWoG4NGrPQY0JPD_g). Songs: Valley of Ghosts, Lonely Blossom, Farmer (License CC BY-SA 4.0)
|
* Exhale & Tim Unwin for some wonderful VoxeLibre tracks (https://www.youtube.com/channel/UClFo_JDWoG4NGrPQY0JPD_g). Songs: Valley of Ghosts, Lonely Blossom, Farmer (License CC BY-SA 4.0)
|
||||||
* 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)
|
* 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)
|
||||||
|
|
||||||
## Original Mod Authors
|
## Original Mod Authors
|
||||||
|
|
|
@ -25,7 +25,7 @@ The basic digging time groups determine by which tools a node can be dug.
|
||||||
* `handy=1`: Breakable by hand and this node gives it useful drop when dug by hand. All nodes which are breakable by pickaxe, axe, shovel, sword or shears are also automatically breakable by hand, but not neccess
|
* `handy=1`: Breakable by hand and this node gives it useful drop when dug by hand. All nodes which are breakable by pickaxe, axe, shovel, sword or shears are also automatically breakable by hand, but not neccess
|
||||||
* `creative_breakable=1`: Block is breakable by hand in creative mode. This group is implied if the node belongs to any other digging group
|
* `creative_breakable=1`: Block is breakable by hand in creative mode. This group is implied if the node belongs to any other digging group
|
||||||
|
|
||||||
Please read <http://minecraft.gamepedia.com/Breaking> to learn how digging times work in Minecraft, as MineClone 2 is based on the same system.
|
Please read <http://minecraft.gamepedia.com/Breaking> to learn how digging times work in Minecraft, as VoxeLibre is based on the same system.
|
||||||
|
|
||||||
### Groups for interactions
|
### Groups for interactions
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ These groups correspond to the Minecraft materials. They classify the block into
|
||||||
* `material_glass=1`: Glass
|
* `material_glass=1`: Glass
|
||||||
|
|
||||||
Currently, these groups are used for the note block.
|
Currently, these groups are used for the note block.
|
||||||
Note that not all Minecraft materials are used so far. More Minecraft materials will lilely only be added when they are needed for a concrete use case.
|
Note that not all Minecraft materials are used so far. More Minecraft materials will likely only be added when they are needed for a concrete use case.
|
||||||
|
|
||||||
### Declarative groups
|
### Declarative groups
|
||||||
These groups are used mostly for informational purposes
|
These groups are used mostly for informational purposes
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Survive, farm, build, explore, play with friends, and do much more. Inspired by a well known block game, pushing beyond.
|
Survive, farm, build, explore, play with friends, and do much more. Inspired by a well-known block game, pushing beyond.
|
||||||
|
|
||||||
How to play:
|
How to play:
|
||||||
|
|
||||||
|
@ -6,16 +6,18 @@ How to play:
|
||||||
- Navigate to https://www.minetest.net/ to download the client.
|
- Navigate to https://www.minetest.net/ to download the client.
|
||||||
- Once installed, open and select the "Content" tab
|
- Once installed, open and select the "Content" tab
|
||||||
|
|
||||||
#### Install MineClone2 from ContentDB
|
#### Install VoxeLibre from ContentDB
|
||||||
- Click "Browse Online Content" and filter by Games (select "Games" from the dropdown box)
|
- Click "Browse Online Content" and filter by Games (select "Games" from the dropdown box)
|
||||||
- Find "MineClone2" (should be first on the list or on the first page)
|
- Find "VoxeLibre" (should be first on the list or on the first page)
|
||||||
- Click the [+] button next to MineClone2 and wait for download to finish
|
- Click the [+] button next to VoxeLibre and wait for download to finish
|
||||||
- Click "Back to Main Menu"
|
- Click "Back to Main Menu"
|
||||||
|
|
||||||
#### Create new world and play
|
#### Create new world and play
|
||||||
- Click "Start Game" tab
|
- Click "Start Game" tab
|
||||||
- At the bottom click the MineClone2 icon (the 2 dirt with grass blocks)
|
- At the bottom click the VoxeLibre icon (the stone & sandstone ball with the letters VL)
|
||||||
- Click "New", give your world a name
|
- Click "New", give your world a name
|
||||||
- You can leave seed blank or put in a word of your choice
|
- You can leave seed blank or put in a word of your choice
|
||||||
|
- Pick a mapgen or leave the default (v7, valleys or carpathian mapgens are recommended)
|
||||||
|
- Pick mapgen options on the right (enabling everything is recommended)
|
||||||
- Select your new world
|
- Select your new world
|
||||||
- Click "Play Game" and enjoy!
|
- Click "Play Game" and enjoy!
|
14
LEGAL.md
|
@ -1,14 +1,14 @@
|
||||||
# Legal information
|
# Legal information
|
||||||
This is a fan game, not developed or endorsed by Mojang AB.
|
This is a game inspired by Minecraft with unique content.
|
||||||
|
|
||||||
Copying is an act of love. Please copy and share! <3
|
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 Lizzy Fleckenstein, Wuzzy, davedevils and countless others)
|
VoxeLibre (by Lizzy Fleckenstein, Wuzzy, davedevils and countless others)
|
||||||
is an imitation of Minecraft.
|
is inspired by Minecraft.
|
||||||
|
|
||||||
MineClone 2 is free software: you can redistribute it and/or modify
|
VoxeLibre is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
@ -22,15 +22,15 @@ details.
|
||||||
In the mods you might find in the read-me or license
|
In the mods you might find in the read-me or license
|
||||||
text files a different license. This counts as dual-licensing.
|
text files a different license. This counts as dual-licensing.
|
||||||
You can choose which license applies to you: Either the
|
You can choose which license applies to you: Either the
|
||||||
license of MineClone 2 (GNU GPLv3) or the mod's license.
|
license of VoxeLibre (GNU GPLv3) or the mod's license.
|
||||||
|
|
||||||
MineClone 2 is a direct continuation of the discontinued MineClone
|
VoxeLibre is a direct continuation of the discontinued MineClone
|
||||||
project by davedevils.
|
project by davedevils.
|
||||||
|
|
||||||
Mod credits:
|
Mod credits:
|
||||||
See `README.txt` or `README.md` in each mod directory for information about other authors.
|
See `README.txt` or `README.md` in each mod directory for information about other authors.
|
||||||
For mods that do not have such a file, the license is the source code license
|
For mods that do not have such a file, the license is the source code license
|
||||||
of MineClone 2 and the author is Wuzzy.
|
of VoxeLibre and the author is Wuzzy.
|
||||||
|
|
||||||
## License of media (textures and sounds)
|
## License of media (textures and sounds)
|
||||||
No non-free licenses are used anywhere.
|
No non-free licenses are used anywhere.
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
# Models in Minetest/Mineclone2
|
# Models in Minetest/VoxeLibre
|
||||||
|
|
||||||
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 VoxeLibre. 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 VoxeLibre.
|
||||||
|
|
||||||
## 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/VoxeLibre, please visit the Minetest wiki's page on using Blender [Here](https://wiki.minetest.net/Using_Blender)
|
||||||
|
|
||||||
## Recommended software
|
## Recommended software
|
||||||
|
|
||||||
|
|
49
README.md
|
@ -1,6 +1,6 @@
|
||||||
# MineClone2
|
# VoxeLibre
|
||||||
An unofficial Minecraft-like game for Minetest. Forked from MineClone by davedevils.
|
A game inspired by Minecraft for Minetest. Forked from MineClone by davedevils.
|
||||||
Developed by many people. Not developed or endorsed by Mojang AB.
|
Developed by many people, see CREDITS.md for a complete list.
|
||||||
|
|
||||||
### Gameplay
|
### Gameplay
|
||||||
You start in a randomly-generated world made entirely of cubes. You can explore
|
You start in a randomly-generated world made entirely of cubes. You can explore
|
||||||
|
@ -64,47 +64,44 @@ Use the `/giveme` chat command to obtain them. See the in-game help for
|
||||||
an explanation.
|
an explanation.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
This game requires [Minetest](http://minetest.net) to run (version 5.4.1 or
|
To run the game with the best performance and support, we recommend the latest
|
||||||
later). So you need to install Minetest first. Only stable versions of Minetest
|
stable version of [Minetest](http://minetest.net), be we always make an effort
|
||||||
are officially supported.
|
to support one version behind the latest stable version. In some cases, older
|
||||||
There is no support for running MineClone2 in development versions of Minetest.
|
versions might still be good enough but you would be missing out on important
|
||||||
|
Minetest features that enable important features for our game.
|
||||||
|
|
||||||
To install MineClone2 (if you haven't already), move this directory into the
|
There is no support for running VoxeLibre in development versions of Minetest.
|
||||||
|
|
||||||
|
To install VoxeLibre (if you haven't already), move this directory into the
|
||||||
“games” directory of your Minetest data directory. Consult the help of
|
“games” directory of your Minetest data directory. Consult the help of
|
||||||
Minetest to learn more.
|
Minetest to learn more.
|
||||||
|
|
||||||
## Useful links
|
## Useful links
|
||||||
The MineClone2 repository is hosted at Mesehub. To contribute or report issues, head there.
|
The VoxeLibre repository is hosted at Mesehub. To contribute or report issues, head there.
|
||||||
|
|
||||||
* Mesehub: <https://git.minetest.land/MineClone2/MineClone2>
|
* Mesehub: <https://git.minetest.land/VoxeLibre/VoxeLibre>
|
||||||
* 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>
|
||||||
* 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>
|
* Mastodon: <https://fosstodon.org/@VoxeLibre>
|
||||||
* Lemmy: <https://lemmy.world/c/mineclone2>
|
* Lemmy: <https://lemm.ee/c/voxelibre>
|
||||||
* Matrix space: <https://app.element.io/#/room/#mcl2:matrix.org>
|
* Matrix space: <https://app.element.io/#/room/#voxelibre:matrix.org>
|
||||||
* Minetest forums: <https://forum.minetest.net/viewtopic.php?f=50&t=16407>
|
* Minetest forums: <https://forum.minetest.net/viewtopic.php?f=50&t=16407>
|
||||||
* Reddit: <https://www.reddit.com/r/MineClone2/>
|
* Reddit: <https://www.reddit.com/r/VoxeLibre/>
|
||||||
* IRC (barely used): <https://web.libera.chat/#mineclone2>
|
* IRC (barely used): <https://web.libera.chat/#mineclone2>
|
||||||
|
|
||||||
## Target
|
## Target
|
||||||
- Create a stable, moddable, free/libre game based on Minecraft
|
- Create a stable, peformant, moddable, free/libre game inspired by Minecraft
|
||||||
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 Java
|
- Currently, a lot of features are already implemented.
|
||||||
Edition** features are already implemented and polishing existing
|
Polishing existing features is always welcome.
|
||||||
features are prioritized over new feature requests.
|
|
||||||
- Implement features targetting
|
|
||||||
**Current Minecraft versions + OptiFine** (OptiFine only as far as supported
|
|
||||||
by the Minetest Engine).
|
|
||||||
- Create a performant experience that will run relatively
|
|
||||||
well on really low spec computers.
|
|
||||||
|
|
||||||
## 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.
|
If you want to use the development version of VoxeLibre in production, the master branch is usually relatively stable.
|
||||||
|
|
||||||
The following main features are available:
|
The following main features are available:
|
||||||
|
|
||||||
|
@ -187,7 +184,7 @@ Technical differences from Minecraft:
|
||||||
* Different engine (Minetest)
|
* Different engine (Minetest)
|
||||||
* Different easter eggs
|
* Different easter eggs
|
||||||
|
|
||||||
… and finally, MineClone2 is free software (“free” as in “freedom”)!
|
… and finally, VoxeLibre is free software (“free” as in “freedom”)!
|
||||||
|
|
||||||
## Other readme files
|
## Other readme files
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# MineClone2
|
# VoxeLibre
|
||||||
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.
|
Un jeu inspiré de Minecraft pour Minetest. Forké depuis Mineclone par davedevils.
|
||||||
|
Développé par de nombreuses personnes, voir CREDITS.md pour une liste complète.
|
||||||
|
|
||||||
### 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.
|
||||||
|
@ -21,7 +22,7 @@ Vous atterissez dans un monde fait entièrement de cubes et généré aléatoire
|
||||||
### 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 un établi**
|
* Placez les 4 planches de bois dans la grille 2x2 et **fabriquez un établi**
|
||||||
* **Faites un clic droit sur l'établi** (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 !
|
||||||
|
@ -30,10 +31,10 @@ Vous atterissez dans un monde fait entièrement de cubes et généré aléatoire
|
||||||
### Agriculture
|
### Agriculture
|
||||||
* Trouvez des graines
|
* Trouvez des graines
|
||||||
* Fabriquez une houe
|
* Fabriquez une houe
|
||||||
* Faites un clic droit sur la terre ou des blocs similaires avec la houe pour créer des terres agricoles
|
* Faites un clic droit sur la terre ou un bloc similaire avec la houe pour créer des terres agricoles
|
||||||
* Placer des graines sur des terres agricoles et regardez les pousser
|
* Placez 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 proches de l'eau deviennent humides et accélèrent la croissance
|
||||||
|
|
||||||
### Four
|
### Four
|
||||||
* Fabriquez un four
|
* Fabriquez un four
|
||||||
|
@ -54,33 +55,35 @@ Utilisez la commande de chat `/giveme` pour les obtenir. Voir l'aide interne au
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
Ce jeu nécessite [Minetest](http://minetest.net) pour fonctionner (version 5.4.1 ou plus). Vous devez donc installer Minetest d'abord. Seules les versions stables de Minetest sont officielement supportées.
|
Ce jeu nécessite [Minetest](http://minetest.net) pour fonctionner (version 5.4.1 ou plus). Vous devez donc installer Minetest d'abord. Seules les versions stables de Minetest sont officielement supportées.
|
||||||
Il n'y a pas de support de MineClone2 dans les versions développement de Minetest.
|
Il n'y a pas de support de VoxeLibre dans les versions développement de Minetest.
|
||||||
|
|
||||||
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 VoxeLibre (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 signaler des problèmes, allez là-bas.
|
Le dépôt de VoxeLibre 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/VoxeLibre/VoxeLibre>
|
||||||
* 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/>
|
|
||||||
* 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>
|
||||||
|
* Mastodon : <https://fosstodon.org/@VoxeLibre>
|
||||||
|
* Lemmy : <https://lemm.ee/c/voxelibre>
|
||||||
|
* Espace Matrix : <https://app.element.io/#/room/#voxelibre:matrix.org>
|
||||||
|
* Forums Minetest : <https://forum.minetest.net/viewtopic.php?f=50&t=16407>
|
||||||
|
* Reddit : <https://www.reddit.com/r/VoxeLibre/>
|
||||||
|
* IRC (peu utilisé) : <https://web.libera.chat/#mineclone2>
|
||||||
|
|
||||||
## Objectif
|
## Objectif
|
||||||
* 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.
|
* Créer un jeu stable, performant, moddable et libre inspiré de Minecraft en utilisant le moteur de jeu Minetest, utilisable à la fois en mode solo et multijoueur.
|
||||||
* 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.
|
* Actuellement, un grand nombre de fonctionnalités sont déjà implémenté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 à basses performances, les optimisations sont difficiles à explorer.
|
L'amélioration des fonctionnalités existantes est toujours la bienvenue.
|
||||||
|
|
||||||
## 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 fonctionnalité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 VoxeLibre en production, la branche master est habituellement relativement stable.
|
||||||
|
|
||||||
Les principales fonctionnalités suivantes sont disponibles :
|
Les principales fonctionnalités suivantes sont disponibles :
|
||||||
|
|
||||||
|
@ -162,7 +165,7 @@ Différences techniques avec Minecraft :
|
||||||
* 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 VoxeLibre est un logiciel libre !
|
||||||
|
|
||||||
## Autres fichiers readme
|
## Autres fichiers readme
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# MineClone2
|
# VoxeLibre
|
||||||
Неофициальная игра в стиле Minecraft для Minetest. Форк MineClone от davedevils.
|
Неофициальная игра в стиле Minecraft для Minetest. Форк MineClone от davedevils.
|
||||||
Разработана многими людьми. Не разработана и не одобрена Mojang AB.
|
Разработана многими людьми. Не разработана и не одобрена Mojang AB.
|
||||||
|
|
||||||
|
@ -67,13 +67,13 @@
|
||||||
## Установка
|
## Установка
|
||||||
Эта игра требует [Minetest](http://minetest.net) для запуска (версия 5.4.1 или
|
Эта игра требует [Minetest](http://minetest.net) для запуска (версия 5.4.1 или
|
||||||
выше). Вам нужно сперва установить Minetest. Только стабильные версии поддерживаются
|
выше). Вам нужно сперва установить Minetest. Только стабильные версии поддерживаются
|
||||||
официально. Не поддерживается запуск MineClone2 на разрабатываемых версиях Minetest.
|
официально. Не поддерживается запуск VoxeLibre на разрабатываемых версиях Minetest.
|
||||||
|
|
||||||
Чтобы установить MineClone2 (если вы этого еще не сделали), переместите эту папку в
|
Чтобы установить VoxeLibre (если вы этого еще не сделали), переместите эту папку в
|
||||||
“games” в папке данных Minetest. Смотрите справку Minetest, чтобы узнать больше.
|
“games” в папке данных Minetest. Смотрите справку Minetest, чтобы узнать больше.
|
||||||
|
|
||||||
## Полезные ссылки
|
## Полезные ссылки
|
||||||
Репозиторий MineClone2 хранится на Mesehub. Зайдите туда, чтобы оставить запрос или
|
Репозиторий VoxeLibre хранится на Mesehub. Зайдите туда, чтобы оставить запрос или
|
||||||
поучаствовать в разработке.
|
поучаствовать в разработке.
|
||||||
|
|
||||||
* Mesehub: <https://git.minetest.land/MineClone2/MineClone2>
|
* Mesehub: <https://git.minetest.land/MineClone2/MineClone2>
|
||||||
|
@ -102,7 +102,7 @@ Edition** уже реализовано и доработка имеющегос
|
||||||
Игра сейчас на стадии **бета**. Она играбельна, но еще не имеет всех возможностей.
|
Игра сейчас на стадии **бета**. Она играбельна, но еще не имеет всех возможностей.
|
||||||
Обратная совместимость целиком не гарантируется, обновление вашего мира может повлечь
|
Обратная совместимость целиком не гарантируется, обновление вашего мира может повлечь
|
||||||
за собой небольшие ошибки. Если вы хотите использовать разрабатываемую версию
|
за собой небольшие ошибки. Если вы хотите использовать разрабатываемую версию
|
||||||
Mineclone2, то ветка master обычно относительно стабильна.
|
VoxeLibre, то ветка master обычно относительно стабильна.
|
||||||
|
|
||||||
Следущие возможности уже доступны:
|
Следущие возможности уже доступны:
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ Mineclone2, то ветка master обычно относительно ста
|
||||||
* Другой движок (Minetest)
|
* Другой движок (Minetest)
|
||||||
* Другие пасхалки
|
* Другие пасхалки
|
||||||
|
|
||||||
… и наконец, MineClone2 это свободное программное обеспечение!
|
… и наконец, VoxeLibre это свободное программное обеспечение!
|
||||||
|
|
||||||
## Другие readme файлы
|
## Другие readme файлы
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
# MineClone 2
|
This file is severely out of date. If you can help updating this translation, please reach out to us (contact in README.md - the English version).
|
||||||
|
|
||||||
|
# VoxeLibre
|
||||||
一個非官方的Minetest遊戲,遊玩方式和Minecraft類似。由davedevils從MineClone分拆。
|
一個非官方的Minetest遊戲,遊玩方式和Minecraft類似。由davedevils從MineClone分拆。
|
||||||
由許多人開發。並非由Mojang Studios開發。<!-- "Mojang AB"'s Name changed at 2020/05, main README should change too -->
|
由許多人開發。並非由Mojang Studios開發。<!-- "Mojang AB"'s Name changed at 2020/05, main README should change too -->
|
||||||
|
|
||||||
|
@ -83,11 +85,11 @@ Minetest to learn more.
|
||||||
The main goal of **MineClone 2** is to be a clone of Minecraft and to be released as free software.
|
The main goal of **MineClone 2** is to be a clone of Minecraft and to be released as free software.
|
||||||
|
|
||||||
* **開發目標:我的世界, Java版, 版本 1.12**
|
* **開發目標:我的世界, Java版, 版本 1.12**
|
||||||
* MineClone2還包括Minetest支持的Optifine功能。
|
* VoxeLibre還包括Minetest支持的Optifine功能。
|
||||||
* 後期Minecraft版本的功能可能會偷偷加入,但它們的優先級較低。
|
* 後期Minecraft版本的功能可能會偷偷加入,但它們的優先級較低。
|
||||||
* 總的來說,Minecraft的目標是在Minetest目前允許的情況下進行克隆。
|
* 總的來說,Minecraft的目標是在Minetest目前允許的情況下進行克隆。
|
||||||
* 克隆Minecraft是最優先的。
|
* 克隆Minecraft是最優先的。
|
||||||
* MineClone2將使用不同的圖形和聲音,但風格相似。
|
* VoxeLibre將使用不同的圖形和聲音,但風格相似。
|
||||||
* 克隆界面沒有優先權。只會被粗略地模仿。
|
* 克隆界面沒有優先權。只會被粗略地模仿。
|
||||||
* 在Minetest中發現的局限性將在開發過程中被記錄和報告。
|
* 在Minetest中發現的局限性將在開發過程中被記錄和報告。
|
||||||
|
|
||||||
|
@ -173,7 +175,7 @@ The main goal of **MineClone 2** is to be a clone of Minecraft and to be release
|
||||||
* 不同的聲音(各種來源)
|
* 不同的聲音(各種來源)
|
||||||
* 不同的引擎(Minetest)
|
* 不同的引擎(Minetest)
|
||||||
|
|
||||||
...最後,MineClone2是自由軟件!
|
...最後,VoxeLibre是自由軟件!
|
||||||
|
|
||||||
## 錯誤報告
|
## 錯誤報告
|
||||||
請在此處報告所有錯誤和缺少的功能:
|
請在此處報告所有錯誤和缺少的功能:
|
||||||
|
@ -190,7 +192,7 @@ The main goal of **MineClone 2** is to be a clone of Minecraft and to be release
|
||||||
|
|
||||||
* `LICENSE.txt`:GPLv3許可文本
|
* `LICENSE.txt`:GPLv3許可文本
|
||||||
* `CONTRIBUTING.md`: 為那些想參與貢獻的人提供資訊
|
* `CONTRIBUTING.md`: 為那些想參與貢獻的人提供資訊
|
||||||
* `MISSING_ENGINE_FEATURES.md`: MineClone2需要改进,Minetest中缺失的功能列表。
|
* `MISSING_ENGINE_FEATURES.md`: VoxeLibre需要改进,Minetest中缺失的功能列表。
|
||||||
* `API.md`: 關於MineClone2的API
|
* `API.md`: 關於MineClone2的API
|
||||||
|
|
||||||
## 參與者
|
## 參與者
|
||||||
|
@ -235,7 +237,7 @@ The main goal of **MineClone 2** is to be a clone of Minecraft and to be release
|
||||||
* [kingoscargames](https://github.com/kingoscargames):現有材質的各種編輯和添加
|
* [kingoscargames](https://github.com/kingoscargames):現有材質的各種編輯和添加
|
||||||
* [leorockway](https://github.com/leorockway):怪物紋理的一些編輯
|
* [leorockway](https://github.com/leorockway):怪物紋理的一些編輯
|
||||||
* [xMrVizzy](https://minecraft.curseforge.com/members/xMrVizzy):釉陶(材質以後會被替換)
|
* [xMrVizzy](https://minecraft.curseforge.com/members/xMrVizzy):釉陶(材質以後會被替換)
|
||||||
* yutyo <tanakinci2002@gmail.com>:MineClone2標志
|
* yutyo <tanakinci2002@gmail.com>:VoxeLibre標志
|
||||||
* 其他:GUI圖片
|
* 其他:GUI圖片
|
||||||
|
|
||||||
### 翻譯
|
### 翻譯
|
||||||
|
@ -254,7 +256,7 @@ The main goal of **MineClone 2** is to be a clone of Minecraft and to be release
|
||||||
|
|
||||||
### 特殊感謝
|
### 特殊感謝
|
||||||
|
|
||||||
* Wuzzy,感謝他啟動和維護MineClone2多年。
|
* Wuzzy,感謝他啟動和維護VoxeLibre多年。
|
||||||
* celeron55,創建Minetest。
|
* celeron55,創建Minetest。
|
||||||
* Minetest的社區提供了大量的mods選擇,其中一些最終被納入MineClone 2。
|
* Minetest的社區提供了大量的mods選擇,其中一些最終被納入MineClone 2。
|
||||||
* Jordach,為《Big Freaking Dig》的唱片機音樂合輯而來
|
* Jordach,為《Big Freaking Dig》的唱片機音樂合輯而來
|
||||||
|
|
208
RELEASE.md
|
@ -1,89 +1,167 @@
|
||||||
### Standard Release
|
## Standard Release
|
||||||
|
|
||||||
# File to document release steps with a view to evolving into a script
|
### Before releasing
|
||||||
|
|
||||||
# Update CREDITS.md
|
Make sure all PRs in the release milestone are merged and you are working on a clean branch based on the master branch, up-to-date with the one on the repo.
|
||||||
# Update version in game.conf
|
|
||||||
|
|
||||||
|
### Release process
|
||||||
|
|
||||||
|
1. Update CREDITS.md
|
||||||
|
2. Update version in game.conf
|
||||||
|
3. Run the script:
|
||||||
```
|
```
|
||||||
lua tools/generate_ingame_credits.lua
|
lua tools/generate_ingame_credits.lua
|
||||||
|
```
|
||||||
|
4. Make a commit for the above:
|
||||||
|
```
|
||||||
git add CREDITS.md
|
git add CREDITS.md
|
||||||
git add mods/HUD/mcl_credits/people.lua
|
git add mods/HUD/mcl_credits/people.lua
|
||||||
git add game.conf
|
git add game.conf
|
||||||
|
git commit -m "Updated release credits and set version for v0.87"
|
||||||
#git add RELEASE.md
|
|
||||||
|
|
||||||
git commit -m "Pre-release update credits and set version 0.83.0"
|
|
||||||
|
|
||||||
git tag 0.83.0
|
|
||||||
|
|
||||||
git push origin 0.83.0
|
|
||||||
```
|
```
|
||||||
|
5. Add release notes to the `releasenotes` folder, named like
|
||||||
# Update version in game.conf to the next version with -SNAPSHOT suffix
|
|
||||||
|
|
||||||
`git commit -m "Post-release set version 0.84.0-SNAPSHOT"`
|
|
||||||
|
|
||||||
### Hotfix Release
|
|
||||||
|
|
||||||
##### Prepare release branch
|
|
||||||
|
|
||||||
When hotfixing, you should never release new features. Any new code increases risk of new bugs which has additional testing/release concerns.
|
|
||||||
To mitigate this, you just release the last release, and the relevant bug fix. For this, we do the following:
|
|
||||||
|
|
||||||
* Create release branch from the last release tag, push it:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
git checkout -b release/0.82.1 0.82.0
|
0_87-the_prismatic_release.md
|
||||||
|
|
||||||
git push origin release/0.82.1
|
|
||||||
```
|
```
|
||||||
|
6. Make a commit for the release notes:
|
||||||
##### 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)
|
|
||||||
|
|
||||||
`git checkout -b hotfix_bug_1_branch`
|
|
||||||
|
|
||||||
* 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)
|
|
||||||
|
|
||||||
##### Update version and tag the release
|
|
||||||
|
|
||||||
* After all fixes are in release branch, pull it locally (best to avoid a merge conflict as feature branch will need to be merged into master also, which already changed version):
|
|
||||||
|
|
||||||
* Update version in game.conf to hotfix version and commit it. Example: version=0.82.1
|
|
||||||
|
|
||||||
* Tag it, push tag and branch:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
git tag 0.82.1
|
git add releasenotes/0_87-the_prismatic_release.md
|
||||||
|
git commit -m "Add release notes for v0.87"
|
||||||
git push origin 0.82.1
|
|
||||||
|
|
||||||
git push origin release/0.82.1
|
|
||||||
```
|
```
|
||||||
|
7. **Tag and push to the tag:**
|
||||||
Note: If you have to do more than 1 hotfix release, can do it on the same release branch.
|
```
|
||||||
|
git tag 0.87.0
|
||||||
|
git push origin 0.87.0
|
||||||
|
```
|
||||||
|
8. Update version in game.conf to the next version with -SNAPSHOT suffix:
|
||||||
|
```
|
||||||
|
git commit -m "Post-release set version 0.88.0-SNAPSHOT"
|
||||||
|
```
|
||||||
|
9. Push the above to a new branch, and make the release PR. Merge to finalize release process.
|
||||||
|
|
||||||
### Release via ContentDB
|
### Release via ContentDB
|
||||||
|
|
||||||
* Go to MineClone2 page (https://content.minetest.net/packages/Wuzzy/mineclone2/)
|
1. Go to VoxeLibre page (https://content.minetest.net/packages/Wuzzy/mineclone2/)
|
||||||
* Click +Release
|
2. Click [+Release] button
|
||||||
* Enter the release tag number in the title and Git reference box. For example (without quotes): "0.82.1"
|
3. Enter the release tag number in the title and Git reference box. For example (without quotes): "0.87.0"
|
||||||
* In the minimum minetest version, put the oldest supported version (as of 14/02/2023 it is 5.5), leave the Maximum minetest version blank
|
4. In the minimum minetest version, put the oldest supported version (as of 19/05/2024 it is 5.6), leave the Maximum minetest version blank
|
||||||
* Click save. Release is now live.
|
5. Click save. Release is now live.
|
||||||
|
|
||||||
##### Inform people
|
### After releasing
|
||||||
|
|
||||||
* Upload video to YouTube
|
...inform people.
|
||||||
* 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.
|
* Open a release meta issue on the tracker, unpin and close the issue for the previous release, pin the new one.
|
||||||
|
* Upload video to YouTube.
|
||||||
|
* Add a comment to the forum post with the release number and change log. Maintainer will update the main post with code link.
|
||||||
|
* Add a Discord announcement post and @everyone with link to the release issue, release notes and other content, like video and forum post.
|
||||||
|
* Add a Matrix announcement post and @room with links like above.
|
||||||
* Share the news on reddit + Lemmy. Good subs to share with:
|
* Share the news on reddit + Lemmy. Good subs to share with:
|
||||||
* r/linux_gaming
|
* r/linux_gaming
|
||||||
* r/opensourcegames
|
* r/opensourcegames
|
||||||
* r/opensource
|
* r/opensource
|
||||||
* r/freesoftware
|
* r/freesoftware
|
||||||
* r/linuxmasterrace
|
* r/linuxmasterrace
|
||||||
* r/MineClone2
|
* r/VoxeLibre
|
||||||
|
* r/MineClone2 (*for now*)
|
||||||
|
|
||||||
|
|
||||||
|
## Hotfix Release
|
||||||
|
|
||||||
|
### Before releasing
|
||||||
|
|
||||||
|
First, determine if the current state of the master branch is fine for the Hotfix.
|
||||||
|
In general, Hotfixes shouldn't contain new features to minimize the risk of regressions.
|
||||||
|
|
||||||
|
* If it hasn't been long since the release, and the only PRs merged so far are bugfixes and/or documentation changes,
|
||||||
|
it is certainly fine to use it as a base for the release.
|
||||||
|
* If there are some features merged, but they are aimed at fixing/alleviating important issues with the last released version, it may still be fine.
|
||||||
|
* If there are some simple QoL features merged that are irrelevant to the last release, it may still be fine to use it as a base for the Hotfix.
|
||||||
|
* If there are major features or large overhauls merged, it *most probably* is **not** fine to use as a base for the Hotfix.
|
||||||
|
|
||||||
|
If you decided that the current state of the master branch can be used as the Hotfix version, make sure that all the PRs merged since the last release
|
||||||
|
are in the Hotfix milestone and you are working on a clean branch based on the master branch, up-to-date with the one on the repo.
|
||||||
|
In this case, **skip** the following section.
|
||||||
|
|
||||||
|
### Prepare release branch
|
||||||
|
|
||||||
|
If you decided that the current state of the master branch shouldn't be used as the Hotfix version, you must prepare a release branch.
|
||||||
|
|
||||||
|
1. Create release branch from the last release tag, push it:
|
||||||
|
```
|
||||||
|
git checkout -b release/0.82.1 0.82.0
|
||||||
|
git push origin release/0.82.1
|
||||||
|
```
|
||||||
|
2. Cherry-pick the relevant commits from the master branch, or merge them from other (PR) branches.
|
||||||
|
3. Make sure your local copy of the branch contains all the relevant changes, **do not rebase**.
|
||||||
|
|
||||||
|
### Release process
|
||||||
|
|
||||||
|
1. Update CREDITS.md if it is needed
|
||||||
|
2. Update version in game.conf
|
||||||
|
3. If you've changed CREDITS.md, run the script:
|
||||||
|
```
|
||||||
|
lua tools/generate_ingame_credits.lua
|
||||||
|
```
|
||||||
|
4. Make a commit for the above:
|
||||||
|
```
|
||||||
|
git add game.conf
|
||||||
|
git commit -m "Set version for hotfix v0.87.1"
|
||||||
|
```
|
||||||
|
or, if credits got updated:
|
||||||
|
```
|
||||||
|
git add CREDITS.md
|
||||||
|
git add mods/HUD/mcl_credits/people.lua
|
||||||
|
git add game.conf
|
||||||
|
git commit -m "Updated release credits and set version for hotfix v0.87.1"
|
||||||
|
```
|
||||||
|
5. Add a section in the last releasnotes, like this:
|
||||||
|
```
|
||||||
|
## 0.87.1 hotfix
|
||||||
|
```
|
||||||
|
and describe the changes there
|
||||||
|
|
||||||
|
6. Make a commit for the releasenotes changes:
|
||||||
|
```
|
||||||
|
git add releasenotes/0_87-the_prismatic_release.md
|
||||||
|
git commit -m "Update release notes for hotfix v0.87.1"
|
||||||
|
```
|
||||||
|
7. **Tag and push to the tag:**
|
||||||
|
```
|
||||||
|
git tag 0.87.1
|
||||||
|
git push origin 0.87.1
|
||||||
|
```
|
||||||
|
8. If you are skipping some changes from the master branch (and thus are using a prepared master branch from the previous section),
|
||||||
|
push to the remote and skip the next two steps:
|
||||||
|
```
|
||||||
|
git push origin release/0.82.1
|
||||||
|
```
|
||||||
|
9. If you're releasing master branch, update version in game.conf to the next version with -SNAPSHOT suffix:
|
||||||
|
```
|
||||||
|
git commit -m "Post-hotfix reset version 0.88.0-SNAPSHOT"
|
||||||
|
```
|
||||||
|
10. If you're releasing master branch, push the above to a new branch, and make the release PR. Merge to finalize release process.
|
||||||
|
|
||||||
|
### Release via ContentDB
|
||||||
|
|
||||||
|
1. Go to VoxeLibre page (https://content.minetest.net/packages/Wuzzy/mineclone2/)
|
||||||
|
2. Click [+Release] button
|
||||||
|
3. Enter the release tag number in the title and Git reference box. For example (without quotes): "0.87.1"
|
||||||
|
4. In the minimum minetest version, put the oldest supported version (as of 19/05/2024 it is 5.6), leave the Maximum minetest version blank
|
||||||
|
5. Click save. Hotfix is now live.
|
||||||
|
|
||||||
|
### After releasing
|
||||||
|
|
||||||
|
...inform people.
|
||||||
|
|
||||||
|
* Add a comment to the forum post with the release number and change log. Maintainer will update the main post with code link.
|
||||||
|
* Add a Discord announcement post and @everyone with link to the release issue and release notes, and describe briefly what the hotfix does.
|
||||||
|
* Add a Matrix announcement post and @room with content like above.
|
||||||
|
* Share the news on reddit + Lemmy. Good subs to share with:
|
||||||
|
* r/linux_gaming
|
||||||
|
* r/opensourcegames
|
||||||
|
* r/opensource
|
||||||
|
* r/freesoftware
|
||||||
|
* r/linuxmasterrace
|
||||||
|
* r/VoxeLibre
|
||||||
|
* r/MineClone2 (*for now*)
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
# Making Textures In Mineclone2
|
# Making Textures In VoxeLibre
|
||||||
|
|
||||||
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.
|
Textures are a crucial asset for all items, nodes, and models in VoxeLibre. This document is for artist who would like to make and modify textures for VoxeLibre. While no means comprehensive, this document contains the basic important information for beginners to get started with texture curation and optimization.
|
||||||
|
|
||||||
## Minetest Wiki
|
## 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.
|
For more detailed information on creating and modifing texture packs for Minetest/VoxeLibre, 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 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
|
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
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
title = MineClone 2
|
title = VoxeLibre
|
||||||
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.87.0-SNAPSHOT
|
version=0.88.0-SNAPSHOT
|
||||||
|
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 151 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 113 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 113 KiB |
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 113 KiB |
BIN
menu/header.png
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 113 KiB |
BIN
menu/icon.png
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 19 KiB |
|
@ -16,7 +16,7 @@ information.
|
||||||
How the mod is used
|
How the mod is used
|
||||||
===================
|
===================
|
||||||
|
|
||||||
In MineClone 2, all diggable nodes have the hardness set in the custom field
|
In VoxeLibre, all diggable nodes have the hardness set in the custom field
|
||||||
"_mcl_hardness" (0 by default). These values are used together with digging
|
"_mcl_hardness" (0 by default). These values are used together with digging
|
||||||
groups by this mod to create the correct digging times for nodes. Digging
|
groups by this mod to create the correct digging times for nodes. Digging
|
||||||
groups are registered using the following code:
|
groups are registered using the following code:
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
name = _mcl_autogroup
|
name = _mcl_autogroup
|
||||||
author = ryvnf
|
author = ryvnf
|
||||||
description = MineClone 2 core mod which automatically adds groups to all items. Very important for digging times.
|
description = VoxeLibre core mod which automatically adds groups to all items. Very important for digging times.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
-- Overrides the builtin minetest.check_single_for_falling.
|
-- Overrides the builtin minetest.check_single_for_falling.
|
||||||
-- We need to do this in order to handle nodes in mineclone specific groups
|
-- We need to do this in order to handle nodes in VoxeLibre specific groups
|
||||||
-- "supported_node" and "attached_node_facedir".
|
-- "supported_node" and "attached_node_facedir".
|
||||||
--
|
--
|
||||||
-- Nodes in group "supported_node" can be placed on any node that does not
|
-- Nodes in group "supported_node" can be placed on any node that does not
|
||||||
|
@ -94,5 +94,16 @@ function minetest.check_single_for_falling(pos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if get_item_group(node.name, "supported_node_facedir") ~= 0 then
|
||||||
|
local dir = facedir_to_dir(node.param2)
|
||||||
|
if dir then
|
||||||
|
local def = registered_nodes[get_node(vector.add(pos, dir)).name]
|
||||||
|
if def and def.drawtype == "airlike" then
|
||||||
|
drop_attached_node(pos)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
name = mcl_autogroup
|
name = mcl_autogroup
|
||||||
author = ryvnf
|
author = ryvnf
|
||||||
description = MineClone 2 core mod which automatically adds groups to all items. Very important for digging times.
|
description = VoxeLibre core mod which automatically adds groups to all items. Very important for digging times.
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
--[[
|
--[[
|
||||||
Explosion API mod for Minetest (adapted to MineClone 2)
|
Explosion API mod for Minetest (adapted to VoxeLibre)
|
||||||
|
|
||||||
This mod is based on the Minetest explosion API mod, but has been changed
|
This mod is based on the Minetest explosion API mod, but has been changed
|
||||||
to have the same explosion mechanics as Minecraft and work with MineClone.
|
to have the same explosion mechanics as Minecraft and work with VoxeLibre
|
||||||
The computation-intensive parts of the mod has been optimized to allow for
|
The computation-intensive parts of the mod has been optimized to allow for
|
||||||
larger explosions and faster world updating.
|
larger explosions and faster world updating.
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# textdomain:mcl_explosions
|
||||||
|
@1 was caught in an explosion.=@1 z-es mòrt dins una explosion
|
|
@ -1,6 +1,8 @@
|
||||||
-- Some global variables (don't overwrite them!)
|
-- Some global variables (don't overwrite them!)
|
||||||
mcl_vars = {}
|
mcl_vars = {}
|
||||||
|
|
||||||
|
minetest.log("action", "World seed = " .. minetest.get_mapgen_setting("seed"))
|
||||||
|
|
||||||
mcl_vars.redstone_tick = 0.1
|
mcl_vars.redstone_tick = 0.1
|
||||||
|
|
||||||
-- GUI / inventory menu settings
|
-- GUI / inventory menu settings
|
||||||
|
@ -36,6 +38,8 @@ mcl_vars.MAP_BLOCKSIZE = math.max(1, minetest.MAP_BLOCKSIZE or 16)
|
||||||
mcl_vars.mapgen_limit = math.max(1, tonumber(minetest.get_mapgen_setting("mapgen_limit")) or 31000)
|
mcl_vars.mapgen_limit = math.max(1, tonumber(minetest.get_mapgen_setting("mapgen_limit")) or 31000)
|
||||||
mcl_vars.MAX_MAP_GENERATION_LIMIT = math.max(1, minetest.MAX_MAP_GENERATION_LIMIT or 31000)
|
mcl_vars.MAX_MAP_GENERATION_LIMIT = math.max(1, minetest.MAX_MAP_GENERATION_LIMIT or 31000)
|
||||||
|
|
||||||
|
-- Central chunk is offset from 0,0,0 coordinates by 32 nodes (2 blocks)
|
||||||
|
-- See more in https://git.minetest.land/VoxeLibre/VoxeLibre/wiki/World-structure%3A-positions%2C-boundaries%2C-blocks%2C-chunks%2C-dimensions%2C-barriers-and-the-void
|
||||||
local central_chunk_offset = -math.floor(mcl_vars.chunksize / 2)
|
local central_chunk_offset = -math.floor(mcl_vars.chunksize / 2)
|
||||||
|
|
||||||
mcl_vars.central_chunk_offset_in_nodes = central_chunk_offset * mcl_vars.MAP_BLOCKSIZE
|
mcl_vars.central_chunk_offset_in_nodes = central_chunk_offset * mcl_vars.MAP_BLOCKSIZE
|
||||||
|
@ -181,7 +185,7 @@ mcl_vars.mg_end_exit_portal_pos = vector.new(0, mcl_vars.mg_end_min + 71, 0)
|
||||||
mcl_vars.mg_realm_barrier_overworld_end_max = mcl_vars.mg_end_max
|
mcl_vars.mg_realm_barrier_overworld_end_max = mcl_vars.mg_end_max
|
||||||
mcl_vars.mg_realm_barrier_overworld_end_min = mcl_vars.mg_end_max - 11
|
mcl_vars.mg_realm_barrier_overworld_end_min = mcl_vars.mg_end_max - 11
|
||||||
|
|
||||||
-- Use MineClone 2-style dungeons
|
-- Use VoxeLibre-style dungeons
|
||||||
mcl_vars.mg_dungeons = true
|
mcl_vars.mg_dungeons = true
|
||||||
|
|
||||||
-- Set default stack sizes
|
-- Set default stack sizes
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
name = mcl_init
|
name = mcl_init
|
||||||
author = Wuzzy
|
author = Wuzzy
|
||||||
description = Initialization mod of MineClone 2. Defines some common shared variables and sets up initial default settings which have to be set at the beginning.
|
description = Initialization mod of VoxeLibre. Defines some common shared variables and sets up initial default settings which have to be set at the beginning.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# Oxidization API for MineClone 2
|
# Oxidization API for VoxeLibre
|
||||||
This mods adds the oxidization api, so that modders can easily use the same features that copper uses.
|
This mods adds the oxidization api, so that modders can easily use the same features that copper uses.
|
||||||
|
|
||||||
## API
|
## API
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name = mcl_oxidation
|
name = mcl_oxidation
|
||||||
title = Oxidation API for MineClone 2
|
title = Oxidation API for VoxeLibre
|
||||||
author = PrairieWind, N011, Michael
|
author = PrairieWind, N011, Michael
|
||||||
description = API to allow oxidizing different nodes.
|
description = API to allow oxidizing different nodes.
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
name = mcl_particles
|
name = mcl_particles
|
||||||
author = Wuzzy
|
author = Wuzzy
|
||||||
description = Contains particle images of MineClone 2. No code.
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
name = mcl_sounds
|
name = mcl_sounds
|
||||||
author = Wuzzy
|
author = Wuzzy
|
||||||
description = This mod contains the core sounds of MineClone 2 as well as helper function for mods to access them.
|
description = This mod contains the core sounds of VoxeLibre as well as helper function for mods to access them.
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
mcl_util = {}
|
mcl_util = {}
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath(minetest.get_current_modname()).."/roman_numerals.lua")
|
||||||
|
|
||||||
-- Updates all values in t using values from to*.
|
-- Updates all values in t using values from to*.
|
||||||
function table.update(t, ...)
|
function table.update(t, ...)
|
||||||
for _, to in ipairs {...} do
|
for _, to in ipairs {...} do
|
||||||
|
@ -113,7 +115,7 @@ end
|
||||||
-- Minetest 5.3.0 or less can only measure the light level. This came in at 5.4
|
-- 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
|
-- This function has been known to fail in multiple places so the error handling is added increase safety and improve
|
||||||
-- debugging. See:
|
-- debugging. See:
|
||||||
-- https://git.minetest.land/MineClone2/MineClone2/issues/1392
|
-- https://git.minetest.land/VoxeLibre/VoxeLibre/issues/1392
|
||||||
function mcl_util.get_natural_light (pos, time)
|
function mcl_util.get_natural_light (pos, time)
|
||||||
local status, retVal = pcall(minetest.get_natural_light, pos, time)
|
local status, retVal = pcall(minetest.get_natural_light, pos, time)
|
||||||
if status then
|
if status then
|
||||||
|
@ -160,7 +162,7 @@ function mcl_util.rotate_axis_and_place(itemstack, placer, pointed_thing, infini
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local undef = minetest.registered_nodes[unode.name]
|
local undef = minetest.registered_nodes[unode.name]
|
||||||
if undef and undef.on_rightclick then
|
if undef and undef.on_rightclick and not invert_wall then
|
||||||
undef.on_rightclick(pointed_thing.under, unode, placer,
|
undef.on_rightclick(pointed_thing.under, unode, placer,
|
||||||
itemstack, pointed_thing)
|
itemstack, pointed_thing)
|
||||||
return
|
return
|
||||||
|
@ -198,25 +200,11 @@ function mcl_util.rotate_axis_and_place(itemstack, placer, pointed_thing, infini
|
||||||
|
|
||||||
local p2
|
local p2
|
||||||
if is_y then
|
if is_y then
|
||||||
if invert_wall then
|
p2 = 0
|
||||||
if fdir == 3 or fdir == 1 then
|
|
||||||
p2 = 12
|
|
||||||
else
|
|
||||||
p2 = 6
|
|
||||||
end
|
|
||||||
end
|
|
||||||
elseif is_x then
|
elseif is_x then
|
||||||
if invert_wall then
|
p2 = 12
|
||||||
p2 = 0
|
|
||||||
else
|
|
||||||
p2 = 12
|
|
||||||
end
|
|
||||||
elseif is_z then
|
elseif is_z then
|
||||||
if invert_wall then
|
p2 = 6
|
||||||
p2 = 0
|
|
||||||
else
|
|
||||||
p2 = 6
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
minetest.set_node(pos, {name = wield_name, param2 = p2})
|
minetest.set_node(pos, {name = wield_name, param2 = p2})
|
||||||
|
|
||||||
|
@ -271,12 +259,21 @@ end
|
||||||
---@param dst_inventory InvRef Destination inventory to push to
|
---@param dst_inventory InvRef Destination inventory to push to
|
||||||
---@param dst_list string Name of destination inventory list to push to
|
---@param dst_list string Name of destination inventory list to push to
|
||||||
---@param condition? fun(stack: ItemStack) Condition which items are allowed to be transfered.
|
---@param condition? fun(stack: ItemStack) Condition which items are allowed to be transfered.
|
||||||
|
---@param count? integer Number of items to try to transfer at once
|
||||||
---@return integer Item stack number to be transfered
|
---@return integer Item stack number to be transfered
|
||||||
function mcl_util.select_stack(src_inventory, src_list, dst_inventory, dst_list, condition)
|
function mcl_util.select_stack(src_inventory, src_list, dst_inventory, dst_list, condition, count)
|
||||||
local src_size = src_inventory:get_size(src_list)
|
local src_size = src_inventory:get_size(src_list)
|
||||||
local stack
|
local stack
|
||||||
for i = 1, src_size do
|
for i = 1, src_size do
|
||||||
stack = src_inventory:get_stack(src_list, i)
|
stack = src_inventory:get_stack(src_list, i)
|
||||||
|
|
||||||
|
-- Allow for partial stack movement
|
||||||
|
if count and stack:get_count() >= count then
|
||||||
|
local new_stack = ItemStack(stack)
|
||||||
|
new_stack:set_count(count)
|
||||||
|
stack = new_stack
|
||||||
|
end
|
||||||
|
|
||||||
if not stack:is_empty() and dst_inventory:room_for_item(dst_list, stack) and ((condition == nil or condition(stack))) then
|
if not stack:is_empty() and dst_inventory:room_for_item(dst_list, stack) and ((condition == nil or condition(stack))) then
|
||||||
return i
|
return i
|
||||||
end
|
end
|
||||||
|
@ -294,21 +291,22 @@ end
|
||||||
-- Returns true on success and false on failure
|
-- Returns true on success and false on failure
|
||||||
-- Possible failures: No item in source slot, destination inventory full
|
-- Possible failures: No item in source slot, destination inventory full
|
||||||
function mcl_util.move_item(source_inventory, source_list, source_stack_id, destination_inventory, destination_list)
|
function mcl_util.move_item(source_inventory, source_list, source_stack_id, destination_inventory, destination_list)
|
||||||
if not source_inventory:is_empty(source_list) then
|
-- Can't move items we don't have
|
||||||
local stack = source_inventory:get_stack(source_list, source_stack_id)
|
if source_inventory:is_empty(source_list) then return false end
|
||||||
if not stack:is_empty() then
|
|
||||||
local new_stack = ItemStack(stack)
|
-- Can't move from an empty stack
|
||||||
new_stack:set_count(1)
|
local stack = source_inventory:get_stack(source_list, source_stack_id)
|
||||||
if not destination_inventory:room_for_item(destination_list, new_stack) then
|
if stack:is_empty() then return false end
|
||||||
return false
|
|
||||||
end
|
local new_stack = ItemStack(stack)
|
||||||
stack:take_item()
|
new_stack:set_count(1)
|
||||||
source_inventory:set_stack(source_list, source_stack_id, stack)
|
if not destination_inventory:room_for_item(destination_list, new_stack) then
|
||||||
destination_inventory:add_item(destination_list, new_stack)
|
return false
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
return false
|
stack:take_item()
|
||||||
|
source_inventory:set_stack(source_list, source_stack_id, stack)
|
||||||
|
destination_inventory:add_item(destination_list, new_stack)
|
||||||
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Try pushing item from hopper inventory to destination inventory
|
--- Try pushing item from hopper inventory to destination inventory
|
||||||
|
@ -328,25 +326,23 @@ function mcl_util.hopper_push(pos, dst_pos)
|
||||||
local dst_list = 'main'
|
local dst_list = 'main'
|
||||||
local dst_inv, stack_id
|
local dst_inv, stack_id
|
||||||
|
|
||||||
|
-- Find a inventory stack in the destination
|
||||||
if dst_def._mcl_hoppers_on_try_push then
|
if dst_def._mcl_hoppers_on_try_push then
|
||||||
dst_inv, dst_list, stack_id = dst_def._mcl_hoppers_on_try_push(dst_pos, pos, hop_inv, hop_list)
|
dst_inv, dst_list, stack_id = dst_def._mcl_hoppers_on_try_push(dst_pos, pos, hop_inv, hop_list)
|
||||||
else
|
else
|
||||||
local dst_meta = minetest.get_meta(dst_pos)
|
local dst_meta = minetest.get_meta(dst_pos)
|
||||||
dst_inv = dst_meta:get_inventory()
|
dst_inv = dst_meta:get_inventory()
|
||||||
stack_id = mcl_util.select_stack(hop_inv, hop_list, dst_inv, dst_list)
|
stack_id = mcl_util.select_stack(hop_inv, hop_list, dst_inv, dst_list, nil, 1)
|
||||||
|
end
|
||||||
|
if not stack_id then return false end
|
||||||
|
|
||||||
|
-- Move the item
|
||||||
|
local ok = mcl_util.move_item(hop_inv, hop_list, stack_id, dst_inv, dst_list)
|
||||||
|
if dst_def._mcl_hoppers_on_after_push then
|
||||||
|
dst_def._mcl_hoppers_on_after_push(dst_pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
if stack_id ~= nil then
|
return ok
|
||||||
local ok = mcl_util.move_item(hop_inv, hop_list, stack_id, dst_inv, dst_list)
|
|
||||||
if dst_def._mcl_hoppers_on_after_push then
|
|
||||||
dst_def._mcl_hoppers_on_after_push(dst_pos)
|
|
||||||
end
|
|
||||||
if ok then
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return false
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Try pulling from source inventory to hopper inventory
|
-- Try pulling from source inventory to hopper inventory
|
||||||
|
@ -371,7 +367,7 @@ function mcl_util.hopper_pull(pos, src_pos)
|
||||||
else
|
else
|
||||||
local src_meta = minetest.get_meta(src_pos)
|
local src_meta = minetest.get_meta(src_pos)
|
||||||
src_inv = src_meta:get_inventory()
|
src_inv = src_meta:get_inventory()
|
||||||
stack_id = mcl_util.select_stack(src_inv, src_list, hop_inv, hop_list)
|
stack_id = mcl_util.select_stack(src_inv, src_list, hop_inv, hop_list, nil, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
if stack_id ~= nil then
|
if stack_id ~= nil then
|
||||||
|
@ -442,10 +438,11 @@ function mcl_util.generate_on_place_plant_function(condition)
|
||||||
if not def_under or not def_above then
|
if not def_under or not def_above then
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
if def_under.buildable_to then
|
if def_under.buildable_to and def_under.name ~= itemstack:get_name() then
|
||||||
place_pos = pointed_thing.under
|
place_pos = pointed_thing.under
|
||||||
elseif def_above.buildable_to then
|
elseif def_above.buildable_to and def_above.name ~= itemstack:get_name() then
|
||||||
place_pos = pointed_thing.above
|
place_pos = pointed_thing.above
|
||||||
|
pointed_thing.under = pointed_thing.above
|
||||||
else
|
else
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
@ -540,6 +537,7 @@ end
|
||||||
function mcl_util.use_item_durability(itemstack, n)
|
function mcl_util.use_item_durability(itemstack, n)
|
||||||
local uses = mcl_util.calculate_durability(itemstack)
|
local uses = mcl_util.calculate_durability(itemstack)
|
||||||
itemstack:add_wear(65535 / uses * n)
|
itemstack:add_wear(65535 / uses * n)
|
||||||
|
tt.reload_itemstack_description(itemstack) -- update tooltip
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_util.deal_damage(target, damage, mcl_reason)
|
function mcl_util.deal_damage(target, damage, mcl_reason)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
name = mcl_util
|
name = mcl_util
|
||||||
author = Wuzzy
|
author = Wuzzy
|
||||||
description = Helper functions for MineClone 2.
|
description = Helper functions for VoxeLibre.
|
||||||
depends = mcl_init
|
depends = mcl_init
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
local converter = {
|
||||||
|
{1000, "M"},
|
||||||
|
{900, "CM"},
|
||||||
|
{500, "D"},
|
||||||
|
{400, "CD"},
|
||||||
|
{100, "C"},
|
||||||
|
{90, "XC"},
|
||||||
|
{50, "L"},
|
||||||
|
{40, "XL"},
|
||||||
|
{10, "X"},
|
||||||
|
{9, "IX"},
|
||||||
|
{5, "V"},
|
||||||
|
{4, "IV"},
|
||||||
|
{1, "I"}
|
||||||
|
}
|
||||||
|
|
||||||
|
mcl_util.to_roman = function(number)
|
||||||
|
local r = ""
|
||||||
|
local a = number
|
||||||
|
local i = 1
|
||||||
|
while a > 0 do
|
||||||
|
if a >= converter[i][1] then
|
||||||
|
a = a - converter[i][1]
|
||||||
|
r = r.. converter[i][2]
|
||||||
|
else
|
||||||
|
i = i + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return r
|
||||||
|
end
|
|
@ -31,7 +31,7 @@ This function return the Minecraft dimension of <pos> ("overworld", "nether" or
|
||||||
* pos: position
|
* pos: position
|
||||||
|
|
||||||
## mcl_worlds.layer_to_y(layer, mc_dimension)
|
## mcl_worlds.layer_to_y(layer, mc_dimension)
|
||||||
Takes a Minecraft layer and a “dimension” name and returns the corresponding Y coordinate for MineClone 2.
|
Takes a Minecraft layer and a “dimension” name and returns the corresponding Y coordinate for VoxeLibre.
|
||||||
mc_dimension can be "overworld", "nether", "end" (default: "overworld").
|
mc_dimension can be "overworld", "nether", "end" (default: "overworld").
|
||||||
|
|
||||||
* layer: int
|
* layer: int
|
||||||
|
|
|
@ -58,7 +58,7 @@ local pos_to_dimension = mcl_worlds.pos_to_dimension
|
||||||
|
|
||||||
-- Takes a Minecraft layer and a “dimension” name
|
-- Takes a Minecraft layer and a “dimension” name
|
||||||
-- and returns the corresponding Y coordinate for
|
-- and returns the corresponding Y coordinate for
|
||||||
-- MineClone 2.
|
-- VoxeLibre
|
||||||
-- mc_dimension is one of "overworld", "nether", "end" (default: "overworld").
|
-- mc_dimension is one of "overworld", "nether", "end" (default: "overworld").
|
||||||
function mcl_worlds.layer_to_y(layer, mc_dimension)
|
function mcl_worlds.layer_to_y(layer, mc_dimension)
|
||||||
if mc_dimension == "overworld" or mc_dimension == nil then
|
if mc_dimension == "overworld" or mc_dimension == nil then
|
||||||
|
|
|
@ -0,0 +1,674 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<https://www.gnu.org/licenses/why-not-lgpl.html>.
|
|
@ -1,4 +1,87 @@
|
||||||
# tga_encoder
|
# tga_encoder
|
||||||
A TGA Encoder written in Lua without the use of external Libraries.
|
A TGA Encoder written in Lua without the use of external Libraries.
|
||||||
|
|
||||||
|
Created by fleckenstein for VoxeLibre, then improved by erlehmann.
|
||||||
|
|
||||||
May be used as a Minetest mod.
|
May be used as a Minetest mod.
|
||||||
|
|
||||||
|
See `examples.lua` for example code and usage hints.
|
||||||
|
|
||||||
|
## Use Cases for `tga_encoder`
|
||||||
|
|
||||||
|
### Encoding Textures for Editing
|
||||||
|
|
||||||
|
TGA images of types 1/2/3 consist of header data followed by a pixel array.
|
||||||
|
|
||||||
|
This makes it trivial to parse TGA files – and even edit pixels in-place.
|
||||||
|
|
||||||
|
No checksums need to be updated on any kind of in-place texture editing.
|
||||||
|
|
||||||
|
**Tip**: When storing an editable image in item meta, use zlib compression.
|
||||||
|
|
||||||
|
### Legacy Minetest Texture Encoding
|
||||||
|
|
||||||
|
Minetest 5.4 did not include `minetest.encode_png()` (or any equvivalent).
|
||||||
|
|
||||||
|
Since `tga_encoder` is written in pure Lua, it does not need engine support.
|
||||||
|
|
||||||
|
**Tip:** Look at `examples.lua` and the Minetest mod `mcl_maps` for guidance.
|
||||||
|
|
||||||
|
### Advanced Texture Format Control
|
||||||
|
|
||||||
|
The function `minetest.encode_png()` always encodes images as 32bpp RGBA.
|
||||||
|
|
||||||
|
`tga_encoder` allows saving images as grayscale, 16bpp RGBA and 24bpp RGB.
|
||||||
|
|
||||||
|
For generating maps from terrain, color-mapped formats can be more useful.
|
||||||
|
|
||||||
|
### Encoding Very Small Textures
|
||||||
|
|
||||||
|
Images of size 8×8 or below are often smaller than an equivalent PNG file.
|
||||||
|
|
||||||
|
Note that on many filesystems files use at least 4096 bytes (i.e. 64×64).
|
||||||
|
|
||||||
|
Therefore, saving bytes on files up to a few 100 bytes is often useless.
|
||||||
|
|
||||||
|
### Encoding Reference Textures
|
||||||
|
|
||||||
|
TGA is a simple format, which makes it easy to create reference textures.
|
||||||
|
|
||||||
|
Using a hex editor, one can trivially see how all the pixels are stored.
|
||||||
|
|
||||||
|
## Supported Image Types
|
||||||
|
|
||||||
|
For all types, images are encoded in a fast single pass (i.e. append-only).
|
||||||
|
|
||||||
|
### Color-Mapped Images (Type 1)
|
||||||
|
|
||||||
|
These images contain a palette, followed by pixel data.
|
||||||
|
|
||||||
|
* `A1R5G5B5` (8bpp RGB)
|
||||||
|
* `B8G8R8` (8bpp RGB)
|
||||||
|
* `B8G8R8A8` (8bpp RGBA)
|
||||||
|
|
||||||
|
### True-Color Images (Type 2)
|
||||||
|
|
||||||
|
These images contain uncompressed RGB(A) pixel data.
|
||||||
|
|
||||||
|
* `A1R5G5B5` (16bpp RGBA)
|
||||||
|
* `B8G8R8` (24bpp RGB)
|
||||||
|
* `B8G8R8A8` (32bpp RGBA)
|
||||||
|
|
||||||
|
### Grayscale Images (Type 3)
|
||||||
|
|
||||||
|
* `Y8` (8bpp grayscale)
|
||||||
|
|
||||||
|
### Run-Length Encoded (RLE), True-Color Images (Type 10)
|
||||||
|
|
||||||
|
These images contain compressed RGB(A) pixel data.
|
||||||
|
|
||||||
|
* `A1R5G5B5` (16bpp RGBA)
|
||||||
|
* `B8G8R8` (24bpp RGB)
|
||||||
|
* `B8G8R8A8` (32bpp RGBA)
|
||||||
|
|
||||||
|
## TODO
|
||||||
|
|
||||||
|
* Actually support `R8G8B8A8` input for `A1R5G5B5` output
|
||||||
|
* Add both zoomable and explorable maps to `mcl_maps`.
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
dofile("init.lua")
|
||||||
|
|
||||||
|
-- This generates images necessary to colorize 16 Minetest nodes in 4096 colors.
|
||||||
|
-- It serves as a demonstration of what you can achieve using colormapped nodes.
|
||||||
|
-- It is be useful for grass or beam or glass nodes that need to blend smoothly.
|
||||||
|
|
||||||
|
-- Sample depth rescaling is done according to the algorithm presented in:
|
||||||
|
-- <https://www.w3.org/TR/2003/REC-PNG-20031110/#13Sample-depth-rescaling>
|
||||||
|
local max_sample_in = math.pow(2, 4) - 1
|
||||||
|
local max_sample_out = math.pow(2, 8) - 1
|
||||||
|
|
||||||
|
for r = 0,15 do
|
||||||
|
local pixels = {}
|
||||||
|
for g = 0,15 do
|
||||||
|
if nil == pixels[g + 1] then
|
||||||
|
pixels[g + 1] = {}
|
||||||
|
end
|
||||||
|
for b = 0,15 do
|
||||||
|
local color = {
|
||||||
|
math.floor((r * max_sample_out / max_sample_in) + 0.5),
|
||||||
|
math.floor((g * max_sample_out / max_sample_in) + 0.5),
|
||||||
|
math.floor((b * max_sample_out / max_sample_in) + 0.5),
|
||||||
|
}
|
||||||
|
pixels[g + 1][b + 1] = color
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local filename = "colormap_" .. tostring(r) .. ".tga"
|
||||||
|
tga_encoder.image(pixels):save(
|
||||||
|
filename,
|
||||||
|
{ color_format="A1R5G5B5" } -- waste less bits
|
||||||
|
)
|
||||||
|
end
|
|
@ -0,0 +1,105 @@
|
||||||
|
#!/usr/bin/env lua5.1
|
||||||
|
-- -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
-- 3D “donut” shape rendering using floating-point math
|
||||||
|
-- see <https://www.a1k0n.net/2011/07/20/donut-math.html>
|
||||||
|
|
||||||
|
-- cargo-culted by erle 2023-09-18
|
||||||
|
|
||||||
|
local theta_spacing = 0.01 -- 0.07
|
||||||
|
local phi_spacing = 0.002 -- 0.02
|
||||||
|
|
||||||
|
local R1 = 1
|
||||||
|
local R2 = 2
|
||||||
|
local K2 = 5
|
||||||
|
|
||||||
|
local screen_height = 256
|
||||||
|
local screen_width = 256
|
||||||
|
|
||||||
|
local K1 = screen_width * K2 * 3 / ( 8 * ( R1 + R2 ) )
|
||||||
|
|
||||||
|
local output = {}
|
||||||
|
local zbuffer = {}
|
||||||
|
|
||||||
|
local grey = { 120, 120, 120 }
|
||||||
|
local gray = { 136, 136, 136 }
|
||||||
|
|
||||||
|
for y = 1,screen_height,1 do
|
||||||
|
output[y] = {}
|
||||||
|
zbuffer[y] = {}
|
||||||
|
for x = 1,screen_width,1 do
|
||||||
|
local hori = math.floor( ( (y - 1) / 32 ) % 2 )
|
||||||
|
local vert = math.floor( ( (x - 1) / 32 ) % 2 )
|
||||||
|
output[y][x] = hori ~= vert and grey or gray
|
||||||
|
zbuffer[y][x] = 0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function render_frame(A, B)
|
||||||
|
-- precompute sines and cosines of A and B
|
||||||
|
local cosA = math.cos(A)
|
||||||
|
local sinA = math.sin(A)
|
||||||
|
local cosB = math.cos(B)
|
||||||
|
local sinB = math.sin(B)
|
||||||
|
|
||||||
|
-- theta goas around the cross-sectional circle of a torus
|
||||||
|
local theta = 0
|
||||||
|
while theta <= 2*math.pi do
|
||||||
|
if ( theta < 2*math.pi * 1/8 ) or ( theta > 2*math.pi * 7/8 ) then
|
||||||
|
theta = theta + (theta_spacing * 16)
|
||||||
|
else
|
||||||
|
theta = theta + theta_spacing
|
||||||
|
end
|
||||||
|
-- precompute sines and cosines of theta
|
||||||
|
local costheta = math.cos(theta)
|
||||||
|
local sintheta = math.sin(theta)
|
||||||
|
|
||||||
|
-- phi goes around the center of revolution of a torus
|
||||||
|
local phi = 0
|
||||||
|
while phi <= 2*math.pi do
|
||||||
|
if ( phi > 2*math.pi * 3/8 ) and ( phi < 2*math.pi * 5/8 ) then
|
||||||
|
phi = phi + (phi_spacing * 128)
|
||||||
|
else
|
||||||
|
phi = phi + phi_spacing
|
||||||
|
end
|
||||||
|
-- precompute sines and cosines of phi
|
||||||
|
local cosphi = math.cos(phi)
|
||||||
|
local sinphi = math.sin(phi)
|
||||||
|
|
||||||
|
-- 2D (x, y) coordinates of the circle, before revolving
|
||||||
|
local circlex = R2 + R1*costheta
|
||||||
|
local circley = R1*sintheta
|
||||||
|
|
||||||
|
-- 3D (x, y, z) coordinates after rotation
|
||||||
|
local x = circlex*(cosB*cosphi + sinA*sinB*sinphi) - circley*cosA*sinB
|
||||||
|
local y = circlex*(sinB*cosphi - sinA*cosB*sinphi) + circley*cosA*cosB
|
||||||
|
local z = K2 + cosA*circlex*sinphi + circley*sinA
|
||||||
|
|
||||||
|
local ooz = 1/z
|
||||||
|
|
||||||
|
-- x and y projection
|
||||||
|
local xp = math.floor(screen_width/2 + K1*ooz*x)
|
||||||
|
local yp = math.floor(screen_height/2 + K1*ooz*y)
|
||||||
|
|
||||||
|
-- calculate luminance
|
||||||
|
local L = cosphi*costheta*sinB - cosA*costheta*sinphi - sinA*sintheta + cosB*( cosA*sintheta - costheta*sinA*sinphi )
|
||||||
|
-- if (L > 0) then
|
||||||
|
if (true) then
|
||||||
|
if (ooz > zbuffer[yp][xp]) then
|
||||||
|
zbuffer[yp][xp] = ooz
|
||||||
|
local luminance = math.max( math.ceil( L * 180 ), 0 )
|
||||||
|
-- luminance is now in the range 0 to 255
|
||||||
|
r = math.ceil( (luminance + xp) / 2 )
|
||||||
|
g = math.ceil( (luminance + yp) / 2 )
|
||||||
|
b = math.ceil( (luminance + xp + yp) / 3 )
|
||||||
|
output[yp][xp] = { r, g, b }
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
dofile('init.lua')
|
||||||
|
|
||||||
|
render_frame(-0.7, 0.7)
|
||||||
|
tga_encoder.image(output):save("donut.tga")
|
|
@ -0,0 +1,181 @@
|
||||||
|
dofile("init.lua")
|
||||||
|
|
||||||
|
-- encode a bitmap
|
||||||
|
local _ = { 0, 0, 0 }
|
||||||
|
local R = { 255, 127, 127 }
|
||||||
|
local pixels = {
|
||||||
|
{ _, _, _, _, _, _, _ },
|
||||||
|
{ _, _, _, R, _, _, _ },
|
||||||
|
{ _, _, R, R, R, _, _ },
|
||||||
|
{ _, R, R, R, R, R, _ },
|
||||||
|
{ _, R, R, R, R, R, _ },
|
||||||
|
{ _, _, R, _, R, _, _ },
|
||||||
|
{ _, _, _, _, _, _, _ },
|
||||||
|
}
|
||||||
|
tga_encoder.image(pixels):save("bitmap_small.tga")
|
||||||
|
|
||||||
|
-- test that image can be encoded
|
||||||
|
local bitmap_small_0 = tga_encoder.image(pixels)
|
||||||
|
bitmap_small_0:encode()
|
||||||
|
assert(191 == #bitmap_small_0.data)
|
||||||
|
|
||||||
|
-- test that imbage can be encoded with parameters
|
||||||
|
local bitmap_small_1 = tga_encoder.image(pixels)
|
||||||
|
bitmap_small_1:encode(
|
||||||
|
{
|
||||||
|
colormap = {},
|
||||||
|
color_format = "B8G8R8",
|
||||||
|
compression = "RAW",
|
||||||
|
}
|
||||||
|
)
|
||||||
|
assert(191 == #bitmap_small_1.data)
|
||||||
|
|
||||||
|
-- change a single pixel, then rescale the bitmap
|
||||||
|
local pixels_orig = pixels
|
||||||
|
pixels_orig[4][4] = { 255, 255, 255 }
|
||||||
|
local pixels = {}
|
||||||
|
for x = 1,56,1 do
|
||||||
|
local x_orig = math.ceil(x/8)
|
||||||
|
for z = 1,56,1 do
|
||||||
|
local z_orig = math.ceil(z/8)
|
||||||
|
local color = pixels_orig[z_orig][x_orig]
|
||||||
|
pixels[z] = pixels[z] or {}
|
||||||
|
pixels[z][x] = color
|
||||||
|
end
|
||||||
|
end
|
||||||
|
tga_encoder.image(pixels):save("bitmap_large.tga")
|
||||||
|
|
||||||
|
-- note that the uncompressed grayscale TGA file written in this
|
||||||
|
-- example is 80 bytes – but an optimized PNG file is 81 bytes …
|
||||||
|
local pixels = {}
|
||||||
|
for x = 1,6,1 do -- left to right
|
||||||
|
for z = 1,6,1 do -- bottom to top
|
||||||
|
local color = { math.min(x * z * 4 - 1, 255) }
|
||||||
|
pixels[z] = pixels[z] or {}
|
||||||
|
pixels[z][x] = color
|
||||||
|
end
|
||||||
|
end
|
||||||
|
tga_encoder.image(pixels):save("gradient_8bpp_raw.tga", {color_format="Y8", compression="RAW"})
|
||||||
|
|
||||||
|
local pixels = {}
|
||||||
|
for x = 1,16,1 do -- left to right
|
||||||
|
for z = 1,16,1 do -- bottom to top
|
||||||
|
local r = math.min(x * 32 - 1, 255)
|
||||||
|
local g = math.min(z * 32 - 1, 255)
|
||||||
|
local b = 0
|
||||||
|
-- blue rectangle in top right corner
|
||||||
|
if x > 8 and z > 8 then
|
||||||
|
r = 0
|
||||||
|
g = 0
|
||||||
|
b = math.min(z * 16 - 1, 255)
|
||||||
|
end
|
||||||
|
local color = { r, g, b }
|
||||||
|
pixels[z] = pixels[z] or {}
|
||||||
|
pixels[z][x] = color
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local gradients = tga_encoder.image(pixels)
|
||||||
|
gradients:save("gradients_8bpp_raw.tga", {color_format="Y8", compression="RAW"})
|
||||||
|
gradients:save("gradients_16bpp_raw.tga", {color_format="A1R5G5B5", compression="RAW"})
|
||||||
|
gradients:save("gradients_16bpp_rle.tga", {color_format="A1R5G5B5", compression="RLE"})
|
||||||
|
gradients:save("gradients_24bpp_raw.tga", {color_format="B8G8R8", compression="RAW"})
|
||||||
|
gradients:save("gradients_24bpp_rle.tga", {color_format="B8G8R8", compression="RLE"})
|
||||||
|
|
||||||
|
for x = 1,16,1 do -- left to right
|
||||||
|
for z = 1,16,1 do -- bottom to top
|
||||||
|
local color = pixels[z][x]
|
||||||
|
color[#color+1] = ((x * x) + (z * z)) % 256
|
||||||
|
pixels[z][x] = color
|
||||||
|
end
|
||||||
|
end
|
||||||
|
gradients:save("gradients_32bpp_raw.tga", {color_format="B8G8R8A8", compression="RAW"})
|
||||||
|
-- the RLE-compressed file is larger than just dumping pixels because
|
||||||
|
-- the gradients in this picture can not be compressed well using RLE
|
||||||
|
gradients:save("gradients_32bpp_rle.tga", {color_format="B8G8R8A8", compression="RLE"})
|
||||||
|
|
||||||
|
local pixels = {}
|
||||||
|
for x = 1,512,1 do -- left to right
|
||||||
|
for z = 1,512,1 do -- bottom to top
|
||||||
|
local oz = (z - 256) / 256 + 0.75
|
||||||
|
local ox = (x - 256) / 256
|
||||||
|
local px, pz, i = 0, 0, 0
|
||||||
|
while (px * px) + (pz * pz) <= 4 and i < 128 do
|
||||||
|
px = (px * px) - (pz * pz) + oz
|
||||||
|
pz = (2 * px * pz) + ox
|
||||||
|
i = i + 1
|
||||||
|
end
|
||||||
|
local color = {
|
||||||
|
math.max(0, math.min(255, math.floor(px * 64))),
|
||||||
|
math.max(0, math.min(255, math.floor(pz * 64))),
|
||||||
|
math.max(0, math.min(255, math.floor(i))),
|
||||||
|
}
|
||||||
|
pixels[z] = pixels[z] or {}
|
||||||
|
pixels[z][x] = color
|
||||||
|
end
|
||||||
|
end
|
||||||
|
tga_encoder.image(pixels):save("fractal_8bpp.tga", {color_format="Y8"})
|
||||||
|
tga_encoder.image(pixels):save("fractal_16bpp.tga", {color_format="A1R5G5B5"})
|
||||||
|
tga_encoder.image(pixels):save("fractal_24bpp.tga", {color_format="B8G8R8"})
|
||||||
|
|
||||||
|
-- encode a colormapped bitmap
|
||||||
|
local K = { 0 }
|
||||||
|
local B = { 1 }
|
||||||
|
local R = { 2 }
|
||||||
|
local G = { 3 }
|
||||||
|
local W = { 4 }
|
||||||
|
local colormap = {
|
||||||
|
{ 1, 2, 3 }, -- K
|
||||||
|
{ 0, 0, 255 }, -- B
|
||||||
|
{ 255, 0, 0 }, -- R
|
||||||
|
{ 0, 255, 0 }, -- G
|
||||||
|
{ 253, 254, 255 }, -- W
|
||||||
|
}
|
||||||
|
local pixels = {
|
||||||
|
{ W, K, W, K, W, K, W },
|
||||||
|
{ R, G, B, R, G, B, K },
|
||||||
|
{ K, W, K, W, K, W, K },
|
||||||
|
{ G, B, R, G, B, R, W },
|
||||||
|
{ W, W, W, K, K, K, W },
|
||||||
|
{ B, R, G, B, R, G, K },
|
||||||
|
{ B, R, G, B, R, G, W },
|
||||||
|
}
|
||||||
|
-- note that the uncompressed colormapped TGA file written in this
|
||||||
|
-- example is 108 bytes – but an optimized PNG file is 121 bytes …
|
||||||
|
tga_encoder.image(pixels):save("colormapped_B8G8R8.tga", {colormap=colormap})
|
||||||
|
-- encoding as A1R5G5B5 saves 1 byte per palette entry → 103 bytes
|
||||||
|
tga_encoder.image(pixels):save("colormapped_A1R5G5B5.tga", {colormap=colormap, color_format="A1R5G5B5"})
|
||||||
|
|
||||||
|
-- encode a colormapped bitmap with transparency
|
||||||
|
local _ = { 0 }
|
||||||
|
local K = { 1 }
|
||||||
|
local W = { 2 }
|
||||||
|
local colormap = {
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
|
{ 0, 0, 0, 255 },
|
||||||
|
{ 255, 255, 255, 255 },
|
||||||
|
}
|
||||||
|
local pixels = {
|
||||||
|
{ _, K, K, K, K, K, _ },
|
||||||
|
{ _, K, W, W, W, K, _ },
|
||||||
|
{ K, K, W, W, W, K, K },
|
||||||
|
{ K, W, W, W, W, W, K },
|
||||||
|
{ _, K, W, W, W, K, _ },
|
||||||
|
{ _, _, K, W, K, _, _ },
|
||||||
|
{ _, _, _, K, _, _, _ },
|
||||||
|
}
|
||||||
|
tga_encoder.image(pixels):save("colormapped_B8G8R8A8.tga", {colormap=colormap})
|
||||||
|
|
||||||
|
-- encoding a colormapped image with illegal colormap indexes should error out
|
||||||
|
local colormap = {
|
||||||
|
{ 0, 0, 0, 0 },
|
||||||
|
{ 0, 0, 0, 255 },
|
||||||
|
}
|
||||||
|
local status, message = pcall(
|
||||||
|
function ()
|
||||||
|
tga_encoder.image(pixels):encode({colormap=colormap})
|
||||||
|
end
|
||||||
|
)
|
||||||
|
assert(
|
||||||
|
false == status and
|
||||||
|
"init.lua:36: colormap index 2 not in colormap of size 2" == message
|
||||||
|
)
|
|
@ -9,60 +9,566 @@ local image = setmetatable({}, {
|
||||||
})
|
})
|
||||||
|
|
||||||
function image:constructor(pixels)
|
function image:constructor(pixels)
|
||||||
self.data = ""
|
|
||||||
self.pixels = pixels
|
self.pixels = pixels
|
||||||
self.width = #pixels[1]
|
self.width = #pixels[1]
|
||||||
self.height = #pixels
|
self.height = #pixels
|
||||||
|
|
||||||
self:encode()
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function image:encode_colormap_spec()
|
local pixel_depth_by_color_format = {
|
||||||
self.data = self.data
|
["Y8"] = 8,
|
||||||
.. string.char(0, 0) -- first entry index
|
["A1R5G5B5"] = 16,
|
||||||
.. string.char(0, 0) -- number of entries
|
["B8G8R8"] = 24,
|
||||||
.. string.char(0) -- bits per pixel
|
["B8G8R8A8"] = 32,
|
||||||
|
}
|
||||||
|
|
||||||
|
function image:encode_colormap_spec(properties)
|
||||||
|
local colormap = properties.colormap
|
||||||
|
local colormap_pixel_depth = 0
|
||||||
|
if 0 ~= #colormap then
|
||||||
|
colormap_pixel_depth = pixel_depth_by_color_format[
|
||||||
|
properties.color_format
|
||||||
|
]
|
||||||
|
-- ensure that each pixel references a legal colormap entry
|
||||||
|
for _, row in ipairs(self.pixels) do
|
||||||
|
for _, pixel in ipairs(row) do
|
||||||
|
local colormap_index = pixel[1]
|
||||||
|
if colormap_index >= #colormap then
|
||||||
|
error(
|
||||||
|
"colormap index " .. colormap_index ..
|
||||||
|
" not in colormap of size " .. #colormap
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local colormap_spec =
|
||||||
|
string.char(0, 0) .. -- first entry index
|
||||||
|
string.char(#colormap % 256, math.floor(#colormap / 256)) .. -- number of entries
|
||||||
|
string.char(colormap_pixel_depth) -- bits per pixel
|
||||||
|
self.data = self.data .. colormap_spec
|
||||||
end
|
end
|
||||||
|
|
||||||
function image:encode_image_spec()
|
function image:encode_image_spec(properties)
|
||||||
self.data = self.data
|
local color_format = properties.color_format
|
||||||
.. string.char(0, 0) -- X-origin
|
assert(
|
||||||
.. string.char(0, 0) -- Y-origin
|
"Y8" == color_format or -- (8 bit grayscale = 1 byte = 8 bits)
|
||||||
.. string.char(self.width % 256, math.floor(self.width / 256)) -- width
|
"A1R5G5B5" == color_format or -- (A1R5G5B5 = 2 bytes = 16 bits)
|
||||||
.. string.char(self.height % 256, math.floor(self.height / 256)) -- height
|
"B8G8R8" == color_format or -- (B8G8R8 = 3 bytes = 24 bits)
|
||||||
.. string.char(24) -- pixel depth (RGB = 3 bytes = 24 bits)
|
"B8G8R8A8" == color_format -- (B8G8R8A8 = 4 bytes = 32 bits)
|
||||||
.. string.char(0) -- image descriptor
|
)
|
||||||
|
local scanline_order = properties.scanline_order
|
||||||
|
assert (
|
||||||
|
"bottom-top" == scanline_order or
|
||||||
|
"top-bottom" == scanline_order
|
||||||
|
)
|
||||||
|
local pixel_depth
|
||||||
|
if 0 ~= #properties.colormap then
|
||||||
|
pixel_depth = self.pixel_depth
|
||||||
|
else
|
||||||
|
pixel_depth = pixel_depth_by_color_format[color_format]
|
||||||
|
end
|
||||||
|
assert( nil ~= pixel_depth)
|
||||||
|
-- the origin is the bottom left corner of the image (always)
|
||||||
|
local x_origin_lo = 0
|
||||||
|
local x_origin_hi = 0
|
||||||
|
local y_origin_lo = 0
|
||||||
|
local y_origin_hi = 0
|
||||||
|
local image_descriptor = 0 -- equal to bottom-top scanline order
|
||||||
|
local width_lo = self.width % 256
|
||||||
|
local width_hi = math.floor(self.width / 256)
|
||||||
|
local height_lo = self.height % 256
|
||||||
|
local height_hi = math.floor(self.height / 256)
|
||||||
|
if "top-bottom" == scanline_order then
|
||||||
|
image_descriptor = 32
|
||||||
|
y_origin_lo = height_lo
|
||||||
|
y_origin_hi = height_hi
|
||||||
|
end
|
||||||
|
self.data = self.data .. string.char (
|
||||||
|
x_origin_lo, x_origin_hi,
|
||||||
|
y_origin_lo, y_origin_hi,
|
||||||
|
width_lo, width_hi,
|
||||||
|
height_lo, height_hi,
|
||||||
|
pixel_depth,
|
||||||
|
image_descriptor
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
function image:encode_header()
|
function image:encode_colormap(properties)
|
||||||
|
local colormap = properties.colormap
|
||||||
|
if 0 == #colormap then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local color_format = properties.color_format
|
||||||
|
assert (
|
||||||
|
"A1R5G5B5" == color_format or
|
||||||
|
"B8G8R8" == color_format or
|
||||||
|
"B8G8R8A8" == color_format
|
||||||
|
)
|
||||||
|
local colors = {}
|
||||||
|
if "A1R5G5B5" == color_format then
|
||||||
|
-- Sample depth rescaling is done according to the algorithm presented in:
|
||||||
|
-- <https://www.w3.org/TR/2003/REC-PNG-20031110/#13Sample-depth-rescaling>
|
||||||
|
local max_sample_in = math.pow(2, 8) - 1
|
||||||
|
local max_sample_out = math.pow(2, 5) - 1
|
||||||
|
for i = 1,#colormap,1 do
|
||||||
|
local color = colormap[i]
|
||||||
|
local colorword = 32768 +
|
||||||
|
((math.floor((color[1] * max_sample_out / max_sample_in) + 0.5)) * 1024) +
|
||||||
|
((math.floor((color[2] * max_sample_out / max_sample_in) + 0.5)) * 32) +
|
||||||
|
((math.floor((color[3] * max_sample_out / max_sample_in) + 0.5)) * 1)
|
||||||
|
local color_bytes = string.char(
|
||||||
|
colorword % 256,
|
||||||
|
math.floor(colorword / 256)
|
||||||
|
)
|
||||||
|
colors[#colors + 1] = color_bytes
|
||||||
|
end
|
||||||
|
elseif "B8G8R8" == color_format then
|
||||||
|
for i = 1,#colormap,1 do
|
||||||
|
local color = colormap[i]
|
||||||
|
local color_bytes = string.char(
|
||||||
|
color[3], -- B
|
||||||
|
color[2], -- G
|
||||||
|
color[1] -- R
|
||||||
|
)
|
||||||
|
colors[#colors + 1] = color_bytes
|
||||||
|
end
|
||||||
|
elseif "B8G8R8A8" == color_format then
|
||||||
|
for i = 1,#colormap,1 do
|
||||||
|
local color = colormap[i]
|
||||||
|
local color_bytes = string.char(
|
||||||
|
color[3], -- B
|
||||||
|
color[2], -- G
|
||||||
|
color[1], -- R
|
||||||
|
color[4] -- A
|
||||||
|
)
|
||||||
|
colors[#colors + 1] = color_bytes
|
||||||
|
end
|
||||||
|
end
|
||||||
|
assert( 0 ~= #colors )
|
||||||
|
self.data = self.data .. table.concat(colors)
|
||||||
|
end
|
||||||
|
|
||||||
|
function image:encode_header(properties)
|
||||||
|
local color_format = properties.color_format
|
||||||
|
local colormap = properties.colormap
|
||||||
|
local compression = properties.compression
|
||||||
|
local colormap_type
|
||||||
|
local image_type
|
||||||
|
if "Y8" == color_format and "RAW" == compression then
|
||||||
|
colormap_type = 0
|
||||||
|
image_type = 3 -- grayscale
|
||||||
|
elseif (
|
||||||
|
"A1R5G5B5" == color_format or
|
||||||
|
"B8G8R8" == color_format or
|
||||||
|
"B8G8R8A8" == color_format
|
||||||
|
) then
|
||||||
|
if "RAW" == compression then
|
||||||
|
if 0 ~= #colormap then
|
||||||
|
colormap_type = 1
|
||||||
|
image_type = 1 -- colormapped RGB(A)
|
||||||
|
else
|
||||||
|
colormap_type = 0
|
||||||
|
image_type = 2 -- RAW RGB(A)
|
||||||
|
end
|
||||||
|
elseif "RLE" == compression then
|
||||||
|
colormap_type = 0
|
||||||
|
image_type = 10 -- RLE RGB
|
||||||
|
end
|
||||||
|
end
|
||||||
|
assert( nil ~= colormap_type )
|
||||||
|
assert( nil ~= image_type )
|
||||||
self.data = self.data
|
self.data = self.data
|
||||||
.. string.char(0) -- image id
|
.. string.char(0) -- image id
|
||||||
.. string.char(0) -- color map type
|
.. string.char(colormap_type)
|
||||||
.. string.char(10) -- image type (RLE RGB = 10)
|
.. string.char(image_type)
|
||||||
self:encode_colormap_spec() -- color map specification
|
self:encode_colormap_spec(properties) -- color map specification
|
||||||
self:encode_image_spec() -- image specification
|
self:encode_image_spec(properties) -- image specification
|
||||||
|
self:encode_colormap(properties)
|
||||||
end
|
end
|
||||||
|
|
||||||
function image:encode_data()
|
function image:encode_data(properties)
|
||||||
local current_pixel = ''
|
local color_format = properties.color_format
|
||||||
local previous_pixel = ''
|
local colormap = properties.colormap
|
||||||
local count = 1
|
local compression = properties.compression
|
||||||
local packets = {}
|
|
||||||
local rle_packet = ''
|
local data_length_before = #self.data
|
||||||
|
if "Y8" == color_format and "RAW" == compression then
|
||||||
|
if 8 == self.pixel_depth then
|
||||||
|
self:encode_data_Y8_as_Y8_raw()
|
||||||
|
elseif 24 == self.pixel_depth then
|
||||||
|
self:encode_data_R8G8B8_as_Y8_raw()
|
||||||
|
end
|
||||||
|
elseif "A1R5G5B5" == color_format then
|
||||||
|
if 0 ~= #colormap then
|
||||||
|
if "RAW" == compression then
|
||||||
|
if 8 == self.pixel_depth then
|
||||||
|
self:encode_data_Y8_as_Y8_raw()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if "RAW" == compression then
|
||||||
|
self:encode_data_R8G8B8_as_A1R5G5B5_raw()
|
||||||
|
elseif "RLE" == compression then
|
||||||
|
self:encode_data_R8G8B8_as_A1R5G5B5_rle()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif "B8G8R8" == color_format then
|
||||||
|
if 0 ~= #colormap then
|
||||||
|
if "RAW" == compression then
|
||||||
|
if 8 == self.pixel_depth then
|
||||||
|
self:encode_data_Y8_as_Y8_raw()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if "RAW" == compression then
|
||||||
|
self:encode_data_R8G8B8_as_B8G8R8_raw()
|
||||||
|
elseif "RLE" == compression then
|
||||||
|
self:encode_data_R8G8B8_as_B8G8R8_rle()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
elseif "B8G8R8A8" == color_format then
|
||||||
|
if 0 ~= #colormap then
|
||||||
|
if "RAW" == compression then
|
||||||
|
if 8 == self.pixel_depth then
|
||||||
|
self:encode_data_Y8_as_Y8_raw()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if "RAW" == compression then
|
||||||
|
self:encode_data_R8G8B8A8_as_B8G8R8A8_raw()
|
||||||
|
elseif "RLE" == compression then
|
||||||
|
self:encode_data_R8G8B8A8_as_B8G8R8A8_rle()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local data_length_after = #self.data
|
||||||
|
assert(
|
||||||
|
data_length_after ~= data_length_before,
|
||||||
|
"No data encoded for color format: " .. color_format
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
function image:encode_data_Y8_as_Y8_raw()
|
||||||
|
assert(8 == self.pixel_depth)
|
||||||
|
local raw_pixels = {}
|
||||||
for _, row in ipairs(self.pixels) do
|
for _, row in ipairs(self.pixels) do
|
||||||
for _, pixel in ipairs(row) do
|
for _, pixel in ipairs(row) do
|
||||||
current_pixel = string.char(pixel[3], pixel[2], pixel[1])
|
local raw_pixel = string.char(pixel[1])
|
||||||
if current_pixel ~= previous_pixel or count == 128 then
|
raw_pixels[#raw_pixels + 1] = raw_pixel
|
||||||
packets[#packets +1] = rle_packet
|
end
|
||||||
|
end
|
||||||
|
self.data = self.data .. table.concat(raw_pixels)
|
||||||
|
end
|
||||||
|
|
||||||
|
function image:encode_data_R8G8B8_as_Y8_raw()
|
||||||
|
assert(24 == self.pixel_depth)
|
||||||
|
local raw_pixels = {}
|
||||||
|
for _, row in ipairs(self.pixels) do
|
||||||
|
for _, pixel in ipairs(row) do
|
||||||
|
-- the HSP RGB to brightness formula is
|
||||||
|
-- sqrt( 0.299 r² + .587 g² + .114 b² )
|
||||||
|
-- see <https://alienryderflex.com/hsp.html>
|
||||||
|
local gray = math.floor(
|
||||||
|
math.sqrt(
|
||||||
|
0.299 * pixel[1]^2 +
|
||||||
|
0.587 * pixel[2]^2 +
|
||||||
|
0.114 * pixel[3]^2
|
||||||
|
) + 0.5
|
||||||
|
)
|
||||||
|
local raw_pixel = string.char(gray)
|
||||||
|
raw_pixels[#raw_pixels + 1] = raw_pixel
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.data = self.data .. table.concat(raw_pixels)
|
||||||
|
end
|
||||||
|
|
||||||
|
function image:encode_data_R8G8B8_as_A1R5G5B5_raw()
|
||||||
|
assert(24 == self.pixel_depth)
|
||||||
|
local raw_pixels = {}
|
||||||
|
-- Sample depth rescaling is done according to the algorithm presented in:
|
||||||
|
-- <https://www.w3.org/TR/2003/REC-PNG-20031110/#13Sample-depth-rescaling>
|
||||||
|
local max_sample_in = math.pow(2, 8) - 1
|
||||||
|
local max_sample_out = math.pow(2, 5) - 1
|
||||||
|
for _, row in ipairs(self.pixels) do
|
||||||
|
for _, pixel in ipairs(row) do
|
||||||
|
local colorword = 32768 +
|
||||||
|
((math.floor((pixel[1] * max_sample_out / max_sample_in) + 0.5)) * 1024) +
|
||||||
|
((math.floor((pixel[2] * max_sample_out / max_sample_in) + 0.5)) * 32) +
|
||||||
|
((math.floor((pixel[3] * max_sample_out / max_sample_in) + 0.5)) * 1)
|
||||||
|
local raw_pixel = string.char(colorword % 256, math.floor(colorword / 256))
|
||||||
|
raw_pixels[#raw_pixels + 1] = raw_pixel
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.data = self.data .. table.concat(raw_pixels)
|
||||||
|
end
|
||||||
|
|
||||||
|
function image:encode_data_R8G8B8_as_A1R5G5B5_rle()
|
||||||
|
assert(24 == self.pixel_depth)
|
||||||
|
local colorword = nil
|
||||||
|
local previous_r = nil
|
||||||
|
local previous_g = nil
|
||||||
|
local previous_b = nil
|
||||||
|
local raw_pixel = ''
|
||||||
|
local raw_pixels = {}
|
||||||
|
local count = 1
|
||||||
|
local packets = {}
|
||||||
|
local raw_packet = ''
|
||||||
|
local rle_packet = ''
|
||||||
|
-- Sample depth rescaling is done according to the algorithm presented in:
|
||||||
|
-- <https://www.w3.org/TR/2003/REC-PNG-20031110/#13Sample-depth-rescaling>
|
||||||
|
local max_sample_in = math.pow(2, 8) - 1
|
||||||
|
local max_sample_out = math.pow(2, 5) - 1
|
||||||
|
for _, row in ipairs(self.pixels) do
|
||||||
|
for _, pixel in ipairs(row) do
|
||||||
|
if pixel[1] ~= previous_r or pixel[2] ~= previous_g or pixel[3] ~= previous_b or count == 128 then
|
||||||
|
if nil ~= previous_r then
|
||||||
|
colorword = 32768 +
|
||||||
|
((math.floor((previous_r * max_sample_out / max_sample_in) + 0.5)) * 1024) +
|
||||||
|
((math.floor((previous_g * max_sample_out / max_sample_in) + 0.5)) * 32) +
|
||||||
|
((math.floor((previous_b * max_sample_out / max_sample_in) + 0.5)) * 1)
|
||||||
|
if 1 == count then
|
||||||
|
-- remember pixel verbatim for raw encoding
|
||||||
|
raw_pixel = string.char(colorword % 256, math.floor(colorword / 256))
|
||||||
|
raw_pixels[#raw_pixels + 1] = raw_pixel
|
||||||
|
if 128 == #raw_pixels then
|
||||||
|
raw_packet = string.char(#raw_pixels - 1)
|
||||||
|
packets[#packets + 1] = raw_packet
|
||||||
|
for i=1, #raw_pixels do
|
||||||
|
packets[#packets +1] = raw_pixels[i]
|
||||||
|
end
|
||||||
|
raw_pixels = {}
|
||||||
|
end
|
||||||
|
else
|
||||||
|
-- encode raw pixels, if any
|
||||||
|
if #raw_pixels > 0 then
|
||||||
|
raw_packet = string.char(#raw_pixels - 1)
|
||||||
|
packets[#packets + 1] = raw_packet
|
||||||
|
for i=1, #raw_pixels do
|
||||||
|
packets[#packets +1] = raw_pixels[i]
|
||||||
|
end
|
||||||
|
raw_pixels = {}
|
||||||
|
end
|
||||||
|
-- RLE encoding
|
||||||
|
rle_packet = string.char(128 + count - 1, colorword % 256, math.floor(colorword / 256))
|
||||||
|
packets[#packets +1] = rle_packet
|
||||||
|
end
|
||||||
|
end
|
||||||
count = 1
|
count = 1
|
||||||
previous_pixel = current_pixel
|
previous_r = pixel[1]
|
||||||
|
previous_g = pixel[2]
|
||||||
|
previous_b = pixel[3]
|
||||||
else
|
else
|
||||||
count = count + 1
|
count = count + 1
|
||||||
end
|
end
|
||||||
rle_packet = string.char(128 + count - 1) .. current_pixel
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
packets[#packets +1] = rle_packet
|
colorword = 32768 +
|
||||||
|
((math.floor((previous_r * max_sample_out / max_sample_in) + 0.5)) * 1024) +
|
||||||
|
((math.floor((previous_g * max_sample_out / max_sample_in) + 0.5)) * 32) +
|
||||||
|
((math.floor((previous_b * max_sample_out / max_sample_in) + 0.5)) * 1)
|
||||||
|
if 1 == count then
|
||||||
|
raw_pixel = string.char(colorword % 256, math.floor(colorword / 256))
|
||||||
|
raw_pixels[#raw_pixels + 1] = raw_pixel
|
||||||
|
raw_packet = string.char(#raw_pixels - 1)
|
||||||
|
packets[#packets + 1] = raw_packet
|
||||||
|
for i=1, #raw_pixels do
|
||||||
|
packets[#packets +1] = raw_pixels[i]
|
||||||
|
end
|
||||||
|
raw_pixels = {}
|
||||||
|
else
|
||||||
|
-- encode raw pixels, if any
|
||||||
|
if #raw_pixels > 0 then
|
||||||
|
raw_packet = string.char(#raw_pixels - 1)
|
||||||
|
packets[#packets + 1] = raw_packet
|
||||||
|
for i=1, #raw_pixels do
|
||||||
|
packets[#packets +1] = raw_pixels[i]
|
||||||
|
end
|
||||||
|
raw_pixels = {}
|
||||||
|
end
|
||||||
|
-- RLE encoding
|
||||||
|
rle_packet = string.char(128 + count - 1, colorword % 256, math.floor(colorword / 256))
|
||||||
|
packets[#packets +1] = rle_packet
|
||||||
|
end
|
||||||
|
self.data = self.data .. table.concat(packets)
|
||||||
|
end
|
||||||
|
|
||||||
|
function image:encode_data_R8G8B8_as_B8G8R8_raw()
|
||||||
|
assert(24 == self.pixel_depth)
|
||||||
|
local raw_pixels = {}
|
||||||
|
for _, row in ipairs(self.pixels) do
|
||||||
|
for _, pixel in ipairs(row) do
|
||||||
|
local raw_pixel = string.char(pixel[3], pixel[2], pixel[1])
|
||||||
|
raw_pixels[#raw_pixels + 1] = raw_pixel
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.data = self.data .. table.concat(raw_pixels)
|
||||||
|
end
|
||||||
|
|
||||||
|
function image:encode_data_R8G8B8_as_B8G8R8_rle()
|
||||||
|
assert(24 == self.pixel_depth)
|
||||||
|
local previous_r = nil
|
||||||
|
local previous_g = nil
|
||||||
|
local previous_b = nil
|
||||||
|
local raw_pixel = ''
|
||||||
|
local raw_pixels = {}
|
||||||
|
local count = 1
|
||||||
|
local packets = {}
|
||||||
|
local raw_packet = ''
|
||||||
|
local rle_packet = ''
|
||||||
|
for _, row in ipairs(self.pixels) do
|
||||||
|
for _, pixel in ipairs(row) do
|
||||||
|
if pixel[1] ~= previous_r or pixel[2] ~= previous_g or pixel[3] ~= previous_b or count == 128 then
|
||||||
|
if nil ~= previous_r then
|
||||||
|
if 1 == count then
|
||||||
|
-- remember pixel verbatim for raw encoding
|
||||||
|
raw_pixel = string.char(previous_b, previous_g, previous_r)
|
||||||
|
raw_pixels[#raw_pixels + 1] = raw_pixel
|
||||||
|
if 128 == #raw_pixels then
|
||||||
|
raw_packet = string.char(#raw_pixels - 1)
|
||||||
|
packets[#packets + 1] = raw_packet
|
||||||
|
for i=1, #raw_pixels do
|
||||||
|
packets[#packets +1] = raw_pixels[i]
|
||||||
|
end
|
||||||
|
raw_pixels = {}
|
||||||
|
end
|
||||||
|
else
|
||||||
|
-- encode raw pixels, if any
|
||||||
|
if #raw_pixels > 0 then
|
||||||
|
raw_packet = string.char(#raw_pixels - 1)
|
||||||
|
packets[#packets + 1] = raw_packet
|
||||||
|
for i=1, #raw_pixels do
|
||||||
|
packets[#packets +1] = raw_pixels[i]
|
||||||
|
end
|
||||||
|
raw_pixels = {}
|
||||||
|
end
|
||||||
|
-- RLE encoding
|
||||||
|
rle_packet = string.char(128 + count - 1, previous_b, previous_g, previous_r)
|
||||||
|
packets[#packets +1] = rle_packet
|
||||||
|
end
|
||||||
|
end
|
||||||
|
count = 1
|
||||||
|
previous_r = pixel[1]
|
||||||
|
previous_g = pixel[2]
|
||||||
|
previous_b = pixel[3]
|
||||||
|
else
|
||||||
|
count = count + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if 1 == count then
|
||||||
|
raw_pixel = string.char(previous_b, previous_g, previous_r)
|
||||||
|
raw_pixels[#raw_pixels + 1] = raw_pixel
|
||||||
|
raw_packet = string.char(#raw_pixels - 1)
|
||||||
|
packets[#packets + 1] = raw_packet
|
||||||
|
for i=1, #raw_pixels do
|
||||||
|
packets[#packets +1] = raw_pixels[i]
|
||||||
|
end
|
||||||
|
raw_pixels = {}
|
||||||
|
else
|
||||||
|
-- encode raw pixels, if any
|
||||||
|
if #raw_pixels > 0 then
|
||||||
|
raw_packet = string.char(#raw_pixels - 1)
|
||||||
|
packets[#packets + 1] = raw_packet
|
||||||
|
for i=1, #raw_pixels do
|
||||||
|
packets[#packets +1] = raw_pixels[i]
|
||||||
|
end
|
||||||
|
raw_pixels = {}
|
||||||
|
end
|
||||||
|
-- RLE encoding
|
||||||
|
rle_packet = string.char(128 + count - 1, previous_b, previous_g, previous_r)
|
||||||
|
packets[#packets +1] = rle_packet
|
||||||
|
end
|
||||||
|
self.data = self.data .. table.concat(packets)
|
||||||
|
end
|
||||||
|
|
||||||
|
function image:encode_data_R8G8B8A8_as_B8G8R8A8_raw()
|
||||||
|
assert(32 == self.pixel_depth)
|
||||||
|
local raw_pixels = {}
|
||||||
|
for _, row in ipairs(self.pixels) do
|
||||||
|
for _, pixel in ipairs(row) do
|
||||||
|
local raw_pixel = string.char(pixel[3], pixel[2], pixel[1], pixel[4])
|
||||||
|
raw_pixels[#raw_pixels + 1] = raw_pixel
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.data = self.data .. table.concat(raw_pixels)
|
||||||
|
end
|
||||||
|
|
||||||
|
function image:encode_data_R8G8B8A8_as_B8G8R8A8_rle()
|
||||||
|
assert(32 == self.pixel_depth)
|
||||||
|
local previous_r = nil
|
||||||
|
local previous_g = nil
|
||||||
|
local previous_b = nil
|
||||||
|
local previous_a = nil
|
||||||
|
local raw_pixel = ''
|
||||||
|
local raw_pixels = {}
|
||||||
|
local count = 1
|
||||||
|
local packets = {}
|
||||||
|
local raw_packet = ''
|
||||||
|
local rle_packet = ''
|
||||||
|
for _, row in ipairs(self.pixels) do
|
||||||
|
for _, pixel in ipairs(row) do
|
||||||
|
if pixel[1] ~= previous_r or pixel[2] ~= previous_g or pixel[3] ~= previous_b or pixel[4] ~= previous_a or count == 128 then
|
||||||
|
if nil ~= previous_r then
|
||||||
|
if 1 == count then
|
||||||
|
-- remember pixel verbatim for raw encoding
|
||||||
|
raw_pixel = string.char(previous_b, previous_g, previous_r, previous_a)
|
||||||
|
raw_pixels[#raw_pixels + 1] = raw_pixel
|
||||||
|
if 128 == #raw_pixels then
|
||||||
|
raw_packet = string.char(#raw_pixels - 1)
|
||||||
|
packets[#packets + 1] = raw_packet
|
||||||
|
for i=1, #raw_pixels do
|
||||||
|
packets[#packets +1] = raw_pixels[i]
|
||||||
|
end
|
||||||
|
raw_pixels = {}
|
||||||
|
end
|
||||||
|
else
|
||||||
|
-- encode raw pixels, if any
|
||||||
|
if #raw_pixels > 0 then
|
||||||
|
raw_packet = string.char(#raw_pixels - 1)
|
||||||
|
packets[#packets + 1] = raw_packet
|
||||||
|
for i=1, #raw_pixels do
|
||||||
|
packets[#packets +1] = raw_pixels[i]
|
||||||
|
end
|
||||||
|
raw_pixels = {}
|
||||||
|
end
|
||||||
|
-- RLE encoding
|
||||||
|
rle_packet = string.char(128 + count - 1, previous_b, previous_g, previous_r, previous_a)
|
||||||
|
packets[#packets +1] = rle_packet
|
||||||
|
end
|
||||||
|
end
|
||||||
|
count = 1
|
||||||
|
previous_r = pixel[1]
|
||||||
|
previous_g = pixel[2]
|
||||||
|
previous_b = pixel[3]
|
||||||
|
previous_a = pixel[4]
|
||||||
|
else
|
||||||
|
count = count + 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if 1 == count then
|
||||||
|
raw_pixel = string.char(previous_b, previous_g, previous_r, previous_a)
|
||||||
|
raw_pixels[#raw_pixels + 1] = raw_pixel
|
||||||
|
raw_packet = string.char(#raw_pixels - 1)
|
||||||
|
packets[#packets + 1] = raw_packet
|
||||||
|
for i=1, #raw_pixels do
|
||||||
|
packets[#packets +1] = raw_pixels[i]
|
||||||
|
end
|
||||||
|
raw_pixels = {}
|
||||||
|
else
|
||||||
|
-- encode raw pixels, if any
|
||||||
|
if #raw_pixels > 0 then
|
||||||
|
raw_packet = string.char(#raw_pixels - 1)
|
||||||
|
packets[#packets + 1] = raw_packet
|
||||||
|
for i=1, #raw_pixels do
|
||||||
|
packets[#packets +1] = raw_pixels[i]
|
||||||
|
end
|
||||||
|
raw_pixels = {}
|
||||||
|
end
|
||||||
|
-- RLE encoding
|
||||||
|
rle_packet = string.char(128 + count - 1, previous_b, previous_g, previous_r, previous_a)
|
||||||
|
packets[#packets +1] = rle_packet
|
||||||
|
end
|
||||||
self.data = self.data .. table.concat(packets)
|
self.data = self.data .. table.concat(packets)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -75,15 +581,45 @@ function image:encode_footer()
|
||||||
.. string.char(0)
|
.. string.char(0)
|
||||||
end
|
end
|
||||||
|
|
||||||
function image:encode()
|
function image:encode(properties)
|
||||||
self:encode_header() -- header
|
local properties = properties or {}
|
||||||
|
properties.colormap = properties.colormap or {}
|
||||||
|
properties.compression = properties.compression or "RAW"
|
||||||
|
properties.scanline_order = properties.scanline_order or "bottom-top"
|
||||||
|
|
||||||
|
self.pixel_depth = #self.pixels[1][1] * 8
|
||||||
|
|
||||||
|
local color_format_defaults_by_pixel_depth = {
|
||||||
|
[8] = "Y8",
|
||||||
|
[24] = "B8G8R8",
|
||||||
|
[32] = "B8G8R8A8",
|
||||||
|
}
|
||||||
|
if nil == properties.color_format then
|
||||||
|
if 0 ~= #properties.colormap then
|
||||||
|
properties.color_format =
|
||||||
|
color_format_defaults_by_pixel_depth[
|
||||||
|
#properties.colormap[1] * 8
|
||||||
|
]
|
||||||
|
else
|
||||||
|
properties.color_format =
|
||||||
|
color_format_defaults_by_pixel_depth[
|
||||||
|
self.pixel_depth
|
||||||
|
]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
assert( nil ~= properties.color_format )
|
||||||
|
|
||||||
|
self.data = ""
|
||||||
|
self:encode_header(properties) -- header
|
||||||
-- no color map and image id data
|
-- no color map and image id data
|
||||||
self:encode_data() -- encode data
|
self:encode_data(properties) -- encode data
|
||||||
-- no extension or developer area
|
-- no extension or developer area
|
||||||
self:encode_footer() -- footer
|
self:encode_footer() -- footer
|
||||||
end
|
end
|
||||||
|
|
||||||
function image:save(filename)
|
function image:save(filename, properties)
|
||||||
|
self:encode(properties)
|
||||||
|
|
||||||
local f = assert(io.open(filename, "wb"))
|
local f = assert(io.open(filename, "wb"))
|
||||||
f:write(self.data)
|
f:write(self.data)
|
||||||
f:close()
|
f:close()
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
dofile("init.lua")
|
||||||
|
|
||||||
|
local colormap = {
|
||||||
|
{ 0, 0, 0 }, -- black
|
||||||
|
{ 255, 255, 255 }, -- white
|
||||||
|
{ 255, 0, 0 }, -- red
|
||||||
|
{ 0, 255, 0 }, -- green
|
||||||
|
{ 0, 0, 255 }, -- blue
|
||||||
|
}
|
||||||
|
|
||||||
|
local _ = { 0 }
|
||||||
|
local W = { 1 }
|
||||||
|
local R = { 2 }
|
||||||
|
local G = { 3 }
|
||||||
|
local B = { 4 }
|
||||||
|
|
||||||
|
local pixels_tiny = {
|
||||||
|
{ W, W, W, W, W, W, W, W, W, W, W, W, },
|
||||||
|
{ W, _, _, _, _, _, _, _, _, _, _, W, },
|
||||||
|
{ W, _, _, _, _, _, _, B, _, B, _, W, },
|
||||||
|
{ W, _, _, _, _, _, _, B, B, B, _, W, },
|
||||||
|
{ W, _, _, _, G, G, G, B, _, B, _, W, },
|
||||||
|
{ W, _, _, _, G, _, G, B, B, B, _, W, },
|
||||||
|
{ W, _, _, R, G, _, _, _, _, _, _, W, },
|
||||||
|
{ W, _, _, R, G, G, G, _, _, _, _, W, },
|
||||||
|
{ W, _, _, R, _, _, _, _, _, _, _, W, },
|
||||||
|
{ W, _, R, R, R, _, _, _, _, _, _, W, },
|
||||||
|
{ W, _, _, _, _, _, _, _, _, _, _, W, },
|
||||||
|
{ W, W, W, W, W, W, W, W, W, W, W, W, },
|
||||||
|
}
|
||||||
|
|
||||||
|
local pixels_huge = {}
|
||||||
|
|
||||||
|
local size_tiny = #pixels_tiny
|
||||||
|
local size_huge = 1200
|
||||||
|
local scale = size_huge / size_tiny
|
||||||
|
|
||||||
|
for x_huge = 1,size_huge,1 do
|
||||||
|
local x_tiny = math.ceil( x_huge / scale )
|
||||||
|
for z_huge = 1,size_huge,1 do
|
||||||
|
local z_tiny = math.ceil( z_huge / scale )
|
||||||
|
if nil == pixels_huge[z_huge] then
|
||||||
|
pixels_huge[z_huge] = {}
|
||||||
|
end
|
||||||
|
pixels_huge[z_huge][x_huge] = pixels_tiny[z_tiny][x_tiny]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
tga_encoder.image(pixels_tiny):save("logo_tiny.tga", {colormap=colormap})
|
||||||
|
tga_encoder.image(pixels_huge):save("logo_huge.tga", {colormap=colormap})
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
name = tga_encoder
|
name = tga_encoder
|
||||||
author = Fleckenstein
|
|
||||||
description = A TGA Encoder written in Lua without the use of external Libraries.
|
description = A TGA Encoder written in Lua without the use of external Libraries.
|
||||||
|
|
|
@ -0,0 +1,180 @@
|
||||||
|
#!/usr/bin/env lua5.1
|
||||||
|
dofile("../init.lua")
|
||||||
|
|
||||||
|
local _ = { 0 }
|
||||||
|
local R = { 1 }
|
||||||
|
local G = { 2 }
|
||||||
|
local B = { 3 }
|
||||||
|
|
||||||
|
local pixels_colormapped_bt = {
|
||||||
|
{ _, _, _, _, _, B, _, B, },
|
||||||
|
{ _, _, _, _, _, B, B, B, },
|
||||||
|
{ _, _, G, G, G, B, _, B, },
|
||||||
|
{ _, _, G, _, G, B, B, B, },
|
||||||
|
{ _, R, G, _, _, _, _, _, },
|
||||||
|
{ _, R, G, G, G, _, _, _, },
|
||||||
|
{ _, R, _, _, _, _, _, _, },
|
||||||
|
{ R, R, R, _, _, _, _, _, },
|
||||||
|
}
|
||||||
|
|
||||||
|
local pixels_colormapped_tb = {
|
||||||
|
{ R, R, R, _, _, _, _, _, },
|
||||||
|
{ _, R, _, _, _, _, _, _, },
|
||||||
|
{ _, R, G, G, G, _, _, _, },
|
||||||
|
{ _, R, G, _, _, _, _, _, },
|
||||||
|
{ _, _, G, _, G, B, B, B, },
|
||||||
|
{ _, _, G, G, G, B, _, B, },
|
||||||
|
{ _, _, _, _, _, B, B, B, },
|
||||||
|
{ _, _, _, _, _, B, _, B, },
|
||||||
|
}
|
||||||
|
|
||||||
|
image_colormapped_bt = tga_encoder.image(pixels_colormapped_bt)
|
||||||
|
image_colormapped_tb = tga_encoder.image(pixels_colormapped_tb)
|
||||||
|
|
||||||
|
colormap_32bpp = {
|
||||||
|
{ 0, 0, 0, 128 },
|
||||||
|
{ 255, 0, 0, 255 },
|
||||||
|
{ 0, 255, 0, 255 },
|
||||||
|
{ 0, 0, 255, 255 },
|
||||||
|
}
|
||||||
|
image_colormapped_bt:save(
|
||||||
|
"type1_32bpp_bt.tga",
|
||||||
|
{ colormap = colormap_32bpp, color_format = "B8G8R8A8", scanline_order = "bottom-top" }
|
||||||
|
)
|
||||||
|
image_colormapped_tb:save(
|
||||||
|
"type1_32bpp_tb.tga",
|
||||||
|
{ colormap = colormap_32bpp, color_format = "B8G8R8A8", scanline_order = "top-bottom" }
|
||||||
|
)
|
||||||
|
image_colormapped_bt:save(
|
||||||
|
"type1_16bpp_bt.tga",
|
||||||
|
{ colormap = colormap_32bpp, color_format = "A1R5G5B5", scanline_order = "bottom-top" }
|
||||||
|
)
|
||||||
|
image_colormapped_tb:save(
|
||||||
|
"type1_16bpp_tb.tga",
|
||||||
|
{ colormap = colormap_32bpp, color_format = "A1R5G5B5", scanline_order = "top-bottom" }
|
||||||
|
)
|
||||||
|
|
||||||
|
colormap_24bpp = {
|
||||||
|
{ 0, 0, 0 },
|
||||||
|
{ 255, 0, 0 },
|
||||||
|
{ 0, 255, 0 },
|
||||||
|
{ 0, 0, 255 },
|
||||||
|
}
|
||||||
|
image_colormapped_bt:save(
|
||||||
|
"type1_24bpp_bt.tga",
|
||||||
|
{ colormap = colormap_32bpp, color_format = "B8G8R8", scanline_order = "bottom-top" }
|
||||||
|
)
|
||||||
|
image_colormapped_tb:save(
|
||||||
|
"type1_24bpp_tb.tga",
|
||||||
|
{ colormap = colormap_32bpp, color_format = "B8G8R8", scanline_order = "top-bottom" }
|
||||||
|
)
|
||||||
|
|
||||||
|
local _ = { 0, 0, 0, 128 }
|
||||||
|
local R = { 255, 0, 0, 255 }
|
||||||
|
local G = { 0, 255, 0, 255 }
|
||||||
|
local B = { 0, 0, 255, 255 }
|
||||||
|
|
||||||
|
local pixels_rgba_bt = {
|
||||||
|
{ _, _, _, _, _, B, _, B, },
|
||||||
|
{ _, _, _, _, _, B, B, B, },
|
||||||
|
{ _, _, G, G, G, B, _, B, },
|
||||||
|
{ _, _, G, _, G, B, B, B, },
|
||||||
|
{ _, R, G, _, _, _, _, _, },
|
||||||
|
{ _, R, G, G, G, _, _, _, },
|
||||||
|
{ _, R, _, _, _, _, _, _, },
|
||||||
|
{ R, R, R, _, _, _, _, _, },
|
||||||
|
}
|
||||||
|
|
||||||
|
local pixels_rgba_tb = {
|
||||||
|
{ R, R, R, _, _, _, _, _, },
|
||||||
|
{ _, R, _, _, _, _, _, _, },
|
||||||
|
{ _, R, G, G, G, _, _, _, },
|
||||||
|
{ _, R, G, _, _, _, _, _, },
|
||||||
|
{ _, _, G, _, G, B, B, B, },
|
||||||
|
{ _, _, G, G, G, B, _, B, },
|
||||||
|
{ _, _, _, _, _, B, B, B, },
|
||||||
|
{ _, _, _, _, _, B, _, B, },
|
||||||
|
}
|
||||||
|
|
||||||
|
image_rgba_bt = tga_encoder.image(pixels_rgba_bt)
|
||||||
|
image_rgba_tb = tga_encoder.image(pixels_rgba_tb)
|
||||||
|
|
||||||
|
image_rgba_bt:save(
|
||||||
|
"type2_32bpp_bt.tga",
|
||||||
|
{ color_format="B8G8R8A8", compression="RAW", scanline_order = "bottom-top" }
|
||||||
|
)
|
||||||
|
image_rgba_tb:save(
|
||||||
|
"type2_32bpp_tb.tga",
|
||||||
|
{ color_format="B8G8R8A8", compression="RAW", scanline_order = "top-bottom" }
|
||||||
|
)
|
||||||
|
image_rgba_bt:save(
|
||||||
|
"type10_32bpp_bt.tga",
|
||||||
|
{ color_format="B8G8R8A8", compression="RLE", scanline_order = "bottom-top" }
|
||||||
|
)
|
||||||
|
image_rgba_tb:save(
|
||||||
|
"type10_32bpp_tb.tga",
|
||||||
|
{ color_format="B8G8R8A8", compression="RLE", scanline_order = "top-bottom" }
|
||||||
|
)
|
||||||
|
|
||||||
|
local _ = { 0, 0, 0 }
|
||||||
|
local R = { 255, 0, 0 }
|
||||||
|
local G = { 0, 255, 0 }
|
||||||
|
local B = { 0, 0, 255 }
|
||||||
|
|
||||||
|
local pixels_rgb_bt = {
|
||||||
|
{ _, _, _, _, _, B, _, B, },
|
||||||
|
{ _, _, _, _, _, B, B, B, },
|
||||||
|
{ _, _, G, G, G, B, _, B, },
|
||||||
|
{ _, _, G, _, G, B, B, B, },
|
||||||
|
{ _, R, G, _, _, _, _, _, },
|
||||||
|
{ _, R, G, G, G, _, _, _, },
|
||||||
|
{ _, R, _, _, _, _, _, _, },
|
||||||
|
{ R, R, R, _, _, _, _, _, },
|
||||||
|
}
|
||||||
|
|
||||||
|
local pixels_rgb_tb = {
|
||||||
|
{ R, R, R, _, _, _, _, _, },
|
||||||
|
{ _, R, _, _, _, _, _, _, },
|
||||||
|
{ _, R, G, G, G, _, _, _, },
|
||||||
|
{ _, R, G, _, _, _, _, _, },
|
||||||
|
{ _, _, G, _, G, B, B, B, },
|
||||||
|
{ _, _, G, G, G, B, _, B, },
|
||||||
|
{ _, _, _, _, _, B, B, B, },
|
||||||
|
{ _, _, _, _, _, B, _, B, },
|
||||||
|
}
|
||||||
|
|
||||||
|
image_rgb_bt = tga_encoder.image(pixels_rgb_bt)
|
||||||
|
image_rgb_tb = tga_encoder.image(pixels_rgb_tb)
|
||||||
|
|
||||||
|
image_rgb_bt:save(
|
||||||
|
"type2_24bpp_bt.tga",
|
||||||
|
{ color_format="B8G8R8", compression="RAW", scanline_order = "bottom-top" }
|
||||||
|
)
|
||||||
|
image_rgb_tb:save(
|
||||||
|
"type2_24bpp_tb.tga",
|
||||||
|
{ color_format="B8G8R8", compression="RAW", scanline_order = "top-bottom" }
|
||||||
|
)
|
||||||
|
image_rgb_bt:save(
|
||||||
|
"type10_24bpp_bt.tga",
|
||||||
|
{ color_format="B8G8R8", compression="RLE", scanline_order = "bottom-top" }
|
||||||
|
)
|
||||||
|
image_rgb_tb:save(
|
||||||
|
"type10_24bpp_tb.tga",
|
||||||
|
{ color_format="B8G8R8", compression="RLE", scanline_order = "top-bottom" }
|
||||||
|
)
|
||||||
|
image_rgb_bt:save(
|
||||||
|
"type2_16bpp_bt.tga",
|
||||||
|
{ color_format="A1R5G5B5", compression="RAW", scanline_order = "bottom-top" }
|
||||||
|
)
|
||||||
|
image_rgb_tb:save(
|
||||||
|
"type2_16bpp_tb.tga",
|
||||||
|
{ color_format="A1R5G5B5", compression="RAW", scanline_order = "top-bottom" }
|
||||||
|
)
|
||||||
|
image_rgb_bt:save(
|
||||||
|
"type10_16bpp_bt.tga",
|
||||||
|
{ color_format="A1R5G5B5", compression="RLE", scanline_order = "bottom-top" }
|
||||||
|
)
|
||||||
|
image_rgb_tb:save(
|
||||||
|
"type10_16bpp_tb.tga",
|
||||||
|
{ color_format="A1R5G5B5", compression="RLE", scanline_order = "top-bottom" }
|
||||||
|
)
|
|
@ -10,7 +10,7 @@ License of boat model:
|
||||||
GNU GPLv3 <https://www.gnu.org/licenses/gpl-3.0.html>
|
GNU GPLv3 <https://www.gnu.org/licenses/gpl-3.0.html>
|
||||||
|
|
||||||
## Textures
|
## Textures
|
||||||
See the main MineClone 2 README.md file to learn more.
|
See the main VoxeLibre README.md file to learn more.
|
||||||
|
|
||||||
## Code
|
## Code
|
||||||
Code based on Minetest Game, licensed under the MIT License (MIT).
|
Code based on Minetest Game, licensed under the MIT License (MIT).
|
||||||
|
|
|
@ -168,7 +168,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
function boat.on_activate(self, staticdata, dtime_s)
|
function boat.on_activate(self, staticdata, dtime_s)
|
||||||
self.object:set_armor_groups({fleshy = 100})
|
self.object:set_armor_groups({fleshy = 125})
|
||||||
local data = minetest.deserialize(staticdata)
|
local data = minetest.deserialize(staticdata)
|
||||||
if type(data) == "table" then
|
if type(data) == "table" then
|
||||||
self._v = data.v
|
self._v = data.v
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
# textdomain: mcl_boats
|
||||||
|
Acacia Boat=Barca de Cacèir
|
||||||
|
Birch Boat=Barca de Beç
|
||||||
|
Boat=Barca
|
||||||
|
Boats are used to travel on the surface of water.=Las barcas son utilizadas per voiatja per aigas.
|
||||||
|
Dark Oak Boat=Barca de Ròure Nèir
|
||||||
|
Jungle Boat=Barca d'Acajó
|
||||||
|
Oak Boat=Barca de Ròure
|
||||||
|
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.=Fasetz un clic dreit sobre una sorça d'aiga per plaça la barca. Fasetz un clic dreit sobre la barca per rintrar. Utilizatz [Gaucha] e [Dreita] per menar, [Davant] per accelerar e [Darrèir] per ralentir o racuolar. Utilizatz [Sneak] per z-o quitar, tustatz la barca per z-o faire tombar coma objècte.
|
||||||
|
Spruce Boat=Barca de Sap
|
||||||
|
Water vehicle=Veïcule per aiga
|
||||||
|
Sneak to dismount=Se baissar per descendre
|
||||||
|
Obsidian Boat=Barca d'Obsidiana
|
||||||
|
Mangrove Boat=Barca de Paletuvèir
|
||||||
|
Oak Chest Boat=Barca de Ròure embei una Mala
|
||||||
|
Spruce Chest Boat=Barca de Sap embei una Mala
|
||||||
|
Birch Chest Boat=Barca de Beç embei una Mala
|
||||||
|
Jungle Chest Boat=Barca d'Acajó embei una Mala
|
||||||
|
Acacia Chest Boat=Barca de Cacèir embei una Mala
|
||||||
|
Dark Oak Chest Boat=Barca de Ròure Nèir embei una Mala
|
||||||
|
Mangrove Chest Boat=Barca de Paletuvèir embei una Mala
|
|
@ -1,4 +1,4 @@
|
||||||
name = mcl_burning
|
name = mcl_burning
|
||||||
description = Burning Objects for MineClone2
|
description = Burning Objects for VoxeLibre
|
||||||
author = Fleckenstein
|
author = Fleckenstein
|
||||||
depends = mcl_weather
|
depends = mcl_weather
|
|
@ -1,6 +1,6 @@
|
||||||
# mcl_dripping
|
# mcl_dripping
|
||||||
|
|
||||||
Dripping Mod by kddekadenz, modified for MineClone 2 by Wuzzy, NO11 and AFCM
|
Dripping Mod by kddekadenz, modified for VoxeLibre by Wuzzy, NO11 and AFCM
|
||||||
|
|
||||||
## Manual
|
## Manual
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
# textdomain: mcl_falling_nodes
|
||||||
|
@1 was smashed by a falling anvil.=@1 a estat espotit per un enclutge
|
||||||
|
@1 was smashed by a falling block.=@1 a estat espotit per un blòc
|
|
@ -6,9 +6,6 @@ local pool = {}
|
||||||
|
|
||||||
local tick = false
|
local tick = false
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
pool[player:get_player_name()] = 0
|
pool[player:get_player_name()] = 0
|
||||||
end)
|
end)
|
||||||
|
@ -113,6 +110,56 @@ local function disable_physics(object, luaentity, ignore_check, reset_movement)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function try_object_pickup(player, inv, object, checkpos)
|
||||||
|
if not inv then return end
|
||||||
|
|
||||||
|
local le = object:get_luaentity()
|
||||||
|
|
||||||
|
-- Check magnet timer
|
||||||
|
if not (le._magnet_timer >= 0) then return end
|
||||||
|
if not (le._magnet_timer < item_drop_settings.magnet_time) then return end
|
||||||
|
|
||||||
|
-- Don't try to collect again
|
||||||
|
if le._removed then return end
|
||||||
|
|
||||||
|
-- Ignore if itemstring is not set yet
|
||||||
|
if le.itemstring == "" then return end
|
||||||
|
|
||||||
|
-- Add what we can to the inventory
|
||||||
|
local itemstack = ItemStack(le.itemstring)
|
||||||
|
tt.reload_itemstack_description(itemstack)
|
||||||
|
local leftovers = inv:add_item("main", itemstack )
|
||||||
|
|
||||||
|
check_pickup_achievements(object, player)
|
||||||
|
|
||||||
|
if leftovers:is_empty() then
|
||||||
|
-- Destroy entity
|
||||||
|
-- This just prevents this section to be run again because object:remove() doesn't remove the item immediately.
|
||||||
|
le.target = checkpos
|
||||||
|
le._removed = true
|
||||||
|
|
||||||
|
-- Stop the object
|
||||||
|
object:set_velocity(vector.zero())
|
||||||
|
object:set_acceleration(vector.zero())
|
||||||
|
object:move_to(checkpos)
|
||||||
|
|
||||||
|
-- Update sound pool
|
||||||
|
local name = player:get_player_name()
|
||||||
|
pool[name] = ( pool[name] or 0 ) + 1
|
||||||
|
|
||||||
|
-- Make sure the object gets removed
|
||||||
|
minetest.after(0.25, function()
|
||||||
|
--safety check
|
||||||
|
if object and object:get_luaentity() then
|
||||||
|
object:remove()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
else
|
||||||
|
-- Update entity itemstring
|
||||||
|
le.itemstring = leftovers:to_string()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_globalstep(function(_)
|
minetest.register_globalstep(function(_)
|
||||||
tick = not tick
|
tick = not tick
|
||||||
|
|
||||||
|
@ -123,17 +170,17 @@ minetest.register_globalstep(function(_)
|
||||||
|
|
||||||
local pos = player:get_pos()
|
local pos = player:get_pos()
|
||||||
|
|
||||||
if tick == true and pool[name] > 0 then
|
if tick == true and (pool[name] or 0) > 0 then
|
||||||
minetest.sound_play("item_drop_pickup", {
|
minetest.sound_play("item_drop_pickup", {
|
||||||
pos = pos,
|
pos = pos,
|
||||||
gain = 0.3,
|
gain = 0.3,
|
||||||
max_hear_distance = 16,
|
max_hear_distance = 16,
|
||||||
pitch = math.random(70, 110) / 100
|
pitch = math.random(70, 110) / 100
|
||||||
})
|
})
|
||||||
if pool[name] > 6 then
|
if (pool[name] or 0) > 6 then
|
||||||
pool[name] = 6
|
pool[name] = 6
|
||||||
else
|
else
|
||||||
pool[name] = pool[name] - 1
|
pool[name] = (pool[name] or 1) - 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -147,40 +194,7 @@ minetest.register_globalstep(function(_)
|
||||||
object:get_luaentity() and object:get_luaentity().name == "__builtin:item" and object:get_luaentity()._magnet_timer
|
object:get_luaentity() and object:get_luaentity().name == "__builtin:item" and object:get_luaentity()._magnet_timer
|
||||||
and (object:get_luaentity()._insta_collect or (object:get_luaentity().age > item_drop_settings.age)) then
|
and (object:get_luaentity()._insta_collect or (object:get_luaentity().age > item_drop_settings.age)) then
|
||||||
|
|
||||||
if object:get_luaentity()._magnet_timer >= 0 and
|
try_object_pickup( player, inv, object, checkpos )
|
||||||
object:get_luaentity()._magnet_timer < item_drop_settings.magnet_time and inv and
|
|
||||||
inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then
|
|
||||||
|
|
||||||
-- Collection
|
|
||||||
if not object:get_luaentity()._removed then
|
|
||||||
-- Ignore if itemstring is not set yet
|
|
||||||
if object:get_luaentity().itemstring ~= "" then
|
|
||||||
inv:add_item("main", ItemStack(object:get_luaentity().itemstring))
|
|
||||||
|
|
||||||
check_pickup_achievements(object, player)
|
|
||||||
|
|
||||||
-- Destroy entity
|
|
||||||
-- This just prevents this section to be run again because object:remove() doesn't remove the item immediately.
|
|
||||||
object:get_luaentity().target = checkpos
|
|
||||||
object:get_luaentity()._removed = true
|
|
||||||
|
|
||||||
object:set_velocity(vector.zero())
|
|
||||||
object:set_acceleration(vector.zero())
|
|
||||||
|
|
||||||
object:move_to(checkpos)
|
|
||||||
|
|
||||||
pool[name] = pool[name] + 1
|
|
||||||
|
|
||||||
minetest.after(0.25, function()
|
|
||||||
--safety check
|
|
||||||
if object and object:get_luaentity() then
|
|
||||||
object:remove()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
elseif not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "mcl_experience:orb" then
|
elseif not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "mcl_experience:orb" then
|
||||||
local entity = object:get_luaentity()
|
local entity = object:get_luaentity()
|
||||||
entity.collector = player:get_player_name()
|
entity.collector = player:get_player_name()
|
||||||
|
@ -435,6 +449,7 @@ function minetest.node_dig(pos, node, digger)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
tt.reload_itemstack_description(wielded) -- update tooltip
|
||||||
digger:set_wielded_item(wielded)
|
digger:set_wielded_item(wielded)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -135,3 +135,33 @@ function mcl_minecarts:get_rail_direction(pos_, dir, ctrl, old_switch, railtype)
|
||||||
end
|
end
|
||||||
return {x=0, y=0, z=0}
|
return {x=0, y=0, z=0}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local plane_adjacents = {
|
||||||
|
vector.new(-1,0,0),
|
||||||
|
vector.new(1,0,0),
|
||||||
|
vector.new(0,0,-1),
|
||||||
|
vector.new(0,0,1),
|
||||||
|
}
|
||||||
|
|
||||||
|
function mcl_minecarts:get_start_direction(pos)
|
||||||
|
local dir
|
||||||
|
local i = 0
|
||||||
|
while (not dir and i < #plane_adjacents) do
|
||||||
|
i = i+1
|
||||||
|
local node = minetest.get_node_or_nil(vector.add(pos, plane_adjacents[i]))
|
||||||
|
if node ~= nil
|
||||||
|
and minetest.get_item_group(node.name, "rail") == 0
|
||||||
|
and minetest.get_item_group(node.name, "solid") == 1
|
||||||
|
and minetest.get_item_group(node.name, "opaque") == 1
|
||||||
|
then
|
||||||
|
dir = mcl_minecarts:check_front_up_down(pos, vector.multiply(plane_adjacents[i], -1), true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return dir
|
||||||
|
end
|
||||||
|
|
||||||
|
function mcl_minecarts:set_velocity(obj, dir, factor)
|
||||||
|
obj._velocity = vector.multiply(dir, factor or 3)
|
||||||
|
obj._old_pos = nil
|
||||||
|
obj._punched = true
|
||||||
|
end
|
||||||
|
|
|
@ -241,9 +241,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||||
if vector.equals(cart_dir, {x=0, y=0, z=0}) then
|
if vector.equals(cart_dir, {x=0, y=0, z=0}) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
self._velocity = vector.multiply(cart_dir, 3)
|
mcl_minecarts:set_velocity(self, cart_dir)
|
||||||
self._old_pos = nil
|
|
||||||
self._punched = true
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -300,9 +298,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||||
time_from_last_punch = math.min(time_from_last_punch, tool_capabilities.full_punch_interval)
|
time_from_last_punch = math.min(time_from_last_punch, tool_capabilities.full_punch_interval)
|
||||||
local f = 3 * (time_from_last_punch / tool_capabilities.full_punch_interval)
|
local f = 3 * (time_from_last_punch / tool_capabilities.full_punch_interval)
|
||||||
|
|
||||||
self._velocity = vector.multiply(cart_dir, f)
|
mcl_minecarts:set_velocity(self, cart_dir, f)
|
||||||
self._old_pos = nil
|
|
||||||
self._punched = true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
cart.on_activate_by_rail = on_activate_by_rail
|
cart.on_activate_by_rail = on_activate_by_rail
|
||||||
|
@ -470,7 +466,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local dir, last_switch = nil, nil
|
local dir, last_switch, restart_pos = nil, nil, nil
|
||||||
if not pos then
|
if not pos then
|
||||||
pos = self.object:get_pos()
|
pos = self.object:get_pos()
|
||||||
end
|
end
|
||||||
|
@ -497,6 +493,9 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||||
minetest.swap_node(rou_pos, newnode)
|
minetest.swap_node(rou_pos, newnode)
|
||||||
mesecon.receptor_on(rou_pos)
|
mesecon.receptor_on(rou_pos)
|
||||||
end
|
end
|
||||||
|
if node.name == "mcl_minecarts:golden_rail_on" then
|
||||||
|
restart_pos = rou_pos
|
||||||
|
end
|
||||||
if node_old.name == "mcl_minecarts:detector_rail_on" then
|
if node_old.name == "mcl_minecarts:detector_rail_on" then
|
||||||
local newnode = {name="mcl_minecarts:detector_rail", param2 = node_old.param2}
|
local newnode = {name="mcl_minecarts:detector_rail", param2 = node_old.param2}
|
||||||
minetest.swap_node(rou_old, newnode)
|
minetest.swap_node(rou_old, newnode)
|
||||||
|
@ -647,6 +646,14 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
|
||||||
if update.pos then
|
if update.pos then
|
||||||
self.object:set_pos(pos)
|
self.object:set_pos(pos)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- stopped on "mcl_minecarts:golden_rail_on"
|
||||||
|
if vector.equals(vel, {x=0, y=0, z=0}) and restart_pos then
|
||||||
|
local dir = mcl_minecarts:get_start_direction(restart_pos)
|
||||||
|
if dir then
|
||||||
|
mcl_minecarts:set_velocity(self, dir)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function cart:get_staticdata()
|
function cart:get_staticdata()
|
||||||
|
@ -687,7 +694,15 @@ function mcl_minecarts.place_minecart(itemstack, pointed_thing, placer)
|
||||||
if le then
|
if le then
|
||||||
le._railtype = railtype
|
le._railtype = railtype
|
||||||
end
|
end
|
||||||
local cart_dir = mcl_minecarts:get_rail_direction(railpos, {x=1, y=0, z=0}, nil, nil, railtype)
|
local cart_dir
|
||||||
|
if node.name == "mcl_minecarts:golden_rail_on" then
|
||||||
|
cart_dir = mcl_minecarts:get_start_direction(railpos)
|
||||||
|
end
|
||||||
|
if cart_dir then
|
||||||
|
mcl_minecarts:set_velocity(le, cart_dir)
|
||||||
|
else
|
||||||
|
cart_dir = mcl_minecarts:get_rail_direction(railpos, {x=1, y=0, z=0}, nil, nil, railtype)
|
||||||
|
end
|
||||||
cart:set_yaw(minetest.dir_to_yaw(cart_dir))
|
cart:set_yaw(minetest.dir_to_yaw(cart_dir))
|
||||||
|
|
||||||
local pname = ""
|
local pname = ""
|
||||||
|
|
|
@ -0,0 +1,36 @@
|
||||||
|
# textdomain: mcl_minecarts
|
||||||
|
Minecart=Vagonet
|
||||||
|
Minecarts can be used for a quick transportion on rails.=Los vagonet pòdon èsser utilizats per un transpòrt rapide per ralhs.
|
||||||
|
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.=Los vagonets ròtlon mas per ralhs e seguisson totjorn la pista. A una joncion T embei ren davant, tòrnon a gaucha.
|
||||||
|
You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving.=Podètz plaçar le vagonet per ralhs. Fasetz un clic dreit dessobre per çai rentrar. Tustatz z-o per z-o faire bojar.
|
||||||
|
To obtain the minecart, punch it while holding down the sneak key.=Per aver le vagonet, tustatz z-o embei la tocha sneak enfonçada.
|
||||||
|
A minecart with TNT is an explosive vehicle that travels on rail.=Un vagonet embei TNT z-es un vagonet explosiu que voiatja per ralhs.
|
||||||
|
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.=Plaçatz z-o per ralhs. Tustatz z-o per z-o desplaçar. La TNT z-es atubada embei un batifuòc o quand le vagonet z-es per un ralh d'activacion atubat.
|
||||||
|
To obtain the minecart and TNT, punch them while holding down the sneak key. You can't do this if the TNT was ignited.=Per obtenèr le vagonet e la TNT, tustatz z-o embei la tocha sneak enfonçada. Podètz pas faire quo si la TNT z-es atubada.
|
||||||
|
A minecart with furnace is a vehicle that travels on rails. It can propel itself with fuel.=Un vagonet embei un fornil z-es un veïcule que voiatja per ralhs. Pòt se propulsar embei dau 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.=Plaçatz z-o per ralhs. Si li balhatz dau charbon, le fornil vai començar de borlar lòngtemps e porà rotlar. Tustatz z-o per z-o faire bojar.
|
||||||
|
To obtain the minecart and furnace, punch them while holding down the sneak key.=Per obtener le vagonet e le fornil, tustatz z-o embei la tocha sneak enfonçada.
|
||||||
|
Minecart with Chest=Vagonet embei una Mala
|
||||||
|
Minecart with Furnace=Vagonet embei un Fornil
|
||||||
|
Minecart with Command Block=Vagonet embei un Blòc de Comandas
|
||||||
|
Minecart with Hopper=Vagonet embei un Embure
|
||||||
|
Minecart with TNT=Vagonet embei de la 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.=Plaçatz z-o per sòu per construrre vostre chamin de fèrre, los ralhs se conectaron entre ilhs e faron de las corbas, de las junccions en T, en traversadas et en pentas au besonh.
|
||||||
|
Rail=Ralh
|
||||||
|
Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction.=Los ralhs pòdon èsser utilizats per construrre los chamins de transpòrt per los vagonets. Los ralhs normaus ralentissons gentament los vagonet per causa de friccion.
|
||||||
|
Powered Rail=Ralh Atubat
|
||||||
|
Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts.=Los ralhs pòdon èsser utilizats per construrre los chamins de transpòrt per los vagonets. Los ralhs atubats son per faire accelerar o frenar los vagonets.
|
||||||
|
Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power.=Sens energia de pèirotge, le ralh vai frenar los vagonets. Per que le ralh accelera los vagonets, alimentatz z-o embei de l'energia de pèirotge.
|
||||||
|
Activator Rail=Ralh d'Activacion
|
||||||
|
Rails can be used to build transport tracks for minecarts. Activator rails are used to activate special minecarts.=Los ralhs pòdon èsser utilizats per construrre los chamins de transpòrt per los vagonets. Los ralhs d'activacion son utilizats per activar daus vagonets speciaus.
|
||||||
|
To make this rail activate minecarts, power it with redstone power and send a minecart over this piece of rail.=Per activar le ralh, alimentatz z-o embei de l'energia de pèirotge e fasetz rotlar un vagonet per aqueste ralh.
|
||||||
|
Detector Rail=Ralh de Deteccion
|
||||||
|
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.=Los ralhs pòdon èsser utilizats per construirre los chamins de transpòrt per los vagonets. Los ralhs de deteccion pòdon detectar un vagonet per ilhs e atubar un mecanisme de pèirotge.
|
||||||
|
To detect a minecart and provide redstone power, connect it to redstone trails or redstone mechanisms and send any minecart over the rail.=Per detectar un vagonet e produrre de l'energia de pèirotge, conectatz le ralh a de la pèirotge e fasetz rotlar un vagonet per i-aul.
|
||||||
|
Track for minecarts=Pista per vagonets
|
||||||
|
Speed up when powered, slow down when not powered=Acceleratz quand z-es atubat, ralentissetz quand z-es pas atubat.
|
||||||
|
Activates minecarts when powered=Activa los vagonets quand pas atubat.
|
||||||
|
Emits redstone power when a minecart is detected=Emeta de l'energia de pèirotge quand un vagonet z-es detectat.
|
||||||
|
Vehicle for fast travel on rails=Veicule per voiatjar vistament per ralhs.
|
||||||
|
Can be ignited by tools or powered activator rail=Pòt èsser atubat embei daus otilhs o un ralh d'activacion
|
||||||
|
Sneak to dismount=Se baissar per descendre
|
|
@ -112,6 +112,22 @@ register_rail("mcl_minecarts:golden_rail_on",
|
||||||
onstate = "mcl_minecarts:golden_rail_on",
|
onstate = "mcl_minecarts:golden_rail_on",
|
||||||
rules = rail_rules_long,
|
rules = rail_rules_long,
|
||||||
},
|
},
|
||||||
|
effector = {
|
||||||
|
action_on = function(pos, node)
|
||||||
|
local dir = mcl_minecarts:get_start_direction(pos)
|
||||||
|
if not dir then return end
|
||||||
|
local objs = minetest.get_objects_inside_radius(pos, 1)
|
||||||
|
for _, o in pairs(objs) do
|
||||||
|
local l = o:get_luaentity()
|
||||||
|
local v = o:get_velocity()
|
||||||
|
if l and string.sub(l.name, 1, 14) == "mcl_minecarts:"
|
||||||
|
and v and vector.equals(v, vector.zero())
|
||||||
|
then
|
||||||
|
mcl_minecarts:set_velocity(l, dir)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
drop = "mcl_minecarts:golden_rail",
|
drop = "mcl_minecarts:golden_rail",
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
local mob_class = mcl_mobs.mob_class
|
local mob_class = mcl_mobs.mob_class
|
||||||
local mob_class_meta = {__index = mcl_mobs.mob_class}
|
local mob_class_meta = {__index = mcl_mobs.mob_class}
|
||||||
local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
|
local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
|
||||||
-- API for Mobs Redo: MineClone 2 Edition (MRM)
|
-- API for Mobs Redo: VoxeLibre Edition
|
||||||
|
|
||||||
local PATHFINDING = "gowp"
|
local PATHFINDING = "gowp"
|
||||||
local CRASH_WARN_FREQUENCY = 60
|
local CRASH_WARN_FREQUENCY = 60
|
||||||
|
@ -96,15 +96,23 @@ function mob_class:get_staticdata()
|
||||||
|
|
||||||
local tmp = {}
|
local tmp = {}
|
||||||
|
|
||||||
for _,stat in pairs(self) do
|
for tag, stat in pairs(self) do
|
||||||
|
|
||||||
local t = type(stat)
|
local t = type(stat)
|
||||||
|
|
||||||
if t ~= "function"
|
if t ~= "function"
|
||||||
and t ~= "nil"
|
and t ~= "nil"
|
||||||
and t ~= "userdata"
|
and t ~= "userdata"
|
||||||
and _ ~= "_cmi_components" then
|
and tag ~= "_cmi_components" then
|
||||||
tmp[_] = self[_]
|
tmp[tag] = self[tag]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
tmp._mcl_potions = self._mcl_potions
|
||||||
|
if tmp._mcl_potions then
|
||||||
|
for name_raw, data in pairs(tmp._mcl_potions) do
|
||||||
|
local def = mcl_potions.registered_effects[name_raw:match("^_EF_(.+)$")]
|
||||||
|
if def and def.on_save_effect then def.on_save_effect(self.object) end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -306,7 +314,10 @@ function mob_class:mob_activate(staticdata, def, dtime)
|
||||||
self._run_armor_init = true
|
self._run_armor_init = true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not self._mcl_potions then
|
||||||
|
self._mcl_potions = {}
|
||||||
|
end
|
||||||
|
mcl_potions._load_entity_effects(self)
|
||||||
|
|
||||||
|
|
||||||
if def.after_activate then
|
if def.after_activate then
|
||||||
|
@ -473,7 +484,7 @@ local function warn_user_error ()
|
||||||
|
|
||||||
if time_since_warning > CRASH_WARN_FREQUENCY then
|
if time_since_warning > CRASH_WARN_FREQUENCY then
|
||||||
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 VoxeLibre dev team for investigation. (Search for: --- Bug report start)")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
Mobs Redo: MineClone 2 Edition
|
Mobs Redo: VoxeLibre Edition
|
||||||
API documentation
|
API documentation
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
|
@ -231,7 +231,7 @@ functions needed for the mob to work properly which contains the following:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
MineClone 2 extensions:
|
VoxeLibre extensions:
|
||||||
|
|
||||||
'spawn_class' Classification of mod for the spawning algorithm:
|
'spawn_class' Classification of mod for the spawning algorithm:
|
||||||
"hostile", "passive", "ambient" or "water"
|
"hostile", "passive", "ambient" or "water"
|
||||||
|
@ -434,7 +434,7 @@ true the mob will not spawn.
|
||||||
'name' is the name of the animal/monster
|
'name' is the name of the animal/monster
|
||||||
|
|
||||||
|
|
||||||
MineClone 2 extensions
|
VoxeLibre extensions
|
||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
mcl_mobs:spawn_child(pos, mob_type)
|
mcl_mobs:spawn_child(pos, mob_type)
|
||||||
|
@ -524,7 +524,7 @@ Does nothing and returns false.
|
||||||
|
|
||||||
This function is provided for compability with Mobs Redo for an attempt to
|
This function is provided for compability with Mobs Redo for an attempt to
|
||||||
capture a mob.
|
capture a mob.
|
||||||
Mobs cannot be captured in MineClone 2.
|
Mobs cannot be captured in VoxeLibre.
|
||||||
|
|
||||||
In Mobs Redo, this is generally called inside the on_rightclick section of the mob
|
In Mobs Redo, this is generally called inside the on_rightclick section of the mob
|
||||||
api code, it provides a chance of capturing the mob. See Mobs Redo documentation
|
api code, it provides a chance of capturing the mob. See Mobs Redo documentation
|
||||||
|
@ -671,6 +671,13 @@ mob will spawn e.g.
|
||||||
mobs_animal:sheep_chance 11000
|
mobs_animal:sheep_chance 11000
|
||||||
mobs_monster:sand_monster_chance 100
|
mobs_monster:sand_monster_chance 100
|
||||||
|
|
||||||
|
Registering Mob Conversion
|
||||||
|
----------------
|
||||||
|
|
||||||
|
Sometimes you need to completely replace one mob with a different version. To do this, use:
|
||||||
|
|
||||||
|
mcl_mobs.register_conversion(old_name, new_name)
|
||||||
|
|
||||||
|
|
||||||
Rideable Horse Example Mob
|
Rideable Horse Example Mob
|
||||||
--------------------------
|
--------------------------
|
||||||
|
|
|
@ -78,6 +78,7 @@ function mob_class:feed_tame(clicker, feed_count, breed, tame, notake)
|
||||||
self.food = 0
|
self.food = 0
|
||||||
self.horny = true
|
self.horny = true
|
||||||
self.persistent = true
|
self.persistent = true
|
||||||
|
self._luck = mcl_luck.get_luck(clicker:get_player_name())
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -273,7 +274,7 @@ function mob_class:check_breeding()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_experience.throw_xp(pos, math.random(1, 7))
|
mcl_experience.throw_xp(pos, math.random(1, 7) + (parent1._luck or 0) + (parent2._luck or 0))
|
||||||
|
|
||||||
-- custom breed function
|
-- custom breed function
|
||||||
if parent1.on_breed then
|
if parent1.on_breed then
|
||||||
|
@ -322,7 +323,7 @@ function mob_class:toggle_sit(clicker,p)
|
||||||
particle = "mobs_mc_wolf_icon_roam.png"
|
particle = "mobs_mc_wolf_icon_roam.png"
|
||||||
self.order = "roam"
|
self.order = "roam"
|
||||||
self.state = "stand"
|
self.state = "stand"
|
||||||
self.walk_chance = default_walk_chance
|
self.walk_chance = 50
|
||||||
self.jump = true
|
self.jump = true
|
||||||
self:set_animation("stand")
|
self:set_animation("stand")
|
||||||
-- TODO: Add sitting model
|
-- TODO: Add sitting model
|
||||||
|
|
|
@ -21,8 +21,6 @@ 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()
|
||||||
|
@ -35,14 +33,19 @@ function mob_class:day_docile()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- attack player/mob
|
-- get this mob to attack the object
|
||||||
function mob_class:do_attack(player)
|
function mob_class:do_attack(object)
|
||||||
|
|
||||||
if self.state == "attack" or self.state == "die" then
|
if self.state == "attack" or self.state == "die" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
self.attack = player
|
|
||||||
|
if object:is_player() and not minetest.settings:get_bool("enable_damage") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
self.attack = object
|
||||||
self.state = "attack"
|
self.state = "attack"
|
||||||
|
|
||||||
-- TODO: Implement war_cry sound without being annoying
|
-- TODO: Implement war_cry sound without being annoying
|
||||||
|
@ -529,6 +532,8 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir)
|
||||||
if self.protected and minetest.is_protected(mob_pos, hitter:get_player_name()) then
|
if self.protected and minetest.is_protected(mob_pos, hitter:get_player_name()) then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
mcl_potions.update_haste_and_fatigue(hitter)
|
||||||
end
|
end
|
||||||
|
|
||||||
local time_now = minetest.get_us_time()
|
local time_now = minetest.get_us_time()
|
||||||
|
@ -600,6 +605,13 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir)
|
||||||
* tmp * ((armor[group] or 0) / 100.0)
|
* tmp * ((armor[group] or 0) / 100.0)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- strength and weakness effects
|
||||||
|
local strength = mcl_potions.get_effect(hitter, "strength")
|
||||||
|
local weakness = mcl_potions.get_effect(hitter, "weakness")
|
||||||
|
local str_fac = strength and strength.factor or 1
|
||||||
|
local weak_fac = weakness and weakness.factor or 1
|
||||||
|
damage = damage * str_fac * weak_fac
|
||||||
|
|
||||||
if weapon then
|
if weapon then
|
||||||
local fire_aspect_level = mcl_enchanting.get_enchantment(weapon, "fire_aspect")
|
local fire_aspect_level = mcl_enchanting.get_enchantment(weapon, "fire_aspect")
|
||||||
if fire_aspect_level > 0 then
|
if fire_aspect_level > 0 then
|
||||||
|
@ -641,6 +653,7 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir)
|
||||||
if def.tool_capabilities and def.tool_capabilities.punch_attack_uses then
|
if def.tool_capabilities and def.tool_capabilities.punch_attack_uses then
|
||||||
local wear = math.floor(65535/tool_capabilities.punch_attack_uses)
|
local wear = math.floor(65535/tool_capabilities.punch_attack_uses)
|
||||||
weapon:add_wear(wear)
|
weapon:add_wear(wear)
|
||||||
|
tt.reload_itemstack_description(weapon) -- update tooltip
|
||||||
hitter:set_wielded_item(weapon)
|
hitter:set_wielded_item(weapon)
|
||||||
end
|
end
|
||||||
end, hitter:get_player_name())
|
end, hitter:get_player_name())
|
||||||
|
@ -789,34 +802,37 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- alert others to the attack
|
-- alert others to the attack
|
||||||
local objs = minetest.get_objects_inside_radius(hitter:get_pos(), self.view_range)
|
local alert_pos = hitter:get_pos()
|
||||||
local obj = nil
|
if alert_pos then
|
||||||
|
local objs = minetest.get_objects_inside_radius(alert_pos, self.view_range)
|
||||||
|
local obj = nil
|
||||||
|
|
||||||
for n = 1, #objs do
|
for n = 1, #objs do
|
||||||
|
|
||||||
obj = objs[n]:get_luaentity()
|
obj = objs[n]:get_luaentity()
|
||||||
|
|
||||||
if obj then
|
if obj then
|
||||||
-- only alert members of same mob or friends
|
-- only alert members of same mob or friends
|
||||||
if obj.group_attack
|
if obj.group_attack
|
||||||
and obj.state ~= "attack"
|
and obj.state ~= "attack"
|
||||||
and obj.owner ~= name then
|
and obj.owner ~= name then
|
||||||
if obj.name == self.name then
|
if obj.name == self.name then
|
||||||
obj:do_attack(hitter)
|
obj:do_attack(hitter)
|
||||||
elseif type(obj.group_attack) == "table" then
|
elseif type(obj.group_attack) == "table" then
|
||||||
for i=1, #obj.group_attack do
|
for i=1, #obj.group_attack do
|
||||||
if obj.group_attack[i] == self.name then
|
if obj.group_attack[i] == self.name then
|
||||||
obj._aggro = true
|
obj._aggro = true
|
||||||
obj:do_attack(hitter)
|
obj:do_attack(hitter)
|
||||||
break
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
-- have owned mobs attack player threat
|
-- have owned mobs attack player threat
|
||||||
if obj.owner == name and obj.owner_loyal then
|
if obj.owner == name and obj.owner_loyal then
|
||||||
obj:do_attack(self.object)
|
obj:do_attack(self.object)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -952,6 +968,7 @@ function mob_class:do_states_attack (dtime)
|
||||||
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
|
||||||
|
self:set_animation("fuse")
|
||||||
|
|
||||||
if self.blinktimer > 0.2 then
|
if self.blinktimer > 0.2 then
|
||||||
self.blinktimer = 0
|
self.blinktimer = 0
|
||||||
|
@ -1137,9 +1154,8 @@ function mob_class:do_states_attack (dtime)
|
||||||
damage_groups = {fleshy = self.damage}
|
damage_groups = {fleshy = self.damage}
|
||||||
}, nil)
|
}, nil)
|
||||||
if self.dealt_effect then
|
if self.dealt_effect then
|
||||||
mcl_mobs.effect_functions[self.dealt_effect.name](
|
mcl_potions.give_effect_by_level(self.dealt_effect.name, self.attack,
|
||||||
self.attack, self.dealt_effect.factor, self.dealt_effect.dur
|
self.dealt_effect.level, self.dealt_effect.dur)
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|
|
@ -314,6 +314,7 @@ function mcl_mobs.register_mob(name, def)
|
||||||
|
|
||||||
return self:mob_activate(staticdata, def, dtime)
|
return self:mob_activate(staticdata, def, dtime)
|
||||||
end,
|
end,
|
||||||
|
after_activate = def.after_activate,
|
||||||
attack_state = def.attack_state, -- custom attack state
|
attack_state = def.attack_state, -- custom attack state
|
||||||
on_attack = def.on_attack, -- called after attack, useful with otherwise predefined attack states (not custom)
|
on_attack = def.on_attack, -- called after attack, useful with otherwise predefined attack states (not custom)
|
||||||
harmed_by_heal = def.harmed_by_heal,
|
harmed_by_heal = def.harmed_by_heal,
|
||||||
|
@ -324,15 +325,34 @@ function mcl_mobs.register_mob(name, def)
|
||||||
attack_exception = def.attack_exception or function(p) return false end,
|
attack_exception = def.attack_exception or function(p) return false end,
|
||||||
|
|
||||||
_spawner = def._spawner,
|
_spawner = def._spawner,
|
||||||
|
_mcl_potions = {},
|
||||||
}
|
}
|
||||||
minetest.register_entity(name, setmetatable(final_def,mcl_mobs.mob_class_meta))
|
|
||||||
|
|
||||||
if minetest.get_modpath("doc_identifier") ~= nil then
|
if minetest.get_modpath("doc_identifier") ~= nil then
|
||||||
doc.sub.identifier.register_object(name, "basics", "mobs")
|
doc.sub.identifier.register_object(name, "basics", "mobs")
|
||||||
|
|
||||||
|
if def.unused ~= true then
|
||||||
|
doc.add_entry("mobs", name, {
|
||||||
|
name = def.description or name,
|
||||||
|
data = final_def,
|
||||||
|
})
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
minetest.register_entity(name, setmetatable(final_def,mcl_mobs.mob_class_meta))
|
||||||
end -- END mcl_mobs.register_mob function
|
end -- END mcl_mobs.register_mob function
|
||||||
|
|
||||||
|
function mcl_mobs.register_conversion(old_name, new_name)
|
||||||
|
minetest.register_entity(old_name, {
|
||||||
|
on_activate = function(self, staticdata, dtime)
|
||||||
|
local obj = minetest.add_entity(self.object:get_pos(), new_name, staticdata)
|
||||||
|
local hook = (obj:get_luaentity() or {})._on_after_convert
|
||||||
|
if hook then hook(obj) end
|
||||||
|
self.object:remove()
|
||||||
|
end,
|
||||||
|
_convert_to = new_name,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
function mcl_mobs.get_arrow_damage_func(damage, typ)
|
function mcl_mobs.get_arrow_damage_func(damage, typ)
|
||||||
local typ = mcl_damage.types[typ] and typ or "arrow"
|
local typ = mcl_damage.types[typ] and typ or "arrow"
|
||||||
|
@ -362,12 +382,13 @@ 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,
|
_lifetime = def._lifetime or 7,
|
||||||
owner_id = def.owner_id,
|
owner_id = def.owner_id,
|
||||||
rotate = def.rotate,
|
rotate = def.rotate,
|
||||||
on_punch = def.on_punch or function(self)
|
on_punch = def.on_punch or function(self, puncher, time_from_last_punch, tool_capabilities, dir, damage)
|
||||||
local vel = self.object:get_velocity()
|
local vel = self.object:get_velocity():length()
|
||||||
self.object:set_velocity({x=vel.x * -1, y=vel.y * -1, z=vel.z * -1})
|
self.object:set_velocity(dir * vel)
|
||||||
|
self._puncher = puncher
|
||||||
end,
|
end,
|
||||||
collisionbox = def.collisionbox or {0, 0, 0, 0, 0, 0},
|
collisionbox = def.collisionbox or {0, 0, 0, 0, 0, 0},
|
||||||
automatic_face_movement_dir = def.rotate
|
automatic_face_movement_dir = def.rotate
|
||||||
|
@ -377,7 +398,7 @@ function mcl_mobs.register_arrow(name, def)
|
||||||
|
|
||||||
on_step = def.on_step or function(self, dtime)
|
on_step = def.on_step or function(self, dtime)
|
||||||
|
|
||||||
self.timer = self.timer + 1
|
self.timer = self.timer + dtime
|
||||||
|
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
|
|
||||||
|
@ -443,24 +464,24 @@ function mcl_mobs.register_arrow(name, def)
|
||||||
|
|
||||||
if self.hit_player or self.hit_mob or self.hit_object then
|
if self.hit_player or self.hit_mob or self.hit_object then
|
||||||
|
|
||||||
for _,player in pairs(minetest.get_objects_inside_radius(pos, 1.5)) do
|
for _,object in pairs(minetest.get_objects_inside_radius(pos, 1.5)) do
|
||||||
|
|
||||||
if self.hit_player
|
if self.hit_player
|
||||||
and player:is_player() then
|
and object:is_player() then
|
||||||
|
|
||||||
self.hit_player(self, player)
|
self.hit_player(self, object)
|
||||||
self.object:remove();
|
self.object:remove();
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local entity = player:get_luaentity()
|
local entity = object:get_luaentity()
|
||||||
|
|
||||||
if entity
|
if entity
|
||||||
and self.hit_mob
|
and self.hit_mob
|
||||||
and entity.is_mob == true
|
and entity.is_mob == true
|
||||||
and tostring(player) ~= self.owner_id
|
and (tostring(object) ~= self.owner_id or self.timer > 2)
|
||||||
and entity.name ~= self.object:get_luaentity().name then
|
and entity.name ~= self.object:get_luaentity().name then
|
||||||
self.hit_mob(self, player)
|
self.hit_mob(self, object)
|
||||||
self.object:remove();
|
self.object:remove();
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -468,9 +489,9 @@ function mcl_mobs.register_arrow(name, def)
|
||||||
if entity
|
if entity
|
||||||
and self.hit_object
|
and self.hit_object
|
||||||
and (not entity.is_mob)
|
and (not entity.is_mob)
|
||||||
and tostring(player) ~= self.owner_id
|
and (tostring(object) ~= self.owner_id or self.timer > 2)
|
||||||
and entity.name ~= self.object:get_luaentity().name then
|
and entity.name ~= self.object:get_luaentity().name then
|
||||||
self.hit_object(self, player)
|
self.hit_object(self, object)
|
||||||
self.object:remove();
|
self.object:remove();
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
|
@ -87,7 +87,8 @@ function mob_class:check_item_pickup()
|
||||||
end
|
end
|
||||||
if self.pick_up then
|
if self.pick_up then
|
||||||
for k,v in pairs(self.pick_up) do
|
for k,v in pairs(self.pick_up) do
|
||||||
if not player_near(p) and self.on_pick_up and l.itemstring:find(v) then
|
local itemstack = ItemStack(l.itemstring)
|
||||||
|
if not player_near(p) and self.on_pick_up and itemstack:get_name():find(v) then
|
||||||
local r = self.on_pick_up(self,l)
|
local r = self.on_pick_up(self,l)
|
||||||
if r and r.is_empty and not r:is_empty() then
|
if r and r.is_empty and not r:is_empty() then
|
||||||
l.itemstring = r:to_string()
|
l.itemstring = r:to_string()
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
# textdomain: mcl_mobs
|
||||||
|
Peaceful mode active! No monsters will spawn.=Mòde tranquile actiu! Gis de mostre vai aparèisser.
|
||||||
|
This allows you to place a single mob.=Quo permet de plaça una creatura.
|
||||||
|
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.=Plaçatz z-o a l'endreit que volètz veire la creatura aparèisser. Las bèstias seron dejà domesticadas, defòra si laissatz la tocha se baissar enfonçada. Si z-o plaçatz sobre un generator de creaturas, chamjatz la creatura generada.
|
||||||
|
You need the “maphack” privilege to change the mob spawner.=Avètz besonh dau privilègi "maphack" per chamjar le generator de creaturas.
|
||||||
|
Name Tag=Étiquette de nom
|
||||||
|
A name tag is an item to name a mob.=Una etiqueta z-es un otilh per chamjar le nom de la creatura.
|
||||||
|
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.=Davant d'utilizar l'etiqueta, vos fau li botar un nom embei una enclutge. Après, podètz utilizar l'etiqueta per nomar una creatura. L'etiqueta pòt èsser utilizada un còp.
|
||||||
|
Only peaceful mobs allowed!=Mas las creaturas pacificas son autorizadas!
|
||||||
|
Give names to mobs=Balha daus noms a las creaturas
|
||||||
|
Set name at anvil=Botar le nom embei l'enclutge
|
||||||
|
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.=Lèva las creaturas specifiadas defòra de las que son nomadas o domesticadas. Per le paramètre segònd, utilizar nomat/domesticat per mas seleccionar las creaturas nomadas/domesticadas, o una distança per specifiar la distança maximum embei li joairi.
|
||||||
|
Default usage. Clearing hostile mobs. For more options please type: /help clearmobs=Usage par défaut. Lèva las creaturas ostilas. Per mai d'opcions, escriure : /help clearmobs
|
|
@ -1,5 +1,5 @@
|
||||||
name = mcl_mobs
|
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, mcl_luck
|
||||||
optional_depends = mcl_weather, mcl_explosions, mcl_hunger, mcl_worlds, invisibility, lucky_block, cmi, doc_identifier, mcl_armor, mcl_portals, mcl_experience, mcl_sculk
|
optional_depends = mcl_weather, mcl_explosions, mcl_hunger, mcl_worlds, invisibility, lucky_block, cmi, doc_identifier, mcl_armor, mcl_portals, mcl_experience, mcl_sculk
|
||||||
|
|
|
@ -684,7 +684,7 @@ function mob_class:do_env_damage()
|
||||||
self.object:set_velocity({x = 0, y = 0, z = 0})
|
self.object:set_velocity({x = 0, y = 0, z = 0})
|
||||||
-- wither rose effect
|
-- wither rose effect
|
||||||
elseif self.standing_in == "mcl_flowers:wither_rose" then
|
elseif self.standing_in == "mcl_flowers:wither_rose" then
|
||||||
mcl_potions.withering_func(self.object, 1, 2)
|
mcl_potions.give_effect_by_level("withering", self.object, 2, 2)
|
||||||
end
|
end
|
||||||
|
|
||||||
local nodef = minetest.registered_nodes[self.standing_in]
|
local nodef = minetest.registered_nodes[self.standing_in]
|
||||||
|
@ -761,6 +761,61 @@ function mob_class:do_env_damage()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Cactus damage
|
||||||
|
local near = minetest.find_node_near(pos, 1, "mcl_core:cactus", true)
|
||||||
|
if not near and near ~= nil then
|
||||||
|
near = find_node_near({x=pos.x, y=pos.y-1, z=pos.z}, 1, "mcl_core:cactus", true)
|
||||||
|
end
|
||||||
|
if near then
|
||||||
|
-- is mob touching the cactus?
|
||||||
|
local dist = vector.distance(pos, near)
|
||||||
|
local dist_feet = vector.distance({x=pos.x, y=pos.y-1, z=pos.z}, near)
|
||||||
|
local large_mob = false
|
||||||
|
local medium_mob = false
|
||||||
|
if self.name == "mobs_mc:ender_dragon" or
|
||||||
|
self.name == "mobs_mc:ghast" or
|
||||||
|
self.name == "mobs_mc:guardian_elder" or
|
||||||
|
self.name == "mobs_mc:slime_big" or
|
||||||
|
self.name == "mobs_mc:magma_cube_big" or
|
||||||
|
self.name == "mobs_mc:wither" then
|
||||||
|
|
||||||
|
large_mob = true
|
||||||
|
elseif self.name == "mobs_mc:hoglin" or
|
||||||
|
self.name == "mobs_mc:zoglin" or
|
||||||
|
self.name == "mobs_mc:horse" or
|
||||||
|
self.name == "mobs_mc:skeleton_horse" or
|
||||||
|
self.name == "mobs_mc:zombie_horse" or
|
||||||
|
self.name == "mobs_mc:donkey" or
|
||||||
|
self.name == "mobs_mc:mule" or
|
||||||
|
self.name == "mobs_mc:iron_golem" or
|
||||||
|
self.name == "mobs_mc:polar_bear" or
|
||||||
|
self.name == "mobs_mc:spider" or
|
||||||
|
self.name == "mobs_mc:cave_spider" or
|
||||||
|
self.name == "mobs_mc:strider" then
|
||||||
|
|
||||||
|
medium_mob = true
|
||||||
|
end
|
||||||
|
if (not large_mob and not medium_mob and (dist < 1.03 or dist_feet < 1.6)) or (medium_mob and (dist < 1.165 or dist_feet < 1.73)) or (large_mob and (dist < 1.25 or dist_feet < 1.9)) then
|
||||||
|
if self.health ~= 0 then
|
||||||
|
self:damage_mob("cactus", 2)
|
||||||
|
|
||||||
|
if self:check_for_death("cactus", {type = "environment",
|
||||||
|
pos = pos, node = self.standing_in}) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- is mob standing on the cactus?
|
||||||
|
if self.standing_on == "mcl_core:cactus" or self.standing_in == "mcl_core:cactus" or self.standing_under == "mcl_core:cactus" then
|
||||||
|
self:damage_mob("cactus", 2)
|
||||||
|
|
||||||
|
if self:check_for_death("cactus", {type = "environment",
|
||||||
|
pos = pos, node = self.standing_in}) then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Drowning damage
|
-- Drowning damage
|
||||||
if self.breath_max ~= -1 then
|
if self.breath_max ~= -1 then
|
||||||
local drowning = false
|
local drowning = false
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
Mobs Redo: MineClone 2 Edition
|
Mobs Redo: VoxeLibre Edition
|
||||||
|
|
||||||
Based on Mobs Redo from TenPlus1
|
Based on Mobs Redo from TenPlus1
|
||||||
Built from PilzAdam's original Simple Mobs with additional mobs by KrupnoPavel, Zeg9, ExeterDad and AspireMint.
|
Built from PilzAdam's original Simple Mobs with additional mobs by KrupnoPavel, Zeg9, ExeterDad and AspireMint.
|
||||||
|
|
|
@ -13,10 +13,9 @@ 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
|
||||||
local find_nodes_in_area_under_air = minetest.find_nodes_in_area_under_air
|
local find_nodes_in_area_under_air = minetest.find_nodes_in_area_under_air
|
||||||
local get_biome_name = minetest.get_biome_name
|
local mt_get_biome_name = minetest.get_biome_name
|
||||||
local get_objects_inside_radius = minetest.get_objects_inside_radius
|
local get_objects_inside_radius = minetest.get_objects_inside_radius
|
||||||
local get_connected_players = minetest.get_connected_players
|
local get_connected_players = minetest.get_connected_players
|
||||||
local minetest_get_perlin = minetest.get_perlin
|
|
||||||
|
|
||||||
local math_random = math.random
|
local math_random = math.random
|
||||||
local math_floor = math.floor
|
local math_floor = math.floor
|
||||||
|
@ -24,6 +23,7 @@ local math_ceil = math.ceil
|
||||||
local math_cos = math.cos
|
local math_cos = math.cos
|
||||||
local math_sin = math.sin
|
local math_sin = math.sin
|
||||||
local math_round = function(x) return (x > 0) and math_floor(x + 0.5) or math_ceil(x - 0.5) end
|
local math_round = function(x) return (x > 0) and math_floor(x + 0.5) or math_ceil(x - 0.5) end
|
||||||
|
local math_sqrt = math.sqrt
|
||||||
|
|
||||||
local vector_distance = vector.distance
|
local vector_distance = vector.distance
|
||||||
local vector_new = vector.new
|
local vector_new = vector.new
|
||||||
|
@ -97,19 +97,6 @@ local mobs_spawn = minetest.settings:get_bool("mobs_spawn", true) ~= false
|
||||||
local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= false
|
local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= false
|
||||||
local logging = minetest.settings:get_bool("mcl_logging_mobs_spawn",true)
|
local logging = minetest.settings:get_bool("mcl_logging_mobs_spawn",true)
|
||||||
|
|
||||||
local noise_params = {
|
|
||||||
offset = 0,
|
|
||||||
scale = 3,
|
|
||||||
spread = {
|
|
||||||
x = 301,
|
|
||||||
y = 50,
|
|
||||||
z = 304,
|
|
||||||
},
|
|
||||||
seed = 100,
|
|
||||||
octaves = 3,
|
|
||||||
persistence = 0.5,
|
|
||||||
}
|
|
||||||
|
|
||||||
-- THIS IS THE BIG LIST OF ALL BIOMES - used for programming/updating mobs
|
-- THIS IS THE BIG LIST OF ALL BIOMES - used for programming/updating mobs
|
||||||
-- Also used for missing parameter
|
-- Also used for missing parameter
|
||||||
-- Please update the list when adding new biomes!
|
-- Please update the list when adding new biomes!
|
||||||
|
@ -446,7 +433,6 @@ WARNING: BIOME INTEGRATION NEEDED -> How to get biome through lua??
|
||||||
local spawn_dictionary = {}
|
local spawn_dictionary = {}
|
||||||
--this is where all of the spawning information is kept for mobs that don't naturally spawn
|
--this is where all of the spawning information is kept for mobs that don't naturally spawn
|
||||||
local non_spawn_dictionary = {}
|
local non_spawn_dictionary = {}
|
||||||
local summary_chance = 0
|
|
||||||
|
|
||||||
function mcl_mobs:spawn_setup(def)
|
function mcl_mobs:spawn_setup(def)
|
||||||
if not mobs_spawn then return end
|
if not mobs_spawn then return end
|
||||||
|
@ -508,7 +494,6 @@ function mcl_mobs:spawn_setup(def)
|
||||||
check_position = check_position,
|
check_position = check_position,
|
||||||
on_spawn = on_spawn,
|
on_spawn = on_spawn,
|
||||||
}
|
}
|
||||||
summary_chance = summary_chance + chance
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function mcl_mobs:mob_light_lvl(mob_name, dimension)
|
function mcl_mobs:mob_light_lvl(mob_name, dimension)
|
||||||
|
@ -580,6 +565,9 @@ function mcl_mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
assert(min_height)
|
||||||
|
assert(max_height)
|
||||||
|
|
||||||
-- chance/spawn number override in minetest.conf for registered mob
|
-- chance/spawn number override in minetest.conf for registered mob
|
||||||
local numbers = minetest.settings:get(name)
|
local numbers = minetest.settings:get(name)
|
||||||
|
|
||||||
|
@ -611,27 +599,119 @@ function mcl_mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_
|
||||||
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
|
spawn_dictionary[key]["check_position"] = check_position
|
||||||
|
|
||||||
summary_chance = summary_chance + chance
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Calculate the inverse of a piecewise linear function f(x). Line segments are represented as two
|
||||||
|
-- adjacent points specified as { x, f(x) }. At least 2 points are required. If there are most solutions,
|
||||||
|
-- the one with a lower x value will be chosen.
|
||||||
|
local function inverse_pwl(fx, f)
|
||||||
|
if fx < f[1][2] then
|
||||||
|
return f[1][1]
|
||||||
|
end
|
||||||
|
|
||||||
|
for i=2,#f do
|
||||||
|
local x0,fx0 = unpack(f[i-1])
|
||||||
|
local x1,fx1 = unpack(f[i ])
|
||||||
|
if fx < fx1 then
|
||||||
|
return (fx - fx0) * (x1 - x0) / (fx1 - fx0) + x0
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return f[#f][1]
|
||||||
|
end
|
||||||
|
|
||||||
|
local SPAWN_DISTANCE_CDF_PWL = {
|
||||||
|
{0.000,0.00},
|
||||||
|
{0.083,0.40},
|
||||||
|
{0.416,0.75},
|
||||||
|
{1.000,1.00},
|
||||||
|
}
|
||||||
|
|
||||||
local two_pi = 2 * math.pi
|
local two_pi = 2 * math.pi
|
||||||
local function get_next_mob_spawn_pos(pos)
|
local function get_next_mob_spawn_pos(pos)
|
||||||
-- TODO We should consider spawning something a little further away sporadically.
|
-- Select a distance such that distances closer to the player are selected much more often than
|
||||||
-- It would be good for sky farms and variance, rather than all being on the 24 - 32 block away radius
|
-- those further away from the player.
|
||||||
local distance = math_random(MOB_SPAWN_ZONE_INNER, MOB_SPAWN_ZONE_MIDDLE)
|
local fx = (math_random(1,10000)-1) / 10000
|
||||||
local angle = math_random() * two_pi
|
local x = inverse_pwl(fx, SPAWN_DISTANCE_CDF_PWL)
|
||||||
|
local distance = x * (MOB_SPAWN_ZONE_OUTER - MOB_SPAWN_ZONE_INNER) + MOB_SPAWN_ZONE_INNER
|
||||||
|
--print("Using spawn distance of "..tostring(distance).." fx="..tostring(fx)..",x="..tostring(x))
|
||||||
|
|
||||||
-- TODO Floor xoff and zoff and add 0.5 so it tries to spawn in the middle of the square. Less failed attempts.
|
-- TODO Floor xoff and zoff and add 0.5 so it tries to spawn in the middle of the square. Less failed attempts.
|
||||||
local xoff = math_round(distance * math_cos(angle))
|
-- Use spherical coordinates https://en.wikipedia.org/wiki/Spherical_coordinate_system#Cartesian_coordinates
|
||||||
local zoff = math_round(distance * math_sin(angle))
|
local theta = math_random() * two_pi
|
||||||
return vector.offset(pos, xoff, 0, zoff)
|
local phi = math_random() * two_pi
|
||||||
end
|
local xoff = math_round(distance * math_sin(theta) * math_cos(phi))
|
||||||
|
local yoff = math_round(distance * math_cos(theta))
|
||||||
|
local zoff = math_round(distance * math_sin(theta) * math_sin(phi))
|
||||||
|
local goal_pos = vector.offset(pos, xoff, yoff, zoff)
|
||||||
|
|
||||||
local function decypher_limits(posy)
|
if not ( math.abs(goal_pos.x) <= SPAWN_MAPGEN_LIMIT and math.abs(pos.y) <= SPAWN_MAPGEN_LIMIT and math.abs(goal_pos.z) <= SPAWN_MAPGEN_LIMIT ) then
|
||||||
posy = math_floor(posy)
|
mcl_log("Pos outside mapgen limits: " .. minetest.pos_to_string(goal_pos))
|
||||||
return posy - MOB_SPAWN_ZONE_MIDDLE, posy + MOB_SPAWN_ZONE_MIDDLE
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Calculate upper/lower y limits
|
||||||
|
local R1 = MOB_SPAWN_ZONE_OUTER
|
||||||
|
local d = vector_distance( pos, vector.new( goal_pos.x, pos.y, goal_pos.z ) ) -- distance from player to projected point on horizontal plane
|
||||||
|
local y1 = math_sqrt( R1*R1 - d*d ) -- absolue value of distance to outer sphere
|
||||||
|
|
||||||
|
local y_min
|
||||||
|
local y_max
|
||||||
|
if d >= MOB_SPAWN_ZONE_INNER then
|
||||||
|
-- Outer region, y range has both ends on the outer sphere
|
||||||
|
y_min = pos.y - y1
|
||||||
|
y_max = pos.y + y1
|
||||||
|
else
|
||||||
|
-- Inner region, y range spans between inner and outer spheres
|
||||||
|
local R2 = MOB_SPAWN_ZONE_INNER
|
||||||
|
local y2 = math_sqrt( R2*R2 - d*d )
|
||||||
|
if goal_pos.y > pos. y then
|
||||||
|
-- Upper hemisphere
|
||||||
|
y_min = pos.y + y2
|
||||||
|
y_max = pos.y + y1
|
||||||
|
else
|
||||||
|
-- Lower hemisphere
|
||||||
|
y_min = pos.y - y1
|
||||||
|
y_max = pos.y - y2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
y_min = math_round(y_min)
|
||||||
|
y_max = math_round(y_max)
|
||||||
|
|
||||||
|
-- Limit total range of check to 32 nodes (maximum of 3 map blocks)
|
||||||
|
if y_max > goal_pos.y + 16 then
|
||||||
|
y_max = goal_pos.y + 16
|
||||||
|
end
|
||||||
|
if y_min < goal_pos.y - 16 then
|
||||||
|
y_min = goal_pos.y - 16
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Ask engine for valid spawn locations
|
||||||
|
local spawning_position_list = find_nodes_in_area_under_air(
|
||||||
|
{x = goal_pos.x, y = y_min, z = goal_pos.z},
|
||||||
|
{x = goal_pos.x, y = y_max, z = goal_pos.z},
|
||||||
|
{"group:solid", "group:water", "group:lava"}
|
||||||
|
) or {}
|
||||||
|
|
||||||
|
-- Select only the locations at a valid distance
|
||||||
|
local valid_positions = {}
|
||||||
|
for _,check_pos in ipairs(spawning_position_list) do
|
||||||
|
local dist = vector.distance(pos, check_pos)
|
||||||
|
if dist >= MOB_SPAWN_ZONE_INNER and dist <= MOB_SPAWN_ZONE_OUTER then
|
||||||
|
valid_positions[#valid_positions + 1] = check_pos
|
||||||
|
end
|
||||||
|
end
|
||||||
|
spawning_position_list = valid_positions
|
||||||
|
|
||||||
|
-- No valid locations, failed to find a position
|
||||||
|
if #spawning_position_list == 0 then
|
||||||
|
mcl_log("Spawning position isn't good. Do not spawn: " .. minetest.pos_to_string(goal_pos))
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Pick a random valid location
|
||||||
|
mcl_log("Spawning positions available: " .. minetest.pos_to_string(goal_pos))
|
||||||
|
return spawning_position_list[math_random(1, #spawning_position_list)]
|
||||||
end
|
end
|
||||||
|
|
||||||
--a simple helper function for mob_spawn
|
--a simple helper function for mob_spawn
|
||||||
|
@ -682,7 +762,29 @@ local function has_room(self,pos)
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
mcl_mobs.custom_biomecheck = nil
|
||||||
|
|
||||||
|
function mcl_mobs.register_custom_biomecheck(custom_biomecheck)
|
||||||
|
mcl_mobs.custom_biomecheck = custom_biomecheck
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function get_biome_name(pos)
|
||||||
|
if mcl_mobs.custom_biomecheck then
|
||||||
|
return mcl_mobs.custom_biomecheck (pos)
|
||||||
|
else
|
||||||
|
local gotten_biome = minetest.get_biome_data(pos)
|
||||||
|
|
||||||
|
if not gotten_biome then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
gotten_biome = mt_get_biome_name(gotten_biome.biome)
|
||||||
|
--minetest.log ("biome: " .. dump(gotten_biome))
|
||||||
|
|
||||||
|
return gotten_biome
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local function spawn_check(pos, spawn_def)
|
local function spawn_check(pos, spawn_def)
|
||||||
if not spawn_def or not pos then return end
|
if not spawn_def or not pos then return end
|
||||||
|
@ -692,11 +794,10 @@ local function spawn_check(pos, spawn_def)
|
||||||
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)
|
if not gotten_node then return end
|
||||||
|
|
||||||
if not gotten_node or not gotten_biome then return end
|
local biome_name = get_biome_name(pos)
|
||||||
|
if not biome_name then return end
|
||||||
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
|
||||||
if not is_ground then
|
if not is_ground then
|
||||||
|
@ -714,8 +815,9 @@ local function spawn_check(pos, spawn_def)
|
||||||
if pos.y >= spawn_def.min_height
|
if 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) then
|
and biome_check(spawn_def.biomes, biome_name) then
|
||||||
|
|
||||||
|
mcl_log("Spawn level 1 check - Passed")
|
||||||
if (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 (not is_farm_animal(spawn_def.name) or is_grass)
|
and (not is_farm_animal(spawn_def.name) or is_grass)
|
||||||
|
@ -725,6 +827,7 @@ local function spawn_check(pos, spawn_def)
|
||||||
and (spawn_def.check_position and spawn_def.check_position(pos) or spawn_def.check_position == nil)
|
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
|
and ( not spawn_protected or not minetest.is_protected(pos, "") ) then
|
||||||
|
|
||||||
|
mcl_log("Spawn level 2 check - Passed")
|
||||||
local gotten_light = get_node_light(pos)
|
local gotten_light = get_node_light(pos)
|
||||||
|
|
||||||
if modern_lighting then
|
if modern_lighting then
|
||||||
|
@ -875,8 +978,6 @@ minetest.register_chatcommand("spawn_mob",{
|
||||||
|
|
||||||
if mobs_spawn then
|
if mobs_spawn then
|
||||||
|
|
||||||
local perlin_noise
|
|
||||||
|
|
||||||
-- Get pos to spawn, x and z are randomised, y is range
|
-- Get pos to spawn, x and z are randomised, y is range
|
||||||
|
|
||||||
|
|
||||||
|
@ -935,47 +1036,33 @@ if mobs_spawn then
|
||||||
|
|
||||||
local function find_spawning_position(pos, max_times)
|
local function find_spawning_position(pos, max_times)
|
||||||
local spawning_position
|
local spawning_position
|
||||||
|
local max_loops = max_times or 1
|
||||||
local max_loops = 1
|
|
||||||
if max_times then max_loops = max_times end
|
|
||||||
|
|
||||||
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
|
while max_loops > 0 do
|
||||||
repeat
|
local spawning_position = get_next_mob_spawn_pos(pos)
|
||||||
local goal_pos = get_next_mob_spawn_pos(pos)
|
if spawning_position then return spawning_position end
|
||||||
|
max_loops = max_loops - 1
|
||||||
|
|
||||||
if math.abs(goal_pos.x) <= SPAWN_MAPGEN_LIMIT and math.abs(pos.y) <= SPAWN_MAPGEN_LIMIT and math.abs(goal_pos.z) <= SPAWN_MAPGEN_LIMIT then
|
end
|
||||||
local spawning_position_list = find_nodes_in_area_under_air(
|
return nil
|
||||||
{x = goal_pos.x, y = y_min, z = goal_pos.z},
|
end
|
||||||
{x = goal_pos.x, y = y_max, z = goal_pos.z},
|
|
||||||
{"group:solid", "group:water", "group:lava"}
|
|
||||||
)
|
|
||||||
if #spawning_position_list > 0 then
|
|
||||||
mcl_log("Spawning positions available: " .. minetest.pos_to_string(goal_pos))
|
|
||||||
spawning_position = spawning_position_list[math_random(1, #spawning_position_list)]
|
|
||||||
else
|
|
||||||
mcl_log("Spawning position isn't good. Do not spawn: " .. minetest.pos_to_string(goal_pos))
|
|
||||||
end
|
|
||||||
|
|
||||||
else
|
local cumulative_chance = nil
|
||||||
mcl_log("Pos outside mapgen limits: " .. minetest.pos_to_string(goal_pos))
|
local mob_library_worker_table = nil
|
||||||
|
local function initialize_spawn_data()
|
||||||
|
if not mob_library_worker_table then
|
||||||
|
mob_library_worker_table = table_copy(spawn_dictionary)
|
||||||
|
end
|
||||||
|
if not cumulative_chance then
|
||||||
|
cumulative_chance = 0
|
||||||
|
for k, v in pairs(mob_library_worker_table) do
|
||||||
|
cumulative_chance = cumulative_chance + v.chance
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
i = i + 1
|
|
||||||
if i >= max_loops then
|
|
||||||
mcl_log("Cancel finding spawn positions at: " .. max_loops)
|
|
||||||
break
|
|
||||||
end
|
|
||||||
until spawning_position
|
|
||||||
return spawning_position
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function spawn_a_mob(pos, cap_space_hostile, cap_space_non_hostile)
|
local function spawn_a_mob(pos, cap_space_hostile, cap_space_non_hostile)
|
||||||
--create a disconnected clone of the spawn dictionary, prevents memory leak
|
|
||||||
local mob_library_worker_table = table_copy(spawn_dictionary)
|
|
||||||
|
|
||||||
local spawning_position = find_spawning_position(pos, FIND_SPAWN_POS_RETRIES)
|
local spawning_position = find_spawning_position(pos, FIND_SPAWN_POS_RETRIES)
|
||||||
if not spawning_position then
|
if not spawning_position then
|
||||||
|
@ -988,22 +1075,25 @@ if mobs_spawn then
|
||||||
--output_mob_stats(mob_counts_wide)
|
--output_mob_stats(mob_counts_wide)
|
||||||
|
|
||||||
--grab mob that fits into the spawning location
|
--grab mob that fits into the spawning location
|
||||||
--randomly grab a mob, don't exclude any possibilities
|
--use random weighted choice with replacement to grab a mob, don't exclude any possibilities
|
||||||
perlin_noise = perlin_noise or minetest_get_perlin(noise_params)
|
--shuffle table once every loop to provide equal inclusion probability to all mobs
|
||||||
local noise = perlin_noise:get_3d(spawning_position)
|
--repeat grabbing a mob to maintain existing spawn rates
|
||||||
local current_summary_chance = summary_chance
|
local spawn_loop_counter = #mob_library_worker_table
|
||||||
|
|
||||||
table.shuffle(mob_library_worker_table)
|
while spawn_loop_counter > 0 do
|
||||||
|
table.shuffle(mob_library_worker_table)
|
||||||
while #mob_library_worker_table > 0 do
|
local mob_chance_offset = math_random(1, cumulative_chance)
|
||||||
local mob_chance_offset = (math_round(noise * current_summary_chance + 12345) % current_summary_chance) + 1
|
|
||||||
local mob_index = 1
|
local mob_index = 1
|
||||||
local mob_chance = mob_library_worker_table[mob_index].chance
|
local mob_chance = mob_library_worker_table[mob_index].chance
|
||||||
local step_chance = mob_chance
|
local step_chance = mob_chance
|
||||||
while step_chance < mob_chance_offset do
|
while step_chance < mob_chance_offset do
|
||||||
mob_index = mob_index + 1
|
mob_index = mob_index + 1
|
||||||
mob_chance = mob_library_worker_table[mob_index].chance
|
if mob_index <= #mob_library_worker_table then
|
||||||
step_chance = step_chance + mob_chance
|
mob_chance = mob_library_worker_table[mob_index].chance
|
||||||
|
step_chance = step_chance + mob_chance
|
||||||
|
else
|
||||||
|
break
|
||||||
|
end
|
||||||
end
|
end
|
||||||
--minetest.log(mob_def.name.." "..step_chance.. " "..mob_chance)
|
--minetest.log(mob_def.name.." "..step_chance.. " "..mob_chance)
|
||||||
|
|
||||||
|
@ -1088,8 +1178,7 @@ if mobs_spawn then
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
current_summary_chance = current_summary_chance - mob_chance
|
spawn_loop_counter = spawn_loop_counter - 1
|
||||||
table_remove(mob_library_worker_table, mob_index)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -1101,6 +1190,7 @@ if mobs_spawn then
|
||||||
|
|
||||||
timer = timer + dtime
|
timer = timer + dtime
|
||||||
if timer < WAIT_FOR_SPAWN_ATTEMPT then return end
|
if timer < WAIT_FOR_SPAWN_ATTEMPT then return end
|
||||||
|
initialize_spawn_data()
|
||||||
timer = 0
|
timer = 0
|
||||||
|
|
||||||
local players = get_connected_players()
|
local players = get_connected_players()
|
||||||
|
@ -1181,7 +1271,6 @@ function mob_class:check_despawn(pos, dtime)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
minetest.register_chatcommand("mobstats",{
|
minetest.register_chatcommand("mobstats",{
|
||||||
privs = { debug = true },
|
privs = { debug = true },
|
||||||
func = function(n,param)
|
func = function(n,param)
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
# textdomain:mcl_paintings
|
||||||
|
Painting=Quadre
|
|
@ -1,4 +1,4 @@
|
||||||
name = mcl_wither_spawning
|
name = mcl_wither_spawning
|
||||||
description = Wither Spawning for MineClone2
|
description = Wither Spawning for VoxeLibre
|
||||||
author = Fleckenstein
|
author = Fleckenstein
|
||||||
depends = mobs_mc, mcl_heads
|
depends = mobs_mc, mcl_heads
|
||||||
|
|
|
@ -305,6 +305,9 @@ Origin of those models:
|
||||||
* `mobs_mc_rabbit_random.*.ogg` (CC0)
|
* `mobs_mc_rabbit_random.*.ogg` (CC0)
|
||||||
* Changes were made.
|
* Changes were made.
|
||||||
* Source: <https://freesound.org/people/Alshred/>
|
* Source: <https://freesound.org/people/Alshred/>
|
||||||
|
* [epCode]
|
||||||
|
* `extra_mobs_hoglin*.ogg` (LGPL 3.0)
|
||||||
|
* Source: <https://git.minetest.land/epCode/extra_mobs/src/branch/master/sounds>
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
|
|
@ -33,11 +33,11 @@ This mod adds mobs which closely resemble the mobs from the game Minecraft, vers
|
||||||
* Husk
|
* Husk
|
||||||
* Skeleton
|
* Skeleton
|
||||||
* Stray
|
* Stray
|
||||||
* Creeper
|
* Stalker
|
||||||
* Slime
|
* Slime
|
||||||
* Spider
|
* Spider
|
||||||
* Cave Spider
|
* Cave Spider
|
||||||
* Enderman
|
* Rover
|
||||||
* Zombie Villager
|
* Zombie Villager
|
||||||
* Zombie Piglin
|
* Zombie Piglin
|
||||||
* Wither Skeleton
|
* Wither Skeleton
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
local S = minetest.get_translator(minetest.get_current_modname())
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
local axolotl = {
|
local axolotl = {
|
||||||
|
description = S("Axolotl"),
|
||||||
type = "animal",
|
type = "animal",
|
||||||
spawn_class = "axolotl",
|
spawn_class = "axolotl",
|
||||||
can_despawn = true,
|
can_despawn = true,
|
||||||
|
@ -171,7 +172,7 @@ mcl_mobs:spawn_specific(
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
30,
|
30,
|
||||||
4000,
|
100,
|
||||||
3,
|
3,
|
||||||
water-16,
|
water-16,
|
||||||
water+1)
|
water+1)
|
||||||
|
|
|
@ -150,7 +150,7 @@ mcl_mobs:spawn_specific(
|
||||||
0,
|
0,
|
||||||
maxlight,
|
maxlight,
|
||||||
20,
|
20,
|
||||||
5000,
|
100,
|
||||||
2,
|
2,
|
||||||
mcl_vars.mg_overworld_min,
|
mcl_vars.mg_overworld_min,
|
||||||
mobs_mc.water_level-1)
|
mobs_mc.water_level-1)
|
||||||
|
|
|
@ -151,7 +151,7 @@ mcl_mobs:spawn_specific(
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
30,
|
30,
|
||||||
5000,
|
1000,
|
||||||
3,
|
3,
|
||||||
mcl_vars.mg_nether_min,
|
mcl_vars.mg_nether_min,
|
||||||
mcl_vars.mg_nether_max)
|
mcl_vars.mg_nether_max)
|
||||||
|
|
|
@ -157,7 +157,7 @@ mcl_mobs:spawn_specific(
|
||||||
},
|
},
|
||||||
9,
|
9,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
30, 17000,
|
30, 100,
|
||||||
3,
|
3,
|
||||||
mobs_mc.water_level,
|
mobs_mc.water_level,
|
||||||
mcl_vars.mg_overworld_max)
|
mcl_vars.mg_overworld_max)
|
||||||
|
|
|
@ -30,6 +30,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
--###################
|
--###################
|
||||||
|
|
||||||
local cod = {
|
local cod = {
|
||||||
|
description = S("Cod"),
|
||||||
type = "animal",
|
type = "animal",
|
||||||
spawn_class = "water_ambient",
|
spawn_class = "water_ambient",
|
||||||
can_despawn = true,
|
can_despawn = true,
|
||||||
|
@ -266,7 +267,7 @@ mcl_mobs:spawn_specific(
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
30,
|
30,
|
||||||
4000,
|
750,
|
||||||
3,
|
3,
|
||||||
water-16,
|
water-16,
|
||||||
water+1)
|
water+1)
|
||||||
|
|
|
@ -122,6 +122,7 @@ mooshroom_def.on_rightclick = function(self, clicker)
|
||||||
|
|
||||||
if not minetest.is_creative_enabled(clicker:get_player_name()) then
|
if not minetest.is_creative_enabled(clicker:get_player_name()) then
|
||||||
item:add_wear(mobs_mc.shears_wear)
|
item:add_wear(mobs_mc.shears_wear)
|
||||||
|
tt.reload_itemstack_description(item) -- update tooltip
|
||||||
clicker:get_inventory():set_stack("main", clicker:get_wield_index(), item)
|
clicker:get_inventory():set_stack("main", clicker:get_wield_index(), item)
|
||||||
end
|
end
|
||||||
-- Use bucket to milk
|
-- Use bucket to milk
|
||||||
|
@ -207,7 +208,7 @@ mcl_mobs:spawn_specific(
|
||||||
9,
|
9,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
30,
|
30,
|
||||||
17000,
|
80,
|
||||||
10,
|
10,
|
||||||
mobs_mc.water_level,
|
mobs_mc.water_level,
|
||||||
mcl_vars.mg_overworld_max)
|
mcl_vars.mg_overworld_max)
|
||||||
|
@ -225,7 +226,7 @@ mcl_mobs:spawn_specific(
|
||||||
9,
|
9,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
30,
|
30,
|
||||||
17000,
|
80,
|
||||||
5,
|
5,
|
||||||
mcl_vars.mg_overworld_min,
|
mcl_vars.mg_overworld_min,
|
||||||
mcl_vars.mg_overworld_max)
|
mcl_vars.mg_overworld_max)
|
||||||
|
|
|
@ -30,6 +30,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
--###################
|
--###################
|
||||||
|
|
||||||
local dolphin = {
|
local dolphin = {
|
||||||
|
description = S("Dolphin"),
|
||||||
type = "animal",
|
type = "animal",
|
||||||
spawn_class = "water",
|
spawn_class = "water",
|
||||||
can_despawn = true,
|
can_despawn = true,
|
||||||
|
@ -244,7 +245,7 @@ mcl_mobs:spawn_specific(
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
30,
|
30,
|
||||||
4000,
|
70,
|
||||||
3,
|
3,
|
||||||
water-16,
|
water-16,
|
||||||
water+1)
|
water+1)
|
||||||
|
|
|
@ -20,7 +20,7 @@ mcl_mobs.register_mob("mobs_mc:ghast", {
|
||||||
hp_max = 10,
|
hp_max = 10,
|
||||||
xp_min = 5,
|
xp_min = 5,
|
||||||
xp_max = 5,
|
xp_max = 5,
|
||||||
collisionbox = {-2, 5, -2, 2, 9, 2},
|
collisionbox = {-2, 0, -2, 2, 4, 2, rotate=true},
|
||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "mobs_mc_ghast.b3d",
|
mesh = "mobs_mc_ghast.b3d",
|
||||||
spawn_in_group = 1,
|
spawn_in_group = 1,
|
||||||
|
@ -33,7 +33,7 @@ mcl_mobs.register_mob("mobs_mc:ghast", {
|
||||||
death = "mobs_mc_zombie_death",
|
death = "mobs_mc_zombie_death",
|
||||||
attack = "mobs_fireball",
|
attack = "mobs_fireball",
|
||||||
random = "mobs_eerie",
|
random = "mobs_eerie",
|
||||||
distance = 16,
|
distance = 80,
|
||||||
-- TODO: damage
|
-- TODO: damage
|
||||||
-- TODO: better death
|
-- TODO: better death
|
||||||
},
|
},
|
||||||
|
@ -50,11 +50,11 @@ mcl_mobs.register_mob("mobs_mc:ghast", {
|
||||||
run_start = 0, run_end = 40,
|
run_start = 0, run_end = 40,
|
||||||
},
|
},
|
||||||
fall_damage = 0,
|
fall_damage = 0,
|
||||||
view_range = 100,
|
view_range = 64,
|
||||||
attack_type = "dogshoot",
|
attack_type = "dogshoot",
|
||||||
arrow = "mobs_mc:fireball",
|
arrow = "mobs_mc:fireball",
|
||||||
shoot_interval = 3.5,
|
shoot_interval = 5,
|
||||||
shoot_offset = -5,
|
shoot_offset = -0.5,
|
||||||
dogshoot_switch = 1,
|
dogshoot_switch = 1,
|
||||||
dogshoot_count_max =1,
|
dogshoot_count_max =1,
|
||||||
passive = false,
|
passive = false,
|
||||||
|
@ -97,7 +97,7 @@ mcl_mobs:spawn_specific(
|
||||||
0,
|
0,
|
||||||
7,
|
7,
|
||||||
30,
|
30,
|
||||||
72000,
|
400,
|
||||||
2,
|
2,
|
||||||
mcl_vars.mg_nether_min,
|
mcl_vars.mg_nether_min,
|
||||||
mcl_vars.mg_nether_max)
|
mcl_vars.mg_nether_max)
|
||||||
|
@ -107,8 +107,9 @@ mcl_mobs.register_arrow("mobs_mc:fireball", {
|
||||||
visual = "sprite",
|
visual = "sprite",
|
||||||
visual_size = {x = 1, y = 1},
|
visual_size = {x = 1, y = 1},
|
||||||
textures = {"mcl_fire_fire_charge.png"},
|
textures = {"mcl_fire_fire_charge.png"},
|
||||||
velocity = 15,
|
velocity = 5,
|
||||||
collisionbox = {-.5, -.5, -.5, .5, .5, .5},
|
collisionbox = {-.5, -.5, -.5, .5, .5, .5},
|
||||||
|
_lifetime = 10,
|
||||||
_is_fireball = true,
|
_is_fireball = true,
|
||||||
|
|
||||||
hit_player = function(self, player)
|
hit_player = function(self, player)
|
||||||
|
@ -125,11 +126,16 @@ mcl_mobs.register_arrow("mobs_mc:fireball", {
|
||||||
end,
|
end,
|
||||||
|
|
||||||
hit_mob = function(self, mob)
|
hit_mob = function(self, mob)
|
||||||
|
local name = mob:get_luaentity().name
|
||||||
mob:punch(self.object, 1.0, {
|
mob:punch(self.object, 1.0, {
|
||||||
full_punch_interval = 1.0,
|
full_punch_interval = 1.0,
|
||||||
damage_groups = {fleshy = 6},
|
damage_groups = {fleshy = 6},
|
||||||
}, nil)
|
}, nil)
|
||||||
mcl_mobs.mob_class.boom(self,self.object:get_pos(), 1, true)
|
mcl_mobs.mob_class.boom(self,self.object:get_pos(), 1, true)
|
||||||
|
local ent = mob:get_luaentity()
|
||||||
|
if (not ent or ent.health <= 0) and self._puncher and name == "mobs_mc:ghast" then
|
||||||
|
awards.unlock(self._puncher:get_player_name(), "mcl:fireball_redir_serv")
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
hit_node = function(self, pos, node)
|
hit_node = function(self, pos, node)
|
||||||
|
|
|
@ -30,6 +30,7 @@ for i=1,4 do
|
||||||
end
|
end
|
||||||
|
|
||||||
mcl_mobs.register_mob("mobs_mc:glow_squid", {
|
mcl_mobs.register_mob("mobs_mc:glow_squid", {
|
||||||
|
description = S("Glow Squid"),
|
||||||
type = "animal",
|
type = "animal",
|
||||||
spawn_class = "water_underground",
|
spawn_class = "water_underground",
|
||||||
can_despawn = true,
|
can_despawn = true,
|
||||||
|
@ -237,7 +238,7 @@ mcl_mobs:spawn_specific(
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX + 1,
|
minetest.LIGHT_MAX + 1,
|
||||||
30,
|
30,
|
||||||
10000,
|
100,
|
||||||
3,
|
3,
|
||||||
water - 16,
|
water - 16,
|
||||||
water)
|
water)
|
||||||
|
|
|
@ -99,9 +99,7 @@ mcl_mobs.register_mob("mobs_mc:guardian", {
|
||||||
view_range = 16,
|
view_range = 16,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Spawning disabled due to size issues
|
mcl_mobs:spawn_specific("mobs_mc:guardian", { "mcl_core:water_source", "mclx_core:river_water_source" }, { "mcl_core:water_source", "mclx_core:river_water_source" }, 0, minetest.LIGHT_MAX+1, 30, 25000, 2, mcl_vars.mg_overworld_min, mobs_mc.water_level - 10, mobs_mc.water_level)
|
||||||
-- TODO: Re-enable spawning
|
|
||||||
--mcl_mobs:spawn_specific("mobs_mc:guardian", { "mcl_core:water_source", "mclx_core:river_water_source" }, { "mcl_core:water_source", "mclx_core:river_water_source" }, 0, minetest.LIGHT_MAX+1, 30, 25000, 2, mcl_vars.mg_overworld_min, mobs_mc.water_level - 10)
|
|
||||||
mcl_mobs:non_spawn_specific("mobs_mc:guardian","overworld",0,minetest.LIGHT_MAX+1)
|
mcl_mobs:non_spawn_specific("mobs_mc:guardian","overworld",0,minetest.LIGHT_MAX+1)
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs.register_egg("mobs_mc:guardian", S("Guardian"), "#5a8272", "#f17d31", 0)
|
mcl_mobs.register_egg("mobs_mc:guardian", S("Guardian"), "#5a8272", "#f17d31", 0)
|
||||||
|
|
|
@ -105,11 +105,14 @@ mcl_mobs.register_mob("mobs_mc:guardian_elder", {
|
||||||
fly_in = { "mcl_core:water_source", "mclx_core:river_water_source" },
|
fly_in = { "mcl_core:water_source", "mclx_core:river_water_source" },
|
||||||
jump = false,
|
jump = false,
|
||||||
view_range = 16,
|
view_range = 16,
|
||||||
|
dealt_effect = {
|
||||||
|
name = "fatigue",
|
||||||
|
level = 3,
|
||||||
|
dur = 30,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
-- Spawning disabled due to size issues <- what do you mean? -j4i
|
mcl_mobs:spawn_specific("mobs_mc:guardian_elder", { "mcl_core:water_source", "mclx_core:river_water_source" }, { "mcl_core:water_source", "mclx_core:river_water_source" }, 0, minetest.LIGHT_MAX+1, 30, 40000, 2, mcl_vars.mg_overworld_min, mobs_mc.water_level-18, mobs_mc.water_level)
|
||||||
-- TODO: Re-enable spawning
|
|
||||||
-- mcl_mobs:spawn_specific("mobs_mc:guardian_elder", { "mcl_core:water_source", "mclx_core:river_water_source" }, { "mcl_core:water_source", "mclx_core:river_water_source" }, 0, minetest.LIGHT_MAX+1, 30, 40000, 2, mcl_vars.mg_overworld_min, mobs_mc.water_level-18)
|
|
||||||
|
|
||||||
-- spawn eggs
|
-- spawn eggs
|
||||||
mcl_mobs.register_egg("mobs_mc:guardian_elder", S("Elder Guardian"), "#ceccba", "#747693", 0)
|
mcl_mobs.register_egg("mobs_mc:guardian_elder", S("Elder Guardian"), "#ceccba", "#747693", 0)
|
||||||
|
|
|
@ -31,8 +31,9 @@ local hoglin = {
|
||||||
} },
|
} },
|
||||||
visual_size = {x=3, y=3},
|
visual_size = {x=3, y=3},
|
||||||
sounds = {
|
sounds = {
|
||||||
random = "extra_mobs_hoglin",
|
random = "extra_mobs_hoglin.1",
|
||||||
damage = "extra_mobs_hoglin_hurt",
|
damage = "extra_mobs_hoglin_hurt",
|
||||||
|
death = "extra_mobs_hoglin_hurt",
|
||||||
distance = 16,
|
distance = 16,
|
||||||
},
|
},
|
||||||
jump = true,
|
jump = true,
|
||||||
|
@ -92,6 +93,12 @@ local zoglin = table.copy(hoglin)
|
||||||
zoglin.description = S("Zoglin")
|
zoglin.description = S("Zoglin")
|
||||||
zoglin.fire_resistant = 1
|
zoglin.fire_resistant = 1
|
||||||
zoglin.textures = {"extra_mobs_zoglin.png"}
|
zoglin.textures = {"extra_mobs_zoglin.png"}
|
||||||
|
sounds = {
|
||||||
|
random = "extra_mobs_hoglin.2",
|
||||||
|
damage = "extra_mobs_hoglin_hurt",
|
||||||
|
death = "extra_mobs_hoglin_hurt",
|
||||||
|
distance = 16,
|
||||||
|
}
|
||||||
zoglin.do_custom = function()
|
zoglin.do_custom = function()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -129,7 +136,7 @@ mcl_mobs:spawn_specific(
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
30,
|
30,
|
||||||
6000,
|
200,
|
||||||
3,
|
3,
|
||||||
mcl_vars.mg_nether_min,
|
mcl_vars.mg_nether_min,
|
||||||
mcl_vars.mg_nether_max)
|
mcl_vars.mg_nether_max)
|
||||||
|
|
|
@ -122,10 +122,10 @@ local horse = {
|
||||||
stand_speed = 25,
|
stand_speed = 25,
|
||||||
stand_start = 0,
|
stand_start = 0,
|
||||||
stand_end = 0,
|
stand_end = 0,
|
||||||
walk_speed = 25,
|
walk_speed = 100,
|
||||||
walk_start = 0,
|
walk_start = 0,
|
||||||
walk_end = 40,
|
walk_end = 40,
|
||||||
run_speed = 60,
|
run_speed = 200,
|
||||||
run_start = 0,
|
run_start = 0,
|
||||||
run_end = 40,
|
run_end = 40,
|
||||||
},
|
},
|
||||||
|
@ -543,11 +543,6 @@ donkey.description = S("Donkey")
|
||||||
donkey.textures = {{"blank.png", "mobs_mc_donkey.png", "blank.png"}}
|
donkey.textures = {{"blank.png", "mobs_mc_donkey.png", "blank.png"}}
|
||||||
donkey.spawn_in_group = 3
|
donkey.spawn_in_group = 3
|
||||||
donkey.spawn_in_group_min = 1
|
donkey.spawn_in_group_min = 1
|
||||||
donkey.animation = {
|
|
||||||
speed_normal = 25,
|
|
||||||
stand_start = 0, stand_end = 0,
|
|
||||||
walk_start = 0, walk_end = 40,
|
|
||||||
}
|
|
||||||
donkey.sounds = {
|
donkey.sounds = {
|
||||||
random = "mobs_mc_donkey_random",
|
random = "mobs_mc_donkey_random",
|
||||||
damage = "mobs_mc_donkey_hurt",
|
damage = "mobs_mc_donkey_hurt",
|
||||||
|
@ -609,7 +604,7 @@ mcl_mobs:spawn_specific(
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
30,
|
30,
|
||||||
15000,
|
40,
|
||||||
4,
|
4,
|
||||||
mobs_mc.water_level+3,
|
mobs_mc.water_level+3,
|
||||||
mcl_vars.mg_overworld_max)
|
mcl_vars.mg_overworld_max)
|
||||||
|
@ -632,7 +627,7 @@ mcl_mobs:spawn_specific(
|
||||||
9,
|
9,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
30,
|
30,
|
||||||
15000,
|
10,
|
||||||
4,
|
4,
|
||||||
mobs_mc.water_level+3,
|
mobs_mc.water_level+3,
|
||||||
mcl_vars.mg_overworld_max)
|
mcl_vars.mg_overworld_max)
|
||||||
|
|
|
@ -124,9 +124,7 @@ dofile(path .. "/witch.lua") -- Mesh and animation by toby109tt / https://githu
|
||||||
|
|
||||||
--Monsters
|
--Monsters
|
||||||
dofile(path .. "/blaze.lua") -- Animation by daufinsyd
|
dofile(path .. "/blaze.lua") -- Animation by daufinsyd
|
||||||
dofile(path .. "/creeper.lua") -- Mesh by Morn76 Animation by Pavel_S
|
|
||||||
dofile(path .. "/ender_dragon.lua") -- Mesh and animation by toby109tt / https://github.com/22i
|
dofile(path .. "/ender_dragon.lua") -- Mesh and animation by toby109tt / https://github.com/22i
|
||||||
dofile(path .. "/enderman.lua") -- Mesh and animation by toby109tt / https://github.com/22i
|
|
||||||
dofile(path .. "/endermite.lua") -- Mesh and animation by toby109tt / https://github.com/22i
|
dofile(path .. "/endermite.lua") -- Mesh and animation by toby109tt / https://github.com/22i
|
||||||
dofile(path .. "/villager_illusioner.lua") -- Mesh and animation by toby109tt / https://github.com/22i
|
dofile(path .. "/villager_illusioner.lua") -- Mesh and animation by toby109tt / https://github.com/22i
|
||||||
dofile(path .. "/ghast.lua") -- maikerumine
|
dofile(path .. "/ghast.lua") -- maikerumine
|
||||||
|
@ -134,10 +132,12 @@ dofile(path .. "/guardian.lua") -- maikerumine Mesh and animation by toby109tt
|
||||||
dofile(path .. "/guardian_elder.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i
|
dofile(path .. "/guardian_elder.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i
|
||||||
dofile(path .. "/snowman.lua")
|
dofile(path .. "/snowman.lua")
|
||||||
dofile(path .. "/iron_golem.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i
|
dofile(path .. "/iron_golem.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i
|
||||||
|
dofile(path .. "/rover.lua") -- Mesh and Animation by Herowl
|
||||||
dofile(path .. "/shulker.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i
|
dofile(path .. "/shulker.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i
|
||||||
dofile(path .. "/silverfish.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i
|
dofile(path .. "/silverfish.lua") -- maikerumine Mesh and animation by toby109tt / https://github.com/22i
|
||||||
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 .. "/stalker.lua") -- Mesh and Animation by Herowl
|
||||||
dofile(path .. "/zombie.lua") -- Mesh by Morn76 Animation by Pavel_S
|
dofile(path .. "/zombie.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)
|
||||||
|
|
|
@ -291,7 +291,7 @@ mcl_mobs:spawn_specific(
|
||||||
0,
|
0,
|
||||||
minetest.LIGHT_MAX+1,
|
minetest.LIGHT_MAX+1,
|
||||||
30,
|
30,
|
||||||
15000,
|
50,
|
||||||
5,
|
5,
|
||||||
mobs_mc.water_level+15,
|
mobs_mc.water_level+15,
|
||||||
mcl_vars.mg_overworld_max)
|
mcl_vars.mg_overworld_max)
|
||||||
|
|
|
@ -5,7 +5,7 @@ Blaze=Lohe
|
||||||
Chicken=Huhn
|
Chicken=Huhn
|
||||||
Cow=Kuh
|
Cow=Kuh
|
||||||
Mooshroom=Pilzkuh
|
Mooshroom=Pilzkuh
|
||||||
Creeper=Creeper
|
Stalker=Stalker
|
||||||
Ender Dragon=Enderdrache
|
Ender Dragon=Enderdrache
|
||||||
Enderman=Enderman
|
Enderman=Enderman
|
||||||
Endermite=Endermilbe
|
Endermite=Endermilbe
|
||||||
|
|
|
@ -6,7 +6,7 @@ Blaze=Blaze
|
||||||
Chicken=Kylling
|
Chicken=Kylling
|
||||||
Cow=Ko
|
Cow=Ko
|
||||||
Mooshroom=Svamp
|
Mooshroom=Svamp
|
||||||
Creeper=Creeper
|
Stalker=Stalker
|
||||||
Ender Dragon=Enderdrage
|
Ender Dragon=Enderdrage
|
||||||
Enderman=Enderman
|
Enderman=Enderman
|
||||||
Endermite=Endermide
|
Endermite=Endermide
|
||||||
|
|
|
@ -5,7 +5,7 @@ Chicken=Pollo
|
||||||
Cod=Bacalao
|
Cod=Bacalao
|
||||||
Cow=Vaca
|
Cow=Vaca
|
||||||
Mooshroom=Champivaca
|
Mooshroom=Champivaca
|
||||||
Creeper=Creeper
|
Stalker=Stalker
|
||||||
Dolphin=Delfín
|
Dolphin=Delfín
|
||||||
Ender Dragon=Ender Dragon
|
Ender Dragon=Ender Dragon
|
||||||
Enderman=Enderman
|
Enderman=Enderman
|
||||||
|
|
|
@ -6,7 +6,7 @@ Blaze=Blaze
|
||||||
Chicken=Poulet
|
Chicken=Poulet
|
||||||
Cow=Vache
|
Cow=Vache
|
||||||
Mooshroom=Champimeuh
|
Mooshroom=Champimeuh
|
||||||
Creeper=Creeper
|
Stalker=Stalker
|
||||||
Ender Dragon=Ender Dragon
|
Ender Dragon=Ender Dragon
|
||||||
Enderman=Enderman
|
Enderman=Enderman
|
||||||
Endermite=Endermite
|
Endermite=Endermite
|
||||||
|
|
|
@ -0,0 +1,73 @@
|
||||||
|
# textdomain: mobs_mc
|
||||||
|
Agent=Agent
|
||||||
|
Axolotl=Axolòtl
|
||||||
|
Bat=Ratapenada
|
||||||
|
Blaze=Flamor
|
||||||
|
Chicken=Polet
|
||||||
|
Cow=Vacha
|
||||||
|
Mooshroom=Vachairòla
|
||||||
|
Stalker=Stalker
|
||||||
|
Ender Dragon=Dragon de Finuèit
|
||||||
|
Enderman=Finuèairi
|
||||||
|
Endermite=Finuèibau
|
||||||
|
Ghast=Òrra
|
||||||
|
Elder Guardian=Ancian Gardian
|
||||||
|
Guardian=Gardian
|
||||||
|
Horse=Ega
|
||||||
|
Skeleton Horse=Ega Squeleta
|
||||||
|
Zombie Horse=Ega Zombia
|
||||||
|
Donkey=Asne
|
||||||
|
Mule=Miule
|
||||||
|
Iron Golem=Golem de Fèrre
|
||||||
|
Llama=Lamà
|
||||||
|
Ocelot=Ocelòt
|
||||||
|
Parrot=Papagai
|
||||||
|
Pig=Cochon
|
||||||
|
Polar Bear=Ors Blanc
|
||||||
|
Rabbit=Lapin
|
||||||
|
Killer Bunny=Lapin Tuaire
|
||||||
|
Sheep=Moton
|
||||||
|
Shulker=Coirafin
|
||||||
|
Silverfish=Peiçon d'Argent
|
||||||
|
Skeleton=Squeleta
|
||||||
|
Stray=Trainabiaça
|
||||||
|
Wither Skeleton=Squeleta Sechaire
|
||||||
|
Magma Cube=Cube de Magmà
|
||||||
|
Slime=Slime
|
||||||
|
Snow Golem=Golem d'Ivèrn
|
||||||
|
Spider=Aranha
|
||||||
|
Cave Spider=Aranha Venimósa
|
||||||
|
Squid=Pofre
|
||||||
|
Vex=Vex
|
||||||
|
Evoker=Invocataire
|
||||||
|
Illusioner=Fisiciaire
|
||||||
|
Villager=Vialatgés
|
||||||
|
Vindicator=Vindicataire
|
||||||
|
Zombie Villager=Vialatgés Zombia
|
||||||
|
Witch=Fachinèira
|
||||||
|
Wither=Le Sechaire
|
||||||
|
Wolf=Lop
|
||||||
|
Husk=Zombia Momificat
|
||||||
|
Zombie=Zombia
|
||||||
|
Zombie Piglin=Porcadés Zombia
|
||||||
|
Farmer=Boriaire
|
||||||
|
Fisherman=Peschaire
|
||||||
|
Fletcher=Archèir
|
||||||
|
Shepherd=Bergèir
|
||||||
|
Librarian=Bibliotecaire
|
||||||
|
Cartographer=Cartografe
|
||||||
|
Armorer=Armurèir
|
||||||
|
Leatherworker=Tanaire
|
||||||
|
Butcher=Maselèir
|
||||||
|
Weapon Smith=Farjaire d'Armas
|
||||||
|
Tool Smith=Farjaire d'Otilhs
|
||||||
|
Cleric=Clerc
|
||||||
|
Nitwit=Simple
|
||||||
|
Cod=Merluça
|
||||||
|
Salmon=Saumon
|
||||||
|
Dolphin=Daufin
|
||||||
|
Pillager=Pilhard
|
||||||
|
Tropical fish=Peiçon tropicau
|
||||||
|
Hoglin=Porcard
|
||||||
|
Strider=Trèva
|
||||||
|
Glow Squid=Pofre Lusent
|
|
@ -6,7 +6,7 @@ Blaze=Blaze
|
||||||
Chicken=Galinha
|
Chicken=Galinha
|
||||||
Cow=Vaca
|
Cow=Vaca
|
||||||
Mooshroom=Coguvaca
|
Mooshroom=Coguvaca
|
||||||
Creeper=Creeper
|
Stalker=Stalker
|
||||||
Ender Dragon=Dragão do Fim
|
Ender Dragon=Dragão do Fim
|
||||||
Enderman=Enderman
|
Enderman=Enderman
|
||||||
Endermite=Endermite
|
Endermite=Endermite
|
||||||
|
|
|
@ -6,7 +6,7 @@ Blaze=Ифрит
|
||||||
Chicken=Курица
|
Chicken=Курица
|
||||||
Cow=Корова
|
Cow=Корова
|
||||||
Mooshroom=Грибная корова
|
Mooshroom=Грибная корова
|
||||||
Creeper=Крипер
|
Stalker=Сталкер
|
||||||
Ender Dragon=Дракон Края
|
Ender Dragon=Дракон Края
|
||||||
Enderman=Эндермен
|
Enderman=Эндермен
|
||||||
Endermite=Эндермит
|
Endermite=Эндермит
|
||||||
|
|
|
@ -6,7 +6,7 @@ Blaze=
|
||||||
Chicken=
|
Chicken=
|
||||||
Cow=
|
Cow=
|
||||||
Mooshroom=
|
Mooshroom=
|
||||||
Creeper=
|
Stalker=
|
||||||
Ender Dragon=
|
Ender Dragon=
|
||||||
Enderman=
|
Enderman=
|
||||||
Endermite=
|
Endermite=
|
||||||
|
|