Add wear to shears used to harvest comb from a beehive #4251
No reviewers
Labels
No Label
#P1 CRITICAL
#P2: HIGH
#P3: elevated
#P4 priority: medium
#P6: low
#Review
annoying
API
bug
code quality
combat
commands
compatibility
configurability
contribution inside
controls
core feature
creative mode
delayed for engine release
documentation
duplicate
enhancement
environment
gameplay
graphics
ground content conflict
GUI/HUD
help wanted
incomplete feature
invalid / won't fix
items
looking for contributor
mapgen
meta
mineclone2+
Minecraft >= 1.13
Minecraft >= 1.17
missing feature
mobile
mobs
mod support
model needed
multiplayer
Needs adoption
needs discussion
needs engine change
needs more information
needs research
nodes
non-Minecraft feature
non-mob entities
performance
player
possible close
redstone
release notes
schematics
Skyblock
sounds
Testing / Retest
tools
translation
unconfirmed
mcl5
mcla
Media missing
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#4251
Loading…
Reference in New Issue
No description provided.
Delete Branch "teknomunk/MineClone2:beehives-wear-shears"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This adds wear to shears used to harvest comb from a beehive.
Testing
421e43a8af
to8917e9a982
@ -41,0 +59,4 @@
-- Add wear to the shears
if not is_creative then
item:add_wear(276) -- 276 = math.ceil(65536 / 238))
I've noticed this is the same as
mobs_mc.shears_wear
(defined atmods/ENTITIES/mobs_mc/init.lua:94
). Is there anything we could do with that? Like, what about moving that to a different mod/namespace (e.g.mcl_vars
) and use it here?Rather than introducing a new namespace, it may be better to add a function to the existing mcl_tools that applies wear to any tool, so that these magic numbers aren't littered thru the code. Such a function would use the item definitions _mcl_diggroups to calculate the required amount of wear to apply.
For this specific instance, it would be a call that looks like
mcl_tools.add_wear(player, item, "shearsy")
Eh?
I did not see that. 🤦
Wait, mcl_util.use_item_durability(itemstack, n) already exists. I should probably should use that instead.
Done.
ebdae078ea
to758135f08d
Really minor typo on line 22 'withing' was probably meant to be be 'within' but the typo is in a comment so not a big deal just thought worth mentioning.
Tested; does what expected, improves code readability. LGTM
New commits pushed, approval review dismissed automatically according to repository settings
Reapproval for typo
@ -28,2 +31,4 @@
node.name = beehive
minetest.set_node(pos, node)
-- Hive honey bottle and take the empty bottle if survival mode
Typo lol
Give not Hive
Fixed.
01722058f7
to2e0ef17a45
2e0ef17a45
toc0e553fb40
New commits pushed, approval review dismissed automatically according to repository settings