CustomiesDevs/Customies

Render Offsets

xSuperr opened this issue · 2 comments

Using a texture bigger than 16x16 will make any custom item look massive in third person, and not render in first person. Normally this can be fixed in behavior packs by using the render_offsets component but that does not seem to work here.

In this example a 64x64 texture renders massive, and changing scale and positioning values does not shift it at all.
Reference to render offsets here

$this->addComponent('minecraft:render_offsets',CompoundTag::create()
            ->setTag('main_hand', CompoundTag::create()
                ->setTag('first_person', CompoundTag::create()
                    ->setTag('position', new ListTag([
                        new IntTag(1),
                        new IntTag(1),
                        new IntTag(1)
                    ]))
                    ->setTag('rotation', new ListTag([
                        new IntTag(1),
                        new IntTag(1),
                        new IntTag(1)
                    ]))
                    ->setTag('scale', new ListTag([
                        new FloatTag(0.0095),
                        new FloatTag(0.0095),
                        new FloatTag(0.0095)
                    ]))
                )
                ->setTag('third_person', CompoundTag::create()
                    ->setTag('position', new ListTag([
                        new IntTag(1),
                        new IntTag(1),
                        new IntTag(1)
                    ]))
                    ->setTag('rotation', new ListTag([
                        new IntTag(1),
                        new IntTag(1),
                        new IntTag(1)
                    ]))
                    ->setTag('scale', new ListTag([
                        new FloatTag(0.025),
                        new FloatTag(0.025),
                        new FloatTag(0.025)
                    ]))
                )
            )
            ->setTag('off_hand', CompoundTag::create()
                ->setTag('first_person', CompoundTag::create()
                    ->setTag('position', new ListTag([
                        new IntTag(1),
                        new IntTag(1),
                        new IntTag(1)
                    ]))
                    ->setTag('rotation', new ListTag([
                        new IntTag(1),
                        new IntTag(1),
                        new IntTag(1)
                    ]))
                    ->setTag('scale', new ListTag([
                        new FloatTag(0.0095),
                        new FloatTag(0.0095),
                        new FloatTag(0.0095)
                    ]))
                )
                ->setTag('third_person', CompoundTag::create()
                    ->setTag('position', new ListTag([
                        new IntTag(1),
                        new IntTag(1),
                        new IntTag(1)
                    ]))
                    ->setTag('rotation', new ListTag([
                        new IntTag(1),
                        new IntTag(1),
                        new IntTag(1)
                    ]))
                    ->setTag('scale', new ListTag([
                        new FloatTag(0.025),
                        new FloatTag(0.025),
                        new FloatTag(0.025)
                    ]))
                )
            )
        );

I'm not completely sure on how one would fix this but 1) Try changing the position tags from Int to Float and 2) if that doesn't work try changing the rotation's to also be float tags. Let me know if this works.

Nevermind, this issue was a problem with Minecraft itself and was fixed in 1.19.