Compare commits

..

385 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
Wuzzy
02d7f20cc9 Version 0.61.0 2020-03-29 17:13:52 +02:00
Wuzzy
6ce3278dd4 Fix missing variable check in hcl_hoppers 2020-03-29 16:05:30 +02:00
Wuzzy
97ab2e7b38 Update wieldview mod (wieldview_transform group) 2020-03-29 14:52:12 +02:00
Wuzzy
da1c3f635c Revert "Add dummy inventory images for backwards-compat"
This reverts commit 73d93ae969.
2020-03-29 14:38:39 +02:00
Wuzzy
e9f259881f Add LBMs to update to new node formspecs of 0.60.0 2020-03-29 14:35:01 +02:00
Wuzzy
ed63374480 Add missing slot images for dispenser+dropper 2020-03-29 14:15:00 +02:00
Wuzzy
73d93ae969 Add dummy inventory images for backwards-compat
In 0.60.0, the inventory rendering of nodes was changed, so images were removed. This caused missing image errors with *existing* node formspecs, however, so empty dummy images are added back.
2020-03-29 14:05:59 +02:00
Wuzzy
a98dafb171 Nodeblock: Change snare sound 2020-03-28 07:54:14 +01:00
Wuzzy
baa02e19e1 Add many new sounds for noteblock 2020-03-28 07:20:16 +01:00
Wuzzy
2237cf66cb Version 0.60.0 2020-03-24 20:33:33 +01:00
David McMackins II
882937a1ab Fix bug where adding items to a double chest with shift-click would not complete stacks in the right chest 2020-03-24 20:20:32 +01:00
Wuzzy
b56ead7a23 Don't allow to set fire on fire 2020-03-24 19:53:08 +01:00
Wuzzy
f5268ea598 Fix walls connecting to too many nodeboxes 2020-03-24 19:31:52 +01:00
Wuzzy
24832c534f Fix crash in horse code 2020-03-24 19:11:25 +01:00
Wuzzy
d5111dfb66 Simplify workbench arrow img 2020-03-24 19:08:53 +01:00
Wuzzy
7243a25fe6 Generate item slot images on the fly 2020-03-24 18:48:14 +01:00
Wuzzy
3cf32c38c5 Villager: Make offered/wanted items unclickable 2020-03-19 12:32:30 +01:00
David McMackins II
59b6385d10 Fix bug where powered rails would not accelerate a fueled minecart 2020-03-17 15:00:12 -05:00
Wuzzy
fb9d0f7a7c Mobs: Drop cooked item if died in fire 2020-03-15 09:07:38 +01:00
wuniversales
3772dd51cc Update Spanish translation 2020-03-15 08:32:00 +01:00
Wuzzy
2569eae5d8 Don't make sprint particles in liquids 2020-03-15 08:23:40 +01:00
Wuzzy
73dc0a64b5 Update bed formspec 2020-03-14 21:38:59 +01:00
Wuzzy
5a03ce6dac Remove pointless content ID loading in mcl_hoppers 2020-03-14 07:17:46 +01:00
Wuzzy
f0ba364120 Fix crash in mcl_maps 2020-03-12 06:45:23 +01:00
Wuzzy
28b2085492 Bump golden apple hunger points to 20 2020-03-12 02:35:02 +01:00
Wuzzy
6b529e1204 Colorize some item tooltips 2020-03-12 02:29:30 +01:00
Wuzzy
7ee2340f5c Show chat message if using minimap incorrectly 2020-03-12 01:57:14 +01:00
Wuzzy
312b5aeb73 Make carpets flammable 2020-03-12 01:45:24 +01:00
Wuzzy
feba60cad8 Translate all extended tooltips to German 2020-03-12 01:35:11 +01:00
Wuzzy
03a5519d01 Partial German translation of tooltip extensions 2020-03-11 01:44:23 +01:00
Wuzzy
098bc3c7c7 Fix an inconsistent German translation 2020-03-11 00:57:40 +01:00
Wuzzy
9ef313d0a1 Fix bas variable name in commandblock mod 2020-03-11 00:54:06 +01:00
Wuzzy
8adf6298a7 Update doc mod again 2020-03-10 18:29:28 +01:00
Wuzzy
070e928bf0 Merge branch 'tt' 2020-03-10 18:21:32 +01:00
Wuzzy
5053dde5f0 Update doc mod 2020-03-10 18:18:27 +01:00
Wuzzy
0fbb252af6 Update doc_items 2020-03-10 18:01:24 +01:00
Wuzzy
242b880c4f Make creative arrows white 2020-03-10 10:22:38 +01:00
Wuzzy
9422989ac6 Redraw Creative trash slot 2020-03-10 07:36:42 +01:00
Wuzzy
a845f0313d Tweak craftguide icons to match colorsheme 2020-03-10 07:01:41 +01:00
Wuzzy
6761ebdae5 Fix shading of lower tabs in Creative inv. 2020-03-10 06:38:53 +01:00
Wuzzy
60effa71b4 Inventory: Translate page counter 2020-03-10 06:13:52 +01:00
Wuzzy
1e5f3ee610 Creative: Replace fake slider with page buttons 2020-03-10 06:11:49 +01:00
Wuzzy
c6d6a2ce26 Craftguide: Don't display burntime for groups 2020-03-10 05:44:52 +01:00
Wuzzy
81fd3fad40 Fix hopper inventory screen 2020-03-10 05:44:37 +01:00
Wuzzy
f85a6b5042 Make some labels dark-gray 2020-03-10 05:34:54 +01:00
Wuzzy
96b30b918c Tweak commandblock button position 2020-03-10 05:17:53 +01:00
Wuzzy
1ea2b09ecb Commandblock: Fix help btn not working if no priv 2020-03-10 05:15:32 +01:00
Wuzzy
3bcb868f8b Remove unused awards images 2020-03-10 05:10:48 +01:00
Wuzzy
03ad3cca29 Major default formspec style update
- Uses formspec_prepend to set e.g. button style
- Make all formspecs use the MCL2 style consistently
2020-03-10 05:01:49 +01:00
Wuzzy
0e867e5247 Fix creative tab styling for future MT 5.2.0 2020-03-10 00:15:54 +01:00
Wuzzy
4deb6eec20 Extra tooltips for mcl_chests 2020-03-08 08:50:21 +01:00
Wuzzy
2554c6d597 Display weapon damage in tooltip 2020-03-08 03:46:24 +01:00
Wuzzy
cbda2ef326 Add _tt_help to many more items 2020-03-08 03:30:40 +01:00
Wuzzy
714634f4a0 Fix bug reporting link 2020-03-02 16:43:05 +01:00
Wuzzy
d3d227d46b Version 0.59.2 2020-02-25 16:10:18 +01:00
Wuzzy
4cb5b26fa9 Fix crash in mcl_mobs 2020-02-25 16:09:26 +01:00
Wuzzy
efb97d59a5 Version 0.59.1 2020-02-23 20:39:13 +01:00
Wuzzy
98e87fd5db mcl_attached: Check if dir is nil 2020-02-23 20:37:42 +01:00
Wuzzy
a375548992 Heal horses differently depending on food 2020-02-23 17:13:52 +01:00
wuniversales
f93d3a897e Update Spanish translation 2020-02-23 16:26:21 +01:00
Wuzzy
fbd5374085 Don't drip water+lava thru glass 2020-02-23 16:17:04 +01:00
Wuzzy
4466383122 Version 0.59.0 2020-02-22 20:53:21 +01:00
Wuzzy
401382106f Fix crash when riding player leaves 2020-02-22 20:47:25 +01:00
Wuzzy
4ece91fde4 Make squids larger 2020-02-19 22:28:18 +01:00
Wuzzy
4926f8d443 Mobs: Respect fall_damage_add_percent 2020-02-19 17:24:35 +01:00
Wuzzy
6096b8dd9a Fix translation placeholder in mcl_hunger 2020-02-19 17:07:42 +01:00
Wuzzy
589b750d0a Add tool wear for punching mobs 2020-02-19 16:47:57 +01:00
Wuzzy
e4fb7ae533 Add punch_attack_uses to weapons 2020-02-19 15:53:51 +01:00
Wuzzy
ba74546d48 Add extended tooltips 2020-02-19 04:54:17 +01:00
Wuzzy
71cee9920a Heads: Add back armor def fields 2020-02-19 03:02:45 +01:00
Wuzzy
604e1c4d19 Link eating sound back to object again 2020-02-18 23:53:33 +01:00
Wuzzy
3118673116 Play sound for equipping horse armor or saddle 2020-02-18 23:49:35 +01:00
Wuzzy
565806558c Play armor equip sound when armor got dispensed 2020-02-18 22:33:58 +01:00
Wuzzy
6426e55746 Add on_secondary_use for heads and pumpkin 2020-02-18 22:17:52 +01:00
Wuzzy
d88fa0c438 Can equip/swap armor with rightclick 2020-02-18 22:05:08 +01:00
Wuzzy
329452d5ce Don't show armor bar for 0 armor 2020-02-18 20:10:35 +01:00
Wuzzy
5729d70814 Add secondary rotation for heads 2020-02-18 20:04:15 +01:00
Wuzzy
bfc5670f09 Can place heads at walls 2020-02-18 19:51:10 +01:00
Wuzzy
012dd0b86a Add wallmounted heads 2020-02-18 19:33:14 +01:00
Wuzzy
7ba3616c77 mcl_heads: Clean up whitespace 2020-02-18 18:13:45 +01:00
Wuzzy
460e7c0c67 3 mob heads reduce mob detection range 2020-02-18 18:12:51 +01:00
Wuzzy
364a4152ac Change fallback armor (un)equip sounds 2020-02-18 16:36:22 +01:00
Wuzzy
89afec17b1 Armor stand: Remove legacy entity 2020-02-18 16:13:37 +01:00
Wuzzy
a52976a918 Rename 3d_armor_stand to mcl_armor_stand 2020-02-18 16:10:50 +01:00
Wuzzy
ab4e46f97b Move armor mods 2020-02-18 15:48:21 +01:00
Wuzzy
fb251db925 Rename mod: 3d_armor → mcl_armor 2020-02-18 15:44:54 +01:00
Wuzzy
edab0be8f5 Play armor (un-)equip sounds on armor stand 2020-02-18 14:51:15 +01:00
Wuzzy
ef077fed72 Add armor equip/unequip sounds 2020-02-18 07:33:08 +01:00
Wuzzy
f700463c4f Increase FOV to 86.1 2020-02-17 21:49:23 +01:00
Wuzzy
ae7615c557 Move armor factoid to nil group 2020-02-17 20:58:29 +01:00
Wuzzy
97d293f8b4 Add armor factoid 2020-02-17 20:53:31 +01:00
Wuzzy
33acd2327f Remove unused and dead code in 3d_armor mod 2020-02-17 20:41:58 +01:00
Wuzzy
bef99ac211 Rename mod: hbarmor → mcl_hbarmor 2020-02-17 20:24:26 +01:00
Wuzzy
e3b68c4364 Display armor points properly 2020-02-17 20:19:07 +01:00
Wuzzy
2e6610da42 Overhaul armor protection formula 2020-02-17 19:55:02 +01:00
Wuzzy
988ca6ffe7 Interpret many damage sources as punches 2020-02-17 18:37:23 +01:00
Wuzzy
dcc14d1f3f Implement MC's armor durability 2020-02-17 18:19:36 +01:00
Wuzzy
023f70ee1c Remove more uses of 3d_armor_trans.png 2020-02-17 17:46:25 +01:00
Wuzzy
81ca7469d7 TNT explosions deal punch damage 2020-02-17 17:44:38 +01:00
Wuzzy
004013c3a4 Remove 3d_armor_trans.png 2020-02-17 17:31:39 +01:00
Wuzzy
113a49da41 Armor: remove "wear" value from registrations 2020-02-17 17:26:06 +01:00
Wuzzy
9499076ac8 Don't show message when armor got destroyed 2020-02-17 17:11:04 +01:00
Wuzzy
641921f4c7 Add tool stats in help 2020-02-17 16:19:17 +01:00
Wuzzy
bcffcdf003 Version 0.58.1 2020-02-14 21:10:45 +01:00
Wuzzy
e6133ac670 Fix TNT minecart igniting 2020-02-14 21:09:36 +01:00
Wuzzy
1ab41a494b Remove activator rail from README 2020-02-06 16:57:47 +01:00
Wuzzy
c6a8cbdb59 Version 0.58.0 2020-02-05 12:46:27 +01:00
Wuzzy
f4a06d6217 Remove TNT node after explode 2020-02-05 12:45:29 +01:00
Wuzzy
bed0849bb0 Add setting: mcl_tnt_griefing 2020-02-05 03:11:32 +01:00
Wuzzy
2ef5f0232d Update minecart German translation 2020-02-05 03:11:07 +01:00
Wuzzy
377bf31c5d Fix crash when killing player with dispenser arrow 2020-02-05 02:40:07 +01:00
Wuzzy
3836f1b7e9 Update hudbars mod to 2.1.0 2020-02-04 22:06:31 +01:00
wuniversales
15481cb24d Add Spanish translation 2020-02-04 21:43:50 +01:00
Wuzzy
04c8a08cc4 Ignite tnt minecart by fire charge 2020-01-30 23:11:16 +01:00
Wuzzy
9f344b4307 Detach minecart driver if over activator rail 2020-01-30 22:45:29 +01:00
Wuzzy
1d2da1f01a TNT minecart and activator rail no longer WIP 2020-01-30 22:31:44 +01:00
Wuzzy
9dc9c12f29 Implement TNT minecart 2020-01-30 22:05:18 +01:00
Wuzzy
74b79d130b Add basic implementation of furnace minecart 2020-01-30 20:38:31 +01:00
Wuzzy
d923f71c92 Teach mobs how to not walk into danger ... kinda 2020-01-30 18:04:50 +01:00
Wuzzy
61e148ac2e Fix mobs able to swim in plants 2020-01-30 17:05:39 +01:00
Wuzzy
834c8cbc3a Disable jump in cobweb 2020-01-30 16:36:28 +01:00
Wuzzy
fcf46b3423 Remove legacy stuff in mcl_mobs 2020-01-30 16:17:29 +01:00
Wuzzy
c234b273ad Introduce snowball_vulnerable armor group 2020-01-30 16:14:13 +01:00
Wuzzy
be04de084b Mobs: Utilize pathfinder jumpheight properly 2020-01-30 01:36:08 +01:00
Wuzzy
8be35bae53 Make mcl_worlds dependency in mcl_mobs optional 2020-01-30 01:11:02 +01:00
Wuzzy
bddb8f1136 Remove some outdated dependencies in mcl_mobs 2020-01-30 01:05:31 +01:00
Wuzzy
d38e0a0b00 Remove unused jump_chance attribute from mobs 2020-01-30 00:03:53 +01:00
Wuzzy
f7fb83891a Mobs: Replace name-based fence/wall check 2020-01-29 23:37:16 +01:00
Wuzzy
9326a76973 Fix mobs walking into water too often 2020-01-29 23:11:20 +01:00
Wuzzy
fff1949804 Make arrows only deal damage with free lineofsight 2020-01-20 19:48:08 +01:00
Wuzzy
3788b66b47 Clean up some luacheck warnings in mcl_mobs 2020-01-20 16:08:59 +01:00
Wuzzy
bc7b86b61a Fix incorrect liquid backface culling 2020-01-19 22:56:37 +01:00
Wuzzy
112574792d Version 0.57.1 2020-01-18 04:51:46 +01:00
Wuzzy
73e8ee8a68 Fix undeclared global warning in mcl_craftguide 2020-01-18 04:48:07 +01:00
Wuzzy
3dcd986863 Fix shulker box recolor craft erasing contents 2020-01-18 04:46:41 +01:00
Wuzzy
87ac0c952c Mobs: Reset texture mods on activation 2020-01-06 17:28:08 +01:00
Wuzzy
e569885fab End portal frame: Bulk set nodes 2020-01-06 16:51:40 +01:00
Wuzzy
9b8d6c4cec Destroy end portal when surrounding bedrock goes 2020-01-06 16:49:22 +01:00
aldum
82f851e20d Add theoretical support for larger nether portals 2020-01-06 15:11:29 +01:00
Wuzzy
0ae2c5b25f Mention mob glitch workaround 2020-01-06 14:49:44 +01:00
Wuzzy
1210d8c9a7 Workaround for mobs glitching through walls
Thanks, MysticTempest!
2020-01-06 14:46:10 +01:00
Wuzzy
7a870d0ead Message when trying to spawn forbidden hostile mob 2020-01-06 13:46:43 +01:00
Wuzzy
f2b7392a30 Use "minetest" instead of "core" table 2020-01-06 13:02:30 +01:00
Wuzzy
05152589fa Fix crash in awards mod 2020-01-06 11:24:28 +01:00
Wuzzy
01eb39b62f Remove awd and awpl commands 2020-01-06 11:20:14 +01:00
Wuzzy
1fc2ba6879 Craftguide: Show recipes hidden in creative inv. 2020-01-05 21:49:41 +01:00
Wuzzy
90298821a3 Remove mob aliases 2020-01-05 10:49:04 +01:00
Wuzzy
8c0bea7dad Implement drops of sea pickles 2019-12-27 15:32:09 +01:00
Wuzzy
b77307b7ac Add sea pickles 2019-12-27 15:24:59 +01:00
Wuzzy
f691b31423 Version 0.57.0 2019-12-27 01:15:07 +01:00
Wuzzy
5d8c068749 Translate mcl_ocean 2019-12-26 12:12:21 +01:00
Wuzzy
625730e040 Translate slippery help 2019-12-26 11:42:14 +01:00
Wuzzy
d29c4bb795 Fix 2 undeclared global warnings in mapgen core 2019-12-22 20:22:19 +01:00
Wuzzy
a03cc0604e End rods no longer fall 2019-12-22 18:08:45 +01:00
Wuzzy
bbc5f2a0d9 Use sand and gravel for ocean floors 2019-12-22 01:22:05 +01:00
Wuzzy
9fdbb35f24 Look upwards when sleeping 2019-12-19 18:48:27 +01:00
Wuzzy
87449b5719 Make ice texture opaque by default
Because of glitchy translucency in Minetest
2019-12-19 17:55:43 +01:00
Wuzzy
ab038ddd60 Increase drops of guardians 2019-12-18 21:55:22 +01:00
Wuzzy
305145ca1c Tweak oceangen 2019-12-18 21:04:07 +01:00
Wuzzy
b7406ed3d5 Generate sponges in deep oceans in non-v6 mgs 2019-12-18 20:55:20 +01:00
Wuzzy
f74a502979 Generate sponges in v6 2019-12-18 20:39:14 +01:00
Wuzzy
8b6dc30943 Generate kelp/seagrass in v6 2019-12-18 19:15:21 +01:00
Wuzzy
e0e73b8ee8 Add basic seagrass/kelp mapgen 2019-12-18 18:42:04 +01:00
Wuzzy
85c058125c Add kelp growth 2019-12-18 15:06:35 +01:00
Wuzzy
286009cbd7 Can place kelp on kelp 2019-12-18 13:37:20 +01:00
Wuzzy
3658cfc0f1 Add help texts for the new ocean plants 2019-12-18 12:43:17 +01:00
Wuzzy
ee5e50f139 Remove clay variant for kelp and seagrass 2019-12-18 04:28:47 +01:00
Wuzzy
d1f3856de8 Implement help page for seagrass 2019-12-18 03:42:18 +01:00
Wuzzy
2e9efe51e8 Tweak drop behavior of ocean plants 2019-12-18 03:10:49 +01:00
Wuzzy
40e681a566 Add kelp and related items 2019-12-17 22:43:46 +01:00
Wuzzy
5c953b1dc0 Add more node sounds for ocean plants 2019-12-17 21:43:30 +01:00
Wuzzy
b81396c03f Add falling node variants of seagrass 2019-12-17 21:24:57 +01:00
Wuzzy
40a55729ca Add seagrass on clay 2019-12-17 20:39:58 +01:00
Wuzzy
09c1f44a65 mcl_ocean: Add mcl_core depends 2019-12-17 20:27:26 +01:00
Wuzzy
5c70296e8f Fix seagrass selectionbox 2019-12-17 20:25:35 +01:00
Wuzzy
a714751f8b Add seagrass on dirt 2019-12-17 19:52:19 +01:00
Wuzzy
4dcbe75e84 Allow corals placement on top of node only 2019-12-17 19:51:50 +01:00
Wuzzy
cf1df56b79 Make corals dead when not near water 2019-12-17 18:40:10 +01:00
Wuzzy
8b3ecb9321 Refactor mcl_ocean 2019-12-17 17:18:10 +01:00
Wuzzy
1e3cfb6040 Add coral selection boxes 2019-12-17 17:12:21 +01:00
Wuzzy
e8614d7b27 Fix a purely theoretical coral crash 2019-12-17 16:58:40 +01:00
Wuzzy
b92aec71af Document coral groups 2019-12-17 16:53:18 +01:00
Wuzzy
c7aaf49e22 Tweak coral sounds and placement 2019-12-17 16:50:32 +01:00
Wuzzy
39670e1f79 Add corals 2019-12-17 16:42:25 +01:00
Wuzzy
59964279b7 Version 0.56.2 2019-12-17 03:30:14 +01:00
Wuzzy
82b9c7d474 Change screenshot 2019-12-17 02:38:37 +01:00
Wuzzy
085e6f306a Use fallback grass color for unknown values 2019-12-17 02:01:34 +01:00
Wuzzy
bab4529e4d Fix armor mod deleting player's immortal group 2019-12-17 01:44:11 +01:00
Wuzzy
a5b4a261dc Dry grass replacement: Use fallback param2 2019-12-16 23:59:49 +01:00
Wuzzy
4cc51a55c2 Version 0.56.1 2019-12-16 00:37:29 +01:00
Wuzzy
29b20a51bc Update README 2019-12-16 00:36:48 +01:00
Wuzzy
5b956c1c47 Disallow cocoa screwdriver rotation 2019-12-15 00:27:23 +01:00
Wuzzy
862e3141d9 Add API documentation for screwdriver mod 2019-12-14 23:50:17 +01:00
Wuzzy
92ef7c3b9a Simplify rotation of pillar-like nodes 2019-12-14 23:42:17 +01:00
Wuzzy
44c95084ab Simplify lilypad rotation 2019-12-14 22:13:54 +01:00
Wuzzy
101c9b7322 Use minetest.LIGHT_MAX 2019-12-14 18:57:17 +01:00
Wuzzy
f4888a42a9 Add glow to falling light source nodes 2019-12-14 18:56:59 +01:00
Wuzzy
7f70acc8a4 Make dropped items glow if light source node 2019-12-14 17:40:24 +01:00
Wuzzy
41d7e513e7 Make variable local 2019-12-14 03:38:00 +01:00
Wuzzy
741b32e8d0 Tweak grass palette 2019-12-14 03:10:16 +01:00
Wuzzy
1971b3c5a8 Update menu icon for new grass block 2019-12-14 01:59:14 +01:00
Wuzzy
aaedf6517a Update grass block param2 when placing snow nodes 2019-12-14 01:52:01 +01:00
Wuzzy
b9cc66d3db Remove dry grass from texture converter 2019-12-14 01:44:54 +01:00
Wuzzy
5f2cc506f0 Fix broken legacy dry grass LBM 2019-12-14 01:41:49 +01:00
Wuzzy
affb984c56 Fix mapgen crash if there's unknown nodes 2019-12-14 01:30:21 +01:00
Wuzzy
b3829eaf9b Fix tallgrass/fern placement color 2019-12-14 01:15:37 +01:00
Wuzzy
c90f693c06 Smoother dirt texture from PP 2019-12-14 01:03:44 +01:00
Wuzzy
c149f5ca3c Update PP grass textures 2019-12-14 00:45:57 +01:00
Wuzzy
40453d597b Add LBM to kill old drygrass nodes 2019-12-14 00:03:43 +01:00
Wuzzy
3e3ed630e5 Add per-biome grass coloring 2019-12-13 23:48:13 +01:00
Wuzzy
d4344bbaf8 Update grass block in texture converter 2019-12-13 16:38:14 +01:00
Wuzzy
01288eff62 Enderman no longer pickup dirt-with-grass directly 2019-12-13 15:46:01 +01:00
Wuzzy
9dfe584cd1 Remove dirt with dry grass node from mobs_mc 2019-12-13 15:36:20 +01:00
Wuzzy
62096c723a Generate new grass color 2019-12-13 15:33:13 +01:00
Wuzzy
6002cd0af5 Fix tallgrass, fern, bonemeal for new grass color 2019-12-13 15:32:57 +01:00
Wuzzy
9c55b6c9c9 Update grass color after placing grass block 2019-12-13 14:18:35 +01:00
Wuzzy
325801efd7 First step towards param2-based grass color 2019-12-13 14:03:12 +01:00
Wuzzy
8e224d0bd9 Change screwdriver image to PP style 2019-12-13 11:51:13 +01:00
Wuzzy
4a7bb86803 Fix odd redstone torch on wall placement 2019-12-13 11:35:31 +01:00
Wuzzy
cfa77288c1 Add screwdriver support to doors 2019-12-13 10:59:30 +01:00
Wuzzy
d21e959055 Disallow torch placement on hopper 2019-12-13 10:22:38 +01:00
Wuzzy
b5133c0c4a Allow torch placement on more nodes 2019-12-13 10:20:22 +01:00
Wuzzy
1a02ccd36f Add more node groups 2019-12-13 10:20:08 +01:00
Wuzzy
7df94278cf Disallow all torch rotation by screwdriver 2019-12-13 09:47:27 +01:00
Wuzzy
2393c68448 Fix torch screwdriver rotation 2019-12-13 09:41:38 +01:00
Wuzzy
ec50b19fa0 Tweak screwdriver img 2019-12-13 08:56:23 +01:00
Wuzzy
5b4f33c8f1 Add dummy support for placing carpets on llamas 2019-12-11 20:03:11 +01:00
Wuzzy
506e039fc5 Add unicolor groups to wool and carpet 2019-12-11 19:54:58 +01:00
Wuzzy
febcb96bb0 Hide screwdriver 2019-12-11 04:53:01 +01:00
Wuzzy
231493cb1b Merge branch 'screwdriver' 2019-12-11 04:47:53 +01:00
Wuzzy
2e09febaae Rename Moss Stone to Mossy Cobblestone 2019-12-11 04:24:32 +01:00
Wuzzy
f91619cae1 New PP cobblestone and brick block textures 2019-12-11 04:17:38 +01:00
Wuzzy
753acdf272 Update sand, sandstone, TNT, iron nugget textures 2019-12-11 03:37:53 +01:00
Wuzzy
57e14b8106 Change menu icon to match new grass color 2019-12-11 02:02:34 +01:00
Wuzzy
a177d3cbba More saturated grass color 2019-12-11 02:02:16 +01:00
Wuzzy
0d3b8e11c3 Hide WIP mobs in creative inventory 2019-12-11 00:46:55 +01:00
Wuzzy
2ff5bafd91 Refactor mob projectiles 2019-12-10 01:01:04 +01:00
Wuzzy
046f9ab223 Make blaze attacks a bit better 2019-12-10 00:16:09 +01:00
Wuzzy
e85c999e4c Fix typo in mcl_banners mod 2019-12-09 22:34:56 +01:00
Wuzzy
e09a72ed59 Tweak item appearance of internal items 2019-12-09 22:32:40 +01:00
Wuzzy
47f7b21190 Add missing translation for some redstone nodes 2019-12-09 22:02:35 +01:00
Wuzzy
f04170d66b Piston heads no longer drop themselves 2019-12-09 21:25:27 +01:00
Wuzzy
28505885f2 Add on_blast handling to chorus plant 2019-12-09 21:06:17 +01:00
Wuzzy
a1ab325920 Add on_blast support 2019-12-09 21:06:08 +01:00
ZedekThePD
b71cf5e9c2 Boost performance of chorus plant digging 2019-12-09 20:44:55 +01:00
1368 changed files with 13502 additions and 3442 deletions

1
API.md
View file

@ -21,6 +21,7 @@ All nodes can have these fields:
* `_mcl_hardness`: Hardness of the block, ranges from 0 to infinity (represented by -1). Determines digging times. Default: 0
* `_mcl_blast_resistance`: How well this block blocks and resists explosions. Default: 0
* `_mcl_falling_node_alternative`: If set to an itemstring, the node will turn into this node before it starts to fall.
* `_mcl_after_falling(pos)`: Called after a falling node finished falling and turned into a node.
Use the `mcl_sounds` mod for the sounds.

View file

@ -5,7 +5,7 @@ Wow, thank you! :-)
But first, some things to note:
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,
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
* Do your change in a new branch
* Upload the repository somewhere where it can be accessed from the Internet
* Ask me to pull in your changes (and briefly say what you're changed)
* Upload the repository somewhere where it can be accessed from the Internet and
notify me
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. ;-)
## 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
in the long run.
@ -64,10 +64,10 @@ Depending on what you add, the chances for inclusion vary:
## Coding style guide
* 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`
## Reporting bugs
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
* `cultivatable=2`: Block will be turned into Farmland by using a hoe on it
* `cultivatable=1`: Block will be turned into Dirt by using a hoe on it
* `flammable`: Block 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
* `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
@ -56,6 +60,16 @@ Please read <http://minecraft.gamepedia.com/Breaking> to learn how digging times
* `anvil`: Anvil. 1: No damage. 2-3: Higher damage levels
* `no_rename=1`: Item cannot be renamed by anvil
* `comparator_signal=X`: If set, this node outputs a constant (!) comparator signal output of strength X.
* `piston=X`: Piston (main body) (1 = normal, 2 = sticky)
* `piston_pusher=X`: Piston pusher (1 = normal, 2 = sticky)
* `hopper=X`: Hopper (1 = downwards, 2 = sideways)
* `portal=1`: Portal (node that teleports players and things by standing inside)
* `end_portal_frame=X`: End portal frame (1 = no eye, 2 = with eye)
* `coral=X`: Coral (any type) (1 = alive, 2 = dead)
* `coral_plant=X`: Coral in the "plant" shape (1 = alive, 2 = dead)
* `coral_fan=X`: Coral fan (1 = alive, 2 = dead)
* `coral_block=X`: Coral block (1 = alive, 2 = dead)
* `coral_species=X`: Specifies the species of a coral; equal X means equal species
#### Footnotes

View file

@ -1,8 +1,21 @@
# MineClone 2
An unofficial Minecraft-like game for Minetest. Forked from MineClone by davedevils.
Developed by Wuzzy and contributors. Not developed or endorsed by Mojang AB.
# MineClone 2 (Forkhausen Edition)
An unofficial Minecraft-like game for Minetest. Forked from MineClone2 developed by Wuzzy
and contributors which is a fork of MineClone by davedevils. Not developed or endorsed by Mojang AB.
Version: 0.55.1
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
You start in a randomly-generated world made entirely of cubes. You can explore
@ -67,7 +80,6 @@ an explanation.
#### Incomplete items
These items do not work yet, but you can get them with `/giveme` for testing:
* Activator Rail: `mcl_minecarts:activator_rail`
* Minecart with Chest: `mcl_minecarts:chest_minecart`
* Minecart with Furnace: `mcl_minecarts:furnace_minecart`
* Minecart with Hopper: `mcl_minecarts:hopper_minecart`
@ -183,7 +195,7 @@ Technical differences from Minecraft:
## Reporting bugs
Please report all bugs and missing Minecraft features here:
<https://git.minetest.land/Wuzzy/MineClone2-Bugs>
<https://git.athemis.de/Athemis/MineClone2/issues>
## Other readme files
@ -201,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
* [Rootyjr](https://github.com/Rootyjr): Fishing rod and bugfixes
* [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)
### Textures
### Graphics
* [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
* [kingoscargames](https://github.com/kingoscargames): Various edits and additions of existing 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)
* 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
* [22i](https://github.com/22i): Creator of all models
@ -250,6 +269,8 @@ project by davedevils which fell under the same license.
Mods credit:
See `README.txt` or `README.md` in each mod directory for information about other authors.
For mods that do not have such a file, the license is the source code license
of MineClone 2 and the author is Wuzzy.
### License of media (textures and sounds)
No non-free licenses are used anywhere.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 3.9 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.
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

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

View file

@ -7,15 +7,17 @@ minetest.check_single_for_falling = function(pos)
local node = minetest.get_node(pos)
if minetest.get_item_group(node.name, "attached_node_facedir") ~= 0 then
local dir = minetest.facedir_to_dir(node.param2)
local cpos = vector.add(pos, dir)
local cnode = minetest.get_node(cpos)
if minetest.get_item_group(cnode.name, "solid") == 0 then
minetest.remove_node(pos)
local drops = minetest.get_node_drops(node.name, "")
for dr=1, #drops do
minetest.add_item(pos, drops[dr])
if dir then
local cpos = vector.add(pos, dir)
local cnode = minetest.get_node(cpos)
if minetest.get_item_group(cnode.name, "solid") == 0 then
minetest.remove_node(pos)
local drops = minetest.get_node_drops(node.name, "")
for dr=1, #drops do
minetest.add_item(pos, drops[dr])
end
ret = true
end
ret = true
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

View file

@ -4,13 +4,20 @@ mcl_vars = {}
--- GUI / inventory menu settings
mcl_vars.gui_slots = "listcolors[#9990;#FFF7;#FFF0;#000;#FFF]"
-- nonbg is added as formspec prepend in mcl_formspec_prepend
mcl_vars.gui_nonbg = mcl_vars.gui_slots
mcl_vars.gui_nonbg = mcl_vars.gui_slots ..
"style_type[image_button;border=false;bgimg=mcl_inventory_button9.png;bgimg_pressed=mcl_inventory_button9_pressed.png;bgimg_middle=2,2]"..
"style_type[button;border=false;bgimg=mcl_inventory_button9.png;bgimg_pressed=mcl_inventory_button9_pressed.png;bgimg_middle=2,2]"..
"style_type[field;textcolor=#323232]"..
"style_type[label;textcolor=#323232]"..
"style_type[textarea;textcolor=#323232]"..
"style_type[checkbox;textcolor=#323232]"
-- Background stuff must be manually added by mods (no formspec prepend)
mcl_vars.gui_bg = "bgcolor[#080808BB;true]"
mcl_vars.gui_bg_img = ""
mcl_vars.gui_bg_color = "bgcolor[#00000000]"
mcl_vars.gui_bg_img = "background9[1,1;1,1;mcl_base_textures_background9.png;true;7]"
mcl_vars.inventory_header = mcl_vars.gui_bg
-- Legacy
mcl_vars.inventory_header = ""
-- Mapgen variables
local mg_name = minetest.get_mapgen_setting("mg_name")

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
minetest.register_on_dieplayer(function(player)
-- TODO: Add separate death sound
minetest.sound_play({name="player_damage", gain = 1.0}, {pos=player:get_pos(), max_hear_distance=16})
minetest.sound_play({name="player_damage", gain = 1.0}, {pos=player:get_pos(), max_hear_distance=16}, true)
end)

View file

@ -385,7 +385,7 @@ function mcl_util.generate_on_place_plant_function(condition)
if success 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
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
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
-------------
@ -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
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,
})
@ -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
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,
})
@ -93,7 +93,7 @@ minetest.register_entity("drippingwater:drop_lava", {
minetest.register_abm(
{
label = "Create water drops",
nodenames = {"group:solid"},
nodenames = {"group:opaque", "group:leaves"},
neighbors = {"group:water"},
interval = 2,
chance = 22,
@ -111,7 +111,7 @@ minetest.register_abm(
minetest.register_abm(
{
label = "Create lava drops",
nodenames = {"group:solid"},
nodenames = {"group:opaque"},
neighbors = {"group:lava"},
interval = 2,
chance = 22,

View file

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

View file

@ -279,7 +279,7 @@ local images = { "oak", "spruce", "birch", "jungle", "acacia", "dark_oak" }
for b=1, #boat_ids do
local itemstring = "mcl_boats:"..boat_ids[b]
local longdesc, usagehelp, help, helpname
local longdesc, usagehelp, tt_help, help, helpname
help = false
-- Only create one help entry for all boats
if b == 1 then
@ -288,9 +288,11 @@ for b=1, #boat_ids do
usagehelp = S("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.")
helpname = S("Boat")
end
tt_help = S("Water vehicle")
minetest.register_craftitem(itemstring, {
description = names[b],
_tt_help = tt_help,
_doc_items_create_entry = help,
_doc_items_entry_name = helpname,
_doc_items_longdesc = longdesc,

View file

@ -8,3 +8,4 @@ Jungle Boat=Dschungelboot
Oak Boat=Eichenboot
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.=Rechtsklicken Sie auf eine Wasserquelle, um das Boot zu platzieren. Rechtsklicken Sie auf das Boot, um es zu betreten. Mit [Links] und [Rechts] lenken, mit [Vorwärts] und [Rückwärts] Geschwindigkeit regeln oder rückwärts fahren. Rechtsklicken Sie erneut auf das Boot, um es zu verlassen, schlagen Sie das Boot, um es als Gegenstand fallen zu lassen.
Spruce Boat=Fichtenboot
Water vehicle=Wasserfahrzeug

View file

@ -0,0 +1,10 @@
# textdomain: mcl_boats
Acacia Boat=Barca de acacia
Birch Boat=Barca de abedul
Boat=Barca
Boats are used to travel on the surface of water.=Las barcas se utilizan para viajar en la superficie del agua.
Dark Oak Boat=Barca de roble oscuro
Jungle Boat=Barca de la selva
Oak Boat=Barca de roble
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.=Haga clic derecho en una fuente de agua para colocar el barco. Haga clic derecho en el barco para entrar. Utilice [Izquierda] y [Derecha] para dirigir, [Adelante] para acelerar y [Atrás] para reducir la velocidad o retroceder. Haga clic derecho en el barco nuevamente para dejarlo, golpee el barco para que se caiga como un artículo.
Spruce Boat=Barca de abeto

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

View file

@ -8,3 +8,4 @@ Jungle Boat=
Oak Boat=
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Rightclick the boat again to leave it, punch the boat to make it drop as an item.=
Spruce Boat=
Water vehicle=

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

@ -57,7 +57,7 @@ local deal_falling_damage = function(self, dtime)
mcl_death_messages.player_damage(v, msg)
end
end
v:set_hp(hp)
v:set_hp(hp, { type = "punch", from = "mod" })
end
end
end
@ -79,21 +79,30 @@ minetest.register_entity(":__builtin:falling_node", {
meta = {},
set_node = function(self, node, meta)
local def = minetest.registered_nodes[node.name]
-- Change falling node if definition tells us to
if def and def._mcl_falling_node_alternative then
node.name = def._mcl_falling_node_alternative
end
local glow
self.node = node
self.meta = meta or {}
self.object:set_properties({
is_visible = true,
textures = {node.name},
})
local def = core.registered_nodes[node.name]
-- Set correct entity yaw
if def and node.param2 ~= 0 then
if (def.paramtype2 == "facedir" or def.paramtype2 == "colorfacedir") then
self.object:set_yaw(core.dir_to_yaw(core.facedir_to_dir(node.param2)))
self.object:set_yaw(minetest.dir_to_yaw(minetest.facedir_to_dir(node.param2)))
elseif (def.paramtype2 == "wallmounted" or def.paramtype2 == "colorwallmounted") then
self.object:set_yaw(core.dir_to_yaw(core.wallmounted_to_dir(node.param2)))
self.object:set_yaw(minetest.dir_to_yaw(minetest.wallmounted_to_dir(node.param2)))
end
if def.light_source then
glow = def.light_source
end
end
self.object:set_properties({
is_visible = true,
textures = {node.name},
glow = glow,
})
end,
get_staticdata = function(self)
@ -212,7 +221,7 @@ minetest.register_entity(":__builtin:falling_node", {
meta:from_table(self.meta)
end
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
else
@ -249,7 +258,7 @@ minetest.register_entity(":__builtin:falling_node", {
def._mcl_after_falling(npos3, get_falling_depth(self))
end
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
deal_falling_damage(self, dtime)

View file

@ -0,0 +1,3 @@
# textdomain: mcl_falling_nodes
@1 was smashed by a falling anvil.=@1 fue aplastado por la caída de un yunque.
@1 was smashed by a falling block.=@1 fue aplastado por la caída de un bloque.

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,
max_hear_distance = 16,
gain = 1.0,
})
}, true)
check_pickup_achievements(object, player)
@ -129,7 +129,7 @@ minetest.register_globalstep(function(dtime)
pos = pos,
max_hear_distance = 16,
gain = 1.0,
})
}, true)
end
check_pickup_achievements(object, player)
object:get_luaentity()._removed = true
@ -254,7 +254,13 @@ function minetest.handle_node_drops(pos, drops, digger)
local drop_item = ItemStack(item)
drop_item:set_count(1)
for i=1,count do
local obj = core.add_item(pos, drop_item)
local dpos = table.copy(pos)
-- Apply offset for plantlike_rooted nodes because of their special shape
if nodedef and nodedef.drawtype == "plantlike_rooted" and nodedef.walkable then
dpos.y = dpos.y + 1
end
-- Spawn item and apply random speed
local obj = minetest.add_item(dpos, drop_item)
if obj ~= nil then
local x = math.random(1, 5)
if math.random(1,2) == 1 then
@ -280,7 +286,7 @@ function minetest.item_drop(itemstack, dropper, pos)
cs = 1
end
local item = itemstack:take_item(cs)
local obj = core.add_item(p, item)
local obj = minetest.add_item(p, item)
if obj then
v.x = v.x*4
v.y = v.y*4 + 2
@ -300,7 +306,7 @@ if not time_to_live then
time_to_live = 300
end
core.register_entity(":__builtin:item", {
minetest.register_entity(":__builtin:item", {
initial_properties = {
hp_max = 1,
physical = true,
@ -344,8 +350,6 @@ core.register_entity(":__builtin:item", {
count = max_count
self.itemstring = stack:get_name().." "..max_count
end
local s = 0.2 + 0.1 * (count / max_count)
local c = s
local itemtable = stack:to_table()
local itemname = nil
local description = ""
@ -354,11 +358,18 @@ core.register_entity(":__builtin:item", {
end
local item_texture = nil
local item_type = ""
if core.registered_items[itemname] then
item_texture = core.registered_items[itemname].inventory_image
item_type = core.registered_items[itemname].type
description = core.registered_items[itemname].description
local glow
local def = minetest.registered_items[itemname]
if def then
item_texture = def.inventory_image
item_type = def.type
description = def.description
glow = def.light_source
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 = {
is_visible = true,
visual = "wielditem",
@ -367,6 +378,7 @@ core.register_entity(":__builtin:item", {
collisionbox = {-c, -c, -c, c, c, c},
automatic_rotate = math.pi * 0.5,
infotext = description,
glow = glow,
}
self.object:set_properties(prop)
if item_drop_settings.random_item_velocity == true then
@ -393,7 +405,7 @@ core.register_entity(":__builtin:item", {
end,
get_staticdata = function(self)
return core.serialize({
return minetest.serialize({
itemstring = self.itemstring,
always_collect = self.always_collect,
age = self.age,
@ -405,7 +417,7 @@ core.register_entity(":__builtin:item", {
on_activate = function(self, staticdata, dtime_s)
if string.sub(staticdata, 1, string.len("return")) == "return" then
local data = core.deserialize(staticdata)
local data = minetest.deserialize(staticdata)
if data and type(data) == "table" then
self.itemstring = data.itemstring
self.always_collect = data.always_collect
@ -510,7 +522,7 @@ core.register_entity(":__builtin:item", {
end
local p = self.object:get_pos()
local node = core.get_node_or_nil(p)
local node = minetest.get_node_or_nil(p)
local in_unloaded = (node == nil)
-- If no collector was found for a long enough time, declare the magnet as disabled
@ -533,7 +545,7 @@ core.register_entity(":__builtin:item", {
local dg = minetest.get_item_group(nn, "destroys_items")
if (def and (lg ~= 0 or fg ~= 0 or dg == 1)) 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
self._removed = true
self.object:remove()
@ -665,11 +677,11 @@ core.register_entity(":__builtin:item", {
local nn = minetest.get_node({x=p.x, y=p.y-0.5, z=p.z}).name
local v = self.object:get_velocity()
if not core.registered_nodes[nn] or core.registered_nodes[nn].walkable and v.y == 0 then
if not minetest.registered_nodes[nn] or minetest.registered_nodes[nn].walkable and v.y == 0 then
if self.physical_state then
local own_stack = ItemStack(self.object:get_luaentity().itemstring)
-- Merge with close entities of the same item
for _, object in ipairs(core.get_objects_inside_radius(p, 0.8)) do
for _, object in ipairs(minetest.get_objects_inside_radius(p, 0.8)) do
local obj = object:get_luaentity()
if obj and obj.name == "__builtin:item"
and obj.physical_state == false then
@ -689,7 +701,3 @@ core.register_entity(":__builtin:item", {
-- 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.
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:
-----------------------
MIT License
@ -23,10 +17,5 @@ Authors/licenses of media files:
Minecart model:
22i (GPLv3)
Wuzzy (based on Pixel Perfection 1.11, MIT License):
carts_rail_crossing_pwr.png
carts_rail_curved_pwr.png
carts_rail_t_junction_pwr.png
Other texture files (CC BY-SA 3.0:
Texture files (CC BY-SA 3.0):
XSSheep

View file

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

View file

@ -8,10 +8,50 @@ mcl_minecarts.check_float_time = 15
dofile(mcl_minecarts.modpath.."/functions.lua")
dofile(mcl_minecarts.modpath.."/rails.lua")
local function detach_driver(self)
if not self._driver then
return
end
mcl_player.player_attached[self._driver] = nil
local player = minetest.get_player_by_name(self._driver)
self._driver = nil
self._start_pos = nil
if player then
player:set_detach()
player:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0})
mcl_player.player_set_animation(player, "stand" , 30)
end
end
local function activate_tnt_minecart(self, timer)
if self._boomtimer then
return
end
self.object:set_armor_groups({immortal=1})
if timer then
self._boomtimer = timer
else
self._boomtimer = tnt.BOOMTIMER
end
self.object:set_properties({textures = {
"mcl_tnt_blink.png",
"mcl_tnt_blink.png",
"mcl_tnt_blink.png",
"mcl_tnt_blink.png",
"mcl_tnt_blink.png",
"mcl_tnt_blink.png",
"mcl_minecarts_minecart.png",
}})
self._blinktimer = tnt.BLINKTIMER
minetest.sound_play("tnt_ignite", {pos = self.object:get_pos(), gain = 1.0, max_hear_distance = 15}, true)
end
local activate_normal_minecart = detach_driver
-- Table for item-to-entity mapping. Keys: itemstring, Values: Corresponding entity ID
local entity_mapping = {}
local function register_entity(entity_id, mesh, textures, drop, on_rightclick)
local function register_entity(entity_id, mesh, textures, drop, on_rightclick, on_activate_by_rail)
local cart = {
physical = false,
collisionbox = {-10/16., -0.5, -10/16, 10/16, 0.25, 10/16},
@ -27,6 +67,10 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick)
_velocity = {x=0, y=0, z=0}, -- only used on punch
_start_pos = nil, -- Used to calculate distance for “On A Rail” achievement
_last_float_check = nil, -- timestamp of last time the cart was checked to be still on a rail
_fueltime = nil, -- how many seconds worth of fuel is left. Only used by minecart with furnace
_boomtimer = nil, -- how many seconds are left before exploding
_blinktimer = nil, -- how many seconds are left before TNT blinking
_blink = false, -- is TNT blink texture active?
_old_dir = {x=0, y=0, z=0},
_old_pos = nil,
_old_vel = {x=0, y=0, z=0},
@ -35,11 +79,21 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick)
}
function cart:on_activate(staticdata, dtime_s)
-- Initialize
local data = minetest.deserialize(staticdata)
if type(data) == "table" then
self._railtype = data._railtype
end
self.object:set_armor_groups({immortal=1})
-- Activate cart if on activator rail
if self.on_activate_by_rail then
local pos = self.object:get_pos()
local node = minetest.get_node(vector.floor(pos))
if node.name == "mcl_minecarts:activator_rail_on" then
self:on_activate_by_rail()
end
end
end
function cart:on_punch(puncher, time_from_last_punch, tool_capabilities, direction)
@ -60,17 +114,13 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick)
return
end
if puncher:get_player_control().sneak then
-- Punch+sneak: Pick up minecart (unless TNT was ignited)
if puncher:get_player_control().sneak and not self._boomtimer then
if self._driver then
if self._old_pos then
self.object:set_pos(self._old_pos)
end
mcl_player.player_attached[self._driver] = nil
local player = minetest.get_player_by_name(self._driver)
if player then
player:set_detach()
player:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0})
end
detach_driver(self)
end
-- Disable detector rail
@ -122,6 +172,8 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick)
self._punched = true
end
cart.on_activate_by_rail = on_activate_by_rail
function cart:on_step(dtime)
local vel = self.object:get_velocity()
local update = {}
@ -151,8 +203,15 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick)
end
end
-- Explode if already ignited
if self._boomtimer then
self.object:remove()
mcl_explosions.explode(pos, 4, { drop_chance = 1.0 })
return
end
-- Drop items and remove cart entity
if not minetest.settings:get_bool("creative_mode") then
if not minetest.settings:get_bool("creative_mode") then
for d=1, #drop do
minetest.add_item(self.object:get_pos(), drop[d])
end
@ -164,11 +223,74 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick)
self._last_float_check = 0
end
-- Update furnace stuff
if self._fueltime and self._fueltime > 0 then
self._fueltime = self._fueltime - dtime
if self._fueltime <= 0 then
self.object:set_properties({textures =
{
"default_furnace_top.png",
"default_furnace_top.png",
"default_furnace_front.png",
"default_furnace_side.png",
"default_furnace_side.png",
"default_furnace_side.png",
"mcl_minecarts_minecart.png",
}})
self._fueltime = 0
end
end
local has_fuel = self._fueltime and self._fueltime > 0
-- Update TNT stuff
if self._boomtimer then
-- Explode
self._boomtimer = self._boomtimer - dtime
local pos = self.object:get_pos()
if self._boomtimer <= 0 then
self.object:remove()
mcl_explosions.explode(pos, 4, { drop_chance = 1.0 })
return
else
tnt.smoke_step(pos)
end
end
if self._blinktimer then
self._blinktimer = self._blinktimer - dtime
if self._blinktimer <= 0 then
self._blink = not self._blink
if self._blink then
self.object:set_properties({textures =
{
"default_tnt_top.png",
"default_tnt_bottom.png",
"default_tnt_side.png",
"default_tnt_side.png",
"default_tnt_side.png",
"default_tnt_side.png",
"mcl_minecarts_minecart.png",
}})
else
self.object:set_properties({textures =
{
"mcl_tnt_blink.png",
"mcl_tnt_blink.png",
"mcl_tnt_blink.png",
"mcl_tnt_blink.png",
"mcl_tnt_blink.png",
"mcl_tnt_blink.png",
"mcl_minecarts_minecart.png",
}})
end
self._blinktimer = tnt.BLINKTIMER
end
end
if self._punched then
vel = vector.add(vel, self._velocity)
self.object:set_velocity(vel)
self._old_dir.y = 0
elseif vector.equals(vel, {x=0, y=0, z=0}) then
elseif vector.equals(vel, {x=0, y=0, z=0}) and (not has_fuel) then
return
end
@ -179,7 +301,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick)
if self._old_pos and not self._punched then
local flo_pos = vector.floor(pos)
local flo_old = vector.floor(self._old_pos)
if vector.equals(flo_pos, flo_old) then
if vector.equals(flo_pos, flo_old) and (not has_fuel) then
return
-- Prevent querying the same node over and over again
end
@ -187,7 +309,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick)
if not rou_pos then
rou_pos = vector.round(pos)
end
rou_old = vector.round(self._old_pos)
local rou_old = vector.round(self._old_pos)
if not node then
node = minetest.get_node(rou_pos)
end
@ -204,6 +326,10 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick)
minetest.swap_node(rou_old, newnode)
mesecon.receptor_off(rou_old)
end
-- Activate minecart if on activator rail
if node_old.name == "mcl_minecarts:activator_rail_on" and self.on_activate_by_rail then
self:on_activate_by_rail()
end
end
local ctrl, player = nil, nil
@ -257,7 +383,7 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick)
end
local new_acc = {x=0, y=0, z=0}
if vector.equals(dir, {x=0, y=0, z=0}) then
if vector.equals(dir, {x=0, y=0, z=0}) and not has_fuel then
vel = {x=0, y=0, z=0}
update.vel = true
else
@ -283,12 +409,17 @@ local function register_entity(entity_id, mesh, textures, drop, on_rightclick)
-- Slow down or speed up
local acc = dir.y * -1.8
local friction = 0.4
local speed_mod = minetest.registered_nodes[minetest.get_node(pos).name]._rail_acceleration
acc = acc - friction
if has_fuel then
acc = acc + 0.6
end
if speed_mod and speed_mod ~= 0 then
acc = acc + speed_mod
else
acc = acc - 0.4
acc = acc + speed_mod + friction
end
new_acc = vector.multiply(dir, acc)
@ -398,7 +529,7 @@ mcl_minecarts.place_minecart = function(itemstack, pointed_thing)
end
local register_craftitem = function(itemstring, entity_id, description, longdesc, usagehelp, icon, creative)
local register_craftitem = function(itemstring, entity_id, description, tt_help, longdesc, usagehelp, icon, creative)
entity_mapping[itemstring] = entity_id
local groups = { minecart = 1, transport = 1 }
@ -438,6 +569,7 @@ local register_craftitem = function(itemstring, entity_id, description, longdesc
groups = groups,
}
def.description = description
def._tt_help = tt_help
def._doc_items_longdesc = longdesc
def._doc_items_usagehelp = usagehelp
def.inventory_image = icon
@ -460,9 +592,9 @@ Register a minecart
* on_activate_by_rail: Called when above activator rail
* creative: If false, don't show in Creative Inventory
]]
local function register_minecart(itemstring, entity_id, description, longdesc, usagehelp, mesh, textures, icon, drop, on_rightclick, on_activate_by_rail, creative)
register_entity(entity_id, mesh, textures, drop, on_rightclick)
register_craftitem(itemstring, entity_id, description, longdesc, usagehelp, icon, creative)
local function register_minecart(itemstring, entity_id, description, tt_help, longdesc, usagehelp, mesh, textures, icon, drop, on_rightclick, on_activate_by_rail, creative)
register_entity(entity_id, mesh, textures, drop, on_rightclick, on_activate_by_rail)
register_craftitem(itemstring, entity_id, description, tt_help, longdesc, usagehelp, icon, creative)
if minetest.get_modpath("doc_identifier") ~= nil then
doc.sub.identifier.register_object(entity_id, "craftitems", itemstring)
end
@ -473,10 +605,12 @@ register_minecart(
"mcl_minecarts:minecart",
"mcl_minecarts:minecart",
S("Minecart"),
S("Vehicle for fast travel on rails"),
S("Minecarts can be used for a quick transportion on rails.") .. "\n" ..
S("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."),
S("You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving.") .. "\n" ..
S("To obtain the minecart, punch it while holding down the sneak key."),
S("To obtain the minecart, punch it while holding down the sneak key.") .. "\n" ..
S("If it moves over a powered activator rail, you'll get ejected."),
"mcl_minecarts_minecart.b3d",
{"mcl_minecarts_minecart.png"},
"mcl_minecarts_minecart_normal.png",
@ -488,11 +622,7 @@ register_minecart(
end
local player_name = clicker:get_player_name()
if self._driver and player_name == self._driver then
self._driver = nil
self._start_pos = nil
clicker:set_detach()
clicker:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0})
mcl_player.player_set_animation(clicker, "stand" , 30)
detach_driver(self)
elseif not self._driver then
self._driver = player_name
self._start_pos = self.object:get_pos()
@ -507,7 +637,7 @@ register_minecart(
end
end, name)
end
end
end, activate_normal_minecart
)
-- Minecart with Chest
@ -515,7 +645,7 @@ register_minecart(
"mcl_minecarts:chest_minecart",
"mcl_minecarts:chest_minecart",
S("Minecart with Chest"),
nil, nil,
nil, nil, nil,
"mcl_minecarts_minecart_chest.b3d",
{ "mcl_chests_normal.png", "mcl_minecarts_minecart.png" },
"mcl_minecarts_minecart_chest.png",
@ -527,7 +657,11 @@ register_minecart(
"mcl_minecarts:furnace_minecart",
"mcl_minecarts:furnace_minecart",
S("Minecart with Furnace"),
nil, nil,
nil,
S("A minecart with furnace is a vehicle that travels on rails. It can propel itself with fuel."),
S("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.") .. "\n" ..
S("To obtain the minecart and furnace, punch them while holding down the sneak key."),
"mcl_minecarts_minecart_block.b3d",
{
"default_furnace_top.png",
@ -554,13 +688,20 @@ register_minecart(
if not minetest.settings:get_bool("creative_mode") then
held:take_item()
local index = clicker:get_wielded_index()
local index = clicker:get_wield_index()
local inv = clicker:get_inventory()
inv:set_stack("main", index, held)
end
-- DEBUG
minetest.chat_send_player(clicker:get_player_name(), "Fuel: " .. tostring(self._fueltime))
self.object:set_properties({textures =
{
"default_furnace_top.png",
"default_furnace_top.png",
"default_furnace_front_active.png",
"default_furnace_side.png",
"default_furnace_side.png",
"default_furnace_side.png",
"mcl_minecarts_minecart.png",
}})
end
end, nil, false
)
@ -570,7 +711,7 @@ register_minecart(
"mcl_minecarts:command_block_minecart",
"mcl_minecarts:command_block_minecart",
S("Minecart with Command Block"),
nil, nil,
nil, nil, nil,
"mcl_minecarts_minecart_block.b3d",
{
"jeija_commandblock_off.png^[verticalframe:2:0",
@ -591,7 +732,7 @@ register_minecart(
"mcl_minecarts:hopper_minecart",
"mcl_minecarts:hopper_minecart",
S("Minecart with Hopper"),
nil, nil,
nil, nil, nil,
"mcl_minecarts_minecart_hopper.b3d",
{
"mcl_hoppers_hopper_inside.png",
@ -609,7 +750,10 @@ register_minecart(
"mcl_minecarts:tnt_minecart",
"mcl_minecarts:tnt_minecart",
S("Minecart with TNT"),
nil, nil,
S("Vehicle for fast travel on rails").."\n"..S("Can be ignited by tools or powered activator rail"),
S("A minecart with TNT is an explosive vehicle that travels on rail."),
S("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.") .. "\n" ..
S("To obtain the minecart and TNT, punch them while holding down the sneak key. You can't do this if the TNT was ignited."),
"mcl_minecarts_minecart_block.b3d",
{
"default_tnt_top.png",
@ -622,8 +766,25 @@ register_minecart(
},
"mcl_minecarts_minecart_tnt.png",
{"mcl_minecarts:minecart", "mcl_tnt:tnt"},
nil, nil, false
)
-- Ingite
function(self, clicker)
if not clicker or not clicker:is_player() then
return
end
if self._boomtimer then
return
end
local held = clicker:get_wielded_item()
if held:get_name() == "mcl_fire:flint_and_steel" then
if not minetest.settings:get_bool("creative_mode") then
held:add_wear(65535/65) -- 65 uses
local index = clicker:get_wield_index()
local inv = clicker:get_inventory()
inv:set_stack("main", index, held)
end
activate_tnt_minecart(self)
end
end, activate_tnt_minecart)
minetest.register_craft({
@ -634,8 +795,25 @@ minetest.register_craft({
},
})
minetest.register_craft({
output = "mcl_minecarts:tnt_minecart",
recipe = {
{"mcl_tnt:tnt"},
{"mcl_minecarts:minecart"},
},
})
-- TODO: Re-enable crafting of special minecarts when they have been implemented
if false then
minetest.register_craft({
output = "mcl_minecarts:furnace_minecart",
recipe = {
{"mcl_furnaces:furnace"},
{"mcl_minecarts:minecart"},
},
})
minetest.register_craft({
output = "mcl_minecarts:hopper_minecart",
recipe = {
@ -652,19 +830,4 @@ minetest.register_craft({
},
})
minetest.register_craft({
output = "mcl_minecarts:tnt_minecart",
recipe = {
{"mcl_tnt:tnt"},
{"mcl_minecarts:minecart"},
},
})
minetest.register_craft({
output = "mcl_minecarts:furnace_minecart",
recipe = {
{"mcl_furnaces:furnace"},
{"mcl_minecarts:minecart"},
},
})
end

View file

@ -4,6 +4,12 @@ Minecarts can be used for a quick transportion on rails.=Loren können für eine
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.=Loren fahren nur auf Schienen und bleiben immer auf der Strecke. An einer Einmündung ohne einem Weg nach vorne fahren sie nach links. Die Geschwindigkeit hängt vom Schienentyp ab.
You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving.=Sie können die Lore auf Schienen platzieren. Rechtsklicken, um einzusteigen.
To obtain the minecart, punch it while holding down the sneak key.=Um die Lore aufzusammeln, schlagen Sie sie, während Sie die Schleichen-Taste gedrückt halten.
A minecart with TNT is an explosive vehicle that travels on rail.=Eine Lore mit TNT ist ein explosives Fahrzeug, das auf Schienen fährt.
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.=Auf Schienen platzieren. Zuschlagen zum Bewegen. Das TNT wird mit einem Feuerzeug angezündet, oder, wenn die Lore sich auf einer bestromten Aktivierungsschiene befindet.
To obtain the minecart and TNT, punch them while holding down the sneak key. You can't do this if the TNT was ignited.=Um die Lore und das TNT zu erhalten, schlagen Sie sie, während Sie die Schleichtaste drücken. Das ist nicht möglich, wenn das TNT bereits gezündet wurde.
A minecart with furnace is a vehicle that travels on rails. It can propel itself with fuel.=Eine Lore mit Ofen ist ein Fahrzeug, das auf Rädern fährt. Sie kann mit Brennstoff angetrieben werden.
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.=Auf Schienen platzieren. Wird Kohle eingefügt, wird der Ofen für eine lange Zeit brennen und die Lore wird fähig sein, sich selbst anzutreiben. Zuschlagen, um die Bewegung einzuläuten.
To obtain the minecart and furnace, punch them while holding down the sneak key.=Um die Lore und den Ofen zu erhalten, schlagen Sie zu, während Sie die Schleichtaste drücken.
Minecart with Chest=Lore mit Truhe
Minecart with Furnace=Lore mit Ofen
Minecart with Command Block=Lore mit Befehlsblock
@ -21,3 +27,9 @@ To make this rail activate minecarts, power it with redstone power and send a mi
Detector Rail=Sensorschiene
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.=Schienen können benutzt werden, um Strecken für Loren zu bauen. Eine Sensorschiene kann eine Lore erkennen und versorgt Redstone-Mechanismen.
To detect a minecart and provide redstone power, connect it to redstone trails or redstone mechanisms and send any minecart over the rail.=Um eine Lore zu erkennen und die Redstone-Energie zu aktivieren, verbinden Sie die Schiene mit Redstonestaub oder Redstone-Mechanismen und schicken Sie eine beliebige Lore über die Schiene.
Track for minecarts=Strecke für Loren
Speed up when powered, slow down when not powered=Beschleunigt, wenn bestromt, sonst verlangsamt es
Activates minecarts when powered=Aktiviert Loren, wenn bestromt
Emits redstone power when a minecart is detected=Gibt ein Redstonesignal aus, wenn eine Lore erfasst wird
Vehicle for fast travel on rails=Fahrzeug zum schnellen Transport auf Schienen
Can be ignited by tools or powered activator rail=Kann mit Werkzeugen oder bestromten Aktivierungsschienen angezündet werden

View file

@ -0,0 +1,23 @@
# textdomain: mcl_minecarts
Minecart=Vagoneta
Minecarts can be used for a quick transportion on rails.=Las vagonetas se pueden usar para transportarse rápido en los rieles.
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.=Las vagonetas solo viajan en rieles y siempre siguen las pistas. En un cruce en T sin camino recto, giran a la izquierda. La velocidad se ve afectada por el tipo de riel.
You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving.=Puedes colocar el vagoneta en los rieles. Haga clic derecho para insertarlo. Golpea para que se mueva.
To obtain the minecart, punch it while holding down the sneak key.=Para obtener el vagoneta, golpéalo mientras mantienes presionada la tecla.
Minecart with Chest=Vagoneta con cofre
Minecart with Furnace=Vagoneta con horno
Minecart with Command Block=Vagoneta con bloque de comandos
Minecart with Hopper=Vagoneta con tolva
Minecart with TNT=Vagoneta con dinamita
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.=Colóquelos en el suelo para construir su ferrocarril, los rieles se conectarán automáticamente entre sí y se convertirán en curvas, uniones en T, cruces y pendientes según sea necesario.
Rail=Raíl
Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction.=Los rieles se pueden usar para construir vías de transporte para vagonetas. Los rieles normales ralentizan ligeramente las vagonetas debido a la fricción.
Powered Rail=Raíl propulsor
Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts.=Los rieles se pueden usar para construir vías de transporte para vagonetas. Los railes propulsores pueden acelerar y frenar las vagonetas.
Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power.=Sin energía de redstone, el riel frenará las vagonetas. Para hacer que este riel acelere las vagonetas, aliméntalo con redstone.
Activator Rail=Raíl activador
Rails can be used to build transport tracks for minecarts. Activator rails are used to activate special minecarts.=Los rieles se pueden usar para construir vías de transporte para vagonetas. Los railes activador se utilizan para activar una vagoneta especial.
To make this rail activate minecarts, power it with redstone power and send a minecart over this piece of rail.=Para hacer que este riel active las vagonetas, enciéndelo con energía de redstone y envía una vagoneta sobre este pedazo de riel.
Detector Rail=Raíl detector
Rails can be used to build transport tracks for minecarts. A detector rail is able to detect a minecart above it and powers redstone mechanisms.=Los rieles se pueden usar para construir vías de transporte para vagonetas. Un raíl detector puede detectar una vagoneta sobre él y alimenta los mecanismos 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.=Para detectar una vagoneta y proporcionar energía de redstone, conéctelo a los senderos de redstone o mecanismos de redstone y envíe cualquier vagoneta sobre el riel.

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é

View file

@ -4,6 +4,12 @@ Minecarts can be used for a quick transportion on rails.=
Minecarts only ride on rails and always follow the tracks. At a T-junction with no straight way ahead, they turn left. The speed is affected by the rail type.=
You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving.=
To obtain the minecart, punch it while holding down the sneak key.=
A minecart with TNT is an explosive vehicle that travels on rail.=
Place it on rails. Punch it to move it. The TNT is ignited with a flint and steel or when the minecart is on an powered activator rail.=
To obtain the minecart and TNT, punch them while holding down the sneak key. You can't do this if the TNT was ignited.=
A minecart with furnace is a vehicle that travels on rails. It can propel itself with fuel.=
Place it on rails. If you give it some coal, the furnace will start burning for a long time and the minecart will be able to move itself. Punch it to get it moving.=
To obtain the minecart and furnace, punch them while holding down the sneak key.=
Minecart with Chest=
Minecart with Furnace=
Minecart with Command Block=
@ -21,3 +27,9 @@ To make this rail activate minecarts, power it with redstone power and send a mi
Detector Rail=
Rails can be used to build transport tracks for minecarts. A detector rail is able to detect a minecart above it and powers redstone mechanisms.=
To detect a minecart and provide redstone power, connect it to redstone trails or redstone mechanisms and send any minecart over the rail.=
Track for minecarts=
Speed up when powered, slow down when not powered=
Activates minecarts when powered=
Emits redstone power when a minecart is detected=
Vehicle for fast travel on rails=
Can be ignited by tools or powered activator rail=

View file

@ -73,6 +73,7 @@ register_rail("mcl_minecarts:rail",
{"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"},
{
description = S("Rail"),
_tt_help = S("Track for minecarts"),
_doc_items_longdesc = S("Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction."),
_doc_items_usagehelp = railuse,
}
@ -83,6 +84,7 @@ register_rail("mcl_minecarts:golden_rail",
{"mcl_minecarts_rail_golden.png", "mcl_minecarts_rail_golden_curved.png", "mcl_minecarts_rail_golden_t_junction.png", "mcl_minecarts_rail_golden_crossing.png"},
{
description = S("Powered Rail"),
_tt_help = S("Track for minecarts").."\n"..S("Speed up when powered, slow down when not powered"),
_doc_items_longdesc = S("Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts."),
_doc_items_usagehelp = railuse .. "\n" .. S("Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power."),
_rail_acceleration = -3,
@ -121,6 +123,7 @@ register_rail("mcl_minecarts:activator_rail",
{"mcl_minecarts_rail_activator.png", "mcl_minecarts_rail_activator_curved.png", "mcl_minecarts_rail_activator_t_junction.png", "mcl_minecarts_rail_activator_crossing.png"},
{
description = S("Activator Rail"),
_tt_help = S("Track for minecarts").."\n"..S("Activates minecarts when powered"),
_doc_items_longdesc = S("Rails can be used to build transport tracks for minecarts. Activator rails are used to activate special minecarts."),
_doc_items_usagehelp = railuse .. "\n" .. S("To make this rail activate minecarts, power it with redstone power and send a minecart over this piece of rail."),
mesecons = {
@ -129,12 +132,10 @@ register_rail("mcl_minecarts:activator_rail",
offstate = "mcl_minecarts:activator_rail",
onstate = "mcl_minecarts:activator_rail_on",
rules = rail_rules_long,
},
},
},
-- Hidden from creative because no cart is using this rail so far.
-- TODO: Remove this when the activator rail has become useful.
false
}
)
-- Activator rail (on)
@ -149,6 +150,20 @@ register_rail("mcl_minecarts:activator_rail_on",
onstate = "mcl_minecarts:activator_rail_on",
rules = rail_rules_long,
},
effector = {
-- Activate minecarts
action_on = function(pos, node)
local pos2 = { x = pos.x, y =pos.y + 1, z = pos.z }
local objs = minetest.get_objects_inside_radius(pos2, 1)
for _, o in pairs(objs) do
local l = o:get_luaentity()
if l and string.sub(l.name, 1, 14) == "mcl_minecarts:" and l.on_activate_by_rail then
l:on_activate_by_rail()
end
end
end,
},
},
drop = "mcl_minecarts:activator_rail",
},
@ -160,6 +175,7 @@ register_rail("mcl_minecarts:detector_rail",
{"mcl_minecarts_rail_detector.png", "mcl_minecarts_rail_detector_curved.png", "mcl_minecarts_rail_detector_t_junction.png", "mcl_minecarts_rail_detector_crossing.png"},
{
description = S("Detector Rail"),
_tt_help = S("Track for minecarts").."\n"..S("Emits redstone power when a minecart is detected"),
_doc_items_longdesc = S("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."),
_doc_items_usagehelp = railuse .. "\n" .. S("To detect a minecart and provide redstone power, connect it to redstone trails or redstone mechanisms and send any minecart over the rail."),
mesecons = {
@ -207,9 +223,6 @@ minetest.register_craft({
}
})
-- Activator rail crafting is disabled until it becomes useful.
-- TODO: Enable crafting as needed.
if false then
minetest.register_craft({
output = "mcl_minecarts:activator_rail 6",
recipe = {
@ -218,7 +231,6 @@ minetest.register_craft({
{"mcl_core:iron_ingot", "mcl_core:stick", "mcl_core:iron_ingot"},
}
})
end
minetest.register_craft({
output = "mcl_minecarts:detector_rail 6",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

After

Width:  |  Height:  |  Size: 260 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 249 B

After

Width:  |  Height:  |  Size: 257 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

File diff suppressed because it is too large Load diff

View file

@ -35,8 +35,12 @@ functions needed for the mob to work properly which contains the following:
'breathes_in_water' If true, mob loses breath when not in water. Otherwise,
mob loses breath when inside a node with `drowning` attribute
set (default: false).
'armor' holds strength of mob, 100 is normal, lower is more powerful
and needs more hits and better weapons to kill.
'armor' entity armor groups (see lua_api.txt). If table, a list of
armor groups like for entities. If number, set value of
'fleshy' armor group only.
Note: The 'immortal=1' armor group will automatically be added
since this mod handles health and damage manually.
Default: 100 (mob will take full dmg from 'fleshy' hits)
'passive' when true allows animals to defend themselves when hit,
otherwise they amble onwards.
'walk_velocity' is the speed that your mob can walk around.
@ -46,10 +50,12 @@ functions needed for the mob to work properly which contains the following:
'jump' when true allows your mob to jump updwards.
'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,
defaults to 1.1.
defaults to 0.6.
'fly' when true allows your mob to fly around instead of walking.
'fly_in' holds the node name that the mob flies (or swims) around
in e.g. "air" or "default:water_source".
'fly_in' holds the node name or a table of node names in which the
mob flies (or swims) around in. The special name
'__airlike' stands for all nodes with 'walkable=false'
that are not liquids
'runaway' if true causes animals to turn and run away when hit.
'view_range' how many nodes in distance the mob can see a player.
'damage' how many health points the mob does to a player or another
@ -165,7 +171,9 @@ functions needed for the mob to work properly which contains the following:
'mesh' uses separate object file to define mob.
'visual_size' has the size of the mob, defaults to {x = 1, y = 1}
'collisionbox' has the box in which mob can be interacted with the
world e.g. {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
world e.g. {-0.5, -0.5, -0.5, 0.5, 0.8, 0.5}.
NOTE: Due to a workaround, the upper Y coordinate will be forced
to a minimum value of 0.79.
'selectionbox' has the box in which player can interact with mob
'textures' holds a table list of textures to be used for mob, or you
could use multiple lists inside another table for random
@ -218,6 +226,8 @@ functions needed for the mob to work properly which contains the following:
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
'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
@ -420,6 +430,9 @@ This function registers a arrow for mobs with the attack type shoot.
'hit_mob' a function that is called when the arrow hits a mob;
this function should hurt the mob, the parameters are
(self, mob)
'hit_object' a function that is called when the arrow hits an object
that is neither a player nor a mob. this function should
hurt the object, the parameters are (self, object)
'hit_node' a function that is called when the arrow hits a node, the
parameters are (self, pos, node)
'tail' when set to 1 adds a trail or tail to mob arrows
@ -453,8 +466,6 @@ This function registers a spawn egg which can be used by admin to properly spawn
Explosion Function
------------------
mobs:explosion(pos, radius) -- DEPRECATED!!! use mobs:boom() instead
mobs:boom(self, pos, radius)
'self' mob entity
'pos' centre position of explosion

View file

@ -4,6 +4,7 @@ local S = minetest.get_translator("mcl_mobs")
-- name tag
minetest.register_craftitem("mcl_mobs:nametag", {
description = S("Name Tag"),
_tt_help = S("Give names to mobs").."\n"..S("Set name at anvil"),
_doc_items_longdesc = S("A name tag is an item to name a mob."),
_doc_items_usagehelp = S("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."),
inventory_image = "mobs_nametag.png",

View file

@ -1,9 +0,0 @@
mcl_core
mcl_weather?
mcl_tnt?
mcl_hunger?
invisibility?
intllib?
lucky_block?
cmi?
doc_identifier?

View file

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

View file

@ -6,3 +6,6 @@ You need the “maphack” privilege to change the mob spawner.=Sie brauchen das
Name Tag=Namensschild
A name tag is an item to name a mob.=Ein Namensschild ist ein Gegenstand, um einen Mob zu benennen.
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.=Bevor Sie ein Namensschild benutzen können, müssen Sie ihn an einem Amboss benennen. Dann können können Sie das Namensschild benutztn, um einen Mob zu benennen. Das wird das Namensschild verbrauchen.
Only peaceful mobs allowed!=Nur friedliche Mobs erlaubt!
Give names to mobs=Benennt Mobs
Set name at anvil=Namen am Amboss setzen

View file

@ -0,0 +1,9 @@
# textdomain: mcl_mobs
Peaceful mode active! No monsters will spawn.=¡Modo pacífico activo! No aparecerán monstruos.
This allows you to place a single mob.=Esto le permite colocar un solo animal.
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.=Simplemente colóquelo donde desea que aparezcan los animales. Los animales aparecerán domesticados, a menos que mantenga presionada la tecla de sigilo mientras coloca. Si coloca esto en un engendrador de animales, cambia el animal que genera.
You need the “maphack” privilege to change the mob spawner.=Necesita el privilegio "maphack" para cambiar el generador de animales.
Name Tag=Etiqueta
A name tag is an item to name a mob.=Una etiqueta es un elemento para nombrar una animal.
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.=Antes de usar la etiqueta, debe establecer un nombre en un yunque. Luego puede usar la etiqueta para nombrar un animal. Esto usa la etiqueta.
Only peaceful mobs allowed!=¡Solo se permiten animales pacíficos!

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

@ -6,3 +6,6 @@ You need the “maphack” privilege to change the mob spawner.=
Name Tag=
A name tag is an item to name a mob.=
Before you use the name tag, you need to set a name at an anvil. Then you can use the name tag to name a mob. This uses up the name tag.=
Only peaceful mobs allowed!=
Give names to mobs=
Set name at anvil=

View file

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

View file

@ -121,7 +121,7 @@ end)
function mobs.attach(entity, player)
local attach_at, eye_offset = {}, {}
local attach_at, eye_offset
entity.player_rotation = entity.player_rotation or {x = 0, y = 0, z = 0}
entity.driver_attach_at = entity.driver_attach_at or {x = 0, y = 0, z = 0}
@ -183,10 +183,10 @@ end
function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime)
local rot_steer, rot_view = math.pi/2, 0
local rot_view = 0
if entity.player_rotation.y == 90 then
rot_steer, rot_view = 0, math.pi/2
rot_view = math.pi/2
end
local acce_y = 0
@ -262,7 +262,7 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime)
return
end
-- set moving animation
if moving_anim then
mobs:set_animation(entity, moving_anim)
@ -293,7 +293,7 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime)
-- Set position, velocity and acceleration
local p = entity.object:get_pos()
local new_velo = {x = 0, y = 0, z = 0}
local new_velo
local new_acce = {x = 0, y = -9.8, z = 0}
p.y = p.y - 0.5
@ -318,7 +318,7 @@ function mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime)
minetest.sound_play("default_punch", {
object = entity.object,
max_hear_distance = 5
})
}, true)
entity.object:punch(entity.object, 1.0, {
full_punch_interval = 1.0,
@ -390,11 +390,6 @@ function mobs.fly(entity, dtime, speed, shoots, arrow, moving_anim, stand_anim)
local velo = entity.object:get_velocity()
local dir = entity.driver:get_look_dir()
local yaw = entity.driver:get_look_horizontal() + 1.57 -- offset fix between old and new commands
local rot_steer, rot_view = math.pi / 2, 0
if entity.player_rotation.y == 90 then
rot_steer, rot_view = 0, math.pi / 2
end
if ctrl.up then
entity.object:set_velocity({

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
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 = { mobs_mc.items.netherrack, "mcl_nether:netherrack", "mcl_portals:nether_air" },
nether_fortress = { mobs_mc.items.nether_brick_block, "mcl_nether:nether_brick", },
nether = { mobs_mc.items.netherrack, "mcl_nether:netherrack", },
nether_portal = { mobs_mc.items.nether_portal, "mcl_portals:portal" },
water = { mobs_mc.items.water_source, "mcl_core:water_source", "default:water_source" },
}

View file

@ -262,17 +262,6 @@ if c("saddle") then
})
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
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
@ -283,6 +272,9 @@ if c("iron_horse_armor") then
_doc_items_usagehelp = horse_armor_use,
inventory_image = "mobs_mc_iron_horse_armor.png",
_horse_overlay_image = "mobs_mc_horse_armor_iron.png",
sounds = {
_mcl_armor_equip = "mcl_armor_equip_iron",
},
stack_max = 1,
groups = { horse_armor = 85 },
})
@ -294,6 +286,9 @@ if c("gold_horse_armor") then
_doc_items_usagehelp = horse_armor_use,
inventory_image = "mobs_mc_gold_horse_armor.png",
_horse_overlay_image = "mobs_mc_horse_armor_gold.png",
sounds = {
_mcl_armor_equip = "mcl_armor_equip_iron",
},
stack_max = 1,
groups = { horse_armor = 60 },
})
@ -305,6 +300,9 @@ if c("diamond_horse_armor") then
_doc_items_usagehelp = horse_armor_use,
inventory_image = "mobs_mc_diamond_horse_armor.png",
_horse_overlay_image = "mobs_mc_horse_armor_diamond.png",
sounds = {
_mcl_armor_equip = "mcl_armor_equip_diamond",
},
stack_max = 1,
groups = { horse_armor = 45 },
})
@ -523,6 +521,7 @@ if c("totem") then
-- Totem of Undying
minetest.register_craftitem("mobs_mc:totem", {
description = S("Totem of Undying"),
_tt_help = minetest.colorize("#00FF00", S("Protects you from death while wielding it")),
_doc_items_longdesc = S("A totem of undying is a rare artifact which may safe you from certain death."),
_doc_items_usagehelp = S("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."),
inventory_image = "mcl_totems_totem.png",
@ -558,7 +557,7 @@ if c("totem") then
player:set_wielded_item(wield)
end
-- 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
if not hud_totem[player:get_player_name()] then
@ -568,6 +567,7 @@ if c("totem") then
position = { x=0.5, y=1 },
scale = { x=17, y=17 },
offset = { x=0, y=-178 },
z_index = 100,
})
minetest.after(3, function(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().name ~= "mobs_mc:arrow_entity" and obj:get_luaentity().name ~= "__builtin:item" then
local damage = 3
minetest.sound_play("damage", {pos = pos})
minetest.sound_play("damage", {pos = pos}, true)
obj:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups={fleshy=damage},
@ -94,7 +94,7 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
end
else
local damage = 3
minetest.sound_play("damage", {pos = pos})
minetest.sound_play("damage", {pos = pos}, true)
obj:punch(self.object, 1.0, {
full_punch_interval=1.0,
damage_groups={fleshy=damage},
@ -106,7 +106,7 @@ THROWING_ARROW_ENTITY.on_step = function(self, dtime)
if self.lastpos.x~=nil 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')
self.object:remove()
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_acceleration({x=dir.x*-3, y=-10, z=dir.z*-3})
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
obj:get_luaentity().player = player
end
@ -266,7 +266,7 @@ if c("egg") then
pos = playerpos,
gain = 1.0,
max_hear_distance = 5,
})
}, true)
local obj = minetest.add_entity({
x = playerpos.x,
@ -399,7 +399,3 @@ if c("snowball") then
end
--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", {
type = "npc",
spawn_class = "passive",
passive = true,
stepheight = 1.2,
hp_min = 20,
hp_max = 20,
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)
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", {
type = "animal",
spawn_class = "ambient",
can_despawn = true,
passive = true,
hp_min = 6,
@ -44,7 +45,6 @@ mobs:register_mob("mobs_mc:bat", {
view_range = 16,
fly = true,
fly_in = "air",
})
@ -66,8 +66,3 @@ mobs:spawn_specific("mobs_mc:bat", mobs_mc.spawn.solid, {"air"}, 0, maxlight, 20
-- spawn eggs
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", {
type = "monster",
spawn_class = "hostile",
hp_min = 20,
hp_max = 20,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.79, 0.3},
@ -21,6 +22,7 @@ mobs:register_mob("mobs_mc:blaze", {
textures = {
{"mobs_mc_blaze.png"},
},
armor = { fleshy = 100, snowball_vulnerable = 100 },
visual_size = {x=3, y=3},
sounds = {
random = "mobs_mc_blaze_breath",
@ -61,11 +63,11 @@ mobs:register_mob("mobs_mc:blaze", {
attack_type = "dogshoot",
arrow = "mobs_mc:blaze_fireball",
shoot_interval = 3.5,
shoot_offset = 1.0,
passive = false,
jump = true,
jump_height = 4,
fly = true,
jump_chance = 98,
fear_height = 0,
glow = 14,
})
@ -77,7 +79,7 @@ mobs:register_arrow("mobs_mc:blaze_fireball", {
visual = "sprite",
visual_size = {x = 0.3, y = 0.3},
textures = {"mcl_fire_fire_charge.png"},
velocity = 12,
velocity = 15,
-- Direct hit, no fire... just plenty of pain
hit_player = function(self, player)
@ -94,6 +96,15 @@ mobs:register_arrow("mobs_mc:blaze_fireball", {
}, nil)
end,
hit_object = function(self, object)
local lua = object:get_luaentity()
if lua then
if lua.name == "mcl_minecarts:tnt_minecart" then
lua:on_activate_by_rail(2)
end
end
end,
-- Node hit, make fire
hit_node = function(self, pos, node)
if node.name == "air" then
@ -114,12 +125,3 @@ mobs:register_arrow("mobs_mc:blaze_fireball", {
-- spawn eggs
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", {
type = "animal",
spawn_class = "passive",
hp_min = 4,
hp_max = 4,
@ -86,7 +87,7 @@ mobs:register_mob("mobs_mc:chicken", {
pos = pos,
gain = 1.0,
max_hear_distance = 16,
})
}, true)
end,
})
@ -96,7 +97,3 @@ mobs:spawn_specific("mobs_mc:chicken", mobs_mc.spawn.grassland, {"air"}, 9, mine
-- spawn eggs
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 = {
type = "animal",
spawn_class = "passive",
hp_min = 10,
hp_max = 10,
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
if item:get_name() == mobs_mc.items.shears then
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
minetest.add_item({x=pos.x, y=pos.y+1.4, z=pos.z}, mobs_mc.items.mushroom_brown .. " 5")
@ -135,16 +136,9 @@ mobs:register_mob("mobs_mc:mooshroom", mooshroom_def)
-- 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: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)
-- compatibility
mobs:alias_mob("mobs_animal:cow", "mobs_mc:cow")
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, 5, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max)
-- spawn egg
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)
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", {
type = "monster",
spawn_class = "hostile",
hp_min = 20,
hp_max = 20,
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" },
attack_type = "explode",
explosion_radius = 3,
explosion_strength = 3,
reach = 4,
explosion_damage_radius = 7,
explosion_timer = 1.5,
allow_fuse_reset = true,
stop_to_explode = true,
@ -57,19 +57,19 @@ mobs:register_mob("mobs_mc:creeper", {
item:add_wear(1000)
-- Tool break sound
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
clicker:set_wielded_item(item)
end
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,
do_custom = function(self, dtime)
if self._forced_explosion_countdown_timer ~= nil then
self._forced_explosion_countdown_timer = self._forced_explosion_countdown_timer - dtime
if self._forced_explosion_countdown_timer <= 0 then
mobs:explosion(self.object:get_pos(), self.explosion_radius, 0, 1, self.sounds.explode)
mobs:boom(self, self.object:get_pos(), self.explosion_strength)
self.object:remove()
end
end
@ -120,12 +120,5 @@ mobs:register_mob("mobs_mc:creeper", {
mobs:spawn_specific("mobs_mc:creeper", mobs_mc.spawn.solid, {"air"}, 0, 7, 20, 16500, 2, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max)
-- compatibility
mobs:alias_mob("mobs:creeper", "mobs_mc:creeper")
-- spawn eggs
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", {
type = "monster",
spawn_class = "hostile",
pathfinding = 1,
attacks_animals = true,
walk_chance = 100,
@ -32,10 +33,7 @@ mobs:register_mob("mobs_mc:enderdragon", {
damage = 10,
jump = true,
jump_height = 14,
stepheight = 1.2,
jump_chance = 100,
fly = true,
fly_in = {"air"},
dogshoot_switch = 1,
dogshoot_count_max =5,
dogshoot_count2_max = 5,
@ -51,9 +49,9 @@ mobs:register_mob("mobs_mc:enderdragon", {
fire_damage = 0,
on_rightclick = nil,
attack_type = "dogshoot",
arrow = "mobs_mc:fireball2",
arrow = "mobs_mc:dragon_fireball",
shoot_interval = 0.5,
shoot_offset = -1,
shoot_offset = -1.0,
animation = {
fly_speed = 8, stand_speed = 8,
stand_start = 0, stand_end = 20,
@ -67,87 +65,33 @@ mobs:register_mob("mobs_mc:enderdragon", {
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
mobs:register_arrow("mobs_mc:roar_of_the_dragon2", {
-- dragon fireball (projectile)
mobs:register_arrow("mobs_mc:dragon_fireball", {
visual = "sprite",
visual_size = {x = 1, y = 1},
--textures = {"transparent.png"},
textures = {"mese_egg.png"},
velocity = 10,
on_step = function(self, dtime)
local pos = self.object:get_pos()
local n = minetest.get_node(pos).name
if self.timer == 0 then
self.timer = os.time()
end
if os.time() - self.timer > 8 or minetest.is_protected(pos, "") then
self.object:remove()
end
local objects = minetest.get_objects_inside_radius(pos, 1)
for _,obj in ipairs(objects) do
local name = self.name
if name~="mobs_mc:roar_of_the_dragon2" and name ~= "mobs_mc:enderdragon" then
obj:set_hp(obj:get_hp()-5)
if (obj:get_hp() <= 0) then
if (not obj:is_player()) and name ~= self.object:get_luaentity().name then
obj:remove()
end
end
end
end
if mobs_griefing then
minetest.set_node(pos, {name="air"})
if math.random(1,2)==1 then
local dx = math.random(-1,1)
local dy = math.random(-1,1)
local dz = math.random(-1,1)
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
minetest.set_node(p, {name="air"})
end
end
end
})
--GOOD LUCK LOL!
-- fireball (weapon)
mobs:register_arrow(":mobs_mc:fireball2", {
visual = "sprite",
visual_size = {x = 1.5, y = 1.5},
visual_size = {x = 1.25, y = 1.25},
textures = {"mobs_mc_dragon_fireball.png"},
--textures = {"mobs_skeleton2_front.png^[makealpha:255,255,255 "},
velocity = 6,
-- direct hit, no fire... just plenty of pain
hit_player = function(self, player)
minetest.sound_play("tnt_explode", {pos = player:get_pos(), gain = 1.5, max_hear_distance = 2*64})
player:punch(self.object, 1.0, {
full_punch_interval = 0.5,
damage_groups = {fleshy = 6},
damage_groups = {fleshy = 12},
}, nil)
end,
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, {
full_punch_interval = 0.5,
damage_groups = {fleshy = 12},
}, nil)
end,
-- node hit, bursts into flame
-- node hit, explode
hit_node = function(self, pos, node)
mobs:explosion(pos, 3, 0, 1)
--from tnt
minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5, max_hear_distance = 2*64})
mobs:boom(self, pos, 2)
end
})
mobs:register_egg("mobs_mc:enderdragon", S("Ender Dragon"), "mobs_mc_spawn_icon_dragon.png", 0)
mobs:register_egg("mobs_mc:enderdragon", S("Ender Dragon"), "mobs_mc_spawn_icon_dragon.png", 0, true)

View file

@ -168,9 +168,9 @@ local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
mobs:register_mob("mobs_mc:enderman", {
-- TODO: Endermen should be classified as passive
type = "monster",
spawn_class = "passive",
passive = false,
pathfinding = 1,
stepheight = 1.2,
hp_min = 40,
hp_max = 40,
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")
mobs:set_animation(self, self.animation.current)
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
@ -276,7 +276,7 @@ mobs:register_mob("mobs_mc:enderman", {
self.animation = select_enderman_animation("normal")
mobs:set_animation(self, self.animation.current)
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
self._taken_node = ""
end
@ -337,9 +337,3 @@ mobs:spawn_specific("mobs_mc:enderman", mobs_mc.spawn.solid, {"air"}, 0, 7, 30,
-- spawn eggs
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", {
type = "monster",
spawn_class = "hostile",
passive = false,
hp_min = 8,
hp_max = 8,

View file

@ -12,6 +12,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:ghast", {
type = "monster",
spawn_class = "hostile",
pathfinding = 1,
group_attack = true,
hp_min = 10,
@ -55,13 +56,10 @@ mobs:register_mob("mobs_mc:ghast", {
},
fall_damage = 0,
view_range = 100,
--attack_type = "dogshoot",
attack_type = "dogshoot",
arrow = "mobs_monster:fireball",
arrow = "mobs_mc:fireball",
shoot_interval = 3.5,
shoot_offset = 1,
--'dogshoot_switch' allows switching between shoot and dogfight modes inside dogshoot using timer (1 = shoot, 2 = dogfight)
--'dogshoot_count_max' number of seconds before switching above modes.
shoot_offset = -5,
dogshoot_switch = 1,
dogshoot_count_max =1,
passive = false,
@ -69,38 +67,36 @@ mobs:register_mob("mobs_mc:ghast", {
jump_height = 4,
floats=1,
fly = true,
fly_in = {"air"},
jump_chance = 98,
})
mobs:spawn_specific("mobs_mc:ghast", mobs_mc.spawn.nether, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 18000, 2, mobs_mc.spawn_height.nether_min, mobs_mc.spawn_height.nether_max)
-- fireball (weapon)
mobs:register_arrow(":mobs_monster:fireball", {
-- fireball (projectile)
mobs:register_arrow("mobs_mc:fireball", {
visual = "sprite",
visual_size = {x = 0.5, y = 0.5},
visual_size = {x = 1, y = 1},
textures = {"mcl_fire_fire_charge.png"},
velocity = 6,
velocity = 15,
-- direct hit, no fire... just plenty of pain
hit_player = function(self, player)
player:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 8},
damage_groups = {fleshy = 6},
}, nil)
mobs:boom(self, self.object:get_pos(), 1, true)
end,
hit_mob = function(self, mob)
mob:punch(self.object, 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 8},
damage_groups = {fleshy = 6},
}, nil)
mobs:boom(self, self.object:get_pos(), 1, true)
end,
-- node hit, bursts into flame
hit_node = function(self, pos, node)
mobs:explosion(pos, 1, 1, 0)
mobs:boom(self, pos, 1, true)
end
})
@ -109,7 +105,3 @@ mobs:register_arrow(":mobs_monster:fireball", {
-- spawn eggs
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", {
type = "monster",
spawn_class = "hostile",
hp_min = 30,
hp_max = 30,
breath_max = -1,
@ -38,10 +39,12 @@ mobs:register_mob("mobs_mc:guardian", {
run_start = 0, run_end = 20,
},
drops = {
-- Greatly increased amounts of prismarine
{name = mobs_mc.items.prismarine_shard,
chance = 1,
min = 0,
max = 2,},
max = 32,},
-- TODO: Reduce of drops when ocean monument is ready.
-- The following drops are approximations
-- Fish / prismarine crystal
@ -52,7 +55,7 @@ mobs:register_mob("mobs_mc:guardian", {
{name = mobs_mc.items.prismarine_crystals,
chance = 4,
min = 1,
max = 1,},
max = 2,},
-- Rare drop: fish
{name = mobs_mc.items.fish_raw,
@ -74,12 +77,13 @@ mobs:register_mob("mobs_mc:guardian", {
},
fly = true,
fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
stepheight = 0.1,
jump = false,
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
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", {
type = "monster",
spawn_class = "hostile",
hp_min = 80,
hp_max = 80,
breath_max = -1,
@ -38,10 +39,14 @@ mobs:register_mob("mobs_mc:guardian_elder", {
run_start = 0, run_end = 20,
},
drops = {
-- TODO: Reduce # of drops when ocean monument is ready.
-- Greatly increased amounts of prismarine
{name = mobs_mc.items.prismarine_shard,
chance = 1,
min = 0,
max = 2,},
min = 1,
max = 64,},
-- TODO: Only drop if killed by player
{name = mobs_mc.items.wet_sponge,
chance = 1,
@ -55,9 +60,9 @@ mobs:register_mob("mobs_mc:guardian_elder", {
min = 1,
max = 1,},
{name = mobs_mc.items.prismarine_crystals,
chance = 4,
chance = 1,
min = 1,
max = 1,},
max = 10,},
-- Rare drop: fish
{name = mobs_mc.items.fish_raw,
@ -79,12 +84,13 @@ mobs:register_mob("mobs_mc:guardian_elder", {
},
fly = true,
fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
stepheight = 0.1,
jump = false,
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
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
local horse = {
type = "animal",
spawn_class = "passive",
visual = "mesh",
mesh = "mobs_mc_horse.b3d",
visual_size = {x=3.0, y=3.0},
@ -184,14 +185,36 @@ local horse = {
end
local item = clicker:get_wielded_item()
if can_breed(self.name) and (item:get_name() == mobs_mc.items.golden_apple or item:get_name() == mobs_mc.items.golden_carrot) then
local iname = item:get_name()
local heal = 0
if can_breed(self.name) then
-- Breed horse with golden apple or golden carrot
if mobs:feed_tame(self, clicker, 1, true, false) then return end
if (iname == mobs_mc.items.golden_apple) then
heal = 10
elseif (iname == mobs_mc.items.golden_carrot) then
heal = 4
end
if heal > 0 and mobs:feed_tame(self, clicker, heal, true, false) then
return
end
end
-- Feed/tame with anything else
-- TODO: Different health bonus for feeding
if mobs:feed_tame(self, clicker, 1, false, true) then return end
if mobs:protect(self, clicker) then return end
if (iname == mobs_mc.items.sugar) then
heal = 1
elseif (iname == mobs_mc.items.wheat) then
heal = 2
elseif (iname == mobs_mc.items.apple) then
heal = 3
elseif (iname == mobs_mc.items.hay_bale) then
heal = 20
end
if heal > 0 and mobs:feed_tame(self, clicker, heal, false, true) then
return
end
if mobs:protect(self, clicker) then
return
end
-- Make sure tamed horse is mature and being clicked by owner only
if self.tamed and not self.child and self.owner == clicker:get_player_name() then
@ -205,7 +228,7 @@ local horse = {
-- Put on saddle if tamed
elseif not self.driver and not self._saddle
and clicker:get_wielded_item():get_name() == mobs_mc.items.saddle then
and iname == mobs_mc.items.saddle then
-- Put on saddle and take saddle from player's inventory
local w = clicker:get_wielded_item()
@ -223,16 +246,17 @@ local horse = {
local tex = horse_extra_texture(self)
self.base_texture = tex
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()}, true)
-- Put on horse armor if tamed
elseif can_equip_horse_armor(self.name) and not self.driver and not self._horse_armor
and minetest.get_item_group(clicker:get_wielded_item():get_name(), "horse_armor") > 0 then
and minetest.get_item_group(iname, "horse_armor") > 0 then
-- Put on armor and take armor from player's inventory
local armor = minetest.get_item_group(iname, "horse_armor")
self._horse_armor = iname
local w = clicker:get_wielded_item()
local armor = minetest.get_item_group(w:get_name(), "horse_armor")
self._horse_armor = w:get_name()
if not minetest.settings:get_bool("creative_mode") then
w:take_item()
clicker:set_wielded_item(w)
@ -252,7 +276,10 @@ local horse = {
local tex = horse_extra_texture(self)
self.base_texture = tex
self.object:set_properties({textures = self.base_texture})
local def = w:get_definition()
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()}, true)
end
-- Mount horse
elseif not self.driver and self._saddle then
@ -261,7 +288,7 @@ local horse = {
mobs.attach(self, clicker)
-- Used to capture horse
elseif not self.driver and clicker:get_wielded_item():get_name() ~= "" then
elseif not self.driver and iname ~= "" then
mobs:capture_mob(self, clicker, 0, 5, 60, false, nil)
end
end
@ -399,11 +426,8 @@ mobs:register_mob("mobs_mc:mule", mule)
--===========================
--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: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)
-- compatibility
mobs:alias_mob("mobs:horse", "mobs_mc:horse")
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, 4, mobs_mc.spawn_height.water+3, mobs_mc.spawn_height.overworld_max)
-- spawn eggs
mobs:register_egg("mobs_mc:horse", S("Horse"), "mobs_mc_spawn_icon_horse.png", 0)
@ -411,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: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)
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", {
type = "npc",
spawn_class = "passive",
passive = true,
hp_min = 100,
hp_max = 100,
@ -172,7 +173,3 @@ mobs_mc.tools.check_iron_golem_summon = function(pos)
end
end
end
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Iron Golem loaded")
end

View file

@ -4,8 +4,29 @@ local S = minetest.get_translator("mobs_mc")
--################### LLAMA
--###################
local carpets = {
-- group = { carpet , short_texture_name }
unicolor_white = { "mcl_wool:white_carpet", "white" },
unicolor_dark_orange = { "mcl_wool:brown_carpet", "brown" },
unicolor_grey = { "mcl_wool:silver_carpet", "light_gray" },
unicolor_darkgrey = { "mcl_wool:grey_carpet", "gray" },
unicolor_blue = { "mcl_wool:blue_carpet", "blue" },
unicolor_dark_green = { "mcl_wool:green_carpet", "green" },
unicolor_green = { "mcl_wool:lime_carpet", "lime" },
unicolor_violet = { "mcl_wool:purple_carpet", "purple" },
unicolor_light_red = { "mcl_wool:pink_carpet", "pink" },
unicolor_yellow = { "mcl_wool:yellow_carpet", "yellow" },
unicolor_orange = { "mcl_wool:orange_carpet", "orange" },
unicolor_red = { "mcl_wool:red_carpet", "red" },
unicolor_cyan = { "mcl_wool:cyan_carpet", "cyan" },
unicolor_red_violet = { "mcl_wool:magenta_carpet", "magenta" },
unicolor_black = { "mcl_wool:black_carpet", "black" },
unicolor_light_blue = { "mcl_wool:light_blue_carpet", "light_blue" },
}
mobs:register_mob("mobs_mc:llama", {
type = "animal",
spawn_class = "passive",
hp_min = 15,
hp_max = 30,
passive = false,
@ -18,7 +39,7 @@ mobs:register_mob("mobs_mc:llama", {
{"blank.png", "blank.png", "mobs_mc_llama_gray.png"},
{"blank.png", "blank.png", "mobs_mc_llama_white.png"},
{"blank.png", "blank.png", "mobs_mc_llama.png"},
-- TODO: Implement carpet (aka decor) on llama
-- TODO: Add llama carpet textures (Pixel Perfection seems to use verbatim copy from Minecraft :-( )
},
visual_size = {x=3, y=3},
makes_footstep_sound = true,
@ -109,7 +130,36 @@ mobs:register_mob("mobs_mc:llama", {
-- Make sure tamed llama is mature and being clicked by owner only
if self.tamed and not self.child and self.owner == clicker:get_player_name() then
local inv = clicker:get_inventory()
-- Place carpet
if minetest.get_item_group(item:get_name(), "carpet") == 1 and not self.carpet then
for group, carpetdata in pairs(carpets) do
if minetest.get_item_group(item:get_name(), group) == 1 then
if not minetest.settings:get_bool("creative_mode") then
item:take_item()
clicker:set_wielded_item(item)
end
local substr = carpetdata[2]
local tex_carpet = "mobs_mc_llama_decor_"..substr..".png"
self.base_texture = table.copy(self.base_texture)
self.base_texture[2] = tex_carpet
self.object:set_properties({
textures = self.base_texture,
})
self.carpet = item:get_name()
self.drops = {
{name = mobs_mc.items.leather,
chance = 1,
min = 0,
max = 2,},
{name = item:get_name(),
chance = 1,
min = 1,
max = 1,},
}
return
end
end
end
-- detatch player already riding llama
if self.driver and clicker == self.driver then
@ -127,7 +177,29 @@ mobs:register_mob("mobs_mc:llama", {
elseif not self.driver and clicker:get_wielded_item():get_name() ~= "" then
mobs:capture_mob(self, clicker, 0, 5, 60, false, nil)
end
end
end,
on_breed = function(parent1, parent2)
-- When breeding, make sure the child has no carpet
local pos = parent1.object:get_pos()
local child, parent
if math.random(1,2) == 1 then
parent = parent1
else
parent = parent2
end
child = mobs:spawn_child(pos, parent.name)
if child then
local ent_c = child:get_luaentity()
ent_c.base_texture = table.copy(ent_c.base_texture)
ent_c.base_texture[2] = "blank.png"
child:set_properties({textures = ent_c.base_texture})
ent_c.tamed = true
ent_c.carpet = nil
ent_c.owner = parent.owner
return false
end
end,
})
@ -136,7 +208,3 @@ mobs:spawn_specific("mobs_mc:llama", mobs_mc.spawn.savanna, {"air"}, 0, minetest
-- spawn eggs
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

@ -72,3 +72,4 @@ Weapon Smith=Waffenschmied
Tool Smith=Werkzeugschmied
Cleric=Priester
Nitwit=Dorftrottel
Protects you from death while wielding it=Schützt vor dem Tod, wenn es gehalten wird

View file

@ -0,0 +1,74 @@
# textdomain: mobs_mc
Totem of Undying=Tótem de la inmortalidad
A totem of undying is a rare artifact which may safe you from certain death.=Un tótem de la inmortalidad es un artefacto raro que puede salvarte de una muerte segura.
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.=El tótem solo funciona mientras lo sostienes en tu mano. Si recibes un daño crítico, no mueres y obtienes una segunda oportunidad con 1 HP. Sin embargo, el tótem se destruye en el proceso.
Agent=Agente
Bat=Murciélago
Blaze=Blaze
Chicken=Pollo
Cow=Vaca
Mooshroom=Champiñaca
Creeper=Creeper
Ender Dragon=Enderdragón
Enderman=Enderman
Endermite=Endermite
Ghast=Ghast
Elder Guardian=Gran guardián
Guardian=Guardián
Horse=Caballo
Skeleton Horse=Caballo esquelético
Zombie Horse=Caballo zombie
Donkey=Burro
Mule=Mula
Iron Golem=Golem de hierro
Llama=Llama
Ocelot=Ocelote
Parrot=Loro
Pig=Cerdo
Polar Bear=Oso polar
Rabbit=Conejo
Killer Bunny=Conejo asesino
Sheep=Oveja
Shulker=Shulker
Silverfish=Lepisma
Skeleton=Esqueleto
Stray=Esqueleto
Wither Skeleton=Esqueleto wither
Magma Cube=Cubo de Magma
Slime=Slime
Snow Golem=Golem de nieve
Spider=Araña
Cave Spider=Araña de las cuevas
Squid=Calamar
Vex=Ánima
Evoker=Invocador
Illusioner=Illusionista
Villager=Aldeano
Vindicator=Vindicador
Zombie Villager=Aldeano zombie
Witch=Bruja
Wither=Wither
Wolf=Lobo
Husk=Husk
Zombie=Zombie
Zombie Pigman=Cerdo Zombie
Iron Horse Armor=Armadura de hierro para caballo
Iron horse armor can be worn by horses to increase their protection from harm a bit.=Los caballos pueden usar armadura de caballo de hierro para aumentar un poco su protección contra el daño.
Golden Horse Armor=Armadura de oro para caballo
Golden horse armor can be worn by horses to increase their protection from harm.=Los caballos pueden usar armadura de caballo de oro para aumentar su protección contra el daño.
Diamond Horse Armor=Armadura de diamante para caballo
Diamond horse armor can be worn by horses to greatly increase their protection from harm.=Los caballos pueden usar armadura de caballo de diamante para aumentar en gran medida su protección contra el daño.
Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.=Colóquelo en un caballo para ponerle la armadura de caballo. Los burros y las mulas no pueden usar armadura de caballo.
Farmer=Granjero
Fisherman=Pescador
Fletcher=Flechador
Shepherd=Sacerdote
Librarian=Bibliotecario
Cartographer=Cartógrafo
Armorer=Armero
Leatherworker=Peletero
Butcher=Carnicero
Weapon Smith=Herrero de Armas
Tool Smith=Herrero de Herramientas
Cleric=Sacerdote
Nitwit=Simple

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

@ -72,3 +72,4 @@ Weapon Smith=
Tool Smith=
Cleric=
Nitwit=
Protects you from death while wielding it=

View file

@ -28,6 +28,7 @@ end
-- Ocelot
local ocelot = {
type = "animal",
spawn_class = "passive",
can_despawn = true,
hp_min = 10,
hp_max = 10,
@ -201,13 +202,6 @@ mobs:spawn({
end,
})
-- compatibility
mobs:alias_mob("mobs:kitten", "mobs_mc:ocelot")
-- spawn eggs
-- 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)
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", {
type = "npc",
spawn_class = "passive",
pathfinding = 1,
hp_min = 6,
hp_max = 6,
@ -52,7 +53,6 @@ mobs:register_mob("mobs_mc:parrot", {
floats = 1,
physical = true,
fly = true,
fly_in = {"air"},
fear_height = 4,
view_range = 16,
follow = mobs_mc.follow.parrot,
@ -85,8 +85,4 @@ mobs:register_mob("mobs_mc:parrot", {
--mobs:spawn_specific("mobs_mc:parrot", mobs_mc.spawn.jungle, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 30000, 1, mobs_mc.spawn_height.water+1, mobs_mc.spawn_height.overworld_max)
-- spawn eggs
mobs:register_egg("mobs_mc:parrot", S("Parrot"), "mobs_mc_spawn_icon_parrot.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Parrot loaded")
end
mobs:register_egg("mobs_mc:parrot", S("Parrot"), "mobs_mc_spawn_icon_parrot.png", 0, true)

View file

@ -4,6 +4,7 @@ local S = minetest.get_translator("mobs_mc")
mobs:register_mob("mobs_mc:pig", {
type = "animal",
spawn_class = "passive",
runaway = true,
hp_min = 10,
hp_max = 10,
@ -125,6 +126,7 @@ mobs:register_mob("mobs_mc:pig", {
stack:take_item()
inv:set_stack("main", clicker:get_wield_index(), stack)
end
minetest.sound_play({name = "mcl_armor_equip_leather"}, {gain=0.5, max_hear_distance=8, pos=self.object:get_pos()}, true)
return
end
@ -148,7 +150,7 @@ mobs:register_mob("mobs_mc:pig", {
-- Break carrot on a stick
local def = wielditem:get_definition()
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
wielditem = {name = mobs_mc.items.fishing_rod, count = 1}
else
@ -176,15 +178,7 @@ mobs:register_mob("mobs_mc:pig", {
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)
-- compatibility
mobs:alias_mob("mobs:pig", "mobs_mc:pig")
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
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", {
type = "animal",
spawn_class = "passive",
runaway = false,
passive = false,
stepheight = 1.2,
hp_min = 30,
hp_max = 30,
breath_max = -1,
@ -56,16 +56,7 @@ mobs:register_mob("mobs_mc:polar_bear", {
})
-- compatibility
mobs:alias_mob("mobs_mc:polarbear", "mobs_mc:polar_bear")
mobs:spawn_specific("mobs_mc:polar_bear", mobs_mc.spawn.snow, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 7000, 3, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max)
-- spawn egg
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 = {
type = "animal",
spawn_class = "passive",
passive = true,
reach = 1,
@ -74,6 +75,7 @@ mobs:register_mob("mobs_mc:rabbit", rabbit)
-- The killer bunny (Only with spawn egg)
local killer_bunny = table.copy(rabbit)
killer_bunny.type = "monster"
killer_bunny.spawn_class = "hostile"
killer_bunny.attack_type = "dogfight"
killer_bunny.specific_attack = { "player", "mobs_mc:wolf", "mobs_mc:dog" }
killer_bunny.damage = 8
@ -102,7 +104,7 @@ local spawn = {
name = "mobs_mc:rabbit",
neighbors = {"air"},
chance = 15000,
active_object_count = 99,
active_object_count = 10,
min_light = 0,
max_light = minetest.LIGHT_MAX+1,
min_height = mobs_mc.spawn_height.overworld_min,
@ -160,11 +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
mobs:register_egg("mobs_mc:killer_bunny", S("Killer Bunny"), "mobs_mc_spawn_icon_rabbit.png^[colorize:#FF0000:192", 0) -- TODO: Update inventory image
-- compatibility
mobs:alias_mob("mobs:bunny", "mobs_mc:rabbit")
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
mobs:register_mob("mobs_mc:sheep", {
type = "animal",
spawn_class = "passive",
hp_min = 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
self.gotten = true
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
if not self.color then
self.color = "unicolor_white"
@ -260,11 +261,5 @@ mobs:register_mob("mobs_mc:sheep", {
})
mobs:spawn_specific("mobs_mc:sheep", mobs_mc.spawn.grassland, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 15000, 3, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max)
-- compatibility
mobs:alias_mob("mobs_animal:sheep", "mobs_mc:sheep")
-- spawn eggs
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", {
type = "monster",
spawn_class = "hostile",
attack_type = "shoot",
shoot_interval = 0.5,
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: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", {
type = "monster",
spawn_class = "hostile",
passive = false,
group_attack = true,
reach = 1,

View file

@ -14,6 +14,7 @@ local mod_bows = minetest.get_modpath("mcl_bows") ~= nil
local skeleton = {
type = "monster",
spawn_class = "hostile",
hp_min = 20,
hp_max = 20,
breath_max = -1,
@ -121,9 +122,6 @@ table.insert(stray.drops, {
mobs:register_mob("mobs_mc:stray", stray)
-- compatibility
mobs:alias_mob("mobs:skeleton", "mobs_mc:skeleton")
-- Overworld spawn
mobs:spawn_specific("mobs_mc:skeleton", mobs_mc.spawn.solid, {"air"}, 0, 7, 20, 17000, 2, mobs_mc.spawn_height.overworld_min, mobs_mc.spawn_height.overworld_max)
-- Nether spawn
@ -137,7 +135,3 @@ mobs:spawn_specific("mobs_mc:stray", mobs_mc.spawn.snow, {"air"}, 0, 7, 20, 1900
-- spawn eggs
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)
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", {
type = "monster",
spawn_class = "hostile",
hp_min = 20,
hp_max = 20,
breath_max = -1,
@ -89,7 +90,3 @@ mobs:spawn_specific("mobs_mc:witherskeleton", mobs_mc.spawn.nether_fortress, {"a
-- spawn eggs
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

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