fix incorrect digtypes and missing sounds for some nether blocks #3351
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
feature request
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-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#3351
Loading…
Reference in New Issue
No description provided.
Delete Branch "SmokeyDope/MineClone2:master"
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 pull request directly fixes two bug reports I made:
MineClone2/MineClone2#3350 Hoes should be the effective tool for warped wart blocks instead of swords
MineClone2/MineClone2#3347 Warped wart blocks make no sound
And another bug report made earlier:
MineClone2/MineClone2#3287 mcl_blackstone blocks cannot be mined with wooden pickaxe
Fixing tool digging inconsistencies
Some nether blocks were not properly mineable with when using what should be the right tools. This was due to typos and inconsistent digtype values across the nether blocks.
I fixed these bugs by correcting the typos, standardizing the digtypes so that hoes and swords are effective for wart blocks and shroomlight blocks, also adjusting the digtype values of the pickaxey mcl_blackstone blocks to conform to vanilla minecrafts standards by making them mineable with a wooden pick.
I lowered the hardness of the warped wart block and shroomlight block from 2 to 1 to match nether wart block's hardness.
Fixing missing sounds
Some nether blocks and plants were missing sounds when placed, broken, and walked on. For some of them this was due to the blocks node registers missing the 'sounds =' flag.
For some node registers with special 'on_rightclick = function' they were missing a 'call sound' function in the logic that should go after sucessful placement of the block.
I fixed these bugs by adding in the sound flags and functions needed to get sound working for the blocks.
!!!NOTE!!! Some plantlike nodes such as fungus and nether sprouts are still missing placement sound when directly placed on a block for reasons ive yet to understand. For example the nether vines wont make a placement sound when placed on top of a regular block, but will make a placement sound when placed on another vine.
Nether vine logic & missing placement checks
I added in some nether vine breaking code so that breaking one vine breaks the above vines for twisted and below vines for weeping.
Most nether plants are missing important chunks of placement checks most eggregiously with the nether vines. Adding in these placement checks would most likely fix the bug that lets the nether vines break bedrock as they grow. Many players say that they enjoy this unintended function of the vines and I feel that it makes sense to turn this bug into a feature. Maybe there can be a special bedrock check that lets the vines still break bedrock specifically.
Ancient debris touchups
Ancient debris is now smeltable in the blast furnace, netherite ingot crafting recipe is now shapeless.
Testing
place the blocks mentioned and see if they make placement sounds. Break them with the proper tool to see if it digs correctly and consistently across wart block types.
WIP: fix digtypes for nether wart blocks, warped wart blocks, and shroomlight blocksto WIP: fix incorrect digtypes and missing sounds for some nether blocksThis PR Fixes #3350
This PR Fixes #3347
This PR Fixes #3287
@SmokeyDope I think the hitbox size was commented out for a reason. I know it was commented out in a recent commit that I approved personally. Maybe look at a warped fungus without any texture packs with your change and you'll see why.
@PrairieWind Good catch, I see what you mean
Yeah, I commented it out, because when I made the new graphic for the fungus, no one mentioned to change the hitbox. If you like, feel free to remove the hitbox code completely. I think that would honestly be best, as it's going to be drawn differently for the different texture packs, and we'll get bug reports if the hitbox is off.
Also, thank you for picking this up. I always thought that these things should have sounds! lol
This PR fixes #3287
Thank you for the kind encouragement! The sound thing bothered me way more than it should have which kick started this whole PR not to mention breaking warped fungus blocks was a nightmare. Figured instead of making 10 bug reports eating into more knowledgeable contributors precious time I could try poking around with the code to fix it myself and was pleasantly suprised with how well it all went. Im glad that there are easy improvements that can be made to the existing code even a complete novice like me can fix up great to cut teeth on.
Ill see what I can do with removing the fungus hitbox great suggestion
Thank you.
Very welcome! A lot of things in here are good to cut your teeth on. My one piece of advice... when you make a PR, state in the PR what it does, and what "scope" you are changing... and then try to stick to that scope. (Scope is the term for the area or reach that a change is in / covers.)
I offer this, because it's easy to go out of scope and go overboard. Not saying that you will do that, but others have done such before. Also, going out of scope will delay getting fixes / changes merged as it becomes a nightmare to test, as we have to test all changes. (for actual changes that are mixed in with prettifying code, this becomes a nightmare as almost every line of code is flagged as "changed.") So, try to be mindful is what I am saying. :)
Totally agree! I have a feeling that this pr is more or less good to go.
WIP: fix incorrect digtypes and missing sounds for some nether blocksto fix incorrect digtypes and missing sounds for some nether blocksHey SmokeyDope. Really appreciate you taking the time to look into this PR. I've left some comments for some improvements. If you need any help or clarification, please reply back or feel free to message me on Discord.
Thanks.
@ -77,3 +77,3 @@
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1},
light_source = 1,
--[[ selection_box = {
sounds = mcl_sounds.node_sound_leaves_defaults(),
Please can you keep indentation in line with others. We use tabs, not spaces.
@ -113,3 +114,3 @@
climbable = true,
buildable_to = true,
groups = {dig_immediate=3,vines=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,deco_block=1, shearsy = 1},
groups = {dig_immediate=3, handy=1, axey=1, shearsy=1, swordy=1, vines=1,
Should this really be swordy, axey, handy? That's more changes than I expected.
handy, axey, and swordy were copied over from regular vines groups when I incorrectly assumed that nether vines shares most atributes with overworld ones.
Just removed handy, axey, and swordy from the nether vines and all tools seem to still work as they should (~30% chance of dropping item unless shear which is 100%
Sorry about that!
it looks like (from what it shows here) that you took out the destroyed by lava, the piston thing, etc. Are those on a different line?
Yeah those were on a different line, theyre all back on one line now
@ -114,2 +115,3 @@
buildable_to = true,
groups = {dig_immediate=3,vines=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,deco_block=1, shearsy = 1},
groups = {dig_immediate=3, handy=1, axey=1, shearsy=1, swordy=1, vines=1,
dig_by_water=1, destroy_by_lava_flow=1, dig_by_piston=1, deco_block=1},
Please can you keep indentation in line with others. We use tabs, not spaces.
@ -128,7 +131,17 @@ minetest.register_node("mcl_crimson:twisting_vines", {
if not minetest.is_creative_enabled(clicker:get_player_name()) then
itemstack:take_item()
end
--placement checks sucess, put twisting vine
I think this comment is unnecessary because the next line is clear what is happening.
100% agree
@ -130,2 +133,4 @@
end
--placement checks sucess, put twisting vine
grow_vines(pos, 1, "mcl_crimson:twisting_vines")
--add sound to vine placement
Please can you keep indentation on this whole block so it is in line with others. We use tabs, not spaces.
@ -132,0 +136,4 @@
--add sound to vine placement
local idef = itemstack:get_definition()
local itemstack, success = minetest.item_place_node(itemstack, placer, pointed_thing)
if success then
Please can you keep indentation for this whole block so that it is in line with others. We use tabs, not spaces.
@ -137,6 +150,16 @@ minetest.register_node("mcl_crimson:twisting_vines", {
end
return itemstack
end,
--breaking twisting vines breaks the vines above logic
I think this comment is unneccessary as it's in the on_dig and the variables are well named (abovenode).
@ -139,1 +152,4 @@
end,
--breaking twisting vines breaks the vines above logic
on_dig = function(pos, node, digger)
local above = {x=pos.x, y=pos.y+1, z=pos.z}
Ideally we need to use the new way of creating vectors as this way is deprecated.
vector.new(x,y,z)
More correctly, in this case, it should be:
vector.offset(pos,0,+1,0)
vector.offset(pos, 0, 1, 0)
also works well.Oh gosh, I realised I gave you incorrect code on that! Ha. Sorry about that.
Good catch Michieal.
@ -169,3 +193,3 @@
climbable = true,
buildable_to = true,
groups = {dig_immediate=3,vines=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,deco_block=1, shearsy = 1},
groups = {dig_immediate=3, handy=1, axey=1, shearsy=1, swordy=1, vines=1, dig_by_water=1,
That's a lot of new groups, are these all correct? Swordy, axey and handy?
@ -187,1 +213,4 @@
--placement check sucess, grow weeping vine
grow_vines(pos, 1, "mcl_crimson:weeping_vines", -1)
--add sound to placement
local idef = itemstack:get_definition()
Please resolve indentation for this block, please.
@ -195,1 +231,4 @@
end,
--breaking weeping vines breaks the vines below logic
on_dig = function(pos, node, digger)
local below = {x=pos.x, y=pos.y-1, z=pos.z}
please use vector.offset
@ -196,0 +239,4 @@
end
end,
I don't think we need these extra lines.
@ -268,1 +317,3 @@
_mcl_hardness = 2,
groups = {handy = 1, hoey = 7, swordy = 1, deco_block = 1},
sounds = mcl_sounds.node_sound_leaves_defaults(
{
Could we resolve indentation for this. I think it should be ({
and the last }), should be inline with the _mcl_hardness
@ -275,2 +330,3 @@
groups = {handy = 1, hoey = 7, swordy = 1, deco_block = 1},
light_source = minetest.LIGHT_MAX,
_mcl_hardness = 2,
sounds = mcl_sounds.node_sound_leaves_defaults(
Please can you resolve bracket indentation, please?
@ -389,12 +389,12 @@ minetest.register_craft({
})
minetest.register_craft({
type = "shapeless",
Not sure why this is double indented.
Does this fix #2704 ?
Looks really good. Thanks for taking the feedback on board and implementing it. You've solved quite a few problems here. It is really appreciated.
For next time, I would recommend:
Thanks for picking this up!
Welcome aboard. :)
@ -269,0 +304,4 @@
groups = {handy = 1, hoey = 7, swordy = 1, deco_block = 1},
_mcl_hardness = 1,
sounds = mcl_sounds.node_sound_leaves_defaults({
footstep={name="default_dirt_footstep", gain=0.7},
These lines are double indented. Not a problem but a note for next time.
@ -276,1 +317,3 @@
_mcl_hardness = 2,
_mcl_hardness = 1,
sounds = mcl_sounds.node_sound_leaves_defaults({
footstep={name="default_dirt_footstep", gain=0.7},
Doubley indented. Only needs to be tab indented once. Not a problem, but a note for next time.