Compare commits

..

349 Commits

Author SHA1 Message Date
cora 14cba8197e Merge pull request 'Clearmobs: clear empty nametagged as well as nil (#2429)' (#2433) from fix_clearmobs_horses into master
Reviewed-on: MineClone2/MineClone2#2433
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-15 11:54:03 +00:00
cora aab3180269 clear empty nametag as well as nil 2022-07-15 04:40:12 +02:00
PrairieWind 1a53c4081f Merge pull request 'Add soul lantern recipe' (#2425) from soul_lantern_recipe into master
Reviewed-on: MineClone2/MineClone2#2425
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
Reviewed-by: PrairieWind <prairie.astronomer1@gmail.com>
2022-07-14 15:38:27 +00:00
cora e271e87aca fix indentation 2022-07-14 17:32:43 +02:00
cora dae4a99a85 Add soul lantern recipe 2022-07-14 15:39:37 +02:00
cora 18e90cc766 Merge pull request 'Add ruined portals' (#2423) from ruined_portals into master
Reviewed-on: MineClone2/MineClone2#2423
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-14 11:52:37 +00:00
cora 455fac9350 Add schematics by RandomLegoBrick and PrarieWind 2022-07-14 13:51:46 +02:00
cora 8cad4a6886 Add ruined portals 2022-07-14 13:38:20 +02:00
cora 5d2ffb36f2 Merge pull request 'Add fallen tree logs' (#2422) from fallen_logs into master
Reviewed-on: MineClone2/MineClone2#2422
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-14 05:03:56 +00:00
cora 931cb2b991 Add fallen tree logs 2022-07-14 06:59:47 +02:00
cora a7302882af Merge pull request 'Never spawn mobs on leaves' (#2421) from no_leaf_spawning into master
Reviewed-on: MineClone2/MineClone2#2421
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-14 04:59:02 +00:00
cora 9e60d24fe0 Never spawn mobs on leaves 2022-07-13 16:45:41 +02:00
cora 825da03ba3 Merge pull request 'Fix wither dupe' (#2417) from fix_wither_dupe into master
Reviewed-on: MineClone2/MineClone2#2417
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-12 22:51:00 +00:00
cora 8d9c5059f3 Fix wither dupe
faulty on_place would not removed placed wither skelly head from
inv. This also prevents the execution of the schematic checking
routine if there is no soul sand under the head.
2022-07-12 23:11:00 +02:00
PrairieWind 7323536e55 Merge pull request 'Spawn mobs in woodland cabin' (#2415) from woodland_spawn into master
Reviewed-on: MineClone2/MineClone2#2415
2022-07-12 00:55:59 +00:00
cora 2b835221a7 Make them spawn at (somewhat) random positions 2022-07-12 01:30:41 +02:00
cora 571c57e891 Add updated woodland outpost schematic 2022-07-12 00:44:39 +02:00
cora 33739dc5af Woodland cabin mob spawning 2022-07-12 00:32:53 +02:00
cora df2934c548 Merge pull request 'Fix crash when no group spawning positions found (#2410)' (#2412) from fix_group_spawn_crash into master
Reviewed-on: MineClone2/MineClone2#2412
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-11 20:48:43 +00:00
cora c1686923d3 Fix crash when no group spawning positions found 2022-07-11 22:31:35 +02:00
cora 489db73dca Merge pull request 'Mud fixes' (#2413) from TheRandomLegoBrick/MineClone2:mud_fixes into master
Reviewed-on: MineClone2/MineClone2#2413
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-07-11 20:31:01 +00:00
TheRandomLegoBrick 408c72e4bf Mud fixes 2022-07-11 08:24:42 -07:00
cora 0b197d3605 Merge pull request 'Fix #2336 (interaction bug when opening chests)' (#2340) from shield_fixes into master
Reviewed-on: MineClone2/MineClone2#2340
2022-07-11 09:58:21 +00:00
NO11 a16613f31c Fix #2336 (interaction bug when opening chests) 2022-07-11 09:14:14 +00:00
cora c900c04194 Merge pull request 'Replace all melon/pumpkin stems in woodland_cabins with unconnected variants.' (#2409) from melonpumpkin_stem_patch into master
Reviewed-on: MineClone2/MineClone2#2409
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-07-10 09:41:13 +00:00
MysticTempest 484ad2b630 Replace all melon/pumpkin stems in woodland_cabins with unconnected variants. 2022-07-09 19:35:51 -05:00
cora ec6d5628e2 Merge pull request 'water mobs' (#2403) from water_mobs into master
Reviewed-on: MineClone2/MineClone2#2403
Reviewed-by: PrairieWind <prairie.astronomer1@gmail.com>
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-09 22:22:17 +00:00
cora 4a4636523e Add new mobs to translation template. 2022-07-09 22:14:37 +02:00
cora e9b72083b3 Fix translator modnames 2022-07-09 02:30:48 +02:00
cora aed96a4912 Add original dolphin texture
cc0 by cora
2022-07-09 02:30:48 +02:00
cora f202ed8327 spawn in groups 2022-07-09 02:30:48 +02:00
cora 44abef44e1 Make fish buckets work with water mobs 2022-07-09 02:30:48 +02:00
PrairieAstronomer 88cdc9baf3 Add Fish Buckets 2022-07-09 02:30:48 +02:00
PrairieAstronomer 27ea6087c7 Tactical Fishing Advancement 2022-07-09 02:30:48 +02:00
cora ae0eb85ffc Add salmon, cod and dolphin from mcl5 2022-07-09 02:30:48 +02:00
cora 6d5e8822dd Merge pull request 'Glorius Mud' (#2402) from TheRandomLegoBrick/MineClone2:mud into master
Reviewed-on: MineClone2/MineClone2#2402
2022-07-09 00:24:28 +00:00
RandomLegoBrick 5ceffe1a3c Merge branch 'master' into mud 2022-07-08 22:42:38 +00:00
cora 5c61c96d4f Merge pull request 'More villager and mob fixes' (#2405) from villager_breeding into master
Reviewed-on: MineClone2/MineClone2#2405
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-08 22:02:36 +00:00
cora de9056ae62 Fix child mobs collision boxes 2022-07-08 23:57:02 +02:00
cora 08a1ecd879 Don't take extra bread when feeding 2022-07-08 23:57:02 +02:00
cora bcb76f7bd2 correctly lock job when traded 2022-07-08 23:57:02 +02:00
cora 8fe40fcd26 remove old debug line 2022-07-08 23:57:02 +02:00
cora 98c48dab8c abolish child labor 2022-07-08 23:57:02 +02:00
RandomLegoBrick 31e53ceff0 Merge branch 'master' into mud 2022-07-08 17:33:10 +00:00
TheRandomLegoBrick 05186c9a19 Non-copyright-infringey mud texture 2022-07-08 10:31:38 -07:00
TheRandomLegoBrick dfd16d1110 Add license 2022-07-08 10:02:06 -07:00
TheRandomLegoBrick c26a9aded5 Add mud sounds 2022-07-08 09:18:42 -07:00
cora 3118102ca7 Merge pull request 'Campfires' (#2397) from campfire into master
Reviewed-on: MineClone2/MineClone2#2397
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-07-08 00:39:23 +00:00
PrairieAstronomer 0ecffaf472 Added README.md file to mcl_campfires 2022-07-08 02:37:20 +02:00
cora 3c2633ee2c Simplify my own mess... remove code dupe
i'll fix this in cauldrons too, promise
2022-07-08 02:37:20 +02:00
PrairieAstronomer f0241bbf6a Added extinghuishing sound when extenguished with a shovel. 2022-07-08 02:37:20 +02:00
PrairieAstronomer 67494f8905 Added Burning Players and Entities to Campfires. 2022-07-08 02:37:20 +02:00
PrairieAstronomer e9fe5c1377 Fixed Crafting Recipes 2022-07-08 02:37:20 +02:00
PrairieAstronomer 5de3c7977c Campfire Inventory Textures by RandomLegoBrick 2022-07-08 02:37:20 +02:00
PrairieAstronomer 465d91036f Added Campfire to Fisherman Villager Trades 2022-07-08 02:37:20 +02:00
PrairieAstronomer 3786c46b30 (Soul) Campfires
Adds soul and nomal campfires. Code start and models from issue 505. Textures are all PixelPerfection.
2022-07-08 02:37:20 +02:00
cora 37798bfa42 Merge pull request 'Stone Cutter' (#2399) from stonecutter into master
Reviewed-on: MineClone2/MineClone2#2399
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-07-08 00:32:03 +00:00
PrairieAstronomer f141427dfe Added README.md File with Media License 2022-07-08 00:09:39 +00:00
PrairieAstronomer 41be8a5a85 Stonecutter Texturs, by RandomLegoBrick 2022-07-08 00:09:39 +00:00
PrairieAstronomer d9a25552d8 Stone Cutter
Adds the stonecutter block.
2022-07-08 00:09:39 +00:00
TheRandomLegoBrick cbe0f80d68 Move redundant water bottle code to functions 2022-07-07 16:50:51 -07:00
cora a930f3a814 Merge pull request 'Do not emerge while making railcorridors' (#2400) from railcorridors into master
Reviewed-on: MineClone2/MineClone2#2400
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-07 23:50:07 +00:00
TheRandomLegoBrick 06f8688f26 Improve mud bricks and packed mud textures 2022-07-07 15:16:43 -07:00
TheRandomLegoBrick f3dd3e92fa Add various mud brick blocks 2022-07-07 11:54:36 -07:00
TheRandomLegoBrick 4f1960d6ef Fix mod.conf 2022-07-07 08:29:32 -07:00
TheRandomLegoBrick 0414493f5c Fix hardness and blast resistance for packed mud 2022-07-06 20:27:13 -07:00
TheRandomLegoBrick be1427205e Move progress to separate mod and add packed mud 2022-07-06 13:14:29 -07:00
TheRandomLegoBrick 0142b58edc Allow dispensers to convert dirt to mud 2022-07-06 12:43:54 -07:00
TheRandomLegoBrick 973dc7fa41 Add mud 2022-07-06 12:14:21 -07:00
TheRandomLegoBrick 24ab7ff825 Add mud block 2022-07-06 11:33:25 -07:00
cora f98242bb0c Do not emerge while making railcorridors
it turns out to work fine without
2022-07-06 01:43:21 +02:00
cora b0da96611e Merge pull request 'Villager fixes' (#2387) from villager_fixes into master
Reviewed-on: MineClone2/MineClone2#2387
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-05 22:00:59 +00:00
cora 31289f5686 villagers that haven't traded loose job on js gone 2022-07-05 23:47:30 +02:00
cora 672b9dbedf make pathfinding to jobsite more smooth 2022-07-05 23:47:30 +02:00
cora dd5e9afbd9 villagers only get a job when they touch jobsite 2022-07-05 23:47:30 +02:00
cora 21d5ab88a5 comment out natural villager spawning 2022-07-05 23:47:30 +02:00
PrairieWind dc75a4d854 Merge pull request 'Fix loom and fletching table textures' (#2383) from MrRar/MineClone2:loom into master
Reviewed-on: MineClone2/MineClone2#2383
Reviewed-by: PrairieWind <prairie.astronomer1@gmail.com>
2022-07-05 18:59:59 +00:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 236c1ce760 Fletching table: add missing bottom texture 2022-07-05 13:26:53 -05:00
cora fdea5988a0 Merge pull request 'Tweak crying obsidian particles' (#2395) from crying_particles into master
Reviewed-on: MineClone2/MineClone2#2395
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-05 10:13:47 +00:00
cora efad7dad24 clean up 2022-07-05 11:19:47 +02:00
cora 27a945b8f3 Tweak crying obsidian particles 2022-07-05 11:19:47 +02:00
cora b08a79b070 Merge pull request 'Geode fixes' (#2389) from geode_size into master
Reviewed-on: MineClone2/MineClone2#2389
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-04 22:14:45 +00:00
cora daa95e3688 replace dirt and gravel too for even less clumps 2022-07-05 00:12:23 +02:00
cora 889e72c50d don't dig amethyst by water 2022-07-05 00:12:23 +02:00
cora ea99341f94 make geode inside smoother 2022-07-05 00:12:23 +02:00
cora 4b95185fba make geodes less cube shaped (sometimes) 2022-07-05 00:12:23 +02:00
cora 86233c774d Merge pull request 'Fix railcorridors aka make mapgen fast again' (#2384) from railcorridors into master
Reviewed-on: MineClone2/MineClone2#2384
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-04 21:12:52 +00:00
cora 3584d89028 better distribution 2022-07-04 23:07:51 +02:00
cora 40d0c1affb slightly optimize placement 2022-07-04 23:07:51 +02:00
cora 0a2e68d136 spawn carts, make mineshafts a bit less frequent 2022-07-04 23:07:51 +02:00
cora 9f66c9f673 let railcorridors be placed by new api
this makes it a lot faster
2022-07-04 23:07:51 +02:00
cora a92b405efd Comment out unused cart-checking hackery 2022-07-04 23:07:51 +02:00
cora db4f2baafc Tweak tsm_railcorridors for faster mapgen
This just does 5 instead of 10 attempts to spawn a corridor in a
chunk. There still appear to be plenty corridors and it makes
mapgen noticeably faster.
2022-07-04 23:07:51 +02:00
cora d6306d78b8 Merge pull request 'Spawn corals only at -10 and lower' (#2393) from deeper_corals into master
Reviewed-on: MineClone2/MineClone2#2393
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-04 21:06:33 +00:00
cora 0d8e6b103e Merge pull request 'some mob spawning fixes (#1692)' (#2392) from ground_squids into master
Reviewed-on: MineClone2/MineClone2#2392
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-04 21:02:39 +00:00
cora 0e6250b2a3 Fix rabbit spawning biomes 2022-07-04 12:50:48 +02:00
cora c66cb834a2 spawn corals only at -10 and lower
to prevent corals in rivers
2022-07-04 02:13:54 +02:00
cora bc2e61921f do not spawn polar bears in extremehills+_snowtop 2022-07-04 01:46:41 +02:00
cora b1c97a0510 prevent ground squids, variable spawn height 2022-07-04 01:41:45 +02:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 e22d543d80 Fix loom and fletching table textures 2022-07-03 10:53:00 -05:00
cora ded679aaf7 Merge pull request 'Disable the despawn timer catchup for items that were unloaded.' (#2386) from fix_item_depsawning_timer into master
Reviewed-on: MineClone2/MineClone2#2386
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-07-03 11:20:47 +00:00
MysticTempest 677110e39f Disable the despawn timer catchup for items that were unloaded. 2022-07-03 04:28:43 -05:00
cora 12e6c0e661 Merge pull request 'More New Advancements' (#2382) from PrairieWind_advancements into master
Reviewed-on: MineClone2/MineClone2#2382
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-07-01 23:18:11 +00:00
PrairieAstronomer 9c3a4f3436 Updated the Advancements translation template...again 2022-07-01 14:54:44 -06:00
PrairieAstronomer 1abeccfaab Enchanter Advancement 2022-07-01 14:50:56 -06:00
PrairieAstronomer 2845cd79b7 Local Brewery Advancement 2022-07-01 14:37:02 -06:00
PrairieAstronomer 4bfadffadc Fixed Minor Formating in Advancement Definitions 2022-07-01 14:04:33 -06:00
PrairieAstronomer f998f3bc05 Updated Advancements Translation Template 2022-07-01 13:56:44 -06:00
PrairieAstronomer acff3e525c Changed the Into the Nether achievement to the We Need to Go Deeper Advancement 2022-07-01 13:45:07 -06:00
PrairieAstronomer 6757b8f900 The Nether Advancement 2022-07-01 13:41:21 -06:00
PrairieAstronomer 8f7ac1e5a2 Not Quite 'Nine' Lives Advancement 2022-07-01 13:11:26 -06:00
PrairieAstronomer 40a421ddd0 Hidden in the Depths Advancement 2022-07-01 12:41:01 -06:00
PrairieAstronomer 687bc04560 Who is Cutting Onions? Advancement 2022-07-01 12:39:10 -06:00
cora cea6af267f Merge pull request 'Grand mapgen cleanup Part 1' (#2355) from mapgen_fixes into master
Reviewed-on: MineClone2/MineClone2#2355
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-07-01 17:13:18 +00:00
cora 6ad00e4170 emerge before geode and surface pool placement
otherwise they can be cut off
2022-07-01 14:43:03 +02:00
cora ef14006f15 Fix surface pools & desert temple loot 2022-07-01 14:30:02 +02:00
cora c59a890963 add woodland cabin loot 2022-07-01 06:11:10 +02:00
cora ac69b7c710 Add woodland cabin and outpost 2022-07-01 04:26:41 +02:00
cora f115fc8ea0 tweak probabilities 2022-07-01 02:05:48 +02:00
cora 8684140740 log actual placement position 2022-07-01 02:05:48 +02:00
cora be2a8d7054 Structure transfer fixes 2022-07-01 02:05:48 +02:00
cora f5cc0ef2dc Move shipwrecks to mcl_structures 2022-07-01 02:05:48 +02:00
cora 7945de1324 igloo fixes, mobspawns, move geode to mcl_structs 2022-07-01 02:05:48 +02:00
cora a09226c370 fossil & igloo -> new api 2022-07-01 02:05:48 +02:00
cora 3ca6d4de3b fix chunk probability and distributions 2022-07-01 02:05:48 +02:00
cora 7f8a366a7b make geodes slightly larger, fix positioning 2022-07-01 02:05:48 +02:00
cora 607511518f fix warning 2022-07-01 02:05:48 +02:00
cora 14cd360214 witch hut, boulders, ice-spikes -> new api 2022-07-01 02:05:48 +02:00
cora dfbb832f96 Terrain feature fixes 2022-07-01 02:05:48 +02:00
cora 063e17bc0a make schematic selection deterministic 2022-07-01 02:05:48 +02:00
cora befe493ff0 Add warm ocean ruins 2022-07-01 02:05:48 +02:00
cora fcb8160a60 Add loot generation to api 2022-07-01 02:05:48 +02:00
cora 065767cc77 Add Ocean Ruins - schematics by PrarieWind 2022-07-01 02:05:48 +02:00
cora 47eca3f774 fix callbacks 2022-07-01 02:05:48 +02:00
cora b396a3c6ee update API.md 2022-07-01 02:05:48 +02:00
cora 9381657f5d use new struct api for desert well and temples 2022-07-01 02:05:48 +02:00
cora e37358d220 Add make_foundation option
test by /spawnstruct nether_outpost without being on complete
(covering the sidelen) solid ground
2022-07-01 02:05:48 +02:00
cora d8697cb59c Tweak basalt delta code 2022-07-01 02:05:48 +02:00
cora 0b3a4c18d7 structure-api: add check for solid ground 2022-07-01 02:05:48 +02:00
cora 8e976d9191 Do not log generation of terrain features
this leads to excessive io otherwise
2022-07-01 02:05:48 +02:00
cora fed81932e2 structs: use mcl_register_generator, cave decos 2022-07-01 02:05:48 +02:00
cora eb8db0dc0b optimize terrain features 2022-07-01 02:05:48 +02:00
cora 69dac8ded4 fix surface pools y offset 2022-07-01 02:05:48 +02:00
PrairieWind 4b18c7fe8e Merge pull request 'Add smithing table bottom texture by @RandomLegoBrick' (#2381) from smithing_table_bottom into master
Reviewed-on: MineClone2/MineClone2#2381
Reviewed-by: PrairieWind <prairie.astronomer1@gmail.com>
2022-06-30 20:01:59 +00:00
cora c1bd8f4204 smithing table bottom texture by @RandomLegoBrick 2022-06-30 21:48:29 +02:00
cora 9f2691343c Merge pull request 'Adds Netherite Armor Tools and Ancient Debris' (#2371) from netherite into master
Reviewed-on: MineClone2/MineClone2#2371
Reviewed-by: AFCMS <afcm.contact@gmail.com>
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-06-30 13:19:17 +00:00
cora be8692daab Add smithing table textures by @RandomLegoBrick 2022-06-30 14:11:13 +02:00
cora c9dadc0bc7 correct tile order in smithing table item def 2022-06-30 14:11:13 +02:00
PrairieAstronomer 145d183998 Added Armor (Un)Eqip Sound Definitions 2022-06-30 14:11:13 +02:00
PrairieAstronomer 074f1df354 Added Formspec Image to Smithing Table and Fixed some whitespace issues. 2022-06-30 14:11:13 +02:00
PrairieAstronomer 6543d819da Fixed some quote formating issues 2022-06-30 14:11:13 +02:00
cora b8fc1c03b3 check for _upgradable instead of diamond 2022-06-30 14:11:13 +02:00
PrairieAstronomer 1fc79ffb61 Added pixelperfection netheriteblock texture 2022-06-30 14:11:13 +02:00
PrairieAstronomer ed2fc6601e Added Smithing Table to Toolsmith Villager Jobsite 2022-06-30 14:11:13 +02:00
cora 7136e54615 make armor upgrade slightly more flexible 2022-06-30 14:11:13 +02:00
PrairieAstronomer d86be83b2b Fixed the lodestone crafting to use the netherite ingot. 2022-06-30 14:11:13 +02:00
cora 352a52e086 fix indentation 2022-06-30 14:11:13 +02:00
cora 909aa71dd3 keep _mcl_upgrade_item as nil for non diamond armor 2022-06-30 14:11:13 +02:00
cora c05e1b5f45 make diamond armor upgradable to netherite 2022-06-30 14:11:13 +02:00
PrairieAstronomer 79c014f356 Serious Dedication Advancement 2022-06-30 14:11:13 +02:00
Code-Sploit 7f340b7e2a Add forgotten textures for netherite ingot, scrap and ancient debris 2022-06-30 14:11:13 +02:00
NO11 e0c5f2f7fa Fix ancient debris duplication glitch (remove fortune drop) 2022-06-30 14:11:13 +02:00
Code-Sploit 10ea6da4e8 Add all pixel-perfection textures for netherite 2022-06-30 14:11:13 +02:00
Code-Sploit 1283967132 Add crafting recipe for netheriteblock & make netheriteblock convertable to ingots. 2022-06-30 14:11:13 +02:00
Code-Sploit dc2a74140e Add correct speeds for netherite shovel, pickaxe and axe 2022-06-30 14:11:13 +02:00
Code-Sploit bbf63cf66b Add netheriteblock 2022-06-30 14:11:13 +02:00
Code-Sploit 688d1e3f7e Add correct durability for netherite sword 2022-06-30 14:11:13 +02:00
Code-Sploit e8cedbc553 Remove unnessacary comments in mcl_smithing_table/init.lua 2022-06-30 14:11:13 +02:00
Code-Sploit af2a4b1de0 Add crafting recipe for smithing table 2022-06-30 14:11:12 +02:00
Code-Sploit 8080932353 Fix not able to put diamond tools in the smithing_table 2022-06-30 14:11:12 +02:00
Code-Sploit 3b2a34c670 Add first try of code for smithing table (Thanks to Fleckenstein), add _mcl_upgradable and _mcl_upgrade_item to every diamond tool/armor piece 2022-06-30 14:11:12 +02:00
Code-Sploit aee4d15a57 Fix crash in netherite hoe by adding netherite to uses{} 2022-06-30 14:11:12 +02:00
Code-Sploit 9b25567274 Add netherite hoe texture 2022-06-30 14:11:12 +02:00
Code-Sploit f2375abc47 Add netherite tools 2022-06-30 14:11:12 +02:00
Code-Sploit 9c0e9964a6 Add smithing table W.I.P 2022-06-30 14:11:12 +02:00
Code-Sploit 338114aecc Add: Netherite scrap, Netherite ingot. Add crafting recipe for netherite ingot. 2022-06-30 14:11:12 +02:00
Code-Sploit 8ee792e965 Add correct textures for netherite armor 2022-06-30 14:11:12 +02:00
Code-Sploit 3f30251f26 Add second part of netherite armor textures 2022-06-30 14:11:12 +02:00
Code-Sploit 57ebfbfb56 Add first part of netherite armor textures 2022-06-30 14:11:12 +02:00
Code-Sploit f0f52713f7 Add code for netherite armor 2022-06-30 14:11:12 +02:00
Code-Sploit 92992cb44e Add ancient debris 2022-06-30 14:11:12 +02:00
cora 48a2d25698 Merge pull request 'Fix Anvil stacking dupe II' (#2375) from fix-anvil-stacking-dupe into master
Reviewed-on: MineClone2/MineClone2#2375
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-06-30 12:09:06 +00:00
cora 817fb83ba6 Fix Anvil stacking dupe II
This guarantees that the anvil logic never overstacks the output slot
2022-06-30 14:03:55 +02:00
cora 3286330b26 Merge pull request 'Add crying obsidian' (#2378) from crying_obsidian into master
Reviewed-on: MineClone2/MineClone2#2378
2022-06-30 12:01:40 +00:00
cora ce2531a488 Add correct respawn anchor recipe 2022-06-30 14:00:55 +02:00
cora 78e187537f Add crying obsidian particle effect 2022-06-30 01:43:49 +02:00
kay27 9d8ff427f3 Add crying obsidian 2022-06-30 01:43:22 +02:00
PrairieWind c504e9b4ac Merge pull request 'Update textures for nautilus shell and heart of the sea.' (#2373) from TheRandomLegoBrick/MineClone2:update_nautilus_texture into master
Reviewed-on: MineClone2/MineClone2#2373
2022-06-27 20:34:58 +00:00
TheRandomLegoBrick f1e5790308 Update textures for nautilus shell and heart of the sea 2022-06-27 10:17:33 -07:00
cora 815893a15a Merge pull request 'Fix zombie villager curing (crash)' (#2368) from fix_zvillager_curing into master
Reviewed-on: MineClone2/MineClone2#2368
2022-06-26 09:39:17 +00:00
cora d9e40d5223 set profession first in on_spawn 2022-06-26 11:20:20 +02:00
cora 86651e7557 Fix zombie villager curing (crash) 2022-06-26 11:20:20 +02:00
cora 1262216f9d Merge pull request 'Nautilus Shell and Heart of the Sea Items' (#2369) from netherquatics_items into master
Reviewed-on: MineClone2/MineClone2#2369
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-06-25 23:04:33 +00:00
PrairieAstronomer 94e7c4c85b Nautilus Shell Texture, by RandomLegoBrick 2022-06-25 16:54:19 -06:00
PrairieAstronomer 52bb8c6401 Heart of the Sea Textures by RandomLegoBrick 2022-06-25 16:47:48 -06:00
PrairieAstronomer 29329c4aac Heart of the Sea Item. Item Texture by RandomLegoBrick. 2022-06-25 16:41:32 -06:00
PrairieAstronomer 2e0fa714ed Nautilus Shell Item. Shell Texture by RandomLegoBrick. 2022-06-25 15:42:52 -06:00
cora 679309d20c Merge pull request 'Tweak hunger/health mechanics:' (#2361) from hunger_patches into master
Reviewed-on: MineClone2/MineClone2#2361
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-06-25 09:17:59 +00:00
MysticTempest e3abe72522 Fix healing speed, and saturation usage again; to be more accurate. 2022-06-25 01:41:10 -05:00
MysticTempest a6e2c94028 Tweak hunger/health mechanics:
Ensure hunger is always ticking away, and ensure that health regen
is quicker when hunger bar is full.
And, tweak saturation to partially use up hunger to heal; instead
of healing on top of hunger.
2022-06-24 05:38:26 -05:00
cora bb413bfdb1 Merge pull request 'Coral reefs' (#2357) from coral_reefs into master
Reviewed-on: MineClone2/MineClone2#2357
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-06-23 17:20:57 +00:00
cora 2b87958678 add all sizes of sea pickles not just 1 2022-06-23 17:18:01 +02:00
cora f883b45809 Add coral reefs 2022-06-23 15:06:56 +02:00
cora ecbc94e822 Merge pull request 'Lava cauldrons and other cauldron/bucket fixes' (#2350) from lava_cauldron into master
Reviewed-on: MineClone2/MineClone2#2350
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-06-22 10:41:20 +00:00
cora ca6cf81e24 set objects on fire when in lava cauldron 2022-06-22 12:40:16 +02:00
cora 1401f398ae globalstep instead of abm to extinguish objects 2022-06-21 14:24:15 +02:00
cora 3a7022ab66 Clean up buckets and cauldrons a little bit 2022-06-21 13:53:08 +02:00
cora 685cba6821 Allow placing lava into cauldrons 2022-06-21 13:44:52 +02:00
cora 7a8d20e124 take lava from cauldron with bucket 2022-06-21 13:08:20 +02:00
cora 9937224997 Add lava filled cauldron 2022-06-21 12:58:19 +02:00
cora 820b97f065 fix soem codestyle stuff in mcl_cauldrons 2022-06-21 12:52:54 +02:00
cora 432ec760b7 Merge pull request 'Properly fix smokers, & blast_furnaces to work at twice the rate of a furnace.' (#2344) from fix_blast_furnaces_and_smokers_properly into master
Reviewed-on: MineClone2/MineClone2#2344
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-06-21 10:32:15 +00:00
MysticTempest f6599d237e Fix smokers, & blast_furnaces to work at twice the rate of a furnace. 2022-06-21 00:36:13 -05:00
PrairieWind b925ebb087 Merge pull request 'Implement #2312: Add grindstones' (#2342) from TheRandomLegoBrick/MineClone2:grindstone into master
Reviewed-on: MineClone2/MineClone2#2342
Reviewed-by: PrairieWind <prairie.astronomer1@gmail.com>
2022-06-20 20:43:56 +00:00
TheRandomLegoBrick 90ee8ecf0f Merge branch 'grindstone' of https://git.minetest.land/TheRandomLegoBrick/MineClone2 into grindstone 2022-06-20 13:33:15 -07:00
TheRandomLegoBrick 6ec9765b58 Fix indentation 2022-06-20 13:31:23 -07:00
RandomLegoBrick b5eda3000e Merge branch 'master' into grindstone 2022-06-20 19:58:49 +00:00
TheRandomLegoBrick 99469ff1c5 Add grindstones 2022-06-20 12:46:59 -07:00
cora 7429f5dc93 Merge pull request 'Fix crash on ghast explosions' (#2339) from fix_ghast_crash into master
Reviewed-on: MineClone2/MineClone2#2339
2022-06-20 11:46:55 +00:00
cora e3c5b2cbb5 Fix crash on ghast explosions
In certain situations the arrow can be invalidated until its
get_pos() is called here - e.g. when the player wears over-
enchanted blast protection (65k in this case).

This uses the player position for the explosion in these cases
2022-06-20 13:40:05 +02:00
cora 64b8f15f47 Merge pull request 'Fix weather FPS (and warning)' (#2341) from fix_weather_fps into master
Reviewed-on: MineClone2/MineClone2#2341
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-06-20 11:38:15 +00:00
cora dcc7df5f02 Add setting for nether dust too
plus slightly tweak the wording for thunder setting
2022-06-20 13:31:58 +02:00
cora 30e543d4d2 Add settings to change weather particle amounts 2022-06-19 22:50:29 +02:00
cora d9da50e292 Properly check for sound update (fix warning) 2022-06-19 22:25:50 +02:00
cora ca27237ffc Tweak particle spawner settings 2022-06-19 22:19:46 +02:00
cora 855b18ee30 Merge pull request 'Nether biomes' (#2328) from nether_biomes into master
Reviewed-on: MineClone2/MineClone2#2328
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-06-19 14:58:23 +00:00
cora ffa15727e3 readd grow_twisting_vines func 2022-06-19 13:27:12 +02:00
cora 31b94f5b22 Add "nether outpost"
As a temporary solution until large nether fortresses are there.
This is just a little tower containing some warts and a blaze
spawner.
2022-06-19 03:11:56 +02:00
cora ecf6236152 Set fog color according to nether biome 2022-06-19 00:24:56 +02:00
cora 41f708e03e Regular decorations for legacy nether(except v6)
minetest supports this now
2022-06-19 00:24:56 +02:00
cora 5b366c692d Enable mob spawning in new biomes
lower ghast spawning chance
2022-06-19 00:24:52 +02:00
cora 0890c719a3 Add basalt pillars 2022-06-19 00:24:52 +02:00
cora fefb15f2a8 Add new fungus tree schematics 2022-06-19 00:24:52 +02:00
cora 01eea4ab8a prevent nether trees from growing through bedrock 2022-06-19 00:24:52 +02:00
cora 969ac0be78 fix style details and mistakes in mcl_crimson 2022-06-19 00:24:52 +02:00
cora d9a74ac180 rename mcl_surface_pools -> mcl_terrain_features 2022-06-19 00:24:52 +02:00
cora a0264ed5e0 tweak biome distribution to be more like mc
according to
https://www.reddit.com/r/Minecraft/comments/gjeuww/how_the_nether_biomes_are_distributed/
2022-06-19 00:24:52 +02:00
cora 48189cb3a7 fix lighting issue for placed schematics
warped and crimson shroomlight would not work correctly before
because they're placed after light calculation is done apparently
2022-06-19 00:24:52 +02:00
cora db9fba70dd some biome tweaks, add nether gold 2022-06-19 00:24:52 +02:00
cora 8efbd89b6a Add basalt columns & lava pools 2022-06-19 00:24:52 +02:00
cora 3c79685c48 Add main nether biomes
Add nether forests

Add soulsand valley decorations

Add Basalt Delta basics
2022-06-19 00:24:48 +02:00
cora 06fdfd2e63 make nether mushroom rotation random 2022-06-19 00:24:48 +02:00
cora 1c3a6f8a19 replace algorithmic fungus gen by schematic
it was always the same anyways (except for the shroomlight)
2022-06-19 00:24:48 +02:00
cora 489ee80490 remove enderman spawning 2022-06-19 00:24:48 +02:00
AFCMS f285e18d24 Fix some codestyle issues with `mcl_crimson` 2022-06-19 00:24:48 +02:00
cora 7d653011fc fix whitespace 2022-06-19 00:24:48 +02:00
cora 6af3fecacb rename mcl_mushroom to mcl_crimson 2022-06-19 00:24:48 +02:00
3raven 9d5bbd7d22 Correct name 2022-06-19 00:24:48 +02:00
3raven 686b62f6e3 fix
fix
2022-06-19 00:24:45 +02:00
3raven ee2f8f46f1 Non flammable/modify by similiraty with trees 2022-06-19 00:24:45 +02:00
3raven 653020d2ef Add texture files for stripped stem
Add texture files for stripped stem

Add texture files for stripped stem

Add warped hyphae stripped and bark

Same for crimson hyphae
2022-06-19 00:24:33 +02:00
kay27 7420877077 Bump ABM intervals to 1 second 2022-06-19 00:24:33 +02:00
3raven 69da3ffc05 fix texture 2022-06-19 00:24:33 +02:00
3raven b25c23f5fa mcl_mushroom.fr.tr
Translation
2022-06-19 00:24:33 +02:00
kay27 352fd7562f #41 Remove proprietary textures, update game screenshot 2022-06-19 00:24:33 +02:00
debiankaios 4a727d79c7 german translation
german translation

german translation
2022-06-19 00:24:15 +02:00
debiankaios b2b86e4fcc Added textures for the sprouts and roots. 2022-06-19 00:24:15 +02:00
debiankaios c3e00a1c26 Add more decoration blocks.
Added the decorations lbocks, and chancheg generation of decoration a bit.
2022-06-19 00:24:15 +02:00
debiankaios 4b976a663f Add twisting_vines textures 2022-06-19 00:24:15 +02:00
debiankaios 6755675021 Fixed warnings
Warnings because a var which not exist
2022-06-19 00:24:15 +02:00
debiankaios 324aa159a7 New Textures
New Textures

New Textures

New Textures

New Textures

New Textures

New Textures
2022-06-19 00:23:23 +02:00
debiankaios 5b06af4fec Bufixes
Fixed Bug that trees generating in other blocks. The slab and stairbug was fixed too.
2022-06-17 22:54:30 +02:00
Lizzy Fleckenstein c1ee0228f0 Fix light_source warning in mcl_mushroom 2022-06-17 22:54:30 +02:00
cora 49cb60f2e5 comment out ore generation for now 2022-06-17 22:54:30 +02:00
debiankaios 8a181661a5 Add warped and crimson 2022-06-17 22:54:30 +02:00
cora 08d677d788 Merge pull request 'Make "old" villagers keep their job' (#2325) from fix_old_villagers_profession into master
Reviewed-on: MineClone2/MineClone2#2325
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-06-17 20:52:02 +00:00
cora 98a322443b make "old" villagers keep their job 2022-06-17 13:59:32 +00:00
cora de994f3f06 Merge pull request 'Rate limit pathfinding attempts / Fix pathfind spam' (#2322) from fix_pathfind_spam into master
Reviewed-on: MineClone2/MineClone2#2322
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-06-17 13:57:16 +00:00
cora cd43076ea3 additionally rate limit villager jobhunts 2022-06-17 15:54:53 +02:00
cora e630ea59c9 Rate limit pathfinding attempts
In certain situation it otherwise results in excessive attempts to
find a path.
2022-06-17 15:54:53 +02:00
cora fb6e790535 Merge pull request 'Fix header depth in `API.md`' (#2329) from Lazerbeak12345/MineCloneJEpC:upstream into master
Reviewed-on: MineClone2/MineClone2#2329
2022-06-17 09:15:00 +00:00
Nathan Fritzler d8dec7c316
Fix header depth 2022-06-16 19:43:17 -06:00
cora 22d3b4a5d4 Merge pull request 'Bell can be activated by redstone' (#2282) from redstone_bell into master
Reviewed-on: MineClone2/MineClone2#2282
Reviewed-by: PrairieWind <prairie.astronomer1@gmail.com>
2022-06-16 19:33:39 +00:00
MysticTempest 965d10c003 Bell can be activated by redstone 2022-06-16 21:26:15 +02:00
cora 87bf3fdc0d Merge pull request 'Lightning command: Strike player by name' (#2326) from MrRar/MineClone2:lightning into master
Reviewed-on: MineClone2/MineClone2#2326
Reviewed-by: PrairieWind <prairie.astronomer1@gmail.com>
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-06-16 19:25:01 +00:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 a455e7bb8e Lightning command: Strike player by name 2022-06-16 13:43:44 -05:00
cora 20945db0e6 Merge pull request 'Structure placement api' (#2275) from structure_api into master
Reviewed-on: MineClone2/MineClone2#2275
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-06-15 03:14:12 +00:00
cora 92da429f50 Fix chatcommand not under mcl_structures in /help 2022-06-15 05:10:41 +02:00
cora 726d1f07fa use noise instead of fill_ratio for distribution 2022-06-15 05:10:41 +02:00
cora 9c6aafa3c1 add surface pools 2022-06-15 05:10:41 +02:00
cora 1b0053299c Do not replace bedrock during geode gen. 2022-06-15 05:10:41 +02:00
cora fa56ce5d52 Add outer geode layer
uses deepslate until smooth basalt is there
2022-06-15 05:10:41 +02:00
cora a0bed1d8bc Add proper logging + some fixes 2022-06-15 05:10:41 +02:00
cora a895292371 Add API documentation, minor fixes 2022-06-15 05:10:41 +02:00
cora b0b8638a4c Add /spawnstruct support 2022-06-15 05:10:41 +02:00
cora 8fa67e6b4f Geodes as test for place by function 2022-06-15 05:10:41 +02:00
cora 1eaac3c406 use gennotify instead of lbm for placement
keep the lbm for secondary structures
2022-06-15 05:10:41 +02:00
cora 6406a14738 Add Structure placement api 2022-06-15 05:10:41 +02:00
cora 899c849996 old registered_structures -> structure_data 2022-06-15 05:10:41 +02:00
cora deeb7ce919 Merge pull request 'Fix horse and wolf spawning biomes' (#2316) from spawning_biomes into master
Reviewed-on: MineClone2/MineClone2#2316
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-06-15 03:07:51 +00:00
cora 8651e3b04e randomize spawning list 2022-06-15 05:06:31 +02:00
cora 60f164d46a Fix horse and wolf spawning biomes 2022-06-15 05:06:31 +02:00
cora 44c524f7bc Merge pull request 'Cooking potatoes with smokers' (#2319) from mrminer/MineClone2-potato-patch:master into master
Reviewed-on: MineClone2/MineClone2#2319
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-06-15 03:04:46 +00:00
mrminer 110b293297 Update 'mods/ITEMS/mcl_farming/potatoes.lua' 2022-06-15 01:30:55 +00:00
cora d78ba13dea Merge pull request 'mcl_spyglass by NO11' (#2309) from mcl_spyglass into master
Reviewed-on: MineClone2/MineClone2#2309
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-06-14 19:49:22 +00:00
cora 27a84799e4 remove superfluous dependencies 2022-06-13 12:32:48 +02:00
cora bd6d777f05 remove check for mcl_copper, fix recipe 2022-06-13 12:29:47 +02:00
cora 7dd6d5f886 spaces -> tabs 2022-06-13 12:29:47 +02:00
PrairieAstronomer e58387d123 Removed screenshots and Liscense 2022-06-13 12:29:47 +02:00
NO11 c4aa634a40 mcl_spyglass by NO11 2022-06-13 12:29:17 +02:00
cora 38a99d99ed Merge pull request 'Add Smooth Basalt node, Fix several hardness and blast_resistance values' (#2300) from smooth_basalt into master
Reviewed-on: MineClone2/MineClone2#2300
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-06-13 00:51:47 +00:00
cora 9cea10a706 fix more blast resistance and hardness values 2022-06-13 02:48:00 +02:00
cora 2074fec7a1 Fix hardness and b.resistance of blackstone nodes 2022-06-13 02:48:00 +02:00
cora 4e1b6074c7 Add Smooth Basalt node 2022-06-13 02:48:00 +02:00
cora 8aaa7f9400 Merge pull request 'Fix Global var warnings' (#2305) from fix_global_var_warnings into master
Reviewed-on: MineClone2/MineClone2#2305
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-06-13 00:46:49 +00:00
cora a43627e268 Fix 2 wrong variable uses that made warnings 2022-06-12 01:35:27 +00:00
cora 00e94c81c4 Merge pull request 'New Advancements' (#2303) from PrairieAstronomer/MineClone2:PrairieWind_advancements into master
Reviewed-on: MineClone2/MineClone2#2303
2022-06-12 01:30:57 +00:00
PrairieAstronomer 87a45ad78e Minor Format Detail in Country Lode Advancement 2022-06-11 19:14:28 -06:00
PrairieAstronomer bbd86045e5 Country Lode, Take Me Home Advancement 2022-06-11 15:35:48 -06:00
PrairieAstronomer eb72bb81da Fishy Business Advancement 2022-06-11 15:35:48 -06:00
PrairieAstronomer b544fb819d What A Deal! Advancement 2022-06-11 15:35:48 -06:00
PrairieAstronomer 17e2f05971 Sweet Dreams Advancement 2022-06-11 15:35:48 -06:00
PrairieAstronomer 2a62936fe7 Postmortal Advancement 2022-06-11 15:35:48 -06:00
PrairieAstronomer 91f8f44e17 The End? Advancement 2022-06-11 15:35:48 -06:00
PrairieAstronomer 1a5195b5e6 Isn't It Iron Pick Advancement 2022-06-11 15:35:48 -06:00
epCode fab6cf8152 Merge pull request 'Raytraced_arrows_fix' (#2297) from Raytraced_arrows_fix into master
Reviewed-on: MineClone2/MineClone2#2297
2022-06-11 02:42:45 +00:00
epCode ef92475d35 Merge pull request 'master' (#2296) from master into Raytraced_arrows_fix
Reviewed-on: MineClone2/MineClone2#2296
2022-06-11 02:42:04 +00:00
epCode 6bc5e76b8f fix tipped arrows and rocket 2022-06-10 19:40:12 -07:00
cora e4f514bb10 Merge pull request 'Change arrow hit detection for accruate shooting' (#2289) from Raytraced_arrows into master
Reviewed-on: MineClone2/MineClone2#2289
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-06-11 02:29:26 +00:00
epCode 6a74adc261 Merge pull request 'master' (#2290) from master into Raytraced_arrows
Reviewed-on: MineClone2/MineClone2#2290
2022-06-09 16:18:56 +00:00
cora ad55ba435a Merge pull request 'Add sus stews via subtree' (#2288) from sus_stew into master
Reviewed-on: MineClone2/MineClone2#2288
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-06-08 20:19:45 +00:00
cora d1149ee49a Add 'mods/ITEMS/mcl_sus_stew/' from commit '6048efbc988390321952e9ba1da4f6342df59cbf'
git-subtree-dir: mods/ITEMS/mcl_sus_stew
git-subtree-mainline: 8d9131eda3
git-subtree-split: 6048efbc98
2022-06-08 05:16:58 +02:00
cora 8d9131eda3 Merge pull request 'Knockback fixes:' (#2283) from knockback_fixes into master
Reviewed-on: MineClone2/MineClone2#2283
Reviewed-by: cora <cora@noreply.git.minetest.land>
2022-06-08 01:08:21 +00:00
chmodsayshello 6048efbc98 Merge pull request 'Use item meta to store effect information' (#1) from cora/mcl_sus_stew:master into master
Reviewed-on: chmodsayshello/mcl_sus_stew#1
2022-06-07 18:46:14 +00:00
epCode 0aaede2f50 Merge pull request 'master' (#2285) from master into Raytraced_arrows
Reviewed-on: MineClone2/MineClone2#2285
2022-06-07 18:41:22 +00:00
MysticTempest 45ec876167 Knockback fixes:
This PR enables knockback for snowballs, and eggs.
And disables knockback for the following mobs: Shulkers, Iron Golems,
and Ender Dragons.
2022-06-07 02:55:19 -05:00
epCode 6c804f44d5 add a small bit of doc 2022-06-06 18:43:50 -07:00
cora 61ddec5a85 Merge pull request 'Fix a couple of warnings (game.conf, shipwreck get_mapgen_params)' (#2277) from fix_warnings into master
Reviewed-on: MineClone2/MineClone2#2277
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
2022-06-07 01:19:10 +00:00
cora 5c057f24fb get_mapgen_params -> get_mapgen_setting 2022-06-07 03:17:32 +02:00
cora 0fd25d15fa name -> title in game.conf 2022-06-07 03:17:32 +02:00
epCode ca5db36ccd Merge pull request 'Make loaded Crossbow (Corssbow) not show up in creative inventory' (#2281) from epcode-patch-1 into master
Reviewed-on: MineClone2/MineClone2#2281
2022-06-07 00:59:19 +00:00
epCode d738229298 Make loaded Crossbow (Corssbow) not show up in creative inventory 2022-06-07 00:58:37 +00:00
epCode 78940e109c fix critical hit displaying in the wrong place 2022-06-06 14:38:18 -07:00
epCode fdb7d5bfad fixed Badly calculated arrow direction 2022-06-06 14:32:07 -07:00
epCode f2c2f4106b fix arrows not disapearing after mob hit, and self damaging 2022-06-06 13:55:28 -07:00
epCode e1feec9a30 Add Raytracing arrows 2022-06-06 13:42:24 -07:00
cora 6f3c013d41 random effect on sstew with no meta 2022-06-04 02:44:39 +02:00
cora 3cd87dfe38 use itemmeta instead of separate itemstrings 2022-06-04 02:25:14 +02:00
cora 62d7b8cc77 move depends.txt to mod.conf 2022-06-03 12:43:25 +02:00
chmodsayshello a4c608aada you no longer can get potion effects without eating the stew 2022-01-01 08:19:01 +00:00
chmodsayshello da12a0a5b2 removed ALL suspicious stews from the creative inventory
See https://minecraft.fandom.com/wiki/Suspicious_Stew
2021-12-28 16:07:47 +00:00
chmodsayshello f6867ffedd added saturation values 2021-12-28 15:57:21 +00:00
chmodsayshello 326edffaef remove myself from the short description 2021-12-28 11:45:08 +00:00
chmodsayshello 9ea12e450a fix bowl disappering after eating the hunger stew 2021-12-28 11:27:58 +00:00
chmodsayshello e9547c54bb add depends.txt for dependencies 2021-12-28 08:11:52 +00:00
chmodsayshello fdd85e234b add the mod itself 2021-12-28 08:10:54 +00:00
chmodsayshello 37adcc1ec5 credit to the creators of Pixel Perfection 2021-12-28 08:09:58 +00:00
chmodsayshello 6b32c36a4f add texture 2021-12-28 08:08:50 +00:00
chmodsayshello 2a2501c626 Initial commit 2021-12-28 08:07:42 +00:00
4255 changed files with 143261 additions and 288 deletions

View File

@ -45,8 +45,11 @@ read_globals = {
------
--GENERAL
"mcljepc_core",
"default",
--MAPGEN
"mcljepc_mapgen",
}
--ENTITIES
"cmi",
--HUD
"sfinv", "sfinv_buttons", "unified_inventory", "cmsg", "inventory_plus",
}

97
API.md
View File

@ -1,20 +1,95 @@
# API
## Groups
MineClone 2 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`.
## 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 MineCloneJEpC a simple naming convention: Mods with the prefix
“`mcljepc_`” are specific to MineCloneJEpC, although they may be based on an
existing standalone or a mod from a different MineClone fork. Mods which lack
this prefix are verbatim copies of a standalone mod. Some modifications may
still have been applied, but the APIs are held compatible.
## Adding items
### Special fields
Items can have these fields:
* `_mcl_generate_description(itemstack)`: Required for any items which manipulate their
description in any way. This function takes an itemstack of its own type and must set
the proper advanced description for this itemstack. If you don't do this, anvils will
fail at properly restoring the description when their custom name gets cleared at an
anvil.
See `mcl_banners` for an example.
Tools can have these fields:
* `_mcl_diggroups`: Specifies the digging groups that a tool can dig and how
efficiently. See `_mcl_autogroup` for more information.
All nodes can have these fields:
* `_mcl_hardness`: Hardness of the block, ranges from 0 to infinity (represented by -1). Determines digging times. Default: 0
* `_mcl_blast_resistance`: How well this block blocks and resists explosions. Default: 0
* `_mcl_falling_node_alternative`: If set to an itemstring, the node will turn into this node before it starts to fall.
* `_mcl_after_falling(pos)`: Called after a falling node finished falling and turned into a node.
Use the `mcl_sounds` mod for the sounds.
## 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 MineCloneJEpC 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. 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/`
### Items
* Doors: `ITEMS/mcl_doors`
* Fences and fence gates: `ITEMS/mcl_fences`
* Stairs and slabs: `ITEM/mcl_stairs`
* Walls: `ITEMS/mcl_walls`
* Beds: `ITEMS/mcl_beds`
* Buckets: `ITEMS/mcl_buckets`
* Dispenser support: `ITEMS/REDSTONE/mcl_dispensers`
### Mobs
* Mobs: `ENTITIES/mcl_mobs`
MineClone 2 uses its own mobs framework, called “Mobs Redo: MineClone 2 Edition” or “MRM” for short.
This is a fork of Mobs Redo [`mobs`] by TenPlus1.
You can add your own mobs, spawn eggs and spawning rules with this mod.
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.
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.
If you have code for a mod which works fine under Mobs Redo, it should be easy to make it work in MineClone 2,
chances are good that it works out of the box.
### Help
* Item help texts: `HELP/doc/doc_items`
* Low-level help entry and category framework: `HELP/doc/doc`
* Support for lookup tool (required for all entities): `HELP/doc/doc_identifier`
### HUD
* Statbars: `HUD/hudbars`
### Utility APIs
* Change player physics: `PLAYER/playerphysics`
* Select random treasures: `CORE/mcl_loot`
* Get flowing direction of liquids: `CORE/flowlib`
* `on_walk_over` callback for nodes: `CORE/walkover`
* Get node names close to player (to reduce constant querying): `PLAYER/mcl_playerinfo`
* Explosion API
* Music discs API
* Flowers and flower pots
### 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!
* Panes (like glass panes and iron bars): `ITEMS/xpanes`
* `_on_ignite` callback: `ITEMS/mcl_fire`
* Farming: `ITEMS/mcl_farming`
* Anything related to redstone: Don't touch (yet)
* Any other mod not explicitly mentioned above
### Planned APIs
* Event-based apis to ensure that specific startup code inside of mods can run
in the correct order
* Saplings and trees
* Custom banner patterns
* Custom dimensions
* Custom portals
* Dispenser and dropper support
* Proper sky and weather APIs

View File

@ -6,20 +6,12 @@
## Creator of MineClone2
* Wuzzy
## Creator of Minecraftn't Classic
* ROllerozxa
## Creator of Minecraftn't Pre-classic
* ROllerozxa
## Creator of MinecloneJEpC
* Lazerbeak12345
## MCL2 Maintainers
## Maintainers
* Nicu
* cora
## Previous MCL2 Maintainers
## Previous Maintainers
* Fleckenstein
* jordan4ibanez

220
GROUPS.md Normal file
View File

@ -0,0 +1,220 @@
## Groups
This document explains all the groups used in this game.
### Special groups
* `not_in_creative_inventory=1`: Item will not be shown in creative inventory
* `not_in_craft_guide=1`: Item will not be shown as result or fuel item in crafting guide (but still may be shown as ingredient)
### Digging time groups
The basic digging time groups determine by which tools a node can be dug.
* `pickaxey`: Diggable by pickaxe. The rating is for the possible tool materials in which the node will make its useful drop:
* `pickaxey=1`: Wood, gold, stone, iron and diamond
* `pickaxey=2`: Gold, stone, iron and diamond
* `pickaxey=3`: Stone, iron and diamond
* `pickaxey=4`: Iron and diamond
* `pickaxey=5`: Diamond
* `axey`: Axe. Rating is same as for `pickaxey`
* `shovely`: Shovel. Rating is same as for `pickaxey`
* `swordy=1`: Diggable by sword (any material), and this node is *not* a cobweb
* `swordy_cobweb=1`: Diggable by sword (any material), and this node is a cobweb
* `shearsy=1`: Diggable by shears, and this node is *not* wool
* `shearsy_wool=1`: Diggable by shears, and this node is wool
* `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
Please read <http://minecraft.gamepedia.com/Breaking> to learn how digging times work in Minecraft, as MineClone 2 is based on the same system.
### Groups for interactions
* `crush_after_fall=1`: For falling nodes. These will crush whatever they hit after falling, not dropping as an item
* `falling_node_damage=1`: For falling nodes. Hurts any objects it hits while falling. Damage is based on anvils
* `dig_by_water=1`: Blocks with this group will drop when they are near flowing water
* `destroy_by_lava_flow=1`: Blocks with this group will be destroyed by flowing lava
* `dig_by_piston=1`: Blocks which will drop as an item when pushed by a piston. They also cannot be pulled by sticky pistons
* `cultivatable=2`: Block will be turned into Farmland by using a hoe on it
* `cultivatable=1`: Block will be turned into Dirt by using a hoe on it
* `flammable`: Block spreads fire
* `flammable>0`: Gets destroyed by fire
* `flammable=-1` Does not get destroyed by fire
* `fire_encouragement`: How quickly this block catches fire
* `fire_flammability`: How fast the block will burn away
* `path_creation_possible=1`: Node can be turned into grass path by using a shovel on it
* `spreading_dirt_type=1`: A dirt-type block with a cover (e.g. grass) which may spread to neighbor dirt blocks
* `dirtifies_below_solid=1`: This node turns into dirt immediately when a solid or dirtifier node is placed on top
* `dirtifier=1`: This node turns nodes the above group into dirt when placed above
* `non_mycelium_plant=1`: A plant which can't grow on mycelium. Placing it on mycelium fails and if mycelium spreads below it, it uproots
* `soil=1`: Saplings and other small plants can grow on it
* `soil_sapling=2`: Soil for saplings. Intended to be natural soil. All saplings will grow on this
* `soil_sapling=1`: Artificial soil (such as farmland) for saplings. Some saplings will not grow on this
* `soil_sugarcane=1`: Sugar canes will grow on this near water
* `soil_nether_wart=1`: Nether wart will grow on this
* `enderman_takable=1`: Block can be taken and placed by endermen
* `disable_suffocation=1`: Disables suffocation for full solid cubes (1)
* `destroys_items=1`: If an item happens to be *inside* this node, the item will be destroyed
* `no_eat_delay=1`: Only for foodstuffs. When eating this, all eating delays are ignored.
* `can_eat_when_full=1`: Only for foodstuffs. This item can be eaten when the user has a full hunger bar
* `attached_node_facedir=1`: Like `attached_node`, but for facedir nodes
* `supported_node=1`: Like `attached_node`, but can be placed on any nodes that do not have the `drawtype="airlike"` attribute.
* `cauldron`: Cauldron. 1: Empty. 2-4: Water height
* `anvil`: Anvil. 1: No damage. 2-3: Higher damage levels
* `no_rename=1`: Item cannot be renamed by anvil
* `comparator_signal=X`: If set, this node outputs a constant (!) comparator signal output of strength X.
* `piston=X`: Piston (main body) (1 = normal, 2 = sticky)
* `piston_pusher=X`: Piston pusher (1 = normal, 2 = sticky)
* `hopper=X`: Hopper (1 = downwards, 2 = sideways)
* `portal=1`: Portal (node that teleports players and things by standing inside)
* `end_portal_frame=X`: End portal frame (1 = no eye, 2 = with eye)
* `coral=X`: Coral (any type) (1 = alive, 2 = dead)
* `coral_plant=X`: Coral in the "plant" shape (1 = alive, 2 = dead)
* `coral_fan=X`: Coral fan (1 = alive, 2 = dead)
* `coral_block=X`: Coral block (1 = alive, 2 = dead)
* `coral_species=X`: Specifies the species of a coral; equal X means equal species
* `set_on_fire=X`: Sets any (not fire-resistant) mob or player on fire for X seconds when touching
* `compostability=X`: Item can be used on a composter block; X (1-100) is the % chance of adding a level of compost
#### Footnotes
1. Normally, all walkable blocks with the default 1×1×1 cube as a collision box (e.g. sand,
gravel, stone, but not fences) will damage the players while their head is inside. This
is called “suffocation”. Setting this group disables this behaviour
### Groups (mostly) used for crafting recipes
* `sand=1`: Sand (any color)
* `sandstone=1`: Sandstone (any color) and related nodes (chiseled and the like) (only full blocks)
* `normal_sandstone=1`: “Normal” (yellow) sandstone and related nodes (chiseled and the like) (only full blocks)
* `red_sandstone=1`: Red sandstone and related nodes (chiseled and the like) (only full blocks)
* `hardened_clay=1`: Terracotta (any color)
* `quartz_block=1`: Quartz Block and variants (chiseled, pillar, etc.) (only full blocks)
* `stonebrick=1`: Stone Bricks and related nodes (only full blocks)
* `shulker_box=1`: Block is a shulker box
* `tree=1`: Oak Wood, Birch Wood, etc. (tree trunks)
* `wood=1`: Oak Wood Planks, Birch Wood Planks, etc. (only full blocks)
* `wood_slab=1`: Slabs made out of a kind of wooden planks
* `wood_stairs=1`: Stairs made out of a kind of wooden planks
* `coal=1`: Coal of any kind (lumps only, not blocks)
* `wool=1`: Wool (only full blocks)
* `carpet=1:` (Wool) carpet
* `stick=1`: Stick
* `water_bucket=1`: Bucket containing a liquid of group “water”
* `enchantability=X`: How good the enchantments are the item gets (1 equals book)
* `enchanted=1`: The item is already enchanted, meaning that it can't be enchanted using an enchanting table
* `cobble=1`: Cobblestone of any kind
* `soul_block`: Fire burning on these blocks turns to soul fire, can be used to craft soul torch
### Material groups
These groups correspond to the Minecraft materials. They classify the block into a type, indicating what the block is “made off”.
* `material_stone=1`: Stone
* `material_wood=1`: Wood
* `material_sand=1`: Sand
* `material_glass=1`: Glass
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.
### Declarative groups
These groups are used mostly for informational purposes
* `solid=1`: Solid full-cube block (automatically assigned)
* `opaque=1`: Opaque block (automatically assigned)
* `not_solid=1`: Block is not solid (only assign this group for nodes which are automatically detected as “solid” in error
* `not_opaque=1`: Block is not opaque (only assign this group for nodes which are automatically detected as “opaque” in error
* `fire=1`: Fire
* `water=1`: Water
* `lava=1`: Lava
* `top_snow=X`: Top snow with X layers (1-8)
* `torch`: Torch or torch-like node
* `torch=1`: Torch on floor
* `torch=2`: Torch at wall
* `liquid`: Block is a liquid
* `liquid=1`: Unspecified type
* `liquid=2`: Water
* `liquid=3`: Lava
* `fence=1`: Fence
* `fence_gate=1`: Fence gate
* `fence_wood=1`: Wooden fence
* `fence_nether_brick=1`: Nether brick fence
* `flower_pot`: Flower pot
* `flower_pot=1`: Empty flower pot
* `flower_pot=2`: Flower pot with a plant or flower
* `flower=1`: Flower
* `place_flowerlike=1`: Node has placement rules like that of a flower
* `place_flowerlike=2`: Node has placement rules like tall grass
* `cake`: Cake (rating = slices left)
* `book=1`: Book
* `pane=1`: Node is a “pane”-like node glass pane or iron bars
* `bed=1`: Bed
* `door=1`: Door
* `trapdoor=1`: Closed trapdoor
* `trapdoor=2`: Open trapdoor
* `glass=1`: Glass (full cubes only)
* `rail=1`: Rail
* `music_record`: Item is Music Disc
* `tnt=1`: Block is TNT
* `boat=1`: Boat
* `minecart=1`: Minecart
* `food`: Item is a comestible item which can be consumed (healthy or unhealthy)
* `food=2`: Food
* `food=3`: Drink (including soups)
* `food=1`: Other/unsure
* `eatable`: Item can be *directly* eaten by wielding + right click (`on_use=item_eat`). Rating is the satiation gain
* `cocoa`: Node is a cocoa pod (rating is growth stage, ranging from 1 to 3)
* `ammo=1`: Item is used as ammo for a weapon
* `ammo_bow=1`: Item is used as ammo for bows
* `non_combat_armor=1`: Item can be equipped as armor, but is not made for combat (e.g. zombie head, pumpkin)
* `container`: Node is a container which physically stores items within and has at least 1 inventory
* `container=2`: Has one inventory with list name `"main"`. Items can be placed and taken freely
* `container=3`: Same as `container=2`, but shulker boxes can not be inserted
* `container=4`: Furnace-like, has lists `"src"`, `"fuel"` and `"dst"`.
It is expected that this also reacts on `on_timer`;
the node timer must be started from other mods when they add into `"src"` or `"fuel"`
* `container=5`: Left part of a 2-part horizontal connected container. Both parts have a `"main"` inventory
list. Both inventories are considered to belong together. This is used for large chests.
* `container=6`: Same as above, but for the right part.
* `container=7`: Has inventory list "`main`", no movement allowed
* `container=1`: Other/unspecified container type
* `spawn_egg=1`: Spawn egg
* `pressure_plate=1`: Pressure plate (off)
* `pressure_plate=2`: Wooden pressure (on)
* `button=1`: Button (off)
* `button=2`: Button (on)
* `redstone_torch=1`: Redstone Torch (lit)
* `redstone_torch=2`: Redstone Torch (unlit)
* `plant=1`: Plant or part of a plant
* `double_plant`: Part of a double-sized plant. 1 = lower part, 2 = upper part
* `pickaxe=1`: Pickaxe
* `shovel=1`: Shovel
* `axe=1`: Axe
* `sword=1`: Sword
* `hoe=1`: Hoe (farming tool)
* `shears=1`: Shears
* `weapon=1`: Item is primarily (!) a weapon
* `tool=1`: Item is primarily (!) a tool
* `craftitem=1`: Item is primarily (!) used for crafting
* `brewitem=1`: Item is primarily (!) used in brewing
* `transport=1`: Item is used for transportation
* `building_block=1`: Block is a building block
* `deco_block=1`: Block is a decorational block
* `blast_furnace_smeltable=1` : Item or node is smeltable by a blast furnace
* `smoker_cookable=1` : Food is cookable by a smoker.
## Fake item groups
These groups put similar items together which should all be treated by the gameplay or the GUI as a single item.
You should not add custom items to these groups for no good reason, this is likely to cause a ton of conflicts.
* `clock`: Clock (rating indicates the “frame”)
* `compass`: Compass (rating indicates the “frame”)
This has the following implication: If you want to use a compass or clock in a crafting recipe, you *must*
use `group:compass` or `group:clock`, respectively.

View File

@ -5,11 +5,10 @@ Copying is an act of love. Please copy and share! <3
Here's the detailed legalese for those who need it:
## License of source code
MineCloneJEpC (by kay27, EliasFleckenstein, Wuzzy, ROllerozxa,
Lazerbeak12345, davedevils and countless others) is an imitation
of Minecraft.
MineClone 2 (by kay27, EliasFleckenstein, Wuzzy, davedevils and countless others)
is an imitation of Minecraft.
MineCloneJEpC is free software: you can redistribute it and/or modify
MineClone 2 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.
@ -26,15 +25,12 @@ You can choose which license applies to you: Either the
license of MineClone 2 (GNU GPLv3) or the mod's license.
MineClone 2 is a direct continuation of the discontinued MineClone
project by davedevils. MineCloneJEpC is a fork of MineClone 2, which
was merged by Lazerbeak12345 with Minecraftn't Pre-classic by
ROllerozxa, a fork of Minecraftn't Classic by ROllerozxa, which is a
fork of MineClone 2.
project by davedevils.
Mod credits:
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
of MineCloneJEpC and the author is documented in the git history.
of MineClone 2 and the author is Wuzzy.
## License of media (textures and sounds)
No non-free licenses are used anywhere.
@ -54,9 +50,3 @@ http://creativecommons.org/licenses/by-sa/3.0/
See README.txt in each mod directory for detailed information about other authors.
Due to potential copyright problems with Minecraftn't Classic and
Pre-classic at one point containing assets copyrighted by Mojang
(which none of these projects are associated with), when manually
cherry-picking the code from Minecraftn't Pre-classic to be forked on
top of MCL2, I made sure to exclude anything that might be copyrighted
by Mojang.

223
README.md
View File

@ -1,120 +1,195 @@
# MineCloneJEpC
An unofficial Minecraft-like game for Minetest. Forked from MineClone 2 by Wuzzy
and merged with Minecraftn't Pre-classic by ROllerozxa
# MineClone2
An unofficial Minecraft-like game for Minetest. Forked from MineClone by davedevils.
Developed by many people. Not developed or endorsed by Mojang AB.
Version: 0.1 (in development)
Version: 0.75 (in development)
SPECIFIC VERSION OF MINECRAFT CLONED: `old_alpha rd-132211`
### Gameplay
You start in a randomly-generated world made entirely of cubes. You can explore
the world and dig and build almost every block in the world to create new
structures. You can choose to play in a “survival mode” in which you have to
fight monsters and hunger for survival and slowly progress through the
various other aspects of the game, such as mining, farming, building machines, and so on
Or you can play in “creative mode” in which you can build almost anything instantly.
## Purpose and method
### Purpose
The primary purpose of this game is to improove MineClone 2 by researching the
development of Minecraft through implimenting each important release in-order.
As a side-effect, this will mean each release is a playable game on it's own -
but if this project ever catches up to MineClone 2, it will _not_ duplicate
code, and will avoid cloning the exact version that project is cloning.
### Method
- Make a game that clones the oldest Minecraft release.
- Make a modpack for each release following, that expands that game to become a
clone of the modpack's release.
- Where only absolutely necessary, fork the game to make a release. All future
modpacks are to be based on the new game. Such an example would be where making
a change to the `game.conf` file is the only option.
## Gameplay
You start in a flat world made entirely of cubes. You can explore the world and
dig almost every block in the world, and can use cobblestone to create new
structures.
Keeping true to the exact version of Minecraft that this is cloning, it's pretty
bare. There are only grass and cobblestone blocks. (TODO) Press the action key
to respawn.
### Gameplay summary
#### Gameplay summary
* Sandbox-style gameplay, no goals
* Use blocks to create great buildings, your imagination is the limit
* You can build almost anything for free (no cost) and without limit
* Survive: Fight against hostile monsters and hunger
* Mine for ores and other treasures
* Magic: Gain experience and enchant your tools
* Use the collected blocks to create great buildings, your imagination is the limit
* Collect flowers (and other dye sources) and colorize your world
* Find some seeds and start farming
* Find or craft one of hundreds of items
* Build a railway system and have fun with minecarts
* Build complex machines with redstone circuits
* In creative mode you can build almost anything for free and without limits
## How to play (quick start)
### Getting started
- Mine with right click
- Place with left click
- Walk around
* **Punch a tree** trunk until it breaks and collect wood
* Place the **wood into the 2×2 grid** (your “crafting grid” in your inventory menu and craft 4 wood planks
* Place the 4 wood planks in a 2×2 shape in the crafting grid to **make a crafting table**
* **Rightclick the crafting table** for a 3×3 crafting grid to craft more complex things
* Use the **crafting guide** (book icon) to learn all the possible crafting recipes
* **Craft a wooden pickaxe** so you can dig stone
* Different tools break different kinds of blocks. Try them out!
* Continue playing as you wish. Have fun!
### Farming
* Find seeds
* Craft hoe
* Rightclick dirt or similar block with hoe to create farmland
* Place seeds on farmland and watch them grow
* Collect plant when fully grown
* If near water, farmland becomes wet and speeds up growth
### Furnace
* Craft furnace
* Furnace allows you to obtain more items
* Upper slot must contain a smeltable item (example: iron ore)
* Lower slot must contain a fuel item (example: coal)
* See tooltips in crafting guide to learn about fuels and smeltable items
### Additional help
More help about the gameplay, blocks items and much more can be found from inside
the game. You can access the help from your inventory menu.
### Special items
The following items are interesting for Creative Mode and for adventure
map builders. They can not be obtained in-game or in the creative inventory.
* Barrier: `mcl_core:barrier`
Use the `/giveme` chat command to obtain them. See the in-game help for
an explanation.
## Installation
This game requires [Minetest](http://minetest.net) to run (version 5.4.1 or
later). Older versions might work, but this is untested. So you need to install
Minetest first. Only stable versions of Minetest are officially supported.
There is no support for running MineCloneJEpC on development versions of
Minetest.
later). So you need to install Minetest first. Only stable versions of Minetest
are officially supported.
There is no support for running MineClone2 in development versions of Minetest.
To install MineCloneJEpC (if you haven't already), move this directory into
the “games” directory of your Minetest data directory. Consult the help of
To install MineClone2 (if you haven't already), move this directory into the
“games” directory of your Minetest data directory. Consult the help of
Minetest to learn more.
## Useful links
The MineCloneJEpC repository is hosted at Mesehub. To contribute or report issues, head there.
The MineClone2 repository is hosted at Mesehub. To contribute or report issues, head there.
* Mesehub: <https://git.minetest.land/Lazerbeak12345/MineCloneJEpC>
Here's the Minecraft wiki page on the version of Minecraft that this is cloning.
<https://minecraft.fandom.com/wiki/Java_Edition_pre-Classic_rd-132211>
* Mesehub: <https://git.minetest.land/MineClone2/MineClone2>
* Discord: <https://discord.gg/xE4z8EEpDC>
* YouTube <https://www.youtube.com/channel/UClI_YcsXMF3KNeJtoBfnk9A>
* IRC: <https://web.libera.chat/#mineclone2>
* Matrix: <https://app.element.io/#/room/#mc2:matrix.org>
* Reddit: <https://www.reddit.com/r/MineClone2/>
* Minetest forums: <https://forum.minetest.net/viewtopic.php?f=50&t=16407>
* ContentDB: <https://content.minetest.net/packages/wuzzy/mineclone2/>
* OpenCollective: <https://opencollective.com/mineclone2>
## Target
- Crucially, create a stable, moddable, free/libre clone of Minecraft
`old_alpha rd-132211` based on the Minetest engine with polished features.
No other features will be added - though modifications to apis will be, if
they facilitate making mods or modpacks to expand this game to clone a newer
version of Minecraft.
based on the Minetest engine with polished features, usable in both
singleplayer and multiplayer. Currently, most of **Minecraft Java
Edition 1.12.2** features are already implemented and polishing existing
features are prioritized over new feature requests.
- With lessened priority yet strictly, implement features targetting
**Minecraft version 1.17 + OptiFine** (OptiFine only as far as supported
by the Minetest Engine). This means features in parity with the listed
Minecraft experiences are prioritized over those that don't fulfill this
scope.
- Optionally, create a performant experience that will run relatively
well on really low spec computers. Unfortunately, due to Minecraft's
mechanisms and Minetest engine's limitations along with a very small
playerbase on low spec computers, optimizations are hard to investigate.
## Completion status
This game is currently in **pre-alpha** stage.
It is playable, but has a few tweaks left.
This game is currently in **beta** stage.
It is playable, but not yet feature-complete.
Backwards-compability is not entirely guaranteed, updating your world might cause small bugs.
If you want to use the git version of MineClone2 in production, consider using the production branch.
It is updated weekly and contains relatively stable code for servers.
These things need figured out, and I don't know how to do them:
The following main features are available:
* In this edition of minecraft, a left-click places, and a right-click mines.
(opposite of later versions, and of Minetest defaults)
* A way for modpacks to change values in `game.conf` (This will only effect how mods expanding this game function)
* mapgen
* gamemodes
* etc.
* Tools, weapons
* Armor
* Crafting system: 2×2 grid, crafting table (3×3 grid), furnace, including a crafting guide
* Chests, large chests, ender chests, shulker boxes
* Furnaces, hoppers
* Hunger
* Most monsters and animals
* All ores from Minecraft
* Most blocks in the overworld
* Water and lava
* Weather
* 28 biomes
* The Nether, a fiery underworld in another dimension
* Redstone circuits (partially)
* Minecarts (partial)
* Status effects (partial)
* Experience
* Enchanting
* Brewing, potions, tipped arrow (partial)
* Boats
* Fire
* Buidling blocks: Stairs, slabs, doors, trapdoors, fences, fence gates, walls
* Clock
* Compass
* Sponge
* Slime block
* Small plants and saplings
* Dyes
* Banners
* Deco blocks: Glass, stained glass, glass panes, iron bars, hardened clay (and colors), heads and more
* Item frames
* Jukeboxes
* Beds
* Inventory menu
* Creative inventory
* Farming
* Writable books
* Commands
* Villages
* The End
* And more!
The following main features are available (including features I must now remove):
The following features are incomplete:
* Blocks in the overworld
* Buidling blocks: Stone, Dirt
* Commands (TO BE REMOVED)
* Some monsters and animals
* Redstone-related things
* Special minecarts
* A couple of non-trivial blocks and items
Bonus features (not found in Minecraft 1.12):
* Built-in crafting guide which shows you crafting and smelting recipes
* In-game help system containing extensive help about gameplay basics, blocks, items and more
* Temporary crafting recipes. They only exist to make some otherwise unaccessible items available when you're not in creative mode. These recipes will be removed as development goes on an more features become available
* Saplings in chests in mapgen v6
* Fully moddable (thanks to Minetest's powerful Lua API)
* And more! (It's a lot of work to remove - but not so much anymore thanks to ROllerozxa)
* New blocks and items:
* Lookup tool, shows you the help for whatever it touches
* More slabs and stairs
* Nether Brick Fence Gate
* Red Nether Brick Fence
* Red Nether Brick Fence Gate
Technical differences from Minecraft:
* Height limit of ca. 31000 blocks (much higher than in Minecraft)
* Horizontal world size is ca. 62000×62000 blocks (much smaller than in Minecraft, but it is still very large)
* Still very incomplete and buggy
* Blocks, items and other features that shouldn't be there
* Blocks, items, enemies and other features are missing
* A few items have slightly different names to make them easier to distinguish
* Different music for jukebox
* Different textures (Pixel Perfection)
* Different sounds (various sources) (TO BE REMOVED)
* Different sounds (various sources)
* Different engine (Minetest)
* Different easter eggs
… and finally, MineCloneJEpC is free software (“free” as in “freedom”)!
… and finally, MineClone2 is free software (“free” as in “freedom”)!
## Other readme files

View File

@ -0,0 +1,324 @@
# MineClone 2
一個非官方的Minetest遊戲遊玩方式和Minecraft類似。由davedevils從MineClone分拆。
由許多人開發。並非由Mojang Studios開發。<!-- "Mojang AB"'s Name changed at 2020/05, main README should change too -->
版本0.71.0
### 遊玩
你開始在一個完全由方塊隨機生成的世界裡。你可以探索這個世界,挖掘和建造世界上幾乎所有的方塊,以創造新的結構。你可以選擇在「生存模式」中進行遊戲,在這個模式中,你必須與怪物戰鬥,飢餓求生,並在遊戲的其他各個環節中慢慢進步,如採礦、養殖、建造機器等等。
或者你也可以在「創造模式」中玩,在這個模式中,你可以瞬間建造大部分東西。
#### Gameplay summary
* 沙盒式遊戲,沒有明確目標
* 生存:與怪物和飢餓搏鬥
* 挖礦來獲得礦物和寶物
* 附魔:獲得經驗值並以附魔強化你的工具
* 使用收集的方塊來創造偉大的建築
* 收集鮮花(和其他染料來源),令世界多姿多彩
* 找些種子並開始耕種
* 尋找或合成數百個物品之一
* 建立一個鐵路系統,並從礦車中得到樂趣
* 用紅石電路建造複雜的機器
* 在創造模式下,你幾乎可以免費建造任何東西,而且沒有限制。
## 如何開始
### 開始生存
* **挖樹幹**直到其破裂並收集木材
* 將木頭**放入2×2的格子中**你的物品欄中的「合成格子」然後製作4塊木材。
* 將4塊木材按2×2的形狀擺放在合成格子裡製作成合成臺。
* **右鍵單擊製作臺**以獲得3×3製作網格製作更複雜的東西
* 使用**合成指南**(書形圖標)了解所有可能的合成方式
* **製作一個木鎬**,這樣你就可以挖石頭了。
* 不同的工具可以打破不同種類的方塊。試試吧!
* 繼續玩你想玩的。盡情享受吧!
### 耕種
* 找到種子
* 合成鋤頭
* 用鋤頭右鍵點擊泥土或類似的方塊,創建農田
* 將種子放在農田上,看著它們長出來
* Collect plant when fully grown
* If near water, farmland becomes wet and speeds up growth
### Furnace
* Craft furnace
* Furnace allows you to obtain more items
* Upper slot must contain a smeltable item (example: iron ore)
* Lower slot must contain a fuel item (example: coal)
* See tooltips in crafting guide to learn about fuels and smeltable items
### Additional help
More help about the gameplay, blocks items and much more can be found from inside
the game. You can access the help from your inventory menu.
### Special items
The following items are interesting for Creative Mode and for adventure
map builders. They can not be obtained in-game or in the creative inventory.
* Barrier: `mcl_core:barrier`
Use the `/giveme` chat command to obtain them. See the in-game help for
an explanation.
#### Incomplete items
These items do not work yet, but you can get them with `/giveme` for testing:
* Minecart with Chest: `mcl_minecarts:chest_minecart`
* Minecart with Furnace: `mcl_minecarts:furnace_minecart`
* Minecart with Hopper: `mcl_minecarts:hopper_minecart`
* Minecart with Command Block: `mcl_minecarts:command_block_minecart`
## Installation
This game requires [Minetest](http://minetest.net) to run (version 5.0.0 or
later). So you need to install Minetest first. Only stable versions of Minetest
are officially supported.
There is no support for running MineClone 2 in development versions of Minetest.
To install MineClone 2 (if you haven't already), move this directory into the
“games” directory of your Minetest data directory. Consult the help of
Minetest to learn more.
## Project description
The main goal of **MineClone 2** is to be a clone of Minecraft and to be released as free software.
* **開發目標:我的世界, Java版, 版本 1.12**
* MineClone2還包括Minetest支持的Optifine功能。
* 後期Minecraft版本的功能可能會偷偷加入但它們的優先級較低。
* 總的來說Minecraft的目標是在Minetest目前允許的情況下進行克隆。
* 克隆Minecraft是最優先的。
* MineClone2將使用不同的圖形和聲音但風格相似。
* 克隆界面沒有優先權。只會被粗略地模仿。
* 在Minetest中發現的局限性將在開發過程中被記錄和報告。
## 完成程度
該遊戲目前處於**alpha**階段。
它是可玩的,但尚未完成,預計會出現許多錯誤。
向後兼容性是**不能保證的**更新你的世界可能會造成大大小小的bug比如「缺少節點」的錯誤甚至崩潰
已經實現以下功能:
* 工具,武器
* 盔甲
* 合成和熔煉系統2×2 合成格, 合成臺 (3×3 合成格), 熔爐, 合成教學
* 儲物箱,大型儲物箱,終界箱和界伏盒
* 熔爐, 漏斗
* 飢餓和飽食
* 大多數怪物和動物
* Minecraft 1.12中的所有礦物<!-- Minecraft 1.17 added copper, so here must mark the version is 1.12, then main README should also add this -->
* 主世界的大部分方塊
* 水和岩漿
* 天氣
* 28個生態域
* 地獄,熾熱的維度
* 紅石電路(部分)
* 礦車(部分)
* 狀態效果(部分)
* 經驗系統
* 附魔
* 釀造,藥水,藥水箭(部分)
* 船
* 火
* 建築方塊:樓梯、半磚、門、地板門、柵欄、柵欄門、牆。
* 時鐘
* 指南針
* 海綿
* 史萊姆方塊(不與紅石互動)
* 小植物和樹苗
* 染料
* 旗幟
* 裝飾方塊:玻璃、染色玻璃、玻璃片、鐵柵欄、陶土(和染色版本)、頭顱等
* 物品展示框
* 唱片機
* 床
* 物品欄
* 創造模式物品欄
* 生產
* 書和羽毛筆
* 一些服務器命令
* 還有更多!
以下是不完整的特性:
* 生成結構(特別是村莊)
* 一些怪物和動物
* 紅石系統
* 終界
* 特殊的礦車
* 一些不簡單的方塊和物品。
額外功能在Minecraft 1.11中沒有)。
* 內置合成指南,向你展示製作和熔煉的配方
* 遊戲中的幫助系統包含了大量關於遊戲基礎知識、方塊、物品等方面的幫助。
* 臨時製作配方。它們的存在只是為了在你不在創造模式下時,提供一些其他無法獲得的物品。這些配方將隨著開發的進行和更多功能的出現而被移除。
* v6地圖生成器中箱子裡的樹苗。
* 完全可修改得益於Minetest強大的Lua API
* 新的方塊和物品:
* 查找工具,顯示觸及事物的幫助
* 更多的半磚和樓梯
* 地獄磚柵欄門
* 紅地獄磚柵欄
* 紅地獄磚柵欄門
與Minecraft的技性術差異
* 高度限制為31000格(遠高於Minecraft)
* 水平世界大小約為62000×62000格比Minecraft中的小得多但仍然非常大
* 仍然非常不完整和有問題
* 塊、物品、敵人和其他功能缺失。
* 一些項目的名稱略有不同,以便於區分。
* 唱片機的音樂不同
* 不同的材質(像素完美)
* 不同的聲音(各種來源)
* 不同的引擎Minetest
...最後MineClone2是自由軟件
## 錯誤報告
請在此處報告所有錯誤和缺少的功能:
<https://git.minetest.land/MineClone2/MineClone2/issues>
## Chating with the community
我們有Discord交流羣
<https://discord.gg/84GKcxczG3>
## Other readme files
* `LICENSE.txt`GPLv3許可文本
* `CONTRIBUTING.md`: 為那些想參與貢獻的人提供資訊
* `MISSING_ENGINE_FEATURES.md`: MineClone2需要改进Minetest中缺失的功能列表。
* `API.md`: 關於MineClone2的API
## 參與者
有這麼多人要列出抱歉。詳情請查看各mod目錄。本節只是粗略地介紹了本遊戲的核心作者。
### 程式碼
* [Wuzzy](https://forum.minetest.net/memberlist.php?mode=viewprofile&u=3082)大多數mod的主要程序員已退休
* davedevilsMineClone 2的原型——「MineClone」的創造者
* [ex-bart](https://github.com/ex-bart):紅石比較器
* [Rootyjr](https://github.com/Rootyjr):釣竿和錯誤修復
* [aligator](https://github.com/aligator):改進門
* [ryvnf](https://github.com/ryvnf):爆炸物理
* MysticTempest錯誤修復
* [bzoss](https://github.com/bzoss):狀態效果,釀造,藥水
* kay27 <kay27@bk.ru>:經驗系統,錯誤修復和優化(當前維護者)
* [EliasFleckenstein03](https://github.com/EliasFleckenstein03):終界水晶,附魔,燃燒的怪物/玩家,箱子的動畫和錯誤修復(當前維護者)
* epCode更好的玩家動畫新徽標
* 2mac修復動力鐵軌的錯誤
* 更多:待篇寫 (請查看各mod目錄)
#### Mod概括
* `controls`: Arcelmi
* `flowlib`: Qwertymine13
* `walkover`: lordfingle
* `drippingwater`: kddekadenz
* `mobs_mc`: maikerumine, 22i and others
* `awards`: rubenwardy
* `screwdriver`: RealBadAngel, Maciej Kastakin, Minetest contributors
* `xpanes`: Minetest contributors
* `mesecons` mods: Jeija and contributors
* `wieldview`: Stuart Jones
* `mcl_meshhand`: Based on `newhand` by jordan4ibanez
* `mcl_mobs`: Based on Mobs Redo [`mobs`] by TenPlus1 and contributors
* 大多其他的Mod: Wuzzy
每个mod的详细參與者可以在各个mod目录中找到。
### 圖形
* [XSSheep](http://www.minecraftforum.net/members/XSSheep)主要作者Minecraft 1.11的Pixel Perfection资源包的制作者
* [Wuzzy](https://forum.minetest.net/memberlist.php?mode=viewprofile&u=3082):主菜單圖像和各種編輯和添加的材質包
* [kingoscargames](https://github.com/kingoscargames):現有材質的各種編輯和添加
* [leorockway](https://github.com/leorockway):怪物紋理的一些編輯
* [xMrVizzy](https://minecraft.curseforge.com/members/xMrVizzy):釉陶(材質以後會被替換)
* yutyo <tanakinci2002@gmail.com>MineClone2標志
* 其他GUI圖片
### 翻譯
* Wuzzy德語
* Rocher Laurent <rocherl@club-internet.fr>:法語
* wuniversales西班牙語
* kay27 <kay27@bk.ru>:俄語
* [Emoji](https://toyshost2.ddns.net):繁體中文<!-- Hi, after the translate finish, this name should add to the main README too! -->
### 模型
* [22i](https://github.com/22i):所有模型的作者
* [tobyplowy](https://github.com/tobyplowy)對上述模型進行UV映射修復
### 聲音和音樂
多種來源。 有關詳細信息請參見相應的mod目錄。
### 特殊感謝
* Wuzzy感謝他啟動和維護MineClone2多年。
* celeron55創建Minetest。
* Minetest的社區提供了大量的mods選擇其中一些最終被納入MineClone 2。
* Jordach為《Big Freaking Dig》的唱片機音樂合輯而來
* 花了太多時間為Minecraft Wiki寫作的工作狂。它是創建這個遊戲的寶貴資源。
* Notch和Jeb是Minecraft背后的主要力量
* XSSheep用於創建Pixel Perfection資源包。
* [22i](https://github.com/22i) 提供出色的模型和支持
* [maikerumine](http://github.com/maikerumine) 揭開生物和生物群落的序幕
## 給程序員的信息
你可以在「API.md」中找到有趣和有用的信息。
## 法律信息
這是一款粉絲開發的遊戲並非由Mojang AB開發或認可。
複製是一種愛的行為。請複制和分享! <3
下面是詳細的法律條文,有需要的朋友可以參考。
### License of source code
```
MineClone 2 (by kay27, EliasFleckenstein, Wuzzy, davedevils and countless others)
is an imitation of Minecraft.
MineClone 2 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 (in the LICENSE.txt file) for more
details.
In the mods you might find in the read-me or license
text files a different license. This counts as dual-licensing.
You can choose which license applies to you: Either the
license of MineClone 2 (GNU GPLv3) or the mod's license.
MineClone 2 is a direct continuation of the discontinued MineClone
project by davedevils.
Mod credits:
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
of MineClone 2 and the author is Wuzzy.
```
### License of media (textures and sounds)
```
No non-free licenses are used anywhere.
The textures, unless otherwise noted, are based on the Pixel Perfection resource pack for Minecraft 1.11,
authored by XSSheep. Most textures are verbatim copies, while some textures have been changed or redone
from scratch.
The glazed terracotta textures have been created by (MysticTempest)[https://github.com/MysticTempest].
Source: <https://www.planetminecraft.com/texture_pack/131pixel-perfection/>
License: [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)
The main menu images are release under: [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
All other files, unless mentioned otherwise, fall under:
Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/
See README.txt in each mod directory for detailed information about other authors.
```

View File

@ -1 +1 @@
A clone of a historic sandbox game, Mincraft rd-132211. Mine, build and explore. This is a work in progress! Expect bugs!
A survival sandbox game. Survive, gather, hunt, mine, build, explore, and do much more. Faithful clone of Minecraft 1.12. This is a work in progress! Expect bugs!

View File

@ -1,5 +1,2 @@
name = MineCloneJEpC
description = A clone of a historic sandbox game. Build, explore, and do little more.
disabled_settings = enable_damage,creative_mode,enable_server
allowed_mapgens = singlenode
disallowed_mapgen_settings = seed
title = MineClone 2
description = A survival sandbox game. Survive, gather, hunt, build, explore, and do much more.

View File

@ -4,7 +4,44 @@
# They will override these settings
# Basic game rules
item_entity_ttl = 1
# This wasn't working, so I've also specified this in `mcljepc_core`
time_speed = 0
node_highlighting = halo
time_speed = 72
# Player physics
movement_acceleration_default = 2.4
movement_acceleration_air = 1.2
#movement_acceleration_fast = 10
movement_speed_walk = 4.317
movement_speed_crouch = 1.295
movement_speed_fast = 25.0
movement_speed_jump = 6.6
movement_speed_climb = 2.35
# TODO: Add descend speed (3.0) when available
movement_liquid_fluidity = 1.13
movement_liquid_fluidity_smooth = 0.5
movement_liquid_sink = 23
movement_gravity = 10.4
# Mapgen stuff
# altitude_chill and altitude_dry doesn't go well together with MCL2 biomes
# which already include "snowed" variants as you go higher.
# humid_rivers would cause the MushroomIsland biome to appear frequently around rivers.
mgvalleys_spflags = noaltitude_chill,noaltitude_dry,nohumid_rivers,vary_river_depth
# MCL2-specific stuff
keepInventory = false
# Performance settings
dedicated_server_step = 0.05 #tick rate
# abm_interval = 0.25
# max_objects_per_block = 4096
# max_packets_per_iteration = 10096
# Clientmodding to support official client
enable_client_modding = true
csm_restriction_flags = 0
enable_mod_channels = true

View File

@ -0,0 +1,15 @@
This mod automatically adds groups to items based on item metadata.
Specifically, this mod has 2 purposes:
1) Automatically adding the group “solid” for blocks considered “solid” in Minecraft.
2) Generating digging time group for all nodes based on node metadata (it's complicated)
This mod also requires another mod called “mcl_autogroup” to function properly.
“mcl_autogroup” exposes the API used to register digging groups, while this mod
uses those digging groups to set the digging time groups for all the nodes and
tools.
See init.lua for more infos.
The leading underscore in the name “_mcl_autogroup” was added to force Minetest to load this mod as late as possible.
As of 0.4.16, Minetest loads mods in reverse alphabetical order.

View File

@ -0,0 +1,367 @@
--[[
This mod implements a HACK to make 100% sure the digging times of all tools
match Minecraft's perfectly. The digging times system of Minetest is very
different, so this weird group trickery has to be used. In Minecraft, each
block has a hardness and the actual Minecraft digging time is determined by
this:
1) The block's hardness
2) The tool being used (the tool speed and its efficiency level)
3) Whether the tool is considered as "eligible" for the block
(e.g. only diamond pick eligible for obsidian)
See Minecraft Wiki <http://minecraft.gamepedia.com/Minecraft_Wiki> for more
information.
How the mod is used
===================
In MineClone 2, all diggable nodes have the hardness set in the custom field
"_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 are registered using the following code:
mcl_autogroup.register_diggroup("shovely")
mcl_autogroup.register_diggroup("pickaxey", {
levels = { "wood", "gold", "stone", "iron", "diamond" }
})
The first line registers a simple digging group. The second line registers a
digging group with 5 different levels (in this case one for each material of a
pickaxes).
Nodes indicate that they belong to a particular digging group by being member of
the digging group in their node definition. "mcl_core:dirt" for example has
shovely=1 in its groups. If the digging group has multiple levels the value of
the group indicates which digging level the node requires.
"mcl_core:stone_with_gold" for example has pickaxey=4 because it requires a
pickaxe of level 4 be mined.
For tools to be able to dig nodes of digging groups they need to use the have
the custom field "_mcl_diggroups" function to get the groupcaps. The value of
this field is a table which defines which groups the tool can dig and how
efficiently.
_mcl_diggroups = {
handy = { speed = 1, level = 1, uses = 0 },
pickaxey = { speed = 1, level = 0, uses = 0 },
}
The "uses" field indicate how many uses (0 for infinite) a tool has when used on
the specified digging group. The "speed" field is a multiplier to the dig speed
on that digging group.
The "level" field indicates which levels of the group the tool can harvest. A
level of 0 means that the tool cannot harvest blocks of that node. A level of 1
or above means that the tool can harvest nodes with that level or below. See
"mcl_tools/init.lua" for examples on how "_mcl_diggroups" is used in practice.
Information about the mod
=========================
The mod is split up into two parts, mcl_autogroup and _mcl_autogroup.
mcl_autogroup contains the API functions used to register custom digging groups.
_mcl_autogroup contains most of the code. The leading underscore in the name
"_mcl_autogroup" is used to force Minetest to load that part of the mod as late
as possible. Minetest loads mods in reverse alphabetical order.
This also means that it is very important that no mod adds _mcl_autogroup as a
dependency.
--]]
assert(minetest.get_modpath("mcl_autogroup"), "This mod requires the mod mcl_autogroup to function")
-- Returns a table containing the unique "_mcl_hardness" for nodes belonging to
-- each diggroup.
local function get_hardness_values_for_groups()
local maps = {}
local values = {}
for g, _ in pairs(mcl_autogroup.registered_diggroups) do
maps[g] = {}
values[g] = {}
end
for _, ndef in pairs(minetest.registered_nodes) do
for g, _ in pairs(mcl_autogroup.registered_diggroups) do
if ndef.groups[g] then
maps[g][ndef._mcl_hardness or 0] = true
end
end
end
for g, map in pairs(maps) do
for k, _ in pairs(map) do
table.insert(values[g], k)
end
end
for g, _ in pairs(mcl_autogroup.registered_diggroups) do
table.sort(values[g])
end
return values
end
-- Returns a table containing a table indexed by "_mcl_hardness_value" to get
-- its index in the list of unique hardnesses for each diggroup.
local function get_hardness_lookup_for_groups(hardness_values)
local map = {}
for g, values in pairs(hardness_values) do
map[g] = {}
for k, v in pairs(values) do
map[g][v] = k
end
end
return map
end
-- Array of unique hardness values for each group which affects dig time.
local hardness_values = get_hardness_values_for_groups()
-- Map indexed by hardness values which return the index of that value in
-- hardness_value. Used for quick lookup.
local hardness_lookup = get_hardness_lookup_for_groups(hardness_values)
--[[local function compute_creativetimes(group)
local creativetimes = {}
for index, hardness in pairs(hardness_values[group]) do
table.insert(creativetimes, 0)
end
return creativetimes
end]]
-- Get the list of digging times for using a specific tool on a specific
-- diggroup.
--
-- Parameters:
-- group - the group which it is digging
-- can_harvest - if the tool can harvest the block
-- speed - dig speed multiplier for tool (default 1)
-- efficiency - efficiency level for the tool if applicable
local function get_digtimes(group, can_harvest, speed, efficiency)
local speed = speed or 1
if efficiency then
speed = speed + efficiency * efficiency + 1
end
local digtimes = {}
for index, hardness in pairs(hardness_values[group]) do
local digtime = (hardness or 0) / speed
if can_harvest then
digtime = digtime * 1.5
else
digtime = digtime * 5
end
if digtime <= 0.05 then
digtime = 0
else
digtime = math.ceil(digtime * 20) / 20
end
table.insert(digtimes, digtime)
end
return digtimes
end
-- Get one groupcap field for using a specific tool on a specific group.
local function get_groupcap(group, can_harvest, multiplier, efficiency, uses)
return {
times = get_digtimes(group, can_harvest, multiplier, efficiency),
uses = uses,
maxlevel = 0,
}
end
-- Add the groupcaps from a field in "_mcl_diggroups" to the groupcaps of a
-- tool.
local function add_groupcaps(toolname, groupcaps, groupcaps_def, efficiency)
if not groupcaps_def then
return
end
for g, capsdef in pairs(groupcaps_def) do
local mult = capsdef.speed or 1
local uses = capsdef.uses
local def = mcl_autogroup.registered_diggroups[g]
local max_level = def.levels and #def.levels or 1
assert(capsdef.level, toolname .. ' is missing level for ' .. g)
local level = math.min(capsdef.level, max_level)
if def.levels then
groupcaps[g .. "_dig_default"] = get_groupcap(g, false, mult, efficiency, uses)
if level > 0 then
groupcaps[g .. "_dig_" .. def.levels[level]] = get_groupcap(g, true, mult, efficiency, uses)
end
else
groupcaps[g .. "_dig"] = get_groupcap(g, level > 0, mult, efficiency, uses)
end
end
end
-- Checks if the given node would drop its useful drop if dug by a given tool.
-- Returns true if it will yield its useful drop, false otherwise.
function mcl_autogroup.can_harvest(nodename, toolname)
local ndef = minetest.registered_nodes[nodename]
if not ndef then
return false
end
if minetest.get_item_group(nodename, "dig_immediate") >= 2 then
return true
end
-- Check if it can be dug by tool
local tdef = minetest.registered_tools[toolname]
if tdef and tdef._mcl_diggroups then
for g, gdef in pairs(tdef._mcl_diggroups) do
if ndef.groups[g] then
if ndef.groups[g] <= gdef.level then
return true
end
end
end
end
-- Check if it can be dug by hand
local tdef = minetest.registered_tools[""]
if tdef then
for g, gdef in pairs(tdef._mcl_diggroups) do
if ndef.groups[g] then
if ndef.groups[g] <= gdef.level then
return true
end
end
end
end
return false
end
-- Get one groupcap field for using a specific tool on a specific group.
--[[local function get_groupcap(group, can_harvest, multiplier, efficiency, uses)
return {
times = get_digtimes(group, can_harvest, multiplier, efficiency),
uses = uses,
maxlevel = 0,
}
end]]
-- Returns the tool_capabilities from a tool definition or a default set of
-- tool_capabilities
local function get_tool_capabilities(tdef)
if tdef.tool_capabilities then
return tdef.tool_capabilities
end
-- If the damage group and punch interval from hand is not included,
-- then the user will not be able to attack with the tool.
local hand_toolcaps = minetest.registered_tools[""].tool_capabilities
return {
full_punch_interval = hand_toolcaps.full_punch_interval,
damage_groups = hand_toolcaps.damage_groups
}
end
-- Get the groupcaps for a tool. This function returns "groupcaps" table of
-- digging which should be put in the "tool_capabilities" of the tool definition
-- or in the metadata of an enchanted tool.
--
-- Parameters:
-- toolname - Name of the tool being enchanted (like "mcl_tools:diamond_pickaxe")
-- efficiency - The efficiency level the tool is enchanted with (default 0)
--
-- NOTE:
-- This function can only be called after mod initialization. Otherwise a mod
-- would have to add _mcl_autogroup as a dependency which would break the mod
-- loading order.
function mcl_autogroup.get_groupcaps(toolname, efficiency)
local tdef = minetest.registered_tools[toolname]
local groupcaps = table.copy(get_tool_capabilities(tdef).groupcaps or {})
add_groupcaps(toolname, groupcaps, tdef._mcl_diggroups, efficiency)
return groupcaps
end
-- Get the wear from using a tool on a digging group.
--
-- Parameters
-- toolname - Name of the tool used
-- diggroup - The name of the diggroup the tool is used on
--
-- NOTE:
-- This function can only be called after mod initialization. Otherwise a mod
-- would have to add _mcl_autogroup as a dependency which would break the mod
-- loading order.
function mcl_autogroup.get_wear(toolname, diggroup)
local tdef = minetest.registered_tools[toolname]
local uses = tdef._mcl_diggroups[diggroup].uses
return math.ceil(65535 / uses)
end
local function overwrite()
for nname, ndef in pairs(minetest.registered_nodes) do
local newgroups = table.copy(ndef.groups)
if (nname ~= "ignore" and ndef.diggable) then
-- Automatically assign the "solid" group for solid nodes
if (ndef.walkable == nil or ndef.walkable == true)
and (ndef.collision_box == nil or ndef.collision_box.type == "regular")
and (ndef.node_box == nil or ndef.node_box.type == "regular")
and (ndef.groups.not_solid == 0 or ndef.groups.not_solid == nil) then
newgroups.solid = 1
end
-- Automatically assign the "opaque" group for opaque nodes
if (not (ndef.paramtype == "light" or ndef.sunlight_propagates)) and
(ndef.groups.not_opaque == 0 or ndef.groups.not_opaque == nil) then
newgroups.opaque = 1
end
--local creative_breakable = false
-- Assign groups used for digging this node depending on
-- the registered digging groups
for g, gdef in pairs(mcl_autogroup.registered_diggroups) do
--creative_breakable = true
local index = hardness_lookup[g][ndef._mcl_hardness or 0]
if ndef.groups[g] then
if gdef.levels then
newgroups[g .. "_dig_default"] = index
for i = ndef.groups[g], #gdef.levels do
newgroups[g .. "_dig_" .. gdef.levels[i]] = index
end
else
newgroups[g .. "_dig"] = index
end
end
end
-- Automatically assign the node to the
-- creative_breakable group if it belongs to any digging
-- group.
newgroups["creative_breakable"] = 1
minetest.override_item(nname, {
groups = newgroups
})
end
end
for tname, tdef in pairs(minetest.registered_tools) do
-- Assign groupcaps for digging the registered digging groups
-- depending on the _mcl_diggroups in the tool definition
if tdef._mcl_diggroups then
local toolcaps = table.copy(get_tool_capabilities(tdef))
toolcaps.groupcaps = mcl_autogroup.get_groupcaps(tname)
minetest.override_item(tname, {
tool_capabilities = toolcaps
})
end
end
end
overwrite()

View File

@ -0,0 +1,3 @@
name = _mcl_autogroup
author = ryvnf
description = MineClone 2 core mod which automatically adds groups to all items. Very important for digging times.

View File

@ -0,0 +1,42 @@
# Biome Info API
This document explains the API of this mod.
## v6 mapgen functions
These are functions for the v6 mapgen only.
Use these functions only in worlds in which the v6 mapgen is used.
If you use these in any other mapgen, bad things might happen.
### `biomeinfo.get_v6_humidity(pos)`
Get the biome humidity at pos (for v6 mapgen).
### `biomeinfo.get_v6_heat(pos)`
Get the biome heat/temperature at pos (for v6 mapgen).
### `biomeinfo.get_v6_biome(pos)`
Get the v6 biome at pos.
Returns a string, which is the unique biome name.
Note: This function currently ignores the `biomeblend` v6 mapgen flag,
it just pretends this setting is disabled.
This is normally not a problem, but at areas where biomes blend,
the result is not perfectly accurate and just an estimate.
### `biomeinfo.get_active_v6_biomes()`
Returns a table containing the names of all v6 biomes that are actively
used in the current world, e.g. those that have been activated
by the use of the mapgen v6 flags (`mgv6_spflags`).
### `biomeinfo.all_v6_biomes`
This is a table containing all v6 biomes (as strings), even those that
might not be used in the current world.
### v6 biome names
These are the biome names used in this mod:
* Normal
* Desert
* Jungle
* Tundra
* Taiga

View File

@ -0,0 +1,11 @@
# Biome Info API [`biomeinfo`]
This is an API mod for mod developers to add a couple of missing
biome-related functions.
Currently, this mod only adds v6-related functions.
Most importantly, you can get the heat, humidity and biome in the v6 mapgen.
See `API.md` for the API documentation.
Current version: 1.0.3 (this is a [SemVer](https://semver.org/))
License: MIT License

View File

@ -0,0 +1,211 @@
biomeinfo = {}
-- Copied from mapgen_v6.h
local MGV6_FREQ_HOT = 0.4
local MGV6_FREQ_SNOW = -0.4
local MGV6_FREQ_TAIGA = 0.5
local MGV6_FREQ_JUNGLE = 0.5
-- Biome types
local BT_NORMAL = "Normal"
local BT_TUNDRA = "Tundra"
local BT_TAIGA = "Taiga"
local BT_DESERT = "Desert"
local BT_JUNGLE = "Jungle"
-- Get mapgen settings
local seed = tonumber(minetest.get_mapgen_setting("seed")) or 0
local mgv6_perlin_biome, mgv6_perlin_humidity, mgv6_np_biome
-- v6 default noiseparams are hardcoded here because Minetest doesn't give us those
local mgv6_np_biome_default = {
offset = 0,
scale = 1,
spread = { x = 500, y = 500, z = 500},
seed = 9130,
octaves = 3,
persistence = 0.50,
lacunarity = 2.0,
flags = "eased",
}
local mgv6_np_humidity_default = {
offset = 0.5,
scale = 0.5,
spread = { x = 500, y = 500, z = 500},
seed = 72384,
octaves = 3,
persistence = 0.50,
lacunarity = 2.0,
flags = "eased",
}
local v6_flags_str = minetest.get_mapgen_setting("mgv6_spflags")
if v6_flags_str == nil then
v6_flags_str = ""
end
local v6_flags = string.split(v6_flags_str)
local v6_use_snow_biomes = true
local v6_use_jungles = true
-- TODO: Implement biome blend.
-- Currently we pretend biome blend is disabled.
-- This just makes the calculations inaccurate near biome boundaries,
-- but should be fine otherwise.
local v6_use_biome_blend = false
for f=1, #v6_flags do
local flag = v6_flags[f]:trim()
if flag == "nosnowbiomes" then
v6_use_snow_biomes = false
end
if flag == "snowbiomes" then
v6_use_snow_biomes = true
end
if flag == "nojungles" then
v6_use_jungles = false
end
if flag == "jungles" then
v6_use_jungles = true
end
if flag == "nobiomeblend" then
v6_use_biome_blend = false
end
-- TODO
-- if flag == "biomeblend" then
-- v6_use_biome_blend = true
-- end
end
-- Force-enable jungles when snowbiomes flag is set
if v6_use_snow_biomes then
v6_use_jungles = true
end
local v6_freq_desert = tonumber(minetest.get_mapgen_setting("mgv6_freq_desert") or 0.45)
--local NOISE_MAGIC_X = 1619
--local NOISE_MAGIC_Y = 31337
--local NOISE_MAGIC_Z = 52591
--local NOISE_MAGIC_SEED = 1013
local function noise2d(x, y, seed)
-- TODO: implement noise2d function for biome blend
return 0
--[[
local n = (NOISE_MAGIC_X * x + NOISE_MAGIC_Y * y
+ NOISE_MAGIC_SEED * seed) & 0x7fffffff;
n = (n >> 13) ^ n;
n = (n * (n * n * 60493 + 19990303) + 1376312589) & 0x7fffffff;
return 1.0 - n / 0x40000000;
]]
end
biomeinfo.all_v6_biomes = {
BT_NORMAL,
BT_DESERT,
BT_JUNGLE,
BT_TUNDRA,
BT_TAIGA
}
local function init_perlins()
if not mgv6_perlin_biome then
mgv6_np_biome = minetest.get_mapgen_setting_noiseparams("mgv6_np_biome")
if not mgv6_np_biome then
mgv6_np_biome = mgv6_np_biome_default
minetest.log("action", "[biomeinfo] Using hardcoded mgv6_np_biome default")
end
mgv6_perlin_biome = minetest.get_perlin(mgv6_np_biome)
end
if not mgv6_perlin_humidity then
local np_humidity = minetest.get_mapgen_setting_noiseparams("mgv6_np_humidity")
if not np_humidity then
np_humidity = mgv6_np_humidity_default
minetest.log("action", "[biomeinfo] Using hardcoded mgv6_np_humidity default")
end
mgv6_perlin_humidity = minetest.get_perlin(np_humidity)
end
end
function biomeinfo.get_active_v6_biomes()
local biomes = { BT_NORMAL, BT_DESERT }
if v6_use_jungles then
table.insert(biomes, BT_JUNGLE)
end
if v6_use_snow_biomes then
table.insert(biomes, BT_TUNDRA)
table.insert(biomes, BT_TAIGA)
end
return biomes
end
function biomeinfo.get_v6_heat(pos)
init_perlins()
if not mgv6_perlin_biome then
return nil
end
local bpos = vector.floor(pos)
-- The temperature noise needs a special offset (see calculateNoise in mapgen_v6.cpp)
return mgv6_perlin_biome:get_2d({x=bpos.x + mgv6_np_biome.spread.x*0.6, y=bpos.z + mgv6_np_biome.spread.z*0.2})
end
function biomeinfo.get_v6_humidity(pos)
init_perlins()
if not mgv6_perlin_humidity then
return nil
end
local bpos = vector.floor(pos)
return mgv6_perlin_humidity:get_2d({x=bpos.x, y=bpos.z})
end
-- Returns the v6 biome at pos.
-- Returns a string representing the biome name.
function biomeinfo.get_v6_biome(pos)
init_perlins()
local bpos = vector.floor(pos)
-- Based on the algorithm MapgenV6::getBiome in mapgen_v6.cpp
local pos2d = {x=bpos.x, y=bpos.z}
if not mgv6_perlin_biome or not mgv6_perlin_humidity then
return "???"
end
local d = biomeinfo.get_v6_heat(bpos)
local h = biomeinfo.get_v6_humidity(bpos)
if (v6_use_snow_biomes) then
local blend
if v6_use_biome_blend then
blend = noise2d(pos2d.x, pos2d.y, seed) / 40
else
blend = 0
end
if (d > MGV6_FREQ_HOT + blend) then
if (h > MGV6_FREQ_JUNGLE + blend) then
return BT_JUNGLE
end
return BT_DESERT
end
if (d < MGV6_FREQ_SNOW + blend) then
if (h > MGV6_FREQ_TAIGA + blend) then
return BT_TAIGA
end
return BT_TUNDRA
end
return BT_NORMAL
end
if (d > v6_freq_desert) then
return BT_DESERT
end
if ((v6_use_biome_blend) and (d > v6_freq_desert - 0.10) and
((noise2d(pos2d.x, pos2d.y, seed) + 1.0) > (v6_freq_desert - d) * 20.0)) then
return BT_DESERT
end
if ((v6_use_jungles) and (h > 0.75)) then
return BT_JUNGLE
end
return BT_NORMAL
end

View File

@ -0,0 +1,3 @@
name = biomeinfo
author = Wuzzy
description = Simple API to get data about biomes.

23
mods/CORE/controls/API.md Normal file
View File

@ -0,0 +1,23 @@
# controls
## controls.players
Table containing player controls at runtime.
WARNING: Never use this table in writing
## controls.register_on_press(func)
Register a function that will be executed with (player, keyname) every time a player press a key.
## controls.registered_on_press
Table containing functions registered with controls.register_on_press().
## controls.register_on_release(func)
Register a function that will be executed with (player, keyname, clock_from_last_press) every time a player release a key.
## controls.registered_on_release
Table containing functions registered with controls.register_on_release().
## controls.register_on_hold(func)
Register a function that will be executed with (player, keyname, clock_from_start_hold) every time a player hold a key.
## controls.registered_on_hold
Table containing functions registered with controls.register_on_hold().

504
mods/CORE/controls/LICENSE Normal file
View File

@ -0,0 +1,504 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 2.1, February 1999
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence
the version number 2.1.]
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
Licenses are intended to guarantee your freedom to share and change
free software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software packages--typically libraries--of the
Free Software Foundation and other authors who decide to use it. You
can use it too, but we suggest you first think carefully about whether
this license or the ordinary General Public License is the better
strategy to use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
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 this service if you wish); that you receive source code or can get
it if you want it; that you can change the software and use pieces of
it in new free programs; and that you are informed that you can do
these things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know
that what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and
is quite different from the ordinary General Public License. We use
this license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does Less to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it becomes
a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of
free software. For example, permission to use the GNU C Library in
non-free programs enables many more people to use the whole GNU
operating system, as well as its variant, the GNU/Linux operating
system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run
that program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the terms of
this Lesser General Public License (also called "this License").
Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or translated
straightforwardly into another language. (Hereinafter, translation is
included without limitation in the term "modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, complete source code means
all the source code for all modules it contains, plus any associated
interface definition files, plus the scripts used to control compilation
and installation of the library.
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running a program using the Library is not restricted, and output from
such a program is covered only if its contents constitute a work based
on the Library (independent of the use of the Library in a tool for
writing it). Whether that is true depends on what the Library does
and what the program that uses the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete source code as you receive it, in any medium, provided that
you conspicuously and appropriately publish on each copy an
appropriate copyright notice and disclaimer of warranty; keep intact
all the notices that refer to this License and to the absence of any
warranty; and distribute a copy of this License along with the
Library.
You may charge a fee for the physical act of transferring a copy,
and you may at your option offer warranty protection in exchange for a
fee.
2. You may modify your copy or copies of the Library or any portion
of it, thus forming a work based on the Library, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) The modified work must itself be a software library.
b) You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c) You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d) If a facility in the modified Library refers to a function or a
table of data to be supplied by an application program that uses
the facility, other than as an argument passed when the facility
is invoked, then you must make a good faith effort to ensure that,
in the event an application does not supply such function or
table, the facility still operates, and performs whatever part of
its purpose remains meaningful.
(For example, a function in a library to compute square roots has
a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function must
be optional: if the application does not supply it, the square
root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Library,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Library, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote
it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Library.
In addition, mere aggregation of another work not based on the Library
with the Library (or with a work based on the Library) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library. To do
this, you must alter all the notices that refer to this License, so
that they refer to the ordinary GNU General Public License, version 2,
instead of to this License. (If a newer version than version 2 of the
ordinary GNU General Public License has appeared, then you can specify
that version instead if you wish.) Do not make any other change in
these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to all
subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable form
under the terms of Sections 1 and 2 above provided that you accompany
it with the complete corresponding machine-readable source code, which
must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange.
If distribution of object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the
source code from the same place satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being compiled or
linked with it, is called a "work that uses the Library". Such a
work, in isolation, is not a derivative work of the Library, and
therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because it
contains portions of the Library), rather than a "work that uses the
library". The executable is therefore covered by this License.
Section 6 states terms for distribution of such executables.
When a "work that uses the Library" uses material from a header file
that is part of the Library, the object code for the work may be a
derivative work of the Library even though the source code is not.
Whether this is true is especially significant if the work can be
linked without the Library, or if the work is itself a library. The
threshold for this to be true is not precisely defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a derivative
work. (Executables containing this object code plus portions of the
Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section 6.
Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered by
this License. You must supply a copy of this License. If the work
during execution displays copyright notices, you must include the
copyright notice for the Library among them, as well as a reference
directing the user to the copy of this License. Also, you must do one
of these things:
a) Accompany the work with the complete corresponding
machine-readable source code for the Library including whatever
changes were used in the work (which must be distributed under
Sections 1 and 2 above); and, if the work is an executable linked
with the Library, with the complete machine-readable "work that
uses the Library", as object code and/or source code, so that the
user can modify the Library and then relink to produce a modified
executable containing the modified Library. (It is understood
that the user who changes the contents of definitions files in the
Library will not necessarily be able to recompile the application
to use the modified definitions.)
b) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run time a
copy of the library already present on the user's computer system,
rather than copying library functions into the executable, and (2)
will operate properly with a modified version of the library, if
the user installs one, as long as the modified version is
interface-compatible with the version that the work was made with.
c) Accompany the work with a written offer, valid for at
least three years, to give the same user the materials
specified in Subsection 6a, above, for a charge no more
than the cost of performing this distribution.
d) If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the above
specified materials from the same place.
e) Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special exception,
the materials to be distributed need not include anything that is
normally distributed (in either source or binary form) with the major
components (compiler, kernel, and so on) of the operating system on
which the executable runs, unless that component itself accompanies
the executable.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you cannot
use both them and the Library together in an executable that you
distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other library
facilities not covered by this License, and distribute such a combined
library, provided that the separate distribution of the work based on
the Library and of the other library facilities is otherwise
permitted, and provided that you do these two things:
a) Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b) Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same work.
8. You may not copy, modify, sublicense, link with, or distribute
the Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library is void, and will automatically terminate your
rights under this License. However, parties who have received copies,
or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
9. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Library or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Library (or any work based on the
Library), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the Library
subject to these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties with
this License.
11. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
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
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Library at all. For example, if a patent
license would not permit royalty-free redistribution of the Library by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Library.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply,
and the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Library under this License may add
an explicit geographical distribution limitation excluding those countries,
so that distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser 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 Library
specifies a version number of this License which applies to it and
"any later version", you have the option of following the terms and
conditions either of that version or of any later version published by
the Free Software Foundation. If the Library does not specify a
license version number, you may choose any version ever published by
the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
write to the author to ask for permission. For software which is
copyrighted by the Free Software Foundation, write to the Free
Software Foundation; we sometimes make exceptions for this. Our
decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
OTHER PARTIES PROVIDE THE LIBRARY "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
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
AND/OR REDISTRIBUTE THE LIBRARY 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
LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of the
ordinary General Public License).
To apply these terms, attach the following notices to the library. It is
safest to attach them to the start of each source file to most effectively
convey 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 library's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA
Also add information on how to contact you by electronic and paper mail.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the library, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the
library `Frob' (a library for tweaking knobs) written by James Random
Hacker.
<signature of Ty Coon>, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!

View File

@ -0,0 +1,2 @@
Controls framework by Arcelmi.
https://github.com/Arcelmi/minetest-controls

View File

@ -0,0 +1,77 @@
local get_connected_players = minetest.get_connected_players
local clock = os.clock
local pairs = pairs
controls = {}
controls.players = {}
controls.registered_on_press = {}
function controls.register_on_press(func)
controls.registered_on_press[#controls.registered_on_press+1] = func
end
controls.registered_on_release = {}
function controls.register_on_release(func)
controls.registered_on_release[#controls.registered_on_release+1] = func
end
controls.registered_on_hold = {}
function controls.register_on_hold(func)
controls.registered_on_hold[#controls.registered_on_hold+1]=func
end
local known_controls = {
jump = true,
right = true,
left = true,
LMB = true,
RMB = true,
sneak = true,
aux1 = true,
down = true,
up = true,
}
minetest.register_on_joinplayer(function(player)
local name = player:get_player_name()
controls.players[name] = {}
for cname,_ in pairs(known_controls) do
controls.players[name][cname] = { false }
end
end)
minetest.register_on_leaveplayer(function(player)
local name = player:get_player_name()
controls.players[name] = nil
end)
minetest.register_globalstep(function(dtime)
for _, player in pairs(get_connected_players()) do
local player_name = player:get_player_name()
local player_controls = player:get_player_control()
if controls.players[player_name] then
for cname, cbool in pairs(player_controls) do
if known_controls[cname] == true then
--Press a key
if cbool == true and controls.players[player_name][cname][1] == false then
for _, func in pairs(controls.registered_on_press) do
func(player, cname)
end
controls.players[player_name][cname] = {true, clock()}
elseif cbool == true and controls.players[player_name][cname][1] == true then
for _, func in pairs(controls.registered_on_hold) do
func(player, cname, clock()-controls.players[player_name][cname][2])
end
--Release a key
elseif cbool == false and controls.players[player_name][cname][1] == true then
for _, func in pairs(controls.registered_on_release) do
func(player, cname, clock()-controls.players[player_name][cname][2])
end
controls.players[player_name][cname] = {false}
end
end
end
end
end
end)

View File

@ -0,0 +1,4 @@
name = controls
author = Arcelmi
description = Controls framework by Arcelmi

45
mods/CORE/flowlib/API.md Normal file
View File

@ -0,0 +1,45 @@
# flowlib
Simple flow functions.
## flowlib.is_touching(realpos, nodepos, radius)
Return true if a sphere of <radius> at <realpos> collide with node at <nodepos>.
* realpos: position
* nodepos: position
* radius: number
## flowlib.is_water(pos)
Return true if node at <pos> is water, false overwise.
* pos: position
## flowlib.node_is_water(node)
Return true if <node> is water, false overwise.
* node: node
## flowlib.is_lava(pos)
Return true if node at <pos> is lava, false overwise.
* pos: position
## flowlib.node_is_lava(node)
Return true if <node> is lava, false overwise.
* node: node
## flowlib.is_liquid(pos)
Return true if node at <pos> is liquid, false overwise.
* pos: position
## flowlib.node_is_liquid(node)
Return true if <node> is liquid, false overwise.
* node: node
## flowlib.quick_flow(pos, node)
Return direction where the water is flowing (to be use to push mobs, items...).
* pos: position
* node: node
## flowlib.move_centre(pos, realpos, node, radius)
Return the pos of the nearest not water block near from <pos> in a sphere of <radius> at <realpos>.
WARNING: This function is never used in mcl2, use at your own risk. The informations described here may be wrong.
* pos: position
* realpos: position, position of the entity
* node: node
* radius: number

View File

@ -0,0 +1,7 @@
Flowlib
================
Simple flow functions for use in Minetest mods by Qwertymine3
License of source code:
-----------------------
WTFPL

153
mods/CORE/flowlib/init.lua Normal file
View File

@ -0,0 +1,153 @@
local math = math
local get_node = minetest.get_node
local get_item_group = minetest.get_item_group
local registered_nodes = minetest.registered_nodes
flowlib = {}
--sum of direction vectors must match an array index
--(sum,root)
--(0,1), (1,1+0=1), (2,1+1=2), (3,1+2^2=5), (4,2^2+2^2=8)
local inv_roots = {
[0] = 1,
[1] = 1,
[2] = 0.70710678118655,
[4] = 0.5,
[5] = 0.44721359549996,
[8] = 0.35355339059327,
}
local function to_unit_vector(dir_vector)
local sum = dir_vector.x * dir_vector.x + dir_vector.z * dir_vector.z
return {x = dir_vector.x * inv_roots[sum], y = dir_vector.y, z = dir_vector.z * inv_roots[sum]}
end
local function is_touching(realpos,nodepos,radius)
local boarder = 0.5 - radius
return math.abs(realpos - nodepos) > (boarder)
end
flowlib.is_touching = is_touching
local function is_water(pos)
return get_item_group(get_node(pos).name, "water") ~= 0
end
flowlib.is_water = is_water
local function node_is_water(node)
return get_item_group(node.name, "water") ~= 0
end
flowlib.node_is_water = node_is_water
local function is_lava(pos)
return get_item_group(get_node(pos).name, "lava") ~= 0
end
flowlib.is_lava = is_lava
local function node_is_lava(node)
return get_item_group(node.name, "lava") ~= 0
end
flowlib.node_is_lava = node_is_lava
local function is_liquid(pos)
return get_item_group(get_node(pos).name, "liquid") ~= 0
end
flowlib.is_liquid = is_liquid
local function node_is_liquid(node)
return minetest.get_item_group(node.name, "liquid") ~= 0
end
flowlib.node_is_liquid = node_is_liquid
--This code is more efficient
local function quick_flow_logic(node, pos_testing, direction)
local name = node.name
if not registered_nodes[name] then
return 0
end
if registered_nodes[name].liquidtype == "source" then
local node_testing = get_node(pos_testing)
if not registered_nodes[node_testing.name] then
return 0
end
if registered_nodes[node_testing.name].liquidtype ~= "flowing" then
return 0
else
return direction
end
elseif registered_nodes[name].liquidtype == "flowing" then
local node_testing = get_node(pos_testing)
local param2_testing = node_testing.param2
if not registered_nodes[node_testing.name] then
return 0
end
if registered_nodes[node_testing.name].liquidtype == "source" then
return -direction
elseif registered_nodes[node_testing.name].liquidtype == "flowing" then
if param2_testing < node.param2 then
if (node.param2 - param2_testing) > 6 then
return -direction
else
return direction
end
elseif param2_testing > node.param2 then
if (param2_testing - node.param2) > 6 then
return direction
else
return -direction
end
end
end
end
return 0
end
local function quick_flow(pos, node)
if not node_is_liquid(node) then
return {x = 0, y = 0, z = 0}
end
local x = quick_flow_logic(node,{x = pos.x-1, y = pos.y, z = pos.z},-1) + quick_flow_logic(node,{x = pos.x+1, y = pos.y, z = pos.z}, 1)
local z = quick_flow_logic(node,{x = pos.x, y = pos.y, z = pos.z-1},-1) + quick_flow_logic(node,{x = pos.x, y = pos.y, z = pos.z+1}, 1)
return to_unit_vector({x = x, y = 0, z = z})
end
flowlib.quick_flow = quick_flow
--if not in water but touching, move centre to touching block
--x has higher precedence than z
--if pos changes with x, it affects z
local function move_centre(pos, realpos, node, radius)
if is_touching(realpos.x, pos.x, radius) then
if is_liquid({x = pos.x-1, y = pos.y, z = pos.z}) then
node = get_node({x=pos.x-1, y = pos.y, z = pos.z})
pos = {x = pos.x-1, y = pos.y, z = pos.z}
elseif is_liquid({x = pos.x+1, y = pos.y, z = pos.z}) then
node = get_node({x = pos.x+1, y = pos.y, z = pos.z})
pos = {x = pos.x+1, y = pos.y, z = pos.z}
end
end
if is_touching(realpos.z, pos.z, radius) then
if is_liquid({x = pos.x, y = pos.y, z = pos.z - 1}) then
node = get_node({x = pos.x, y = pos.y, z = pos.z - 1})
pos = {x = pos.x, y = pos.y, z = pos.z - 1}
elseif is_liquid({x = pos.x, y = pos.y, z = pos.z + 1}) then
node = get_node({x = pos.x, y = pos.y, z = pos.z + 1})
pos = {x = pos.x, y = pos.y, z = pos.z + 1}
end
end
return pos, node
end
flowlib.move_centre = move_centre

View File

@ -0,0 +1,4 @@
name = flowlib
author = Qwertymine3
description = Simple flow functions for use in Minetest mods by Qwertymine3

View File

@ -0,0 +1,93 @@
-- Overrides the builtin minetest.check_single_for_falling.
-- We need to do this in order to handle nodes in mineclone specific groups
-- "supported_node" and "attached_node_facedir".
--
-- Nodes in group "supported_node" can be placed on any node that does not
-- have the "airlike" drawtype. Carpets are an example of this type.
local vector = vector
local facedir_to_dir = minetest.facedir_to_dir
local get_item_group = minetest.get_item_group
local remove_node = minetest.remove_node
local get_node = minetest.get_node
local get_meta = minetest.get_meta
local registered_nodes = minetest.registered_nodes
local get_node_drops = minetest.get_node_drops
local add_item = minetest.add_item
-- drop_attached_node(p)
--
-- This function is copied verbatim from minetest/builtin/game/falling.lua
-- We need this to do the exact same dropping node handling in our override
-- minetest.check_single_for_falling() function as in the builtin function.
--
local function drop_attached_node(p)
local n = get_node(p)
local drops = get_node_drops(n, "")
local def = registered_nodes[n.name]
if def and def.preserve_metadata then
local oldmeta = get_meta(p):to_table().fields
-- Copy pos and node because the callback can modify them.
local pos_copy = vector.new(p)
local node_copy = {name=n.name, param1=n.param1, param2=n.param2}
local drop_stacks = {}
for k, v in pairs(drops) do
drop_stacks[k] = ItemStack(v)
end
drops = drop_stacks
def.preserve_metadata(pos_copy, node_copy, oldmeta, drops)
end
if def and def.sounds and def.sounds.fall then
core.sound_play(def.sounds.fall, {pos = p}, true)
end
remove_node(p)
for _, item in pairs(drops) do
local pos = {
x = p.x + math.random()/2 - 0.25,
y = p.y + math.random()/2 - 0.25,
z = p.z + math.random()/2 - 0.25,
}
add_item(pos, item)
end
end
-- minetest.check_single_for_falling(pos)
--
-- * causes an unsupported `group:falling_node` node to fall and causes an
-- unattached `group:attached_node` or `group:attached_node_facedir` node
-- or unsupported `group:supported_node` node to drop.
-- * does not spread these updates to neighbours.
--
-- Returns true if the node at <pos> has spawned a falling node or has been
-- dropped as item(s).
--
local original_function = minetest.check_single_for_falling
function minetest.check_single_for_falling(pos)
if original_function(pos) then
return true
end
local node = get_node(pos)
if get_item_group(node.name, "attached_node_facedir") ~= 0 then
local dir = facedir_to_dir(node.param2)
if dir then
if get_item_group(get_node(vector.add(pos, dir)).name, "solid") == 0 then
drop_attached_node(pos)
return true
end
end
end
if get_item_group(node.name, "supported_node") ~= 0 then
local def = registered_nodes[get_node(vector.offset(pos, 0, -1, 0)).name]
if def and def.drawtype == "airlike" then
drop_attached_node(pos)
return true
end
end
return false
end

View File

@ -0,0 +1,3 @@
name = mcl_attached
author = Wuzzy
description = Adds additional ways for nodes to be attached.

View File

@ -0,0 +1,27 @@
# mcl_autogroup
This mod emulate digging times from mc.
## mcl_autogroup.can_harvest(nodename, toolname)
Return true if <nodename> can be dig with <toolname>.
* nodename: string, valid nodename
* toolname: (optional) string, valid toolname
## mcl_autogroup.get_groupcaps(toolname, efficiency)
This function is used to calculate diggroups for tools.
WARNING: This function can only be called after mod initialization.
* toolname: string, name of the tool being enchanted (like "mcl_tools:diamond_pickaxe")
* efficiency: (optional) integer, the efficiency level the tool is enchanted with (default 0)
## mcl_autogroup.get_wear(toolname, diggroup)
Return the max wear of <toolname> with <diggroup>
WARNING: This function can only be called after mod initialization.
* toolname: string, name of the tool used
* diggroup: string, the name of the diggroup the tool is used on
## mcl_autogroup.register_diggroup(group, def)
* group: string, name of the group to register as a digging group
* def: (optional) table, table with information about the diggroup (defaults to {} if unspecified)
* level: (optional) string, if specified it is an array containing the names of the different digging levels the digging group supports
## mcl_autogroup.registered_diggroups
List of registered diggroups, indexed by name.

View File

@ -0,0 +1,28 @@
--[[
This is one part of a mod to replicate the digging times from Minecraft. This
part only exposes a function to register digging groups. The rest of the mod is
implemented and documented in the _mcl_autogroup.
The mod is split up into two parts, mcl_autogroup and _mcl_autogroup.
mcl_autogroup contains the API functions used to register custom digging groups.
_mcl_autogroup contains most of the code. The leading underscore in the name
"_mcl_autogroup" is used to force Minetest to load that part of the mod as late
as possible. Minetest loads mods in reverse alphabetical order.
--]]
mcl_autogroup = {}
mcl_autogroup.registered_diggroups = {}
assert(minetest.get_modpath("_mcl_autogroup"), "This mod requires the mod _mcl_autogroup to function")
-- Register a group as a digging group.
--
-- Parameters:
-- group - Name of the group to register as a digging group
-- def - Table with information about the diggroup (defaults to {} if unspecified)
--
-- Values in def:
-- level - If specified it is an array containing the names of the different
-- digging levels the digging group supports.
function mcl_autogroup.register_diggroup(group, def)
mcl_autogroup.registered_diggroups[group] = def or {}
end

View File

@ -0,0 +1,3 @@
name = mcl_autogroup
author = ryvnf
description = MineClone 2 core mod which automatically adds groups to all items. Very important for digging times.

View File

@ -0,0 +1,8 @@
# mcl_colors
Mod providing global table containing legacity minecraft colors to be used in mods.
## mcl_colors.*
Colors by upper name, in hex value.
## mcl_colors.background.*
Background colors by upper name, in hex value.

View File

@ -0,0 +1,36 @@
mcl_colors = {
BLACK = "#000000",
DARK_BLUE = "#0000AA",
DARK_GREEN = "#00AA00",
DARK_AQUA = "#00AAAA",
DARK_RED = "#AA0000",
DARK_PURPLE = "#AA00AA",
GOLD = "#FFAA00",
GRAY = "#AAAAAA",
DARK_GRAY = "#555555",
BLUE = "#5555FF",
GREEN = "#55FF55",
AQUA = "#55FFFF",
RED = "#FF5555",
LIGHT_PURPLE = "#FF55FF",
YELLOW = "#FFFF55",
WHITE = "#FFFFFF",
background = {
BLACK = "#000000",
DARK_BLUE = "#00002A",
DARK_GREEN = "#002A00",
DARK_AQUA = "#002A2A",
DARK_RED = "#2A0000",
DARK_PURPLE = "#2A002A",
GOLD = "#2A2A00",
GRAY = "#2A2A2A",
DARK_GRAY = "#151515",
BLUE = "#15153F",
GREEN = "#153F15",
AQUA = "#153F3F",
RED = "#3F1515",
LIGHT_PURPLE = "#3F153F",
YELLOW = "#3F3F15",
WHITE = "#373501",
}
}

View File

@ -0,0 +1,3 @@
name = mcl_colors
author = Fleckenstein
description = The HTML sequences for the minecraft colors

View File

@ -0,0 +1,15 @@
# mcl_damage
This mod is intended to overall minetest's native damage system, to provide a better integration between features that deals with entities' health.
WARNING: Not using it inside your mods may cause strange bugs (using the native damage system may cause conflicts with this system).
## Callbacks
To modify the amount of damage made by something:
```lua
--obj: an ObjectRef
mcl_damage.register_modifier(function(obj, damage, reason)
end, 0)
```

View File

@ -0,0 +1,169 @@
mcl_damage = {
modifiers = {},
damage_callbacks = {},
death_callbacks = {},
types = {
in_fire = {is_fire = true},
lightning_bolt = {is_lightning = true},
on_fire = {is_fire = true, bypasses_armor = true},
lava = {is_fire = true},
hot_floor = {is_fire = true},
in_wall = {bypasses_armor = true},
drown = {bypasses_armor = true},
starve = {bypasses_armor = true, bypasses_magic = true},
cactus = {},
fall = {bypasses_armor = true},
fly_into_wall = {bypasses_armor = true}, -- unused
out_of_world = {bypasses_armor = true, bypasses_magic = true, bypasses_invulnerability = true, bypasses_totem = true},
generic = {bypasses_armor = true},
magic = {is_magic = true, bypasses_armor = true},
dragon_breath = {is_magic = true, bypasses_armor = true}, -- this is only used for dragon fireball; dragon fireball does not actually deal impact damage tho, so this is unreachable
wither = {bypasses_armor = true}, -- unused
wither_skull = {is_magic = true, is_explosion = true}, -- this is non-MC but a workaround to get the proper death message
anvil = {},
falling_node = {}, -- this is falling_block in MC
mob = {},
player = {},
arrow = {is_projectile = true},
fireball = {is_projectile = true, is_fire = true},
thorns = {is_magic = true},
explosion = {is_explosion = true},
cramming = {bypasses_armor = true}, -- unused
fireworks = {is_explosion = true}, -- unused
}
}
function mcl_damage.register_modifier(func, priority)
table.insert(mcl_damage.modifiers, {func = func, priority = priority or 0})
end
function mcl_damage.register_on_damage(func)
table.insert(mcl_damage.damage_callbacks, func)
end
function mcl_damage.register_on_death(func)
table.insert(mcl_damage.death_callbacks, func)
end
function mcl_damage.run_modifiers(obj, damage, reason)
for _, modf in ipairs(mcl_damage.modifiers) do
damage = modf.func(obj, damage, reason) or damage
if damage == 0 then
return 0
end
end
return damage
end
local function run_callbacks(funcs, ...)
for _, func in pairs(funcs) do
func(...)
end
end
function mcl_damage.run_damage_callbacks(obj, damage, reason)
run_callbacks(mcl_damage.damage_callbacks, obj, damage, reason)
end
function mcl_damage.run_death_callbacks(obj, reason)
run_callbacks(mcl_damage.death_callbacks, obj, reason)
end
function mcl_damage.from_punch(mcl_reason, object)
mcl_reason.direct = object
local luaentity = mcl_reason.direct:get_luaentity()
if luaentity then
if luaentity._is_arrow then
mcl_reason.type = "arrow"
elseif luaentity._is_fireball then
mcl_reason.type = "fireball"
elseif luaentity.is_mob then
mcl_reason.type = "mob"
end
mcl_reason.source = mcl_reason.source or luaentity._source_object
else
mcl_reason.type = "player"
end
end
function mcl_damage.finish_reason(mcl_reason)
mcl_reason.source = mcl_reason.source or mcl_reason.direct
mcl_reason.flags = mcl_damage.types[mcl_reason.type]
end
function mcl_damage.from_mt(mt_reason)
if mt_reason._mcl_chached_reason then
return mt_reason._mcl_chached_reason
end
local mcl_reason
if mt_reason._mcl_reason then
mcl_reason = mt_reason._mcl_reason
else
mcl_reason = {type = "generic"}
if mt_reason._mcl_type then
mcl_reason.type = mt_reason._mcl_type
elseif mt_reason.type == "fall" then
mcl_reason.type = "fall"
elseif mt_reason.type == "drown" then
mcl_reason.type = "drown"
elseif mt_reason.type == "punch" then
mcl_damage.from_punch(mcl_reason, mt_reason.object)
elseif mt_reason.type == "node_damage" and mt_reason.node then
if minetest.get_item_group(mt_reason.node, "fire") > 0 then
mcl_reason.type = "in_fire"
end
if minetest.get_item_group(mt_reason.node, "lava") > 0 then
mcl_reason.type = "lava"
end
end
for key, value in pairs(mt_reason) do
if key:find("_mcl_") == 1 then
mcl_reason[key:sub(6, #key)] = value
end
end
end
mcl_damage.finish_reason(mcl_reason)
mt_reason._mcl_cached_reason = mcl_reason
return mcl_reason
end
function mcl_damage.register_type(name, def)
mcl_damage.types[name] = def
end
minetest.register_on_player_hpchange(function(player, hp_change, mt_reason)
if hp_change < 0 then
if player:get_hp() <= 0 then
return 0
end
hp_change = -mcl_damage.run_modifiers(player, -hp_change, mcl_damage.from_mt(mt_reason))
end
return hp_change
end, true)
minetest.register_on_player_hpchange(function(player, hp_change, mt_reason)
if player:get_hp() > 0 then
mt_reason.approved = true
if hp_change < 0 then
mcl_damage.run_damage_callbacks(player, -hp_change, mcl_damage.from_mt(mt_reason))
end
end
end, false)
minetest.register_on_dieplayer(function(player, mt_reason)
if mt_reason.approved then
mcl_damage.run_death_callbacks(player, mcl_damage.from_mt(mt_reason))
end
end)
minetest.register_on_mods_loaded(function()
table.sort(mcl_damage.modifiers, function(a, b) return a.priority < b.priority end)
end)

View File

@ -0,0 +1,3 @@
name = mcl_damage
author = Fleckenstein
description = Minecraft-like damage reason system

View File

@ -0,0 +1,15 @@
# mcl_explosions
This mod provide helper functions to create explosions.
## mcl_explosions.explode(pos, strength, info, puncher)
* pos: position, initial position of the explosion
* strenght: number, radius of the explosion
* info: table, explosion informations:
* drop_chance: number, if specified becomes the drop chance of all nodes in the explosion (default: 1.0 / strength)
* max_blast_resistance: int, if specified the explosion will treat all non-indestructible nodes as having a blast resistance of no more than this value
* sound: bool, if true, the explosion will play a sound (default: true)
* particles: bool, if true, the explosion will create particles (default: true)
* fire: bool, if true, 1/3 nodes become fire (default: false)
* griefing: bool, if true, the explosion will destroy nodes (default: true)
* grief_protected: bool, if true, the explosion will also destroy nodes which have been protected (default: false)
* puncher: (optional) entity, will be used as source for damage done by the explosion

View File

@ -0,0 +1,472 @@
--[[
Explosion API mod for Minetest (adapted to MineClone 2)
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.
The computation-intensive parts of the mod has been optimized to allow for
larger explosions and faster world updating.
This mod was created by Elias Astrom <ryvnf@riseup.net> and is released
under the LGPLv2.1 license.
--]]
mcl_explosions = {}
local mod_fire = minetest.get_modpath("mcl_fire")
--local CONTENT_FIRE = minetest.get_content_id("mcl_fire:fire")
local math = math
local vector = vector
local table = table
local hash_node_position = minetest.hash_node_position
local get_objects_inside_radius = minetest.get_objects_inside_radius
local get_position_from_hash = minetest.get_position_from_hash
local get_node_drops = minetest.get_node_drops
local get_name_from_content_id = minetest.get_name_from_content_id
local get_voxel_manip = minetest.get_voxel_manip
local bulk_set_node = minetest.bulk_set_node
local check_for_falling = minetest.check_for_falling
local add_item = minetest.add_item
local pos_to_string = minetest.pos_to_string
-- Saved sphere explosion shapes for various radiuses
local sphere_shapes = {}
-- Saved node definitions in table using cid-keys for faster look-up.
local node_blastres = {}
local node_on_blast = {}
local node_walkable = {}
-- The step length for the rays (Minecraft uses 0.3)
local STEP_LENGTH = 0.3
-- How many rays to compute entity exposure to explosion
local N_EXPOSURE_RAYS = 16
-- Nodes having a blast resistance of this value or higher are treated as
-- indestructible
local INDESTRUCT_BLASTRES = 1000000
minetest.register_on_mods_loaded(function()
-- Store blast resistance values by content ids to improve performance.
for name, def in pairs(minetest.registered_nodes) do
local id = minetest.get_content_id(name)
node_blastres[id] = def._mcl_blast_resistance or 0
node_on_blast[id] = def.on_blast
node_walkable[id] = def.walkable
end
end)
-- Compute the rays which make up a sphere with radius. Returns a list of rays
-- which can be used to trace explosions. This function is not efficient
-- (especially for larger radiuses), so the generated rays for various radiuses
-- should be cached and reused.
--
-- Should be possible to improve by using a midpoint circle algorithm multiple
-- times to create the sphere, currently uses more of a brute-force approach.
local function compute_sphere_rays(radius)
local rays = {}
local sphere = {}
local function add_ray(pos)
sphere[hash_node_position(pos)] = pos
end
for y = -radius, radius do
for z = -radius, radius do
for x = -radius, 0 do
local d = x * x + y * y + z * z
if d <= radius * radius then
add_ray(vector.new(x, y, z))
add_ray(vector.new(-x, y, z))
break
end
end
end
end
for x = -radius, radius do
for z = -radius, radius do
for y = -radius, 0 do
local d = x * x + y * y + z * z
if d <= radius * radius then
add_ray(vector.new(x, y, z))
add_ray(vector.new(x, -y, z))
break
end
end
end
end
for x = -radius, radius do
for y = -radius, radius do
for z = -radius, 0 do
local d = x * x + y * y + z * z
if d <= radius * radius then
add_ray(vector.new(x, y, z))
add_ray(vector.new(x, y, -z))
break
end
end
end
end
for _, pos in pairs(sphere) do
rays[#rays + 1] = vector.normalize(pos)
end
return rays
end
-- Add particles from explosion
--
-- Parameters:
-- pos - The position of the explosion
-- radius - The radius of the explosion
local function add_particles(pos, radius)
minetest.add_particlespawner({
amount = 64,
time = 0.125,
minpos = pos,
maxpos = pos,
minvel = {x = -radius, y = -radius, z = -radius},
maxvel = {x = radius, y = radius, z = radius},
minacc = vector.new(),
maxacc = vector.new(),
minexptime = 0.5,
maxexptime = 1.0,
minsize = radius * 0.5,
maxsize = radius * 1.0,
texture = "mcl_particles_smoke.png",
})
end
-- Traces the rays of an explosion, and updates the environment.
--
-- Parameters:
-- pos - Where the rays in the explosion should start from
-- strength - The strength of each ray
-- raydirs - The directions for each ray
-- radius - The maximum distance each ray will go
-- info - Table containing information about explosion
-- direct - direct source object of the damage (optional)
-- source - indirect source object of the damage (optional)
--
-- Values in info:
-- drop_chance - The chance that destroyed nodes will drop their items
-- fire - If true, 1/3 nodes become fire
-- griefing - If true, the explosion will destroy nodes (default: true)
-- max_blast_resistance - The explosion will treat all non-indestructible nodes
-- as having a blast resistance of no more than this
-- value
-- grief_protected - If true, the explosion will also destroy nodes which have
-- been protected
--
-- Note that this function has been optimized, it contains code which has been
-- inlined to avoid function calls and unnecessary table creation. This was
-- measured to give a significant performance increase.
local function trace_explode(pos, strength, raydirs, radius, info, direct, source)
local vm = get_voxel_manip()
local emin, emax = vm:read_from_map(vector.subtract(pos, radius),
vector.add(pos, radius))
local emin_x = emin.x
local emin_y = emin.y
local emin_z = emin.z
local ystride = (emax.x - emin_x + 1)
local zstride = ystride * (emax.y - emin_y + 1)
--[[local area = VoxelArea:new {
MinEdge = emin,
MaxEdge = emax
}]]
local data = vm:get_data()
local destroy = {}
local drop_chance = info.drop_chance
local fire = info.fire
local max_blast_resistance = info.max_blast_resistance
local grief_protected = info.grief_protected
-- Trace rays for environment destruction
if info.griefing then
for i = 1, #raydirs do
local rpos_x = pos.x
local rpos_y = pos.y
local rpos_z = pos.z
local rdir_x = raydirs[i].x
local rdir_y = raydirs[i].y
local rdir_z = raydirs[i].z
local rstr = (0.7 + math.random() * 0.6) * strength
for r = 0, math.ceil(radius * (1.0 / STEP_LENGTH)) do
local npos_x = math.floor(rpos_x + 0.5)
local npos_y = math.floor(rpos_y + 0.5)
local npos_z = math.floor(rpos_z + 0.5)
local npos = { x = npos_x, y = npos_y, z = npos_z }
local idx = (npos_z - emin_z) * zstride + (npos_y - emin_y) * ystride +
npos_x - emin_x + 1
local cid = data[idx]
local br = node_blastres[cid] or INDESTRUCT_BLASTRES
if br < INDESTRUCT_BLASTRES and br > max_blast_resistance then
br = max_blast_resistance
end
local hash = hash_node_position(npos)
rpos_x = rpos_x + STEP_LENGTH * rdir_x
rpos_y = rpos_y + STEP_LENGTH * rdir_y
rpos_z = rpos_z + STEP_LENGTH * rdir_z
rstr = rstr - 0.75 * STEP_LENGTH - (br + 0.3) * STEP_LENGTH
if rstr <= 0 then
break
end
if cid ~= minetest.CONTENT_AIR then
if not minetest.is_protected(npos, "") or grief_protected then
destroy[hash] = idx
end
end
end
end
end
-- Entities in radius of explosion
local punch_radius = 2 * strength
local objs = get_objects_inside_radius(pos, punch_radius)
-- Trace rays for entity damage
for _, obj in pairs(objs) do
local ent = obj:get_luaentity()
-- Ignore items to lower lag
if (obj:is_player() or (ent and ent.name ~= "__builtin.item")) and obj:get_hp() > 0 then
local opos = obj:get_pos()
local collisionbox = nil
if obj:is_player() then
collisionbox = { -0.3, 0.0, -0.3, 0.3, 1.77, 0.3 }
elseif ent.name then
local def = minetest.registered_entities[ent.name]
collisionbox = def.collisionbox
end
if collisionbox then
-- Create rays from random points in the collision box
local x1 = collisionbox[1]
local y1 = collisionbox[2]
local z1 = collisionbox[3]
local x2 = collisionbox[4]
local y2 = collisionbox[5]
local z2 = collisionbox[6]
local x_len = math.abs(x2 - x1)
local y_len = math.abs(y2 - y1)
local z_len = math.abs(z2 - z1)
-- Move object position to the center of its bounding box
opos.x = opos.x + 0.5 * (x1 + x2)
opos.y = opos.y + 0.5 * (y1 + y2)
opos.z = opos.z + 0.5 * (z1 + z2)
-- Count number of rays from collision box which are unobstructed
local count = N_EXPOSURE_RAYS
for i = 1, N_EXPOSURE_RAYS do
local rpos_x = opos.x + math.random() * x_len - x_len / 2
local rpos_y = opos.y + math.random() * y_len - y_len / 2
local rpos_z = opos.z + math.random() * z_len - z_len / 2
local rdir_x = pos.x - rpos_x
local rdir_y = pos.y - rpos_y
local rdir_z = pos.z - rpos_z
local rdir_len = math.hypot(rdir_x, math.hypot(rdir_y, rdir_z))
rdir_x = rdir_x / rdir_len
rdir_y = rdir_y / rdir_len
rdir_z = rdir_z / rdir_len
for i=0, rdir_len / STEP_LENGTH do
rpos_x = rpos_x + rdir_x * STEP_LENGTH
rpos_y = rpos_y + rdir_y * STEP_LENGTH
rpos_z = rpos_z + rdir_z * STEP_LENGTH
local npos_x = math.floor(rpos_x + 0.5)
local npos_y = math.floor(rpos_y + 0.5)
local npos_z = math.floor(rpos_z + 0.5)
local idx = (npos_z - emin_z) * zstride + (npos_y - emin_y) * ystride +
npos_x - emin_x + 1
local cid = data[idx]
local walkable = node_walkable[cid]
if walkable then
count = count - 1
break
end
end
end
-- Punch entity with damage depending on explosion exposure and
-- distance to explosion
local exposure = count / N_EXPOSURE_RAYS
local punch_vec = vector.subtract(opos, pos)
local punch_dir = vector.normalize(punch_vec)
local impact = (1 - vector.length(punch_vec) / punch_radius) * exposure
if impact < 0 then
impact = 0
end
local damage = math.floor((impact * impact + impact) * 7 * strength + 1)
local sleep_formspec_doesnt_close_mt53 = false
if obj:is_player() then
local name = obj:get_player_name()
if mcl_beds then
local meta = obj:get_meta()
if meta:get_string("mcl_beds:sleeping") == "true" then
minetest.close_formspec(name, "") -- ABSOLUTELY NECESSARY FOR MT5.3 -- TODO: REMOVE THIS IN THE FUTURE
sleep_formspec_doesnt_close_mt53 = true
end
end
end
if sleep_formspec_doesnt_close_mt53 then
minetest.after(0.3, function() -- 0.2 is minimum delay for closing old formspec and open died formspec -- TODO: REMOVE THIS IN THE FUTURE
if not obj:is_player() then
return
end
mcl_util.deal_damage(obj, damage, {type = "explosion", direct = direct, source = source})
obj:add_velocity(vector.multiply(punch_dir, impact * 20))
end)
else
mcl_util.deal_damage(obj, damage, {type = "explosion", direct = direct, source = source})
if obj:is_player() or ent.tnt_knockback then
obj:add_velocity(vector.multiply(punch_dir, impact * 20))
end
end
end
end
end
local airs, fires = {}, {}
-- Remove destroyed blocks and drop items
for hash, idx in pairs(destroy) do
local do_drop = math.random() <= drop_chance
local on_blast = node_on_blast[data[idx]]
local remove = true
if do_drop or on_blast then
local npos = get_position_from_hash(hash)
if on_blast then
on_blast(npos, 1.0, do_drop)
remove = false
else
local name = get_name_from_content_id(data[idx])
local drop = get_node_drops(name, "")
for _, item in ipairs(drop) do
if type(item) ~= "string" then
item = item:get_name() .. item:get_count()
end
add_item(npos, item)
end
end
end
if remove then
if mod_fire and fire and math.random(1, 3) == 1 then
table.insert(fires, get_position_from_hash(hash))
else
table.insert(airs, get_position_from_hash(hash))
end
end
end
-- We use bulk_set_node instead of LVM because we want to have on_destruct and
-- on_construct being called
if #airs > 0 then
bulk_set_node(airs, {name="air"})
end
if #fires > 0 then
bulk_set_node(fires, {name="mcl_fire:fire"})
end
-- Update falling nodes
for a=1, #airs do
local p = airs[a]
check_for_falling({x=p.x, y=p.y+1, z=p.z})
end
for f=1, #fires do
local p = fires[f]
check_for_falling({x=p.x, y=p.y+1, z=p.z})
end
-- Log explosion
minetest.log("action", "Explosion at "..pos_to_string(pos).." with strength "..strength.." and radius "..radius)
end
-- Create an explosion with strength at pos.
--
-- Parameters:
-- pos - The position where the explosion originates from
-- strength - The blast strength of the explosion (a TNT explosion uses 4)
-- info - Table containing information about explosion
-- direct - direct source object of the damage (optional)
-- source - indirect source object of the damage (optional)
--
-- Values in info:
-- drop_chance - If specified becomes the drop chance of all nodes in the
-- explosion (default: 1.0 / strength)
-- max_blast_resistance - If specified the explosion will treat all
-- non-indestructible nodes as having a blast resistance
-- of no more than this value
-- sound - If true, the explosion will play a sound (default: true)
-- particles - If true, the explosion will create particles (default: true)
-- fire - If true, 1/3 nodes become fire (default: false)
-- griefing - If true, the explosion will destroy nodes (default: true)
-- grief_protected - If true, the explosion will also destroy nodes which have
-- been protected (default: false)
function mcl_explosions.explode(pos, strength, info, direct, source)
if info == nil then
info = {}
end
-- The maximum blast radius (in the air)
local radius = math.ceil(1.3 * strength / (0.3 * 0.75) * 0.3)
if not sphere_shapes[radius] then
sphere_shapes[radius] = compute_sphere_rays(radius)
end
local shape = sphere_shapes[radius]
-- Default values
if info.drop_chance == nil then info.drop_chance = 1 / strength end
if info.particles == nil then info.particles = true end
if info.sound == nil then info.sound = true end
if info.fire == nil then info.fire = false end
if info.griefing == nil then info.griefing = true end
if info.grief_protected == nil then info.grief_protected = false end
if info.max_blast_resistance == nil then
info.max_blast_resistance = INDESTRUCT_BLASTRES
end
-- Dont do drops in creative mode
if minetest.is_creative_enabled("") then
info.drop_chance = 0
end
trace_explode(pos, strength, shape, radius, info, direct, source)
if info.particles then
add_particles(pos, radius)
end
if info.sound then
minetest.sound_play("tnt_explode", {
pos = pos, gain = 1.0,
max_hear_distance = strength * 16
}, true)
end
end

View File

@ -0,0 +1,2 @@
# textdomain:mcl_explosions
@1 was caught in an explosion.=@1 została wysadzona.

View File

@ -0,0 +1,2 @@
# textdomain:mcl_explosions
@1 was caught in an explosion.=@1 被炸飛了

View File

@ -0,0 +1,5 @@
name = mcl_explosions
author = ryvnf
description = A common API to create explosions.
depends = mcl_particles
optional_depends = mcl_fire

263
mods/CORE/mcl_init/init.lua Normal file
View File

@ -0,0 +1,263 @@
-- Some global variables (don't overwrite them!)
mcl_vars = {}
mcl_vars.redstone_tick = 0.1
--- GUI / inventory menu settings
mcl_vars.gui_slots = "listcolors[#9990;#FFF7;#FFF0;#000;#FFF]"
-- nonbg is added as formspec prepend in mcl_formspec_prepend
mcl_vars.gui_nonbg = mcl_vars.gui_slots ..
"style_type[image_button;border=false;bgimg=mcl_inventory_button9.png;bgimg_pressed=mcl_inventory_button9_pressed.png;bgimg_middle=2,2]"..
"style_type[button;border=false;bgimg=mcl_inventory_button9.png;bgimg_pressed=mcl_inventory_button9_pressed.png;bgimg_middle=2,2]"..
"style_type[field;textcolor=#323232]"..
"style_type[label;textcolor=#323232]"..
"style_type[textarea;textcolor=#323232]"..
"style_type[checkbox;textcolor=#323232]"
-- Background stuff must be manually added by mods (no formspec prepend)
mcl_vars.gui_bg_color = "bgcolor[#00000000]"
mcl_vars.gui_bg_img = "background9[1,1;1,1;mcl_base_textures_background9.png;true;7]"
-- Legacy
mcl_vars.inventory_header = ""
-- Tool wield size
mcl_vars.tool_wield_scale = { x = 1.8, y = 1.8, z = 1 }
-- Mapgen variables
local mg_name = minetest.get_mapgen_setting("mg_name")
local minecraft_height_limit = 256
local superflat = mg_name == "flat" and minetest.get_mapgen_setting("mcl_superflat_classic") == "true"
local singlenode = mg_name == "singlenode"
-- Calculate mapgen_edge_min/mapgen_edge_max
mcl_vars.chunksize = math.max(1, tonumber(minetest.get_mapgen_setting("chunksize")) or 5)
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.MAX_MAP_GENERATION_LIMIT = math.max(1, minetest.MAX_MAP_GENERATION_LIMIT or 31000)
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.chunk_size_in_nodes = mcl_vars.chunksize * mcl_vars.MAP_BLOCKSIZE
local central_chunk_min_pos = central_chunk_offset * mcl_vars.MAP_BLOCKSIZE
local central_chunk_max_pos = central_chunk_min_pos + mcl_vars.chunk_size_in_nodes - 1
local ccfmin = central_chunk_min_pos - mcl_vars.MAP_BLOCKSIZE -- Fullminp/fullmaxp of central chunk, in nodes
local ccfmax = central_chunk_max_pos + mcl_vars.MAP_BLOCKSIZE
local mapgen_limit_b = math.floor(math.min(mcl_vars.mapgen_limit, mcl_vars.MAX_MAP_GENERATION_LIMIT) / mcl_vars.MAP_BLOCKSIZE)
local mapgen_limit_min = -mapgen_limit_b * mcl_vars.MAP_BLOCKSIZE
local mapgen_limit_max = (mapgen_limit_b + 1) * mcl_vars.MAP_BLOCKSIZE - 1
local numcmin = math.max(math.floor((ccfmin - mapgen_limit_min) / mcl_vars.chunk_size_in_nodes), 0) -- Number of complete chunks from central chunk
local numcmax = math.max(math.floor((mapgen_limit_max - ccfmax) / mcl_vars.chunk_size_in_nodes), 0) -- fullminp/fullmaxp to effective mapgen limits.
mcl_vars.mapgen_edge_min = central_chunk_min_pos - numcmin * mcl_vars.chunk_size_in_nodes
mcl_vars.mapgen_edge_max = central_chunk_max_pos + numcmax * mcl_vars.chunk_size_in_nodes
local function coordinate_to_block(x)
return math.floor(x / mcl_vars.MAP_BLOCKSIZE)
end
local function coordinate_to_chunk(x)
return math.floor((coordinate_to_block(x) - central_chunk_offset) / mcl_vars.chunksize)
end
function mcl_vars.pos_to_block(pos)
return {
x = coordinate_to_block(pos.x),
y = coordinate_to_block(pos.y),
z = coordinate_to_block(pos.z)
}
end
function mcl_vars.pos_to_chunk(pos)
return {
x = coordinate_to_chunk(pos.x),
y = coordinate_to_chunk(pos.y),
z = coordinate_to_chunk(pos.z)
}
end
local k_positive = math.ceil(mcl_vars.MAX_MAP_GENERATION_LIMIT / mcl_vars.chunk_size_in_nodes)
local k_positive_z = k_positive * 2
local k_positive_y = k_positive_z * k_positive_z
function mcl_vars.get_chunk_number(pos) -- unsigned int
local c = mcl_vars.pos_to_chunk(pos)
return
(c.y + k_positive) * k_positive_y +
(c.z + k_positive) * k_positive_z +
c.x + k_positive
end
if not superflat and not singlenode then
-- Normal mode
--[[ Realm stacking (h is for height)
- Overworld (h>=256)
- Void (h>=1000)
- Realm Barrier (h=11), to allow escaping the End
- End (h>=256)
- Void (h>=1000)
- Nether (h=128)
- Void (h>=1000)
]]
-- Overworld
mcl_vars.mg_overworld_min = -62
mcl_vars.mg_overworld_max_official = mcl_vars.mg_overworld_min + minecraft_height_limit
mcl_vars.mg_bedrock_overworld_min = mcl_vars.mg_overworld_min
mcl_vars.mg_bedrock_overworld_max = mcl_vars.mg_bedrock_overworld_min + 4
mcl_vars.mg_lava_overworld_max = mcl_vars.mg_overworld_min + 10
mcl_vars.mg_lava = true
mcl_vars.mg_bedrock_is_rough = true
elseif singlenode then
mcl_vars.mg_overworld_min = -66
mcl_vars.mg_overworld_max_official = mcl_vars.mg_overworld_min + minecraft_height_limit
mcl_vars.mg_bedrock_overworld_min = mcl_vars.mg_overworld_min
mcl_vars.mg_bedrock_overworld_max = mcl_vars.mg_bedrock_overworld_min
mcl_vars.mg_lava = false
mcl_vars.mg_lava_overworld_max = mcl_vars.mg_overworld_min
mcl_vars.mg_bedrock_is_rough = false
else
-- Classic superflat
local ground = minetest.get_mapgen_setting("mgflat_ground_level")
ground = tonumber(ground)
if not ground then
ground = 8
end
mcl_vars.mg_overworld_min = ground - 3
mcl_vars.mg_overworld_max_official = mcl_vars.mg_overworld_min + minecraft_height_limit
mcl_vars.mg_bedrock_overworld_min = mcl_vars.mg_overworld_min
mcl_vars.mg_bedrock_overworld_max = mcl_vars.mg_bedrock_overworld_min
mcl_vars.mg_lava = false
mcl_vars.mg_lava_overworld_max = mcl_vars.mg_overworld_min
mcl_vars.mg_bedrock_is_rough = false
end
mcl_vars.mg_overworld_max = mcl_vars.mapgen_edge_max
-- The Nether (around Y = -29000)
mcl_vars.mg_nether_min = -29067 -- Carefully chosen to be at a mapchunk border
mcl_vars.mg_nether_max = mcl_vars.mg_nether_min + 128
mcl_vars.mg_bedrock_nether_bottom_min = mcl_vars.mg_nether_min
mcl_vars.mg_bedrock_nether_top_max = mcl_vars.mg_nether_max
if not superflat then
mcl_vars.mg_bedrock_nether_bottom_max = mcl_vars.mg_bedrock_nether_bottom_min + 4
mcl_vars.mg_bedrock_nether_top_min = mcl_vars.mg_bedrock_nether_top_max - 4
mcl_vars.mg_lava_nether_max = mcl_vars.mg_nether_min + 31
else
-- Thin bedrock in classic superflat mapgen
mcl_vars.mg_bedrock_nether_bottom_max = mcl_vars.mg_bedrock_nether_bottom_min
mcl_vars.mg_bedrock_nether_top_min = mcl_vars.mg_bedrock_nether_top_max
mcl_vars.mg_lava_nether_max = mcl_vars.mg_nether_min + 2
end
if mg_name == "flat" then
if superflat then
mcl_vars.mg_flat_nether_floor = mcl_vars.mg_bedrock_nether_bottom_max + 4
mcl_vars.mg_flat_nether_ceiling = mcl_vars.mg_bedrock_nether_bottom_max + 52
else
mcl_vars.mg_flat_nether_floor = mcl_vars.mg_lava_nether_max + 4
mcl_vars.mg_flat_nether_ceiling = mcl_vars.mg_lava_nether_max + 52
end
end
-- The End (surface at ca. Y = -27000)
mcl_vars.mg_end_min = -27073 -- Carefully chosen to be at a mapchunk border
mcl_vars.mg_end_max_official = mcl_vars.mg_end_min + minecraft_height_limit
mcl_vars.mg_end_max = mcl_vars.mg_overworld_min - 2000
mcl_vars.mg_end_platform_pos = { x = 100, y = mcl_vars.mg_end_min + 74, z = 0 }
-- Realm barrier used to safely separate the End from the void below the Overworld
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
-- Use MineClone 2-style dungeons
mcl_vars.mg_dungeons = true
-- Set default stack sizes
minetest.nodedef_default.stack_max = 64
minetest.craftitemdef_default.stack_max = 64
-- Set random seed for all other mods (Remember to make sure no other mod calls this function)
math.randomseed(os.time())
local chunks = {} -- intervals of chunks generated
function mcl_vars.add_chunk(pos)
local n = mcl_vars.get_chunk_number(pos) -- unsigned int
local prev
for i, d in pairs(chunks) do
if n <= d[2] then -- we've found it
if (n == d[2]) or (n >= d[1]) then return end -- already here
if n == d[1]-1 then -- right before:
if prev and (prev[2] == n-1) then
prev[2] = d[2]
table.remove(chunks, i)
return
end
d[1] = n
return
end
if prev and (prev[2] == n-1) then --join to previous
prev[2] = n
return
end
table.insert(chunks, i, {n, n}) -- insert new interval before i
return
end
prev = d
end
chunks[#chunks+1] = {n, n}
end
function mcl_vars.is_generated(pos)
local n = mcl_vars.get_chunk_number(pos) -- unsigned int
for i, d in pairs(chunks) do
if n <= d[2] then
return (n >= d[1])
end
end
return false
end
-- "Trivial" (actually NOT) function to just read the node and some stuff to not just return "ignore", like mt 5.4 does.
-- p: Position, if it's wrong, {name="error"} node will return.
-- force: optional (default: false) - Do the maximum to still read the node within us_timeout.
-- us_timeout: optional (default: 244 = 0.000244 s = 1/80/80/80), set it at least to 3000000 to let mapgen to finish its job.
--
-- returns node definition, eg. {name="air"}. Unfortunately still can return {name="ignore"}.
function mcl_vars.get_node(p, force, us_timeout)
-- check initial circumstances
if not p or not p.x or not p.y or not p.z then return {name="error"} end
-- try common way
local node = minetest.get_node(p)
if node.name ~= "ignore" then
return node
end
-- copy table to get sure it won't changed by other threads
local pos = {x=p.x,y=p.y,z=p.z}
-- try LVM
minetest.get_voxel_manip():read_from_map(pos, pos)
node = minetest.get_node(pos)
if node.name ~= "ignore" or not force then
return node
end
-- all ways failed - need to emerge (or forceload if generated)
local us_timeout = us_timeout or 244
if mcl_vars.is_generated(pos) then
minetest.chat_send_all("IMPOSSIBLE! Please report this to MCL2 issue tracker!")
minetest.forceload_block(pos)
else
minetest.emerge_area(pos, pos)
end
local t = minetest.get_us_time()
node = minetest.get_node(pos)
while (not node or node.name == "ignore") and (minetest.get_us_time() - t < us_timeout) do
node = minetest.get_node(pos)
end
return node
-- it still can return "ignore", LOL, even if force = true, but only after time out
end

View File

@ -0,0 +1,3 @@
name = mcl_init
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.

159
mods/CORE/mcl_loot/init.lua Normal file
View File

@ -0,0 +1,159 @@
mcl_loot = {}
--[[
Select a number of itemstacks out of a pool of treasure definitions randomly.
Parameters:
* loot_definitions: Probabilities and information about the loot to select. Syntax:
{
stacks_min = 1, -- Minimum number of item stacks to get. Default: 1
stacks_max = 3, -- Maximum number of item stacks to get. Default: 1
items = { -- Table of possible loot items. This function selects between stacks_min and stacks_max of these.
{
weight = 5, -- Likelihood of this item being selected (see below). Optional (default: 1)
itemstack = ItemStack("example:item1"), -- Itemstack to select
-- OR
itemstring = "example:item1", -- Which item to select
amount_min = 1, -- Minimum size of itemstack. Must not be larger than 6553. Optional (default: 1)
amount_max = 10, -- Maximum size of item stack. Must not be larger than item definition's stack_max or 6553. Optional (default: 1)
wear_min = 1, -- Minimum wear value. Must be at least 1. Optional (default: no wear)
wear_max = 1, -- Maxiumum wear value. Must be at least 1. Optional (default: no wear)
},
{ -- more tables like above, one table per item stack }
}
}
* pr: PseudoRandom object used for the randomness
How weight works: The probability of a single item stack being selected is weight/total_weight, with
total_weight being the sum of all weight values in the items table. If you leave out the weight for
all items, the likelihood of each item being selected is equal.
Returns: Table of itemstrings
]]
function mcl_loot.get_loot(loot_definitions, pr)
local items = {}
local total_weight = 0
for i=1, #loot_definitions.items do
total_weight = total_weight + (loot_definitions.items[i].weight or 1)
end
--local stacks_min = loot_definitions.stacks_min or 1
--local stacks_max = loot_definitions.stacks_max or 1
local stacks = pr:next(loot_definitions.stacks_min, loot_definitions.stacks_max)
for s=1, stacks do
local r = pr:next(1, total_weight)
local accumulated_weight = 0
local item
for i=1, #loot_definitions.items do
accumulated_weight = accumulated_weight + (loot_definitions.items[i].weight or 1)
if accumulated_weight >= r then
item = loot_definitions.items[i]
break
end
end
if item then
local itemstring = item.itemstring
if itemstring then
local stack = ItemStack(itemstring)
if item.amount_min and item.amount_max then
stack:set_count(pr:next(item.amount_min, item.amount_max))
end
if item.wear_min and item.wear_max then
-- Sadly, PseudoRandom only allows very narrow ranges, so we set wear in steps of 10
local wear_min = math.floor(item.wear_min / 10)
local wear_max = math.floor(item.wear_max / 10)
stack:set_wear(pr:next(wear_min, wear_max) * 10)
end
if item.func then
item.func(stack, pr)
end
table.insert(items, stack)
else
minetest.log("error", "[mcl_loot] INTERNAL ERROR! Failed to select random loot item!")
end
end
end
return items
end
--[[
Repeat mcl_loot.get_loot multiple times for various loot_definitions.
Useful for filling chests.
* multi_loot_definitions: Table of loot_definitions (see mcl_loot.get_loot)
* pr: PseudoRandom object used for the randomness
Returns: Table of itemstrings ]]
function mcl_loot.get_multi_loot(multi_loot_definitions, pr)
local items = {}
for m=1, #multi_loot_definitions do
local group = mcl_loot.get_loot(multi_loot_definitions[m], pr)
for g=1, #group do
table.insert(items, group[g])
end
end
return items
end
--[[
Returns a table of length `max_slot` and all natural numbers between 1 and `max_slot`
in a random order.
]]
local function get_random_slots(max_slot, pr)
local slots = {}
for s=1, max_slot do
slots[s] = s
end
local slots_out = {}
while #slots > 0 do
local r = pr and pr:next(1, #slots) or math.random(1, #slots)
table.insert(slots_out, slots[r])
table.remove(slots, r)
end
return slots_out
end
--[[
Puts items in an inventory list into random slots.
* inv: InvRef
* listname: Inventory list name
* items: table of items to add
Items will be added from start of the table to end.
If the inventory already has occupied slots, or is
too small, placement of some items might fail.
]]
function mcl_loot.fill_inventory(inv, listname, items, pr)
local size = inv:get_size(listname)
local slots = get_random_slots(size, pr)
local leftovers = {}
-- 1st pass: Add items into random slots
for i=1, math.min(#items, size) do
local item = items[i]
local slot = slots[i]
local old_item = inv:get_stack(listname, slot)
local leftover = old_item:add_item(item)
inv:set_stack(listname, slot, old_item)
if not leftover:is_empty() then
table.insert(leftovers, item)
end
end
-- 2nd pass: If some items couldn't be added in first pass,
-- try again in a non-random fashion
for l=1, math.min(#leftovers, size) do
inv:add_item(listname, leftovers[l])
end
-- If there are still items left, tough luck!
end

View File

@ -0,0 +1,3 @@
name = mcl_loot
author = Wuzzy
description = API for filling a chest with random treasures.

View File

@ -0,0 +1,131 @@
local vector = vector
local table = table
local hash_node_position = minetest.hash_node_position
local add_particlespawner = minetest.add_particlespawner
local delete_particlespawner = minetest.delete_particlespawner
local ipairs = ipairs
mcl_particles = {}
-- Table of particlespawner IDs on a per-node hash basis
-- Keys: node position hashes
-- Values: Tables of particlespawner IDs (each node pos can have an arbitrary number of particlespawners)
local particle_nodes = {}
-- Node particles can be disabled via setting
local node_particles_allowed = minetest.settings:get("mcl_node_particles") or "none"
local levels = {
high = 3,
medium = 2,
low = 1,
none = 0,
}
allowed_level = levels[node_particles_allowed]
if not allowed_level then
allowed_level = levels["none"]
end
-- Add a particlespawner that is assigned to a given node position.
-- * pos: Node positon. MUST use integer values!
-- * particlespawner_definition: definition for minetest.add_particlespawner
-- * level: detail level of particles. "high", "medium", "low" or "none". High detail levels are for
-- CPU-demanding particles, like smoke of fire (which occurs frequently)
-- NOTE: All particlespawners are automatically removed on shutdown.
-- Returns particlespawner ID on succcess and nil on failure
function mcl_particles.add_node_particlespawner(pos, particlespawner_definition, level)
if allowed_level == 0 or levels[level] > allowed_level then
return
end
local poshash = hash_node_position(pos)
if not poshash then
return
end
local id = add_particlespawner(particlespawner_definition)
if id == -1 then
return
end
if not particle_nodes[poshash] then
particle_nodes[poshash] = {}
end
table.insert(particle_nodes[poshash], id)
return id
end
local add_node_particlespawner = mcl_particles.add_node_particlespawner
-- Deletes all particlespawners that are assigned to a node position.
-- If no particlespawners exist for this position, nothing happens.
-- pos: Node positon. MUST use integer values!
-- Returns true if particlespawner could be removed and false if not
function mcl_particles.delete_node_particlespawners(pos)
if allowed_level == 0 then
return false
end
local poshash = hash_node_position(pos)
local ids = particle_nodes[poshash]
if ids then
for i=1, #ids do
delete_particlespawner(ids[i])
end
particle_nodes[poshash] = nil
return true
end
return false
end
-- 3 exptime variants because the animation is not tied to particle expiration time.
-- 3 colorized variants to imitate minecraft's
local smoke_pdef_cached = {}
function mcl_particles.spawn_smoke(pos, name, smoke_pdef_base)
local new_minpos = vector.add(pos, smoke_pdef_base.minrelpos)
local new_maxpos = vector.add(pos, smoke_pdef_base.maxrelpos)
-- populate the cache
if smoke_pdef_cached[name] then
for i, smoke_pdef in ipairs(smoke_pdef_cached[name]) do
smoke_pdef.minpos = new_minpos
smoke_pdef.maxpos = new_maxpos
add_node_particlespawner(pos, smoke_pdef, "high")
end
-- cache already populated
else
smoke_pdef_cached[name] = {}
local smoke_pdef = table.copy(smoke_pdef_base)
smoke_pdef.amount = smoke_pdef_base.amount / 9
smoke_pdef.time = 0
smoke_pdef.animation = {
type = "vertical_frames",
aspect_w = 8,
aspect_h = 8,
-- length = 3 exptime variants
}
smoke_pdef.collisiondetection = true
smoke_pdef.minpos = new_minpos
smoke_pdef.maxpos = new_maxpos
-- the last frame plays for 1/8 * N seconds, so we can take advantage of it
-- to have varying exptime for each variant.
local exptimes = { 0.175, 0.375, 1.0 }
local colorizes = { "199", "209", "243" } -- round(78%, 82%, 90% of 256) - 1
for _,exptime in ipairs(exptimes) do
for _,colorize in ipairs(colorizes) do
smoke_pdef.maxexptime = exptime * smoke_pdef_base.maxexptime
smoke_pdef.animation.length = exptime + 0.1
-- minexptime must be set such that the last frame is actully rendered,
-- even if its very short. Larger exptime -> larger range
smoke_pdef.minexptime = math.min(exptime, (7.0/8.0 * (exptime + 0.1) + 0.1))
smoke_pdef.texture = "mcl_particles_smoke_anim.png^[colorize:#000000:" ..colorize
add_node_particlespawner(pos, smoke_pdef, "high")
table.insert(smoke_pdef_cached[name], table.copy(smoke_pdef))
end
end
end
end

View File

@ -0,0 +1,3 @@
name = mcl_particles
author = Wuzzy
description = Contains particle images of MineClone 2. No code.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

View File

@ -0,0 +1,97 @@
Licenses of sounds
-----------------
Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
http://creativecommons.org/licenses/by-sa/4.0/
Creative Commons Attribution 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by/3.0/
Glass breaking sounds (CC BY 3.0):
1: http://www.freesound.org/people/cmusounddesign/sounds/71947/
2: http://www.freesound.org/people/Tomlija/sounds/97669/
3: http://www.freesound.org/people/lsprice/sounds/88808/
default_tool_breaks.ogg by EdgardEdition (CC BY 3.0), http://www.freesound.org/people/EdgardEdition
Mito551 (sounds) (CC BY-SA 3.0):
default_dig_choppy.ogg
default_dig_cracky.ogg
default_dig_crumbly.1.ogg
default_dig_crumbly.2.ogg
default_dig_oddly_breakable_by_hand.ogg
default_dug_node.1.ogg
default_dug_node.2.ogg
default_grass_footstep.1.ogg
default_grass_footstep.2.ogg
default_grass_footstep.3.ogg
default_gravel_footstep.1.ogg
default_gravel_footstep.2.ogg
default_gravel_footstep.3.ogg
default_gravel_footstep.4.ogg
default_grass_footstep.1.ogg
default_place_node.1.ogg
default_place_node.2.ogg
default_place_node.3.ogg
default_place_node_hard.1.ogg
default_place_node_hard.2.ogg
default_hard_footstep.1.ogg
default_hard_footstep.2.ogg
default_hard_footstep.3.ogg
default_sand_footstep.1.ogg
default_sand_footstep.2.ogg
default_wood_footstep.1.ogg
default_wood_footstep.2.ogg
default_dirt_footstep.1.ogg
default_dirt_footstep.2.ogg
default_glass_footstep.ogg
Metal sounds:
default_dig_metal.ogg - yadronoff - CC-BY-3.0
- https://www.freesound.org/people/yadronoff/sounds/320397/
default_dug_metal.*.ogg - Iwan Gabovitch - qubodup - CC0
- http://opengameart.org/users/qubodup
default_metal_footstep.*.ogg - Ottomaani138 - CC0
- https://www.freesound.org/people/Ottomaani138/sounds/232692/
default_place_node_metal.*.ogg - Ogrebane - CC0
- http://opengameart.org/content/wood-and-metal-sound-effects-volume-2
AGFX (CC BY 3.0)
https://www.freesound.org/people/AGFX/packs/1253/
default_water_footstep.1.ogg
default_water_footstep.2.ogg
default_water_footstep.3.ogg
(default_water_footstep.4.ogg is silent)
blukotek (CC0 1.0)
https://www.freesound.org/people/blukotek/sounds/251660/
default_dig_snappy.ogg
sonictechtonic (CC BY 3.0)
https://www.freesound.org/people/sonictechtonic/sounds/241872/
player_damage.ogg
Voxelands project <http://www.voxelands.com/> (CC BY-SA 3.0)
mcl_sounds_place_node_water.ogg
mcl_sounds_dug_water.ogg
(Note: Artists from the Voxelands project include: sdzen, darkrose, sapier,
Tom Peter, Telaron, juskiddink)
Michel Baradari <https://opengameart.org/content/lava-splash> (CC BY 3.0)
default_place_node_lava.ogg
Adam_N (CC0 1.0):
player_falling_damage.ogg
Source: <https://www.freesound.org/people/Adam_N/sounds/346692/>
Alecia Shepherd (CC BY-SA 4.0):
mcl_sounds_cloth.ogg
Source: SnowSong sound and music pack <https://opengameart.org/content/snowsong-sound-and-music-pack>
Unknown authors (WTFPL):
pedology_snow_soft_footstep.*.ogg

View File

@ -0,0 +1,168 @@
--
-- Sounds
--
mcl_sounds = {}
function mcl_sounds.node_sound_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name="", gain=1.0}
table.dug = table.dug or
{name="default_dug_node", gain=0.25}
table.dig = table.dig or
{name="default_dig_oddly_breakable_by_hand", gain=1.0}
table.place = table.place or
{name="default_place_node_hard", gain=1.0}
return table
end
function mcl_sounds.node_sound_stone_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name="default_hard_footstep", gain=0.5}
table.dug = table.dug or
{name="default_hard_footstep", gain=1.0}
table.dig = table.dig or
{name="default_dig_cracky", gain=1.0}
mcl_sounds.node_sound_defaults(table)
return table
end
function mcl_sounds.node_sound_metal_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name="default_metal_footstep", gain=0.5}
table.dug = table.dug or
{name="default_dug_metal", gain=1.0}
table.dig = table.dig or
{name="default_dig_metal", gain=1.0}
table.place = table.place or
{name="default_place_node_metal", gain=1.0}
mcl_sounds.node_sound_defaults(table)
return table
end
function mcl_sounds.node_sound_dirt_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name="default_dirt_footstep", gain=1.0}
table.dug = table.dug or
{name="default_dirt_footstep", gain=1.5}
table.dig = table.dig or
{name="default_dig_crumbly", gain=1.0}
table.place = table.place or
{name="default_place_node", gain=1.0}
mcl_sounds.node_sound_defaults(table)
return table
end
function mcl_sounds.node_sound_sand_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name="default_sand_footstep", gain=0.5}
table.dug = table.dug or
{name="default_sand_footstep", gain=1.0}
table.dig = table.dig or
{name="default_dig_crumbly", gain=1.0}
table.place = table.place or
{name="default_place_node", gain=1.0}
mcl_sounds.node_sound_defaults(table)
return table
end
function mcl_sounds.node_sound_snow_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name="pedology_snow_soft_footstep", gain=0.5}
table.dug = table.dug or
{name="pedology_snow_soft_footstep", gain=1.0}
table.dig = table.dig or
{name="default_dig_crumbly", gain=1.0}
table.place = table.place or
{name="default_place_node", gain=1.0}
mcl_sounds.node_sound_defaults(table)
return table
end
function mcl_sounds.node_sound_wood_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name="default_wood_footstep", gain=0.5}
table.dug = table.dug or
{name="default_wood_footstep", gain=1.0}
table.dig = table.dig or
{name="default_dig_choppy", gain=1.0}
mcl_sounds.node_sound_defaults(table)
return table
end
function mcl_sounds.node_sound_wool_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name="mcl_sounds_cloth", gain=0.5}
table.dug = table.dug or
{name="mcl_sounds_cloth", gain=1.0}
table.dig = table.dig or
{name="mcl_sounds_cloth", gain=0.9}
table.place = table.dig or
{name="mcl_sounds_cloth", gain=1.0}
mcl_sounds.node_sound_defaults(table)
return table
end
function mcl_sounds.node_sound_leaves_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name="default_grass_footstep", gain=0.1325}
table.dug = table.dug or
{name="default_grass_footstep", gain=0.425}
table.dig = table.dig or
{name="default_dig_snappy", gain=0.4}
table.place = table.place or
{name="default_place_node", gain=1.0}
mcl_sounds.node_sound_defaults(table)
return table
end
function mcl_sounds.node_sound_glass_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name="default_glass_footstep", gain=0.5}
table.dug = table.dug or
{name="default_break_glass", gain=1.0}
table.dig = table.dig or
{name="default_dig_cracky", gain=1.0}
mcl_sounds.node_sound_defaults(table)
return table
end
function mcl_sounds.node_sound_water_defaults(table)
table = table or {}
table.footstep = table.footstep or
{name = "default_water_footstep", gain = 0.2}
table.place = table.place or
{name = "mcl_sounds_place_node_water", gain = 1.0}
table.dug = table.dug or
{name = "mcl_sounds_dug_water", gain = 1.0}
mcl_sounds.node_sound_defaults(table)
return table
end
function mcl_sounds.node_sound_lava_defaults(table)
table = table or {}
-- TODO: Footstep
table.place = table.place or
{name = "default_place_node_lava", gain = 1.0}
table.dug = table.dug or
{name = "default_place_node_lava", gain = 1.0}
-- TODO: Different dug sound
mcl_sounds.node_sound_defaults(table)
return table
end
-- Player death sound
minetest.register_on_dieplayer(function(player)
-- TODO: Add separate death sound
minetest.sound_play({name="player_damage", gain = 1.0}, {pos=player:get_pos(), max_hear_distance=16}, true)
end)

View File

@ -0,0 +1,3 @@
name = mcl_sounds
author = Wuzzy
description = This mod contains the core sounds of MineClone 2 as well as helper function for mods to access them.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More