Compare commits

...

141 commits

Author SHA1 Message Date
6a56a2924f Merge remote-tracking branch 'upstream/master' into forkhausen 2020-05-21 08:57:26 +02:00
Wuzzy
95b3b4a172 Add empty smoke_puff.png 2020-05-21 01:54:55 +02:00
Wuzzy
bfd2f0ebc7 Add paintings 2020-05-21 01:51:52 +02:00
Wuzzy
d1d7c026e1 Buckets are no longer liquids_pointable 2020-05-20 21:59:37 +02:00
Wuzzy
7cfef25dfe Fix undeclared global in mcl_minecarts 2020-05-16 20:13:22 +02:00
c6b85fdf93 Merge remote-tracking branch 'upstream/master' into forkhausen 2020-05-14 17:58:13 +02:00
Wuzzy
547080bd98 Add a delay before mobs start to suffocate 2020-05-13 22:15:46 +02:00
MysticTempest
a20637f68c Fix redstone dust climbing up doors, and fix redstone dust not turning off when redstone torch is destroyed through the destruction of an attached block 2020-05-13 21:11:17 +02:00
Wuzzy
1a0e979b0c Update incomplete license information and credits 2020-05-11 17:18:04 +02:00
Wuzzy
b512e16a7b Version 0.65.2 2020-05-10 14:55:46 +02:00
Wuzzy
26b5b45595 Fix crash when creeper explodes 2020-05-10 14:54:43 +02:00
0f7f969d86 update readme 2020-05-09 21:58:05 +02:00
14dbf91ada fix crash when igniting a creeper 2020-05-09 21:56:02 +02:00
f1f1e29d71 Merge remote-tracking branch 'upstream/master' into forkhausen 2020-05-09 21:51:41 +02:00
Wuzzy
b8bd154378 Add translator into credits 2020-05-09 19:06:31 +02:00
Wuzzy
c156398fb5 Merge branch 'translate-fr' of https://git.minetest.land/lrocher/MineClone2 into translate_fr 2020-05-09 18:57:40 +02:00
Wuzzy
728db50baf Fire doesn't destroy flammable=-1 nodes 2020-05-09 18:55:50 +02:00
Wuzzy
621946546b Ignite TNT by fire 2020-05-09 18:52:03 +02:00
Wuzzy
ffcad31871 Update falling nodes when fire replaces a block 2020-05-09 17:53:32 +02:00
Wuzzy
bfb1e3e447 Add age to of fire to greatly limit fire spread 2020-05-09 17:44:23 +02:00
Wuzzy
d13498e6f9 Rain now also extinguishes neighbor tiles 2020-05-09 16:03:07 +02:00
Wuzzy
0c96e512d7 Remove bogus saddle recipe 2020-05-09 00:40:54 +02:00
6f30b57cbe Merge remote-tracking branch 'upstream/master' into forkhausen 2020-05-08 22:57:00 +02:00
Wuzzy
555d21263d Version 0.65.1 2020-05-08 18:06:08 +02:00
Wuzzy
5108f398bb Fix all explosions spawning fire 2020-05-08 18:04:04 +02:00
Wuzzy
2ec66fc61b Fix leaking global in mcl_explosions 2020-05-08 18:01:33 +02:00
Wuzzy
6df30dc0dc Version 0.65.0 2020-05-08 17:59:04 +02:00
Wuzzy
c3578e283c Credit yutyo for logo contribution 2020-05-08 17:56:25 +02:00
yutyo
58013872c2 New MineClone 2 logo 2020-05-08 17:56:10 +02:00
Wuzzy
aeb7a6cb8b Disable guardian spawning 2020-05-08 17:44:27 +02:00
Wuzzy
131051b1df Fix code typo in mcl_playerplus 2020-05-08 17:41:09 +02:00
ad70a71f8c Fix crash when triggering explosion (type check error) 2020-05-08 17:31:41 +02:00
Wuzzy
fb55d33bfe Fix villager crash when trading w/o inited inv 2020-05-08 17:27:22 +02:00
Wuzzy
94c4256451 Fix crash when standing on unknown node 2020-05-08 17:23:39 +02:00
103122866e replace llama decor with textures
use textures from XSSheep's last beta version to be on the safe side
regarding IP
2020-05-07 22:43:46 +02:00
f1df128d0c update readme 2020-05-06 19:49:44 +02:00
96e858644b fix undeclared variable 2020-05-06 19:46:07 +02:00
2407529a00 fix crash when triggering explosions (error in type checking) 2020-05-06 19:20:13 +02:00
ab1dbd33d5 fix use of undeclared global variable 2020-05-06 18:26:59 +02:00
f13366c341 update link to bug tracker; no need to bother Wuzzy with stuff possibly unrelated to his upstream repo 2020-05-06 18:16:21 +02:00
6ba0b77ec8 update readme 2020-05-06 18:12:29 +02:00
112896743e add llama carpets from community pixel perfection texture pack 2020-05-06 18:03:35 +02:00
7b4bd642e6 update readme 2020-05-06 16:41:17 +02:00
3566ef37fa optimize all textures (optipng -o7) 2020-05-06 16:37:18 +02:00
Rocher Laurent
e058ee8487 Fix some template.txt 2020-05-05 21:02:48 +02:00
Rocher Laurent
c9a37d0dbc Translate In French 2020-05-05 21:02:21 +02:00
d32c427c39 Merge remote-tracking branch 'upstream/master' into forkhausen 2020-05-05 14:15:20 +02:00
Wuzzy
8c20dfa5d2 I no longer accept PRs 2020-05-05 02:23:17 +02:00
Wuzzy
2b4a4f8c60 Merge branch 'master' of https://git.minetest.land/Wuzzy/MineClone2 2020-05-05 02:11:52 +02:00
Wuzzy
b59f0d6c6e Merge pull request 'Prevent water mobs to classify solid blocks below them or the medium they are supposed to be in as dangerous' (#685) from Athemis/MineClone2:fix-mobs-dangerous-nodes into master 2020-05-05 00:10:53 +00:00
Rocher Laurent
4957bd1118 Translate In French 2020-05-03 22:39:07 +02:00
e95d8ddf3a magma blocks should be considered dangerous by mobs 2020-05-03 18:01:32 +02:00
f388983b73 prevent water mobs to classify solid blocks below them as dangerous 2020-05-03 17:54:04 +02:00
a4ee8dfdd5 Revert "mcl_mobs: when moving away from dangers, check if destination is dangerous itself"
This reverts commit baaf3e7a13.
2020-05-03 17:53:39 +02:00
effa27bec1 Revert "attempt to fix mobs trapped in water"
This reverts commit 84202237f8.
2020-05-03 17:53:19 +02:00
53cb7d4edb Revert "simplify code and add comments"
This reverts commit 476b36de6d.
2020-05-03 17:53:04 +02:00
beace10136 prevent water mobs to classify solid blocks below them as dangerous 2020-05-03 17:43:44 +02:00
e7503abf55 only spawn non-faced pumpkins on mapgen 2020-05-02 21:04:03 +02:00
476b36de6d simplify code and add comments 2020-05-02 20:39:07 +02:00
84202237f8 attempt to fix mobs trapped in water
check for possible destinations by analyzing a whole set of nodes;
check if air is above those nodes

refactor code; adjust checks for dangerous blocks

performance optimization, remove iteration when looking for safe node

take jump height into account; look for water instead of solid for swimming mobs

remove debug logging
2020-05-02 20:25:39 +02:00
Wuzzy
02b2ff7460 Fix mcl_weather crash 2020-05-02 19:08:55 +02:00
Wuzzy
bc740efafe Add fire explosions 2020-05-02 19:05:56 +02:00
Wuzzy
00acbf8a2a Remove unused TNT functions 2020-05-02 18:51:59 +02:00
Wuzzy
56d484f69b Make mobs and bed use mcl_explosions 2020-05-02 18:50:25 +02:00
Wuzzy
6a576c50a0 Add puncher to tnt_explosions 2020-05-02 18:24:53 +02:00
Wuzzy
d4bc7a2f88 Add back the explosion death msg 2020-05-02 18:09:25 +02:00
313fd79612 update readme 2020-05-01 13:38:23 +02:00
935129d997 update readme 2020-05-01 13:37:14 +02:00
baaf3e7a13 mcl_mobs: when moving away from dangers, check if destination is dangerous itself 2020-05-01 13:32:41 +02:00
d0ac1d7377 magma damages mobs 2020-05-01 11:52:03 +02:00
f28dc7312b update readme 2020-05-01 11:13:14 +02:00
baa7a8c23c Merge remote-tracking branch 'upstream/master' into forkhausen 2020-05-01 11:09:31 +02:00
Wuzzy
7fa8828bd5 Explosions: Use minetest.get_position_from_hash 2020-04-30 21:13:10 +02:00
Wuzzy
026d406d4b Fix indents in mcl_explosions 2020-04-30 21:12:30 +02:00
Wuzzy
679e2b1b70 Explosions: Reduce repeated code 2020-04-30 21:08:42 +02:00
Wuzzy
772ea01aff Explosions: Fix syntax error 2020-04-30 21:00:13 +02:00
Wuzzy
2b5ddbd62d Explosions: Change item drop handler 2020-04-30 20:58:58 +02:00
Wuzzy
9ee0ef5a8d Explosions: Replace some API calls 2020-04-30 20:57:38 +02:00
Wuzzy
58458b2bca mcl_explosions: Rename description.txt 2020-04-30 20:55:49 +02:00
Wuzzy
3087621b11 Merge branch 'mcl_explosions' 2020-04-30 20:55:10 +02:00
Wuzzy
8dd1cf6719 Update Contributing guidelines 2020-04-30 18:25:23 +02:00
Wuzzy
ef20ac54c3 Fix crash when fueling furnace minecart 2020-04-30 18:13:05 +02:00
48e320d907 keep track of changes compared to upstream 2020-04-29 21:34:02 +02:00
1cbebae5b8 fix crash when fueling powered minecarts 2020-04-29 19:02:32 +02:00
a866070bb6 Merge remote-tracking branch '2mac/cart-acceleration' into forkhausen 2020-04-29 18:27:33 +02:00
4343a5d084 register carved pumpkin as node 2020-04-28 17:06:15 +02:00
008969949e change growing pumpkins to be faceless 2020-04-28 16:32:28 +02:00
Wuzzy
eea07f0ce7 Fix incomplete dry grass replacement LBM 2020-04-27 14:05:09 +02:00
Wuzzy
c81a18ac1a Refactor mcl_void_damage 2020-04-22 01:38:41 +02:00
Wuzzy
0929ce4f20 Remove fire below air 2020-04-22 01:31:30 +02:00
Elias Åström
a10dff8421 Use walkable for entity exposure
This makes TNT do full damage under water.
2020-04-19 13:08:36 +02:00
Elias Åström
a62a75c799 Do not drop items in creative mode
It works like this in Minecraft.  This will also reduce lag when playing
with TNT in creative.
2020-04-19 13:08:36 +02:00
Elias Åström
64c767ad8c Make TNT behave like Minecraft
TNT entities are now knocked back by explosions.  When a TNT block
becomes triggered by an explosion, its fuse time is set to a random
value between 0.5 and 1.5 seconds.
2020-04-19 13:08:36 +02:00
Elias Åström
b4ea2afe77 Add tnt_knockback flag for entities
When set to true, entities will be knocked back when affected by TNT
explosions.  Also ignore '__builtin:item' entities to reduce lag, and
replace tabs with spaces in 'mcl_explosions/init.lua'.
2020-04-19 13:08:36 +02:00
Elias Åström
cdea2eeabf Change mcl_mobs to enable knockback in y direction 2020-04-19 13:08:36 +02:00
Elias Åström
92ab90fd1b Add knockback for mobs 2020-04-19 13:08:36 +02:00
Elias Åström
6315490b14 Update the rest of the blast resistance values
The values have been updated according to this list:

https://minecraft.gamepedia.com/Module:Blast_resistance_values
2020-04-19 13:08:36 +02:00
Elias Åström
8d67824e42 Add to list of contributors in README.md 2020-04-19 13:08:36 +02:00
Elias Åström
fd05259202 Make TNT and TNT Minecart use the explosions API
The old api from mcl_tnt is still left in the code, and used by the
mobs.
2020-04-19 13:08:36 +02:00
Elias Åström
ca7c8c23c7 Add entity damage and player knockback
Could not find a way to add knockback to entities.  After adding a
velocity to them they will just slide around indefinitely.  Because of
this, knockback is only enabled on players for now.
2020-04-19 13:08:36 +02:00
Elias Åström
77c95fe8c3 Add particles and sounds from explosions 2020-04-19 13:08:36 +02:00
Wuzzy
e268370452 Add fire metadata to many nodes (unused for now) 2020-04-18 23:24:42 +02:00
Wuzzy
6a77a54034 Increase z_index values to match new convention 2020-04-17 21:27:45 +02:00
Elias Åström
1d5c11f683 Add mcl_explosions for ray traced explosions
Code has been adapted from the Minetest explosions API mod to have
Minecraft-like explosion mechanics and work with MineClone 2.
2020-04-17 20:47:12 +02:00
Elias Åström
063595ac3c Change blast resistance of nodes in mcl_core
The new blast resistance values are copied from the Minecraft wiki.

https://minecraft.gamepedia.com/Explosion
2020-04-17 20:47:12 +02:00
Wuzzy
3803dba233 Fix invalid portal node names in spawn code 2020-04-16 12:39:18 +02:00
Wuzzy
24ab3e8f84 Fix LBM typos 2020-04-16 12:22:50 +02:00
Wuzzy
7c56cf1a64 Update README.md 2020-04-15 16:13:27 +02:00
Wuzzy
1db34821a0 Mobs: Fix crash when mob dies to fall or light dmg 2020-04-12 23:11:18 +02:00
Wuzzy
081366855d Tweak appearance of snowflakes 2020-04-11 04:06:37 +02:00
Wuzzy
ab56d592ae Add snow particles on snowball impact 2020-04-11 04:06:24 +02:00
Wuzzy
a2785041dd Remove mod startup debug messages 2020-04-11 02:56:46 +02:00
Wuzzy
47cda09073 Implement per-class mob cap 2020-04-11 02:46:03 +02:00
Wuzzy
8e06e4e8b2 Reduce mob_specific mob caps 2020-04-11 01:35:44 +02:00
Wuzzy
a33bd015f5 Reduce max_object_per_block default to 64 2020-04-11 01:14:14 +02:00
Wuzzy
0c271a2af9 Randomize initial moon phase 2020-04-08 22:07:05 +02:00
Wuzzy
32ae6b3140 Add moon phases 2020-04-08 21:32:37 +02:00
Wuzzy
868fa04818 Version 0.63.0 2020-04-08 17:23:59 +02:00
Wuzzy
88927c8a6b Remove furnace craftguide btn cuz MT weirdness 2020-04-08 17:23:12 +02:00
Wuzzy
5fe8717fca Fix another crash in Mobs mod 2020-04-08 15:03:03 +02:00
Wuzzy
3bd1cded03 Furnace: Fix output slot image being misplaced 2020-04-08 13:29:27 +02:00
Wuzzy
d9cff3ef82 Make bark nodes usable as fuel 2020-04-08 13:15:22 +02:00
Wuzzy
20eba63b94 Fix bark stairs+slabs being not flammable 2020-04-08 13:08:33 +02:00
Wuzzy
8664a5c484 Make mobs vulnerable to TNT explosions 2020-04-08 12:41:52 +02:00
Wuzzy
71c9d20fff Use larger wield scale for tools 2020-04-08 04:07:16 +02:00
Wuzzy
a1ea41e760 Lava: Don't ignite 2 blocks above if 1 layer above is blocked 2020-04-08 03:17:34 +02:00
Wuzzy
21d5b93baa Remove explicit stepheight from most mobs 2020-04-08 02:35:20 +02:00
Wuzzy
31b367eb83 Fix horse-related crash 2020-04-08 02:29:12 +02:00
Wuzzy
f27615d77e Add z_index to HUD elements 2020-04-07 13:03:10 +02:00
Wuzzy
17f611567c Spawn rain and snow particles higher 2020-04-07 02:41:40 +02:00
Wuzzy
c9cc3651df Fix bad sky color definitions 2020-04-07 01:51:53 +02:00
Wuzzy
c5e4ec5e27 Use ephemeral sounds 2020-04-07 00:55:45 +02:00
Wuzzy
b2c75acd68 Use new set_sky API 2020-04-07 00:39:19 +02:00
Wuzzy
ace1c6dfec Version 0.62.0 2020-04-05 21:10:36 +02:00
Wuzzy
28b1d5e8e9 Mobs: Add more nil checks 2020-04-05 21:09:27 +02:00
Wuzzy
c9b464f329 Add findbiome mod 2020-04-03 12:51:01 +02:00
Wuzzy
b2c8d7cff0 Update biomeinfo to 1.0.3 2020-04-03 12:50:48 +02:00
Wuzzy
d8cb7a7164 Add achievement chat command 2020-03-30 21:11:45 +02:00
Wuzzy
e81b5ef58a Another nil check in mcl_mobs 2020-03-30 16:52:36 +02:00
Wuzzy
600eadedea Add nil checks when mob is damaged 2020-03-29 23:24:04 +02:00
David McMackins II
59b6385d10 Fix bug where powered rails would not accelerate a fueled minecart 2020-03-17 15:00:12 -05:00
838 changed files with 5368 additions and 1144 deletions

View file

@ -5,7 +5,7 @@ Wow, thank you! :-)
But first, some things to note: But first, some things to note:
MineClone 2's development target is to make a free software clone of Minecraft, MineClone 2's development target is to make a free software clone of Minecraft,
***version 1.11*** (later: 1.12), ***PC edition***. ***version 1.11***, ***PC edition***.
MineClone 2 is maintained by one person. Namely, Wuzzy. You can find me, MineClone 2 is maintained by one person. Namely, Wuzzy. You can find me,
Wuzzy, in the Minetest forums (forums.minetest.net), in IRC in the #minetest Wuzzy, in the Minetest forums (forums.minetest.net), in IRC in the #minetest
@ -26,8 +26,8 @@ For small and medium changes:
* Fork the repository * Fork the repository
* Do your change in a new branch * Do your change in a new branch
* Upload the repository somewhere where it can be accessed from the Internet * Upload the repository somewhere where it can be accessed from the Internet and
* Ask me to pull in your changes (and briefly say what you're changed) notify me
For small changes, sending me a patch is also good. For small changes, sending me a patch is also good.
@ -35,7 +35,7 @@ For big changes: Same as above, but consider notifying me first to avoid
duplicate work and possible tears of rejection. ;-) duplicate work and possible tears of rejection. ;-)
## Quality remarks ## Quality remarks
Again: There is ***no*** guarantee I will accept anything from anything. Again: There is ***no*** guarantee I will accept anything from anybody.
But I will gladly take in code from others when I feel it saves me work But I will gladly take in code from others when I feel it saves me work
in the long run. in the long run.
@ -64,10 +64,10 @@ Depending on what you add, the chances for inclusion vary:
## Coding style guide ## Coding style guide
* Indentations should reflect the code flow * Indentations should reflect the code flow
* Use tabs, not spaces for indentation * Use tabs, not spaces for indentation (tab size = 8)
* Never use `minetest.env` * Never use `minetest.env`
## Reporting bugs ## Reporting bugs
Report all bugs and missing Minecraft features here: Report all bugs and missing Minecraft features here:
<https://git.minetest.land/Wuzzy/MineClone2-Bugs> <https://git.minetest.land/Wuzzy/MineClone2/issues>

View file

@ -36,7 +36,11 @@ Please read <http://minecraft.gamepedia.com/Breaking> to learn how digging times
* `dig_by_piston=1`: Blocks which will drop as an item when pushed by a piston. They also cannot be pulled by sticky pistons * `dig_by_piston=1`: Blocks which will drop as an item when pushed by a piston. They also cannot be pulled by sticky pistons
* `cultivatable=2`: Block will be turned into Farmland by using a hoe on it * `cultivatable=2`: Block will be turned into Farmland by using a hoe on it
* `cultivatable=1`: Block will be turned into Dirt by using a hoe on it * `cultivatable=1`: Block will be turned into Dirt by using a hoe on it
* `flammable`: Block helps spreading fire and gets destroyed by nearby fire (rating doesn't matter) * `flammable`: Block spreads fire
* `flammable>0`: Gets destroyed by fire
* `flammable=-1` Does not get destroyed by fire
* `fire_encouragement`: How quickly this block catches fire
* `fire_flammability`: How fast the block will burn away
* `spreading_dirt_type=1`: A dirt-type block with a cover (e.g. grass) which may spread to neighbor dirt blocks * `spreading_dirt_type=1`: A dirt-type block with a cover (e.g. grass) which may spread to neighbor dirt blocks
* `dirtifies_below_solid=1`: This node turns into dirt immediately when a solid or dirtifier node is placed on top * `dirtifies_below_solid=1`: This node turns into dirt immediately when a solid or dirtifier node is placed on top
* `dirtifier=1`: This node turns nodes the above group into dirt when placed above * `dirtifier=1`: This node turns nodes the above group into dirt when placed above

View file

@ -1,8 +1,21 @@
# MineClone 2 # MineClone 2 (Forkhausen Edition)
An unofficial Minecraft-like game for Minetest. Forked from MineClone by davedevils. An unofficial Minecraft-like game for Minetest. Forked from MineClone2 developed by Wuzzy
Developed by Wuzzy and contributors. Not developed or endorsed by Mojang AB. and contributors which is a fork of MineClone by davedevils. Not developed or endorsed by Mojang AB.
Version: 0.61.0 Version: 0.65.2
## Differences to MineClone 2
So far some minor fixes that I also sent upstream to Wuzzy for inclusion and some yet unmerged features from others:
* ~~Fix a crash when refueling powered minecarts [issue #683](https://git.minetest.land/Wuzzy/MineClone2/issues/683)~~
* Pumpkins grow without a face and can be carved [issue #682](https://git.minetest.land/Wuzzy/MineClone2/issues/682)
* Fix acceleration of powered minecarts and powered rails not summing up (by 2mac)
[issue #658](https://git.minetest.land/Wuzzy/MineClone2/issues/658).
* Mobs take damage from magma block if susceptible to fire damage (inspiraton from [minetest_npc](https://forum.minetest.net/viewtopic.php?p=371969#p371969))
* ~~When mobs are trying to escape dangerous situations (e.g. standing on lava), make more efforts to check if destination is safe.~~
* Carpets can be added to tamed Llamas. TODO: Replace textures because community-provided PixelPerfection textures of carpets are a bit **too** close to the original MC textures.
* ~~Fix crash in new explosion API [issue #689](https://git.minetest.land/Wuzzy/MineClone2/issues/689)~~
* Fix crash when igniting a creeper with flint and steel ([fix by nelkat](https://forum.minetest.net/viewtopic.php?p=372836#p372836))
### Gameplay ### Gameplay
You start in a randomly-generated world made entirely of cubes. You can explore You start in a randomly-generated world made entirely of cubes. You can explore
@ -182,7 +195,7 @@ Technical differences from Minecraft:
## Reporting bugs ## Reporting bugs
Please report all bugs and missing Minecraft features here: Please report all bugs and missing Minecraft features here:
<https://git.minetest.land/Wuzzy/MineClone2/issues> <https://git.athemis.de/Athemis/MineClone2/issues>
## Other readme files ## Other readme files
@ -200,15 +213,22 @@ There are so many people to list (sorry). Check out the respective mod directori
* [ex-bart](https://github.com/ex-bart): Redstone comparators * [ex-bart](https://github.com/ex-bart): Redstone comparators
* [Rootyjr](https://github.com/Rootyjr): Fishing rod and bugfixes * [Rootyjr](https://github.com/Rootyjr): Fishing rod and bugfixes
* [aligator](https://github.com/aligator): Improvement of doors * [aligator](https://github.com/aligator): Improvement of doors
* [ryvnf](https://github.com/ryvnf): Explosion mechanics
* Lots of other people: TO BE WRITTEN (see mod directories for details) * Lots of other people: TO BE WRITTEN (see mod directories for details)
### Textures ### Graphics
* [XSSheep](http://www.minecraftforum.net/members/XSSheep): Main author; creator of the Pixel Perfection resource pack of Minecraft 1.11 * [XSSheep](http://www.minecraftforum.net/members/XSSheep): Main author; creator of the Pixel Perfection resource pack of Minecraft 1.11
* [Wuzzy](https://forum.minetest.net/memberlist.php?mode=viewprofile&u=3082): Main menu imagery and various edits and additions of texture pack * [Wuzzy](https://forum.minetest.net/memberlist.php?mode=viewprofile&u=3082): Main menu imagery and various edits and additions of texture pack
* [kingoscargames](https://github.com/kingoscargames): Various edits and additions of existing textures * [kingoscargames](https://github.com/kingoscargames): Various edits and additions of existing textures
* [leorockway](https://github.com/leorockway): Some edits of mob textures * [leorockway](https://github.com/leorockway): Some edits of mob textures
* [xMrVizzy](https://minecraft.curseforge.com/members/xMrVizzy): Glazed terracotta (textures are subject to be replaced later) * [xMrVizzy](https://minecraft.curseforge.com/members/xMrVizzy): Glazed terracotta (textures are subject to be replaced later)
* Other authors: GUI images, * yutyo <tanakinci2002@gmail.com>: MineClone 2 logo
* Other authors: GUI images
### Translations
* Wuzzy: German
* Rocher Laurent <rocherl@club-internet.fr>: French
* wuniversales: Spanish
### Models ### Models
* [22i](https://github.com/22i): Creator of all models * [22i](https://github.com/22i): Creator of all models
@ -249,6 +269,8 @@ project by davedevils which fell under the same license.
Mods credit: Mods credit:
See `README.txt` or `README.md` in each mod directory for information about other authors. See `README.txt` or `README.md` in each mod directory for information about other authors.
For mods that do not have such a file, the license is the source code license
of MineClone 2 and the author is Wuzzy.
### License of media (textures and sounds) ### License of media (textures and sounds)
No non-free licenses are used anywhere. No non-free licenses are used anywhere.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View file

@ -6,6 +6,6 @@ Most importantly, you can get the heat, humidity and biome in the v6 mapgen.
See `API.md` for the API documentation. See `API.md` for the API documentation.
Current version: 1.0.1 (this is a [SemVer](https://semver.org/)) Current version: 1.0.3 (this is a [SemVer](https://semver.org/))
License: MIT License License: MIT License

View file

@ -19,6 +19,28 @@ local seed = tonumber(minetest.get_mapgen_setting("seed")) or 0
local mgv6_perlin_biome, mgv6_perlin_humidity, mgv6_np_biome local mgv6_perlin_biome, mgv6_perlin_humidity, mgv6_np_biome
-- v6 default noiseparams are hardcoded here because Minetest doesn't give us those
local mgv6_np_biome_default = {
offset = 0,
scale = 1,
spread = { x = 500, y = 500, z = 500},
seed = 9130,
octaves = 3,
persistence = 0.50,
lacunarity = 2.0,
flags = "eased",
}
local mgv6_np_humidity_default = {
offset = 0.5,
scale = 0.5,
spread = { x = 500, y = 500, z = 500},
seed = 72384,
octaves = 3,
persistence = 0.50,
lacunarity = 2.0,
flags = "eased",
}
local v6_flags_str = minetest.get_mapgen_setting("mgv6_spflags") local v6_flags_str = minetest.get_mapgen_setting("mgv6_spflags")
if v6_flags_str == nil then if v6_flags_str == nil then
v6_flags_str = "" v6_flags_str = ""
@ -86,15 +108,19 @@ biomeinfo.all_v6_biomes = {
local function init_perlins() local function init_perlins()
if not mgv6_perlin_biome then if not mgv6_perlin_biome then
mgv6_np_biome = minetest.get_mapgen_setting_noiseparams("mgv6_np_biome") mgv6_np_biome = minetest.get_mapgen_setting_noiseparams("mgv6_np_biome")
if mgv6_np_biome then if not mgv6_np_biome then
mgv6_perlin_biome = minetest.get_perlin(mgv6_np_biome) mgv6_np_biome = mgv6_np_biome_default
minetest.log("action", "[biomeinfo] Using hardcoded mgv6_np_biome default")
end end
mgv6_perlin_biome = minetest.get_perlin(mgv6_np_biome)
end end
if not mgv6_perlin_humidity then if not mgv6_perlin_humidity then
local np_humidity = minetest.get_mapgen_setting_noiseparams("mgv6_np_humidity") local np_humidity = minetest.get_mapgen_setting_noiseparams("mgv6_np_humidity")
if np_humidity then if not np_humidity then
mgv6_perlin_humidity = minetest.get_perlin(np_humidity) np_humidity = mgv6_np_humidity_default
minetest.log("action", "[biomeinfo] Using hardcoded mgv6_np_humidity default")
end end
mgv6_perlin_humidity = minetest.get_perlin(np_humidity)
end end
end end
@ -112,6 +138,9 @@ end
function biomeinfo.get_v6_heat(pos) function biomeinfo.get_v6_heat(pos)
init_perlins() init_perlins()
if not mgv6_perlin_biome then
return nil
end
local bpos = vector.floor(pos) local bpos = vector.floor(pos)
-- The temperature noise needs a special offset (see calculateNoise in mapgen_v6.cpp) -- The temperature noise needs a special offset (see calculateNoise in mapgen_v6.cpp)
return mgv6_perlin_biome:get_2d({x=bpos.x + mgv6_np_biome.spread.x*0.6, y=bpos.z + mgv6_np_biome.spread.z*0.2}) return mgv6_perlin_biome:get_2d({x=bpos.x + mgv6_np_biome.spread.x*0.6, y=bpos.z + mgv6_np_biome.spread.z*0.2})
@ -119,6 +148,9 @@ end
function biomeinfo.get_v6_humidity(pos) function biomeinfo.get_v6_humidity(pos)
init_perlins() init_perlins()
if not mgv6_perlin_humidity then
return nil
end
local bpos = vector.floor(pos) local bpos = vector.floor(pos)
return mgv6_perlin_humidity:get_2d({x=bpos.x, y=bpos.z}) return mgv6_perlin_humidity:get_2d({x=bpos.x, y=bpos.z})
end end

View file

@ -0,0 +1,383 @@
--[[
Explosion API mod for Minetest (adapted to MineClone 2)
This mod is based on the Minetest explosion API mod, but has been changed
to have the same explosion mechanics as Minecraft and work with MineClone.
The computation-intensive parts of the mod has been optimized to allow for
larger explosions and faster world updating.
This mod was created by Elias Astrom <ryvnf@riseup.net> and is released
under the LGPLv2.1 license.
--]]
mcl_explosions = {}
local creative_mode = minetest.settings:get_bool("creative_mode")
local mod_death_messages = minetest.get_modpath("mcl_death_messages") ~= nil
local mod_fire = minetest.get_modpath("mcl_fire") ~= nil
local CONTENT_FIRE = minetest.get_content_id("mcl_fire:fire")
local S = minetest.get_translator("mcl_explosions")
-- Saved sphere explosion shapes for various radiuses
local sphere_shapes = {}
-- Saved node definitions in table using cid-keys for faster look-up.
local node_blastres = {}
local node_on_blast = {}
local node_walkable = {}
-- The step length for the rays (Minecraft uses 0.3)
local STEP_LENGTH = 0.3
-- How many rays to compute entity exposure to explosion
local N_EXPOSURE_RAYS = 16
minetest.register_on_mods_loaded(function()
-- Store blast resistance values by content ids to improve performance.
for name, def in pairs(minetest.registered_nodes) do
node_blastres[minetest.get_content_id(name)] = def._mcl_blast_resistance or 0
node_on_blast[minetest.get_content_id(name)] = def.on_blast
node_walkable[minetest.get_content_id(name)] = def.walkable
end
end)
-- Compute the rays which make up a sphere with radius. Returns a list of rays
-- which can be used to trace explosions. This function is not efficient
-- (especially for larger radiuses), so the generated rays for various radiuses
-- should be cached and reused.
--
-- Should be possible to improve by using a midpoint circle algorithm multiple
-- times to create the sphere, currently uses more of a brute-force approach.
local function compute_sphere_rays(radius)
local rays = {}
local sphere = {}
for i=1, 2 do
for y = -radius, radius do
for z = -radius, radius do
for x = -radius, 0, 1 do
local d = x * x + y * y + z * z
if d <= radius * radius then
local pos = { x = x, y = y, z = z }
sphere[minetest.hash_node_position(pos)] = pos
break
end
end
end
end
end
for i=1,2 do
for x = -radius, radius do
for z = -radius, radius do
for y = -radius, 0, 1 do
local d = x * x + y * y + z * z
if d <= radius * radius then
local pos = { x = x, y = y, z = z }
sphere[minetest.hash_node_position(pos)] = pos
break
end
end
end
end
end
for i=1,2 do
for x = -radius, radius do
for y = -radius, radius do
for z = -radius, 0, 1 do
local d = x * x + y * y + z * z
if d <= radius * radius then
local pos = { x = x, y = y, z = z }
sphere[minetest.hash_node_position(pos)] = pos
break
end
end
end
end
end
for _, pos in pairs(sphere) do
rays[#rays + 1] = vector.normalize(pos)
end
return rays
end
-- Add particles from explosion
--
-- Parameters:
-- pos - The position of the explosion
-- radius - The radius of the explosion
local function add_particles(pos, radius)
minetest.add_particlespawner({
amount = 64,
time = 0.125,
minpos = pos,
maxpos = pos,
minvel = {x = -radius, y = -radius, z = -radius},
maxvel = {x = radius, y = radius, z = radius},
minacc = vector.new(),
maxacc = vector.new(),
minexptime = 0.5,
maxexptime = 1.0,
minsize = radius * 0.5,
maxsize = radius * 1.0,
texture = "tnt_smoke.png",
})
end
-- Traces the rays of an explosion, and updates the environment.
--
-- Parameters:
-- pos - Where the rays in the explosion should start from
-- strength - The strength of each ray
-- raydirs - The directions for each ray
-- radius - The maximum distance each ray will go
-- drop_chance - The chance that destroyed nodes will drop their items
-- fire - If true, 1/3 of destroyed nodes become fire
-- puncher - object that punches other objects (optional)
--
-- Note that this function has been optimized, it contains code which has been
-- inlined to avoid function calls and unnecessary table creation. This was
-- measured to give a significant performance increase.
local function trace_explode(pos, strength, raydirs, radius, drop_chance, fire, puncher)
local vm = minetest.get_voxel_manip()
local emin, emax = vm:read_from_map(vector.subtract(pos, radius),
vector.add(pos, radius))
local emin_x = emin.x
local emin_y = emin.y
local emin_z = emin.z
local ystride = (emax.x - emin_x + 1)
local zstride = ystride * (emax.y - emin_y + 1)
local pos_x = pos.x
local pos_y = pos.y
local pos_z = pos.z
local area = VoxelArea:new {
MinEdge = emin,
MaxEdge = emax
}
local data = vm:get_data()
local destroy = {}
-- Trace rays for environment destruction
for i = 1, #raydirs do
local rpos_x = pos.x
local rpos_y = pos.y
local rpos_z = pos.z
local rdir_x = raydirs[i].x
local rdir_y = raydirs[i].y
local rdir_z = raydirs[i].z
local rstr = (0.7 + math.random() * 0.6) * strength
for r = 0, math.ceil(radius * (1.0 / STEP_LENGTH)) do
local npos_x = math.floor(rpos_x + 0.5)
local npos_y = math.floor(rpos_y + 0.5)
local npos_z = math.floor(rpos_z + 0.5)
local idx = (npos_z - emin_z) * zstride + (npos_y - emin_y) * ystride +
npos_x - emin_x + 1
local cid = data[idx]
local br = node_blastres[cid]
local hash = (npos_z + 32768) * 65536 * 65536 +
(npos_y + 32768) * 65536 +
npos_x + 32768
rpos_x = rpos_x + STEP_LENGTH * rdir_x
rpos_y = rpos_y + STEP_LENGTH * rdir_y
rpos_z = rpos_z + STEP_LENGTH * rdir_z
rstr = rstr - 0.75 * STEP_LENGTH - (br + 0.3) * STEP_LENGTH
if rstr <= 0 then
break
end
if cid ~= minetest.CONTENT_AIR then
destroy[hash] = idx
end
end
end
-- Entities in radius of explosion
local punch_radius = 2 * strength
local objs = minetest.get_objects_inside_radius(pos, punch_radius)
-- Trace rays for entity damage
for _, obj in pairs(objs) do
local ent = obj:get_luaentity()
-- Ignore items to lower lag
if obj:is_player() or (ent and ent.name ~= '__builtin.item') then
local opos = obj:get_pos()
local collisionbox = nil
if obj:is_player() then
collisionbox = { -0.3, 0.0, -0.3, 0.3, 1.77, 0.3 }
elseif ent.name then
local def = minetest.registered_entities[ent.name]
collisionbox = def.collisionbox
end
if collisionbox then
-- Create rays from random points in the collision box
local x1 = collisionbox[1] * 2
local y1 = collisionbox[2] * 2
local z1 = collisionbox[3] * 2
local x2 = collisionbox[4] * 2
local y2 = collisionbox[5] * 2
local z2 = collisionbox[6] * 2
local x_len = math.abs(x2 - x1)
local y_len = math.abs(y2 - y1)
local z_len = math.abs(z2 - z1)
-- Move object position to the center of its bounding box
opos.x = opos.x + x1 + x2
opos.y = opos.y + y1 + y2
opos.z = opos.z + z1 + z2
-- Count number of rays from collision box which are unobstructed
local count = N_EXPOSURE_RAYS
for i = 1, N_EXPOSURE_RAYS do
local rpos_x = opos.x + math.random() * x_len - x_len / 2
local rpos_y = opos.y + math.random() * y_len - y_len / 2
local rpos_z = opos.z + math.random() * z_len - z_len / 2
local rdir_x = pos.x - rpos_x
local rdir_y = pos.y - rpos_y
local rdir_z = pos.z - rpos_z
local rdir_len = math.hypot(rdir_x, math.hypot(rdir_y, rdir_z))
rdir_x = rdir_x / rdir_len
rdir_y = rdir_y / rdir_len
rdir_z = rdir_z / rdir_len
for i=0, rdir_len / STEP_LENGTH do
rpos_x = rpos_x + rdir_x * STEP_LENGTH
rpos_y = rpos_y + rdir_y * STEP_LENGTH
rpos_z = rpos_z + rdir_z * STEP_LENGTH
local npos_x = math.floor(rpos_x + 0.5)
local npos_y = math.floor(rpos_y + 0.5)
local npos_z = math.floor(rpos_z + 0.5)
local idx = (npos_z - emin_z) * zstride + (npos_y - emin_y) * ystride +
npos_x - emin_x + 1
local cid = data[idx]
local walkable = node_walkable[cid]
if walkable then
count = count - 1
break
end
end
end
-- Punch entity with damage depending on explosion exposure and
-- distance to explosion
local exposure = count / N_EXPOSURE_RAYS
local punch_vec = vector.subtract(opos, pos)
local punch_dir = vector.normalize(punch_vec)
local impact = (1 - vector.length(punch_vec) / punch_radius) * exposure
if impact < 0 then
impact = 0
end
local damage = math.floor((impact * impact + impact) * 7 * strength + 1)
if mod_death_messages and obj:is_player() then
mcl_death_messages.player_damage(obj, S("@1 was caught in an explosion.", obj:get_player_name()))
end
local source = puncher
if not source then
source = obj
end
obj:punch(source, 10, { damage_groups = { full_punch_interval = 1,
fleshy = damage, knockback = impact * 20.0 } }, punch_dir)
if obj:is_player() then
obj:add_player_velocity(vector.multiply(punch_dir, impact * 20))
elseif ent.tnt_knockback then
obj:add_velocity(vector.multiply(punch_dir, impact * 20))
end
end
end
end
-- Remove destroyed blocks and drop items
for hash, idx in pairs(destroy) do
local do_drop = not creative_mode and math.random() <= drop_chance
local on_blast = node_on_blast[data[idx]]
local remove = true
if do_drop or on_blast ~= nil then
local npos = minetest.get_position_from_hash(hash)
if on_blast ~= nil then
remove = on_blast(npos, 1.0)
else
local name = minetest.get_name_from_content_id(data[idx])
local drop = minetest.get_node_drops(name, "")
for _, item in ipairs(drop) do
if type(item) ~= "string" then
item = item:get_name() .. item:get_count()
end
minetest.add_item(npos, item)
end
end
end
if remove then
if mod_fire and fire and math.random(1, 3) == 1 then
data[idx] = CONTENT_FIRE
else
data[idx] = minetest.CONTENT_AIR
end
end
end
-- Log explosion
minetest.log('action', 'Explosion at ' .. minetest.pos_to_string(pos) ..
' with strength ' .. strength .. ' and radius ' .. radius)
-- Update environment
vm:set_data(data)
vm:write_to_map(data)
vm:update_liquids()
end
-- Create an explosion with strength at pos.
--
-- Parameters:
-- pos - The position where the explosion originates from
-- strength - The blast strength of the explosion (a TNT explosion uses 4)
-- info - Table containing information about explosion.
-- puncher - object that is reported as source of punches/damage (optional)
--
-- Values in info:
-- drop_chance - If specified becomes the drop chance of all nodes in the
-- explosion (defaults to 1.0 / strength)
-- no_sound - If true then the explosion will not play a sound
-- no_particle - If true then the explosion will not create particles
-- fire - If true, 1/3 nodes become fire (default: false)
function mcl_explosions.explode(pos, strength, info, puncher)
-- The maximum blast radius (in the air)
local radius = math.ceil(1.3 * strength / (0.3 * 0.75) * 0.3)
if not sphere_shapes[radius] then
sphere_shapes[radius] = compute_sphere_rays(radius)
end
local shape = sphere_shapes[radius]
trace_explode(pos, strength, shape, radius, (info and info.drop_chance) or 1 / strength, info.fire == true, puncher)
if not (info and info.no_sound) then
add_particles(pos, radius)
end
if not (info and info.no_particle) then
minetest.sound_play("tnt_explode", {
pos = pos, gain = 1.0,
max_hear_distance = strength * 16
}, true)
end
end

View file

@ -0,0 +1,2 @@
# textdomain:mcl_explosions
@1 was caught in an explosion.=@1 wurde Opfer einer Explosion.

View file

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

View file

@ -0,0 +1,3 @@
name = mcl_explosions
description = A common API to create explosions.
optional_depends = mcl_fire

Binary file not shown.

Before

Width:  |  Height:  |  Size: 938 B

After

Width:  |  Height:  |  Size: 171 B

View file

@ -164,5 +164,5 @@ end
-- Player death sound -- Player death sound
minetest.register_on_dieplayer(function(player) minetest.register_on_dieplayer(function(player)
-- TODO: Add separate death sound -- TODO: Add separate death sound
minetest.sound_play({name="player_damage", gain = 1.0}, {pos=player:get_pos(), max_hear_distance=16}) minetest.sound_play({name="player_damage", gain = 1.0}, {pos=player:get_pos(), max_hear_distance=16}, true)
end) end)

View file

@ -385,7 +385,7 @@ function mcl_util.generate_on_place_plant_function(condition)
if success then if success then
if idef.sounds and idef.sounds.place then if idef.sounds and idef.sounds.place then
minetest.sound_play(idef.sounds.place, {pos=pointed_thing.above, gain=1}) minetest.sound_play(idef.sounds.place, {pos=pointed_thing.above, gain=1}, true)
end end
end end
itemstack = new_itemstack itemstack = new_itemstack

View file

@ -1,11 +1,11 @@
WalkOver Walkover
-------- --------
Some mode developers have shown an interest in having an on_walk_over event. This is useful for pressure-plates and the like. Some mode developers have shown an interest in having an `on_walk_over` event. This is useful for pressure-plates and the like.
See this issue - https://github.com/minetest/minetest/issues/247 See this issue - https://github.com/minetest/minetest/issues/247
I have implemented a server_side version in lua using globalstep which people might find useful. Of course this would better implemented via a client-based "on walk over", but it is sufficient for my needs now. I have implemented a server-side version in Lua using globalstep which people might find useful. Of course this would better implemented via a client-based "on walk over", but it is sufficient for my needs now.
Example Usage Example Usage
------------- -------------
@ -19,3 +19,6 @@ Example Usage
}) })
Credits
-------
Mod created by lordfingle, licensed under Apache License 2.0.

View file

@ -39,7 +39,7 @@ minetest.register_entity("drippingwater:drop_water", {
if minetest.get_node({x=ownpos.x, y=ownpos.y -0.5, z=ownpos.z}).name ~= "air" then if minetest.get_node({x=ownpos.x, y=ownpos.y -0.5, z=ownpos.z}).name ~= "air" then
self.object:remove() self.object:remove()
minetest.sound_play({name="drippingwater_drip"}, {pos = ownpos, gain = 0.5, max_hear_distance = 8}) minetest.sound_play({name="drippingwater_drip"}, {pos = ownpos, gain = 0.5, max_hear_distance = 8}, true)
end end
end, end,
}) })
@ -81,7 +81,7 @@ minetest.register_entity("drippingwater:drop_lava", {
if minetest.get_node({x=ownpos.x, y=ownpos.y -0.5, z=ownpos.z}).name ~= "air" then if minetest.get_node({x=ownpos.x, y=ownpos.y -0.5, z=ownpos.z}).name ~= "air" then
self.object:remove() self.object:remove()
minetest.sound_play({name="drippingwater_lavadrip"}, {pos = ownpos, gain = 0.5, max_hear_distance = 8}) minetest.sound_play({name="drippingwater_lavadrip"}, {pos = ownpos, gain = 0.5, max_hear_distance = 8}, true)
end end
end, end,
}) })

View file

@ -10,8 +10,7 @@ License of boat model:
GNU GPLv3 <https://www.gnu.org/licenses/gpl-3.0.html> GNU GPLv3 <https://www.gnu.org/licenses/gpl-3.0.html>
## Textures ## Textures
All textures are from the Faithful texture pack for Minecraft. See the main MineClone 2 README.md file to learn more.
See the main MineClone 2 license to learn more.
## Code ## Code
Code based on Minetest Game, licensed under the MIT License (MIT). Code based on Minetest Game, licensed under the MIT License (MIT).

View file

@ -0,0 +1,11 @@
# textdomain: mcl_boats
Acacia Boat=Bateau en Acacia
Birch Boat=Bateau en Bouleau
Boat=Bateau
Boats are used to travel on the surface of water.=Les bateaux sont utilisés pour voyager à la surface de l'eau.
Dark Oak Boat=Bateau en Chêne Noir
Jungle Boat=Bateau en Acajou
Oak Boat=Bateau en Chêne
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.=Faites un clic droit sur une source d'eau pour placer le bateau. Faites un clic droit sur le bateau pour y entrer. Utilisez [Gauche] et [Droite] pour diriger, [Avant] pour accélérer et [Arrière] pour ralentir ou reculer. Cliquez de nouveau avec le bouton droit sur le bateau pour le quitter, frappez le bateau pour le faire tomber en tant qu'objet.
Spruce Boat=Bateau en Sapin
Water vehicle=Véhicule aquatique

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 B

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 264 B

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B

After

Width:  |  Height:  |  Size: 259 B

View file

@ -221,7 +221,7 @@ minetest.register_entity(":__builtin:falling_node", {
meta:from_table(self.meta) meta:from_table(self.meta)
end end
if def.sounds and def.sounds.place and def.sounds.place.name then if def.sounds and def.sounds.place and def.sounds.place.name then
minetest.sound_play(def.sounds.place, {pos = np}) minetest.sound_play(def.sounds.place, {pos = np}, true)
end end
end end
else else
@ -258,7 +258,7 @@ minetest.register_entity(":__builtin:falling_node", {
def._mcl_after_falling(npos3, get_falling_depth(self)) def._mcl_after_falling(npos3, get_falling_depth(self))
end end
if def.sounds and def.sounds.place and def.sounds.place.name then if def.sounds and def.sounds.place and def.sounds.place.name then
minetest.sound_play(def.sounds.place, {pos = np}) minetest.sound_play(def.sounds.place, {pos = np}, true)
end end
end end
deal_falling_damage(self, dtime) deal_falling_damage(self, dtime)

View file

@ -0,0 +1,3 @@
# textdomain: mcl_falling_nodes
@1 was smashed by a falling anvil.=@1 a été écrasé par une enclume qui tombait.
@1 was smashed by a falling block.=@1 a été écrasé par un bloc qui tombait.

View file

@ -75,7 +75,7 @@ minetest.register_globalstep(function(dtime)
pos = pos, pos = pos,
max_hear_distance = 16, max_hear_distance = 16,
gain = 1.0, gain = 1.0,
}) }, true)
check_pickup_achievements(object, player) check_pickup_achievements(object, player)
@ -129,7 +129,7 @@ minetest.register_globalstep(function(dtime)
pos = pos, pos = pos,
max_hear_distance = 16, max_hear_distance = 16,
gain = 1.0, gain = 1.0,
}) }, true)
end end
check_pickup_achievements(object, player) check_pickup_achievements(object, player)
object:get_luaentity()._removed = true object:get_luaentity()._removed = true
@ -350,8 +350,6 @@ minetest.register_entity(":__builtin:item", {
count = max_count count = max_count
self.itemstring = stack:get_name().." "..max_count self.itemstring = stack:get_name().." "..max_count
end end
local s = 0.2 + 0.1 * (count / max_count)
local c = s
local itemtable = stack:to_table() local itemtable = stack:to_table()
local itemname = nil local itemname = nil
local description = "" local description = ""
@ -360,16 +358,18 @@ minetest.register_entity(":__builtin:item", {
end end
local item_texture = nil local item_texture = nil
local item_type = "" local item_type = ""
if minetest.registered_items[itemname] then
item_texture = minetest.registered_items[itemname].inventory_image
item_type = minetest.registered_items[itemname].type
description = minetest.registered_items[itemname].description
end
local ndef = minetest.registered_items[itemname]
local glow local glow
if ndef then local def = minetest.registered_items[itemname]
glow = ndef.light_source if def then
item_texture = def.inventory_image
item_type = def.type
description = def.description
glow = def.light_source
end end
local s = 0.2 + 0.1 * (count / max_count)
local wield_scale = (def and def.wield_scale and def.wield_scale.x) or 1
local c = s
s = s / wield_scale
local prop = { local prop = {
is_visible = true, is_visible = true,
visual = "wielditem", visual = "wielditem",
@ -545,7 +545,7 @@ minetest.register_entity(":__builtin:item", {
local dg = minetest.get_item_group(nn, "destroys_items") local dg = minetest.get_item_group(nn, "destroys_items")
if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) then if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) then
if dg ~= 2 then if dg ~= 2 then
minetest.sound_play("builtin_item_lava", {pos = self.object:get_pos(), gain = 0.5}) minetest.sound_play("builtin_item_lava", {pos = self.object:get_pos(), gain = 0.5}, true)
end end
self._removed = true self._removed = true
self.object:remove() self.object:remove()
@ -701,7 +701,3 @@ minetest.register_entity(":__builtin:item", {
-- Note: on_punch intentionally left out. The player should *not* be able to collect items by punching -- Note: on_punch intentionally left out. The player should *not* be able to collect items by punching
}) })
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "mcl_item_entity loaded")
end

View file

@ -3,12 +3,6 @@ mcl_minecarts
Based on the mod "boost_carts" by Krock. Based on the mod "boost_carts" by Krock.
Target: Run smoothly and do not use too much CPU. Target: Run smoothly and do not use too much CPU.
TODO:
- Minecraft-like physics
- Add activator rail
- Add more rail textures
- Add loaded minecarts
License of source code: License of source code:
----------------------- -----------------------
MIT License MIT License
@ -23,10 +17,5 @@ Authors/licenses of media files:
Minecart model: Minecart model:
22i (GPLv3) 22i (GPLv3)
Wuzzy (based on Pixel Perfection 1.11, MIT License): Texture files (CC BY-SA 3.0):
carts_rail_crossing_pwr.png
carts_rail_curved_pwr.png
carts_rail_t_junction_pwr.png
Other texture files (CC BY-SA 3.0:
XSSheep XSSheep

View file

@ -1,3 +1,4 @@
mcl_explosions
mcl_core mcl_core
mcl_sounds mcl_sounds
mcl_player mcl_player

View file

@ -43,7 +43,7 @@ local function activate_tnt_minecart(self, timer)
"mcl_minecarts_minecart.png", "mcl_minecarts_minecart.png",
}}) }})
self._blinktimer = tnt.BLINKTIMER self._blinktimer = tnt.BLINKTIMER
minetest.sound_play("tnt_ignite", {pos = self.object:get_pos(), gain = 1.0, max_hear_distance = 15}) minetest.sound_play("tnt_ignite", {pos = self.object:get_pos(), gain = 1.0, max_hear_distance = 15}, true)
end end
local activate_normal_minecart = detach_driver local activate_normal_minecart = detach_driver
@ -206,7 +206,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
-- Explode if already ignited -- Explode if already ignited
if self._boomtimer then if self._boomtimer then
self.object:remove() self.object:remove()
tnt.boom(pos) mcl_explosions.explode(pos, 4, { drop_chance = 1.0 })
return return
end end
@ -249,7 +249,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
local pos = self.object:get_pos() local pos = self.object:get_pos()
if self._boomtimer <= 0 then if self._boomtimer <= 0 then
self.object:remove() self.object:remove()
tnt.boom(pos) mcl_explosions.explode(pos, 4, { drop_chance = 1.0 })
return return
else else
tnt.smoke_step(pos) tnt.smoke_step(pos)
@ -309,7 +309,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
if not rou_pos then if not rou_pos then
rou_pos = vector.round(pos) rou_pos = vector.round(pos)
end end
rou_old = vector.round(self._old_pos) local rou_old = vector.round(self._old_pos)
if not node then if not node then
node = minetest.get_node(rou_pos) node = minetest.get_node(rou_pos)
end end
@ -409,14 +409,17 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick, o
-- Slow down or speed up -- Slow down or speed up
local acc = dir.y * -1.8 local acc = dir.y * -1.8
local friction = 0.4
local speed_mod = minetest.registered_nodes[minetest.get_node(pos).name]._rail_acceleration local speed_mod = minetest.registered_nodes[minetest.get_node(pos).name]._rail_acceleration
acc = acc - friction
if has_fuel then if has_fuel then
acc = acc + 0.2 acc = acc + 0.6
elseif speed_mod and speed_mod ~= 0 then end
acc = acc + speed_mod
else if speed_mod and speed_mod ~= 0 then
acc = acc - 0.4 acc = acc + speed_mod + friction
end end
new_acc = vector.multiply(dir, acc) new_acc = vector.multiply(dir, acc)
@ -685,7 +688,7 @@ register_minecart(
if not minetest.settings:get_bool("creative_mode") then if not minetest.settings:get_bool("creative_mode") then
held:take_item() held:take_item()
local index = clicker:get_wielded_index() local index = clicker:get_wield_index()
local inv = clicker:get_inventory() local inv = clicker:get_inventory()
inv:set_stack("main", index, held) inv:set_stack("main", index, held)
end end

View file

@ -0,0 +1,35 @@
# textdomain: mcl_minecarts
Minecart=Wagonnet
Minecarts can be used for a quick transportion on rails.=Les wagonnets peuvent être utilisés pour un transport rapide sur rails.
Minecarts only ride on rails and always follow the tracks. At a T-junction with no straight way ahead, they turn left. The speed is affected by the rail type.=Les wagonnets roulent uniquement sur des rails et suivent toujours les pistes. À un carrefour en T sans voie directe, ils tournent à gauche. La vitesse dépend du type de rail.
You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving.=Vous pouvez placer le wagonnet sur des rails. Faites un clic droit dessus pour entrer dedans. Frappez-le pour le faire bouger.
To obtain the minecart, punch it while holding down the sneak key.=Pour obtenir la wagonnet, frappez-le tout en maintenant la touche furtive enfoncée.
A minecart with TNT is an explosive vehicle that travels on rail.=Un wagonnet avec de la TNT est un véhicule explosif qui se déplace sur rail.
Place it on rails. Punch it to move it. The TNT is ignited with a flint and steel or when the minecart is on an powered activator rail.=Placez-le sur des rails. Frappez-le pour le déplacer. Le TNT est allumé avec un briquet ou lorsque le minecart est sur un rail d'activation alimenté.
To obtain the minecart and TNT, punch them while holding down the sneak key. You can't do this if the TNT was ignited.=Pour obtenir la wagonnet et la TNT, frappez-les tout en maintenant la touche furtive enfoncée. Vous ne pouvez pas faire cela si le TNT a été allumé.
A minecart with furnace is a vehicle that travels on rails. It can propel itself with fuel.=Une wagonnet avec un four est un véhicule qui se déplace sur rails. Il peut se propulser avec du carburant.
Place it on rails. If you give it some coal, the furnace will start burning for a long time and the minecart will be able to move itself. Punch it to get it moving.=Placez-le sur des rails. Si vous lui donnez du charbon, le four commencera à brûler pendant longtemps et le wagonnet pourra se déplacer. Frappez-le pour le faire bouger.
To obtain the minecart and furnace, punch them while holding down the sneak key.=Pour obtenir le wagonnet et le four, frappez-les tout en maintenant la touche furtive enfoncée.
Minecart with Chest=Wagonnet avec Coffre
Minecart with Furnace=Wagonnet avec Four
Minecart with Command Block=Wagonnet avec Bloc de Commande
Minecart with Hopper=Wagonnet avec Entonoir
Minecart with TNT=Wagonnet avec TNT
Place them on the ground to build your railway, the rails will automatically connect to each other and will turn into curves, T-junctions, crossings and slopes as needed.=Placez-les sur le sol pour construire votre chemin de fer, les rails se connecteront automatiquement les uns aux autres et se transformeront en courbes, en jonctions en T, en traversées et en pentes au besoin.
Rail=Rail
Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction.=Les rails peuvent être utilisés pour construire des voies de transport pour les wagonnets. Les rails ralentissent légèrement les wagonnets en raison de la friction.
Powered Rail=Rail allimenté
Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts.=Les rails peuvent être utilisés pour construire des voies de transport pour les wagonnets. Les rails motorisés sont capables d'accélérer et de freiner les wagonnets.
Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power.=Sans énergie de redstone, le rail freinera les wagonnets. Pour que ce rail accélère les minecarts, alimentez-le avec une source d'énergie redstone.
Activator Rail=Rail d'activation
Rails can be used to build transport tracks for minecarts. Activator rails are used to activate special minecarts.=Les rails peuvent être utilisés pour construire des voies de transport pour les wagonnets. Des rails activateurs sont utilisés pour activer des wagonnets spéciaux.
To make this rail activate minecarts, power it with redstone power and send a minecart over this piece of rail.=Pour activer ce rail, activez les wagonnets, alimentez-le avec de l'énergie redstone et envoyez un wagonnet sur ce morceau de rail.
Detector Rail=Rail de détection
Rails can be used to build transport tracks for minecarts. A detector rail is able to detect a minecart above it and powers redstone mechanisms.=Les rails peuvent être utilisés pour construire des voies de transport pour les wagonnets. Un rail de détection est capable de détecter un wagonnet au-dessus et alimente les mécanismes de redstone.
To detect a minecart and provide redstone power, connect it to redstone trails or redstone mechanisms and send any minecart over the rail.=Pour détecter un wagonnet et fournir une alimentation redstone, connectez-le aux câble redstone ou aux mécanismes redstone et envoyez n'importe quel wagonnet sur le rail.
Track for minecarts=Piste pour wagonnets
Speed up when powered, slow down when not powered=Accélérez lorsqu'il est alimenté, ralentissez lorsqu'il n'est pas alimenté
Activates minecarts when powered=Active les wagonnets lorsqu'il est alimenté
Emits redstone power when a minecart is detected=Émet de l'énergie redstone lorsqu'un wagonnet est détecté
Vehicle for fast travel on rails=Véhicule pour voyager rapidement sur rails
Can be ignited by tools or powered activator rail=Peut être allumé par des outils ou un rail d'activation motorisé

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 274 B

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 257 B

After

Width:  |  Height:  |  Size: 255 B

View file

@ -7,6 +7,12 @@ mobs.version = "20180531" -- don't rely too much on this, rarely updated, if eve
local MAX_MOB_NAME_LENGTH = 30 local MAX_MOB_NAME_LENGTH = 30
local MOB_CAP = {}
MOB_CAP.hostile = 70
MOB_CAP.passive = 10
MOB_CAP.ambient = 15
MOB_CAP.water = 15
-- Localize -- Localize
local S = minetest.get_translator("mcl_mobs") local S = minetest.get_translator("mcl_mobs")
@ -59,7 +65,7 @@ local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= fa
local remove_far = false local remove_far = false
local difficulty = tonumber(minetest.settings:get("mob_difficulty")) or 1.0 local difficulty = tonumber(minetest.settings:get("mob_difficulty")) or 1.0
local show_health = false local show_health = false
local max_per_block = tonumber(minetest.settings:get("max_objects_per_block") or 99) local max_per_block = tonumber(minetest.settings:get("max_objects_per_block") or 64)
local mobs_spawn_chance = tonumber(minetest.settings:get("mobs_spawn_chance") or 2.5) local mobs_spawn_chance = tonumber(minetest.settings:get("mobs_spawn_chance") or 2.5)
-- Peaceful mode message so players will know there are no monsters -- Peaceful mode message so players will know there are no monsters
@ -87,7 +93,7 @@ local node_snow = "mcl_core:snow"
mobs.fallback_node = minetest.registered_aliases["mapgen_dirt"] or "mcl_core:dirt" mobs.fallback_node = minetest.registered_aliases["mapgen_dirt"] or "mcl_core:dirt"
local mod_weather = minetest.get_modpath("mcl_weather") ~= nil local mod_weather = minetest.get_modpath("mcl_weather") ~= nil
local mod_tnt = minetest.get_modpath("mcl_tnt") ~= nil local mod_explosions = minetest.get_modpath("mcl_explosions") ~= nil
local mod_mobspawners = minetest.get_modpath("mcl_mobspawners") ~= nil local mod_mobspawners = minetest.get_modpath("mcl_mobspawners") ~= nil
local mod_hunger = minetest.get_modpath("mcl_hunger") ~= nil local mod_hunger = minetest.get_modpath("mcl_hunger") ~= nil
local mod_worlds = minetest.get_modpath("mcl_worlds") ~= nil local mod_worlds = minetest.get_modpath("mcl_worlds") ~= nil
@ -130,7 +136,7 @@ local mob_sound = function(self, soundname, is_opinion, fixed_pitch)
gain = 1.0, gain = 1.0,
max_hear_distance = self.sounds.distance, max_hear_distance = self.sounds.distance,
pitch = pitch, pitch = pitch,
}) }, true)
self.opinion_sound_cooloff = 1 self.opinion_sound_cooloff = 1
end end
end end
@ -188,10 +194,10 @@ local set_velocity = function(self, v)
end end
local yaw = (self.object:get_yaw() or 0) + self.rotate local yaw = (self.object:get_yaw() or 0) + self.rotate
local vel = self.object:get_velocity()
self.object:set_velocity({ self.object:set_velocity({
x = sin(yaw) * -v, x = sin(yaw) * -v,
y = self.object:get_velocity().y, y = (vel and vel.y) or 0,
z = cos(yaw) * v z = cos(yaw) * v
}) })
end end
@ -305,13 +311,17 @@ local is_node_dangerous = function(self, nodename)
end end
end end
if self.fire_damage > 0 then if self.fire_damage > 0 then
if minetest.get_item_group(nn, "fire") ~= 0 then if (minetest.get_item_group(nn, "fire") ~= 0) or nn == "mcl_nether:magma" then
return true return true
end end
end end
if minetest.registered_nodes[nn].drowning > 0 then if minetest.registered_nodes[nn].drowning > 0 then
if self.breath_max ~= -1 then if self.breath_max ~= -1 then
return true -- check if the mob is water-breathing _and_ the block is water; only return true if neither is the case
-- this will prevent water-breathing mobs to classify water or e.g. sand below them as dangerous
if not self.breathes_in_water and minetest.get_item_group(nn, "water") ~= 0 then
return true
end
end end
end end
if minetest.registered_nodes[nn].damage_per_second > 0 then if minetest.registered_nodes[nn].damage_per_second > 0 then
@ -547,7 +557,7 @@ local check_for_death = function(self, cause, cmi_cause)
-- has health actually changed? -- has health actually changed?
if self.health == self.old_health and self.health > 0 then if self.health == self.old_health and self.health > 0 then
return return false
end end
local damaged = self.health < self.old_health local damaged = self.health < self.old_health
@ -680,6 +690,9 @@ local is_at_cliff_or_danger = function(self)
return false return false
end end
if not self.object:get_luaentity() then
return false
end
local yaw = self.object:get_yaw() local yaw = self.object:get_yaw()
local dir_x = -sin(yaw) * (self.collisionbox[4] + 0.5) local dir_x = -sin(yaw) * (self.collisionbox[4] + 0.5)
local dir_z = cos(yaw) * (self.collisionbox[4] + 0.5) local dir_z = cos(yaw) * (self.collisionbox[4] + 0.5)
@ -745,30 +758,37 @@ local do_env_damage = function(self)
-- remove mob if beyond map limits -- remove mob if beyond map limits
if not within_limits(pos, 0) then if not within_limits(pos, 0) then
self.object:remove() self.object:remove()
return return true
end end
-- Deal light damage to mob, returns true if mob died
local deal_light_damage = function(self, pos, damage) local deal_light_damage = function(self, pos, damage)
if not (mod_weather and (mcl_weather.rain.raining or mcl_weather.state == "snow") and mcl_weather.is_outdoor(pos)) then if not (mod_weather and (mcl_weather.rain.raining or mcl_weather.state == "snow") and mcl_weather.is_outdoor(pos)) then
self.health = self.health - damage self.health = self.health - damage
effect(pos, 5, "tnt_smoke.png") effect(pos, 5, "tnt_smoke.png")
if check_for_death(self, "light", {type = "light"}) then return end if check_for_death(self, "light", {type = "light"}) then
return true
end
end end
end end
-- bright light harms mob -- bright light harms mob
if self.light_damage ~= 0 and (minetest.get_node_light(pos) or 0) > 12 then if self.light_damage ~= 0 and (minetest.get_node_light(pos) or 0) > 12 then
deal_light_damage(self, pos, self.light_damage) if deal_light_damage(self, pos, self.light_damage) then
return true
end
end end
local _, dim = nil, "overworld" local _, dim = nil, "overworld"
if mod_worlds then if mod_worlds then
_, dim = mcl_worlds.y_to_layer(pos.y) _, dim = mcl_worlds.y_to_layer(pos.y)
end end
if self.sunlight_damage ~= 0 and (minetest.get_node_light(pos) or 0) >= minetest.LIGHT_MAX and dim == "overworld" then if self.sunlight_damage ~= 0 and (minetest.get_node_light(pos) or 0) >= minetest.LIGHT_MAX and dim == "overworld" then
deal_light_damage(self, pos, self.sunlight_damage) if deal_light_damage(self, pos, self.sunlight_damage) then
return true
end
end end
local y_level = self.collisionbox[2] local y_level = self.collisionbox[2]
@ -797,7 +817,9 @@ local do_env_damage = function(self)
self.health = self.health - self.rain_damage self.health = self.health - self.rain_damage
if check_for_death(self, "rain", {type = "environment", if check_for_death(self, "rain", {type = "environment",
pos = pos, node = self.standing_in}) then return end pos = pos, node = self.standing_in}) then
return true
end
end end
end end
@ -814,7 +836,9 @@ local do_env_damage = function(self)
effect(pos, 5, "tnt_smoke.png", nil, nil, 1, nil) effect(pos, 5, "tnt_smoke.png", nil, nil, 1, nil)
if check_for_death(self, "water", {type = "environment", if check_for_death(self, "water", {type = "environment",
pos = pos, node = self.standing_in}) then return end pos = pos, node = self.standing_in}) then
return true
end
end end
-- lava damage -- lava damage
@ -828,21 +852,29 @@ local do_env_damage = function(self)
effect(pos, 5, "fire_basic_flame.png", nil, nil, 1, nil) effect(pos, 5, "fire_basic_flame.png", nil, nil, 1, nil)
if check_for_death(self, "lava", {type = "environment", if check_for_death(self, "lava", {type = "environment",
pos = pos, node = self.standing_in}) then return end pos = pos, node = self.standing_in}) then
return true
end
end end
-- fire damage -- fire damage
elseif self.fire_damage > 0 elseif self.fire_damage > 0
and (nodef.groups.fire) then and (nodef.groups.fire) or self.standing_on == "mcl_nether:magma" then
if self.fire_damage ~= 0 then if self.fire_damage ~= 0 then
self.health = self.health - self.fire_damage self.health = self.health - self.fire_damage
if self.standing_on ~= "mcl_nether:magma" then
effect(pos, 5, "fire_basic_flame.png", nil, nil, 1, nil)
effect(pos, 5, "fire_basic_flame.png", nil, nil, 1, nil) if check_for_death(self, "fire", {type = "environment",
pos = pos, node = self.standing_in}) then
if check_for_death(self, "fire", {type = "environment", return true
pos = pos, node = self.standing_in}) then return end end
elseif check_for_death(self, "water", {type = "environment",
pos = pos, node = self.standing_in}) then
return true
end
end end
-- damage_per_second node check -- damage_per_second node check
@ -853,7 +885,9 @@ local do_env_damage = function(self)
effect(pos, 5, "tnt_smoke.png") effect(pos, 5, "tnt_smoke.png")
if check_for_death(self, "dps", {type = "environment", if check_for_death(self, "dps", {type = "environment",
pos = pos, node = self.standing_in}) then return end pos = pos, node = self.standing_in}) then
return true
end
end end
-- Drowning damage -- Drowning damage
@ -882,7 +916,9 @@ local do_env_damage = function(self)
self.health = self.health - dmg self.health = self.health - dmg
end end
if check_for_death(self, "drowning", {type = "environment", if check_for_death(self, "drowning", {type = "environment",
pos = pos, node = self.standing_in}) then return end pos = pos, node = self.standing_in}) then
return true
end
else else
self.breath = math.min(self.breath_max, self.breath + 1) self.breath = math.min(self.breath_max, self.breath + 1)
end end
@ -897,15 +933,28 @@ local do_env_damage = function(self)
and (nodef.groups.disable_suffocation ~= 1) and (nodef.groups.disable_suffocation ~= 1)
and (nodef.groups.opaque == 1) then and (nodef.groups.opaque == 1) then
-- 2 damage per second -- Short grace period before starting to take suffocation damage.
-- TODO: Deal this damage once every 1/2 second -- This is different from players, who take damage instantly.
self.health = self.health - 2 -- This has been done because mobs might briefly be inside solid nodes
-- when e.g. climbing up stairs.
-- This is a bit hacky because it assumes that do_env_damage
-- is called roughly every second only.
self.suffocation_timer = self.suffocation_timer + 1
if self.suffocation_timer >= 3 then
-- 2 damage per second
-- TODO: Deal this damage once every 1/2 second
self.health = self.health - 2
if check_for_death(self, "suffocation", {type = "environment", if check_for_death(self, "suffocation", {type = "environment",
pos = pos, node = self.standing_in}) then return end pos = pos, node = self.standing_in}) then
return true
end
end
else
self.suffocation_timer = 0
end end
check_for_death(self, "", {type = "unknown"}) return check_for_death(self, "", {type = "unknown"})
end end
@ -1913,6 +1962,7 @@ end
-- execute current state (stand, walk, run, attacks) -- execute current state (stand, walk, run, attacks)
-- returns true if mob has died
local do_states = function(self, dtime) local do_states = function(self, dtime)
local yaw = self.object:get_yaw() or 0 local yaw = self.object:get_yaw() or 0
@ -1991,17 +2041,25 @@ local do_states = function(self, dtime)
elseif self.fire_damage > 0 then elseif self.fire_damage > 0 then
lp = minetest.find_node_near(s, 1, {"group:fire"}) lp = minetest.find_node_near(s, 1, {"group:fire", "mcl_nether:magma"})
end end
local is_in_danger = false local is_in_danger = false
if lp then if lp then
-- If mob in or on dangerous block, look for land
if (is_node_dangerous(self, self.standing_in) or local is_in_danger = false
is_node_dangerous(self, self.standing_on)) then
is_in_danger = true
-- if mob is flying, only check for node it is currently in (no contact with node below)
if flight_check(self) then
is_in_danger = is_node_dangerous(self, self.standing_in)
elseif (is_node_dangerous(self, self.standing_in) or
is_node_dangerous(self, self.standing_on)) then
is_in_danger = true
end
-- If mob in or on dangerous block, look for land
if is_in_danger then
lp = minetest.find_node_near(s, 5, {"group:solid"}) lp = minetest.find_node_near(s, 5, {"group:solid"})
-- did we find land? -- did we find land?
@ -2187,37 +2245,23 @@ local do_states = function(self, dtime)
local pos = self.object:get_pos() local pos = self.object:get_pos()
-- dont damage anything if area protected or next to water if mod_explosions then
if minetest.find_node_near(pos, 1, {"group:water"}) if mobs_griefing and not minetest.is_protected(pos, "") then
or minetest.is_protected(pos, "") then mcl_explosions.explode(self.object:get_pos(), self.explosion_strength, { drop_chance = 1.0 }, self.object)
node_break_radius = 1
end
self.object:remove()
if mobs_griefing and mod_tnt and tnt and tnt.boom
and not minetest.is_protected(pos, "") then
tnt.boom(pos, {
radius = node_break_radius,
damage_radius = entity_damage_radius,
sound = self.sounds.explode,
is_tnt = false,
})
else else
minetest.sound_play(self.sounds.explode, { minetest.sound_play(self.sounds.explode, {
pos = pos, pos = pos,
gain = 1.0, gain = 1.0,
max_hear_distance = self.sounds.distance or 32 max_hear_distance = self.sounds.distance or 32
}) }, true)
entity_physics(pos, entity_damage_radius) entity_physics(pos, entity_damage_radius)
effect(pos, 32, "tnt_smoke.png", nil, nil, node_break_radius, 1, 0) effect(pos, 32, "tnt_smoke.png", nil, nil, node_break_radius, 1, 0)
end end
end
self.object:remove()
return return true
end end
end end
@ -2466,6 +2510,7 @@ end
-- falling and fall damage -- falling and fall damage
-- returns true if mob died
local falling = function(self, pos) local falling = function(self, pos)
if self.fly then if self.fly then
@ -2530,7 +2575,7 @@ local falling = function(self, pos)
effect(pos, 5, "tnt_smoke.png", 1, 2, 2, nil) effect(pos, 5, "tnt_smoke.png", 1, 2, 2, nil)
if check_for_death(self, "fall", {type = "fall"}) then if check_for_death(self, "fall", {type = "fall"}) then
return return true
end end
end end
end end
@ -2664,12 +2709,12 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
minetest.sound_play(weapon:get_definition().sounds[s], { minetest.sound_play(weapon:get_definition().sounds[s], {
object = self.object, --hitter, object = self.object, --hitter,
max_hear_distance = 8 max_hear_distance = 8
}) }, true)
else else
minetest.sound_play("default_punch", { minetest.sound_play("default_punch", {
object = self.object, --hitter, object = self.object, --hitter,
max_hear_distance = 5 max_hear_distance = 5
}) }, true)
end end
damage_effect(self, damage) damage_effect(self, damage)
@ -2710,7 +2755,7 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir)
self.object:set_velocity({ self.object:set_velocity({
x = dir.x * kb, x = dir.x * kb,
y = up, y = dir.y * kb + up,
z = dir.z * kb z = dir.z * kb
}) })
@ -3056,13 +3101,16 @@ local mob_step = function(self, dtime)
if self.opinion_sound_cooloff > 0 then if self.opinion_sound_cooloff > 0 then
self.opinion_sound_cooloff = self.opinion_sound_cooloff - dtime self.opinion_sound_cooloff = self.opinion_sound_cooloff - dtime
end end
falling(self, pos) if falling(self, pos) then
-- Return if mob died after falling
return
end
-- smooth rotation by ThomasMonroe314 -- smooth rotation by ThomasMonroe314
if self.delay and self.delay > 0 then if self.delay and self.delay > 0 then
local yaw = self.object:get_yaw() local yaw = self.object:get_yaw() or 0
if self.delay == 1 then if self.delay == 1 then
yaw = self.target_yaw yaw = self.target_yaw
@ -3146,7 +3194,9 @@ local mob_step = function(self, dtime)
self.env_damage_timer = 0 self.env_damage_timer = 0
-- check for environmental damage (water, fire, lava etc.) -- check for environmental damage (water, fire, lava etc.)
do_env_damage(self) if do_env_damage(self) then
return
end
-- node replace check (cow eats grass etc.) -- node replace check (cow eats grass etc.)
replace(self, pos) replace(self, pos)
@ -3160,7 +3210,9 @@ local mob_step = function(self, dtime)
follow_flop(self) follow_flop(self)
do_states(self, dtime) if do_states(self, dtime) then
return
end
do_jump(self) do_jump(self)
@ -3308,7 +3360,7 @@ minetest.register_entity(name, {
replace_offset = def.replace_offset or 0, replace_offset = def.replace_offset or 0,
on_replace = def.on_replace, on_replace = def.on_replace,
timer = 0, timer = 0,
env_damage_timer = 0, -- only used when state = "attack" env_damage_timer = 0,
tamed = false, tamed = false,
pause_timer = 0, pause_timer = 0,
horny = false, horny = false,
@ -3326,8 +3378,8 @@ minetest.register_entity(name, {
runaway_timer = 0, runaway_timer = 0,
pathfinding = def.pathfinding, pathfinding = def.pathfinding,
immune_to = def.immune_to or {}, immune_to = def.immune_to or {},
explosion_radius = def.explosion_radius, explosion_radius = def.explosion_radius, -- LEGACY
explosion_damage_radius = def.explosion_damage_radius, explosion_damage_radius = def.explosion_damage_radius, -- LEGACY
explosion_timer = def.explosion_timer or 3, explosion_timer = def.explosion_timer or 3,
allow_fuse_reset = def.allow_fuse_reset ~= false, allow_fuse_reset = def.allow_fuse_reset ~= false,
stop_to_explode = def.stop_to_explode ~= false, stop_to_explode = def.stop_to_explode ~= false,
@ -3345,6 +3397,7 @@ minetest.register_entity(name, {
_cmi_is_mob = true, _cmi_is_mob = true,
-- MCL2 extensions -- MCL2 extensions
spawn_class = def.spawn_class,
ignores_nametag = def.ignores_nametag or false, ignores_nametag = def.ignores_nametag or false,
rain_damage = def.rain_damage or 0, rain_damage = def.rain_damage or 0,
glow = def.glow, glow = def.glow,
@ -3353,6 +3406,8 @@ minetest.register_entity(name, {
texture_mods = {}, texture_mods = {},
shoot_arrow = def.shoot_arrow, shoot_arrow = def.shoot_arrow,
sounds_child = def.sounds_child, sounds_child = def.sounds_child,
explosion_strength = def.explosion_strength,
suffocation_timer = 0,
-- End of MCL2 extensions -- End of MCL2 extensions
on_spawn = def.on_spawn, on_spawn = def.on_spawn,
@ -3389,33 +3444,48 @@ end -- END mobs:register_mob function
-- count how many mobs of one type are inside an area -- count how many mobs of one type are inside an area
local count_mobs = function(pos, type) local count_mobs = function(pos, mobtype)
local num_type = 0 local num = 0
local num_total = 0
local objs = minetest.get_objects_inside_radius(pos, aoc_range) local objs = minetest.get_objects_inside_radius(pos, aoc_range)
for n = 1, #objs do for n = 1, #objs do
if not objs[n]:is_player() then local obj = objs[n]:get_luaentity()
local obj = objs[n]:get_luaentity() if obj and obj.name and obj._cmi_is_mob then
-- count mob type and add to total also -- count passive mobs only
if obj and obj.name and obj.name == type then if mobtype == "!passive" then
if obj.spawn_class == "passive" then
num_type = num_type + 1 num = num + 1
num_total = num_total + 1 end
-- count hostile mobs only
-- add to total mobs elseif mobtype == "!hostile" then
elseif obj and obj.name and obj.health ~= nil then if obj.spawn_class == "hostile" then
num = num + 1
num_total = num_total + 1 end
-- count ambient mobs only
elseif mobtype == "!ambient" then
if obj.spawn_class == "ambient" then
num = num + 1
end
-- count water mobs only
elseif mobtype == "!water" then
if obj.spawn_class == "water" then
num = num + 1
end
-- count mob type
elseif mobtype and obj.name == mobtype then
num = num + 1
-- count total mobs
elseif not mobtype then
num = num + 1
end end
end end
end end
return num_type, num_total return num
end end
@ -3470,9 +3540,21 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light,
return return
end end
-- count nearby mobs in same spawn class
local entdef = minetest.registered_entities[name]
local spawn_class = entdef and entdef.spawn_class
if not spawn_class then
if entdef.type == "monster" then
spawn_class = "hostile"
else
spawn_class = "passive"
end
end
local in_class_cap = count_mobs(pos, "!"..spawn_class) < MOB_CAP[spawn_class]
-- do not spawn if too many of same mob in area -- do not spawn if too many of same mob in area
if active_object_count_wider >= max_per_block if active_object_count_wider >= max_per_block -- large-range mob cap
or count_mobs(pos, name) >= aoc then or (not in_class_cap) -- spawn class mob cap
or count_mobs(pos, name) >= aoc then -- per-mob mob cap
-- too many entities -- too many entities
minetest.log("info", "Mob spawn of "..name.." at "..minetest.pos_to_string(pos).." failed, too crowded!") minetest.log("info", "Mob spawn of "..name.." at "..minetest.pos_to_string(pos).." failed, too crowded!")
return return
@ -3770,13 +3852,12 @@ end
-- no damage to nodes explosion -- no damage to nodes explosion
function mobs:safe_boom(self, pos, radius) function mobs:safe_boom(self, pos, strength)
minetest.sound_play(self.sounds and self.sounds.explode or "tnt_explode", { minetest.sound_play(self.sounds and self.sounds.explode or "tnt_explode", {
pos = pos, pos = pos,
gain = 1.0, gain = 1.0,
max_hear_distance = self.sounds and self.sounds.distance or 32 max_hear_distance = self.sounds and self.sounds.distance or 32
}) }, true)
entity_physics(pos, radius) entity_physics(pos, radius)
effect(pos, 32, "tnt_smoke.png", radius * 3, radius * 5, radius, 1, 0) effect(pos, 32, "tnt_smoke.png", radius * 3, radius * 5, radius, 1, 0)
@ -3784,19 +3865,14 @@ end
-- make explosion with protection and tnt mod check -- make explosion with protection and tnt mod check
function mobs:boom(self, pos, radius) function mobs:boom(self, pos, strength, fire)
if mobs_griefing if mod_explosions then
and mod_tnt and tnt and tnt.boom if mobs_griefing and not minetest.is_protected(pos, "") then
and not minetest.is_protected(pos, "") then mcl_explosions.explode(pos, strength, { drop_chance = 1.0, fire = fire }, self.object)
else
tnt.boom(pos, { mobs:safe_boom(self, pos, strength)
radius = radius, end
damage_radius = radius,
sound = self.sounds and self.sounds.explode,
explode_center = true,
is_tnt = false,
})
else else
mobs:safe_boom(self, pos, radius) mobs:safe_boom(self, pos, radius)
end end

View file

@ -50,7 +50,7 @@ functions needed for the mob to work properly which contains the following:
'jump' when true allows your mob to jump updwards. 'jump' when true allows your mob to jump updwards.
'jump_height' holds the height your mob can jump, 0 to disable jumping. 'jump_height' holds the height your mob can jump, 0 to disable jumping.
'stepheight' height of a block that your mob can easily walk up onto, 'stepheight' height of a block that your mob can easily walk up onto,
defaults to 1.1. defaults to 0.6.
'fly' when true allows your mob to fly around instead of walking. 'fly' when true allows your mob to fly around instead of walking.
'fly_in' holds the node name or a table of node names in which the 'fly_in' holds the node name or a table of node names in which the
mob flies (or swims) around in. The special name mob flies (or swims) around in. The special name
@ -226,6 +226,8 @@ functions needed for the mob to work properly which contains the following:
MineClone 2 extensions: MineClone 2 extensions:
'spawn_class' Classification of mod for the spawning algorithm:
"hostile", "passive", "ambient" or "water"
'ignores_nametag' if true, mob cannot be named by nametag 'ignores_nametag' if true, mob cannot be named by nametag
'rain_damage' damage per second if mob is standing in rain (default: 0) 'rain_damage' damage per second if mob is standing in rain (default: 0)
'sunlight_damage' holds the damage per second inflicted to mobs when they 'sunlight_damage' holds the damage per second inflicted to mobs when they

View file

@ -9,5 +9,3 @@ dofile(path .. "/mount.lua")
-- Mob Items -- Mob Items
dofile(path .. "/crafts.lua") dofile(path .. "/crafts.lua")
minetest.log("action", "[MOD] Mobs Redo: MineClone 2 Edition loaded")

View file

@ -0,0 +1,11 @@
# textdomain: mcl_mobs
Peaceful mode active! No monsters will spawn.=Mode paisible actif! Aucun monstre n'apparaîtra.
This allows you to place a single mob.=Cela vous permet de placer un seul mob.
Just place it where you want the mob to appear. Animals will spawn tamed, unless you hold down the sneak key while placing. If you place this on a mob spawner, you change the mob it spawns.=Placez-le là où vous voulez que le mob apparaisse. Les animaux apparaîtront apprivoisés, sauf si vous maintenez la touche furtive enfoncée pendant le placement. Si vous le placez sur un générateur de mob, vous changez le mob qu'il génère.
You need the “maphack” privilege to change the mob spawner.=Vous avez besoin du privilège "maphack" pour changer le générateur de mob.
Name Tag=Étiquette de nom
A name tag is an item to name a mob.=Une étiquette de nom est un élément pour nommer un mob.
Before you use the name tag, you need to set a name at an anvil. Then you can use the name tag to name a mob. This uses up the name tag.=Avant d'utiliser l'étiquette de nom, vous devez définir un nom sur une enclume. Ensuite, vous pouvez utiliser l'étiquette de nom pour nommer un mob. Cela utilise l'étiquette de nom.
Only peaceful mobs allowed!=Seuls les mobs pacifiques sont autorisées!
Give names to mobs=Donne des noms aux mobs
Set name at anvil=Définir le nom sur l'enclume

View file

@ -1,2 +1,2 @@
name = mcl_mobs name = mcl_mobs
optional_depends = mcl_weather, mcl_tnt, mcl_hunger, mcl_worlds, invisibility, lucky_block, cmi, doc_identifier, mcl_armor optional_depends = mcl_weather, mcl_explosions, mcl_hunger, mcl_worlds, invisibility, lucky_block, cmi, doc_identifier, mcl_armor

View file

@ -318,7 +318,7 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime)
minetest.sound_play("default_punch", { minetest.sound_play("default_punch", {
object = entity.object, object = entity.object,
max_hear_distance = 5 max_hear_distance = 5
}) }, true)
entity.object:punch(entity.object, 1.0, { entity.object:punch(entity.object, 1.0, {
full_punch_interval = 1.0, full_punch_interval = 1.0,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 895 B

After

Width:  |  Height:  |  Size: 178 B

View file

@ -0,0 +1,276 @@
mcl_paintings = {}
dofile(minetest.get_modpath(minetest.get_current_modname()).."/paintings.lua")
local S = minetest.get_translator("mcl_paintings")
local wood = "[combine:16x16:-192,0=mcl_paintings_paintings.png"
-- Check if there's a painting for provided painting size.
-- If yes, returns the arguments.
-- If not, returns the next smaller available painting.
local shrink_painting = function(x, y)
if x > 4 or y > 4 then
return nil
end
local xstart = x
local painting
while not painting do
painting = mcl_paintings.paintings[y] and mcl_paintings.paintings[y][x]
if type(painting) == "table" then
break
elseif type(painting) == "number" then
x = painting
painting = nil
else
x = xstart
y = y - 1
end
if y < 1 then
return nil
end
end
if type(painting) == "table" then
return x, y
end
end
local get_painting = function(x, y, motive)
local painting = mcl_paintings.paintings[y] and mcl_paintings.paintings[y][x] and mcl_paintings.paintings[y][x][motive]
if not painting then
return nil
end
local px, py = -painting.cx, -painting.cy
local sx, sy = 16*x, 16*y
return "[combine:"..sx.."x"..sy..":"..px..","..py.."=mcl_paintings_paintings.png"
end
local get_random_painting = function(x, y)
if not mcl_paintings.paintings[y] or not mcl_paintings.paintings[y][x] then
return nil
end
local max = #mcl_paintings.paintings[y][x]
if max < 1 then
return nil
end
local r = math.random(1, max)
return get_painting(x, y, r), r
end
local size_to_minmax = function(size)
local min, max
if size == 2 then
min = -0.5
max = 1.5
elseif size == 3 then
min = -1.5
max = 1.5
elseif size == 4 then
min = -1.5
max = 2.5
else
min = -0.5
max = 0.5
end
return min, max
end
local size_to_minmax_entity = function(size)
return -size/2, size/2
end
local set_entity = function(object)
local ent = object:get_luaentity()
local wallm = ent._facing
local xsize = ent._xsize
local ysize = ent._ysize
local exmin, exmax = size_to_minmax_entity(xsize)
local eymin, eymax = size_to_minmax_entity(ysize)
local visual_size = { x=xsize-0.0001, y=ysize-0.0001, z=1/32 }
if not ent._xsize or not ent._ysize or not ent._motive then
minetest.log("error", "[mcl_paintings] Painting loaded with missing painting values!")
return
end
local painting = get_painting(xsize, ysize, ent._motive)
if not painting then
minetest.log("error", "[mcl_paintings] No painting found for size "
..xsize..","..ysize..", motive number "..ent._motive.."!")
return
end
if wallm == 4 or wallm == 5 then
object:set_properties({
selectionbox = { exmin, eymin, -1/64, exmax, eymax, 1/64 },
visual_size = visual_size,
textures = { wood, wood, wood, wood, painting, wood },
})
else
object:set_properties({
selectionbox = { -1/64, eymin, exmin, 1/64, eymax, exmax },
visual_size = visual_size,
textures = { wood, wood, wood, wood, painting, wood },
})
end
local dir = minetest.wallmounted_to_dir(wallm)
if not dir then
return
end
object:set_yaw(minetest.dir_to_yaw(dir))
end
minetest.register_entity("mcl_paintings:painting", {
visual = "cube",
visual_size = { x=0.999, y=0.999, z=1/32 },
selectionbox = { -1/64, -0.5, -0.5, 1/64, 0.5, 0.5 },
physical = false,
collide_with_objects = false,
textures = { wood, wood, wood, wood, wood, wood },
hp_max = 1,
_motive = 0,
_pos = nil,
_facing = 2,
_xsize = 1,
_ysize = 1,
on_activate = function(self, staticdata)
if staticdata and staticdata ~= "" then
local data = minetest.deserialize(staticdata)
if data then
self._facing = data._facing
self._pos = data._pos
self._motive = data._motive
self._xsize = data._xsize
self._ysize = data._ysize
end
end
set_entity(self.object)
end,
get_staticdata = function(self)
local data = {
_facing = self._facing,
_pos = self._pos,
_motive = self._motive,
_xsize = self._xsize,
_ysize = self._ysize,
}
return minetest.serialize(data)
end,
on_death = function(self, killer)
-- Drop as item on death
if not minetest.settings:get_bool("creative_mode") then
local pos = self._pos
if not pos then
pos = self.object:get_pos()
end
minetest.add_item(pos, "mcl_paintings:painting")
end
end,
})
minetest.register_craftitem("mcl_paintings:painting", {
description = S("Painting"),
inventory_image = "mcl_paintings_painting.png",
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type ~= "node" then
return itemstack
end
local dir = vector.subtract(pointed_thing.above, pointed_thing.under)
dir = vector.normalize(dir)
if dir.y ~= 0 then
-- Ceiling/floor paintings are not supported
return itemstack
end
local wallm = minetest.dir_to_wallmounted(dir)
if wallm then
local ppos = pointed_thing.above
local xmax
local ymax = 4
local xmaxes = {}
local ymaxed = false
local negative = dir.x < 0 or dir.z > 0
-- Check maximum possible painting size
local t
for y=0,3 do
for x=0,3 do
local k = x
if negative then
k = -k
end
if dir.z ~= 0 then
t = {x=k,y=y,z=0}
else
t = {x=0,y=y,z=k}
end
local unode = minetest.get_node(vector.add(pointed_thing.under, t))
local anode = minetest.get_node(vector.add(ppos, t))
local udef = minetest.registered_nodes[unode.name]
local adef = minetest.registered_nodes[anode.name]
if (not (udef and udef.walkable)) or (not adef or adef.walkable) then
xmaxes[y+1] = x
if x == 0 and not ymaxed then
ymax = y
ymaxed = true
end
break
end
end
if not xmaxes[y] then
xmaxes[y] = 4
end
end
xmax = math.max(unpack(xmaxes))
local xsize, ysize = xmax, ymax
xsize, ysize = shrink_painting(xsize, ysize)
if not xsize then
return itemstack
end
local _, exmax = size_to_minmax_entity(xsize)
local _, eymax = size_to_minmax_entity(ysize)
local pposa = vector.subtract(ppos, vector.multiply(dir, 0.5-2/64))
local pexmax
local peymax = eymax - 0.5
if negative then
pexmax = -exmax + 0.5
else
pexmax = exmax - 0.5
end
if dir.z ~= 0 then
pposa = vector.add(pposa, {x=pexmax, y=peymax, z=0})
else
pposa = vector.add(pposa, {x=0, y=peymax, z=pexmax})
end
local painting, pid = get_random_painting(xsize, ysize)
if not painting then
minetest.log("error", "[mcl_paintings] No painting found for size "..xsize..","..ysize.."!")
return itemstack
end
local staticdata = {
_facing = wallm,
_pos = ppos,
_motive = pid,
_xsize = xsize,
_ysize = ysize,
}
local obj = minetest.add_entity(pposa, "mcl_paintings:painting", minetest.serialize(staticdata))
if not obj then
return itemstack
end
else
return itemstack
end
if not minetest.settings:get_bool("creative_mode") then
itemstack:take_item()
end
return itemstack
end,
})
minetest.register_craft({
output = "mcl_paintings:painting",
recipe = {
{ "mcl_core:stick", "mcl_core:stick", "mcl_core:stick" },
{ "mcl_core:stick", "group:wool", "mcl_core:stick" },
{ "mcl_core:stick", "mcl_core:stick", "mcl_core:stick" },
}
})

View file

@ -0,0 +1,2 @@
# textdomain:mcl_paintings
Painting=Gemälde

View file

@ -0,0 +1,2 @@
# textdomain:mcl_paintings
Painting=

View file

@ -0,0 +1 @@
name = mcl_paintings

View file

@ -0,0 +1,55 @@
local TS = 16 -- texture size
mcl_paintings.paintings = {
[1] = {
[1] = {
{ cx = 0, cy = 0 },
{ cx = TS, cy = 0 },
{ cx = 2*TS, cy = 0 },
{ cx = 3*TS, cy = 0 },
{ cx = 4*TS, cy = 0 },
{ cx = 5*TS, cy = 0 },
{ cx = 6*TS, cy = 0 },
},
[2] = {
{ cx = 0, cy = 2*TS },
{ cx = 2*TS, cy = 2*TS },
{ cx = 4*TS, cy = 2*TS },
{ cx = 6*TS, cy = 2*TS },
{ cx = 8*TS, cy = 2*TS },
},
[3] = 2,
[4] = 2,
},
[2] = {
[1] = {
{ cx = 0, cy = 4*TS },
{ cx = TS, cy = 4*TS },
},
[2] = {
{ cx = 0, cy = 8*TS },
{ cx = 2*TS, cy = 8*TS },
{ cx = 4*TS, cy = 8*TS },
{ cx = 6*TS, cy = 8*TS },
{ cx = 8*TS, cy = 8*TS },
{ cx = 10*TS, cy = 8*TS },
},
[3] = 2,
[4] = {
{ cx = 0, cy = 6*TS },
},
},
[3] = {
[4] = {
{ cx = 12*TS, cy = 4*TS },
{ cx = 12*TS, cy = 7*TS },
},
},
[4] = {
[4] = {
{ cx = 0, cy = 12*TS },
{ cx = 4*TS, cy = 12*TS },
{ cx = 8*TS, cy = 12*TS },
},
},
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View file

@ -279,8 +279,8 @@ mobs_mc.spawn = {
-- These probably don't need overrides -- These probably don't need overrides
mushroom_island = { mobs_mc.items.mycelium, "mcl_core:mycelium" }, mushroom_island = { mobs_mc.items.mycelium, "mcl_core:mycelium" },
nether_fortress = { mobs_mc.items.nether_brick_block, "mcl_nether:nether_brick", "mcl_portals:nether_air" }, nether_fortress = { mobs_mc.items.nether_brick_block, "mcl_nether:nether_brick", },
nether = { mobs_mc.items.netherrack, "mcl_nether:netherrack", "mcl_portals:nether_air" }, nether = { mobs_mc.items.netherrack, "mcl_nether:netherrack", },
nether_portal = { mobs_mc.items.nether_portal, "mcl_portals:portal" }, nether_portal = { mobs_mc.items.nether_portal, "mcl_portals:portal" },
water = { mobs_mc.items.water_source, "mcl_core:water_source", "default:water_source" }, water = { mobs_mc.items.water_source, "mcl_core:water_source", "default:water_source" },
} }

View file

@ -262,17 +262,6 @@ if c("saddle") then
}) })
end end
if c("saddle") and c("lether") and c("string") and c("iron_ingot") then
minetest.register_craft({
output = "mobs_mc:saddle",
recipe = {
{"mobs:leather", "mobs:leather", "mobs:leather"},
{"farming:string", "", "farming:string"},
{"default:steel_ingot", "", "default:steel_ingot"}
},
})
end
-- Horse Armor -- Horse Armor
local horse_armor_use = S("Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.") local horse_armor_use = S("Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.")
-- TODO: Balance the horse armor strength, compare with MC armor strength -- TODO: Balance the horse armor strength, compare with MC armor strength
@ -568,7 +557,7 @@ if c("totem") then
player:set_wielded_item(wield) player:set_wielded_item(wield)
end end
-- Effects -- Effects
minetest.sound_play({name = "mcl_totems_totem", gain=1}, {pos=ppos, max_hear_distance=16}) minetest.sound_play({name = "mcl_totems_totem", gain=1}, {pos=ppos, max_hear_distance=16}, true)
-- Big totem overlay -- Big totem overlay
if not hud_totem[player:get_player_name()] then if not hud_totem[player:get_player_name()] then
@ -578,6 +567,7 @@ if c("totem") then
position = { x=0.5, y=1 }, position = { x=0.5, y=1 },
scale = { x=17, y=17 }, scale = { x=17, y=17 },
offset = { x=0, y=-178 }, offset = { x=0, y=-178 },
z_index = 100,
}) })
minetest.after(3, function(name) minetest.after(3, function(name)
local player = minetest.get_player_by_name(name) local player = minetest.get_player_by_name(name)

View file

@ -85,7 +85,7 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
if obj:get_luaentity() ~= nil then if obj:get_luaentity() ~= nil then
if obj:get_luaentity().name ~= "mobs_mc:arrow_entity" and obj:get_luaentity().name ~= "__builtin:item" then if obj:get_luaentity().name ~= "mobs_mc:arrow_entity" and obj:get_luaentity().name ~= "__builtin:item" then
local damage = 3 local damage = 3
minetest.sound_play("damage", {pos = pos}) minetest.sound_play("damage", {pos = pos}, true)
obj:punch(self.object, 1.0, { obj:punch(self.object, 1.0, {
full_punch_interval=1.0, full_punch_interval=1.0,
damage_groups={fleshy=damage}, damage_groups={fleshy=damage},
@ -94,7 +94,7 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
end end
else else
local damage = 3 local damage = 3
minetest.sound_play("damage", {pos = pos}) minetest.sound_play("damage", {pos = pos}, true)
obj:punch(self.object, 1.0, { obj:punch(self.object, 1.0, {
full_punch_interval=1.0, full_punch_interval=1.0,
damage_groups={fleshy=damage}, damage_groups={fleshy=damage},
@ -106,7 +106,7 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
if self.lastpos.x~=nil then if self.lastpos.x~=nil then
if node.name ~= "air" then if node.name ~= "air" then
minetest.sound_play("bowhit1", {pos = pos}) minetest.sound_play("bowhit1", {pos = pos}, true)
minetest.add_item(self.lastpos, 'mobs_mc:arrow') minetest.add_item(self.lastpos, 'mobs_mc:arrow')
self.object:remove() self.object:remove()
end end
@ -132,7 +132,7 @@ local throwing_shoot_arrow = function(itemstack, player)
obj:set_velocity({x=dir.x*22, y=dir.y*22, z=dir.z*22}) obj:set_velocity({x=dir.x*22, y=dir.y*22, z=dir.z*22})
obj:set_acceleration({x=dir.x*-3, y=-10, z=dir.z*-3}) obj:set_acceleration({x=dir.x*-3, y=-10, z=dir.z*-3})
obj:set_yaw(player:get_look_yaw()+math.pi) obj:set_yaw(player:get_look_yaw()+math.pi)
minetest.sound_play("throwing_sound", {pos=playerpos}) minetest.sound_play("throwing_sound", {pos=playerpos}, true)
if obj:get_luaentity().player == "" then if obj:get_luaentity().player == "" then
obj:get_luaentity().player = player obj:get_luaentity().player = player
end end
@ -266,7 +266,7 @@ if c("egg") then
pos = playerpos, pos = playerpos,
gain = 1.0, gain = 1.0,
max_hear_distance = 5, max_hear_distance = 5,
}) }, true)
local obj = minetest.add_entity({ local obj = minetest.add_entity({
x = playerpos.x, x = playerpos.x,
@ -399,7 +399,3 @@ if c("snowball") then
end end
--end maikerumine code --end maikerumine code
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC mobs loaded")
end

View file

@ -6,8 +6,8 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:agent", { mobs:register_mob("mobs_mc:agent", {
type = "npc", type = "npc",
spawn_class = "passive",
passive = true, passive = true,
stepheight = 1.2,
hp_min = 20, hp_min = 20,
hp_max = 20, hp_max = 20,
armor = 100, armor = 100,
@ -37,7 +37,3 @@ mobs:register_mob("mobs_mc:agent", {
}) })
mobs:register_egg("mobs_mc:agent", S("Agent"), "mobs_mc_spawn_icon_agent.png", 0) mobs:register_egg("mobs_mc:agent", S("Agent"), "mobs_mc_spawn_icon_agent.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Agent loaded")
end

View file

@ -4,6 +4,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:bat", { mobs:register_mob("mobs_mc:bat", {
type = "animal", type = "animal",
spawn_class = "ambient",
can_despawn = true, can_despawn = true,
passive = true, passive = true,
hp_min = 6, hp_min = 6,
@ -65,8 +66,3 @@ mobs:spawn_specific("mobs_mc:bat", mobs_mc.spawn.solid, {"air"}, 0, maxlight, 20
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:bat", S("Bat"), "mobs_mc_spawn_icon_bat.png", 0) mobs:register_egg("mobs_mc:bat", S("Bat"), "mobs_mc_spawn_icon_bat.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Bat loaded")
end

View file

@ -12,6 +12,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:blaze", { mobs:register_mob("mobs_mc:blaze", {
type = "monster", type = "monster",
spawn_class = "hostile",
hp_min = 20, hp_min = 20,
hp_max = 20, hp_max = 20,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.79, 0.3}, collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.79, 0.3},
@ -124,12 +125,3 @@ mobs:register_arrow("mobs_mc:blaze_fireball", {
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:blaze", S("Blaze"), "mobs_mc_spawn_icon_blaze.png", 0) mobs:register_egg("mobs_mc:blaze", S("Blaze"), "mobs_mc_spawn_icon_blaze.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Blaze loaded")
end

View file

@ -10,6 +10,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:chicken", { mobs:register_mob("mobs_mc:chicken", {
type = "animal", type = "animal",
spawn_class = "passive",
hp_min = 4, hp_min = 4,
hp_max = 4, hp_max = 4,
@ -86,7 +87,7 @@ mobs:register_mob("mobs_mc:chicken", {
pos = pos, pos = pos,
gain = 1.0, gain = 1.0,
max_hear_distance = 16, max_hear_distance = 16,
}) }, true)
end, end,
}) })
@ -96,7 +97,3 @@ mobs:spawn_specific("mobs_mc:chicken", mobs_mc.spawn.grassland, {"air"}, 9, mine
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:chicken", S("Chicken"), "mobs_mc_spawn_icon_chicken.png", 0) mobs:register_egg("mobs_mc:chicken", S("Chicken"), "mobs_mc_spawn_icon_chicken.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC chicken loaded")
end

View file

@ -4,6 +4,7 @@ local S = minetest.get_translator("mobs_mc")
local cow_def = { local cow_def = {
type = "animal", type = "animal",
spawn_class = "passive",
hp_min = 10, hp_min = 10,
hp_max = 10, hp_max = 10,
collisionbox = {-0.45, -0.01, -0.45, 0.45, 1.39, 0.45}, collisionbox = {-0.45, -0.01, -0.45, 0.45, 1.39, 0.45},
@ -87,7 +88,7 @@ mooshroom_def.on_rightclick = function(self, clicker)
-- Use shears to get mushrooms and turn mooshroom into cow -- Use shears to get mushrooms and turn mooshroom into cow
if item:get_name() == mobs_mc.items.shears then if item:get_name() == mobs_mc.items.shears then
local pos = self.object:get_pos() local pos = self.object:get_pos()
minetest.sound_play("shears", {pos = pos}) minetest.sound_play("shears", {pos = pos}, true)
if self.base_texture[1] == "mobs_mc_mooshroom_brown.png" then if self.base_texture[1] == "mobs_mc_mooshroom_brown.png" then
minetest.add_item({x=pos.x, y=pos.y+1.4, z=pos.z}, mobs_mc.items.mushroom_brown .. " 5") minetest.add_item({x=pos.x, y=pos.y+1.4, z=pos.z}, mobs_mc.items.mushroom_brown .. " 5")
@ -135,13 +136,9 @@ mobs:register_mob("mobs_mc:mooshroom", mooshroom_def)
-- Spawning -- Spawning
mobs:spawn_specific("mobs_mc:cow", mobs_mc.spawn.grassland, {"air"}, 9, minetest.LIGHT_MAX+1, 30, 17000, 20, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max) mobs:spawn_specific("mobs_mc:cow", mobs_mc.spawn.grassland, {"air"}, 9, minetest.LIGHT_MAX+1, 30, 17000, 10, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max)
mobs:spawn_specific("mobs_mc:mooshroom", mobs_mc.spawn.mushroom_island, {"air"}, 9, minetest.LIGHT_MAX+1, 30, 17000, 10, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max) mobs:spawn_specific("mobs_mc:mooshroom", mobs_mc.spawn.mushroom_island, {"air"}, 9, minetest.LIGHT_MAX+1, 30, 17000, 5, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max)
-- spawn egg -- spawn egg
mobs:register_egg("mobs_mc:cow", S("Cow"), "mobs_mc_spawn_icon_cow.png", 0) mobs:register_egg("mobs_mc:cow", S("Cow"), "mobs_mc_spawn_icon_cow.png", 0)
mobs:register_egg("mobs_mc:mooshroom", S("Mooshroom"), "mobs_mc_spawn_icon_mooshroom.png", 0) mobs:register_egg("mobs_mc:mooshroom", S("Mooshroom"), "mobs_mc_spawn_icon_mooshroom.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Cow loaded")
end

View file

@ -11,6 +11,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:creeper", { mobs:register_mob("mobs_mc:creeper", {
type = "monster", type = "monster",
spawn_class = "hostile",
hp_min = 20, hp_min = 20,
hp_max = 20, hp_max = 20,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.69, 0.3}, collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.69, 0.3},
@ -35,9 +36,8 @@ mobs:register_mob("mobs_mc:creeper", {
runaway_from = { "mobs_mc:ocelot", "mobs_mc:cat" }, runaway_from = { "mobs_mc:ocelot", "mobs_mc:cat" },
attack_type = "explode", attack_type = "explode",
explosion_radius = 3, explosion_strength = 3,
reach = 4, reach = 4,
explosion_damage_radius = 7,
explosion_timer = 1.5, explosion_timer = 1.5,
allow_fuse_reset = true, allow_fuse_reset = true,
stop_to_explode = true, stop_to_explode = true,
@ -57,19 +57,19 @@ mobs:register_mob("mobs_mc:creeper", {
item:add_wear(1000) item:add_wear(1000)
-- Tool break sound -- Tool break sound
if item:get_count() == 0 and wdef.sound and wdef.sound.breaks then if item:get_count() == 0 and wdef.sound and wdef.sound.breaks then
minetest.sound_play(wdef.sound.breaks, {pos = clicker:get_pos(), gain = 0.5}) minetest.sound_play(wdef.sound.breaks, {pos = clicker:get_pos(), gain = 0.5}, true)
end end
clicker:set_wielded_item(item) clicker:set_wielded_item(item)
end end
self._forced_explosion_countdown_timer = self.explosion_timer self._forced_explosion_countdown_timer = self.explosion_timer
minetest.sound_play(self.sounds.attack, {pos = self.object:get_pos(), gain = 1, max_hear_distance = 16}) minetest.sound_play(self.sounds.attack, {pos = self.object:get_pos(), gain = 1, max_hear_distance = 16}, true)
end end
end, end,
do_custom = function(self, dtime) do_custom = function(self, dtime)
if self._forced_explosion_countdown_timer ~= nil then if self._forced_explosion_countdown_timer ~= nil then
self._forced_explosion_countdown_timer = self._forced_explosion_countdown_timer - dtime self._forced_explosion_countdown_timer = self._forced_explosion_countdown_timer - dtime
if self._forced_explosion_countdown_timer <= 0 then if self._forced_explosion_countdown_timer <= 0 then
mobs:boom(self, self.object:get_pos(), self.explosion_radius) mobs:boom(self, self.object:get_pos(), self.explosion_strength)
self.object:remove() self.object:remove()
end end
end end
@ -122,7 +122,3 @@ mobs:spawn_specific("mobs_mc:creeper", mobs_mc.spawn.solid, {"air"}, 0, 7, 20, 1
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:creeper", S("Creeper"), "mobs_mc_spawn_icon_creeper.png", 0) mobs:register_egg("mobs_mc:creeper", S("Creeper"), "mobs_mc_spawn_icon_creeper.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Creeper loaded")
end

View file

@ -6,6 +6,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:enderdragon", { mobs:register_mob("mobs_mc:enderdragon", {
type = "monster", type = "monster",
spawn_class = "hostile",
pathfinding = 1, pathfinding = 1,
attacks_animals = true, attacks_animals = true,
walk_chance = 100, walk_chance = 100,
@ -32,7 +33,6 @@ mobs:register_mob("mobs_mc:enderdragon", {
damage = 10, damage = 10,
jump = true, jump = true,
jump_height = 14, jump_height = 14,
stepheight = 1.2,
fly = true, fly = true,
dogshoot_switch = 1, dogshoot_switch = 1,
dogshoot_count_max =5, dogshoot_count_max =5,
@ -81,7 +81,7 @@ mobs:register_arrow("mobs_mc:dragon_fireball", {
end, end,
hit_mob = function(self, mob) hit_mob = function(self, mob)
minetest.sound_play("tnt_explode", {pos = mob:get_pos(), gain = 1.5, max_hear_distance = 2*64}) minetest.sound_play("tnt_explode", {pos = mob:get_pos(), gain = 1.5, max_hear_distance = 2*64}, true)
mob:punch(self.object, 1.0, { mob:punch(self.object, 1.0, {
full_punch_interval = 0.5, full_punch_interval = 0.5,
damage_groups = {fleshy = 12}, damage_groups = {fleshy = 12},

View file

@ -168,9 +168,9 @@ local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
mobs:register_mob("mobs_mc:enderman", { mobs:register_mob("mobs_mc:enderman", {
-- TODO: Endermen should be classified as passive -- TODO: Endermen should be classified as passive
type = "monster", type = "monster",
spawn_class = "passive",
passive = false, passive = false,
pathfinding = 1, pathfinding = 1,
stepheight = 1.2,
hp_min = 40, hp_min = 40,
hp_max = 40, hp_max = 40,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 2.89, 0.3}, collisionbox = {-0.3, -0.01, -0.3, 0.3, 2.89, 0.3},
@ -255,7 +255,7 @@ mobs:register_mob("mobs_mc:enderman", {
self.animation = select_enderman_animation("block") self.animation = select_enderman_animation("block")
mobs:set_animation(self, self.animation.current) mobs:set_animation(self, self.animation.current)
if def.sounds and def.sounds.dug then if def.sounds and def.sounds.dug then
minetest.sound_play(def.sounds.dug, {pos = take_pos, max_hear_distance = 16}) minetest.sound_play(def.sounds.dug, {pos = take_pos, max_hear_distance = 16}, true)
end end
end end
end end
@ -276,7 +276,7 @@ mobs:register_mob("mobs_mc:enderman", {
self.animation = select_enderman_animation("normal") self.animation = select_enderman_animation("normal")
mobs:set_animation(self, self.animation.current) mobs:set_animation(self, self.animation.current)
if def.sounds and def.sounds.place then if def.sounds and def.sounds.place then
minetest.sound_play(def.sounds.place, {pos = place_pos, max_hear_distance = 16}) minetest.sound_play(def.sounds.place, {pos = place_pos, max_hear_distance = 16}, true)
end end
self._taken_node = "" self._taken_node = ""
end end
@ -337,9 +337,3 @@ mobs:spawn_specific("mobs_mc:enderman", mobs_mc.spawn.solid, {"air"}, 0, 7, 30,
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:enderman", S("Enderman"), "mobs_mc_spawn_icon_enderman.png", 0) mobs:register_egg("mobs_mc:enderman", S("Enderman"), "mobs_mc_spawn_icon_enderman.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Enderman loaded")
end

View file

@ -6,6 +6,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:endermite", { mobs:register_mob("mobs_mc:endermite", {
type = "monster", type = "monster",
spawn_class = "hostile",
passive = false, passive = false,
hp_min = 8, hp_min = 8,
hp_max = 8, hp_max = 8,

View file

@ -12,6 +12,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:ghast", { mobs:register_mob("mobs_mc:ghast", {
type = "monster", type = "monster",
spawn_class = "hostile",
pathfinding = 1, pathfinding = 1,
group_attack = true, group_attack = true,
hp_min = 10, hp_min = 10,
@ -78,13 +79,12 @@ mobs:register_arrow("mobs_mc:fireball", {
textures = {"mcl_fire_fire_charge.png"}, textures = {"mcl_fire_fire_charge.png"},
velocity = 15, velocity = 15,
-- direct hit, no fire... just plenty of pain
hit_player = function(self, player) hit_player = function(self, player)
player:punch(self.object, 1.0, { player:punch(self.object, 1.0, {
full_punch_interval = 1.0, full_punch_interval = 1.0,
damage_groups = {fleshy = 6}, damage_groups = {fleshy = 6},
}, nil) }, nil)
mobs:boom(self, self.object:get_pos(), 3) mobs:boom(self, self.object:get_pos(), 1, true)
end, end,
hit_mob = function(self, mob) hit_mob = function(self, mob)
@ -92,12 +92,11 @@ mobs:register_arrow("mobs_mc:fireball", {
full_punch_interval = 1.0, full_punch_interval = 1.0,
damage_groups = {fleshy = 6}, damage_groups = {fleshy = 6},
}, nil) }, nil)
mobs:boom(self, self.object:get_pos(), 3) mobs:boom(self, self.object:get_pos(), 1, true)
end, end,
-- node hit, explode
hit_node = function(self, pos, node) hit_node = function(self, pos, node)
mobs:boom(self, pos, 3) mobs:boom(self, pos, 1, true)
end end
}) })
@ -106,7 +105,3 @@ mobs:register_arrow("mobs_mc:fireball", {
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:ghast", S("Ghast"), "mobs_mc_spawn_icon_ghast.png", 0) mobs:register_egg("mobs_mc:ghast", S("Ghast"), "mobs_mc_spawn_icon_ghast.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Ghast loaded")
end

View file

@ -8,6 +8,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:guardian", { mobs:register_mob("mobs_mc:guardian", {
type = "monster", type = "monster",
spawn_class = "hostile",
hp_min = 30, hp_min = 30,
hp_max = 30, hp_max = 30,
breath_max = -1, breath_max = -1,
@ -76,12 +77,13 @@ mobs:register_mob("mobs_mc:guardian", {
}, },
fly = true, fly = true,
fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source }, fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
stepheight = 0.1,
jump = false, jump = false,
view_range = 16, view_range = 16,
}) })
mobs:spawn_specific("mobs_mc:guardian", mobs_mc.spawn.water, mobs_mc.spawn_water, 0, minetest.LIGHT_MAX+1, 30, 25000, 2, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.water - 10) -- Spawning disabled due to size issues
-- TODO: Re-enable spawning
--mobs:spawn_specific("mobs_mc:guardian", mobs_mc.spawn.water, mobs_mc.spawn_water, 0, minetest.LIGHT_MAX+1, 30, 25000, 2, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.water - 10)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:guardian", S("Guardian"), "mobs_mc_spawn_icon_guardian.png", 0) mobs:register_egg("mobs_mc:guardian", S("Guardian"), "mobs_mc_spawn_icon_guardian.png", 0)

View file

@ -8,6 +8,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:guardian_elder", { mobs:register_mob("mobs_mc:guardian_elder", {
type = "monster", type = "monster",
spawn_class = "hostile",
hp_min = 80, hp_min = 80,
hp_max = 80, hp_max = 80,
breath_max = -1, breath_max = -1,
@ -83,12 +84,13 @@ mobs:register_mob("mobs_mc:guardian_elder", {
}, },
fly = true, fly = true,
fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source }, fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
stepheight = 0.1,
jump = false, jump = false,
view_range = 16, view_range = 16,
}) })
mobs:spawn_specific("mobs_mc:guardian_elder", mobs_mc.spawn.water, mobs_mc.spawn_water, 0, minetest.LIGHT_MAX+1, 30, 40000, 2, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.water-18) -- Spawning disabled due to size issues
-- TODO: Re-enable spawning
-- mobs:spawn_specific("mobs_mc:guardian_elder", mobs_mc.spawn.water, mobs_mc.spawn_water, 0, minetest.LIGHT_MAX+1, 30, 40000, 2, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.water-18)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:guardian_elder", S("Elder Guardian"), "mobs_mc_spawn_icon_guardian_elder.png", 0) mobs:register_egg("mobs_mc:guardian_elder", S("Elder Guardian"), "mobs_mc_spawn_icon_guardian_elder.png", 0)

View file

@ -84,6 +84,7 @@ end
-- Horse -- Horse
local horse = { local horse = {
type = "animal", type = "animal",
spawn_class = "passive",
visual = "mesh", visual = "mesh",
mesh = "mobs_mc_horse.b3d", mesh = "mobs_mc_horse.b3d",
visual_size = {x=3.0, y=3.0}, visual_size = {x=3.0, y=3.0},
@ -245,7 +246,7 @@ local horse = {
local tex = horse_extra_texture(self) local tex = horse_extra_texture(self)
self.base_texture = tex self.base_texture = tex
self.object:set_properties({textures = self.base_texture}) self.object:set_properties({textures = self.base_texture})
minetest.sound_play({name = "mcl_armor_equip_leather"}, {gain=0.5, max_hear_distance=12, pos=self.object:get_pos()}) minetest.sound_play({name = "mcl_armor_equip_leather"}, {gain=0.5, max_hear_distance=12, pos=self.object:get_pos()}, true)
-- Put on horse armor if tamed -- Put on horse armor if tamed
elseif can_equip_horse_armor(self.name) and not self.driver and not self._horse_armor elseif can_equip_horse_armor(self.name) and not self.driver and not self._horse_armor
@ -255,8 +256,8 @@ local horse = {
-- Put on armor and take armor from player's inventory -- Put on armor and take armor from player's inventory
local armor = minetest.get_item_group(iname, "horse_armor") local armor = minetest.get_item_group(iname, "horse_armor")
self._horse_armor = iname self._horse_armor = iname
local w = clicker:get_wielded_item()
if not minetest.settings:get_bool("creative_mode") then if not minetest.settings:get_bool("creative_mode") then
local w = clicker:get_wielded_item()
w:take_item() w:take_item()
clicker:set_wielded_item(w) clicker:set_wielded_item(w)
end end
@ -277,7 +278,7 @@ local horse = {
self.object:set_properties({textures = self.base_texture}) self.object:set_properties({textures = self.base_texture})
local def = w:get_definition() local def = w:get_definition()
if def.sounds and def.sounds._mcl_armor_equip then if def.sounds and def.sounds._mcl_armor_equip then
minetest.sound_play({name = def.sounds._mcl_armor_equip}, {gain=0.5, max_hear_distance=12, pos=self.object:get_pos()}) minetest.sound_play({name = def.sounds._mcl_armor_equip}, {gain=0.5, max_hear_distance=12, pos=self.object:get_pos()}, true)
end end
-- Mount horse -- Mount horse
@ -425,8 +426,8 @@ mobs:register_mob("mobs_mc:mule", mule)
--=========================== --===========================
--Spawn Function --Spawn Function
mobs:spawn_specific("mobs_mc:horse", mobs_mc.spawn.grassland_savanna, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 15000, 12, mobs_mc.spawn_height.water+3, mobs_mc.spawn_height.overworld_max) mobs:spawn_specific("mobs_mc:horse", mobs_mc.spawn.grassland_savanna, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 15000, 4, mobs_mc.spawn_height.water+3, mobs_mc.spawn_height.overworld_max)
mobs:spawn_specific("mobs_mc:donkey", mobs_mc.spawn.grassland_savanna, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 15000, 12, mobs_mc.spawn_height.water+3, mobs_mc.spawn_height.overworld_max) mobs:spawn_specific("mobs_mc:donkey", mobs_mc.spawn.grassland_savanna, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 15000, 4, mobs_mc.spawn_height.water+3, mobs_mc.spawn_height.overworld_max)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:horse", S("Horse"), "mobs_mc_spawn_icon_horse.png", 0) mobs:register_egg("mobs_mc:horse", S("Horse"), "mobs_mc_spawn_icon_horse.png", 0)
@ -434,8 +435,3 @@ mobs:register_egg("mobs_mc:skeleton_horse", S("Skeleton Horse"), "mobs_mc_spawn_
mobs:register_egg("mobs_mc:zombie_horse", S("Zombie Horse"), "mobs_mc_spawn_icon_horse_zombie.png", 0) mobs:register_egg("mobs_mc:zombie_horse", S("Zombie Horse"), "mobs_mc_spawn_icon_horse_zombie.png", 0)
mobs:register_egg("mobs_mc:donkey", S("Donkey"), "mobs_mc_spawn_icon_donkey.png", 0) mobs:register_egg("mobs_mc:donkey", S("Donkey"), "mobs_mc_spawn_icon_donkey.png", 0)
mobs:register_egg("mobs_mc:mule", S("Mule"), "mobs_mc_spawn_icon_mule.png", 0) mobs:register_egg("mobs_mc:mule", S("Mule"), "mobs_mc_spawn_icon_mule.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Horse loaded")
end

View file

@ -98,7 +98,3 @@ COLISIONBOX in minetest press f5 to see where you are looking at then put these
--]] --]]
-- --
-- --
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "[MOD] mobs_mc loaded")
end

View file

@ -13,6 +13,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:iron_golem", { mobs:register_mob("mobs_mc:iron_golem", {
type = "npc", type = "npc",
spawn_class = "passive",
passive = true, passive = true,
hp_min = 100, hp_min = 100,
hp_max = 100, hp_max = 100,
@ -172,7 +173,3 @@ mobs_mc.tools.check_iron_golem_summon = function(pos)
end end
end end
end end
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Iron Golem loaded")
end

View file

@ -26,6 +26,7 @@ local carpets = {
mobs:register_mob("mobs_mc:llama", { mobs:register_mob("mobs_mc:llama", {
type = "animal", type = "animal",
spawn_class = "passive",
hp_min = 15, hp_min = 15,
hp_max = 30, hp_max = 30,
passive = false, passive = false,
@ -130,7 +131,6 @@ mobs:register_mob("mobs_mc:llama", {
if self.tamed and not self.child and self.owner == clicker:get_player_name() then if self.tamed and not self.child and self.owner == clicker:get_player_name() then
-- Place carpet -- Place carpet
--[[ TODO: Re-enable this code when carpet textures arrived.
if minetest.get_item_group(item:get_name(), "carpet") == 1 and not self.carpet then if minetest.get_item_group(item:get_name(), "carpet") == 1 and not self.carpet then
for group, carpetdata in pairs(carpets) do for group, carpetdata in pairs(carpets) do
if minetest.get_item_group(item:get_name(), group) == 1 then if minetest.get_item_group(item:get_name(), group) == 1 then
@ -160,7 +160,6 @@ mobs:register_mob("mobs_mc:llama", {
end end
end end
end end
]]
-- detatch player already riding llama -- detatch player already riding llama
if self.driver and clicker == self.driver then if self.driver and clicker == self.driver then
@ -180,8 +179,6 @@ mobs:register_mob("mobs_mc:llama", {
end end
end, end,
--[[
TODO: Enable this code when carpet textures arrived.
on_breed = function(parent1, parent2) on_breed = function(parent1, parent2)
-- When breeding, make sure the child has no carpet -- When breeding, make sure the child has no carpet
local pos = parent1.object:get_pos() local pos = parent1.object:get_pos()
@ -203,7 +200,6 @@ mobs:register_mob("mobs_mc:llama", {
return false return false
end end
end, end,
]]
}) })
@ -212,7 +208,3 @@ mobs:spawn_specific("mobs_mc:llama", mobs_mc.spawn.savanna, {"air"}, 0, minetest
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:llama", S("Llama"), "mobs_mc_spawn_icon_llama.png", 0) mobs:register_egg("mobs_mc:llama", S("Llama"), "mobs_mc_spawn_icon_llama.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Llama loaded")
end

View file

@ -0,0 +1,75 @@
# textdomain: mobs_mc
Totem of Undying=Totem d'immortalité
A totem of undying is a rare artifact which may safe you from certain death.=Un totem d'immortalité est un artefact rare qui peut vous protéger d'une mort certaine.
The totem only works while you hold it in your hand. If you receive fatal damage, you are saved from death and you get a second chance with 1 HP. The totem is destroyed in the process, however.=Le totem ne fonctionne que lorsque vous le tenez dans votre main. Si vous recevez des dégâts mortels, vous êtes sauvé de la mort et vous obtenez une seconde chance avec 1 HP. Cependant, le totem est détruit.
Agent=Agent
Bat=Chauve-souris
Blaze=Blaze
Chicken=Poulet
Cow=Vache
Mooshroom=Champimeuh
Creeper=Creeper
Ender Dragon=Ender Dragon
Enderman=Enderman
Endermite=Endermite
Ghast=Ghast
Elder Guardian=Gardien de l'Elder
Guardian=Gardien
Horse=Cheval
Skeleton Horse=Cheval-squelette
Zombie Horse=Cheval-zombie
Donkey=Âne
Mule=Mule
Iron Golem=Golem de fer
Llama=Lama
Ocelot=Ocelot
Parrot=Perroquet
Pig=Cochon
Polar Bear=Ours blanc
Rabbit=Lapin
Killer Bunny=Lapin tueur
Sheep=Mouton
Shulker=Shulker
Silverfish=Poisson d'argent
Skeleton=Squelette
Stray=Vagabond
Wither Skeleton=Wither squelette
Magma Cube=Cube de magma
Slime=Slime
Snow Golem=Golem de neige
Spider=Araignée
Cave Spider=Araignée venimeuse
Squid=Poulpe
Vex=Vex
Evoker=Invocateur
Illusioner=Illusionniste
Villager=Villageois
Vindicator=Vindicateur
Zombie Villager=Zombie Villageois
Witch=Sorcière
Wither=Wither
Wolf=Loup
Husk=Zombie Momifié
Zombie=Zombie
Zombie Pigman=Zombie Cochon
Iron Horse Armor=Armure de cheval en fer
Iron horse armor can be worn by horses to increase their protection from harm a bit.=L'armure de cheval en fer peut être portée par les chevaux pour augmenter un peu leur protection contre les dommages.
Golden Horse Armor=Armure de cheval en or
Golden horse armor can be worn by horses to increase their protection from harm.=Une armure de cheval en or peut être portée par les chevaux pour augmenter leur protection contre les dommages.
Diamond Horse Armor=Armure de cheval en diamant
Diamond horse armor can be worn by horses to greatly increase their protection from harm.=Une armure de cheval en diament peut être portée par les chevaux pour augmenter fortement leur protection contre les dommages.
Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.=Placez-la sur un cheval pour mettre l'armure de cheval. Les ânes et les mules ne peuvent pas porter d'armure de cheval.
Farmer=Fermier
Fisherman=Pêcheur
Fletcher=Archer
Shepherd=Berger
Librarian=Bibliothécaire
Cartographer=Cartographe
Armorer=Armurier
Leatherworker=Tanneur
Butcher=Boucher
Weapon Smith=Fabriquant d'arme
Tool Smith=Fabriquant d'outil
Cleric=Clerc
Nitwit=Crétin
Protects you from death while wielding it=Vous protège de la mort en la maniant

View file

@ -28,6 +28,7 @@ end
-- Ocelot -- Ocelot
local ocelot = { local ocelot = {
type = "animal", type = "animal",
spawn_class = "passive",
can_despawn = true, can_despawn = true,
hp_min = 10, hp_min = 10,
hp_max = 10, hp_max = 10,
@ -204,7 +205,3 @@ mobs:spawn({
-- spawn eggs -- spawn eggs
-- FIXME: The spawn icon shows a cat texture, not an ocelot texture -- FIXME: The spawn icon shows a cat texture, not an ocelot texture
mobs:register_egg("mobs_mc:ocelot", S("Ocelot"), "mobs_mc_spawn_icon_cat.png", 0) mobs:register_egg("mobs_mc:ocelot", S("Ocelot"), "mobs_mc_spawn_icon_cat.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Ocelot loaded")
end

View file

@ -13,6 +13,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:parrot", { mobs:register_mob("mobs_mc:parrot", {
type = "npc", type = "npc",
spawn_class = "passive",
pathfinding = 1, pathfinding = 1,
hp_min = 6, hp_min = 6,
hp_max = 6, hp_max = 6,
@ -85,7 +86,3 @@ mobs:register_mob("mobs_mc:parrot", {
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:parrot", S("Parrot"), "mobs_mc_spawn_icon_parrot.png", 0, true) mobs:register_egg("mobs_mc:parrot", S("Parrot"), "mobs_mc_spawn_icon_parrot.png", 0, true)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Parrot loaded")
end

View file

@ -4,6 +4,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:pig", { mobs:register_mob("mobs_mc:pig", {
type = "animal", type = "animal",
spawn_class = "passive",
runaway = true, runaway = true,
hp_min = 10, hp_min = 10,
hp_max = 10, hp_max = 10,
@ -125,7 +126,7 @@ mobs:register_mob("mobs_mc:pig", {
stack:take_item() stack:take_item()
inv:set_stack("main", clicker:get_wield_index(), stack) inv:set_stack("main", clicker:get_wield_index(), stack)
end end
minetest.sound_play({name = "mcl_armor_equip_leather"}, {gain=0.5, max_hear_distance=8, pos=self.object:get_pos()}) minetest.sound_play({name = "mcl_armor_equip_leather"}, {gain=0.5, max_hear_distance=8, pos=self.object:get_pos()}, true)
return return
end end
@ -149,7 +150,7 @@ mobs:register_mob("mobs_mc:pig", {
-- Break carrot on a stick -- Break carrot on a stick
local def = wielditem:get_definition() local def = wielditem:get_definition()
if def.sounds and def.sounds.breaks then if def.sounds and def.sounds.breaks then
minetest.sound_play(def.sounds.breaks, {pos = clicker:get_pos(), max_hear_distance = 8, gain = 0.5}) minetest.sound_play(def.sounds.breaks, {pos = clicker:get_pos(), max_hear_distance = 8, gain = 0.5}, true)
end end
wielditem = {name = mobs_mc.items.fishing_rod, count = 1} wielditem = {name = mobs_mc.items.fishing_rod, count = 1}
else else
@ -177,12 +178,7 @@ mobs:register_mob("mobs_mc:pig", {
end, end,
}) })
mobs:spawn_specific("mobs_mc:pig", mobs_mc.spawn.grassland, {"air"}, 9, minetest.LIGHT_MAX+1, 30, 15000, 30, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max) mobs:spawn_specific("mobs_mc:pig", mobs_mc.spawn.grassland, {"air"}, 9, minetest.LIGHT_MAX+1, 30, 15000, 8, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max)
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:pig", S("Pig"), "mobs_mc_spawn_icon_pig.png", 0) mobs:register_egg("mobs_mc:pig", S("Pig"), "mobs_mc_spawn_icon_pig.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Pig loaded")
end

View file

@ -9,9 +9,9 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:polar_bear", { mobs:register_mob("mobs_mc:polar_bear", {
type = "animal", type = "animal",
spawn_class = "passive",
runaway = false, runaway = false,
passive = false, passive = false,
stepheight = 1.2,
hp_min = 30, hp_min = 30,
hp_max = 30, hp_max = 30,
breath_max = -1, breath_max = -1,
@ -60,8 +60,3 @@ mobs:spawn_specific("mobs_mc:polar_bear", mobs_mc.spawn.snow, {"air"}, 0, minete
-- spawn egg -- spawn egg
mobs:register_egg("mobs_mc:polar_bear", S("Polar Bear"), "mobs_mc_spawn_icon_polarbear.png", 0) mobs:register_egg("mobs_mc:polar_bear", S("Polar Bear"), "mobs_mc_spawn_icon_polarbear.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Polar Bear loaded")
end

View file

@ -4,6 +4,7 @@ local S = minetest.get_translator("mobs_mc")
local rabbit = { local rabbit = {
type = "animal", type = "animal",
spawn_class = "passive",
passive = true, passive = true,
reach = 1, reach = 1,
@ -74,6 +75,7 @@ mobs:register_mob("mobs_mc:rabbit", rabbit)
-- The killer bunny (Only with spawn egg) -- The killer bunny (Only with spawn egg)
local killer_bunny = table.copy(rabbit) local killer_bunny = table.copy(rabbit)
killer_bunny.type = "monster" killer_bunny.type = "monster"
killer_bunny.spawn_class = "hostile"
killer_bunny.attack_type = "dogfight" killer_bunny.attack_type = "dogfight"
killer_bunny.specific_attack = { "player", "mobs_mc:wolf", "mobs_mc:dog" } killer_bunny.specific_attack = { "player", "mobs_mc:wolf", "mobs_mc:dog" }
killer_bunny.damage = 8 killer_bunny.damage = 8
@ -102,7 +104,7 @@ local spawn = {
name = "mobs_mc:rabbit", name = "mobs_mc:rabbit",
neighbors = {"air"}, neighbors = {"air"},
chance = 15000, chance = 15000,
active_object_count = 99, active_object_count = 10,
min_light = 0, min_light = 0,
max_light = minetest.LIGHT_MAX+1, max_light = minetest.LIGHT_MAX+1,
min_height = mobs_mc.spawn_height.overworld_min, min_height = mobs_mc.spawn_height.overworld_min,
@ -160,8 +162,3 @@ mobs:register_egg("mobs_mc:rabbit", S("Rabbit"), "mobs_mc_spawn_icon_rabbit.png"
-- Note: This spawn egg does not exist in Minecraft -- Note: This spawn egg does not exist in Minecraft
mobs:register_egg("mobs_mc:killer_bunny", S("Killer Bunny"), "mobs_mc_spawn_icon_rabbit.png^[colorize:#FF0000:192", 0) -- TODO: Update inventory image mobs:register_egg("mobs_mc:killer_bunny", S("Killer Bunny"), "mobs_mc_spawn_icon_rabbit.png^[colorize:#FF0000:192", 0) -- TODO: Update inventory image
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Bunny loaded")
end

View file

@ -44,6 +44,7 @@ local gotten_texture = { "blank.png", "mobs_mc_sheep.png" }
--mcsheep --mcsheep
mobs:register_mob("mobs_mc:sheep", { mobs:register_mob("mobs_mc:sheep", {
type = "animal", type = "animal",
spawn_class = "passive",
hp_min = 8, hp_min = 8,
hp_max = 8, hp_max = 8,
@ -155,7 +156,7 @@ mobs:register_mob("mobs_mc:sheep", {
if item:get_name() == mobs_mc.items.shears and not self.gotten and not self.child then if item:get_name() == mobs_mc.items.shears and not self.gotten and not self.child then
self.gotten = true self.gotten = true
local pos = self.object:get_pos() local pos = self.object:get_pos()
minetest.sound_play("shears", {pos = pos}) minetest.sound_play("shears", {pos = pos}, true)
pos.y = pos.y + 0.5 pos.y = pos.y + 0.5
if not self.color then if not self.color then
self.color = "unicolor_white" self.color = "unicolor_white"
@ -262,7 +263,3 @@ mobs:spawn_specific("mobs_mc:sheep", mobs_mc.spawn.grassland, {"air"}, 0, minete
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:sheep", S("Sheep"), "mobs_mc_spawn_icon_sheep.png", 0) mobs:register_egg("mobs_mc:sheep", S("Sheep"), "mobs_mc_spawn_icon_sheep.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Sheep loaded")
end

View file

@ -13,6 +13,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:shulker", { mobs:register_mob("mobs_mc:shulker", {
type = "monster", type = "monster",
spawn_class = "hostile",
attack_type = "shoot", attack_type = "shoot",
shoot_interval = 0.5, shoot_interval = 0.5,
arrow = "mobs_mc:shulkerbullet", arrow = "mobs_mc:shulkerbullet",
@ -77,7 +78,3 @@ mobs:register_arrow("mobs_mc:shulkerbullet", {
mobs:register_egg("mobs_mc:shulker", S("Schulker"), "mobs_mc_spawn_icon_shulker.png", 0) mobs:register_egg("mobs_mc:shulker", S("Schulker"), "mobs_mc_spawn_icon_shulker.png", 0)
mobs:spawn_specific("mobs_mc:shulker", mobs_mc.spawn.end_city, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 5000, 2, mobs_mc.spawn_height.end_min, mobs_mc.spawn_height.end_max) mobs:spawn_specific("mobs_mc:shulker", mobs_mc.spawn.end_city, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 5000, 2, mobs_mc.spawn_height.end_min, mobs_mc.spawn_height.end_max)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Shulkers loaded")
end

View file

@ -6,6 +6,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:silverfish", { mobs:register_mob("mobs_mc:silverfish", {
type = "monster", type = "monster",
spawn_class = "hostile",
passive = false, passive = false,
group_attack = true, group_attack = true,
reach = 1, reach = 1,

View file

@ -14,6 +14,7 @@ local mod_bows = minetest.get_modpath("mcl_bows") ~= nil
local skeleton = { local skeleton = {
type = "monster", type = "monster",
spawn_class = "hostile",
hp_min = 20, hp_min = 20,
hp_max = 20, hp_max = 20,
breath_max = -1, breath_max = -1,
@ -134,7 +135,3 @@ mobs:spawn_specific("mobs_mc:stray", mobs_mc.spawn.snow, {"air"}, 0, 7, 20, 1900
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:skeleton", S("Skeleton"), "mobs_mc_spawn_icon_skeleton.png", 0) mobs:register_egg("mobs_mc:skeleton", S("Skeleton"), "mobs_mc_spawn_icon_skeleton.png", 0)
mobs:register_egg("mobs_mc:stray", S("Stray"), "mobs_mc_spawn_icon_stray.png", 0) mobs:register_egg("mobs_mc:stray", S("Stray"), "mobs_mc_spawn_icon_stray.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Skeleton loaded")
end

View file

@ -11,6 +11,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:witherskeleton", { mobs:register_mob("mobs_mc:witherskeleton", {
type = "monster", type = "monster",
spawn_class = "hostile",
hp_min = 20, hp_min = 20,
hp_max = 20, hp_max = 20,
breath_max = -1, breath_max = -1,
@ -89,7 +90,3 @@ mobs:spawn_specific("mobs_mc:witherskeleton", mobs_mc.spawn.nether_fortress, {"a
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:witherskeleton", S("Wither Skeleton"), "mobs_mc_spawn_icon_witherskeleton.png", 0) mobs:register_egg("mobs_mc:witherskeleton", S("Wither Skeleton"), "mobs_mc_spawn_icon_witherskeleton.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Wither Skeleton loaded")
end

View file

@ -57,6 +57,7 @@ end
-- Slime -- Slime
local slime_big = { local slime_big = {
type = "monster", type = "monster",
spawn_class = "hostile",
pathfinding = 1, pathfinding = 1,
group_attack = { "mobs_mc:slime_big", "mobs_mc:slime_small", "mobs_mc:slime_tiny" }, group_attack = { "mobs_mc:slime_big", "mobs_mc:slime_small", "mobs_mc:slime_tiny" },
hp_min = 16, hp_min = 16,
@ -156,6 +157,7 @@ mobs:spawn_specific("mobs_mc:slime_big", mobs_mc.spawn.solid, {"air"}, 0, minete
-- Magma cube -- Magma cube
local magma_cube_big = { local magma_cube_big = {
type = "monster", type = "monster",
spawn_class = "hostile",
hp_min = 16, hp_min = 16,
hp_max = 16, hp_max = 16,
collisionbox = {-1.02, -0.01, -1.02, 1.02, 2.03, 1.02}, collisionbox = {-1.02, -0.01, -1.02, 1.02, 2.03, 1.02},
@ -268,8 +270,3 @@ mobs:spawn_specific("mobs_mc:magma_cube_big", mobs_mc.spawn.nether_fortress, {"a
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:magma_cube_big", S("Magma Cube"), "mobs_mc_spawn_icon_magmacube.png") mobs:register_egg("mobs_mc:magma_cube_big", S("Magma Cube"), "mobs_mc_spawn_icon_magmacube.png")
mobs:register_egg("mobs_mc:slime_big", S("Slime"), "mobs_mc_spawn_icon_slime.png") mobs:register_egg("mobs_mc:slime_big", S("Slime"), "mobs_mc_spawn_icon_slime.png")
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Slimes loaded")
end

View file

@ -22,6 +22,7 @@ local gotten_texture = {
mobs:register_mob("mobs_mc:snowman", { mobs:register_mob("mobs_mc:snowman", {
type = "npc", type = "npc",
spawn_class = "passive",
passive = true, passive = true,
hp_min = 4, hp_min = 4,
hp_max = 4, hp_max = 4,
@ -115,7 +116,7 @@ mobs:register_mob("mobs_mc:snowman", {
}) })
local pos = self.object:get_pos() local pos = self.object:get_pos()
minetest.sound_play("shears", {pos = pos}) minetest.sound_play("shears", {pos = pos}, true)
-- Wear out -- Wear out
if not minetest.settings:get_bool("creative_mode") then if not minetest.settings:get_bool("creative_mode") then
@ -163,7 +164,3 @@ end
-- Spawn egg -- Spawn egg
mobs:register_egg("mobs_mc:snowman", S("Snow Golem"), "mobs_mc_spawn_icon_snowman.png", 0) mobs:register_egg("mobs_mc:snowman", S("Snow Golem"), "mobs_mc_spawn_icon_snowman.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Snow Golem loaded")
end

View file

@ -14,6 +14,7 @@ local S = minetest.get_translator("mobs_mc")
local spider = { local spider = {
type = "monster", type = "monster",
spawn_class = "hostile",
passive = false, passive = false,
docile_by_day = true, docile_by_day = true,
attack_type = "dogfight", attack_type = "dogfight",
@ -80,7 +81,3 @@ mobs:spawn_specific("mobs_mc:spider", mobs_mc.spawn.solid, {"air"}, 0, 7, 30, 17
-- spawn eggs -- spawn eggs
mobs:register_egg("mobs_mc:spider", S("Spider"), "mobs_mc_spawn_icon_spider.png", 0) mobs:register_egg("mobs_mc:spider", S("Spider"), "mobs_mc_spawn_icon_spider.png", 0)
mobs:register_egg("mobs_mc:cave_spider", S("Cave Spider"), "mobs_mc_spawn_icon_cave_spider.png", 0) mobs:register_egg("mobs_mc:cave_spider", S("Cave Spider"), "mobs_mc_spawn_icon_cave_spider.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Spiders loaded")
end

View file

@ -8,6 +8,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:squid", { mobs:register_mob("mobs_mc:squid", {
type = "animal", type = "animal",
spawn_class = "water",
can_despawn = true, can_despawn = true,
passive = true, passive = true,
hp_min = 10, hp_min = 10,
@ -42,7 +43,6 @@ mobs:register_mob("mobs_mc:squid", {
}, },
visual_size = {x=3, y=3}, visual_size = {x=3, y=3},
makes_footstep_sound = false, makes_footstep_sound = false,
stepheight = 0.1,
fly = true, fly = true,
fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source }, fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
breathes_in_water = true, breathes_in_water = true,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 346 B

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 362 B

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

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