Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential improvements to leashed status for Working "Horses" #36

Open
noobanidus opened this issue Dec 27, 2018 · 0 comments
Open

Potential improvements to leashed status for Working "Horses" #36

noobanidus opened this issue Dec 27, 2018 · 0 comments

Comments

@noobanidus
Copy link

noobanidus commented Dec 27, 2018

As shown previously on Discord, there's an interesting interaction between Horse Power and Animania horses. While the Animania devs would prefer if you prevented their sleeping mobs from "working", I imagined a simpler solution would be to ensure that calls to "getLeashed()" (which prevent the "sleep" behaviour/animation/pose) are true when the animal is working.

Obviously, as the boolean value that this function returns is private, it would probably require an access transformer or some form of reflection to change at the necessary points.

Example:
As shown previously...

Currently, I'm using horse.hasHome() && horse.world.getTileEntity(horse.getHomePosition()) != null to determine if a horse is attached to a Horse Power device. While this check is sufficient for me, being able to simply rely on getLeashed() would be much clearer in code.

Thanks so much for an amazing mod! I've been using it heavily in the mod pack I've been designing and love it greatly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant