Skip to content

[Bug]特定模型的投射物模型未被正确加载 #1

@redleaf1221

Description

@redleaf1221

表现:

OpenYSM 2.6.6(从源代码运行):
Image
YSM 2.6.5:
Image

复现步骤:

加载内置模型"圣女酒狐",投出三叉戟.

分析:

ModelAssembly#projectileModels中的key是"minecraft:projectile_1",与"minecraft:trident"不匹配.所以GeckoProjectileEntity#buildRenderShape始终返回null,模型未被渲染.
这可能是由于模型格式的差异:

"projectiles": {
      "minecraft:arrow": {
        "model": "models/arrow.json",
        "texture": {
          "uv": "textures/arrow.png"
        },
        "animation": "animations/arrow.animation.json"
      }
    }

"projectiles": [
      {
        "model": "models/arrow.json",
        "texture": {
          "uv": "textures/arrow.png",
          "specular": "textures/pbr/arrow_mer.png"
        },
        "animation": "animations/arrow.animation.json",
        "match": ["minecraft:arrow"]
      },
      {
        "match": ["minecraft:trident"],
        "model": "models/trident.json",
        "texture": {
          "uv": "textures/trident.png"
        }
      }
    ]

这其中后者未被正确解析.具体实现我不会,长大后再学习.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions