#Render bow/crossbow textures in an item renderer dynamically

15 messages · Page 1 of 1 (latest)

warm lily
#

I'm making an automated bow "turret" mod, and I would like to be able to display the state of any bow or crossbow in the animation. Right now I have an item renderer on a block entity, and I've just hit a wall when it comes to rendering any bow animations

#

I know that bows use predicates based on use time, but in my specific case, I have no real "use time" in my block entity, nor have I been able to find a good way to simulate that

toxic kraken
#

I expect you can just set the predicate value in the same way the game does when a player uses a bow. You could set it to 0 initially and each time your turret fires, and then increase it each tick until the turret fires again

warm lily
#

I've tried some janky stuff to try to get that working but I've had no success

#

I might be missing something very obvious here though lol

toxic kraken
#

an excellent question, one which I do not actually know the answer to. looking at how the game renders other players and skeletons bows when they're pulled maybe is a good shout? not sure

warm lily
#

I've been poking around in there and it's surprisingly obscure. I'll keep looking in those files though.

#

embarassingly I've been stuck on this for weeks, working on it off and on

toxic kraken
#

or the actual model predicate provider for the bow is perhaps a better idea. not sure the exact class that's in but "model predicate provider" is probably not a bad search

warm lily
#

oh my god I GOT IT

#

For anyone else wondering how to get stuff by a specific predicate, mixin to ModelOverrideList and overwrite the float array

solid gulch
warm lily
#

repo is disgusting, I'll share it when the project is in a half decent state