Make golem go home. Fixes #3288 #3929
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: VoxeLibre/VoxeLibre#3929
Loading…
Reference in New Issue
No description provided.
Delete Branch "golem_nav"
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?
Golem never goes home, now it does.
This fixes the incorrect calling of go_path, and makes it teleport if it is far away.
It does not address the issues in mobs navigating, so in complex navigational areas it will get stuck.
Fixes #3288
Testing
In general you can watch a golem and when it gets a long way from home it will walk or teleport home.
If you add
follow = { "mcl_hamburger:hamburger" },
you can lead it away and when you are at the distance you want to test swap items and wait 10 seconds.I'm not a fan of the teleportation solution. If it can't pathfind back, so be it.
Imagine an unsuspecting player trying to kill a golem (with Knockback or Punch), which pushes it out of
tele_dist
, and you see it just vanish. They would think something went wrong because there are no drops.Also, when we'll get our water mechanics in order, we'll be able to move mobs around with water pathways. If we have this teleporting band-aid for mobs, long-distance transportation won't work.
HI @kneekoo, I think if the golem is attacking then it shouldn't teleport or walk home, so I'll put in a check for that and skip the whole thing if it's attacking. Maybe there are other states that should also skip this?
I think the navigation is very broken, has been very broken for a long time, and has no one actively working on it, therefore I think putting workarounds in place for that is fair enough.
What about adding a setting to enable it, would that be OK?
Something like
minetest.settings:get_bool("mcl_allow_golem_teleport",false)
or maybe a more genericmcl_allow_mob_nav_hacks
that would make it easy to track down and remove when the nav is fixed?I personally think that is an exellent stop gap solution Codiac and like the idea of it being a setting. Teleportation is not an ideal solution but its better than nothing until a proper fix to pathfinding is implemented. Just my 2c
Temporary workarounds are the enemy of good solutions. The good thing is that in this particular case it's not a tragedy if an iron golem gets lost, because the villagers summon new ones if they when they don't have golems. So we can definitely put up with the suboptimal pathfinding here.
I like it, you don't, I think my proposal is a reasonable compromise.
This is not a matter of likes. It's about not creating unexpected and unwanted behaviour that affects the gameplay. And it's all for a "renewable" mob.
Now we have mobs jumping better, if outside distance, maybe we just make them mobs turn and walk in that direction towards home. If you make it do that like 70% of the time, it'll probably get there eventually. Instant teleport isn't a great experience.
If you look at check_herd logic, they do something similar.
The point of me offering up patches I am carrying is so I don't have to carry the patch. If I still need to do so after the PR then there isn't a point in me doing it.
I'm happy to add stuff to fit other peoples likes and use-cases, but I'm not willing to drop the bits that mean I will still need to carry a patch. In that circumstance someone else will need to take over the PR.
Pitch and yaw is already handled by the movement code, it looks fine to me in testing.
@ancientmarinerdev There is now a setting in the Experimental section to control the golem teleport. I think this is a reasonable compromise until the navigation is not appalling. Can we merge this PR now?
I personally have no objections with this going in with the changes added in (check for not attacking, and the settings switch). I have not tested this though. Code seems logical.
I did wonder about setting in the follow state afterwards, but maybe that is right for the metalheads.
74f5f52f95
toda79137105
da79137105
to1850c5ca7e
1850c5ca7e
to71282e196e