Commit graph

5724 commits

Author SHA1 Message Date
erlehmann
659a158c66 Merge branch 'master' into mcl_autogroup 2021-05-01 18:02:18 +00:00
erlehmann
4085d95d96 Merge pull request 'Show preview of new banner pattern when crafting it' (#40) from banners-pattern-preview into master
Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/40
Reviewed-by: cora <cora@noreply.git.minetest.land>
2021-05-01 17:25:19 +00:00
erlehmann
3009ebb2c6 Merge branch 'master' into mcl_autogroup 2021-04-29 21:24:32 +00:00
erlehmann
0d92212e08 Merge pull request 'mapgen/mcl_mapgen_core: move set_node decorations a node callback' (#29) from e/Mineclonia:nether-fix into master
Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/29
Reviewed-by: Elias Åström <ryvnf@riseup.net>
Reviewed-by: erlehmann <nils+git.minetest.land@dieweltistgarnichtso.net>
2021-04-24 18:51:57 +00:00
erlehmann
d6463fe29a Merge pull request 'Fix crash when blowing up an unknown node' (#38) from mcl_explosions into master
Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/38
Reviewed-by: n_to <n_to@noreply.git.minetest.land>
Reviewed-by: erlehmann <nils+git.minetest.land@dieweltistgarnichtso.net>
2021-04-24 03:29:09 +00:00
Nils Dagsson Moskopp
ac5f115f83
Show preview of new banner pattern when crafting it 2021-04-23 17:29:43 +02:00
Elias Åström
31341ca57b Fix crash when blowing up an unknown node
Unknown nodes get a blast resistance of zero.
2021-04-23 16:39:02 +02:00
Elias Åström
e52cae28cd Duplicate groupcaps before applying unbreaking 2021-04-23 16:33:22 +02:00
ryvnf
aa1af725f2 Merge pull request 'Update README.md after forking' (#3) from readme into master
Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/3
Reviewed-by: Li0n <li0nsdichachu@outlook.com>
2021-04-22 15:18:01 +00:00
E
2381cb8e84 mapgen/mcl_mapgen_core: move set_node decorations a node callback
During the rewrite in 89e55e9065, a queue system was added to allow
using both VoxelManip-based generation steps, and set_node-based steps,
however some set_node-based steps (underground mushrooms, nether
decorations, and structures) were missed and remained in a VoxelManip
step. The result is that the changes made by the set_node stages were
overwritten after the (now-stale) VoxelManip data was committed later.

(ref. Mineclonia/Mineclonia#26)
2021-04-20 00:41:10 -04:00
erlehmann
fda2d41b4e Merge pull request 'Spawns killerbunnys with translateable nametag' (#28) from n_to/Mineclonia:killerbunny_translateable_label into master
Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/28
Reviewed-by: cora <cora@noreply.git.minetest.land>
Reviewed-by: erlehmann <nils+git.minetest.land@dieweltistgarnichtso.net>
2021-04-20 02:56:32 +00:00
Benjamin Schötz
e5c324b0d7 Added french, spanish, russian translation for killerbunny-nametag 2021-04-19 20:43:18 +02:00
Benjamin Schötz
82c838e067 Sets killerbunny-label in a translateable way 2021-04-19 20:27:20 +02:00
erlehmann
bbe07abb0d Merge pull request 'Solve quartz not generating in the nether' (#24) from reintroduce_nether_quartz_ore into master
Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/24
2021-04-18 23:12:17 +00:00
AFCMS
078586fa1a
Solve quartz not generating in the nether 2021-04-19 00:14:35 +02:00
erlehmann
0761ad0964 Merge pull request 'Make the server not crash when players are killed by named mobs' (#19) from fix_server_crash_when_player_killed_by_named_mob into master
Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/19
2021-04-18 15:46:20 +00:00
Nils Dagsson Moskopp
c0a76dd24f
Make the server not crash when players are killed by named mobs 2021-04-18 16:51:47 +02:00
Elias Åström
1c6d3c2fea Do not include unnecessary tool_capabilities
This commit makes enchanted tools which have no use for
tool_capabilities to not include it in their metadata.  It does this by
not including tool_capabilities in the metadata of an enchanted tool if
at least one of two cases is true:

(1) The tool is not enchanted with unbreaking or efficiency
(2) The tool does not have tool_capabilities defined in its definition

The first case covers situations like having a pickaxe only being
enchanted with silk_touch.  The second case covers situations like a
piece of armor being enchanted with unbreaking.
2021-04-18 12:45:11 +02:00
Elias Åström
d6e1fe42d1 Fix efficiency and unbreaking not working together
This commit fixes an issue were tools enchanted with both efficiency and
unbreaking would loose the effect of one of the enchantments in some
conditions.
2021-04-18 12:45:06 +02:00
erlehmann
b041666c18 Merge pull request 'Revert broken minecart change' (#4) from minecart into master
Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/4

This code fixes annoying minecart bugs that were introduced with Mineclone2 0.71.0:

• Minecarts going off the rails (#9)
• Minecarts being unable to go back on the rails (#10)
• TNT minecarts being broken (#11)
• Minecarts not being pushed by mobs (#12)

I have verified that it does not break the following features present in Mineclone2 0.70:

• Minecart teleporters
• Minecarts stop at the end of the rail
• Going uphill in a minecart
• Going downhill in a minecart
• Going around curves in a minecart
• Going left at intersections in a minecart with both left and right rail connections
• Going straight ahead at intersections with both right and straight ahead rail connections
• Pushing minecarts
• Powered golden rails make minecarts go faster
• Unpowered golden rails make minecarts stop
• Detector rails activate Redstone circuits
• Minecarts going in circles at maximum speed without glitching off the rails
• Dispensers placing minecarts on top of rail blocks on top of the dispenser
• Going to the Nether in a minecart
• Powered activator rails drop players from minecarts
• Unpowered activator rails do not drop players from minecarts
• Track switching using pistons pushing a Minecart from one track to another
• Minecarts stay on powered rails going up a spiral staircase
• Minecarts can activate note blocks through sensor blocks
• Minecarts can activate Redstone lamps through sensor blocks
2021-04-18 03:29:36 +00:00
ryvnf
357024ad97 Merge pull request 'Update name in game.conf to Mineclonia' (#2) from game.conf into master
Reviewed-on: https://git.minetest.land/Mineclonia/Mineclonia/pulls/2
Reviewed-by: erlehmann <nils+git.minetest.land@dieweltistgarnichtso.net>
2021-04-16 22:15:34 +00:00
Elias Åström
42c7186674 Do not register "creative_breakable" as a diggroup 2021-04-16 22:46:08 +02:00
Elias Åström
b57c94df88 Fix crash when digging nodes with fishing rod
Previously the game would crash when digging nodes with a tool which
does not have tool_capabilities in their item definition.
2021-04-16 22:45:36 +02:00
Elias Åström
34af6a2cc3 Assert that both parts of mcl_autogroup exist 2021-04-16 22:45:22 +02:00
Elias Åström
029ebaa388 Rename "tool_multiplier" to "speed" for tools 2021-04-16 22:45:22 +02:00
Elias Åström
2df6ee32be Remove unnecessary code in mcl_item_entity 2021-04-16 22:45:22 +02:00
Elias Åström
9d38f0d01b Fix crash when digging nodes with hoe
Previously the game would crash when digging nodes with a tool which
does not have _mcl_digroups in their item definition.
2021-04-16 22:44:44 +02:00
Elias Åström
eb1af8902d Remove _mcl_autogroup depends on mcl_autogroup
It looks like the dependency might cause problems with the mod loading
order and lead to situations were _mcl_autogroup is not loaded after all
the other mods.  Because _mcl_autogroup begins with an underscore it
should always be loaded after mcl_autogroup anyways.
2021-04-16 22:35:46 +02:00
Elias Åström
d4a3213343 Update README.txt in _mcl_autogroup 2021-04-16 22:35:24 +02:00
Elias Åström
0681fc98d2 Use mod.conf for mcl_autogroup and _mcl_autogroup 2021-04-16 22:35:12 +02:00
Elias Åström
9c961394ec Automatically assign nodes to creative_breakable
If they belong to any digging group.
2021-04-16 22:34:53 +02:00
Elias Åström
64e8b82ff7 Update the groupcaps of all enchanted tools
Not just those enchanted with efficiency.
2021-04-16 22:34:48 +02:00
Elias Åström
54563262f6 Make tools without toolcaps do damage as hand
If the tool_capabilities defaults to {} if unspecified the tool, then
users will not be able to attack with the tool at all.  This solves that
by including the damage_group and full_punch_interval from the hand into
the tool_capabilities when it is nil.
2021-04-16 22:34:44 +02:00
Elias Åström
6fb56b074f Fix crash when tool_capabilities is nil 2021-04-16 22:34:34 +02:00
Elias Åström
7583223f68 Localize variables in _mcl_autogroup 2021-04-16 22:34:30 +02:00
Elias Åström
9bb39dfba6 Rename _mcl_autogroup_groupcaps to _mcl_diggroups 2021-04-16 22:34:26 +02:00
Elias Åström
dcd050a274 Fix typo 2021-04-16 22:34:22 +02:00
Elias Åström
ccd53e7f10 Force tools to include levels in their diggroups 2021-04-16 22:34:18 +02:00
Elias Åström
85ff4cee75 Improve documentation of mcl_autogroup 2021-04-16 22:34:14 +02:00
Elias Åström
3308ce812d Move mcl_util.hash to a local function
It is probably unlikely it will be useful at other places in Mineclone2.
2021-04-16 22:34:10 +02:00
Elias Åström
e32f17b82a Move efficiency code to its own file 2021-04-16 22:34:04 +02:00
Elias Åström
576dde1dd5 Truncate groupcaps_hash to 8 Base64 digits 2021-04-16 22:33:59 +02:00
Elias Åström
b50addac55 Make changes to the mcl_autogroup API
Group levels are now specified as a list of names when registering a
digging group.  Digging groups which do not have specified levels will
support tools having two levels, 0 and 1 where 0 means the tool can dig
but not harvest the node and 1 means it can also harvest the node.  If
more levels are required one has to specifiy them when registering the
digging group.
2021-04-16 22:33:55 +02:00
Elias Åström
fe883a40bc Use hashing for more efficient groupcaps updating
This adds the metadata field "groupcaps_hash" to tools enchanted with
efficiency.  This value contains a hash of the groupcaps field in
tool_capabilities.  This value gets compared to the expected hash value
to determine if the tools tool_capabilities should be updated according
to commit af31f8189e8e5c2b.

This commit makes efficiency more efficient.
2021-04-16 22:33:13 +02:00
Elias Åström
4a9561e5dc Update enchanted tools with outdated digging times
Because of the way digging times is implemented in Mineclone2, it is
possible for the digging times of efficiency enchanted tools to become
outdated.

This fixes that by automatically updating the tools tool_capabilities
after each time the tool is used.
2021-04-16 22:33:10 +02:00
Elias Åström
c92f0e5ce3 Fix tools not taking wear when rightclicking
Added the API function mcl_autogroup.get_wear which is used to get the
tool wear for digging a node of a group.  This is used by mcl_tools to
compute the wear of shovels and shears when rightclicking to create
grass paths and carve pumpkins.
2021-04-16 22:33:07 +02:00
Elias Åström
ba0a09243b Make mcl_enchanting use the new mcl_autogroups
The function mcl_autogroups.get_groupcaps is used by mods to get the
groupcaps for tools with efficiency enchantments.  This function is used
by mcl_enchanting when enchanting tools with efficiency.
2021-04-16 22:33:00 +02:00
Elias Åström
64e353a9c2 Fix some nodes not being diggable
Previously some nodes like "mcl_flowers:double_grass_top" would be
undiggable.  This was because they did not define _mcl_hardness and it
was not defaulted to 0 in all parts of _mcl_autogroup.
2021-04-16 22:32:56 +02:00
Elias Åström
ecccc2058a Fix tool uses not being set in _mcl_autogroups 2021-04-16 22:32:53 +02:00
Elias Åström
bb5094f657 Rename register_digtime_group to register_diggroup 2021-04-16 22:32:49 +02:00