Calling `hb.change_bar' with hunger bar on damage disabled server
will crash the server. To not overload other functions to check
`enable_damage' over and over, simply make `hb.change_bar' able to be
called with uninitialized identifiers. #4586
I left it in from another branch, didn't want to force push.
This reverts commit 58d2f59192073acf9f55406358bf48244e008b9b.
Revert "Walls use `source` parameter for default hardness and blast resistance"
I left it in from another branch, didn't want to force push.
This reverts commit e8944cc145dc59db53a9368d8ae269edf366e742.
Revert "Fix prismarine bricks and dark variant blast res."
I left it in from another branch, didn't want to force push.
This reverts commit 6125d625bc6ce15644cf8b579599f75da5bffd07.
Revert "Un-hardcode blast resistance, hardness for walls,"
I left it in from another branch, didn't want to force push.
This reverts commit 26e873703151bc4bfaf7588ad1e3afa731a05fbd.
Revert "All wood-type and nether-type fences now match material's blast resistance"
I left it in from another branch, didn't want to force push.
This reverts commit a1e20f29162462120fb1c046c2d34f8fcebfb413.
- Notably, smooth sandstone (and red) is much more durable than other sandstone variants
- Ender chest isn't actually more explosion resistant than obsidian, hmm
Change blast resistance to 0.75, add an optional hardness override parameter, because cobble is unique here
(Still instant-minable, this is a separate issue)
The old code takes the first return val of `minetest.item_place_node'
which is `itemstack'. Therefore, the variable `success' in the old code
is always true. The new code takes the second val which will be nil if
an invalid node placement occured.
This check is necessary since the ladder may be placed in the front of
pointed block while there is a node with hole (slabs, fences etc.) at
the same place resulting an invalid placement and sound played when
it shouldn't be played.
Previously, horses would continue to move even after the movement key was released. This was because mcl_mobs.drive was returning before stopping the horse. This commit makes mcl_mobs.drive stop the horse before returning.
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4580
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: THE-NERD2 <pdp9729@gmail.com>
Co-committed-by: THE-NERD2 <pdp9729@gmail.com>
LUAs `math.random(a,b)` expects a and b to be integers. `size` was only randomized once.
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4583
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
Mangrove tree variants 4, 5 and bees nest were not post processed with root growth.
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4584
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
Prevents possible item duplication with other mods. Matches the behavior of the default `__builtin:item`.
See also https://github.com/mt-mods/pipeworks/issues/130
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4530
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: OgelGames <ogelgames@noreply.git.minetest.land>
Co-committed-by: OgelGames <ogelgames@noreply.git.minetest.land>
The previous code was biased towards placing mobs on top or below the
player, because it chose the theta inclination angle uniformly,
but the sphere is more narrow at the top and bottom.
This code is also simpler.
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4467
Reviewed-by: teknomunk <teknomunk@protonmail.com>
Co-authored-by: kno10 <erich.schubert@gmail.com>
Co-committed-by: kno10 <erich.schubert@gmail.com>
Items are instead written as a serialized string into ItemStackMetaRef, and read from there as well. Old itemstacks get converted to the new format automatically.
Now you can define custom groups for the chests, as shown in the trapped
chests example (now they show up under "Mechanisms" tab in creative!).
I'm a bit suspicious of the new return-wrapped functions, as in *they
might break under some circumstances I didn't observe*. It will require
some heavy testing to make sure nothing crashes in the future.
Also, `on_rightclick` for double chests is something I really want to
return-wrap as well, but failed to do so. 🤷
Pass chest entity initialization data to on_activate as staticdata so
initialization is atomic, preventing premature deletion of chest entity
by concurrent server steps.
Chest tile management has been reorganized to use postfixes, some slight
formatting fixes applied here and there, and roughly marked down where
the new files should (ideally) begin and end.
Amongst other changes:
- mcl_chests.register_chest function has been exposed. The API is still
too terrible to call it quits though, I definitely want all these
parameters passed to be part of a key-value table.
- Added a TODO list at the top of the file. Don't worry, I'll remove it
once I'm done. It's more just for my convenience than anything.
Fixed slab placement being not allowed when it should be allowed.
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4317
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: JoseDouglas26 <josedouglas20002014@gmail.com>
Co-committed-by: JoseDouglas26 <josedouglas20002014@gmail.com>
This should allow renaming items on the anvil when using mobile. This also may improve mobile craftguide experience.
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4456
Co-authored-by: the-real-herowl <wiktor_t-i@proton.me>
Co-committed-by: the-real-herowl <wiktor_t-i@proton.me>
This fixes#4436 and possible other unnoticed crashes by adding a defensive check.
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4437
Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-authored-by: the-real-herowl <wiktor_t-i@proton.me>
Co-committed-by: the-real-herowl <wiktor_t-i@proton.me>
This fixes stalker texture generation when the stalker is standing on a node that uses a texture using a texture modifier.
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4343
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
Fixes the warning about an undeclared global that occurs the first time a mob attempts to spawn.
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4348
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
This fixes#4336 crash at login about mcl_mobspawners. Also adds an API call, `mcl_mobs.register_conversion` for converting one mob into another and updates rovers and stalkers to use this API call.
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4337
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: teknomunk <teknomunk@protonmail.com>
Co-committed-by: teknomunk <teknomunk@protonmail.com>
This change should fix item frames not placing on chests and similar blocks
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4291
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Mikita Wiśniewski <rudzik8@protonmail.com>
Co-committed-by: Mikita Wiśniewski <rudzik8@protonmail.com>
This PR deals with the UI side of #3645 - no logic was changed to prevent the spam related to the `zzZ` button.
The chatbox now only shows in multiplayer, where it belongs. The buttons have also been resized and moved into positions that make them look nicer.
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4319
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Nicu <kneekoo@noreply.git.minetest.land>
Co-committed-by: Nicu <kneekoo@noreply.git.minetest.land>
This fixes faulty fallthrough mechanisms attempting to register the same recipe more than once in some cases. This fixes the warning spam when entering a world, while keeping the warnings for mods that misuse the Stonecutter API.
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4315
Co-authored-by: the-real-herowl <wiktor_t-i@proton.me>
Co-committed-by: the-real-herowl <wiktor_t-i@proton.me>
* one droppable from strays
* the rest will get their mobs in a later update
* added alternative ways to get the items
* added recipes for potions that use these items
* various API functions now work with mobs properly
* the following effects don't work with mobs at all:
water breathing, dolphin's grace, leaping, swiftness,
slowness, slow falling, night vision, darkness, frost,
health boost, absorption, fire resistance, resistance,
luck, bad luck, blindness, nausea, hunger, saturation,
haste, fatigue, conduit power
* the following effects should work with mobs:
invisibility, regeneration, poison, withering,
strength, weakness, levitation, glowing
* the following effects have no effect on mobs
(but can be applied with the API):
bad omen, hero of the village
* XP from mob breeding impacted by luck
* eye of ender explosion chance impacted by luck
* fishing loot impacted by luck
* melee critical damage impacted by luck
* also fixed 2 scripts marked as "executable"
* abstracted and refactored some parts of haste and fatigue
* added and exposed new mcl_potions API functions
* fixed haste and fatigue not altering the hand
* mcl_meshhand now calls into mcl_potions when resetting the hand
* fixed a few crashes related to unusual effect levels
* added haste and fatigue combat functionality
* added some cleanup to avoid hangover unstackable items
* capped the slowdown from fatigue at 5 minutes digging time
* (despite the above, if a tool has a longer time set in definition,
that still works)
* removed an unused "global" variable
* added a way to have a damage modifier relying on type instead of flag
* added Slow Falling
* added Levitation
* added Health Boost
* added Absorption
* Fixed some effects not being replaced correctly with higher levels
* Implemented an old FIXME (MTE 5.3.0 fixed underlying bug)
* Added a way to obtain an approximate level of effect from factor
* Added effect level to HUD under the icon
* Added effect timer to HUD under the icon
* improved support for custom (non-status) effects
* added support for splash potions
* added support for lingering potions
* added support for tipped arrows
* removed the old registration
-potion tooltips are now utilizing the power of the new API
-potion names change based on metadata
-nothing triggers loading the new tooltips beyond the names for now
-added comprehensive potions registering API
-new API registers only drinkable potions for now
-new API is compatible with very complex tooltips
-new API can have multiple effects per potion
-no hardcoding for specific potions in the new API
-heal subcommand to the /effect reimplemented
-healing_func() from old API standardized, included in new API
-(the last point is due to it being substantially different from others)
-fixed a few bugs, potential crashes
-fixed incorrect withering effect progression
-standardized variable naming
-improved the /effect command, allowing to use effect levels
-fixed a bug in level-to-factor conversions
-renamed effect icons to follow the new convention
- added a `register_effect()` function
- added the withering effect
- registered all the old effects under the new API
- unified effect names
- updated the main effect checker to use the new API
- changed some hardcoded values to support the unified effect naming
- added new namespaced metadata effects strings
- added support for legacy effect player metadata
- potions are still using the old effects API
- added glue between old API calls and the new API
- renamed the effect icons to support the unified effect naming
In multiplayer, only the server logs this information - the client has no access to it.
Reviewed-on: https://git.minetest.land/VoxeLibre/VoxeLibre/pulls/4295
Reviewed-by: the-real-herowl <the-real-herowl@noreply.git.minetest.land>
Co-authored-by: Nicu <kneekoo@noreply.git.minetest.land>
Co-committed-by: Nicu <kneekoo@noreply.git.minetest.land>