The newly-added preview items (#40) didn't play nice with the side
preview image, mostly because the "layers" metadata wasn't generated,
and they didn't record the base color of the actual banner being crafted.
This commit re-adds that (and other) metadata.
The `layer` string was inherited from the old patch, which I frankly
don't understand. I restructured it to `follow make_banner_texture` more
closely, with the addition of the mcl_banners_front mask, which
prevents the rear portions of the patterns from showing up.
The numbers in the final `[combine` and `[resize` steps are arbitrary,
and were derived by trial-and-error.
This patch was technically backported from a later version of
MineClone2. Between the point where Mineclonia forked, and the point
where this patch was developed, MineClone2 introduced a "mcl_colors"
mod which, presumably just lists some colors. This commit removes
references to that mod, as it doesn't exist in our history.
A preview of a crafted banner is now shown next to the craft result box
to help players visualize what they're crafting. Due to the formspec
version, the preview can't be shown over top of the actual result slot.
A utility function (mcl_banners.get_overlay) is added to generate
formspec-able texture strings for arbitrary banners.
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)
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.
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.
Reviewed-on: Mineclonia/Mineclonia#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
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.
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.