Closed MDouglas345 closed 2 years ago
Need to revisit this. Have to be a more universal solution and not a unique renderer for all 40+ mobs in game
maybe if able get entity dimensions, there could be a more universal answer.
So. There is a universal way to add the feature renderer to all vanilla mobs, but modded mob will need to add that compat explictly in their entity's renderer function.
They will need to create a feature renderer and find a way to check for the ISavedItem interface and add it via this.addLayer() in the constructor of their entity's renderer.
On the topic of vanilla mobs, you can get the bounding box of an entity via entity.getBoundingBox(). Use that as the range for a random function, offset and then flip on the Z? X? to get the the line of which the item should orientate.
implemented, its kinda rough in some scenarios but this is resolved.
Look for a better solution perhaps to bruteforcing unique renderers for each mob type?
For now, quadrapedentityrenderer needs work, pinned pigs does not look right.
Entities that can be pineed but no visible weapon due to no renderer :