Commit graph

2789 commits

Author SHA1 Message Date
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
Nils Dagsson Moskopp
689054f904
Fix sound_play invocation when player hit by potion arrow 2021-07-12 03:49:05 +02:00
cora
8ed5fd4740
Let players shoot themselves with potion arrows 2021-07-12 02:44:17 +02:00
epCode
6951ecdfc9
Let players shoot themselves with regular arrows 2021-07-12 02:09:47 +02:00
Nils Dagsson Moskopp
f8c58262bc
Fix Ender chests from MineClone2
Commit 819dbc6224c3b96ad4094cccf3d9150f3ef61d45 of MineClone2 introduced
an LBM that removed Ender chest formspecs stored in the node meta. That
change makes Ender chests that were loaded in MineClone2 versions past
that commit not show the Ender chest inventory form on right-click.

This patch makes those broken Ender chests work by introducing an LBM
that writes the formspec to the node meta for Ender chest nodes once.

Since the LBM name is suffixed with a hash of the Ender chest formspec,
changes to the Ender chest formspec (even removing it entirely) should
not require manual adjustment of the LBM code.
2021-06-28 22:54:00 +02:00
Nils Dagsson Moskopp
1e42c37895
Reduce snow layer silk touch drop amount
It was possible to duplicate snow layers by placing them and then mining
them using a tool enchanted with silk touch. This commit fixes the “snow
dupe” by reducing the amount of snow layers dropped in this case by one.
2021-06-23 03:06:24 +02:00
Nils Dagsson Moskopp
0b92dc1f26
Show screwdriver in creative inventory 2021-06-22 00:16:57 +02:00
cora
87761bf454 Merge pull request 'Make fully grown beetroot drop 1 to 4 seeds when harvested' (#96) from fix-beetroot-seed-drops into master
Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/96
Reviewed-by: cora <cora@noreply.git.minetest.land>
2021-06-20 22:13:45 +00:00
Elias Åström
725bf517ca Merge remote-tracking branch 'n_to/bow_increase_critical_chance_to_25'
Reviewed-on: #34
Reviewed-by: Elias Åström <ryvnf@riseup.net>
Reviewed-by: E <e@noreply.git.minetest.land>
2021-06-20 23:55:44 +02:00
Elias Åström
7bfd28cd75 Merge remote-tracking branch 'n_to/update_template.txt'
Reviewed-on: #17
Reviewed-by: Lion <li0nsdichachu@outlook.com>
2021-06-20 23:52:15 +02:00
Nils Dagsson Moskopp
eb7b99d59e
Make fully grown beetroot drop 1 to 4 seeds when harvested
As beetroot often did not drop seeds, players could end up with no seeds when
trying to farm beetroot. This patch guarantees that at least one beetroot seed
is dropped when harvesting beetroot.
2021-06-20 19:02:35 +02:00
E
2feab24dd3 Allow more layers for banners with gradients
At some point in the past, Minetest had a bug that caused rendering
issues with transparent textures, like those used for banner gradients.
As a workaround, the number of allowed layers was reduced for banners
containing gradients. The engine bug has since been fixed, but the limit
was never removed.

This commit removes the limit.

See also: https://git.minetest.land/Mineclonia/Mineclonia/pulls/72#issuecomment-23564
and https://github.com/minetest/minetest/issues/6210
2021-06-19 01:43:36 -04:00