Highlights:
- Implement storing age metadata by bulk on a queue, with maximum interval and queue length.
- "Flexible" initial growth probability. Will provide helper APIs.
- Fix various bugs with unsubmerged kelp detection, submerged tip detection, age metadata.
- Various optimizations.
Highlights:
- Added locking system to drops. Will be removed after testing.
- Expose more variables and functions. Will be finalized soon.
- Implement MC-like age and natural growth mechanics.
- Implement correct piston interactions with kelp and its surface.
- Implement correct falling node interactions for its surface.
- ABMs are now nonfunction. Will be fixed.
- Various optimizations and fixes.
Highlights:
* Kelp should no longer be able to survive without water
(by decreasing its height)
* When kelp is destroyed, each segment now drop a single kelp similar to MC.
* Significantly refactor how kelp grows and dig. Possible optimizations might be
included.
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.
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.
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.
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.
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.
Requiring tool definitions to call a function in _mcl_autogroup means
that they need to be loaded after _mcl_autogroup. This can cause
problems because _mcl_autogroup needs to be loaded after all tool and
node definitions are completed.
Because of this the API is changed so tool definitions instead put the
data used to generate groupcaps in the custom field
_mcl_autogroup_groupcaps. _mcl_autogroup will then go through all
registered tools and update the groupcaps for every tool where this
field is present. This means that no mod ever has to depend on
_mcl_autogroup.
These changes are primarly made to make mcl_autogroup more efficient.
Previously enchanted tools required storing around 21 kB of metadata due
to the way the previous version of the mod was implemented. This caused
a lot of lag and a huge amount of network traffic. With the changes
enchanted tools won't require more than 1 kB of metadata.
The mod is also rewritten to use an API to register digging groups and
compute the groupcaps for tools. This will make it easier for modders
to register custom digging groups.
The mod is now split up into two parts. One part called "mcl_autogroup"
to implement the API for registering custom digging groups, and the
other part called "_mcl_autogroup" which contains most of the code which
has to be loaded after most mods.