Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field "none" should not exist in "display" field of block model #1736

Open
merak48763 opened this issue Jan 28, 2025 · 2 comments
Open

Field "none" should not exist in "display" field of block model #1736

merak48763 opened this issue Jan 28, 2025 · 2 comments

Comments

@merak48763
Copy link

Due to the fix of #1733, the display field in block model now also accepts none as a key.
However the transform of none cannot be customized in game.

// net.minecraft.client.renderer.block.model.ItemTransforms#getTransform
return switch (itemDisplayContext) {
  case ItemDisplayContext.THIRD_PERSON_LEFT_HAND -> this.thirdPersonLeftHand;
  case ItemDisplayContext.THIRD_PERSON_RIGHT_HAND -> this.thirdPersonRightHand;
  case ItemDisplayContext.FIRST_PERSON_LEFT_HAND -> this.firstPersonLeftHand;
  case ItemDisplayContext.FIRST_PERSON_RIGHT_HAND -> this.firstPersonRightHand;
  case ItemDisplayContext.HEAD -> this.head;
  case ItemDisplayContext.GUI -> this.gui;
  case ItemDisplayContext.GROUND -> this.ground;
  case ItemDisplayContext.FIXED -> this.fixed;
  default -> ItemTransform.NO_TRANSFORM;
};

ItemDisplayContext.NONE goes to the default branch and yields a constant transform config.

@misode
Copy link
Member

misode commented Feb 6, 2025

I'm a bit confused. Should the mentioned fix just be reverted back? @merak48763

@merak48763
Copy link
Author

In my opinion it should be two separated enums, ItemDisplayContext and CustomizableItemDisplayContext.
CustomizableItemDisplayContext excludes none and replaces ItemDisplayContext in the keys of block model display field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants