MDouglas345 / Brok-n-Sindri-s-Trinkets

Creative Commons Zero v1.0 Universal
1 stars 1 forks source link

Fix and add new renderers for pinned entities. #16

Closed MDouglas345 closed 2 years ago

MDouglas345 commented 2 years ago

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 :

MDouglas345 commented 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

MDouglas345 commented 2 years ago

maybe if able get entity dimensions, there could be a more universal answer.

MDouglas345 commented 2 years ago

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.

MDouglas345 commented 2 years ago

implemented, its kinda rough in some scenarios but this is resolved.