Shearing an uncarved pumpkin turns it into a carved pumpkin and drops
four pumpkin seeds. As map generation and growing mechanics have been
changed to generate uncarved pumpkins instead of carved, preserving a
recipe to get pumpkin pie from carved pumpkins enabled players to get
both seeds and pumpkin pie from grown pumpkins, which was unintended.
Shearing an uncarved pumpkin turns it into a carved pumpkin and drops
four pumpkin seeds. As map generation and growing mechanics have been
changed to generate uncarved pumpkins instead of carved, preserving a
recipe to get seeds from carved pumpkins enables players to get twice
the amount of seeds as intended. Because of this, the recipe must go.
Carved pumpkin has to be explicitly registered as a separate node, as
registering a carved pumpkin node happened as a side effect of invoking
mcl_farming:add_gourd() for the carved pumpkin.
The iron / snow golem spawning checks that trigger whenever a carved
pumpkin is placed had to be moved out of the mcl_farming:add_gourd()
invocation to preserve the existing behaviour.
Note that uncarved pumpkin must not be registered as a separate node,
as invoking mcl_farming:add_gourd() for a registered node name leads to
stems not updating when an adjacent node is manually placed or mined.
A user claimed that this texture was a texture from Minecraft 1.8.9 –
see <MineClone2/MineClone2#2099> for
further details. I have not verified that but I noticed that in commit
152e552458 the file was replaced with a
file containing the exact same pixels.
A visual inspection confirms that the file contains noise, so it is not
clear if it is even copyrightable. However, to ensure that it could not
be identical to a file from Minecraft, To get noise of the same quality,
I have shuffled all its pixels with the following POSIX sh shell script:
LANG=C
PREFIX=mcl_end_crystal_beam
convert $PREFIX.png $PREFIX.pnm
<$PREFIX.pnm >$PREFIX.plainpnm pnmtoplainpnm
<$PREFIX.plainpnm >$PREFIX.seed tr '1234567890 ' ' 1356902468'
(
<$PREFIX.plainpnm head -n+3
<$PREFIX.plainpnm tail -n+4 \
|tr ' ' '\n' \
|shuf --random-source $PREFIX.seed
) >$PREFIX.shuffled.plainpnm
I then opened mcl_end_crystal_beam.shuffled.plainpnm using GIMP,
converted the color black to tranparency and saved the image as a
paletted PNG (which yields a smaller filesize than a grayscale PNG).
The global(!) table settlements_in_world` has no use, but is serialized and
saved to a file `settlements.txt` every time during generation of a new
village, adding more lag. This commit removes all related code:
* Remove all instances of `settlements_in_world`.
* Remove `settlements.load()` and `settlements.save()`.
* Move descriptive function comments to above the function definition.
* Adopt some luadoc styles.
* Update a stale reference to a renamed function in comments.
* Fix silly and mostly inconsequential logic bug that had gone unnoticed up
till now.
* Condense a single use variable away by using a slightly more elaborate
assignment statement.
* Add a few more local aliases for global minetest.* functions.
* Replace use of local table with compostability values with a call to
`minetest.get_item_group()`.
* Define local alias for `minetest.get_item_group`.
* Remove the now unused static compostabilty values table.
mcl2 uses add_particle for nether dust resulting in a 10-fold
increase in network traffic when in the nether. Nether dust is not
configurable making it impossible to turn this off for server admins.
this commit replaces the add_particle method with particle spawners
* 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.
* Change carpet from `group:attached_node` to `group:supported_node`,
allowing carpets to be placed on top of torches, water source blocks
and other non-walkable nodes, like in MC.
* Add support for `group:supported_node` to CORE/mcl_attached.
Supported nodes are nodes that can be placed on any node that does not
have the `drawtype = "airlike"` attribute.
* Copy the `drop_attached_node()` function from minetest/builtin, so
that the override function provides the same behavior when nodes drop.
* Add comments to CORE/mcl_attached and to the functions defined in it.
* Add more local aliases for global minetest.* functions.
* If the original function returns true, it is not necessary anymore
to perform more tests and the override function can simply return true
immediately.
* 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.
* 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.
* 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.
* Make carpets walkable. When a carpet is placed on top of a fence or a
wall, the carpet can be jumped upon, allowing to in effect jump over
fences and walls.
The daylight detector code used get_node_light(), which detects both
natural and artificial light. This patch improves the code to use
get_natural_light(), which was introduced with Minetest 5.4.0.
* Check if node has a definition table before attempting to evaluate its
attributes. By application of De Morgan's law, the compound logic
expression can be rewritten so that the existence of the table is
checked before all following attribute references.
* 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.
* Clarify code flow.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
* 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.
This solves a problem were nether portal removal would trigger deep
recursion through node callbacks. For large portals this could result
in stack overflow crashes on LuaJIT. The issue is solved by rewriting
the portal removal to avoid recursion and removing the portal in one
operation using minetest.bulk_set_node.
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.
* 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.
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.
Before this patch, the tga_encoder mod would write corrupted TGA files
on Windows: Bytes that looked like newlines were replaced by a carriage
return and a newline.