Commit graph

1315 commits

Author SHA1 Message Date
cora
ce7a882c86 Show trade tier in formspec 2022-05-21 12:36:57 +02:00
cora
12bc8f1a3b initial pathfinding experiments
to test rightclick a villager and it will try to path find to
0,9,0 (i'm using flat mapgen for testing for now).
2022-05-21 12:36:57 +02:00
cora
0598aa35c0 add simple jobsite logic 2022-05-21 12:36:57 +02:00
PrairieWind
d93704fa0e Merge branch 'master' into furnaces 2022-05-17 18:33:20 +00:00
PrairieAstronomer
fe36d579eb Add Blast Furnace and Smoker to Villager Workstations 2022-05-17 10:37:55 -06:00
cora
5282a63bcb add options for nametagged mobs and range 2022-05-15 20:04:09 +00:00
cora
e5de4bba65 keep nametagged mobs, add "all" argument 2022-05-15 20:04:09 +00:00
cora
628686ce79 Add a command to safely remove all mob objects 2022-05-15 20:04:09 +00:00
PrairieAstronomer
5abfa555eb Added new workstations to villager jobsite definitions 2022-05-14 15:52:37 -06:00
cora
31b8ea26a2 add jobsites to professions table 2022-05-14 00:32:15 +02:00
cora
fd6f2be485 update cleric trades 2022-05-14 00:32:15 +02:00
cora
07e0a90051 update tool smith trades 2022-05-14 00:32:15 +02:00
cora
f073d4d420 update weapon smith trades 2022-05-14 00:32:15 +02:00
cora
89aaf6b709 update butcher trades 2022-05-14 00:32:15 +02:00
cora
f09b578034 update leatherworker trades 2022-05-14 00:32:15 +02:00
cora
0ce1a92282 update armorer trades 2022-05-14 00:32:15 +02:00
cora
135ee97b21 update cartographer trades 2022-05-14 00:32:15 +02:00
cora
51cf92a909 update librarian trades 2022-05-14 00:32:15 +02:00
cora
2d47ad3e5f update fletcher trades 2022-05-14 00:32:15 +02:00
cora
c28d700caf update fisherman trades 2022-05-14 00:32:15 +02:00
cora
ba861d7b74 update farmer trades 2022-05-14 00:32:15 +02:00
cora
9b8b7ce6b4 refactor go home logic 2022-05-14 00:32:15 +02:00
cora
354d17a14c enable simple villager breeding 2022-05-14 00:30:44 +02:00
rudzik8
7f3ba7d4a2 Enable placing carpets on llamas and add textures for it 2022-05-13 22:00:09 +00:00
kabou
baf8e0b79c Update item entity for lodestone compass.
* Added another special case to the item entity registration for
  lodestone compasses, without this a dropped lodestone compass would
  turn into a regular compass on being dropped.
* Update the compass and lodestone compass frame number to be the
  stereotype frame.
2022-05-12 21:08:52 +02:00
cora
12a943e222 Make villagers homeless when bed is gone on return 2022-05-09 10:29:58 +00:00
cora
3774044f86 Walk back to bed instead of teleporting 2022-05-09 10:29:57 +00:00
cora
46dbf8c0ab Spawn villagers on villagegen, stay in village
This spawns a villager per bed on village gen and saves the bed
position in the entity. If it moves too far from the village
it gets teleported (for now) back.
2022-05-09 10:29:57 +00:00
kabou
4e3a2a7b4c Fix list of spawnable biomes for rabbits.
* Rabbits spawn in Desert biome.
* Rabbits do no spawn in Forest and Swamp biomes.
2022-05-08 19:59:04 +00:00
cora
e1ed990f58 sp. farm animals on grass, villagers near beds 2022-05-08 18:50:37 +00:00
cora
e4c5f81524 make husks spawn only in deserts, zombies not 2022-05-08 18:50:37 +00:00
kay27
53042b6f48 Adopt mob spawning from mcl5 2022-05-08 18:50:37 +00:00
Elias Fleckenstein
34e5bb0334 Add Wither Spawning 2022-05-06 19:40:39 +00:00
Elias Fleckenstein
c05a2d3a9d Add wither spawning schems 2022-05-06 19:40:39 +00:00
Nils Dagsson Moskopp
5ba36c08b6 Drop carved pumpkin when shearing snow golem 2022-04-22 18:07:37 +00:00
Nils Dagsson Moskopp
a2dd8c935d Make villagers accept uncarved pumpkin in trades
As map generation and growing mechanics have been changed to generate
uncarved pumpkins instead of carved, requiring players to shear every
pumpkin before trading it with villagers seems like useless busywork.
2022-04-22 18:07:37 +00:00
cora
b6ab815adc Fix endermen dropping node AND taking it 2022-04-22 01:02:20 +02:00
NO411
e790bf90f4 Make shields work with all mobs 2022-04-09 16:21:22 +02:00
kabou
1b99b73894 Fix wrong player name accessor.
* Duh..
2022-03-30 01:31:38 +02:00
kabou
14da059ce7 Add extra check and warning on missing player data.
* For some unexplained reason, `mcl_burning.storage[player]` can
  sometimes be `nil`, causing a crash in `on_leaveplayer()`.  This
  commit adds a check for that.  If a `nil` is encountered, a sane
  value is substituted and a warning is set to the log.
2022-03-29 12:06:00 +02:00
NO11
5974b6f609 Merge branch 'master' into shields2 2022-03-28 12:27:57 +00:00
cora
1c9f0c3238 don't spawn mobs on non opaque nodes or leaves
with the preliminary jordanspaning mobs would spawn on trees
and water regularly.
2022-03-22 22:02:15 +01:00
cora
50e99f470e fix certain mobs not spawning in certain biomes 2022-03-22 15:16:48 +01:00
kabou
46ee5aaa59 Fix undefined luaentity crash.
* Add nil check to get_luaentity() access.
* Cache get_luaentity() call in local var.
2022-03-21 01:39:02 +00:00
kabou
9eba0e4860 Remove unused code.
* Remove unused code that was commented out.  The code tried to find
  fire luaentities in the same spot as the newly created fire luaentity.
  It may have been intended to optimize getting set on fire multiple
  times, but it makes no sense as it does not discriminate between fire
  luaentities attached to the object set on fire and those attached to
  other objects.  The function that this code was in also has a better
  way to prevent adding multiple fire luaentities in the first place.
2022-03-18 11:39:11 +01:00
kabou
90311da514 Preempt possible crash on nil in on_joinplayer.
* In mineclone5 a crash was reported to occur when deserialization of
  storage returned nil in on_joinplayer.    https://git.minetest.land/
  MineClone5/MineClone5/commit/96c4fb60d8641b4181edb902ed24dbf173828d09
  This commit uses a different, but equally effective fix.
2022-03-18 11:36:33 +01:00
kabou
e9ff2ba32a Minor changes to mcl_burning.
* Remove animation_frame from fire entity state, it is now kept in the
  storage table of the parent entity.
* Rename animation_timer in fire entity table to _mcl_animation_timer,
  in line with mineclone2 policy on adding custom members to minetest
  tables.
* Comment out code that does nothing sensible.  Scheduled for deletion
  at a later time.
2022-03-18 11:36:23 +01:00
NO411
db68c0e26b Add shield 2022-03-15 15:58:27 +01:00
GNU Hacker
f430aec0cd
item pickup sound gain more MC like 2022-03-13 14:58:01 +01:00
kabou
11ee1d133f Fix cut-n-paste error.
* Swap misplaced lines.
* Concatenate conditional expression.
2022-03-09 18:26:51 +01:00
kabou
9bac0da01a Fix registered_items oddity and add check for unknown nodes.
* Mobs redo uses `registered_items[]` where clearly the proper table
  accessed should be `registered_nodes[]`.  Perhaps this magically
  works, but it looks nonsensical.  Switch to the use the more
  sensible `registered_nodes[]` table.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
2022-03-09 13:11:53 +01:00
kabou
818cbb2f48 Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
2022-03-09 12:11:59 +01:00
kabou
88f7a150c7 Add check for unknown nodes.
* Add check for unknown node in `handle_node_drops()` and return
  immediately if the dug node has no definition table.
2022-03-09 04:00:48 +01:00
kabou
962500b189 Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
2022-03-09 02:23:18 +01:00
kabou
95cfa43483 Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
2022-03-09 02:15:33 +01:00
kabou
4a1b93bbfa Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
2022-03-09 02:05:38 +01:00
kabou
b9c2c3bd0a Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
* Reduce redundant `== false` condition check.
2022-03-09 00:01:23 +01:00
kabou
c3e0996902 Fix fire HUD not showing on join while burning.
* Add the fire HUD to a player who joins the server while still burning
  from the previous session.
2022-03-02 17:15:05 +01:00
kabou
d424d4f10e Add comments to mcl_burning.update_hud(). 2022-03-02 16:39:27 +01:00
kabou
e80006f4ea Do not set fire to objects that are already burning.
Changes to mcl_burning.set_on_fire():
* Add logic that only updates the burn time, but skips adding fire
  entities to objects that are already burning.
* Condense code a little, remove single use variables.
* Add a comment to a questionable piece of code.
* Add comments to the function.
2022-03-02 16:25:40 +01:00
kabou
b17776699e Add comments to "storage" table.
* Document attributes of the "storage" table.
2022-03-02 15:40:29 +01:00
kabou
86a4ece7d2 Add local copy of minetest.find_nodes_in_area. 2022-03-02 15:25:03 +01:00
kabou
df5d24104d Make player burning HUD work without csm.
* Add update_hud() function.
* Remove the client channels.
* Unglobalize animation_frames variable.
* Fix bug where player state was not stored on shutdown of singleplayer
  game.
* Remove superfluous sanity_check() function, this code could easily be
  inlined in its only caller.
2022-03-02 15:21:55 +01:00
kabou
56b63463a5 Fix burning entity animation.
The parameters for the flames sprite were incorrect, causing the reverse
side of the sprite to appear as an opaque black rectangle.  Use the
correct incantation.
2022-03-02 10:47:46 +01:00
AFCMS
b51e322304
make fire charges activate target (+ fix possible crash) 2022-02-26 22:38:34 +01:00
cora
3feca330c9 fix the other 2 throw_xp occurences 2022-02-25 00:40:26 +00:00
cora
caacb378de fix api change in enchanting 2022-02-25 00:40:26 +00:00
cora
379972ea11 fix crash when blaze attacks logged off player 2022-02-25 00:40:26 +00:00
cora
435b5d756d throw_experience->throw_xp (api change) 2022-02-25 00:40:26 +00:00
cora
2bb416765c revert to old mobs ( 32c03dc27e )
This reverts the hierarchies ENTITIES/mcl_mobs, ENTITIES/mobs_mc
and ENTITIES/mobs_mc_gameconfig to the state of commit
32c03dc27e
2022-02-25 00:40:26 +00:00
Emojigit
b02f7cd974 mcl_mobs 2022-02-23 23:58:05 +01:00
Emojigit
b01d4eba88 mcl_paintings 2022-02-23 23:58:05 +01:00
Emojigit
26dadb1846 mcl_falling_nodes 2022-02-23 23:58:05 +01:00
Emojigit
c3dd5e6c2c MORE MESS SORRY XD 2022-02-23 23:58:05 +01:00
Emojigit
21808390f9 Revert "add translates for mcl_boats"
This reverts commit 2ee84f2ad3.
2022-02-23 23:58:05 +01:00
Emojigit
cc87791327 add translates for mcl_boats
Co-authored-by: Emojigit <emojigit@noreply.git.minetest.land>
2022-02-23 23:58:04 +01:00
Nils Dagsson Moskopp
adf738854a
Fix mob-in-boat crash in Minetest 5.5-dev
In Minetest 5.4.1, calling get_player_control() on a mob returned the
empty string. Minetest commit 5eb45e1ea03c6104f007efec6dd9c351f310193d
changed this, so now calling get_player_control() on a mob returns nil.

As mcl_boats defines boats that can have a player or a mob as a driver,
code like the following crashes with a changed get_player_control() API:

local ctrl = driver:get_player_control()
if ctrl.sneak then
    detach_object(driver, true)
end

Furthermore, once a world has crashed, joining it near a mob that is the
driver of a boat with such control code immediately crashes again.

When I reported this bug to Minetest, several Minetest core developers
stated that they disliked the old API and proposed other return values
for calling a mob's get_player_control() function – all different from
the empty string. Since I have some doubts that this bug will be fixed
in Minetest 5.5.0, boat code must take into account a nil return value.

Minetest issue: https://github.com/minetest/minetest/issues/11989
2022-02-15 11:17:01 +01:00
Elias Fleckenstein
b945975427
Slime splitting: nil check child to prevent crash (that happened on oysterity-mcl2) 2021-12-09 18:11:05 +01:00
Elias Fleckenstein
ec7e245b9d
Various fixes to the enchanting and loot system
- enchanted loot generated by mapgen now uses PseudoRandom for randomness
- prevent fishing loot from generating loot 32767 times (!!!) when only 1 is needed
- bows and fishing rods obtained from the treasure section of fishing loot are now enchanted
- there is now a function to uniform enchant items other than books
2021-12-07 17:57:18 +01:00
Nils Dagsson Moskopp
46394e7e1f
Add obsidian boat that always sinks 2021-11-20 09:06:48 +01:00
NO11
a9804879e2 Rename drippingwater to mcl_dripping in mod.conf and readme.txt 2021-11-15 21:54:16 +01:00
NO11
d2a03ec0b9 Rename entity ids 2021-11-15 21:44:23 +01:00
NO11
7ef6613f09 Rename drippingwater mod to mcl_dripping 2021-11-15 21:39:43 +01:00
NO11
d27109d807 Merge branch 'master' into dripping 2021-11-13 19:15:49 +00:00
iliekprogrammar
bd14918543
Reduce defuse reach for charged creeper
5.2 is actually half of the estimated MC creeper defuse range, which is 10.4.
The reason for this change is to balance the creeper in MCL2 where it fuses
whilst moving making it more difficult than MC. In MC, the creeper does not move
while fusing.
2021-11-13 12:12:20 +08:00
iliekprogrammar
66c1b4a95f Merge pull request 'fix_creeper' (#1896) from Dieter44/MineClone2:fix_creeper into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/1896
2021-11-13 04:06:55 +00:00
iliekprogrammar
96c4fb60d8
Fix crash on startup during immediate runtime by mcl_burning
The crash occurs if mcl_burning:data is deserialized to nil. The cause of
mcl_burning being set to "return nil" is unknown. Therefore, when it occurs, it
will be logged as warning.
2021-11-13 10:55:24 +08:00
NO11
7ed964756e local luaentity 2021-11-12 18:00:04 +00:00
NO11
0e5ad8637d Merge branch 'master' into dripping 2021-11-12 17:54:30 +00:00
NO11
0cc0a7e01d Make dripping particles MC-like 2021-11-12 17:49:27 +00:00
Dieter44
03d22852ee Replace mobs:boom with equivalent mcl_explosions.exlode() to fix game crash when creeper is right-clicked with flint and steel. Issue #1753 2021-11-11 16:56:44 +01:00
Dieter44
10a5f8c4bf Adding attribute hostile=true to charged creeper to fix that the charged creeper has no behavior: Issue #1756 2021-11-11 16:50:29 +01:00
Dieter44
68810a2a74 Change creeper fuse range and defuse range according to minecraft wiki: https://minecraft.fandom.com/wiki/Creeper and: https://minecraft.fandom.com/wiki/Explosion. Fix of #1689 2021-11-11 16:47:32 +01:00
Dieter44
0b6467d679 Reduce creeper run_velocity to 2.1, to fix #1691 2021-11-11 16:03:04 +01:00
Elias Fleckenstein
a7bc460fae
Fix boat and enchanting book texture glitches / warnings 2021-11-09 17:39:39 +01:00
Elias Fleckenstein
25f467c8ab
Merge branch 'master' into xp 2021-11-03 20:18:49 +01:00
Elias Fleckenstein
c17fc81d1f Merge pull request 'Break minecart if it's near a cactus' (#1886) from NO11/MineClone2:minecart into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/1886
2021-11-03 19:18:01 +00:00
Elias Fleckenstein
8f9f5cc936
Merge branch 'master' into xp 2021-11-03 20:14:08 +01:00
Elias Fleckenstein
a4e73886d5
Rework XP API 2021-11-03 19:36:57 +01:00
Artem Arbatsky
db696d0e2b
Add missing call for on_die function 2021-11-03 10:11:06 +08:00
NO11
c52fda154b Break minecart if it's near a cactus (Fix #924) 2021-11-02 22:58:03 +01:00
Elias Fleckenstein
27e4bd6d09 Fix burning entity packet spam
- Use upright_sprite for 3rd person flame display, which is both closer to minecraft and allows for client side texture animation
- Take care of flame HUD in the MineClone2Client
2021-09-18 22:28:20 +02:00
Nils Dagsson Moskopp
256de2bc36 Log warning for non-serializable item entity fix 2021-09-15 18:10:40 +02:00
sfan5
693a5317ef Fix non-serializable item entity unload crash
Some items, like shulkers or books, can have so much metadata that the
corresponding item entity can not be serialized by the Minetest engine.

Without this patch, dropping such an item and then moving away crashes
Minetest, as it can not serialize the entity with serializeString16()
when unloading a map block.

The patch resets the overlong metadata of non-serializable item entities.
This avoids a crash and makes it possible to retrieve a “sanitized” item
without metadata when the mapblock containing the item entity is reloaded.

Originally sfan5 guessed the maximum possible item entity serialization size
that would not lead to a crash as 65530 bytes, but anon5 calculated it to be
actually 65487 bytes. This has been experimentally verified by erlehmann.
2021-09-15 18:10:32 +02:00
NO11
79d8593d34 Merge pull request 'Destroy objects near cactus faster (make it possible to throw items at a cactus)' (#1856) from NO11/MineClone2:cactus into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/1856
2021-09-07 18:00:53 +00:00
NO11
dc8436fdf9 Destroy objects near cactus faster (make it possible to throw items at a cactus) 2021-09-06 14:34:25 +00:00
Elias Fleckenstein
a8d09338a9 Merge pull request 'Added spawn egg for killer rabbit' (#1704) from talamh/MineClone2:master into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/1704
2021-09-04 10:21:18 +00:00
AFCMS
2d1a43396f Merge pull request 'Title HUD API' (#1778) from title-API into master
Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/1778
2021-08-20 12:31:54 +00:00
AFCMS
fe62189019 Update French translation (part 1) 2021-08-13 11:35:18 +02:00
AFCMS
c31c852a6e add documentation 2021-07-20 16:14:34 +02:00
AFCMS
b5f7ae5458 working implementation + support of other mods 2021-07-20 15:47:26 +02:00
NO11
4afdea56db Move code of making anvils destroy items when falling 2021-07-05 12:28:14 +00:00
kay27
c6b662ce7a [mcl_mobs/api] Add mob flow code from Crafter 2021-06-22 05:10:45 +04:00
kay27
586c18b00f [mcl_mobs/api] Continue float function on acceleration.y equals zero 2021-06-22 03:15:39 +04:00
basxto
822071c66b Fix attribution and typo
Since walking skeleton is based on another cc-by 3.0 work, it's also required to mention the original author
2021-06-12 18:35:48 +00:00
AFCMS
e81da3c4ff fix some mods using "core" insteed of "minetest" 2021-06-12 00:18:52 +02:00
Marcin Serwin
0132d0569f Update polish translation of several files 2021-06-02 13:21:19 +02:00
marcin-serwin
cbe8583cef Merge branch 'master' into polish-translation 2021-06-02 10:14:25 +00:00
AFCMS
cd33d406b2 fix many codestyle issues (functions, strings, modpaths) 2021-05-29 16:12:33 +02:00
AFCMS
3bedc81068 fix some code style issues in lightning 2021-05-28 00:07:06 +02:00
AFCMS
b8782d0af1 rename API doc file properly 2021-05-27 11:30:43 +02:00
AFCMS
9e074af07f unify code style [1] 2021-05-25 12:52:25 +02:00
AFCMS
388ab6d8df fix some codestyle issues 2021-05-25 10:56:06 +02:00
AFCMS
79cf98c8e3 [mcl_mobs] fix some warnings 2021-05-25 01:48:14 +02:00
AFCMS
0d13e1ffdd [drippingwater] fix warnings 2021-05-25 00:54:12 +02:00
AFCMS
be9fff4fe2 [mcl_boats] fix warnings 2021-05-25 00:50:04 +02:00
AFCMS
ad16fe7072 [mcl_burning] fix warnings 2021-05-25 00:48:46 +02:00
AFCMS
dd3b5a98ae [mcl_falling_nodes] fix warnings 2021-05-25 00:46:39 +02:00
AFCMS
fddaacdeae [mcl_item_entity] fix warnings 2021-05-25 00:43:42 +02:00
AFCMS
8286fd2a4d [mcl_minecarts] fix warnings 2021-05-25 00:43:08 +02:00
AFCMS
f76b66eec6 [mcl_mobs] fix some warnings (131 remaining!) 2021-05-25 00:37:02 +02:00
cora
66f132a645 fix crash on creeper explosion ( #1755 ) 2021-05-24 12:41:16 +02:00
AFCMS
b6dd8d5c44 [mcl_paintings] fix warnings 2021-05-23 15:13:44 +02:00
AFCMS
335405f131 [mobs_mc] fix warnings 2021-05-23 15:10:20 +02:00
AFCMS
470f7b70bc [mobs_mc_gameconfig] fix warning 2021-05-23 14:54:20 +02:00
Elias Fleckenstein
fb60bd0253 Disable backface culling of fire entity 2021-05-21 20:45:53 +02:00
AFCMS
4992a05c2b Merge branch 'master' of ssh://git.minetest.land:29418/MineClone2/MineClone2 2021-05-15 12:19:29 +02:00
kay27
9ae1119438 [mcl_mobs] Fix server crash for mobs in unloaded areas, https://git.minetest.land/MineClone2/MineClone2/issues/1703 2021-05-15 03:17:16 +04:00
AFCMS
86d1e0ac12 fix duplicated assignement 2021-05-14 09:34:40 +02:00
AFCMS
866c097d56 fix typo 2021-05-14 09:19:44 +02:00
AFCMS
074e8c8389 remove unused optional depends to lucky_block
lucky_block is mtg mod and never used  at any place in the code
2021-05-11 00:43:17 +02:00
jordan4ibanez
37350e81c9 Stop crashing when mob object is already deleted 2021-05-05 12:52:07 -04:00
Elias Fleckenstein
a9817fea4b Merge branch 'master' into real_maps 2021-05-05 08:21:01 +02:00
Elias Fleckenstein
75d9450002 Make compasses point upwards when dropped as an item 2021-05-04 10:24:08 +02:00
Elias Fleckenstein
78ce97aaf6 Fix creeper explosion values 2021-05-04 09:53:28 +02:00
Elias Fleckenstein
3b3d67a99c Make clocks work when dropped 2021-05-04 09:16:42 +02:00
talamh
2c434495c1 Merge branch 'master' into master 2021-05-03 23:46:44 +00:00
Elias Fleckenstein
02da1abcf9 Merge branch 'master' into real_maps 2021-05-02 19:24:52 +02:00
Benjamin Schötz
f528b31d48 Added french, spanish, russian translation for killerbunny-nametag 2021-05-02 18:02:51 +02:00
Benjamin Schötz
a77f99a1ec Sets killerbunny-label in a translateable way 2021-05-02 18:02:35 +02:00