df-mc/dragonfly

Fix custom items looking so big

Opened this issue · 3 comments

The only reason I can come up with that the items are too big when holding them is because render offsets aren't properly set for the item. I'd say render offsets should be able to be controlled with a RenderOffset() method that returns the correct render offset for the item. For example, if we want to create a new sword, we should be able to use render offsets of a Minecraft sword.
The workaround I use: I have to create attachables, animations and render controllers for each custom item as they don't show up properly without them.

Maybe there's already a fix which I didn't notice at all, but that doesn't seem the case, at least for me.

This happens only in first person by the way, not in third person IIRC. The calculateItemScale method could be the issue custom items are big in first person. Why are the correct base values used only when the item's HandEquipped() method returns true?

After some research, I found out attachables are the way to go. Render offsets won't make it out of experiments, so it's just better to create attachables for each custom item.

Render offsets have been deprecated in 1.20.10+