All logs are detected as a tree in shift_down mode
Closed this issue · 7 comments
Describe the bug
Trees are not properly detected when using shift_down mode. Logs placed in a stack above a world in creative would continue to shift down even when no leaves are present for example.
When changing the mode to instantaneous and reloading the world, the logs no longer "chop" until leaves are present as expected.
What is expected to happen
The logs should not shift down unless leaves/a tree is detected.
What happened instead?
The logs shifted down without leaves present.
Minecraft version
1.21.5
Fabric API version
0.124.0
Mod version
1.21.5-1.21.5.4
Configuration
{
"trees": {
"allowedLogs": [],
"deniedLogs": [],
"allowedLeaves": [],
"allowedNonDecayLeaves": [],
"deniedLeaves": [],
"breakMode": "SHIFT_DOWN",
"detectionMode": "WHOLE_TREE",
"maxScanSize": 400,
"minSize": 0,
"maxSize": 200,
"maxLeafDistanceFromLog": 15,
"maxSizeAction": "ABORT",
"breakOrder": "FURTHEST_FIRST",
"minimumLeavesAroundRequired": 1,
"includePersistentLeavesInRequiredCount": false,
"treeBreaking": true,
"leavesBreaking": true,
"leavesBreakingForceRadius": 0,
"allowMixedLogs": false,
"breakNetherTreeWarts": true,
"breakMangroveRoots": true,
"searchAreaRadius": -1,
"allowedAdjacentBlocks": [],
"adjacentStopMode": "STOP_ALL",
"spawnItemsAtBreakPoint": false
},
"tools": {
"allowed": [],
"denied": [],
"durabilityMode": "NORMAL",
"ignoreTools": false,
"damageMultiplicand": 1.0,
"damageRounding": "ROUND_DOWN",
"speedMultiplicand": 0.0,
"forceToolUsage": false
},
"player": {
"allowedTags": []
},
"enchantment": {
"requireEnchantment": false
},
"sneakMode": "SNEAK_DISABLE",
"breakInCreative": true,
"lootInCreative": true,
"notificationMode": "ACTION_BAR"
}Relevant log output
Use latest version and reopen if it still happens (maybe some bug fixes fices this already)
Hmm, wait, this is normal behavior. Leaves cannot be checked in shift down mode. Just by the way it works it just doesn't make sense. At some point, the log would have shifted down out of the leaves area and therefore the mod wouldn't activate anymore.
As far as I remember this is mentionned in the wiki + in the tooltip if you use cloth config.
Wiki/GUI is not up to date to reflect the fact it is taken into account for FALL_XXX modes. Will update it.
It does indeed say in the GUI that leaf detection only affected INSTANTANEOUS mode, but I figured there was another check that couldn't be changed. I was mistaken.
Thanks for the fast reply and help! Love the mod! I'll just use INST mode instead of shift down. Was running into issues with it on a server I'm hosting with friends but didn't want it to feel "too powerful" and shift down felt more balanced in my opinion.
Maybe a check could be made to "scan" the tree and remember were all logs were and as long as the person doesn't let go of the attack button, those logs will continue to shift, regardless of leaf presence. Every time the attack button is pressed, a new check starts?
The thing is, everything is made server side. And the server doesn't know if someone stops hitting the log or not.
Plus there could be weird cases too, what if a command is used to remove a log while a player is continusly hitting it ?
So FallingTree just take the simple approach, on block break, check if it's a tree and apply the different rules.
