Compare commits

...

226 Commits

Author SHA1 Message Date
Eliy21 ae169b2814 Add fix to crash when moving bought villager trade item to empty sell slot bug by JoseDouglas26 (#4079)
Add fix to #4062 by JoseDouglas26 MineClone2/MineClone2#4062 (comment)

Reviewed-on: MineClone2/MineClone2#4079
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Eliy21 <eliy21@noreply.git.minetest.land>
Co-committed-by: Eliy21 <eliy21@noreply.git.minetest.land>
2023-12-15 03:09:48 +00:00
Wbjitscool ebd733be82 update's the campfire's fire burning animation to make it look better (#4077)
improve the look of the campfire's flame/burning animation

Reviewed-on: MineClone2/MineClone2#4077
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Wbjitscool <dwsda121@gmail.com>
Co-committed-by: Wbjitscool <dwsda121@gmail.com>
2023-12-13 05:22:41 +00:00
the-real-herowl 610bcab0d6 Merge pull request 'Update's the stonecutter animation speed to match to the MC's one' (#4074) from stonecutter_fixes into master
Reviewed-on: MineClone2/MineClone2#4074
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2023-12-13 03:14:27 +00:00
Wbjitscool 07eb70e9be Update mods/ITEMS/mcl_stonecutter/init.lua 2023-12-13 02:39:25 +00:00
the-real-herowl b3da7a473d Merge pull request 'Move deepslate ore registration within generation check' (#4070) from Zasco/MineClone2:master into master
Reviewed-on: MineClone2/MineClone2#4070
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2023-12-13 02:06:25 +00:00
Zasco 351e31a889 Move deepslate ore registration within generation check 2023-12-12 23:16:51 +00:00
the-real-herowl aff4216ccf Merge pull request 'on_attack callback fix' (#4065) from on_attack_callback into master
Reviewed-on: MineClone2/MineClone2#4065
2023-12-10 23:55:47 +00:00
the-real-herowl 8b00fff4cb Remove dangling else 2023-12-11 00:54:30 +01:00
the-real-herowl cf70de0ecc Add an on_attack callback for mobs (#4064)
Added an on_attack callback that allows to execute additional custom logic after each attack.

Reviewed-on: MineClone2/MineClone2#4064
Co-authored-by: the-real-herowl <wiktor_t-i@proton.me>
Co-committed-by: the-real-herowl <wiktor_t-i@proton.me>
2023-12-10 16:10:33 +00:00
the-real-herowl d4797e13af Merge pull request 'release_0_85_fire_and_stone' (#4049) from release_0_85_fire_and_stone into master
Reviewed-on: MineClone2/MineClone2#4049
Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
2023-12-08 23:05:13 +00:00
the-real-herowl 3caa99a409 Post-release set version 0.86.0-SNAPSHOT 2023-12-09 00:03:41 +01:00
the-real-herowl ca71e949a8 Credits update 2023-12-09 00:01:19 +01:00
the-real-herowl 9a7e39654c Minor credits update 2023-12-09 00:01:19 +01:00
the-real-herowl 333db53e7b Add release notes for 0.85 2023-12-09 00:01:19 +01:00
the-real-herowl 47f920c9df Updated release credits and set version for 0.85 2023-12-09 00:01:19 +01:00
the-real-herowl bb66f81999 Merge pull request 'Combat rebalancing' (#4036) from combat_rebalancing into master
Reviewed-on: MineClone2/MineClone2#4036
2023-12-08 22:06:06 +00:00
the-real-herowl a344755894 Merge pull request 'horse: drops: remove 2nd saddle, add armor' (#4047) from Bakawun/MineClone2:horse into master
Reviewed-on: MineClone2/MineClone2#4047
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2023-12-07 01:02:38 +00:00
the-real-herowl c03366aa12 Merge pull request 'Fix syntax errors and update spanish translations' (#4050) from megustanlosfrijoles/frijolesclone2:master into master
Reviewed-on: MineClone2/MineClone2#4050
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2023-12-06 23:36:09 +00:00
José M bb1e572287 Update mcl_compass.es.tr and fix syntax errors 2023-12-05 18:39:29 -06:00
Eliy21 4127d120d2 Add server privs restriction to mcl_villages build tool (#4043)
<!--
Please follow our contributing guidelines first:
https://git.minetest.land/MineClone2/MineClone2/src/branch/master/CONTRIBUTING.md#how-you-can-help-as-a-programmer

By submitting this pull request, you agree to follow our Code of Conduct:
https://git.minetest.land/MineClone2/MineClone2/src/branch/master/CODE_OF_CONDUCT.md
-->

Fixes #4022

### Testing
-Make a new world, check host server and go into creative mode
-Since you're the server you have the server privs so get the mcl_villages build tool item in creative inventory and use it to see if it works
-Have someone join your server and give them the same item to use and see if they are restricted from using it

Reviewed-on: MineClone2/MineClone2#4043
Reviewed-by: chmodsayshello <chmodsayshello@hotmail.com>
Co-authored-by: Eliy21 <eliy21@noreply.git.minetest.land>
Co-committed-by: Eliy21 <eliy21@noreply.git.minetest.land>
2023-12-05 12:49:49 +00:00
Eliy21 86dad4693e Add warning log if players with 0 hp joined (#4051)
Reviewed-on: MineClone2/MineClone2#4051
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Eliy21 <eliy21@noreply.git.minetest.land>
Co-committed-by: Eliy21 <eliy21@noreply.git.minetest.land>
2023-12-05 08:21:37 +00:00
José M f39fe17895 Update mesecons_lightsone spanish translation
Fixed a syntaxis error at line 3 and added the missing translation for line 4
2023-12-04 22:51:50 -06:00
Eliy21 0673fcc25b Respawn dead players when they login so they don't get stuck without the death formspec (#4041)
Hopefully will prevent the dead player not respawning when logging in bug from happening

Reviewed-on: MineClone2/MineClone2#4041
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Eliy21 <eliy21@noreply.git.minetest.land>
Co-committed-by: Eliy21 <eliy21@noreply.git.minetest.land>
2023-12-05 01:08:50 +00:00
the-real-herowl 589de76613 Fixed a code branch never being run 2023-12-05 01:59:05 +01:00
the-real-herowl 1857341b59 Fixed player knockback from arrows 2023-12-05 00:58:10 +00:00
the-real-herowl 46d9c66000 Fixed mobs executing custom on_punch with punch fail 2023-12-05 00:58:10 +00:00
the-real-herowl cca6645524 Added player damage invulnerability 2023-12-05 00:58:10 +00:00
the-real-herowl 24ffd64cad Knockback fixes 2023-12-05 00:58:10 +00:00
the-real-herowl e29654a0f6 Revert healing interval default to the lower value 2023-12-05 00:58:10 +00:00
José Muñoz 027e0e8337 Fix a typo in the spanish translation (#4039)
Reviewed-on: MineClone2/MineClone2#4039
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: José Muñoz <dr.cabra@disroot.org>
Co-committed-by: José Muñoz <dr.cabra@disroot.org>
2023-12-05 00:05:39 +00:00
bakawun 2ba73f832c horse: drops: remove 2nd saddle, add armor 2023-12-04 20:17:39 +01:00
chmodsayshello 4b63ff1c2a Merge pull request 'Fix "sleeping player hud" sometimes showing decimal numbers' (#4038) from player_sleeping_hudfix into master
Reviewed-on: MineClone2/MineClone2#4038
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2023-12-02 19:37:05 +00:00
chmodsayshello 43e7a952ac use math.ceil to get amount of needed players 2023-11-30 22:29:56 +01:00
codiac 4cf865a36c Fix passive threshold in nether and end (#4030)
Fix light check for passive mobs in other dimensions. It is apparently the same in all dimensions. If a mob has it's own spawn_check function then that should be used regardless of it's type.

Fixes #4029

Reviewed-on: MineClone2/MineClone2#4030
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: codiac <codiac@inbox.lv>
Co-committed-by: codiac <codiac@inbox.lv>
2023-11-28 02:45:18 +00:00
Eliy21 b57f6be81d Make showing advancement chat messages into a setting (#4032)
Reviewed-on: MineClone2/MineClone2#4032
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Eliy21 <eliy21@noreply.git.minetest.land>
Co-committed-by: Eliy21 <eliy21@noreply.git.minetest.land>
2023-11-28 01:37:45 +00:00
the-real-herowl cd40861b3b Merge pull request 'Add stonecutter functionality' (#3999) from stonecutter_functionality into master
Reviewed-on: MineClone2/MineClone2#3999
2023-11-27 23:37:57 +00:00
the-real-herowl 19728c5a19 Merge pull request 'hopper reimplementation' (#3980) from Morik666/MineClone2:hopper into master
Reviewed-on: MineClone2/MineClone2#3980
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2023-11-27 23:34:47 +00:00
Kostinatyn Tsiupa 1da7bb0bdc hopper reimplementation
Reimplemented hoppers and all (blast_furnace, furnace, smoker, composters, double chaets, shulker_boxes, droppers, bookshelvs and brewing_stands) connected nodes
2023-11-27 14:33:01 +02:00
the-real-herowl 1044163717 Fixed the ambiguous /clear command being dangerous (#4026)
Implements #3826

Reviewed-on: MineClone2/MineClone2#4026
Co-authored-by: the-real-herowl <wiktor_t-i@proton.me>
Co-committed-by: the-real-herowl <wiktor_t-i@proton.me>
2023-11-27 02:22:39 +00:00
ThePython10110 570ea114ec Fix weathered cut copper crafting (#4033)
Just fixing a typo.

Reviewed-on: MineClone2/MineClone2#4033
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: ThePython10110 <thepython10110@noreply.git.minetest.land>
Co-committed-by: ThePython10110 <thepython10110@noreply.git.minetest.land>
2023-11-27 02:21:48 +00:00
the-real-herowl 8fd988da11 Increased cut copper recipe output 2023-11-25 23:52:04 +00:00
the-real-herowl f1c5f0ca1c Fixed duplication bug 2023-11-25 23:52:04 +00:00
the-real-herowl b4080b6275 Credits update in mod.conf 2023-11-25 23:52:04 +00:00
the-real-herowl bb48e47488 Made stonecutter player metadata consistent 2023-11-25 23:52:04 +00:00
the-real-herowl a6025b751a Uneven crafts support
-taking part of the resulting stack now produces well-defined results
-stonecutter won't allow amount undivisible by recipe count anymore
2023-11-25 23:52:04 +00:00
the-real-herowl af2f58248f Added the ability to stonecut up to full stack 2023-11-25 23:52:04 +00:00
AFCMS e324a1a74b Make inventory use the util functions 2023-11-25 23:52:04 +00:00
AFCMS 4836418cf6 Rework Stonecutter 2023-11-25 23:52:04 +00:00
AFCMS a001f84786 Add utility functions to clean inventory lists 2023-11-25 23:52:04 +00:00
AFCMS 2128dd4c15 Add basic table ordered keys iterator 2023-11-25 23:52:04 +00:00
the-real-herowl c183da7714 Updated README 2023-11-25 23:52:04 +00:00
the-real-herowl fd17bf1a29 Removed old implementation groups 2023-11-25 23:52:04 +00:00
the-real-herowl 0c7b4d473c Copper blocks stonecutter recipes 2023-11-25 23:52:04 +00:00
the-real-herowl 6ebd3ccb7d Third batch of stonecutter recipes
-deepslate
-blackstone
-quartz bricks
2023-11-25 23:52:04 +00:00
the-real-herowl d46b9071a0 Added nether and end stonecutter recipes 2023-11-25 23:52:04 +00:00
the-real-herowl ead2e772c2 First batch of stonecutter recipes under new API
-core blocks
-stairs
-slabs
-walls
2023-11-25 23:52:04 +00:00
the-real-herowl 19cea45c17 Stonecutter fixes and improvements
-improved stonecutter API, making it more robust
-fixed a dupe bug
2023-11-25 23:52:04 +00:00
the-real-herowl b252e577ec Implement recipe registering API 2023-11-25 23:52:04 +00:00
Chris Page 12568a6749 use on_destruct instead of after dig node 2023-11-25 23:52:04 +00:00
Chris Page 559f500322 Update readme for stonecutter 2023-11-25 23:52:04 +00:00
Chris Page 40fb043de2 Add stage so smooth items can't be reverted 2023-11-25 23:52:04 +00:00
Chris Page 5dda3033a5 Prevent input from being a selectable option 2023-11-25 23:52:04 +00:00
Chris Page 524c9c1bcc Dupe glitch fizes and remove item label 2023-11-25 23:52:04 +00:00
Chris Page a9f26fb354 use item groups to determine the cuttable items 2023-11-25 23:52:04 +00:00
Chris Page 01d43bb33a Remove unused meta on drop items 2023-11-25 23:52:04 +00:00
Chris Page ca37ce5744 Remove hardcoded one element array 2023-11-25 23:52:04 +00:00
Chris Page 5f0ad98dae Use node group for items that can be used in the stonecutter 2023-11-25 23:52:04 +00:00
Chris Page 0e60231c2e Only reset output if input is empty 2023-11-25 23:52:04 +00:00
Chris Page 7fcc2e3be3 Minor output fixes 2023-11-25 23:52:04 +00:00
Chris Page 356045b3e3 Add comments and drop items when destroyed 2023-11-25 23:52:04 +00:00
Chris Page 07d2759ae4 Check if item is a slab or not 2023-11-25 23:52:04 +00:00
Chris Page 9da07af370 Check if item can be made into stairs, slabs and walls 2023-11-25 23:52:04 +00:00
Chris Page 47990eec2b begin adding check if item canbe cut 2023-11-25 23:52:04 +00:00
Chris Page 7523727521 take output from stonecutter 2023-11-25 23:52:04 +00:00
Chris Page 2af08c3188 clear formspec on taking input item 2023-11-25 23:52:04 +00:00
Chris Page 45532ebe6d Add gui to list craft recipes for some stones 2023-11-25 23:52:04 +00:00
3raven 86da47b922 French translation update (#4006)
Update french translation, add missing chain, fix typo

Reviewed-on: MineClone2/MineClone2#4006
Reviewed-by: AFCMS <afcm.contact@gmail.com>
Co-authored-by: 3raven <3raven@noreply.git.minetest.land>
Co-committed-by: 3raven <3raven@noreply.git.minetest.land>
2023-11-25 01:08:06 +00:00
Eliy21 7cbba73d50 Combat (mostly PvE) rebalancing (#4005)
-Added short mob invulnerability time after being hit
-Added separate shorter range for hitting mobs (as opposed to node interaction)
-Reworked mob knockback
-Slowed down natural health regeneration from saturation
-Added a setting for the saturation health regen speed

Reviewed-on: MineClone2/MineClone2#4005
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Eliy21 <eliy21@noreply.git.minetest.land>
Co-committed-by: Eliy21 <eliy21@noreply.git.minetest.land>
2023-11-23 00:32:23 +00:00
José M 4df6f82c64 Fix spanish translation errors (#4018)
Reviewed-on: MineClone2/MineClone2#4018
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: José M <dr.cabra@disroot.org>
Co-committed-by: José M <dr.cabra@disroot.org>
2023-11-18 22:20:02 +00:00
chmodsayshello 6ee2dbe70c Add MineCraft like sleeping player hud (#4011)
This adds a sleeping hud/actionbar that'll be displayed to players currently not sleeping.

Reviewed-on: MineClone2/MineClone2#4011
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: chmodsayshello <chmodsayshello@hotmail.com>
Co-committed-by: chmodsayshello <chmodsayshello@hotmail.com>
2023-11-18 21:21:17 +00:00
the-real-herowl 613ab897b2 Merge pull request 'Fix item not dropping at tool last use' (#4009) from tool_destruction into master
Reviewed-on: MineClone2/MineClone2#4009
2023-11-18 01:32:01 +00:00
the-real-herowl e53d9ec8d7 Added comments 2023-11-18 02:31:07 +01:00
Mikita Wiśniewski a764818e13 Add a new 'pumpkin' group (#4012)
Creates a new 'pumpkin' group, which combines Pumpkin, Faceless Pumkin and Jack o'Lantern under a shared category. This helps tidy up the mesecons_noteblock code a bit, and possibly other mods too.

Reviewed-on: MineClone2/MineClone2#4012
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
2023-11-14 15:35:30 +00:00
the-real-herowl 378b8f8f6c Fix item not dropping at tool last use 2023-11-13 13:35:12 +01:00
Aliaksei Urbanski 32ef89aca3 Fix minor README's imperfections (#4001)
I've prepared some minor changes for `README`s.

Reviewed-on: MineClone2/MineClone2#4001
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Aliaksei Urbanski <aliaksei.urbanski@gmail.com>
Co-committed-by: Aliaksei Urbanski <aliaksei.urbanski@gmail.com>
2023-11-11 21:01:45 +00:00
the-real-herowl accb8742dd Merge pull request 'Make golem go home. Fixes #3288' (#3929) from golem_nav into master
Reviewed-on: MineClone2/MineClone2#3929
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2023-11-06 22:31:43 +00:00
codiac 71282e196e Move mob nav hacks to Experimental 2023-11-06 22:46:04 +01:00
codiac 89c97690c8 Add a setting to enable mod nav hacks 2023-11-06 22:01:31 +01:00
codiac 06f9486e4d Do not go home if attacking 2023-11-06 21:59:40 +01:00
codiac ae5564e658 Make golem go home. Fixes #3288 2023-11-06 21:59:40 +01:00
the-real-herowl fdf823fff6 Merge pull request 'Update trapdoor climbable behavior' (#3938) from Dehydrate6684/MineClone2:trapdoor-ladder into master
Reviewed-on: MineClone2/MineClone2#3938
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2023-11-06 20:29:23 +00:00
Araca 52b65554d9 Do not output enchanted item if enchantment is impossible (#3998)
To Fix #3672 , I avoid displaying the output item if enchantment is not possible for various reason
* Level of added enchantment is below the one from input item
* Incompatible enchantment

Co-authored-by: Araca <>
Reviewed-on: MineClone2/MineClone2#3998
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Araca <araca.prod@gmail.com>
Co-committed-by: Araca <araca.prod@gmail.com>
2023-11-06 20:12:36 +00:00
the-real-herowl 5a069af072 Merge pull request 'Piston-breakable nodes don't fill up the push limit, items properly drop' (#3813) from seventeenthShulker/MineClone2:piston_digs_properly into master
Reviewed-on: MineClone2/MineClone2#3813
2023-11-06 19:50:31 +00:00
the-real-herowl 14f73a8c55 Merge pull request 'armor trim followup' (#3974) from trim_achievement into master
Reviewed-on: MineClone2/MineClone2#3974
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2023-11-06 19:37:56 +00:00
the-real-herowl dbab70ea38 Fixed the wayfinder 2023-11-06 20:22:46 +01:00
chmodsayshello 952a96b57d fix leggings trim textures 2023-11-05 20:35:13 +01:00
Dehydrate6684 e5a260b563
Added vines and skulk vines to ladder group 2023-11-05 14:10:58 +08:00
Dehydrate6684 9b2b8ee56e
Removed direction checks 2023-11-05 14:06:53 +08:00
seventeenthShulker 00cfca5947 Make carpet sticky again 2023-11-04 16:01:46 +00:00
seventeenthShulker c37da143da Add crying obsidian and lodestone to mvps_stoppers 2023-11-04 16:01:46 +00:00
seventeenthShulker 520fd773fb Fix random crash when piston breaks node with no player 2023-11-04 16:01:46 +00:00
seventeenthShulker 378df76e5f Prevent signs from being replaced by pushed/pulled blocks 2023-11-04 16:01:46 +00:00
seventeenthShulker 3e12b3c700 Check protection of certain nodes before push/pull
- The node directly in front of a piston (including air)

- The 'final' position of any connected nodes
2023-11-04 16:01:46 +00:00
seventeenthShulker 0637182697 Tallgrass and dead bush added to dig_by_piston 2023-11-04 16:01:46 +00:00
seventeenthShulker 0580b14310 Vertical pistons now save owner meta 2023-11-04 16:01:46 +00:00
seventeenthShulker 98cf3b7f7a Check node_replaceable after dig_by_piston
Allows tallgrass, nether vines etc to drop
2023-11-04 16:01:46 +00:00
seventeenthShulker e5829f719d All signs are mvps_stopper upon registration
All buttons are mvps_unsticky upon registration
Add some missing unmovable nodes
Bamboo trapdoor is now sticky
2023-11-04 16:01:46 +00:00
seventeenthShulker 089e3d46f1 Several more blocks comply with MC piston mechanics. 2023-11-04 16:01:46 +00:00
seventeenthShulker 5d8688dbeb Change tall flowers to `buildable_to = false` 2023-11-04 16:01:46 +00:00
seventeenthShulker 058684f17f Improve dig_node simulation and fix duplication 2023-11-04 16:01:46 +00:00
seventeenthShulker 918b8eee38 Fix unsticky defs for shulker_box_small names (some did not exist) 2023-11-04 16:01:46 +00:00
seventeenthShulker af206ed8b3 All bamboo plant tiles can be broken with pistons 2023-11-04 16:01:46 +00:00
seventeenthShulker f2eca64e42 Blocks with dig_by_piston no longer fill up the push limit
Fix for broken nodes (e.g. sugar cane) not updating and leaving floating bits

Short-term fix for minetest.dig_node not always working (checking for group dig_immediate = 3)
2023-11-04 16:01:46 +00:00
the-real-herowl 262100be24 Fixed stew/bowl duplication bug (#3995)
Fixed #3991, copied some code over from mcl_potions

Reviewed-on: MineClone2/MineClone2#3995
Co-authored-by: the-real-herowl <wiktor_t-i@proton.me>
Co-committed-by: the-real-herowl <wiktor_t-i@proton.me>
2023-11-03 22:39:21 +00:00
Eliy21 69dc013799 Prevent multiple chestboat drivers (#3992)
Fixes #3872

Reviewed-on: MineClone2/MineClone2#3992
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Eliy21 <eliy21@noreply.git.minetest.land>
Co-committed-by: Eliy21 <eliy21@noreply.git.minetest.land>
2023-11-03 22:09:49 +00:00
Michieal a425d359f5 WaterLoggedRootsKelpFix (#3994)
Fixes #3990

A very simple fix to Kelp and the current water logged nodes. It adds the group "waterlogged" to water logged items and then puts a check for the group in kelp growth. Made it as a group, because eventually there will be other waterlogged nodes.

Reviewed-on: MineClone2/MineClone2#3994
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Michieal <michieal@noreply.git.minetest.land>
Co-committed-by: Michieal <michieal@noreply.git.minetest.land>
2023-11-03 21:46:00 +00:00
Freedom 83d6e2a5d2 polar bear fix typo (#3846)
horrizonatal -> horizontal

Reviewed-on: MineClone2/MineClone2#3846
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Freeman <project@gnuhacker.org>
Co-committed-by: Freeman <project@gnuhacker.org>
2023-11-03 00:06:06 +00:00
FossFanatic ce403b9245 Rename Liquid Textures (#3758)
This pull request renames the textures of water and lava to more closely follow the MineClone 2 naming convention.

The code has also been changed to now reflect these new names.

Reviewed-on: MineClone2/MineClone2#3758
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: FossFanatic <fossfanatic@noreply.git.minetest.land>
Co-committed-by: FossFanatic <fossfanatic@noreply.git.minetest.land>
2023-11-02 23:47:26 +00:00
Eliy21 da911bd4d4 Turn non-player boat passenger sideways (#3986)
Some low hanging simple boat fixes.

Fixes #3259

Reviewed-on: MineClone2/MineClone2#3986
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Eliy21 <eliy21@noreply.git.minetest.land>
Co-committed-by: Eliy21 <eliy21@noreply.git.minetest.land>
2023-11-02 19:24:52 +00:00
the-real-herowl 8789411ab7 Merge pull request 'Add ability for shovels to turn grass paths into dirt on shift+right click' (#3932) from add-dirty-shovel-function into master
Reviewed-on: MineClone2/MineClone2#3932
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2023-11-02 19:03:47 +00:00
the-real-herowl 5b1deedaf0 Disabled grass path making when sneaking 2023-11-02 20:00:19 +01:00
SmokeyDope fa1d8dfc47 Adjust grass path long description to inform players of new way to turn paths back to dirt. 2023-11-02 17:34:01 +00:00
SmokeyDope d2a4a6d042 add group 'path_remove_possible' to grass paths 2023-11-02 17:34:01 +00:00
SmokeyDope 5e194b33bd Adjust make_grass_path function to let shovels turn grass paths back to dirt with shift+rightclick 2023-11-02 17:34:01 +00:00
Araca 35bb569ee1 make craft guide search use local language (#3984)
Fix #3909

It is now possible to search in the crafting guide using both item id ("name", usually related to the English name) and translated item description (containing the displayed in-game name).

Co-authored-by: Araca <>
Reviewed-on: MineClone2/MineClone2#3984
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Araca <araca.prod@gmail.com>
Co-committed-by: Araca <araca.prod@gmail.com>
2023-10-31 10:00:58 +00:00
chmodsayshello 5be506830f make diamond tools upgradeable again 2023-10-25 18:04:32 +02:00
codiac 4fcd1ae541 Fix slime spawn crash (#3977)
Declare global variables before using them!

Fixes #3975

Reviewed-on: MineClone2/MineClone2#3977
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: codiac <codiac@inbox.lv>
Co-committed-by: codiac <codiac@inbox.lv>
2023-10-23 05:32:18 +00:00
the-real-herowl f941817c39 Merge pull request 'Un-hardcode blast resistance and hardness of fences and walls' (#3943) from wood_fence_blast_resistance into master
Reviewed-on: MineClone2/MineClone2#3943
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2023-10-22 02:24:28 +00:00
seventeenthShulker bc3bde4cf8 Forgot about blackstone 2023-10-22 02:14:17 +00:00
seventeenthShulker 8099a4bd17 Walls use `source` parameter for default hardness and blast resistance
If no `source` given, fallbacks are 2 and 6 respectively
2023-10-22 02:14:17 +00:00
seventeenthShulker e2ed1ab4a6 Fix prismarine bricks and dark variant blast res.
Should be 6 like regular prismarine
2023-10-22 02:14:17 +00:00
seventeenthShulker e43a8e267d Un-hardcode blast resistance, hardness for walls,
now only based on their material
2023-10-22 02:14:17 +00:00
seventeenthShulker 570caf47eb All wood-type and nether-type fences now match material's blast resistance 2023-10-22 02:14:17 +00:00
the-real-herowl 59f3b53a51 Merge pull request 'Use MC 1.18+ light levels to control mob spawning' (#3946) from spawn_lighting into master
Reviewed-on: MineClone2/MineClone2#3946
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2023-10-22 01:35:00 +00:00
chmodsayshello ec7e99019e add trim advancements 2023-10-21 22:25:30 +02:00
Dehydrate6684 b320d008ca
Unhardcoded nil 2023-10-18 08:04:54 +08:00
the-real-herowl 3d7155c1b9 Merge pull request 'Raise player eye height to 1.6 blocks.' (#3967) from Dark/MineClone2:master into master
Reviewed-on: MineClone2/MineClone2#3967
Reviewed-by: chmodsayshello <chmodsayshello@hotmail.com>
2023-10-16 16:41:18 +00:00
chmodsayshello e3ab94809e Merge pull request 'Fixed a crash in minetest vector code that isn't propogated to lua.' (#3966) from fix_rotate_around_axis_crash into master
Reviewed-on: MineClone2/MineClone2#3966
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Reviewed-by: chmodsayshello <chmodsayshello@hotmail.com>
2023-10-16 12:21:56 +00:00
Dark a66be39d9b Raise player eye height to 1.6 blocks.
This is the same as in Minecraft. The previous value of 1.5 can feel very strange for those coming from that game.
2023-10-16 00:15:12 +00:00
ancientmarinerdev 3564f6ebde Fixed a crash in minetest vector code that isn't propogated to lua. Create util for ease of use. 2023-10-15 22:03:48 +01:00
chmodsayshello f99ae93bf6 Merge pull request 'fix crash when opening a chest that has an unknow node on it' (#3964) from pepebotella/MineClone2:chest-under-unknow into master
Reviewed-on: MineClone2/MineClone2#3964
Reviewed-by: chmodsayshello <chmodsayshello@hotmail.com>
2023-10-15 19:21:10 +00:00
Freedom 8d440252a4 fix crash when opening a chest that has an unknow node on it
fix #3961
2023-10-13 21:07:00 +02:00
the-real-herowl d706833f21 Merge pull request 'Wither finishing & effect fixes' (#3957) from the-real-herowl/MineClone2:wither into master
Reviewed-on: MineClone2/MineClone2#3957
2023-10-11 20:46:24 +00:00
the-real-herowl c874e01cf9 Wither falling when no target found and small fixes 2023-10-11 00:54:31 +00:00
the-real-herowl 7ce82b9dcb Peaceful crash fixed 2023-10-11 00:54:31 +00:00
the-real-herowl 645072507f Wither melee attack and bug fixes 2023-10-11 00:54:31 +00:00
the-real-herowl 924a6c1c47 Settings-related fixes
-moved to the cleaner way of obtaining settings values
-disabled the anti-troll measures by default
-made the wither per-dimension limit dependent on the settings
-(anti-troll measures enabled required for wither counting and limit)
2023-10-11 00:54:31 +00:00
the-real-herowl 20b0f0748d Added some comments to the code 2023-10-11 00:54:31 +00:00
the-real-herowl d7c76e33d8 Tiny adjustments
- wither initial explosion radius moved from a magic value into a local variable
- wither initial explosion radius reduced
- wither attack_exception improved to better handle unlikely edge cases
2023-10-11 00:54:31 +00:00
the-real-herowl 966712f4ff Optimisation and cleanup
-optimised and cleaned up wither rose withering effect code
-removed unused code
2023-10-11 00:54:31 +00:00
the-real-herowl e4102e6124 Implemented wither defensive measures
Added block breaking when hit, or a safe_boom when hit and mobs_griefing
is disabled. Removed dubious anti-troll measures.
2023-10-11 00:54:31 +00:00
the-real-herowl 17c8f220e6 A few more wither fixes 2023-10-11 00:54:31 +00:00
the-real-herowl df17688b7d Great batch of improvements 2023-10-11 00:54:31 +00:00
the-real-herowl 729d8ec9e0 Another batch of wither adjustments 2023-10-11 00:54:31 +00:00
the-real-herowl c9dc12b081 Further wither adjustments 2023-10-11 00:54:31 +00:00
Nauta Turbidus a1b6819756 Withering effect and effect immunities
Added withering effect and immunities to effects.

Signed-off-by: Nauta Turbidus <88062389+nauta-turbidus@users.noreply.github.com>
2023-10-11 00:54:31 +00:00
the-real-herowl f1568483b3 Merge pull request 'Keep axolotls from attacking sheep' (#3963) from ThePython10110/MineClone2:axolotl-sheep into master
Reviewed-on: MineClone2/MineClone2#3963
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
2023-10-11 00:50:12 +00:00
ThePython10110 d7fa24ebf8 Keep axolotls from attacking sheep 2023-10-10 23:50:46 +00:00
Dehydrate6684 23468cc2dd
Used vector.offset instead of add/subtract 2023-10-10 09:39:16 +08:00
Dehydrate6684 0c48a46f7c
Updated code based on reviews 2023-10-09 13:55:08 +08:00
chmodsayshello 712a6d6c66 Merge pull request 'add 1.20 armor trims' (#3784) from armor_trims into master
Reviewed-on: MineClone2/MineClone2#3784
Reviewed-by: AFCMS <afcm.contact@gmail.com>
2023-10-03 21:46:00 +00:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 a620d24ec8 Fix a number of crashes involving unknown nodes, also fix fishbuckets on_place (#3914)
Fixes: #3913 #3915

~~You can reproduce the crash by placing a fish bucket on top snow above an unknown node.

I also noticed that the code always uses pointed_thing.above so I fixed that and also added a function to mcl_utils to figure out where a node should be placed (either above or below). Looks like the rest of the code could also use improvement but at least it does not crash now.~~

Cora fixed a bunch of related crashes in Mineclona so I am replacing my commit and cherry picking all her commits here.
https://codeberg.org/mineclonia/mineclonia/pulls/549

Here is the list of fixes from that PR:
- Crash when placing snow layer on unknown nodes
- Crash when snow layers on unknown nodes are flooded
- Crash when placing fishbucket on snow on top of unknown nodes
- Crash when placing chorus flower and stem on unknown
- Crash when placing mob spawners on unknown
- The fishbucket on place to actually replace buildable_to

Co-authored-by: cora <coradelamouche@gmx.ch>
Reviewed-on: MineClone2/MineClone2#3914
Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
Co-authored-by: 𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 <mrrar@noreply.git.minetest.land>
Co-committed-by: 𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 <mrrar@noreply.git.minetest.land>
2023-09-29 18:47:07 +00:00
ancientmarinerdev 178b24886f Merge pull request 'mcl_oxidation: typo in README.' (#3910) from mdk/MineClone2:typo into master
Reviewed-on: MineClone2/MineClone2#3910
Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
2023-09-29 18:41:27 +00:00
ancientmarinerdev 8333281b4f Merge pull request 'Halved the creeper explosion timer reset radius' (#3808) from reduce-explosiontimer_reset_radius into master
Reviewed-on: MineClone2/MineClone2#3808
Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
2023-09-29 18:36:28 +00:00
Nicu 6d3e55ce12 Reduced the creeper explosion timer reset radius from 6 to 3
This gives the player just enough time to get out of the creeper's range, to reset their explosion timer and avoid unnecessary destruction.
2023-09-29 18:35:21 +00:00
ancientmarinerdev 2c2f5595f3 Merge pull request 'Add Setting to keep respawn location set if bed is destroyed.' (#3933) from Eliy21/MineClone2:no_bed_respawn_setting into master
Reviewed-on: MineClone2/MineClone2#3933
Reviewed-by: chmodsayshello <chmodsayshello@hotmail.com>
2023-09-29 18:29:31 +00:00
chmodsayshello 8936313fb3 proper itemslot background
redo of 904cd78d3f ; caused some issues after cherry pick, same texture
2023-09-29 16:59:45 +02:00
ancientmarinerdev c51442704c Merge pull request 'mcl_skins: link to official mcl_custom_skins' (#3954) from skins into master
Reviewed-on: MineClone2/MineClone2#3954
Reviewed-by: ancientmarinerdev <ancientmariner_dev@proton.me>
2023-09-28 19:43:24 +00:00
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 2bd6678b08 mcl_skins: link to official mcl_custom_skins 2023-09-28 13:09:45 -05:00
Codiac e0c44244f9 Merge pull request 'Point mcl_custom_skins link to a working URL' (#3949) from Montandalar/MineClone2:fix_url_mcl_custom_skins into master
Reviewed-on: MineClone2/MineClone2#3949
Reviewed-by: Codiac <codiac@noreply.git.minetest.land>
2023-09-28 10:40:03 +00:00
Codiac 5b7352a23a Merge pull request 'Fix Server crash (Issue #3939)' (#3947) from Michieal/MineClone2_For_PRs:Bamboo_Fix_PointedThing into master
Reviewed-on: MineClone2/MineClone2#3947
Reviewed-by: Codiac <codiac@noreply.git.minetest.land>
2023-09-28 10:39:23 +00:00
Michieal e8c658658d Update Credits. 2023-09-26 18:59:51 +00:00
Michieal e9d994b74d Fix Campifires API to not crash the server.
Fixed the error in Campfires' On_RightClick() to not error out when called with a non-existent pointed_thing.
2023-09-26 18:57:17 +00:00
Michieal eafe6627d8 Extra checks placed in. 2023-09-26 18:35:12 +00:00
chmodsayshello 4046a68fbf Add trim snippet 2023-09-26 20:24:54 +02:00
Blockhead 882c3ef339 Point mcl_custom_skins link to a working URL 2023-09-25 19:55:36 +10:00
codiac 95db118361 Add rules for blaze, wither skeleton, silverfish 2023-09-22 09:09:35 +10:00
codiac d2d7887e0f Handle bat and slime light checks 2023-09-21 14:53:32 +10:00
Michieal b2ebcf5d4f Readme Change
Putting my name back into the credits in the mod.
2023-09-20 06:07:13 +00:00
Michieal f57220f784 Fix Server crash (Issue ##3939)
Fixes the error of pointed_thing being nil (null) by first checking to see if it exists, and if not, exit the on_place call back.
2023-09-20 05:57:49 +00:00
codiac 7577d37b38 Clarify MC version for lighting 2023-09-20 15:56:27 +10:00
codiac bf4c7e1913 Allow non monsters spawns too 2023-09-20 09:24:51 +10:00
codiac 11e3674926 Use MC 1.18 light levels to control mob spawning 2023-09-19 11:18:40 +10:00
Dehydrate6684 cc217d0089
Removed unnessary node definitions 2023-09-17 17:13:50 +08:00
Dehydrate6684 e6653b78ee
Added directional checks 2023-09-17 17:04:24 +08:00
Dehydrate6684 a960bf2e8e
Update trapdoor climbable behavior 2023-09-16 13:16:49 +08:00
Eliy21 2d9bffaa43 Update settingtypes.txt
Add the no bed respawn in settings
2023-09-11 19:42:04 +00:00
Eliy21 eb658a4996 Update mods/PLAYER/mcl_spawn/init.lua
Add if then condition for no bed/anchor respawn settings
2023-09-11 19:38:33 +00:00
Julien Palard 878480d010
mcl_oxidation: typo in README. 2023-09-02 15:18:30 +02:00
chmodsayshello 49bd28e109 add/remove comments 2023-08-31 18:16:34 +02:00
chmodsayshello 6c107ce990 fix for enchanted items 2023-08-31 17:59:46 +02:00
chmodsayshello 7c43c15fda update loottables 2023-08-31 17:17:38 +02:00
chmodsayshello 291cbaf434 move armor trim license info to LEGAL.md 2023-08-28 18:48:37 +02:00
chmodsayshello fb74689f3d resolve merge conflicts 2023-08-28 16:47:31 +02:00
chmodsayshello da024bb4b8 move mcl_armor_trims to mcl_armor 2023-08-28 15:09:48 +02:00
chmodsayshello 2f8bb9726b meta based: proof of concept 2023-08-27 21:44:43 +02:00
chmodsayshello 8176e7319f update 'armor trim credits' 2023-08-27 19:42:40 +02:00
chmodsayshello 64bc57c6a4 replace trim textures with CC ones 2023-08-18 16:47:17 +02:00
chmodsayshello d346aa07ee reduce filesize for a FINAL time 2023-06-29 20:46:39 +02:00
chmodsayshello 9d1840f4ca fix crash (no longer allow blacklisted items) 2023-06-21 12:15:41 +02:00
chmodsayshello 5cc9038169 reduce texture filesize (again) 2023-06-21 11:51:03 +02:00
chmodsayshello 460ef23b50 make upgrade_trimmed global 2023-06-21 11:49:21 +02:00
chmodsayshello 1e16647fe9 various codestyle fixes 2023-06-21 11:21:39 +02:00
chmodsayshello 16415ae577 bring back old global function 2023-06-21 10:57:50 +02:00
chmodsayshello 2665980007 add ':' to modname once 2023-06-21 10:53:41 +02:00
chmodsayshello bb2ce9ef92 pare down a few bytes from textures 2023-06-17 20:16:36 +02:00
chmodsayshello bc29e4dd95 fix texture filename 2023-06-08 10:41:49 +02:00
chmodsayshello b76ed92aba add missing rib_boots texture 2023-06-08 10:38:30 +02:00
chmodsayshello 703f1f46fc make slot names fit 2023-06-08 10:06:26 +02:00
chmodsayshello 0b118c170e armor trims: support smithing table 2023-06-08 10:02:00 +02:00
chmodsayshello 8431ac34d0 add armor trim templates 2023-06-08 00:16:57 +02:00
chmodsayshello 049128972f armor trim: more color transparency & creative inventory removal 2023-06-07 22:49:04 +02:00
chmodsayshello 0c65d9d11a add mcl_enchanting as hard dependency 2023-06-07 22:29:59 +02:00
chmodsayshello 311beeb31c fix enchanting of trimmed armor 2023-06-07 22:27:52 +02:00
chmodsayshello bc3da8dab8 add armor trim color support 2023-06-07 21:01:55 +02:00
chmodsayshello ed5232411b remove raw trim textures 2023-06-07 20:31:54 +02:00
chmodsayshello 6c6a27320d add trim boot textures 2023-06-07 20:30:10 +02:00
chmodsayshello 82f2f4784e add helm trim textures 2023-06-07 20:13:18 +02:00
chmodsayshello 8476865ea7 add chestplate trim texture 2023-06-07 19:47:51 +02:00
chmodsayshello b4273af245 fix color overlay 2023-06-07 17:22:57 +02:00
chmodsayshello 483285a612 loop through tools instead of items 2023-06-07 17:12:02 +02:00
chmodsayshello b154f2def1 armor trims: inventory overlay 2023-06-07 17:06:53 +02:00
chmodsayshello c62195662c trims: blacklist certain iems 2023-06-07 16:42:34 +02:00
chmodsayshello 4dc5ad3bdb add mcl_armor dependency 2023-06-07 16:11:07 +02:00
chmodsayshello cc186cc588 add durability back 2023-06-07 15:58:28 +02:00
chmodsayshello df8c9625e4 armor trims: proof of concept 2023-06-07 15:41:53 +02:00
276 changed files with 3706 additions and 1162 deletions

View File

@ -8,30 +8,32 @@
## Maintainers
* AncientMariner
* Nicu
* Herowl
## Previous Maintainers
* Fleckenstein
* cora
* Nicu
## Developers
* AFCMS
* epCode
* chmodsayshello
* PrairieWind
* MrRar
* FossFanatic
* SmokeyDope
* Faerraven / Michieal
* Codiac
## Past Developers
* jordan4ibanez
* iliekprogrammar
* kabou
* kay27
* Faerraven / Michieal
* MysticTempest
* NO11
* SumianVoice
* PrairieWind
## Contributors
* RandomLegoBrick
@ -112,6 +114,19 @@
* Niterux
* appgurueu
* seventeenthShulker
* DinoNuggies4665
* basxto
* Morik666
* Eliy21
* mdk
* Alessandra Lozoya
* VanicGame
* ThePython10110
* Araca
* Montandalar
* mim
* Dark
* Bakawun
## Music
* Jordach for the jukebox music compilation from Big Freaking Dig
@ -155,6 +170,7 @@
* cora
* Faerraven / Michieal
* PrairieWind
* ChrisPHP
## 3D Models
* 22i
@ -162,6 +178,7 @@
* epCode
* Faerraven / Michieal
* SumianVoice
* thunder1035
## Textures
* XSSheep
@ -178,8 +195,11 @@
* Faerraven / Michieal
* Nicu
* Exhale
* Aeonix_Aeon
* Wbjitscool
* SmokeyDope
* thunder1035
* Herowl
## Translations
* Wuzzy
@ -199,6 +219,9 @@
* Temak
* megustanlosfrijoles
* kbundg
* Isaac Dennis
* ADLON
* Sab Pyrope
## Funders
* 40W
@ -208,4 +231,4 @@
## Special thanks
* The Minetest team for making and supporting an engine, and distribution infrastructure that makes this all possible
* The workaholics who spent way too much time writing for the Minecraft Wiki. It's an invaluable resource for creating this game
* Notch and Jeb for being the major forces behind Minecraft
* Notch and Jeb for being the major forces behind Minecraft

View File

@ -170,16 +170,8 @@ These groups are used mostly for informational purposes
* `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
* `container=1`: Container type, which does not allow hoppers to transfer items
* `container=2`: Items can be placed and taken freely. Can have inventory with list name `"main"` or define `_mcl_hoppers_on_try_pull`, `_mcl_hoppers_on_try_push`, `_mcl_hoppers_on_after_pull`, `_mcl_hoppers_on_after_push` to play along hoppers nicely.
* `spawn_egg=1`: Spawn egg
* `pressure_plate=1`: Pressure plate (off)

View File

@ -42,6 +42,10 @@ The glazed terracotta textures have been created by [MysticTempest](https://gith
Source: <https://www.planetminecraft.com/texture_pack/131pixel-perfection/>
License: [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)
Armor trim models were created by Aeonix_Aeon
Source: <https://www.curseforge.com/minecraft/texture-packs/ozocraft-remix>
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
The main menu images are released under: [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
All other files, unless mentioned otherwise, fall under:

View File

@ -27,7 +27,7 @@ Or you can play in “creative mode” in which you can build almost anything in
## How to play (quick start)
### Getting started
* **Punch a tree** trunk until it breaks and collect wood
* Place the **wood into the 2×2 grid** (your “crafting grid” in your inventory menu and craft 4 wood planks
* Place the **wood into the 2×2 grid** (your “crafting grid” in your inventory menu) and craft 4 wood planks
* Place the 4 wood planks in a 2×2 shape in the crafting grid to **make a crafting table**
* **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
@ -37,15 +37,15 @@ Or you can play in “creative mode” in which you can build almost anything in
### Farming
* Find seeds
* Craft hoe
* Rightclick dirt or similar block with hoe to create farmland
* Craft a hoe
* Rightclick dirt or a similar block with a hoe to create farmland
* Place seeds on farmland and watch them grow
* Collect plant when fully grown
* Collect plants when fully grown
* If near water, farmland becomes wet and speeds up growth
### Furnace
* Craft furnace
* Furnace allows you to obtain more items
* Craft a furnace
* The 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
@ -162,7 +162,7 @@ Bonus features (not found in Minecraft):
* 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
* Saplings in chests in [mapgen v6](https://wiki.minetest.net/Map_generator#v6)
* Fully moddable (thanks to Minetest's powerful Lua API)
* New blocks and items:
* Lookup tool, shows you the help for whatever it touches

View File

@ -137,7 +137,7 @@ Fonctionnalités bonus (absentes de Minecraft) :
* Guide d'artisanat intégré au jeu qui montre les recettes d'artisanat et de cuisson
* Système d'aide intégré au jeu contenant des informations à propos des techniques de base, blocs, objets et plus
* Recettes d'artisanat temporaires. Elles existent uniquement pour rendre des objets accessibles qui ne le seraient pas autrement sauf en mode créatif. Elles seront retirées au cours de l'avancement du développement et de l'ajout de nouvelles fonctionnalités.
* Pousses dans les coffres en mapgen v6
* Pousses dans les coffres en [mapgen v6](https://wiki.minetest.net/Map_generator#v6)
* Entièrement moddable (grâce la puissante API Lua de Minetest)
* Nouveaux blocs et objets :
* Outil de recherche, montre l'aide de ce qu'il touche

View File

@ -154,12 +154,12 @@ Mineclone2, то ветка master обычно относительно ста
* Некоторые вагонетки (с сундуком и с воронкой уже работают)
* Пара нетривиальных блоков и предметов
Бонусные воронкой (нет в Minecraft-е):
Бонусные возможности (нет в Minecraft-е):
* Встроенный гайд для крафта покажет вам рецепты крафта и переплавки
* Внутриигровая справка содержит всестороннюю информацию об основах игры, блоках, предметах и прочее
* Временные рецепты крафта. Они существуют, чтобы получить доступ к ранее недоступным предметам вне творческого режима. Они будут удалены как только разработка позволит им стать доступными
* Саженцы в сундуках мапгена v6
* Саженцы в сундуках в [mapgen v6](https://wiki.minetest.net/Map_generator#v6)
* Полностью модифицируема (благодаря мощному Lua API в Minetest)
* Новые блоки и предметы:
* Инструмент просмотра покажет справку о том чего коснется
@ -177,7 +177,7 @@ Mineclone2, то ветка master обычно относительно ста
* Недостающие блоки, предметы, мобы
* Некоторые предметы с другими названиями, чтобы лучше их различать
* Другая музыка для проигрывателей
* Другие текступы (Pixel Perfection)
* Другие текстуры (Pixel Perfection)
* Другие звуки (разные источники)
* Другой движок (Minetest)
* Другие пасхалки

View File

@ -1,4 +1,4 @@
title = MineClone 2
description = A survival sandbox game. Survive, gather, hunt, build, explore, and do much more.
disallowed_mapgens = v6
version=0.85.0-SNAPSHOT
version=0.86.0-SNAPSHOT

View File

@ -11,4 +11,4 @@ For example, Copper Blocks have the definition arguement of `_mcl_waxed_variant
For waxed nodes, scraping is easy. Start by putting `waxed = 1` into the list of groups of the waxed node.
Next put `_mcl_stripped_variant = item string of the unwaxed variant of the node` into the defintion table.
Wxaed Copper Blocks can be scrapped into normal Copper Blocks because of the definition `_mcl_stripped_variant = "mcl_copper:block"`.
Waxed Copper Blocks can be scrapped into normal Copper Blocks because of the definition `_mcl_stripped_variant = "mcl_copper:block"`.

View File

@ -22,6 +22,30 @@ function table.update_nil(t, ...)
return t
end
---Works the same as `pairs`, but order returned by keys
---
---Taken from https://www.lua.org/pil/19.3.html
---@generic T: table, K, V, C
---@param t T
---@param f? fun(a: C, b: C):boolean
---@return fun():K, V
function table.pairs_by_keys(t, f)
local a = {}
for n in pairs(t) do table.insert(a, n) end
table.sort(a, f)
local i = 0 -- iterator variable
local function iter() -- iterator function
i = i + 1
if a[i] == nil then
return nil
else
return a[i], t[a[i]]
end
end
return iter
end
local LOGGING_ON = minetest.settings:get_bool("mcl_logging_default", false)
local LOG_MODULE = "[MCL2]"
function mcl_util.mcl_log(message, module, bypass_default_logger)
@ -74,6 +98,18 @@ function mcl_util.check_dtime_timer(self, dtime, timer_name, threshold)
return false
end
-- While we should always favour the new minetest vector functions such as vector.new or vector.offset which validate on
-- creation. There may be cases where state gets corrupted and we may have to check the vector is valid if created the
-- old way. This allows us to do this as a tactical solution until old style vectors are completely removed.
function mcl_util.validate_vector (vect)
if vect then
if tonumber(vect.x) and tonumber(vect.y) and tonumber(vect.z) then
return true
end
end
return false
end
-- Minetest 5.3.0 or less can only measure the light level. This came in at 5.4
-- This function has been known to fail in multiple places so the error handling is added increase safety and improve
-- debugging. See:
@ -229,34 +265,25 @@ function mcl_util.get_double_container_neighbor_pos(pos, param2, side)
end
end
-- Iterates through all items in the given inventory and
-- returns the slot of the first item which matches a condition.
-- Returns nil if no item was found.
--- source_inventory: Inventory to take the item from
--- source_list: List name of the source inventory from which to take the item
--- destination_inventory: Put item into this inventory
--- destination_list: List name of the destination inventory to which to put the item into
--- condition: Function which takes an itemstack and returns true if it matches the desired item condition.
--- If set to nil, the slot of the first item stack will be taken unconditionally.
-- dst_inventory and dst_list can also be nil if condition is nil.
function mcl_util.get_eligible_transfer_item_slot(src_inventory, src_list, dst_inventory, dst_list, condition)
local size = src_inventory:get_size(src_list)
--- Selects item stack to transfer from
---@param src_inventory InvRef Source innentory to pull from
---@param src_list string Name of source inventory list to pull from
---@param dst_inventory InvRef Destination inventory to push to
---@param dst_list string Name of destination inventory list to push to
---@param condition? fun(stack: ItemStack) Condition which items are allowed to be transfered.
---@return integer Item stack number to be transfered
function mcl_util.select_stack(src_inventory, src_list, dst_inventory, dst_list, condition)
local src_size = src_inventory:get_size(src_list)
local stack
for i = 1, size do
for i = 1, src_size do
stack = src_inventory:get_stack(src_list, i)
if not stack:is_empty() and (condition == nil or condition(stack, src_inventory, src_list, dst_inventory, dst_list)) then
if not stack:is_empty() and dst_inventory:room_for_item(dst_list, stack) and ((condition == nil or condition(stack))) then
return i
end
end
return nil
end
-- Returns true if itemstack is a shulker box
local function is_not_shulker_box(itemstack)
local g = minetest.get_item_group(itemstack:get_name(), "shulker_box")
return g == 0 or g == nil
end
-- Moves a single item from one inventory to another.
--- source_inventory: Inventory to take the item from
--- source_list: List name of the source inventory from which to take the item
@ -267,13 +294,6 @@ end
-- Returns true on success and false on failure
-- Possible failures: No item in source slot, destination inventory full
function mcl_util.move_item(source_inventory, source_list, source_stack_id, destination_inventory, destination_list)
if source_stack_id == -1 then
source_stack_id = mcl_util.get_first_occupied_inventory_slot(source_inventory, source_list)
if source_stack_id == nil then
return false
end
end
if not source_inventory:is_empty(source_list) then
local stack = source_inventory:get_stack(source_list, source_stack_id)
if not stack:is_empty() then
@ -291,150 +311,75 @@ function mcl_util.move_item(source_inventory, source_list, source_stack_id, dest
return false
end
-- Moves a single item from one container node into another. Performs a variety of high-level
-- checks to prevent invalid transfers such as shulker boxes into shulker boxes
--- source_pos: Position ({x,y,z}) of the node to take the item from
--- destination_pos: Position ({x,y,z}) of the node to put the item into
--- source_list (optional): List name of the source inventory from which to take the item. Default is normally "main"; "dst" for furnace
--- source_stack_id (optional): The inventory position ID of the source inventory to take the item from (-1 for slot of the first valid item; -1 is default)
--- destination_list (optional): List name of the destination inventory. Default is normally "main"; "src" for furnace
-- Returns true on success and false on failure.
function mcl_util.move_item_container(source_pos, destination_pos, source_list, source_stack_id, destination_list)
local dpos = table.copy(destination_pos)
local spos = table.copy(source_pos)
local snode = minetest.get_node(spos)
local dnode = minetest.get_node(dpos)
--- Try pushing item from hopper inventory to destination inventory
---@param pos Vector
---@param dst_pos Vector
function mcl_util.hopper_push(pos, dst_pos)
local hop_inv = minetest.get_meta(pos):get_inventory()
local hop_list = 'main'
local dctype = minetest.get_item_group(dnode.name, "container")
local sctype = minetest.get_item_group(snode.name, "container")
-- Get node pos' for item transfer
local dst = minetest.get_node(dst_pos)
if not minetest.registered_nodes[dst.name] then return end
local dst_type = minetest.get_item_group(dst.name, "container")
if dst_type ~= 2 then return end
local dst_def = minetest.registered_nodes[dst.name]
-- Container type 7 does not allow any movement
if sctype == 7 then
return false
local dst_list = 'main'
local dst_inv, stack_id
if dst_def._mcl_hoppers_on_try_push then
dst_inv, dst_list, stack_id = dst_def._mcl_hoppers_on_try_push(dst_pos, pos, hop_inv, hop_list)
else
local dst_meta = minetest.get_meta(dst_pos)
dst_inv = dst_meta:get_inventory()
stack_id = mcl_util.select_stack(hop_inv, hop_list, dst_inv, dst_list)
end
-- Normalize double container by forcing to always use the left segment first
local function normalize_double_container(pos, node, ctype)
if ctype == 6 then
pos = mcl_util.get_double_container_neighbor_pos(pos, node.param2, "right")
if not pos then
return false
end
node = minetest.get_node(pos)
ctype = minetest.get_item_group(node.name, "container")
-- The left segment seems incorrect? We better bail out!
if ctype ~= 5 then
return false
end
if stack_id ~= nil then
local ok = mcl_util.move_item(hop_inv, hop_list, stack_id, dst_inv, dst_list)
if dst_def._mcl_hoppers_on_after_push then
dst_def._mcl_hoppers_on_after_push(dst_pos)
end
return pos, node, ctype
end
spos, snode, sctype = normalize_double_container(spos, snode, sctype)
dpos, dnode, dctype = normalize_double_container(dpos, dnode, dctype)
if not spos or not dpos then return false end
local smeta = minetest.get_meta(spos)
local dmeta = minetest.get_meta(dpos)
local sinv = smeta:get_inventory()
local dinv = dmeta:get_inventory()
-- Default source lists
if not source_list then
-- Main inventory for most container types
if sctype == 2 or sctype == 3 or sctype == 5 or sctype == 6 or sctype == 7 then
source_list = "main"
-- Furnace: output
elseif sctype == 4 then
source_list = "dst"
-- Unknown source container type. Bail out
else
return false
if ok then
return true
end
end
-- Automatically select stack slot ID if set to automatic
if not source_stack_id then
source_stack_id = -1
end
if source_stack_id == -1 then
local cond = nil
-- Prevent shulker box inception
if dctype == 3 then
cond = is_not_shulker_box
end
source_stack_id = mcl_util.get_eligible_transfer_item_slot(sinv, source_list, dinv, dpos, cond)
if not source_stack_id then
-- Try again if source is a double container
if sctype == 5 then
spos = mcl_util.get_double_container_neighbor_pos(spos, snode.param2, "left")
smeta = minetest.get_meta(spos)
sinv = smeta:get_inventory()
source_stack_id = mcl_util.get_eligible_transfer_item_slot(sinv, source_list, dinv, dpos, cond)
if not source_stack_id then
return false
end
else
return false
end
end
end
-- Abort transfer if shulker box wants to go into shulker box
if dctype == 3 then
local stack = sinv:get_stack(source_list, source_stack_id)
if stack and minetest.get_item_group(stack:get_name(), "shulker_box") == 1 then
return false
end
end
-- Container type 7 does not allow any placement
if dctype == 7 then
return false
end
-- If it's a container, put it into the container
if dctype ~= 0 then
-- Automatically select a destination list if omitted
if not destination_list then
-- Main inventory for most container types
if dctype == 2 or dctype == 3 or dctype == 5 or dctype == 6 or dctype == 7 then
destination_list = "main"
-- Furnace source slot
elseif dctype == 4 then
destination_list = "src"
end
end
if destination_list then
-- Move item
local ok = mcl_util.move_item(sinv, source_list, source_stack_id, dinv, destination_list)
-- Try transfer to neighbor node if transfer failed and double container
if not ok and dctype == 5 then
dpos = mcl_util.get_double_container_neighbor_pos(dpos, dnode.param2, "left")
dmeta = minetest.get_meta(dpos)
dinv = dmeta:get_inventory()
ok = mcl_util.move_item(sinv, source_list, source_stack_id, dinv, destination_list)
end
-- Update furnace
if ok and dctype == 4 then
-- Start furnace's timer function, it will sort out whether furnace can burn or not.
minetest.get_node_timer(dpos):start(1.0)
end
return ok
end
end
return false
end
-- Returns the ID of the first non-empty slot in the given inventory list
-- or nil, if inventory is empty.
function mcl_util.get_first_occupied_inventory_slot(inventory, listname)
return mcl_util.get_eligible_transfer_item_slot(inventory, listname)
-- Try pulling from source inventory to hopper inventory
---@param pos Vector
---@param src_pos Vector
function mcl_util.hopper_pull(pos, src_pos)
local hop_inv = minetest.get_meta(pos):get_inventory()
local hop_list = 'main'
-- Get node pos' for item transfer
local src = minetest.get_node(src_pos)
if not minetest.registered_nodes[src.name] then return end
local src_type = minetest.get_item_group(src.name, "container")
if src_type ~= 2 then return end
local src_def = minetest.registered_nodes[src.name]
local src_list = 'main'
local src_inv, stack_id
if src_def._mcl_hoppers_on_try_pull then
src_inv, src_list, stack_id = src_def._mcl_hoppers_on_try_pull(src_pos, pos, hop_inv, hop_list)
else
local src_meta = minetest.get_meta(src_pos)
src_inv = src_meta:get_inventory()
stack_id = mcl_util.select_stack(src_inv, src_list, hop_inv, hop_list)
end
if stack_id ~= nil then
local ok = mcl_util.move_item(src_inv, src_list, stack_id, hop_inv, hop_list)
if src_def._mcl_hoppers_on_after_pull then
src_def._mcl_hoppers_on_after_pull(src_pos)
end
end
end
local function drop_item_stack(pos, stack)
@ -612,7 +557,7 @@ function mcl_util.deal_damage(target, damage, mcl_reason)
end
return
end
end
elseif not target:is_player() then return end
local is_immortal = target:get_armor_groups().immortal or 0
if is_immortal>0 then
@ -1101,3 +1046,53 @@ function mcl_util.get_colorwallmounted_rotation(pos)
end
end
end
---Move items from one inventory list to another, drop items that do not fit in provided pos and direction.
---@param src_inv mt.InvRef
---@param src_listname string
---@param out_inv mt.InvRef
---@param out_listname string
---@param pos mt.Vector Position to throw items at
---@param dir? mt.Vector Direction to throw items in
---@param insta_collect? boolean Enable instant collection, let players collect dropped items instantly. Default `false`
function mcl_util.move_list(src_inv, src_listname, out_inv, out_listname, pos, dir, insta_collect)
local src_list = src_inv:get_list(src_listname)
if not src_list then return end
for i, stack in ipairs(src_list) do
if out_inv:room_for_item(out_listname, stack) then
out_inv:add_item(out_listname, stack)
else
local p = vector.copy(pos)
p.x = p.x + (math.random(1, 3) * 0.2)
p.z = p.z + (math.random(1, 3) * 0.2)
local obj = minetest.add_item(p, stack)
if obj then
if dir then
local v = vector.copy(dir)
v.x = v.x * 4
v.y = v.y * 4 + 2
v.z = v.z * 4
obj:set_velocity(v)
minetest.log("error", vector.to_string(v))
end
if not insta_collect then
obj:get_luaentity()._insta_collect = false
end
end
end
stack:clear()
src_inv:set_stack(src_listname, i, stack)
end
end
---Move items from a player's inventory list to its main inventory list, drop items that do not fit in front of him.
---@param player mt.PlayerObjectRef
---@param src_listname string
function mcl_util.move_player_list(player, src_listname)
mcl_util.move_list(player:get_inventory(), src_listname, player:get_inventory(), "main",
vector.offset(player:get_pos(), 0, 1.2, 0),
player:get_look_dir(), false)
end

View File

@ -62,8 +62,13 @@ end
local function set_double_attach(boat)
boat._driver:set_attach(boat.object, "",
{x = 0, y = 0.42, z = 0.8}, {x = 0, y = 0, z = 0})
boat._passenger:set_attach(boat.object, "",
{x = 0, y = 0.42, z = -2.2}, {x = 0, y = 0, z = 0})
if boat._passenger:is_player() then
boat._passenger:set_attach(boat.object, "",
{x = 0, y = 0.42, z = -6.2}, {x = 0, y = 0, z = 0})
else
boat._passenger:set_attach(boat.object, "",
{x = 0, y = 0.42, z = -4.5}, {x = 0, y = 270, z = 0})
end
end
local function set_choat_attach(boat)
boat._driver:set_attach(boat.object, "",
@ -155,7 +160,7 @@ local boat = {
minetest.register_on_respawnplayer(detach_object)
function boat.on_rightclick(self, clicker)
if self._passenger or not clicker or clicker:get_attach() then
if self._passenger or not clicker or clicker:get_attach() or (self.name == "mcl_boats:chest_boat" and self._driver) then
return
end
attach_object(self, clicker)

View File

@ -12,6 +12,7 @@ Water vehicle=Véhicule aquatique
Sneak to dismount=Se baisser pour descendre
Obsidian Boat=Bateau en obsidienne
Mangrove Boat=Bateau en palétuvier
Cherry Boat=Bateau en cerisier
Oak Chest Boat=Bateau en chêne avec coffre
Spruce Chest Boat=Bateau en sapin avec coffre
Birch Chest Boat=Bateau en bouleau avec coffre
@ -19,3 +20,4 @@ Jungle Chest Boat=Bateau en acajou avec coffre
Acacia Chest Boat=Bateau en acacia avec coffre
Dark Oak Chest Boat=Bateau en chêne noir avec coffre
Mangrove Chest Boat=Bateau en palétuvier avec coffre
Cherry Chest Boat=Bateau en cerisier avec coffre

View File

@ -1,36 +1,36 @@
# mcl_dripping
Dripping Mod by kddekadenz, modified for MineClone 2 by Wuzzy, NO11 and AFCM
## Manual
- drops are generated rarely under solid nodes
- they will stay some time at the generated block and than they fall down
- when they collide with the ground, a sound is played and they are destroyed
Water and Lava have builtin drops registered.
## License
code & sounds: CC0
## API
```lua
mcl_dripping.register_drop({
-- The group the liquid's nodes belong to
liquid = "water",
-- The texture used (particles will take a random 2x2 area of it)
texture = "default_water_source_animated.png",
-- Define particle glow, ranges from `0` to `minetest.LIGHT_MAX`
light = 1,
-- The nodes (or node group) the particles will spawn under
nodes = { "group:opaque", "group:leaves" },
-- The sound that will be played then the particle detaches from the roof, see SimpleSoundSpec in lua_api.txt
sound = "drippingwater_drip",
-- The interval for the ABM to run
interval = 60,
-- The chance of the ABM
chance = 10,
})
```
# mcl_dripping
Dripping Mod by kddekadenz, modified for MineClone 2 by Wuzzy, NO11 and AFCM
## Manual
- drops are generated rarely under solid nodes
- they will stay some time at the generated block and than they fall down
- when they collide with the ground, a sound is played and they are destroyed
Water and Lava have builtin drops registered.
## License
code & sounds: CC0
## API
```lua
mcl_dripping.register_drop({
-- The group the liquid's nodes belong to
liquid = "water",
-- The texture used (particles will take a random 2x2 area of it)
texture = "mcl_core_water_source_animation.png",
-- Define particle glow, ranges from `0` to `minetest.LIGHT_MAX`
light = 1,
-- The nodes (or node group) the particles will spawn under
nodes = { "group:opaque", "group:leaves" },
-- The sound that will be played then the particle detaches from the roof, see SimpleSoundSpec in lua_api.txt
sound = "drippingwater_drip",
-- The interval for the ABM to run
interval = 60,
-- The chance of the ABM
chance = 10,
})
```

View File

@ -82,7 +82,7 @@ end
mcl_dripping.register_drop({
liquid = "water",
texture = "default_water_source_animated.png",
texture = "mcl_core_water_source_animation.png",
light = 1,
nodes = { "group:opaque", "group:leaves" },
sound = "drippingwater_drip",
@ -92,7 +92,7 @@ mcl_dripping.register_drop({
mcl_dripping.register_drop({
liquid = "lava",
texture = "default_lava_source_animated.png",
texture = "mcl_core_lava_source_animation.png",
light = math.max(7, minetest.registered_nodes["mcl_core:lava_source"].light_source - 3),
nodes = { "group:opaque" },
sound = "drippingwater_lavadrip",

View File

@ -362,6 +362,121 @@ function minetest.handle_node_drops(pos, drops, digger)
end
end
-- the following code is pulled from Minetest builtin without changes except for the call order being changed,
-- until a comment saying explicitly it's the end of such code
-- TODO if this gets a fix in the engine, remove the block of code
local function user_name(user)
return user and user:get_player_name() or ""
end
-- Returns a logging function. For empty names, does not log.
local function make_log(name)
return name ~= "" and minetest.log or function() end
end
function minetest.node_dig(pos, node, digger)
local diggername = user_name(digger)
local log = make_log(diggername)
local def = minetest.registered_nodes[node.name]
-- Copy pos because the callback could modify it
if def and (not def.diggable or
(def.can_dig and not def.can_dig(vector.copy(pos), digger))) then
log("info", diggername .. " tried to dig "
.. node.name .. " which is not diggable "
.. minetest.pos_to_string(pos))
return false
end
if minetest.is_protected(pos, diggername) then
log("action", diggername
.. " tried to dig " .. node.name
.. " at protected position "
.. minetest.pos_to_string(pos))
minetest.record_protection_violation(pos, diggername)
return false
end
log('action', diggername .. " digs "
.. node.name .. " at " .. minetest.pos_to_string(pos))
local wielded = digger and digger:get_wielded_item()
local drops = minetest.get_node_drops(node, wielded and wielded:get_name())
-- Check to see if metadata should be preserved.
if def and def.preserve_metadata then
local oldmeta = minetest.get_meta(pos):to_table().fields
-- Copy pos and node because the callback can modify them.
local pos_copy = vector.copy(pos)
local node_copy = {name=node.name, param1=node.param1, param2=node.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
-- Handle drops
minetest.handle_node_drops(pos, drops, digger)
if wielded then
local wdef = wielded:get_definition()
local tp = wielded:get_tool_capabilities()
local dp = minetest.get_dig_params(def and def.groups, tp, wielded:get_wear())
if wdef and wdef.after_use then
wielded = wdef.after_use(wielded, digger, node, dp) or wielded
else
-- Wear out tool
if not minetest.is_creative_enabled(diggername) then
wielded:add_wear(dp.wear)
if wielded:get_count() == 0 and wdef.sound and wdef.sound.breaks then
minetest.sound_play(wdef.sound.breaks, {
pos = pos,
gain = 0.5
}, true)
end
end
end
digger:set_wielded_item(wielded)
end
local oldmetadata = nil
if def and def.after_dig_node then
oldmetadata = minetest.get_meta(pos):to_table()
end
-- Remove node and update
minetest.remove_node(pos)
-- Play sound if it was done by a player
if diggername ~= "" and def and def.sounds and def.sounds.dug then
minetest.sound_play(def.sounds.dug, {
pos = pos,
exclude_player = diggername,
}, true)
end
-- Run callback
if def and def.after_dig_node then
-- Copy pos and node because callback can modify them
local pos_copy = vector.copy(pos)
local node_copy = {name=node.name, param1=node.param1, param2=node.param2}
def.after_dig_node(pos_copy, node_copy, oldmetadata, digger)
end
-- Run script hook
for _, callback in ipairs(minetest.registered_on_dignodes) do
local origin = minetest.callback_origins[callback]
minetest.set_last_run_mod(origin.mod)
-- Copy pos and node because callback can modify them
local pos_copy = vector.copy(pos)
local node_copy = {name=node.name, param1=node.param1, param2=node.param2}
callback(pos_copy, node_copy, digger)
end
return true
end
-- end of code pulled from Minetest
-- Drop single items by default
function minetest.item_drop(itemstack, dropper, pos)
if dropper and dropper:is_player() then

View File

@ -21,6 +21,8 @@ local function atan(x)
end
end
mcl_mobs.effect_functions = {}
-- check if daytime and also if mob is docile during daylight hours
function mob_class:day_docile()
@ -382,7 +384,8 @@ function mob_class:monster_attack()
-- find specific mob to attack, failing that attack player/npc/animal
if specific_attack(self.specific_attack, name)
and (type == "player" or ( type == "npc" and self.attack_npcs )
or (type == "animal" and self.attack_animals == true)) then
or (type == "animal" and self.attack_animals == true)
or (self.extra_hostile and not self.attack_exception(player))) then
p = player:get_pos()
sp = s
@ -513,6 +516,28 @@ end
-- deal damage and effects when mob punched
function mob_class:on_punch(hitter, tflp, tool_capabilities, dir)
local is_player = hitter:is_player()
local mob_pos = self.object:get_pos()
local player_pos = hitter:get_pos()
if is_player then
-- is mob out of reach?
if vector.distance(mob_pos, player_pos) > 3 then
return
end
-- is mob protected?
if self.protected and minetest.is_protected(mob_pos, hitter:get_player_name()) then
return
end
end
local time_now = minetest.get_us_time()
local time_diff = time_now - self.invul_timestamp
-- check for invulnerability time in microseconds (0.5 second)
if time_diff <= 500000 and time_diff >= 0 then
return
end
-- custom punch function
if self.do_punch then
@ -529,20 +554,15 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir)
return
end
local is_player = hitter:is_player()
local time_now = minetest.get_us_time()
if is_player then
-- is mob protected?
if self.protected and minetest.is_protected(self.object:get_pos(), hitter:get_player_name()) then
return
end
if minetest.is_creative_enabled(hitter:get_player_name()) then
self.health = 0
end
-- set/update 'drop xp' timestamp if hitted by player
self.xp_timestamp = minetest.get_us_time()
self.xp_timestamp = time_now
end
@ -654,6 +674,9 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir)
-- do damage
self.health = self.health - damage
-- give invulnerability
self.invul_timestamp = time_now
-- skip future functions if dead, except alerting others
if self:check_for_death( "hit", {type = "punch", puncher = hitter}) then
die = true
@ -669,10 +692,10 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir)
if not v then return end
local r = 1.4 - math.min(punch_interval, 1.4)
local kb = r * (math.abs(v.x)+math.abs(v.z))
local up = 2
local up = 2.625
if die==true then
kb=kb*2
kb=kb*1.25
end
-- if already in air then dont go up anymore when hit
@ -686,7 +709,7 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir)
if tool_capabilities.damage_groups["knockback"] then
kb = tool_capabilities.damage_groups["knockback"]
else
kb = kb * 1.5
kb = kb * 1.25
end
@ -696,9 +719,19 @@ function mob_class:on_punch(hitter, tflp, tool_capabilities, dir)
end
if hitter and is_player then
local wielditem = hitter:get_wielded_item()
kb = kb + 3 * mcl_enchanting.get_enchantment(wielditem, "knockback")
elseif luaentity and luaentity._knockback then
kb = kb + 9 * mcl_enchanting.get_enchantment(wielditem, "knockback")
-- add player velocity to mob knockback
local hv = hitter:get_velocity()
local dir_dot = (hv.x * dir.x) + (hv.z * dir.z)
local player_mag = math.sqrt((hv.x * hv.x) + (hv.z * hv.z))
local mob_mag = math.sqrt((v.x * v.x) + (v.z * v.z))
if dir_dot > 0 and mob_mag <= player_mag * 0.625 then
kb = kb + ((math.abs(hv.x) + math.abs(hv.z)) * r)
end
elseif luaentity and luaentity._knockback and die == false then
kb = kb + luaentity._knockback
elseif luaentity and luaentity._knockback and die == true then
kb = kb + luaentity._knockback * 0.25
end
self._kb_turn = true
self._turn_to=self.object:get_yaw()-1.57
@ -1103,6 +1136,11 @@ function mob_class:do_states_attack (dtime)
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
if self.dealt_effect then
mcl_mobs.effect_functions[self.dealt_effect.name](
self.attack, self.dealt_effect.factor, self.dealt_effect.dur
)
end
end
else
self.custom_attack(self, p)
@ -1209,7 +1247,13 @@ function mob_class:do_states_attack (dtime)
end
end
end
else
elseif self.attack_type == "custom" and self.attack_state then
self.attack_state(self, dtime)
end
if self.on_attack then
self.on_attack(self, dtime)
end
end

View File

@ -1,5 +1,7 @@
local math, tonumber, vector, minetest, mcl_mobs = math, tonumber, vector, minetest, mcl_mobs
local mob_class = mcl_mobs.mob_class
local validate_vector = mcl_util.validate_vector
local active_particlespawners = {}
local disable_blood = minetest.settings:get_bool("mobs_disable_blood")
local DEFAULT_FALL_SPEED = -9.81*1.5
@ -9,16 +11,6 @@ local PATHFINDING = "gowp"
local player_transfer_distance = tonumber(minetest.settings:get("player_transfer_distance")) or 128
if player_transfer_distance == 0 then player_transfer_distance = math.huge end
local function validate_vector (vect)
if vect then
if tonumber(vect.x) and tonumber(vect.y) and tonumber(vect.z) then
return true
end
end
return false
end
-- custom particle effects
function mcl_mobs.effect(pos, amount, texture, min_size, max_size, radius, gravity, glow, go_down)
@ -418,7 +410,7 @@ function mob_class:check_head_swivel(dtime)
--final_rotation = vector.new(0,0,0)
end
mcl_util.set_bone_position(self.object,self.head_swivel, vector.new(0,self.bone_eye_height,self.horrizonatal_head_height), final_rotation)
mcl_util.set_bone_position(self.object,self.head_swivel, vector.new(0,self.bone_eye_height,self.horizontal_head_height), final_rotation)
end

View File

@ -147,7 +147,7 @@ function mcl_mobs.register_mob(name, def)
head_eye_height = def.head_eye_height or def.bone_eye_height or 0, -- how hight aproximatly the mobs head is fromm the ground to tell the mob how high to look up at the player
curiosity = def.curiosity or 1, -- how often mob will look at player on idle
head_yaw = def.head_yaw or "y", -- axis to rotate head on
horrizonatal_head_height = def.horrizonatal_head_height or 0,
horizontal_head_height = def.horizontal_head_height or 0,
wears_armor = def.wears_armor, -- a number value used to index texture slot for armor
stepheight = def.stepheight or 0.6,
name = name,
@ -171,6 +171,7 @@ function mcl_mobs.register_mob(name, def)
xp_min = def.xp_min or 0,
xp_max = def.xp_max or 0,
xp_timestamp = 0,
invul_timestamp = 0,
breath_max = def.breath_max or 15,
breathes_in_water = def.breathes_in_water or false,
physical = true,
@ -287,6 +288,7 @@ function mcl_mobs.register_mob(name, def)
spawn_in_group_min = def.spawn_in_group_min,
noyaw = def.noyaw or false,
particlespawners = def.particlespawners,
spawn_check = def.spawn_check,
-- End of MCL2 extensions
on_spawn = def.on_spawn,
on_blast = def.on_blast or function(self,damage)
@ -297,6 +299,7 @@ function mcl_mobs.register_mob(name, def)
return false, true, {}
end,
do_punch = def.do_punch,
deal_damage = def.deal_damage,
on_breed = def.on_breed,
on_grown = def.on_grown,
on_pick_up = def.on_pick_up,
@ -311,8 +314,16 @@ function mcl_mobs.register_mob(name, def)
return self:mob_activate(staticdata, def, dtime)
end,
attack_state = def.attack_state, -- custom attack state
on_attack = def.on_attack, -- called after attack, useful with otherwise predefined attack states (not custom)
harmed_by_heal = def.harmed_by_heal,
on_lightning_strike = def.on_lightning_strike
is_boss = def.is_boss,
dealt_effect = def.dealt_effect,
on_lightning_strike = def.on_lightning_strike,
extra_hostile = def.extra_hostile,
attack_exception = def.attack_exception or function(p) return false end,
_spawner = def._spawner,
}
minetest.register_entity(name, setmetatable(final_def,mcl_mobs.mob_class_meta))
@ -343,9 +354,10 @@ function mcl_mobs.register_arrow(name, def)
collisionbox = {0, 0, 0, 0, 0, 0}, -- remove box around arrows
timer = 0,
switch = 0,
_lifetime = def._lifetime or 150,
owner_id = def.owner_id,
rotate = def.rotate,
on_punch = function(self)
on_punch = def.on_punch or function(self)
local vel = self.object:get_velocity()
self.object:set_velocity({x=vel.x * -1, y=vel.y * -1, z=vel.z * -1})
end,
@ -362,7 +374,7 @@ function mcl_mobs.register_arrow(name, def)
local pos = self.object:get_pos()
if self.switch == 0
or self.timer > 150
or self.timer > self._lifetime
or not within_limits(pos, 0) then
mcl_burning.extinguish(self.object)
self.object:remove();

View File

@ -1,5 +1,6 @@
local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
local mob_class = mcl_mobs.mob_class
local validate_vector = mcl_util.validate_vector
local ENTITY_CRAMMING_MAX = 24
local CRAMMING_DAMAGE = 3
@ -355,7 +356,7 @@ function mob_class:set_yaw(yaw, delay, dtime)
if math.abs(target_shortest_path_nums) > 10 then
self.object:set_yaw(self.object:get_yaw()+(target_shortest_path*(3.6*ddtime)))
if self.acc then
if validate_vector(self.acc) then
self.acc=vector.rotate_around_axis(self.acc,vector.new(0,1,0), target_shortest_path*(3.6*ddtime))
end
end
@ -681,6 +682,9 @@ function mob_class:do_env_damage()
-- don't fall when on ignore, just stand still
if self.standing_in == "ignore" then
self.object:set_velocity({x = 0, y = 0, z = 0})
-- wither rose effect
elseif self.standing_in == "mcl_flowers:wither_rose" then
mcl_potions.withering_func(self.object, 1, 2)
end
local nodef = minetest.registered_nodes[self.standing_in]

View File

@ -2,6 +2,13 @@
local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
local mob_class = mcl_mobs.mob_class
local modern_lighting = minetest.settings:get_bool("mcl_mobs_modern_lighting", true)
local nether_threshold = tonumber(minetest.settings:get("mcl_mobs_nether_threshold")) or 11
local end_threshold = tonumber(minetest.settings:get("mcl_mobs_end_threshold")) or 0
local overworld_threshold = tonumber(minetest.settings:get("mcl_mobs_overworld_threshold")) or 0
local overworld_sky_threshold = tonumber(minetest.settings:get("mcl_mobs_overworld_sky_threshold")) or 7
local overworld_passive_threshold = tonumber(minetest.settings:get("mcl_mobs_overworld_passive_threshold")) or 7
local get_node = minetest.get_node
local get_item_group = minetest.get_item_group
local get_node_light = minetest.get_node_light
@ -709,9 +716,6 @@ local function spawn_check(pos, spawn_def)
and spawn_def.dimension == dimension
and biome_check(spawn_def.biomes, gotten_biome) then
--mcl_log("Level 1 spawn check passed")
--minetest.log("Mob: " .. mob_def.name)
if (is_ground or spawn_def.type_of_spawning ~= "ground")
and (spawn_def.type_of_spawning ~= "ground" or not is_leaf)
and (not is_farm_animal(spawn_def.name) or is_grass)
@ -721,20 +725,41 @@ local function spawn_check(pos, spawn_def)
and (spawn_def.check_position and spawn_def.check_position(pos) or spawn_def.check_position == nil)
and ( not spawn_protected or not minetest.is_protected(pos, "") ) then
--mcl_log("Level 2 spawn check passed")
local gotten_light = get_node_light(pos)
if gotten_light >= spawn_def.min_light and gotten_light <= spawn_def.max_light then
--mcl_log("Level 3 spawn check passed")
return true
if modern_lighting then
local my_node = get_node(pos)
local sky_light = minetest.get_natural_light(pos)
local art_light = minetest.get_artificial_light(my_node.param1)
if mob_def.spawn_check then
return mob_def.spawn_check(pos, gotten_light, art_light, sky_light)
elseif mob_type == "monster" then
if dimension == "nether" then
if art_light <= nether_threshold then
return true
end
elseif dimension == "end" then
if art_light <= end_threshold then
return true
end
elseif dimension == "overworld" then
if art_light <= overworld_threshold and sky_light <= overworld_sky_threshold then
return true
end
end
else
-- passive threshold is apparently the same in all dimensions ...
if gotten_light > overworld_passive_threshold then
return true
end
end
else
--mcl_log("Spawn check level 3 failed")
if gotten_light >= spawn_def.min_light and gotten_light <= spawn_def.max_light then
return true
end
end
else
--mcl_log("Spawn check level 2 failed")
end
else
--mcl_log("Spawn check level 1 failed")
end
return false
end

View File

@ -2,6 +2,9 @@ local dim = {"x", "z"}
local modpath = minetest.get_modpath(minetest.get_current_modname())
local anti_troll = minetest.settings:get_bool("wither_anti_troll_measures", false)
local peaceful = minetest.settings:get_bool("only_peaceful_mobs", false)
local function load_schem(filename)
local file = io.open(modpath .. "/schems/" .. filename, "r")
local data = minetest.deserialize(file:read())
@ -9,6 +12,14 @@ local function load_schem(filename)
return data
end
local wboss_overworld = 0
local wboss_nether = 0
local wboss_end = 0
local LIM_OVERWORLD = tonumber(minetest.settings:get("wither_cap_overworld")) or 3
local LIM_NETHER = tonumber(minetest.settings:get("wither_cap_nether")) or 10
local LIM_END = tonumber(minetest.settings:get("wither_cap_end")) or 5
local wither_spawn_schems = {}
for _, d in pairs(dim) do
@ -16,8 +27,13 @@ for _, d in pairs(dim) do
end
local function check_schem(pos, schem)
local cn_name
for _, n in pairs(schem) do
if minetest.get_node(vector.add(pos, n)).name ~= n.name then
cn_name = minetest.get_node(vector.add(pos, n)).name
if string.find(cn_name, "mcl_heads:wither_skeleton") then
cn_name = "mcl_heads:wither_skeleton"
end
if cn_name ~= n.name then
return false
end
end
@ -30,14 +46,32 @@ local function remove_schem(pos, schem)
end
end
local function wither_spawn(pos)
local function check_limit(pos)
local dim = mcl_worlds.pos_to_dimension(pos)
if dim == "overworld" and wboss_overworld >= LIM_OVERWORLD then return false
elseif dim == "end" and wboss_end >= LIM_END then return false
elseif wboss_nether >= LIM_NETHER then return false
else return true end
end
local function wither_spawn(pos, player)
if peaceful then return end
for _, d in pairs(dim) do
for i = 0, 2 do
local p = vector.add(pos, {x = 0, y = -2, z = 0, [d] = -i})
local schem = wither_spawn_schems[d]
if check_schem(p, schem) then
if check_schem(p, schem) and (not anti_troll or check_limit(pos)) then
remove_schem(p, schem)
minetest.add_entity(vector.add(p, {x = 0, y = 1, z = 0, [d] = 1}), "mobs_mc:wither")
local wither = minetest.add_entity(vector.add(p, {x = 0, y = 1, z = 0, [d] = 1}), "mobs_mc:wither")
if not wither then return end
local wither_ent = wither:get_luaentity()
wither_ent._spawner = player:get_player_name()
local dim = mcl_worlds.pos_to_dimension(pos)
if dim == "overworld" then
wboss_overworld = wboss_overworld + 1
elseif dim == "end" then
wboss_end = wboss_end + 1
else wboss_nether = wboss_nether + 1 end
local objects = minetest.get_objects_inside_radius(pos, 20)
for _, players in ipairs(objects) do
if players:is_player() then
@ -54,7 +88,19 @@ local old_on_place = wither_head.on_place
function wither_head.on_place(itemstack, placer, pointed)
local n = minetest.get_node(vector.offset(pointed.above,0,-1,0))
if n and n.name == "mcl_nether:soul_sand" then
minetest.after(0, wither_spawn, pointed.above)
minetest.after(0, wither_spawn, pointed.above, placer)
end
return old_on_place(itemstack, placer, pointed)
end
if anti_troll then
-- pull wither counts per dimension
minetest.register_globalstep(function(dtime)
wboss_overworld = mobs_mc.wither_count_overworld
wboss_nether = mobs_mc.wither_count_nether
wboss_end = mobs_mc.wither_count_end
mobs_mc.wither_count_overworld = 0
mobs_mc.wither_count_nether = 0
mobs_mc.wither_count_end = 0
end)
end

View File

@ -13,7 +13,7 @@ local axolotl = {
head_swivel = "head.control",
bone_eye_height = -1,
head_eye_height = -0.5,
horrizonatal_head_height = 0,
horizontal_head_height = 0,
curiosity = 10,
head_yaw="z",
@ -78,7 +78,6 @@ local axolotl = {
attack_animals = true,
specific_attack = {
"extra_mobs_cod",
"mobs_mc:sheep",
"extra_mobs_glow_squid",
"extra_mobs_salmon",
"extra_mobs_tropical_fish",

View File

@ -2,6 +2,18 @@
local S = minetest.get_translator("mobs_mc")
local function spawn_check(pos, environmental_light, artificial_light, sky_light)
local date = os.date("*t")
local maxlight
if (date.month == 10 and date.day >= 20) or (date.month == 11 and date.day <= 3) then
maxlight = 6
else
maxlight = 3
end
return artificial_light <= maxlight
end
mcl_mobs.register_mob("mobs_mc:bat", {
description = S("Bat"),
type = "animal",
@ -50,6 +62,7 @@ mcl_mobs.register_mob("mobs_mc:bat", {
jump = false,
fly = true,
makes_footstep_sound = false,
spawn_check = spawn_check,
})

View File

@ -11,6 +11,9 @@ local mod_target = minetest.get_modpath("mcl_target")
--################### BLAZE
--###################
local function spawn_check(pos, environmental_light, artificial_light, sky_light)
return artificial_light <= 11
end
mcl_mobs.register_mob("mobs_mc:blaze", {
description = S("Blaze"),
@ -137,6 +140,7 @@ mcl_mobs.register_mob("mobs_mc:blaze", {
},
})
end,
spawn_check = spawn_check,
})
mcl_mobs:spawn_specific(

View File

@ -23,7 +23,7 @@ mcl_mobs.register_mob("mobs_mc:chicken", {
head_swivel = "head.control",
bone_eye_height = 4,
head_eye_height = 1.5,
horrizonatal_head_height = -.3,
horizontal_head_height = -.3,
curiosity = 10,
head_yaw="z",
visual_size = {x=1,y=1},

View File

@ -24,7 +24,7 @@ local cow_def = {
head_swivel = "head.control",
bone_eye_height = 10,
head_eye_height = 1.1,
horrizonatal_head_height=-1.8,
horizontal_head_height=-1.8,
curiosity = 2,
head_yaw="z",
makes_footstep_sound = true,

View File

@ -50,7 +50,7 @@ mcl_mobs.register_mob("mobs_mc:creeper", {
explosion_strength = 3,
explosion_radius = 3.5,
explosion_damage_radius = 3.5,
explosiontimer_reset_radius = 6,
explosiontimer_reset_radius = 3,
reach = 3,
explosion_timer = 1.5,
allow_fuse_reset = true,
@ -172,7 +172,7 @@ mcl_mobs.register_mob("mobs_mc:creeper_charged", {
explosion_strength = 6,
explosion_radius = 8,
explosion_damage_radius = 8,
explosiontimer_reset_radius = 6,
explosiontimer_reset_radius = 3,
reach = 3,
explosion_timer = 1.5,
allow_fuse_reset = true,

View File

@ -127,7 +127,7 @@ mcl_mobs.register_mob("mobs_mc:enderdragon", {
minetest.set_node(vector.add(self._portal_pos, vector.new(0, 5, 0)), {name = "mcl_end:dragon_egg"})
end
end
-- Free The End Advancement
for _,players in pairs(minetest.get_objects_inside_radius(pos,64)) do
if players:is_player() then
@ -136,6 +136,7 @@ mcl_mobs.register_mob("mobs_mc:enderdragon", {
end
end,
fire_resistant = true,
is_boss = true,
})

View File

@ -44,18 +44,6 @@ local function get_drops(self)
max = 2,
looting = "common",
})
if self._saddle then
table.insert(self.drops,{name = "mcl_mobitems:saddle",
chance = 1,
min = 1,
max = 1,})
end
if self._chest then
table.insert(self.drops,{name = "mcl_chests:chest",
chance = 1,
min = 1,
max = 1,})
end
end
-- Helper functions to determine equipment rules
@ -245,10 +233,18 @@ local horse = {
on_die = function(self, pos)
-- drop saddle when horse is killed while riding
-- drop saddle when horse is killed
if self._saddle then
minetest.add_item(pos, "mcl_mobitems:saddle")
end
-- drop chest when mule/donkey is killed
if self._chest then
minetest.add_item(pos, "mcl_chests:chest")
end
-- drop armor when horse is killed
if self._wearing_armor then
minetest.add_item(pos, self._horse_armor)
end
-- also detach from horse properly
if self.driver then
mcl_mobs.detach(self.driver, {x = 1, y = 0, z = 1})
@ -401,6 +397,7 @@ local horse = {
-- Put on armor and take armor from player's inventory
local armor = minetest.get_item_group(iname, "horse_armor")
self._horse_armor = iname
self._wearing_armor = true
local w = clicker:get_wielded_item()
if not minetest.is_creative_enabled(clicker:get_player_name()) then
w:take_item()

View File

@ -4,12 +4,14 @@
--License for code WTFPL and otherwise stated in readmes
local S = minetest.get_translator("mobs_mc")
local allow_nav_hacks = minetest.settings:get_bool("mcl_mob_allow_nav_hacks ",false)
--###################
--################### IRON GOLEM
--###################
local etime = 0
local walk_dist = 40
local tele_dist = 80
mcl_mobs.register_mob("mobs_mc:iron_golem", {
description = S("Iron Golem"),
@ -85,11 +87,23 @@ mcl_mobs.register_mob("mobs_mc:iron_golem", {
punch_start = 40, punch_end = 50,
},
jump = true,
on_step = function(self,dtime)
etime = etime + dtime
if etime > 10 then
if self._home and vector.distance(self._home,self.object:get_pos()) > 50 then
self:gopath(self._home)
do_custom = function(self, dtime)
self.home_timer = (self.home_timer or 0) + dtime
if self.home_timer > 10 then
self.home_timer = 0
if self._home and self.state ~= "attack" then
local dist = vector.distance(self._home,self.object:get_pos())
if allow_nav_hacks and dist >= tele_dist then
self.object:set_pos(self._home)
self.state = "stand"
self.order = "follow"
elseif dist >= walk_dist then
self:gopath(self._home, function(self)
self.state = "stand"
self.order = "follow"
end)
end
end
end
end,

View File

@ -62,7 +62,7 @@ mcl_mobs.register_mob("mobs_mc:llama", {
head_swivel = "head.control",
bone_eye_height = 11,
head_eye_height = 3,
horrizonatal_head_height=0,
horizontal_head_height=0,
curiosity = 60,
head_yaw = "z",

View File

@ -21,6 +21,7 @@ Mule=Mule
Iron Golem=Golem de fer
Llama=Lama
Ocelot=Ocelot
Cat=Chat
Parrot=Perroquet
Pig=Cochon
Polar Bear=Ours blanc
@ -48,8 +49,15 @@ Witch=Sorcière
Wither=Wither
Wolf=Loup
Husk=Zombie Momifié
Baby Husk=Bébé Zombie Momifié
Zombie=Zombie
Zombie Piglin=Zombie Cochon
Baby Zombie=Bébé Zombie
Piglin=Piglin
Baby Piglin=Bébé Piglin
Zombie Piglin=Piglin Zombie
Baby Zombie Piglin=Bébé Piglin Zombie
Sword Piglin=Piglin avec une épée
Piglin Brute=Piglin Barbare
Farmer=Fermier
Fisherman=Pêcheur
Fletcher=Archer
@ -69,5 +77,7 @@ Dolphin=Dauphin
Pillager=Pilleur
Tropical fish=Poisson tropical
Hoglin=Hoglin
Baby hoglin=Bébé Hoglin
Zoglin=Zoglin
Strider=Arpenteur
Glow Squid=Poulpe Brillant
Glow Squid=Poulpe Brillant

View File

@ -2,4 +2,4 @@ name = mobs_mc
author = maikerumine
description = Adds Minecraft-like monsters and animals.
depends = mcl_init, mcl_particles, mcl_mobs, mcl_wip, mcl_core, mcl_util
optional_depends = default, mcl_tnt, mcl_bows, mcl_throwing, mcl_fishing, bones, mesecons_materials, doc_items
optional_depends = default, mcl_tnt, mcl_bows, mcl_throwing, mcl_fishing, bones, mesecons_materials, doc_items, mcl_worlds

View File

@ -39,7 +39,7 @@ local ocelot = {
head_swivel = "head.control",
bone_eye_height = 6.2,
head_eye_height = 0.4,
horrizonatal_head_height=-0,
horizontal_head_height=-0,
head_yaw="z",
curiosity = 4,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.69, 0.3},

View File

@ -137,7 +137,7 @@ mcl_mobs.register_mob("mobs_mc:parrot", {
xp_max = 3,
head_swivel = "head.control",
bone_eye_height = 1.1,
horrizonatal_head_height=0,
horizontal_head_height=0,
curiosity = 10,
collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.89, 0.25},
visual = "mesh",

View File

@ -22,7 +22,7 @@ mcl_mobs.register_mob("mobs_mc:pig", {
head_swivel = "head.control",
bone_eye_height = 7.5,
head_eye_height = 0.8,
horrizonatal_head_height=-1,
horizontal_head_height=-1,
curiosity = 3,
head_yaw="z",
makes_footstep_sound = true,

View File

@ -219,6 +219,10 @@ mcl_mobs.register_mob("mobs_mc:sword_piglin", sword_piglin)
-- Zombified Piglin --
local function spawn_check(pos, environmental_light, artificial_light, sky_light)
return artificial_light <= 11
end
local zombified_piglin = {
description = S("Zombie Piglin"),
-- type="animal", passive=false: This combination is needed for a neutral mob which becomes hostile, if attacked
@ -256,6 +260,7 @@ local zombified_piglin = {
},
jump = true,
makes_footstep_sound = true,
spawn_check = spawn_check,
walk_velocity = .8,
run_velocity = 2.6,
pathfinding = 1,

View File

@ -27,7 +27,7 @@ mcl_mobs.register_mob("mobs_mc:polar_bear", {
head_swivel = "head.control",
bone_eye_height = 2.6,
head_eye_height = 1,
horrizonatal_head_height = 0,
horizontal_head_height = 0,
curiosity = 20,
head_yaw="z",
visual_size = {x=3.0, y=3.0},

View File

@ -18,7 +18,7 @@ local rabbit = {
head_swivel = "head.control",
bone_eye_height = 2,
head_eye_height = 0.5,
horrizonatal_head_height = -.3,
horizontal_head_height = -.3,
curiosity = 20,
head_yaw="z",
visual = "mesh",

View File

@ -67,7 +67,7 @@ mcl_mobs.register_mob("mobs_mc:sheep", {
head_swivel = "head.control",
bone_eye_height = 3.3,
head_eye_height = 1.1,
horrizonatal_head_height=-.7,
horizontal_head_height=-.7,
curiosity = 6,
head_yaw="z",
visual = "mesh",

View File

@ -4,6 +4,10 @@
local S = minetest.get_translator("mobs_mc")
local function spawn_check(pos, environmental_light, artificial_light, sky_light)
return artificial_light <= 11
end
mcl_mobs.register_mob("mobs_mc:silverfish", {
description = S("Silverfish"),
type = "monster",
@ -53,6 +57,7 @@ mcl_mobs.register_mob("mobs_mc:silverfish", {
view_range = 16,
attack_type = "dogfight",
damage = 1,
spawn_check = spawn_check,
})
mcl_mobs.register_egg("mobs_mc:silverfish", S("Silverfish"), "#6d6d6d", "#313131", 0)

View File

@ -96,6 +96,11 @@ mcl_mobs.register_mob("mobs_mc:witherskeleton", {
fear_height = 4,
harmed_by_heal = true,
fire_resistant = true,
dealt_effect = {
name = "withering",
factor = 1,
dur = 10,
},
})
--spawn

View File

@ -161,6 +161,18 @@ local spawn_children_on_die = function(child_mob, spawn_distance, eject_speed)
end
end
local swamp_light_max = 7
local function slime_spawn_check(pos, environmental_light, artificial_light, sky_light)
local maxlight = swamp_light_max
if is_slime_chunk(pos) then
maxlight = minetest.LIGHT_MAX + 1
end
return artificial_light <= maxlight
end
-- Slime
local slime_big = {
description = S("Slime"),
@ -213,6 +225,7 @@ local slime_big = {
spawn_small_alternative = "mobs_mc:slime_small",
on_die = spawn_children_on_die("mobs_mc:slime_small", 1.0, 1.5),
use_texture_alpha = true,
spawn_check = slime_spawn_check,
}
mcl_mobs.register_mob("mobs_mc:slime_big", slime_big)
@ -297,7 +310,6 @@ local cave_min = mcl_vars.mg_overworld_min
local cave_max = water_level - 23
local swampy_biomes = {"Swampland", "MangroveSwamp"}
local swamp_light_max = 7
local swamp_min = water_level
local swamp_max = water_level + 27

View File

@ -114,9 +114,7 @@ mcl_mobs.register_mob("mobs_mc:spider", spider)
local cave_spider = table.copy(spider)
cave_spider.description = S("Cave Spider")
cave_spider.textures = { {"mobs_mc_cave_spider.png^(mobs_mc_spider_eyes.png^[makealpha:0,0,0)"} }
-- TODO: Poison damage
-- TODO: Revert damage to 2
cave_spider.damage = 3 -- damage increased to undo non-existing poison
cave_spider.damage = 2
cave_spider.hp_min = 1
cave_spider.hp_max = 12
cave_spider.collisionbox = {-0.35, -0.01, -0.35, 0.35, 0.46, 0.35}
@ -138,6 +136,11 @@ cave_spider.walk_velocity = 1.3
cave_spider.run_velocity = 3.2
cave_spider.sounds = table.copy(spider.sounds)
cave_spider.sounds.base_pitch = 1.25
cave_spider.dealt_effect = {
name = "poison",
factor = 2.5,
dur = 7,
}
mcl_mobs.register_mob("mobs_mc:cave_spider", cave_spider)

View File

@ -1941,6 +1941,7 @@ local trade_inventory = {
if not wanted2:is_empty() then
inv:remove_item("input", inv:get_stack("wanted", 2))
end
local name = player:get_player_name()
local trader = player_trading_with[name]
minetest.sound_play("mobs_mc_villager_accept", {to_player = player:get_player_name(),object=trader.object}, true)
end

View File

@ -70,6 +70,11 @@ mcl_mobs.register_mob("mobs_mc:witch", {
},
view_range = 16,
fear_height = 4,
deal_damage = function(self, damage, mcl_reason)
local factor = 1
if mcl_reason.type == "magic" then factor = 0.15 end
self.health = self.health - factor*damage
end,
})
-- potion projectile (EXPERIMENTAL)

View File

@ -1,14 +1,72 @@
--MCmobs v0.4
--maikerumine
--updated by Herowl
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local S = minetest.get_translator("mobs_mc")
local mobs_griefing = minetest.settings:get_bool("mobs_griefing", true)
local follow_spawner = minetest.settings:get_bool("wither_follow_spawner", false)
local w_strafes = minetest.settings:get_bool("wither_strafes", true)
local anti_troll = minetest.settings:get_bool("wither_anti_troll_measures", false)
local WITHER_INIT_BOOM = 7
local WITHER_MELEE_COOLDOWN = 3
local function atan(x)
if not x or x ~= x then
return 0
else
return math.atan(x)
end
end
--###################
--################### WITHER
--###################
local function wither_unstuck(self)
local pos = self.object:get_pos()
if mobs_griefing then -- destroy blocks very nearby (basically, colliding with)
local col = self.collisionbox
local pos1 = vector.offset(pos, col[1], col[2], col[3])
local pos2 = vector.offset(pos, col[4], col[5], col[6])
for z = pos1.z, pos2.z do for y = pos1.y, pos2.y do for x = pos1.x, pos2.x do
local npos = vector.new(x,y,z)
local name = minetest.get_node(npos).name
if name ~= "air" then
local ndef = minetest.registered_nodes[name]
if ndef and ndef._mcl_hardness and ndef._mcl_hardness >= 0 then
local drops = minetest.get_node_drops(name, "")
if minetest.dig_node(npos) then
for _, item in ipairs(drops) do
if type(item) ~= "string" then
item = item:get_name() .. item:get_count()
end
minetest.add_item(npos, item)
end
end
end
end
end end end
end
mcl_mobs.mob_class.safe_boom(self, pos, 2)
end
local function get_dim_relative_y(pos)
if (pos.y >= mcl_vars.mg_realm_barrier_overworld_end_max) then
return pos.y
elseif (pos.y <= mcl_vars.mg_nether_max + 200) then
return (pos.y - mcl_vars.mg_nether_min - 20)
else
return (pos.y - mcl_vars.mg_end_min - 50)
end
end
mobs_mc.wither_count_overworld = 0
mobs_mc.wither_count_nether = 0
mobs_mc.wither_count_end = 0
mcl_mobs.register_mob("mobs_mc:wither", {
description = S("Wither"),
type = "monster",
@ -26,11 +84,11 @@ mcl_mobs.register_mob("mobs_mc:wither", {
{"mobs_mc_wither.png"},
},
visual_size = {x=4, y=4},
makes_footstep_sound = true,
view_range = 16,
view_range = 50,
fear_height = 4,
walk_velocity = 2,
run_velocity = 4,
strafes = w_strafes,
sounds = {
shoot_attack = "mobs_mc_ender_dragon_shoot",
attack = "mobs_mc_ender_dragon_attack",
@ -41,9 +99,8 @@ mcl_mobs.register_mob("mobs_mc:wither", {
jump_height = 10,
fly = true,
makes_footstep_sound = false,
dogshoot_switch = 1,
dogshoot_count_max = 1,
attack_animals = true,
dogshoot_switch = 1, -- unused
dogshoot_count_max = 1, -- unused
can_despawn = false,
drops = {
{name = "mcl_mobitems:nether_star",
@ -53,13 +110,13 @@ mcl_mobs.register_mob("mobs_mc:wither", {
},
lava_damage = 0,
fire_damage = 0,
attack_type = "dogshoot",
attack_type = "custom",
explosion_strength = 8,
dogshoot_stop = true,
arrow = "mobs_mc:wither_skull",
reach = 5,
shoot_interval = 0.5,
shoot_offset = -1,
shoot_interval = 1,
shoot_offset = -0.5,
animation = {
walk_speed = 12, run_speed = 12, stand_speed = 12,
stand_start = 0, stand_end = 20,
@ -67,57 +124,377 @@ mcl_mobs.register_mob("mobs_mc:wither", {
run_start = 0, run_end = 20,
},
harmed_by_heal = true,
do_custom = function(self)
is_boss = true,
extra_hostile = true,
attack_exception = function(p)
local ent = p:get_luaentity()
if p:is_player() then return false end
if not ent or not ent.is_mob or ent.harmed_by_heal or string.find(ent.name, "ghast") then return true
else return false end
end,
do_custom = function(self, dtime)
if self._spawning then
-- "loading" bar while spawning
if not self._spw_max then self._spw_max = self._spawning end
self._spawning = self._spawning - dtime
local bardef = {
color = "dark_purple",
text = "Wither spawning",
percentage = math.floor((self._spw_max - self._spawning) / self._spw_max * 100),
}
local pos = self.object:get_pos()
for _, player in pairs(minetest.get_connected_players()) do
local d = vector.distance(pos, player:get_pos())
if d <= 80 then
mcl_bossbars.add_bar(player, bardef, true, d)
end
end
-- turn around and flash while spawning
self.object:set_yaw(self._spawning*10)
local factor = math.floor((math.sin(self._spawning*10)+1.5) * 85)
local str = minetest.colorspec_to_colorstring({r=factor, g=factor, b=factor})
self.object:set_texture_mod("^[brighten^[multiply:"..str)
-- when fully spawned, explode
if self._spawning <= 0 then
if mobs_griefing and not minetest.is_protected(pos, "") then
mcl_explosions.explode(pos, WITHER_INIT_BOOM, { drop_chance = 1.0 }, self.object)
else
mcl_mobs.mob_class.safe_boom(self, pos, WITHER_INIT_BOOM)
end
self.object:set_texture_mod("")
self._spawning = nil
self._spw_max = nil
else
return false
end
end
-- passive regeneration
self._custom_timer = self._custom_timer + dtime
if self._custom_timer > 1 then
self.health = math.min(self.health + 1, self.hp_max)
self._custom_timer = self._custom_timer - 1
end
-- anti-troll measures
if anti_troll then
if self._spawner then
local spawner = minetest.get_player_by_name(self._spawner)
if follow_spawner and spawner then
self._death_timer = 0
local pos = self.object:get_pos()
local spw = spawner:get_pos()
local dist = vector.distance(pos, spw)
if dist > 60 then -- teleport to the player who spawned the wither
local R = 10
pos.x = spw.x + math.random(-R, R)
pos.y = spw.y + math.random(-R, R)
pos.z = spw.z + math.random(-R, R)
self.object:set_pos(pos)
end
else -- despawn automatically after set time
-- HP changes impact timer: taking damage sets it back
self._death_timer = self._death_timer + self.health - self._health_old
if self.health == self._health_old then self._death_timer = self._death_timer + dtime end
if self._death_timer > 100 then
self.object:remove()
return false
end
self._health_old = self.health
end
end
-- count withers per dimension
local dim = mcl_worlds.pos_to_dimension(self.object:get_pos())
if dim == "overworld" then mobs_mc.wither_count_overworld = mobs_mc.wither_count_overworld + 1
elseif dim == "nether" then mobs_mc.wither_count_nether = mobs_mc.wither_count_nether + 1
elseif dim == "end" then mobs_mc.wither_count_end = mobs_mc.wither_count_end + 1 end
end
-- update things dependent on HP
local rand_factor
if self.health < (self.hp_max / 2) then
self.base_texture = "mobs_mc_wither_half_health.png"
self.fly = false
self.object:set_properties({textures={self.base_texture}})
self.armor = {undead = 80, fleshy = 80}
self._arrow_resistant = true
rand_factor = 3
else
self.base_texture = "mobs_mc_wither.png"
self.fly = true
self._arrow_resistant = false
rand_factor = 10
end
if not self.attack then
local y = get_dim_relative_y(self.object:get_pos())
if y > 0 then
self.fly = false
else
self.fly = true
local vel = self.object:get_velocity()
self.object:set_velocity(vector.new(vel.x, self.walk_velocity, vel.z))
end
end
self.object:set_properties({textures={self.base_texture}})
mcl_bossbars.update_boss(self.object, "Wither", "dark_purple")
if math.random(1, rand_factor) < 2 then
self.arrow = "mobs_mc:wither_skull_strong"
else
self.arrow = "mobs_mc:wither_skull"
end
end,
attack_state = function(self, dtime)
local s = self.object:get_pos()
local p = self.attack:get_pos() or s
p.y = p.y - .5
s.y = s.y + .5
local dist = vector.distance(p, s)
local vec = {
x = p.x - s.x,
y = p.y - s.y,
z = p.z - s.z
}
local yaw = (atan(vec.z / vec.x) +math.pi/ 2) - self.rotate
if p.x > s.x then yaw = yaw +math.pi end
yaw = self:set_yaw( yaw, 0, dtime)
local stay_away_from_player = vector.zero()
--strafe back and fourth
--stay away from player so as to shoot them
if dist < self.avoid_distance and self.shooter_avoid_enemy then
self:set_animation( "shoot")
stay_away_from_player=vector.multiply(vector.direction(p, s), 0.33)
end
if self.fly then
local vel = self.object:get_velocity()
local diff = s.y - p.y
local FLY_FACTOR = self.walk_velocity
if diff < 10 then
self.object:set_velocity({x=vel.x, y= FLY_FACTOR, z=vel.z})
elseif diff > 15 then
self.object:set_velocity({x=vel.x, y=-FLY_FACTOR, z=vel.z})
end
for i=1, 15 do
if minetest.get_node(vector.offset(s, 0, -i, 0)).name ~= "air" then
self.object:set_velocity({x=vel.x, y= FLY_FACTOR, z=vel.z})
break
elseif minetest.get_node(vector.offset(s, 0, i, 0)).name ~= "air" then
self.object:set_velocity({x=vel.x, y=-FLY_FACTOR/i, z=vel.z})
break
end
end
end
if self.strafes then
if not self.strafe_direction then
self.strafe_direction = 1.57
end
if math.random(40) == 1 then
self.strafe_direction = self.strafe_direction*-1
end
local dir = vector.rotate_around_axis(vector.direction(s, p), vector.new(0,1,0), self.strafe_direction)
local dir2 = vector.multiply(dir, 0.3 * self.walk_velocity)
if dir2 and stay_away_from_player then
self.acc = vector.add(dir2, stay_away_from_player)
end
else
self:set_velocity(0)
end
if dist > 30 then self.acc = vector.add(self.acc, vector.direction(s, p)*0.01) end
local side_cor = vector.new(0.7*math.cos(yaw), 0, 0.7*math.sin(yaw))
local m = self.object:get_pos() -- position of the middle head
local sr = self.object:get_pos() + side_cor -- position of side right head
local sl = self.object:get_pos() - side_cor -- position of side left head
-- height corrections
m.y = m.y + self.collisionbox[5]
sr.y = sr.y + self.collisionbox[5] - 0.3
sl.y = sl.y + self.collisionbox[5] - 0.3
local rand_pos = math.random(1,3)
if rand_pos == 1 then m = sr
elseif rand_pos == 2 then m = sl end
-- melee attack
if not self._melee_timer then
self._melee_timer = 0
end
if self._melee_timer < WITHER_MELEE_COOLDOWN then
self._melee_timer = self._melee_timer + dtime
else
self._melee_timer = 0
local pos = table.copy(s)
pos.y = pos.y + 2
local objs = minetest.get_objects_inside_radius(pos, self.reach)
local obj_pos, dist
local hit_some = false
for n = 1, #objs do
objs[n]:punch(objs[n], 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 4},
}, pos)
local ent = objs[n]:get_luaentity()
if objs[n]:is_player() or (ent and ent ~= self and (not ent._shooter or ent._shooter ~= self)) then
mcl_util.deal_damage(objs[n], 8, {type = "magic"})
hit_some = true
end
mcl_mobs.effect_functions["withering"](objs[n], 0.5, 10)
end
if hit_some then
mcl_mobs.effect(pos, 32, "mcl_particles_soul_fire_flame.png", 5, 10, self.reach, 1, 0)
end
end
if dist < self.reach then
self.shoot_interval = 3
else
self.shoot_interval = 1
end
if self.shoot_interval
and self.timer > self.shoot_interval
and not minetest.raycast(vector.add(m, vector.new(0,self.shoot_offset,0)), vector.add(self.attack:get_pos(), vector.new(0,1.5,0)), false, false):next()
and math.random(1, 100) <= 60 then
self.timer = 0
self:set_animation( "shoot")
-- play shoot attack sound
self:mob_sound("shoot_attack")
-- Shoot arrow
if minetest.registered_entities[self.arrow] then
local arrow, ent
local v = 1
if not self.shoot_arrow then
self.firing = true
minetest.after(1, function()
self.firing = false
end)
arrow = minetest.add_entity(m, self.arrow)
ent = arrow:get_luaentity()
if ent.velocity then
v = ent.velocity
end
ent.switch = 1
ent.owner_id = tostring(self.object) -- add unique owner id to arrow
-- important for mcl_shields
ent._shooter = self.object
ent._saved_shooter_pos = self.object:get_pos()
end
local amount = (vec.x * vec.x + vec.y * vec.y + vec.z * vec.z) ^ 0.5
-- offset makes shoot aim accurate
vec.y = vec.y + self.shoot_offset
vec.x = vec.x * (v / amount)
vec.y = vec.y * (v / amount)
vec.z = vec.z * (v / amount)
if self.shoot_arrow then
vec = vector.normalize(vec)
self:shoot_arrow(m, vec)
else
arrow:set_velocity(vec)
end
end
end
end,
do_punch = function(self, hitter, tflp, tool_capabilities, dir)
if self._spawning or hitter == self.object then return false end
local ent = hitter:get_luaentity()
if ent and self._arrow_resistant and (string.find(ent.name, "arrow") or string.find(ent.name, "rocket")) then return false end
wither_unstuck(self)
return true
end,
deal_damage = function(self, damage, mcl_reason)
if self._spawning then return end
if self._arrow_resistant and mcl_reason.type == "magic" then return end
wither_unstuck(self)
self.health = self.health - damage
end,
on_spawn = function(self)
minetest.sound_play("mobs_mc_wither_spawn", {object=self.object, gain=1.0, max_hear_distance=64})
self._custom_timer = 0.0
self._death_timer = 0.0
self._health_old = self.hp_max
self._spawning = 10
return true
end,
})
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
local wither_rose_soil = { "group:grass_block", "mcl_core:dirt", "mcl_core:coarse_dirt", "mcl_nether:netherrack", "group:soul_block", "mcl_mud:mud", "mcl_moss:moss" }
local function spawn_wither_rose(obj)
local n = minetest.find_node_near(obj:get_pos(),2,wither_rose_soil)
if n then
local p = vector.offset(n,0,1,0)
if minetest.get_node(p).name == "air" then
if not ( mobs_griefing and minetest.place_node(p,{name="mcl_flowers:wither_rose"}) ) then
minetest.add_item(p,"mcl_flowers:wither_rose")
end
end
end
end
mcl_mobs.register_arrow("mobs_mc:wither_skull", {
visual = "sprite",
visual_size = {x = 0.75, y = 0.75},
-- TODO: 3D projectile, replace tetxture
textures = {"mobs_mc_TEMP_wither_projectile.png"},
velocity = 6,
visual = "cube",
visual_size = {x = 0.3, y = 0.3},
textures = {
"mobs_mc_wither_projectile.png^[verticalframe:6:0", -- top
"mobs_mc_wither_projectile.png^[verticalframe:6:1", -- bottom
"mobs_mc_wither_projectile.png^[verticalframe:6:2", -- left
"mobs_mc_wither_projectile.png^[verticalframe:6:3", -- right
"mobs_mc_wither_projectile.png^[verticalframe:6:4", -- back
"mobs_mc_wither_projectile.png^[verticalframe:6:5", -- front
},
velocity = 7,
rotate = 90,
_lifetime = 350,
on_punch = function(self) end,
-- direct hit
hit_player = function(self, player)
local pos = vector.new(self.object:get_pos())
mcl_mobs.effect_functions["withering"](player, 0.5, 10)
player:punch(self.object, 1.0, {
full_punch_interval = 0.5,
damage_groups = {fleshy = 8},
}, nil)
mcl_mobs.mob_class.boom(self,self.object:get_pos(), 1)
mcl_mobs.mob_class.boom(self, pos, 1)
if player:get_hp() <= 0 then
local shooter = self._shooter:get_luaentity()
if shooter then shooter.health = shooter.health + 5 end
spawn_wither_rose(player)
end
end,
hit_mob = function(self, mob)
local pos = vector.new(self.object:get_pos())
mcl_mobs.effect_functions["withering"](mob, 0.5, 10)
mob:punch(self.object, 1.0, {
full_punch_interval = 0.5,
damage_groups = {fleshy = 8},
}, nil)
mcl_mobs.mob_class.boom(self,self.object:get_pos(), 1)
mcl_mobs.mob_class.boom(self, pos, 1)
local l = mob:get_luaentity()
if l and l.health - 8 <= 0 then
local n = minetest.find_node_near(mob:get_pos(),2,wither_rose_soil)
if n then
local p = vector.offset(n,0,1,0)
if minetest.get_node(p).name == "air" then
if not ( mobs_griefing and minetest.place_node(p,{name="mcl_flowers:wither_rose"}) ) then
minetest.add_item(p,"mcl_flowers:wither_rose")
end
end
end
local shooter = self._shooter:get_luaentity()
if shooter then shooter.health = shooter.health + 5 end
spawn_wither_rose(mob)
end
end,
@ -126,10 +503,75 @@ mcl_mobs.register_arrow("mobs_mc:wither_skull", {
mcl_mobs.mob_class.boom(self,pos, 1)
end
})
-- TODO: Add blue wither skull
mcl_mobs.register_arrow("mobs_mc:wither_skull_strong", {
visual = "cube",
visual_size = {x = 0.35, y = 0.35},
textures = {
"mobs_mc_wither_projectile_strong.png^[verticalframe:6:0", -- top
"mobs_mc_wither_projectile_strong.png^[verticalframe:6:1", -- bottom
"mobs_mc_wither_projectile_strong.png^[verticalframe:6:2", -- left
"mobs_mc_wither_projectile_strong.png^[verticalframe:6:3", -- right
"mobs_mc_wither_projectile_strong.png^[verticalframe:6:4", -- back
"mobs_mc_wither_projectile_strong.png^[verticalframe:6:5", -- front
},
velocity = 4,
rotate = 90,
_lifetime = 500,
on_punch = function(self) end,
-- direct hit
hit_player = function(self, player)
local pos = vector.new(self.object:get_pos())
mcl_mobs.effect_functions["withering"](player, 0.5, 10)
player:punch(self.object, 1.0, {
full_punch_interval = 0.5,
damage_groups = {fleshy = 12},
}, nil)
if mobs_griefing and not minetest.is_protected(pos, "") then
mcl_explosions.explode(pos, 1, { drop_chance = 1.0, max_blast_resistance = 0, }, self.object)
else
mcl_mobs.mob_class.safe_boom(self, pos, 1) --need to call it this way bc self is the "arrow" object here
end
if player:get_hp() <= 0 then
local shooter = self._shooter:get_luaentity()
if shooter then shooter.health = shooter.health + 5 end
spawn_wither_rose(player)
end
end,
hit_mob = function(self, mob)
local pos = vector.new(self.object:get_pos())
mcl_mobs.effect_functions["withering"](mob, 0.5, 10)
mob:punch(self.object, 1.0, {
full_punch_interval = 0.5,
damage_groups = {fleshy = 12},
}, nil)
if mobs_griefing and not minetest.is_protected(pos, "") then
mcl_explosions.explode(pos, 1, { drop_chance = 1.0, max_blast_resistance = 0, }, self.object)
else
mcl_mobs.mob_class.safe_boom(self, pos, 1) --need to call it this way bc self is the "arrow" object here
end
local l = mob:get_luaentity()
if l and l.health - 8 <= 0 then
local shooter = self._shooter:get_luaentity()
if shooter then shooter.health = shooter.health + 5 end
spawn_wither_rose(mob)
end
end,
-- node hit, explode
hit_node = function(self, pos, node)
if mobs_griefing and not minetest.is_protected(pos, "") then
mcl_explosions.explode(pos, 1, { drop_chance = 1.0, max_blast_resistance = 0, }, self.object)
else
mcl_mobs.mob_class.safe_boom(self, pos, 1) --need to call it this way bc self is the "arrow" object here
end
end
})
--Spawn egg
mcl_mobs.register_egg("mobs_mc:wither", S("Wither"), "#4f4f4f", "#4f4f4f", 0, true)
mcl_wip.register_wip_item("mobs_mc:wither")
mcl_mobs:non_spawn_specific("mobs_mc:wither","overworld",0,minetest.LIGHT_MAX+1)

View File

@ -29,7 +29,7 @@ local wolf = {
head_swivel = "head.control",
bone_eye_height = 3.5,
head_eye_height = 1.1,
horrizonatal_head_height=0,
horizontal_head_height=0,
curiosity = 3,
head_yaw="z",
sounds = {

View File

@ -1,4 +1,3 @@
# textdomain: lightning
@1 was struck by lightning.=@ 1 fue alcanzado por un rayo.
Let lightning strike at the specified position or yourself=Deje que un rayo golpee en la posición especificada o sobre usted mismo.
Let lightning strike at the specified position or player.No parameter will strike yourself.=Deje que un rayo golpee en la posición especificada o jugador.Ningún parámetro le golpeará a usted mismo.
No position specified and unknown player=Ninguna posición especificada y jugador desconocido

View File

@ -0,0 +1,2 @@
# textdomain: mcl_raids
Ominous Banner=Bannière de mauvais augure

View File

@ -774,7 +774,7 @@ local function search(data)
for i = 1, #data.items_raw do
local item = data.items_raw[i]
local def = reg_items[item]
local desc = lower(def.description)
local desc = string.lower(M.get_translated_string(data.lang_code, def.description))
local search_in = item .. desc
local to_add
@ -838,6 +838,7 @@ local function init_data(name)
iX = sfinv_only and 8 or DEFAULT_SIZE,
items = init_items,
items_raw = init_items,
lang_code = M.get_player_information(name).lang_code or 'en',
}
end

View File

@ -2,6 +2,7 @@
Water can flow into this block and cause it to drop as an item.=
This block can be turned into dirt with a hoe.=
This block can be turned into farmland with a hoe.=
This block can be turned into grass path with a shovel.=
This block acts as a soil for all saplings.=
This block acts as a soil for some saplings.=
Sugar canes will grow on this block.=

View File

@ -217,7 +217,9 @@ function awards.unlock(name, award)
-- Get award
minetest.log("action", name.." has gotten award "..award)
minetest.chat_send_all(S("@1 has made the advancement @2", name, minetest.colorize(mcl_colors.GREEN, "[" .. (awdef.title or award) .. "]")))
if minetest.settings:get_bool("mcl_showAdvancementMessages", true) then
minetest.chat_send_all(S("@1 has made the advancement @2", name, minetest.colorize(mcl_colors.GREEN, "[" .. (awdef.title or award) .. "]")))
end
data.unlocked[award] = award
awards.save()

View File

@ -62,3 +62,9 @@ Advancement “@1” does not exist.=Le progrès «@1» n'existe pas.
Mine a block: @1=Miner un bloc : @1
Mine blocks: @1×@2=Miner des blocs : @1×@2
Awards are disabled, enable them first by using /awards enable!=Les récompenses sont désactivées, activez les d'abord en utilisant /awards enable !
Goal Completed:=Objectif atteint :
Goal Completed!=Objectif atteint !
Goal Completed: @1=Objectif atteint : @1
Challenge Completed:=Défi relevé :
Challenge Completed!=Défi relevé !
Challenge Completed: @1=Défi relevé : @1

21
mods/HUD/mcl_achievements/init.lua Normal file → Executable file
View File

@ -431,6 +431,27 @@ awards.register_achievement("mcl:wax_off", {
group = "Husbandry",
})
-- Triggered in mcl_smithing_table
awards.register_achievement("mcl:trim", {
title = S("Crafting a New Look"),
description = S("Craft a trimmed armor at a Smithing Table"),
icon = "dune_armor_trim_smithing_template.png",
type = "Advancement",
group = "Adventure",
})
awards.register_achievement("mcl:lots_of_trimming", {
title = S("Smithing with Style"),
description = S("Apply these smithing templates at least once: Spire, Snout, Rib, Ward, Silence, Vex, Tide, Wayfinder"),
icon = "silence_armor_trim_smithing_template.png",
type = "Advancement",
group = "Adventure",
on_unlock = function(name, awdef)
-- delete json that is no longer needed
minetest.get_player_by_name(name):get_meta():set_string("mcl_smithing_table:achievement_trims", "")
end,
})
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
if non_pc_achievements then

View File

@ -51,3 +51,7 @@ Bring Home the Beacon=Den Nachbarn heimleuchten
Use a beacon.=Benutzen Sie ein Leuchtfeuer.
Beaconator=Leuchtturmwärter
Use a fully powered beacon.=Benutzen Sie ein vollständiges Leuchtfeuer.
Crafting a New Look=Ein neues Aussehen
Craft a trimmed armor at a Smithing Table=Versieh ein Rüstungsteil an einem Schmiedetisch mit einem Rüstungsbesatz
Smithing with Style=Schmieden mit Stil
Apply these smithing templates at least once: Spire, Snout, Rib, Ward, Silence, Vex, Tide, Wayfinder=Wende jede dieser Schmiedevorlagen mindestens einmal an: Turmspitze, Schnauze, Rippe, Warthof, Stille, Plagegeist, Gezeiten und Wegfinder

View File

@ -108,7 +108,10 @@ Put lava in a bucket.=Pon lava en un cubo.
Hero of the Village=Héroe de la aldea
Successfully defend a village from a raid=Defiende una aldea de una invasión
Voluntary Exile=Exilio voluntario
Kill a raid captain. Maybe consider staying away from the local villages for the time being...=Mata al capitán de una invasión.
Sería mejor alejarte de las aldeas por un tiempo...
Kill a raid captain. Maybe consider staying away from the local villages for the time being...=Mata al capitán de una invasión. Sería mejor alejarte de las aldeas por un tiempo...
Tactical Fishing=Pesca táctica
Catch a fish... without a fishing rod!=Atrapa a un pez... ¡sin una caña de pescar!
Crafting a New Look=Forjando una nueva imagen
Craft a trimmed armor at a Smithing Table=Decora una armadura en una mesa de herrería
Smithing with Style=Forjando con estilo
Apply these smithing templates at least once: Spire, Snout, Rib, Ward, Silence, Vex, Tide, Wayfinder=Aplica estos moldes de herrería al menos una vez: agujas, hocico, costillas, guardián, silencio, vex, mareas, buscacaminos

View File

@ -111,3 +111,7 @@ Voluntary Exile=Exil volontaire
Kill a raid captain. Maybe consider staying away from the local villages for the time being...=Tuez un capitaine de pillards. Mieux vaut rester loin des villages pour l'instant...
Tactical Fishing=Pêche tactique
Catch a fish... without a fishing rod!=Attrapez un poisson... sans canne à pêche !
Crafting a New Look=Motif de Jalousie
Craft a trimmed armor at a Smithing Table=Fabriquez une pièce d'armure ornée sur la table de forge
Smithing with Style=La classe de la cuirasse
Apply these smithing templates at least once: Spire, Snout, Rib, Ward, Silence, Vex, Tide, Wayfinder=Appliquez ces modèles de forge au moins une fois : Tour, Groin, Côte, Abîme, Silence, Vex, Marée, Éclaireur

4
mods/HUD/mcl_achievements/locale/template.txt Normal file → Executable file
View File

@ -111,3 +111,7 @@ Voluntary Exile=
Kill a raid captain. Maybe consider staying away from the local villages for the time being...=
Tactical Fishing=
Catch a fish... without a fishing rod!=
Crafting a New Look=
Craft a trimmed armor at a Smithing Table=
Smithing with Style=
Apply these smithing templates at least once: Spire, Snout, Rib, Ward, Silence, Vex, Tide, Wayfinder=

View File

@ -5,10 +5,15 @@ Contributors=Contributeurs
Creator of MineClone=Créateur de MineClone
Creator of MineClone2=Créateur de MineClone2
Developers=Développeurs
Past Developers=Anciens Développeurs
Jump to speed up (additionally sprint)=Saut pour accélérer (peut être combiné avec sprint)
Maintainers=Mainteneurs
Previous Maintainers=Anciens Mainteneurs
MineClone5=MineClone5
Original Mod Authors=Auteurs des mods originaux
Sneak to skip=Shift pour passer
Textures=Textures
Translations=Traductions
Translations=Traductions
Music=Musique
Funders=Fondateurs
Special thanks=Remerciements spéciaux

View File

@ -10,30 +10,32 @@ return {
}},
{S("Maintainers"), 0xFF51D5, {
"AncientMariner",
"Nicu",
"Herowl",
}},
{S("Previous Maintainers"), 0xFFFFFF, {
"Fleckenstein",
"cora",
"Nicu",
}},
{S("Developers"), 0xF84355, {
"AFCMS",
"epCode",
"chmodsayshello",
"PrairieWind",
"MrRar",
"FossFanatic ",
"SmokeyDope",
"Faerraven / Michieal",
"Codiac",
}},
{S("Past Developers"), 0xF84355, {
"jordan4ibanez",
"iliekprogrammar",
"kabou",
"kay27",
"Faerraven / Michieal",
"MysticTempest",
"NO11",
"SumianVoice",
"PrairieWind",
}},
{S("Contributors"), 0x52FF00, {
"RandomLegoBrick",
@ -114,6 +116,19 @@ return {
"Niterux",
"appgurueu",
"seventeenthShulker",
"DinoNuggies4665",
"basxto",
"Morik666",
"Eliy21",
"mdk",
"Alessandra Lozoya",
"VanicGame",
"ThePython10110",
"Araca",
"Montandalar",
"mim",
"Dark",
"Bakawun",
}},
{S("Music"), 0xA60014, {
"Jordach for the jukebox music compilation from Big Freaking Dig",
@ -157,6 +172,7 @@ return {
"cora",
"Faerraven / Michieal",
"PrairieWind",
"ChrisPHP",
}},
{S("3D Models"), 0x0019FF, {
"22i",
@ -164,6 +180,7 @@ return {
"epCode",
"Faerraven / Michieal",
"SumianVoice",
"thunder1035",
}},
{S("Textures"), 0xFF9705, {
"XSSheep",
@ -180,8 +197,11 @@ return {
"Faerraven / Michieal",
"Nicu",
"Exhale",
"Aeonix_Aeon",
"Wbjitscool",
"SmokeyDope",
"thunder1035",
"Herowl",
}},
{S("Translations"), 0x00FF60, {
"Wuzzy",
@ -201,6 +221,9 @@ return {
"Temak",
"megustanlosfrijoles",
"kbundg",
"Isaac Dennis",
"ADLON",
"Sab Pyrope",
}},
{S("Funders"), 0xF7FF00, {
"40W",

View File

@ -156,7 +156,6 @@ mcl_death_messages = {
plain = "@1 died a sweet death",
assist = "@1 was poked to death by a sweet berry bush whilst trying to escape @2",
},
-- Missing snowballs: The Minecraft wiki mentions them but the MC source code does not.
},
}

View File

@ -741,12 +741,14 @@ if minetest.is_creative_enabled("") then
for _, item in ipairs(drops) do
minetest.add_item(pos, item)
end
end
local inv = digger:get_inventory()
if inv then
for _, item in ipairs(drops) do
if not inv:contains_item("main", item, true) then
inv:add_item("main", item)
else
-- If there is a player
local inv = digger:get_inventory()
if inv then
for _, item in ipairs(drops) do
if not inv:contains_item("main", item, true) then
inv:add_item("main", item)
end
end
end
end

View File

@ -3,56 +3,6 @@ mcl_inventory = {}
dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/creative.lua")
dofile(minetest.get_modpath(minetest.get_current_modname()) .. "/survival.lua")
--local mod_player = minetest.get_modpath("mcl_player")
--local mod_craftguide = minetest.get_modpath("mcl_craftguide")
---Returns a single itemstack in the given inventory to the main inventory, or drop it when there's no space left.
---@param itemstack mt.ItemStack
---@param dropper mt.ObjectRef
---@param pos mt.Vector
---@param inv mt.InvRef
local function return_item(itemstack, dropper, pos, inv)
if dropper:is_player() then
-- Return to main inventory
if inv:room_for_item("main", itemstack) then
inv:add_item("main", itemstack)
else
-- Drop item on the ground
local v = dropper:get_look_dir()
local p = vector.offset(pos, 0, 1.2, 0)
p.x = p.x + (math.random(1, 3) * 0.2)
p.z = p.z + (math.random(1, 3) * 0.2)
local obj = minetest.add_item(p, itemstack)
if obj then
v.x = v.x * 4
v.y = v.y * 4 + 2
v.z = v.z * 4
obj:set_velocity(v)
obj:get_luaentity()._insta_collect = false
end
end
else
-- Fallback for unexpected cases
minetest.add_item(pos, itemstack)
end
return itemstack
end
---Return items in the given inventory list (name) to the main inventory, or drop them if there is no space left.
---@param player mt.PlayerObjectRef
---@param name string
local function return_fields(player, name)
local inv = player:get_inventory()
local list = inv:get_list(name)
if not list then return end
for i, stack in ipairs(list) do
return_item(stack, player, player:get_pos(), inv)
stack:clear()
inv:set_stack(name, i, stack)
end
end
---@param player mt.PlayerObjectRef
---@param armor_change_only? boolean
local function set_inventory(player, armor_change_only)
@ -72,9 +22,9 @@ end
-- Drop items in craft grid and reset inventory on closing
minetest.register_on_player_receive_fields(function(player, formname, fields)
if fields.quit then
return_fields(player, "craft")
return_fields(player, "enchanting_lapis")
return_fields(player, "enchanting_item")
mcl_util.move_player_list(player, "craft")
mcl_util.move_player_list(player, "enchanting_lapis")
mcl_util.move_player_list(player, "enchanting_item")
if not minetest.is_creative_enabled(player:get_player_name()) and (formname == "" or formname == "main") then
set_inventory(player)
end
@ -88,9 +38,9 @@ end
-- Drop crafting grid items on leaving
minetest.register_on_leaveplayer(function(player)
return_fields(player, "craft")
return_fields(player, "enchanting_lapis")
return_fields(player, "enchanting_item")
mcl_util.move_player_list(player, "craft")
mcl_util.move_player_list(player, "enchanting_lapis")
mcl_util.move_player_list(player, "enchanting_item")
end)
minetest.register_on_joinplayer(function(player)
@ -116,9 +66,9 @@ minetest.register_on_joinplayer(function(player)
items remaining in the crafting grid from the previous join; this is likely
when the server has been shutdown and the server didn't clean up the player
inventories. ]]
return_fields(player, "craft")
return_fields(player, "enchanting_item")
return_fields(player, "enchanting_lapis")
mcl_util.move_player_list(player, "craft")
mcl_util.move_player_list(player, "enchanting_lapis")
mcl_util.move_player_list(player, "enchanting_item")
end)
---@param player mt.PlayerObjectRef

View File

@ -1,2 +1,3 @@
# textdomain: mcl_ver_info
Sorry, but your version of Minetest doesn't support the latest API. Please upgrade your minetest.=Désolé, mais votre version de Minetest ne supporte la dernière API. Veuillez mettre à jour minetest.
Display Mineclone 2 game version.=Affiche la version de Mineclone 2.

View File

@ -2,12 +2,13 @@
Dispenser=Dispensador
A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.=Un dispensador es un bloque que actúa como un componente de redstone que, cuando se alimenta con energía de redstone, dispensa un artículo. Tiene un contenedor con 9 ranuras de inventario.
Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.=Coloque el dispensador en una de las 6 direcciones posibles. El "agujero" es donde los artículos saldrán volando del dispensador. Use el dispensador para acceder a su inventario. Inserte los artículos que desea dispensar. Proporcione al dispensador energía de redstone una vez para dispensar un elemento aleatorio:
The dispenser will do different things, depending on the dispensed item:= El dispensador hará diferentes cosas, dependiendo del artículo dispensado:
• Arrows: Are launched=• Flechas: Se lanzan
• Eggs and snowballs: Are thrown=• Huevos y bolas de nieve: Son lanzados
• Fire charges: Are fired in a straight line=• Cargas de fuego: Se disparan en línea recta
• Armor: Will be equipped to players and armor stands=• Armadura: Estará equipada para jugadores y armaduras
• Boats: Are placed on water or are dropped=• Barcas: Se colocan en el agua o se dejan caer
• Minecart: Are placed on rails or are dropped=• Carro de minas: Se colocan sobre rieles o se dejan caer =
• Minecart: Are placed on rails or are dropped=• Carro de minas: Se colocan sobre rieles o se dejan caer
• Bone meal: Is applied on the block it is facing=• Harina de hueso: Se aplica en el bloque que está enfrentando
• Empty buckets: Are used to collect a liquid source=• Cubos vacíos: Se utilizan para recolectar una fuente líquida
• Filled buckets: Are used to place a liquid source=• Cubos llenos: Se utilizan para colocar una fuente de líquido
@ -20,3 +21,5 @@ Place the dispenser in one of 6 possible directions. The “hole” is where ite
Downwards-Facing Dispenser=Dispensador orientado hacia abajo
Upwards-Facing Dispenser=Dispensador orientado hacia arriba
Inventory=Inventario
9 inventory slots=9 ranuras de inventario
Launches item when powered by redstone power=Laza un artículo cuando recibe energía de redstone

View File

@ -125,7 +125,11 @@ local dropperdef = {
local dropnode = minetest.get_node(droppos)
-- Do not drop into solid nodes, unless they are containers
local dropnodedef = minetest.registered_nodes[dropnode.name]
if dropnodedef.walkable and not dropnodedef.groups.container then
if dropnodedef.groups.container == 2 then
-- If they are containers - double down as hopper
mcl_util.hopper_push(pos, droppos)
end
if dropnodedef.walkable then
return
end
local stacks = {}
@ -141,25 +145,18 @@ local dropperdef = {
local dropitem = ItemStack(stack)
dropitem:set_count(1)
local stack_id = stacks[r].stackpos
-- If it's a container, attempt to put it into the container
local dropped = mcl_util.move_item_container(pos, droppos, nil, stack_id)
-- No container?
if not dropped and not dropnodedef.groups.container then
-- Drop item normally
local pos_variation = 100
droppos = vector.offset(droppos,
math.random(-pos_variation, pos_variation) / 1000,
math.random(-pos_variation, pos_variation) / 1000,
math.random(-pos_variation, pos_variation) / 1000
)
local item_entity = minetest.add_item(droppos, dropitem)
local drop_vel = vector.subtract(droppos, pos)
local speed = 3
item_entity:set_velocity(vector.multiply(drop_vel, speed))
stack:take_item()
inv:set_stack("main", stack_id, stack)
end
local pos_variation = 100
droppos = vector.offset(droppos,
math.random(-pos_variation, pos_variation) / 1000,
math.random(-pos_variation, pos_variation) / 1000,
math.random(-pos_variation, pos_variation) / 1000
)
local item_entity = minetest.add_item(droppos, dropitem)
local drop_vel = vector.subtract(droppos, pos)
local speed = 3
item_entity:set_velocity(vector.multiply(drop_vel, speed))
stack:take_item()
inv:set_stack("main", stack_id, stack)
end
end,
rules = mesecon.rules.alldirs,

View File

@ -246,6 +246,15 @@ function mesecon.mergetable(source, dest)
return rval
end
--
function mesecon.join_table(t1, t2)
local rval = mesecon.tablecopy(t2)
for i, v in ipairs(t1) do
table.insert(rval, mesecon.tablecopy(v))
end
return rval
end
function mesecon.register_node(name, spec_common, spec_off, spec_on)
spec_common.drop = spec_common.drop or name .. "_off"
spec_common.on_blast = spec_common.on_blast or mesecon.on_blastnode

View File

@ -108,7 +108,7 @@ function mesecon.register_button(basename, description, texture, recipeitem, sou
if groups_off.material_wood ~= 0 then
longdesc = S("A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.")
else
longdesc = S("A button is a redstone compent which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.", button_timer)
longdesc = S("A button is a redstone component which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.", button_timer)
end
end
@ -211,6 +211,11 @@ function mesecon.register_button(basename, description, texture, recipeitem, sou
output = "mesecons_button:button_"..basename.."_off",
recipe = {{ recipeitem }},
})
if minetest.get_modpath("mesecons_mvps") then
mesecon.register_mvps_unsticky("mesecons_button:button_"..basename.."_off")
mesecon.register_mvps_unsticky("mesecons_button:button_"..basename.."_on")
end
end
mesecon.register_button(

View File

@ -17,3 +17,4 @@ A wooden button is a redstone component made out of wood which can be pushed to
Provides redstone power when pushed=Fournit une puissance de redstone lorsqu'il est poussé
Push duration: @1s=Durée de poussée : @1s
Pushable by arrow=Poussable par une flèche
A button is a redstone component which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.=Un bouton est un composant redstone qui peut être poussé afin de fournir de la puissance redstone. Lorsqu'il est poussé, il fournit de la puissance redstone pendant @1 seconde.

View File

@ -17,4 +17,4 @@ A wooden button is a redstone component made out of wood which can be pushed to
Provides redstone power when pushed=Выдаёт сигнал редстоуна при нажатии
Push duration: @1s=Длительность нажатия: @1с
Pushable by arrow=Нажимается стрелами
A button is a redstone compent which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.=Кнопка это компонент редстоуна, её можно нажать, чтобы получить сигнал редстоуна. При нажатии она включает соседние компоненты редстоуна на @1 с.
A button is a redstone component which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.=Кнопка это компонент редстоуна, её можно нажать, чтобы получить сигнал редстоуна. При нажатии она включает соседние компоненты редстоуна на @1 с.

View File

@ -17,4 +17,4 @@ A wooden button is a redstone component made out of wood which can be pushed to
Provides redstone power when pushed=
Push duration: @1s=
Pushable by arrow=
A button is a redstone compent which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.=
A button is a redstone component which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.=

View File

@ -1,3 +1,4 @@
# textdomain: mesecons_lightstone
Redstone Lamp=Lámpara de redstone
Redstone lamps are simple redstone components which glow brightly (light level @1) when they receive redstone power.=Las lámparas Redstone son componentes simples de redstone que brillan intensamente (nivel de luz @ 1) cuando reciben energía de redstone.
Redstone lamps are simple redstone components which glow brightly (light level @1) when they receive redstone power.=Las lámparas de redstone son componentes simples de redstone que brillan intensamente (nivel de luz @1) cuando reciben energía de redstone.
Glows when powered by redstone power=Brilla cuando recibe energía de redstone

View File

@ -117,7 +117,7 @@ local function is_available(pos)
return false, n
end
if minetest.registered_nodes[name] then
return minetest.registered_nodes[name].buildable_to, n or false, n
return minetest.registered_nodes[name].buildable_to or minetest.get_item_group(name, "dig_by_piston") == 1, n or false, n
end
return false, n
end
@ -126,6 +126,7 @@ end
function mesecon.mvps_get_stack(pos, dir, maximum, piston_pos)
-- determine the number of nodes to be pushed
local nodes = {}
local dig_nodes = {}
local frontiers = {pos}
while #frontiers > 0 do
@ -140,47 +141,50 @@ function mesecon.mvps_get_stack(pos, dir, maximum, piston_pos)
return
end
if not node_replaceable(nn.name) then
if #nodes >= maximum then return nil, false end
table.insert(nodes, {node = nn, pos = {x=np.x, y=np.y, z=np.z}})
-- add connected nodes to frontiers, connected is a vector list
-- the vectors must be absolute positions
local connected = {}
local has_loop
if minetest.registered_nodes[nn.name]
and minetest.registered_nodes[nn.name].mvps_sticky then
connected, has_loop = minetest.registered_nodes[nn.name].mvps_sticky(np, nn, piston_pos)
if has_loop then
return {}, true
end
end
table.insert(connected, vector.add(np, dir))
-- Make sure there are no duplicates in frontiers / nodes before
-- adding nodes in "connected" to frontiers
for _, cp in ipairs(connected) do
local duplicate = false
for _, rp in ipairs(nodes) do
if vector.equals(cp, rp.pos) then
duplicate = true
if minetest.get_item_group(nn.name, "dig_by_piston") == 1 then
-- if we want the node to drop, e.g. sugar cane, do not count towards push limit
table.insert(dig_nodes, {node = nn, pos = {x=np.x, y=np.y, z=np.z}})
else
if not node_replaceable(nn.name) then
table.insert(nodes, {node = nn, pos = {x=np.x, y=np.y, z=np.z}})
if #nodes > maximum then return nil, nil, false, true end
-- add connected nodes to frontiers, connected is a vector list
-- the vectors must be absolute positions
local connected = {}
local has_loop
if minetest.registered_nodes[nn.name] and minetest.registered_nodes[nn.name].mvps_sticky then
connected, has_loop = minetest.registered_nodes[nn.name].mvps_sticky(np, nn, piston_pos)
if has_loop then
return {}, {}, true, false
end
end
for _, fp in ipairs(frontiers) do
if vector.equals(cp, fp) then
duplicate = true
table.insert(connected, vector.add(np, dir))
-- Make sure there are no duplicates in frontiers / nodes before
-- adding nodes in "connected" to frontiers
for _, cp in ipairs(connected) do
local duplicate = false
for _, rp in ipairs(nodes) do
if vector.equals(cp, rp.pos) then
duplicate = true
end
end
for _, fp in ipairs(frontiers) do
if vector.equals(cp, fp) then
duplicate = true
end
end
if not duplicate and not mesecon.is_mvps_stopper(minetest.get_node(cp)) and minetest.get_item_group(nn.name, "dig_by_piston") == 0 then
table.insert(frontiers, cp)
end
end
if not duplicate and not mesecon.is_mvps_stopper(minetest.get_node(cp)) then
table.insert(frontiers, cp)
end
end
end
table.remove(frontiers, 1)
end
return nodes, false
return nodes, dig_nodes, false, false
end
function mesecon.mvps_set_owner(pos, placer)
@ -203,6 +207,11 @@ local function are_protected(nodes, player_name)
end
function mesecon.mvps_push(pos, dir, maximum, player_name, piston_pos)
-- check if the node in front of the piston is protected against player_name (to prevent replacing air)
if minetest.is_protected(pos, player_name) then
return false
end
return mesecon.mvps_push_or_pull(pos, dir, dir, maximum, player_name, piston_pos)
end
@ -222,9 +231,9 @@ end
-- movedir: direction of actual movement
-- maximum: maximum nodes to be pushed
function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, player_name, piston_pos)
local nodes, has_loop = mesecon.mvps_get_stack(pos, movedir, maximum, piston_pos)
local nodes, dig_nodes, has_loop, too_many = mesecon.mvps_get_stack(pos, movedir, maximum, piston_pos)
if has_loop then
if has_loop or too_many then
return false
end
@ -237,6 +246,9 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, player_name,
if (newpos[i].x == piston_pos.x) and (newpos[i].y == piston_pos.y) and (newpos[i].z == piston_pos.z) then
return
end
if minetest.is_protected(newpos[i], player_name) then
return
end
if not is_available(newpos[i]) then
local available = false
for j in ipairs(nodes) do
@ -253,18 +265,35 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, player_name,
end
end
if are_protected(nodes, player_name) then
local all_nodes = nodes
if dig_nodes and #dig_nodes > 0 then all_nodes = mesecon.join_table(dig_nodes, nodes) end
if are_protected(all_nodes, player_name) then
return
end
local first_dropper = nil
-- remove all nodes
for id, n in ipairs(nodes) do
for id, n in ipairs(all_nodes) do
n.meta = minetest.get_meta(n.pos):to_table()
local is_dropper = mesecon.is_mvps_dropper(n.node, movedir, nodes, id)
local is_dropper = mesecon.is_mvps_dropper(n.node, movedir, all_nodes, id)
if is_dropper then
--local drops = minetest.get_node_drops(n.node.name, "")
minetest.dig_node(n.pos)
-- if current node has already been destroyed (e.g. chain reaction of sugar cane breaking), skip it
if minetest.get_node(n.pos).name == n.node.name then
-- simulate dig_node using handle_node_drops
local drops = minetest.get_node_drops(n.node.name, "")
local counted_drops = {}
minetest.remove_node(n.pos)
for _, callback in pairs(minetest.registered_on_dignodes) do
callback(n.pos, n)
end
for _, item in ipairs(drops) do
if type(item) ~= "string" then
item = item:get_name() .. item:get_count()
end
table.insert(counted_drops, item)
end
minetest.handle_node_drops(n.pos, counted_drops)
end
else
minetest.remove_node(n.pos)
local node_timer = minetest.get_node_timer(n.pos)
@ -273,13 +302,13 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, player_name,
end
end
if is_dropper then
first_dropper = id
break
-- get id of the first dropper, but we still let everything else drop, so don't break here
if not first_dropper then first_dropper = id end
end
end
-- update mesecons for removed nodes ( has to be done after all nodes have been removed )
for id, n in ipairs(nodes) do
for id, n in ipairs(all_nodes) do
if first_dropper and id >= first_dropper then
break
end
@ -287,7 +316,7 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, player_name,
end
-- add nodes
for id, n in ipairs(nodes) do
for id, n in ipairs(all_nodes) do
if first_dropper and id >= first_dropper then
break
end
@ -394,6 +423,7 @@ mesecon.register_mvps_stopper("mcl_core:realm_barrier")
mesecon.register_mvps_stopper("mcl_core:void")
mesecon.register_mvps_stopper("mcl_core:bedrock")
mesecon.register_mvps_stopper("mcl_core:obsidian")
mesecon.register_mvps_stopper("mcl_core:crying_obsidian")
mesecon.register_mvps_stopper("mcl_chests:ender_chest")
mesecon.register_mvps_stopper("mcl_chests:ender_chest_small")
mesecon.register_mvps_stopper("mcl_mobspawners:spawner")
@ -411,10 +441,9 @@ mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_inverted_on")
mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_inverted_off")
mesecon.register_mvps_stopper("mcl_banners:hanging_banner")
mesecon.register_mvps_stopper("mcl_banners:standing_banner")
mesecon.register_mvps_stopper("mcl_campfires:campfire")
mesecon.register_mvps_stopper("mcl_campfires:campfire_lit")
mesecon.register_mvps_stopper("mcl_campfires:soul_campfire")
mesecon.register_mvps_stopper("mcl_campfires:soul_campfire_lit")
mesecon.register_mvps_stopper("mcl_beehives:bee_nest")
mesecon.register_mvps_stopper("mcl_beehives:beehive")
mesecon.register_mvps_stopper("mcl_compass:lodestone")
-- Unmovable by technical restrictions.
-- Open formspec would screw up if node is destroyed (minor problem)
@ -445,13 +474,14 @@ mesecon.register_mvps_stopper("mcl_chests:trapped_chest")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_small")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_left")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_right")
mesecon.register_mvps_stopper("mcl_signs:wall_sign")
mesecon.register_mvps_stopper("mcl_signs:standing_sign")
mesecon.register_mvps_stopper("mcl_signs:standing_sign22_5")
mesecon.register_mvps_stopper("mcl_signs:standing_sign45")
mesecon.register_mvps_stopper("mcl_signs:standing_sign67_5")
mesecon.register_mvps_stopper("mcl_barrels:barrel_open")
mesecon.register_mvps_stopper("mcl_barrels:barrel_closed")
mesecon.register_mvps_stopper("mcl_campfires:campfire")
mesecon.register_mvps_stopper("mcl_campfires:campfire_lit")
mesecon.register_mvps_stopper("mcl_campfires:soul_campfire")
mesecon.register_mvps_stopper("mcl_campfires:soul_campfire_lit")
mesecon.register_mvps_stopper("mcl_lectern:lectern")
mesecon.register_mvps_stopper("mcl_grindstone:grindstone")
-- Unmovable by design: objects
@ -495,8 +525,6 @@ mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_2")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_3")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_door")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_trapdoor")
mesecon.register_mvps_unsticky("mcl_signs:wall_sign_bamboo")
mesecon.register_mvps_unsticky("mcl_bamboo:scaffolding")
-- Beds
@ -532,21 +560,6 @@ mesecon.register_mvps_unsticky("mcl_beds:bed_white_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_white_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_yellow_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_yellow_bottom")
-- Buttons
mesecon.register_mvps_unsticky("mesecons_button:button_stone_off")
mesecon.register_mvps_unsticky("mesecons_button:button_stone_on")
mesecon.register_mvps_unsticky("mesecons_button:button_wood_off")
mesecon.register_mvps_unsticky("mesecons_button:button_wood_on")
mesecon.register_mvps_unsticky("mesecons_button:button_acaciawood_off")
mesecon.register_mvps_unsticky("mesecons_button:button_acaciawood_on")
mesecon.register_mvps_unsticky("mesecons_button:button_birchwood_off")
mesecon.register_mvps_unsticky("mesecons_button:button_birchwood_on")
mesecon.register_mvps_unsticky("mesecons_button:button_darkwood_off")
mesecon.register_mvps_unsticky("mesecons_button:button_darkwood_on")
mesecon.register_mvps_unsticky("mesecons_button:button_sprucewood_off")
mesecon.register_mvps_unsticky("mesecons_button:button_sprucewood_on")
mesecon.register_mvps_unsticky("mesecons_button:button_junglewood_off")
mesecon.register_mvps_unsticky("mesecons_button:button_junglewood_on")
-- Cactus, Sugarcane & Vines
mesecon.register_mvps_unsticky("mcl_core:cactus")
mesecon.register_mvps_unsticky("mcl_core:reeds")
@ -559,23 +572,6 @@ mesecon.register_mvps_unsticky("mcl_cake:cake_4")
mesecon.register_mvps_unsticky("mcl_cake:cake_5")
mesecon.register_mvps_unsticky("mcl_cake:cake_6")
mesecon.register_mvps_unsticky("mcl_cake:cake")
-- Carpet
mesecon.register_mvps_unsticky("mcl_wool:black_carpet")
mesecon.register_mvps_unsticky("mcl_wool:blue_carpet")
mesecon.register_mvps_unsticky("mcl_wool:brown_carpet")
mesecon.register_mvps_unsticky("mcl_wool:cyan_carpet")
mesecon.register_mvps_unsticky("mcl_wool:green_carpet")
mesecon.register_mvps_unsticky("mcl_wool:grey_carpet")
mesecon.register_mvps_unsticky("mcl_wool:light_blue_carpet")
mesecon.register_mvps_unsticky("mcl_wool:lime_carpet")
mesecon.register_mvps_unsticky("mcl_wool:orange_carpet")
mesecon.register_mvps_unsticky("mcl_wool:magenta_carpet")
mesecon.register_mvps_unsticky("mcl_wool:pink_carpet")
mesecon.register_mvps_unsticky("mcl_wool:purple_carpet")
mesecon.register_mvps_unsticky("mcl_wool:red_carpet")
mesecon.register_mvps_unsticky("mcl_wool:silver_carpet")
mesecon.register_mvps_unsticky("mcl_wool:white_carpet")
mesecon.register_mvps_unsticky("mcl_wool:yellow_carpet")
-- Carved & Jack O'Lantern Pumpkins, Pumpkin & Melon
mesecon.register_mvps_unsticky("mcl_farming:pumpkin_face")
mesecon.register_mvps_unsticky("mcl_farming:pumpkin_face_light")
@ -907,16 +903,16 @@ mesecon.register_mvps_unsticky("mcl_chests:black_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:blue_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:brown_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:cyan_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:dark_green_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:dark_grey_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:lightblue_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:green_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:grey_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:light_blue_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:lime_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:orange_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:magenta_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:pink_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:purple_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:violet_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:red_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:silver_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:grey_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:white_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:yellow_shulker_box_small")
-- Snow

View File

@ -152,8 +152,6 @@ function mesecon.noteblock_play(pos, param2)
soundname="mesecons_noteblock_xylophone_metal"
elseif block_below_name == "mcl_nether:soul_sand" then
soundname="mesecons_noteblock_cowbell"
elseif block_below_name == "mcl_farming:pumpkin" or block_below_name == "mcl_farming:pumpkin_face" or block_below_name == "mcl_farming:pumpkin_face_light" then
soundname="mesecons_noteblock_didgeridoo"
elseif block_below_name == "mcl_core:emeraldblock" then
soundname="mesecons_noteblock_squarewave"
elseif block_below_name == "mcl_farming:hay_block" then
@ -162,6 +160,8 @@ function mesecon.noteblock_play(pos, param2)
soundname="mesecons_noteblock_piano_digital"
elseif minetest.get_item_group(block_below_name, "wool") ~= 0 then
soundname="mesecons_noteblock_guitar"
elseif minetest.get_item_group(block_below_name, "pumpkin") ~= 0 then
soundname="mesecons_noteblock_didgeridoo"
elseif minetest.get_item_group(block_below_name, "material_glass") ~= 0 then
soundname="mesecons_noteblock_hit"
elseif minetest.get_item_group(block_below_name, "material_wood") ~= 0 then

View File

@ -138,14 +138,12 @@ local function piston_off(pos, node)
end
local function piston_orientate(pos, placer)
mesecon.mvps_set_owner(pos, placer)
-- not placed by player
if not placer then return end
-- placer pitch in degrees
local pitch = placer:get_look_vertical() * (180 / math.pi)
local node = minetest.get_node(pos)
local pistonspec = minetest.registered_nodes[node.name].mesecons_piston
if pitch > 55 then
@ -153,6 +151,9 @@ local function piston_orientate(pos, placer)
elseif pitch < -55 then
minetest.add_node(pos, {name=pistonspec.piston_down})
end
-- set owner meta after setting node, or it will not keep
mesecon.mvps_set_owner(pos, placer)
end

85
mods/ITEMS/mcl_armor/api.lua Normal file → Executable file
View File

@ -85,6 +85,31 @@ function mcl_armor.equip_on_use(itemstack, player, pointed_thing)
return mcl_armor.equip(itemstack, player)
end
local function get_armor_texture(textures, name, modname, itemname, itemstring)
local core_texture = textures[name] or modname .. "_" .. itemname .. ".png"
if type(core_texture) == "function" then return core_texture end
mcl_armor.trims.core_textures[itemstring] = core_texture
local func = function(obj, itemstack)
local overlay = itemstack:get_meta():get_string("mcl_armor:trim_overlay")
local core_armor_texture
local stack_name = mcl_grindstone.remove_enchant_name(itemstack) -- gets original itemstring if enchanted, no need to store (nearly) identical values
local core_armor_texture = mcl_armor.trims.core_textures[stack_name]
if mcl_enchanting.is_enchanted(itemstack:get_name()) then -- working with the original stack to know wether to apply enchanting overlay or not
-- Far, Far in the future we may no longer _enchanted itemstrings...
-- To fix this code, simply put the unmodified itemstring in stack_name's place
-- DO NOT REMOVE THIS if UNLESS YOU KNOW WHAT YOU'RE TRYING TO ACHIEVE!
core_armor_texture = core_armor_texture .. mcl_enchanting.overlay
end
if overlay == "" then return core_armor_texture end -- key not present; armor not trimmed
return core_armor_texture .. overlay
end
return func
end
function mcl_armor.register_set(def)
local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname)
@ -136,7 +161,7 @@ function mcl_armor.register_set(def)
_on_unequip = on_unequip_callbacks[name] or def.on_unequip,
_on_break = on_break_callbacks[name] or def.on_break,
_mcl_armor_element = name,
_mcl_armor_texture = textures[name] or modname .. "_" .. itemname .. ".png",
_mcl_armor_texture = get_armor_texture(textures, name, modname, itemname, itemstring),
_mcl_upgradable = def._mcl_upgradable,
_mcl_upgrade_item = upgrade_item
})
@ -257,3 +282,61 @@ function mcl_armor.update(obj)
end
end
function mcl_armor.trim(itemstack, overlay, color_string)
local def = itemstack:get_definition()
if not def._mcl_armor_texture and not mcl_armor.trims.blacklisted[itemstack:get_name()] then return end
local meta = itemstack:get_meta()
local piece_overlay = overlay
local inv_overlay = ""
local piece_type = def._mcl_armor_element
if piece_type == "head" then --helmet
inv_overlay = "^(helmet_trim.png"
piece_overlay = piece_overlay .. "_helmet"
elseif piece_type == "torso" then --chestplate
inv_overlay = "^(chestplate_trim.png"
piece_overlay = piece_overlay .. "_chestplate"
elseif piece_type == "legs" then --leggings
inv_overlay = "^(leggings_trim.png"
piece_overlay = piece_overlay .. "_leggings"
elseif piece_type == "feet" then --boots
inv_overlay = "^(boots_trim.png"
piece_overlay = piece_overlay .. "_boots"
end
local color = mcl_armor.trims.colors[color_string]
inv_overlay = inv_overlay .. "^[colorize:" .. color .. ":150)"
piece_overlay = piece_overlay .. ".png"
piece_overlay = "^(" .. piece_overlay .. "^[colorize:" .. color .. ":150)"
meta:set_string("mcl_armor:trim_overlay" , piece_overlay) -- set textures to render on the player, will work for clients below 5.8 as well
meta:set_string("mcl_armor:inv", inv_overlay) -- make 5.8+ clients display the fancy inv image, older ones will see no change in the *inventory* image
meta:set_string("inventory_image", def.inventory_image .. inv_overlay) -- dont use reload_inv_image as it's a one liner in this enviorment
end
function mcl_armor.reload_trim_inv_image(itemstack)
local meta = itemstack:get_meta()
local inv_overlay = meta:get_string("mcl_armor:inv")
local def = itemstack:get_definition()
if inv_overlay == "" then return end
meta:set_string("inventory_image", def.inventory_image .. inv_overlay)
end
tt.register_snippet(function(itemstring, toolcaps, stack)
if not stack then return nil end
local meta = stack:get_meta()
if not mcl_armor.is_trimmed(stack) then return nil end
-- we need to get the part of the overlay image between the overlay begin ( and the trim name end _
-- we COULD easily store this info in meta, but that would bloat the meta storage, as the same few values would be stored over and over again on every trimmed item
-- this is fine here as this code gets only executed when you put armor and a trim in a smithing table
local full_overlay = meta:get_string("mcl_armor:trim_overlay")
local trim_name = full_overlay:match("%((.-)%_")
return "Upgrade:\n " .. trim_name:gsub("^%l", string.upper) .. " Armor Trim"
end)
function mcl_armor.is_trimmed(itemstack)
-- this meta value will be there for every trimmed armor piece
-- remember, get_string returns "" if the key doesn't exist
return itemstack:get_meta():get_string("mcl_armor:trim_overlay") ~= ""
end

View File

@ -57,6 +57,12 @@ mcl_armor = {
}
},
player_view_range_factors = {},
trims = {
core_textures = {},
blacklisted = {["mcl_armor:elytra"]=true, ["mcl_armor:elytra_enchanted"]=true},
overlays = {"sentry","dune","coast","wild","tide","ward","vex","rib","snout","eye","spire","silence","wayfinder"},
colors = {["amethyst"]="#8246a5",["gold"]="#ce9627",["emerald"]="#1b9958",["copper"]="#c36447",["diamond"]="#5faed8",["iron"]="#938e88",["lapis"]="#1c306b",["netherite"]="#302a26",["quartz"]="#c9bcb9",["redstone"]="#af2c23"},
},
}
local modpath = minetest.get_modpath("mcl_armor")
@ -66,3 +72,4 @@ dofile(modpath .. "/player.lua")
dofile(modpath .. "/damage.lua")
dofile(modpath .. "/register.lua")
dofile(modpath .. "/alias.lua")
dofile(modpath .. "/trims.lua")

View File

@ -21,3 +21,6 @@ Iron Boots=Eisenstiefel
Golden Boots=Goldstiefel
Diamond Boots=Diamantstiefel
Chain Boots=Kettenstiefel
Smithing Template '@1'=Schiedevorlage '@1'

View File

@ -47,4 +47,5 @@ Thorns=Épines
Reflects some of the damage taken when hit, at the cost of reducing durability with each proc.=Reflète une partie des dégâts subis lors de la frappe, au prix d'une réduction de la durabilité à chaque déclenchement.
Aqua Affinity=Affinité aquatique
#Translations for armor trims
Smithing Template '@1'=Modèle à forger '@1'

View File

@ -45,4 +45,7 @@ Protection=
Reduces most types of damage by 4% for each level.=
Thorns=
Reflects some of the damage taken when hit, at the cost of reducing durability with each proc.=
Aqua Affinity=
Aqua Affinity=
#Translations for armor trims
Smithing Template '@1'=

View File

@ -1,5 +1,5 @@
name = mcl_armor
author = stu
description = Adds craftable armor that is visible to other players.
depends = mcl_core, mcl_player, mcl_enchanting, mcl_damage
depends = mcl_core, mcl_player, mcl_enchanting, mcl_damage, mcl_grindstone
optional_depends = mcl_fire, ethereal, bakedclay

View File

@ -0,0 +1,64 @@
local mod_registername = minetest.get_current_modname() .. ":"
local S = minetest.get_translator(minetest.get_current_modname())
for _, template_name in pairs(mcl_armor.trims.overlays) do
minetest.register_craftitem(mod_registername .. template_name, {
description = S("Smithing Template '@1'", template_name),
inventory_image = template_name .. "_armor_trim_smithing_template.png",
})
minetest.register_craft({
output = mod_registername .. template_name .. " 2",
recipe = {
{"mcl_core:diamond",mod_registername .. template_name,"mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:cobble","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})
end
--temp craft recipies, missing structures
minetest.register_craft({
output = mod_registername .. "eye",
recipe = {
{"mcl_core:diamond","mcl_end:ender_eye","mcl_core:diamond"},
{"mcl_core:diamond","mcl_end:ender_eye","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})
minetest.register_craft({
output = mod_registername .. "ward",
recipe = {
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:apple_gold_enchanted","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})
minetest.register_craft({
output = mod_registername .. "snout",
recipe = {
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:goldblock","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})
minetest.register_craft({
output = mod_registername .. "silence",
recipe = {
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
{"mcl_core:diamond", mod_registername.."ward","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})
minetest.register_craft({
output = mod_registername .. "wayfinder",
recipe = {
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
{"mcl_core:diamond", "mcl_maps:empty_map","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})

View File

@ -3,7 +3,7 @@ mcl_bamboo
This mod adds working, familiar bamboo nodes to your Mineclone 2 world.
Code: MineClone2 dev team. Original (basic) bamboo code by: Small Joker.
Code: Michieal. Original (basic, used as inspiration) bamboo code by: Small Joker. Updates to the code: Mineclone Dev Team, Michieal.
License for code: GPLv3.
License for images / textures: CC-BY-SA except where noted.

View File

@ -86,6 +86,11 @@ local bamboo_def = {
on_rotate = on_rotate,
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing then
return itemstack
end
if pointed_thing.type ~= "node" then
return itemstack
end
@ -201,7 +206,7 @@ local bamboo_def = {
local node_above_name = minetest.get_node(pointed_thing.above).name
mcl_bamboo.mcl_log("\n\n\nnode_above name: " .. node_above_name)
if node_above_name ~= "mcl_core:water_source" and node_above_name ~= "mcl_core:lava_source"
and node_above_name ~= "mcl_nether:nether_lava_source" then
and node_above_name ~= "mcl_nether:nether_lava_source" then
local _, position = minetest.item_place(place_item, placer, pointed_thing, fdir)
if position then
if not minetest.is_creative_enabled(placer:get_player_name()) then
@ -246,7 +251,7 @@ local bamboo_def = {
minetest.register_node(BAMBOO, bamboo_def)
local bamboo_top = table.copy(bamboo_def)
bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3}
bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, dig_by_piston = 1, plant = 1, non_mycelium_plant = 1, flammable = 3}
bamboo_top.tiles = {"mcl_bamboo_endcap.png"}
bamboo_top.drawtype = "plantlike_rooted" --"plantlike"
--bamboo_top.paramtype2 = "meshoptions"
@ -276,6 +281,13 @@ local bamboo_block_def = {
_mcl_hardness = 2,
_mcl_stripped_variant = "mcl_bamboo:bamboo_block_stripped", -- this allows us to use the built in Axe's strip block.
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing then
return itemstack
end
if pointed_thing.type ~= "node" then -- make sure that pointed_thing is not null and is pointing at a node.
return itemstack
end
local pos = pointed_thing.under
@ -349,7 +361,7 @@ bamboo_one_def.selection_box = {
{-0.05, -0.5, 0.285, -0.275, 0.5, 0.06},
}
}
bamboo_one_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3}
bamboo_one_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, dig_by_piston = 1, plant = 1, non_mycelium_plant = 1, flammable = 3}
mcl_bamboo.mcl_log(dump(mcl_bamboo.bamboo_index))
minetest.register_node(mcl_bamboo.bamboo_index[2], bamboo_one_def)
local bamboo_two_def = table.copy(bamboo_def)
@ -373,7 +385,7 @@ bamboo_two_def.selection_box = {
{0.25, -0.5, 0.325, 0.025, 0.5, 0.100},
}
}
bamboo_two_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3}
bamboo_two_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, dig_by_piston = 1, plant = 1, non_mycelium_plant = 1, flammable = 3}
minetest.register_node(mcl_bamboo.bamboo_index[3], bamboo_two_def)
local bamboo_three_def = table.copy(bamboo_def)
@ -396,5 +408,5 @@ bamboo_three_def.selection_box = {
{-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125},
}
}
bamboo_three_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3}
bamboo_three_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, dig_by_piston = 1, plant = 1, non_mycelium_plant = 1, flammable = 3}
minetest.register_node(mcl_bamboo.bamboo_index[4], bamboo_three_def)

View File

@ -192,10 +192,23 @@ if minetest.get_modpath("mcl_fences") then
local wood_groups = { handy = 1, axey = 1, flammable = 2, fence_wood = 1, fire_encouragement = 5, fire_flammability = 20 }
local wood_connect = { "group:fence_wood" }
local fence_id = mcl_fences.register_fence(id, S("Bamboo Fence"), "mcl_bamboo_fence_bamboo.png", wood_groups,
2, 15, wood_connect, node_sound)
local gate_id = mcl_fences.register_fence_gate(id, S("Bamboo Fence Gate"), "mcl_bamboo_fence_gate_bamboo.png",
wood_groups, 2, 15, node_sound) -- note: about missing params.. will use defaults.
local fence_id = mcl_fences.register_fence(
id,
S("Bamboo Fence"),
"mcl_bamboo_fence_bamboo.png",
wood_groups,
minetest.registered_nodes["mcl_core:wood"]._mcl_hardness,
minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance,
wood_connect, node_sound)
local gate_id = mcl_fences.register_fence_gate(
id,
S("Bamboo Fence Gate"),
"mcl_bamboo_fence_gate_bamboo.png",
wood_groups,
minetest.registered_nodes["mcl_core:wood"]._mcl_hardness,
minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance,
node_sound) -- note: about missing params.. will use defaults.
mcl_bamboo.mcl_log(dump(fence_id))
mcl_bamboo.mcl_log(dump(gate_id))

View File

@ -67,7 +67,7 @@ end
local BAMBOO_ENDCAP_NAME = "mcl_bamboo:bamboo_endcap"
-- For when I learn more about the pistons...
-- check if supporting block is broken. pistons now break the bamboo plant.
function mcl_bamboo.break_orphaned(pos)
mcl_bamboo.mcl_log("Break_Orphaned called.")
local node_below = minetest.get_node(vector.offset(pos, 0, -1, 0))

View File

@ -24,6 +24,7 @@ Bamboo Mosaic Stair=Escalier mosaïque de bambou
Bamboo Plank Slab=Dalle de planches de bambou
Bamboo Plank Stair=Escalier de planches de bambou
Bamboo Pressure Plate=Plaque de pression de bambou
Bamboo Sign=Panneau de bambou
Bamboo Slab=Dalle de bambou
Bamboo Stair=Escalier de bambou
Bamboo Trapdoor=Trappe de bambou

View File

@ -76,3 +76,4 @@ You can copy the pattern of a banner by placing two banners of the same color in
And one additional layer=Et une couche supplémentaire
And @1 additional layers=Et @1 couches supplémentaires
Paintable decoration=Décoration à peindre
Preview Banner=Aperçu de la bannière

View File

@ -383,6 +383,15 @@ function mcl_beds.on_rightclick(pos, player, is_top)
end
if message then
mcl_title.set(player, "actionbar", {text=message, color="white", stay=60})
else -- someone just successfully entered a bed
local connected_players = minetest.get_connected_players()
local sleep_hud_message = S("@1/@2 players currently in bed.", player_in_bed, math.ceil(players_in_bed_setting() * #connected_players / 100))
for _, player in pairs(connected_players) do
if not mcl_beds.player[player:get_player_name()] then -- only send message to players not sleeping.
if mcl_title.params_get(player) then mcl_title.clear(player) end -- clear, old message is still being displayed
mcl_title.set(player, "actionbar", {text=sleep_hud_message, color="white", stay=60})
end
end
end
else
lay_down(player, nil, nil, false)

View File

@ -46,4 +46,5 @@ send!=senden!
You are missing the 'shout' privilege! It's required in order to talk in chat...=Ihnen fehlt das 'shout' Privileg! Es wird benötigt, um im Chat reden zu können...
You exceeded the maximum number of messages per 10 seconds!=Sie haben die maximale Anzahl an Chatnachrichten pro 10 Sekunden überschritten!
Hey! Would you guys mind sleeping?=Hey, würdet Ihr bitte zu Bett gehen?
Sorry, but you have to wait @1 seconds until you may use this button again!=Sie müssen leider noch @1 Sekunden warten, bevor sie diesen Knopf erneut benutzen können!
Sorry, but you have to wait @1 seconds until you may use this button again!=Sie müssen leider noch @1 Sekunden warten, bevor sie diesen Knopf erneut benutzen können!
@1/@2 players currently in bed.=@1/@2 Spieler aktuell im Bett.

View File

@ -41,3 +41,9 @@ You will fall asleep when @1% of all players are in bed.=Vous vous endormirez lo
You're in bed.=Tu es au lit.
Allows you to sleep=Vous permet de dormir
Respawn Anchor=Ancre de réapparition
Chat:=Discussion
send!=envoyé !
You are missing the 'shout' privilege! It's required in order to talk in chat...=Il vous manque le privilège 'shout' ! C'est indispensable pour participer à la discussion...
You exceeded the maximum number of messages per 10 seconds!=Vous avez dépassé le nombre maximal de message par 10 secondes !
Hey! Would you guys mind sleeping?=Eh, vous ne voulez pas dormir ?
Sorry, but you have to wait @1 seconds until you may use this button again!=Désolé, mais il faut attendre @1 seconde avant de réutiliser ce bouton !

View File

@ -46,4 +46,5 @@ send!=
You are missing the 'shout' privilege! It's required in order to talk in chat...=
You exceeded the maximum number of messages per 10 seconds!=
Hey! Would you guys mind sleeping?=
Sorry, but you have to wait @1 seconds until you may use this button again!=
Sorry, but you have to wait @1 seconds until you may use this button again!=
@1/@2 players currently in bed.=

View File

@ -33,7 +33,7 @@ minetest.register_node("mcl_bells:bell", {
"mcl_bells_bell_side.png",
},
is_ground_content = false,
groups = {pickaxey=2, deco_block=1 },
groups = {pickaxey=2, deco_block=1, dig_by_piston=1 },
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 5,
_mcl_hardness = 5,

View File

@ -193,13 +193,51 @@ minetest.registered_nodes["mcl_fire:fire"].on_construct=function(pos)
end
--slabs/stairs
mcl_stairs.register_stair_and_slab_simple("blackstone", "mcl_blackstone:blackstone", S("Blackstone Stair"), S("Blackstone Slab"), S("Double Blackstone Slab"))
mcl_stairs.register_stair_and_slab_simple("blackstone_polished", "mcl_blackstone:blackstone_polished", S("Polished Blackstone Stair"), S("Polished Blackstone Slab"), S("Polished Double Blackstone Slab"))
mcl_stairs.register_stair_and_slab_simple("blackstone_chiseled_polished", "mcl_blackstone:blackstone_chiseled_polished", S("Chiseled Polished Blackstone Stair"), S("Chiseled Polished Blackstone Slab"), S("Double Chiseled Polished Blackstone Slab"))
mcl_stairs.register_stair_and_slab_simple("blackstone_brick_polished", "mcl_blackstone:blackstone_brick_polished", S("Polished Blackstone Brick Stair"), S("Polished Blackstone Brick Slab"), S("Double Polished Blackstone Brick Slab"))
mcl_stairs.register_stair_and_slab("blackstone", "mcl_blackstone:blackstone",
{cracky=3, pickaxey=1, material_stone=1},
{"mcl_blackstone_top.png", "mcl_blackstone_top.png", "mcl_blackstone_side.png"},
S("Blackstone Stairs"),
S("Blackstone Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Blackstone Slab"), nil)
mcl_stairs.register_stair_and_slab("blackstone_polished", "mcl_blackstone:blackstone_polished",
{cracky=3, pickaxey=1, material_stone=1},
{"mcl_blackstone_polished.png"},
S("Polished Blackstone Stairs"),
S("Polished Blackstone Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Polished Blackstone Slab"), nil)
mcl_stairs.register_stair_and_slab("blackstone_chiseled_polished", "mcl_blackstone:blackstone_chiseled_polished",
{cracky=3, pickaxey=1, material_stone=1},
{"mcl_blackstone_chiseled_polished.png"},
S("Chiseled Polished Blackstone Stairs"),
S("Chiseled Polished Blackstone Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Chiseled Polished Blackstone Slab"), nil)
mcl_stairs.register_stair_and_slab("blackstone_brick_polished", "mcl_blackstone:blackstone_brick_polished",
{cracky=3, pickaxey=1, material_stone=1},
{"mcl_blackstone_polished_bricks.png"},
S("Polished Blackstone Brick Stair Stairs"),
S("Polished Blackstone Brick Stair Slab"),
mcl_sounds.node_sound_stone_defaults(), 6, 2,
S("Double Polished Blackstone Brick Stair Slab"), nil)
--Wall
mcl_walls.register_wall("mcl_blackstone:wall", S("Blackstone Wall"), "mcl_blackstone:blackstone")
mcl_walls.register_wall(
"mcl_blackstone:wall",
S("Blackstone Wall"),
"mcl_blackstone:blackstone",
{
"mcl_blackstone_top.png",
"mcl_blackstone_top.png",
"mcl_blackstone_side.png"
},
"",
{ cracky=3, pickaxey=1, material_stone=1 }
)
--lavacooling
@ -362,3 +400,10 @@ minetest.register_craft({
{ "group:soul_block" },
}
})
-- stonecutter recipes
mcl_stonecutter.register_recipe("mcl_blackstone:basalt", "mcl_blackstone:basalt_polished")
mcl_stonecutter.register_recipe("mcl_blackstone:blackstone", "mcl_blackstone:blackstone_polished")
mcl_stonecutter.register_recipe("mcl_blackstone:blackstone_polished", "mcl_blackstone:blackstone_chiseled_polished")
mcl_stonecutter.register_recipe("mcl_blackstone:blackstone_polished", "mcl_blackstone:blackstone_brick_polished")
mcl_stonecutter.register_recipe("mcl_nether:quartz_block", "mcl_blackstone:quartz_brick")

View File

@ -1,3 +1,3 @@
name = mcl_blackstone
author = debian044
depends = mcl_core, screwdriver, mcl_stairs, mclx_stairs, mcl_walls, mclx_fences, mcl_torches, mcl_fire
depends = mcl_core, screwdriver, mcl_stairs, mclx_stairs, mcl_walls, mclx_fences, mcl_torches, mcl_fire, mcl_stonecutter, mcl_nether

View File

@ -453,7 +453,7 @@ minetest.register_node("mcl_blast_furnace:blast_furnace", {
"blast_furnace_side.png", "blast_furnace_front.png"
},
paramtype2 = "facedir",
groups = { pickaxey = 1, container = 4, deco_block = 1, material_stone = 1 },
groups = { pickaxey = 1, container = 2, deco_block = 1, material_stone = 1 },
is_ground_content = false,
sounds = mcl_sounds.node_sound_stone_defaults(),
@ -514,6 +514,11 @@ minetest.register_node("mcl_blast_furnace:blast_furnace", {
_mcl_blast_resistance = 3.5,
_mcl_hardness = 3.5,
on_rotate = on_rotate,
_mcl_hoppers_on_try_pull = mcl_furnaces.hoppers_on_try_pull,
_mcl_hoppers_on_try_push = mcl_furnaces.hoppers_on_try_push,
_mcl_hoppers_on_after_push = function(pos)
minetest.get_node_timer(pos):start(1.0)
end,
})
minetest.register_node("mcl_blast_furnace:blast_furnace_active", {
@ -531,7 +536,7 @@ minetest.register_node("mcl_blast_furnace:blast_furnace_active", {
paramtype = "light",
light_source = LIGHT_ACTIVE_FURNACE,
drop = "mcl_blast_furnace:blast_furnace",
groups = { pickaxey = 1, container = 4, deco_block = 1, not_in_creative_inventory = 1, material_stone = 1 },
groups = { pickaxey = 1, container = 2, deco_block = 1, not_in_creative_inventory = 1, material_stone = 1 },
is_ground_content = false,
sounds = mcl_sounds.node_sound_stone_defaults(),
on_timer = blast_furnace_node_timer,
@ -574,6 +579,8 @@ minetest.register_node("mcl_blast_furnace:blast_furnace_active", {
_mcl_hardness = 3.5,
on_rotate = on_rotate,
after_rotate = after_rotate_active,
_mcl_hoppers_on_try_pull = mcl_furnaces.hoppers_on_try_pull,
_mcl_hoppers_on_try_push = mcl_furnaces.hoppers_on_try_push,
})
minetest.register_craft({

View File

@ -438,7 +438,7 @@ minetest.register_node("mcl_books:bookshelf", {
flammable = 3,
fire_encouragement = 30,
fire_flammability = 20,
container = 1
container = 2
},
drop = "mcl_books:book 3",
sounds = wood_sound,
@ -472,6 +472,12 @@ minetest.register_node("mcl_books:bookshelf", {
on_blast = on_blast,
on_rightclick = bookshelf_gui,
on_destruct = close_forms,
_mcl_hoppers_on_try_push = function(pos, hop_pos, hop_inv, hop_list)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
return inv, "main", mcl_util.select_stack(hop_inv, hop_list, inv, "main",
function(stack) return minetest.get_item_group(stack:get_name(), "book") == 1 or stack:get_name() == "mcl_enchanting:book_enchanted" end)
end,
})
minetest.register_craft({

View File

@ -48,7 +48,7 @@ function mcl_bows.shoot_arrow(arrow_item, pos, dir, yaw, shooter, power, damage,
damage = damage + (enchantments.power + 1) / 4
end
if enchantments.punch then
knockback = enchantments.punch * 3
knockback = enchantments.punch * 21
end
if enchantments.flame then
mcl_burning.set_on_fire(obj, math.huge)

View File

@ -11,7 +11,7 @@ To use the bow, you first need to have at least one arrow anywhere in your inven
Bow=Arco
Ammunition=Munición
Damage from bow: 1-10=Daño con arco: 1-10
Damage from dispenser: 3=Daño por dispendsador: 3
Damage from dispenser: 3=Daño por dispensador: 3
Launches arrows=Lanza flechas
Crossbow=Ballesta
Crossbows are ranged weapons to shoot arrows at your foes.=Las ballestas son armas a distancia para disparar flechas a tus enemigos.

View File

@ -15,4 +15,4 @@ Damage from dispenser: 3=Dégâts du distributeur : 3
Launches arrows=Lance des flèches
Crossbow=Arbalète
Crossbows are ranged weapons to shoot arrows at your foes.=Les arbalètes sont des armes à distance pour tirer des flèches sur vos ennemis.
To use the crossbow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.=Pour utiliser l'arbalète, vous devez d'abord avoir au moins une flèche n'importe où dans votre inventaire (sauf en mode créatif). Maintenez enfoncé le bouton droit de la souris pour charger, relâchez pour tirer.
To use the crossbow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to load an arrow into the chamber, then to shoot press left mouse.=Pour utiliser l'arbalète, vous devez d'abord avoir au moins une flèche n'importe où dans votre inventaire (sauf en mode créatif). Maintenez enfoncé le bouton droit de la souris pour charger, relâchez pour charger la flèche dans la chambre, puis pour tirer cliquez droit.

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