Commit Graph

2800 Commits

Author SHA1 Message Date
Nils Dagsson Moskopp 6059b79785
Generate podzol when growing large spruce trees
When 4 spruce saplings are put into a 2×2 square, they may grow into a
large spruce tree. With this patch, dirt group group nodes nearby that
have air above and nodes under the stem are replaced by podzol nodes.

Note that this commit uses a different placement method than MineClone2
commit a83a2e9aba122d0fb4f1c120252a0d4eb07a1f10 to create one connected
podzol patch instead of randomly scattered nodes. It also places podzol
nodes in bulk at once for better performance.
2022-04-22 13:45:16 +02:00
Nils Dagsson Moskopp 6e11819b79
Increase TNT drop rate to 100%
This makes the TNT drop rate match Minecraft 1.14.
2022-04-17 18:44:09 +02:00
Nils Dagsson Moskopp 5acc9191fa
Add setting for TNT drop rate 2022-04-17 18:42:46 +02:00
Nils Dagsson Moskopp 7d2ef66175
Trigger node callbacks when pumpkin is sheared
The code for shearing a pumpkin used minetest.swap_node() to replace a
faceless pumpkin with a carved pumpkin. This did not trigger the node
callbacks of the carved pumpkin, which meant that shearing a pumpkin
would not check for the snow golem or iron golem spawn conditions.

This patch replaces minetest.swap_node() in the code for shearing a
pumpkin with minetest.set_node(), which does trigger the callbacks;
therefore snow and iron golems can now spawn as a pumpkin is carved.
2022-04-14 18:52:31 +02:00
Nils Dagsson Moskopp c4912effaf
Disconnect gourd stems after destruct
While testing the previous commit, it became clear that gourd stems do
not disconnect properly if the gourd disappears while not being dug. A
simple method to create illegal curved stems was to explode the gourd.

This patch changes gourds so that the stem curves back after a gourd is
destroyed, regardless of reason. This hopefully makes curved stems that
are not connected to matching gourds a relict of the past.
2022-04-14 00:23:01 +02:00
Nils Dagsson Moskopp 1967e10a52
Disconnect stems from carved pumpkins after dig
Carved pumpkins can end up being connected to a stem – either if they
were grown in a previous version of MineClone2 or Mineclonia, or if a
player carves them before harvesting them. This patch makes sure that
stems turn into unconnected stems after such a carved pumpkin is dug.
2022-04-14 00:23:00 +02:00
Nils Dagsson Moskopp 3948a0e7af
Remove pumpkin pie recipe with carved pumpkin
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.
2022-04-14 00:22:59 +02:00
Nils Dagsson Moskopp a44fd9c88b
Remove pumpkin seeds recipe with carved pumpkin
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.
2022-04-14 00:22:59 +02:00
Alexander Minges 6381d65dbb
Use correct location for pumpkin shearing sound
The code for turning an uncarved pumpkin into a carved pumpkin using
the shears was using “above” instead of “pointed_thing.above” as the
location for its sound. This resulted in a warning being logged when
shears were being used on a pumpkin. This patch rectifies the issue.
2022-04-14 00:22:59 +02:00
Alexander Minges 59b013f766
Grow uncarved pumpkin from seeds instead of carved
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.
2022-04-14 00:22:58 +02:00
Nils Dagsson Moskopp be915478af
Fix redstone comparator flooding crash
Redstone comparators have two modes, comparison mode & subtraction mode.
Before this patch, the functions to turn comparators on or off attempted
to swap nodes with comparators in the same mode, but failed to determine
the correct replacement node, if the existing node was not a comparator.

When a comparator in an on state (e.g. powered by a filled cauldron) was
flooded, the flooding dropped the comparator and replaced the comparator
node that was to be swapped out with air, which lead to a server crash.

This patch changes the functions that turn comparators on or off so they
only swap existing nodes with comparators in the same mode if the name
of the replacement node can be determined – i.e. if it is not nil.
2022-02-23 00:27:56 +01:00
cora f5ba6f5649
Fix memory leak & C stack overflow
Before this patch, when placing a fire above a node that would turn it
into eternal fire (e.g. Netherrack or Magma) the spawn_fire() function
would call itself infinitely via the on_construct() handler of eternal
fire – because the latter called spawn_fire() itself.

On an x86 machine, this caused a memory leak, hanging Minetest. On an
x86_64 machine though, Minetest crashed immediately, showing an error
message about a stack overflow.
2022-02-11 17:44:11 +01:00
cora 4647710945
Extinguish fire without nearby “fuel” faster
This patch adjusts how often the ABM runs that removes fire nodes with
no adjacent nodes that can burn up. This makes fire linger less in air.
2022-02-11 17:44:10 +01:00
cora 5d09ec311c
Extinguish fire using an ABM instead of timers
Even the mitigated timers seem to have lead to slow
memory leaks. Once Minetest has used up all the RAM,
it will free some, then quickly use memory up again,
then repeat it ad nauseum, requiring 100% CPU. On a
PC with 2GB of RAM this could be reliably triggered
by having a fire burn a forest for 20 to 30 minutes.

This patch removes fire node timers completely and
instead extinguishes fire using an ABM.
2022-02-11 17:44:09 +01:00
cora ef7370550f
Make fire spread direction truly random
This patch initializes the random number generator used in mcl_fire with
the current Unix timestamp. It also corrects two biases in fire spread
that were caused by nodes being iterated over in a predictable way.
2022-02-11 17:41:42 +01:00
cora 6c2fb98160
Fix nodes with “flammable = -1” not catching fire 2022-02-07 04:51:27 +01:00
cora 052c9fcbcf
Fix diagonal fire-spread
In Minecraft fire spread logic, “adjacent” does not mean “diagonal”.
2022-02-07 04:51:06 +01:00
cora db8fbdc5dd
Fix beds burning away and dropping 2022-02-07 03:39:52 +01:00
cora 1b89c15193
Fix double nodes not being properly removed 2022-02-07 03:39:51 +01:00
cora 02fa2c9e07
Fix nodes that should not burn up burning up
Nodes with the group “flammable = -1” (e.g. crafting tables) must be
able to catch fire, but must not burn up. This patch adds checks for
this group.
2022-02-07 03:39:51 +01:00
cora c12076e74d
Reimplement basic Minecraft-like fire spread 2022-02-07 03:39:45 +01:00
cora 4deca628dc
Make fire actually remove nodes 2022-02-07 03:22:15 +01:00
cora df4ea94dbc
Add node timer back in so fires burn out 2022-02-07 03:22:02 +01:00
cora 8e8ccddb68
Replace MineClone2 fire with Minetest Game ABMs
ABMs have better performance than the laggy timer-based implementation.
2022-02-07 03:18:54 +01:00
epCode 6bfb97842f
Fix armor rendering when wearing pumpkin
Before this patch, wearing a pumpkin would make body armor render as a
corrupted item held in the player's left hand instead of on their body.
Some parts of their armor would also get rendered on the player's feet.

(cherry picked from commit 12192d1a8d)
2022-01-23 20:11:55 +01:00
Nils Dagsson Moskopp 4d02af8c94
Convert correct floor node to dirt as gourd grows
Before this patch, growing a gourd (e.g. melon, pumpkin) would always
convert a node west of the node below the stem to dirt if belonged to
the group “dirtifies_below_solid”. This happened because of a loop in
which the variables floorpos and floor were re-used without setting a
new value … therefore, both floorpos and floor were always containing
the last values set in a previous loop instead of the correct values.

This patch fixes the problem by setting both variables in both loops.
2022-01-13 07:29:57 +01:00
Nils Dagsson Moskopp df7bd78af5
Add noise to christmas chest textures 2021-12-12 15:40:29 +01:00
Nils Dagsson Moskopp fe3e837e1b
Reskin chests as presents on December 24th to 26th 2021-12-11 18:17:53 +01:00
Elias Fleckenstein dfa56f229f
Spawn small chest entities only if animated chests are enabled 2021-12-10 22:15:53 +01:00
Elias Fleckenstein cacddd3fb4
Fix access to ender inventory without an ender chest 2021-12-03 21:23:10 +01:00
Nils Dagsson Moskopp 54b36c42a9
Add debug command to show ender chest inventory formspec. 2021-12-02 19:44:22 +01:00
Nils Dagsson Moskopp f8b5066c61
Add packed ice crafting recipe 2021-11-24 06:06:26 +01:00
cora 5087e8194a remove swiftness from egapps
The minetest world is already so small that you can reach world
border from spawn in about 2 hours. I think the regen and fire
resistance are  good enough to make them special.
2021-11-20 02:14:16 +01:00
cora df98db1d8c Merge pull request 'ITEMS/mcl_banners: Render preview banners with transparent patterns correctly' (#158) from banner-mask-fix-4 into master
Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/158
Reviewed-by: cora <cora@noreply.git.minetest.land>
2021-11-08 12:21:50 +00:00
Nils Dagsson Moskopp f410de485a
Render preview banners with transparent patterns correctly
Without this fix, the banner pattern preview generation does not mask
the banner pattern, so the alpha channel of the banner pattern is not
taken into account. This lead to preview banners with color gradients
showing up as a solid color banner and opaque pixel artifacts for the
bottom triangle pattern.
2021-10-31 20:53:18 +01:00
cora eee94658e7 mcl_maps: send hud_flags only if actually changed 2021-09-13 14:15:32 +02:00
NO11 3759d50344
Add german translation for stripped wood 2021-09-07 00:48:40 +02:00
NO11 50e913b370
Add template for stripped wood translation 2021-09-07 00:48:39 +02:00
NO11 508b08dfd3
Add specific help text for stripped wood 2021-09-07 00:48:38 +02:00
NO11 68646b62b3
Add some spaces 2021-09-07 00:48:38 +02:00
NO11 d3348ef8b7
Add stripped trunk / wood textures
Stripped trunk / wood nodes exist for acacia, birch, dark oak, jungle
tree, oak, and spruce. This patch adds the textures for all of these.
2021-09-07 00:48:37 +02:00
NO11 eadb96dd40
Refactor wooden plank crafting
This patch makes it possible to craft planks out of stripped wood.
2021-09-07 00:48:36 +02:00
NO11 616b009452
Add stripped trunk and stripped wood nodes 2021-09-07 00:48:35 +02:00
NO11 a92e1c05a3
Add debarking by right clicking wood using an axe 2021-09-07 00:48:10 +02:00
Elias Fleckenstein 920ca96764
Make dragon egg teleport on punching 2021-07-13 09:11:48 +02:00
Nils Dagsson Moskopp 76e3a00e18
Make potion arrows able to hit end crystals 2021-07-12 22:21:15 +02:00
Nils Dagsson Moskopp 2033a9bf1d
Refactor potion arrow flight time calculation 2021-07-12 16:07:20 +02:00
Nils Dagsson Moskopp 99ebf08873
Refactor regular arrow flight time calculation 2021-07-12 16:06:44 +02:00
Nils Dagsson Moskopp c45c0df118
Play no hit sound when potion arrow hits shooter 2021-07-12 04:59:53 +02:00
Nils Dagsson Moskopp 39023f1adf
Play no hit sound when regular arrow hits shooter 2021-07-12 04:59:39 +02:00