Immersive Engineering

Immersive Engineering

134M Downloads

[Suggestion] 3D tool sizes hilariously wrong on Traveler's Backpack

p0lar-bear opened this issue ยท 1 comments

commented

Explain your idea

Given that what I'm doing is something unintended in regards to both mods involved, I'm logging this as a suggestion rather than a bug. If anything I'm looking to start a discussion on this to get some insight into why this might be happening.

I used datapacks to add the travelersbackpack:acceptable_tools tag to the drill, buzzsaw, railgun, chemthrower, and revolver so they could be put into the two tool slots in the backpack UI and thus be rendered on the backpack. While I expected them to be positioned somewhat awkwardly (the logic for rendering them is written with the 2D weapons/tools in mind), what I did not expect was for the revolver and railgun to be HILARIOUSLY HUGE.

image

Meanwhile, the drill, railgun, and chemthrower appear to be properly-sized.

Looking at the render logic in Traveler's Backpack for the tool slots, the relevant-looking logic for rendering the tool slots goes as follows for the ModelPart that handles the tool slot items:

  1. Call getModel() from Minecraft's item renderer, passing the item, player level, and player instance.
  2. Push a new pose onto the PoseStack passed in to render().
  3. Translate the model into position. For the top tool, it's moved by (.05, .075, .27) and for the bottom tool, it's moved by (-0.35, 0.95, 0).
  4. Rotate the model - top tool is rotated 45 degrees on the Z axis and 180 degrees on the X axis, and bottom tool is rotated 90 degrees on the Y axis and 45 degrees on the Z axis (this results in most tools being placed horizontally on the top and dangling on the bottom).
  5. Scale the model down 65% on all axes.
commented

Sounds like a good reason to not add those items to that tag...