#Shield with diffrent "views" dont work.

18 messages · Page 1 of 1 (latest)

crystal forum
#

This is the working custom Shield in assets/minecraft/items:

{
"model": {
"type": "minecraft:condition",
"property": "minecraft:using_item",
"on_false": {
"type": "minecraft:model",
"model": "item/models/custom_model"
},
"on_true": {
"type": "minecraft:model",
"model": "item/models/custom_model"
}
}
}

This one however that I wanted to change, where i want the first person version (fallback), doesnt work anymore. I dont know if it is even possible or what I'm doing wrong.
Please help.

{
"model": {
"type": "minecraft:condition",
"property": "minecraft:using_item",
"on_false": {
"cases": [
{
"when": [
"gui",
"thirdperson_righthand",
"thirdperson_lefthand",
"ground",
"head",
"fixed"
],
"model": {
"type": "minecraft:model",
"model": "item/models/custom_model"
}
}
],
"fallback": {
"type": "minecraft:model",
"model": "item/models/custom_model_firstperson"
}
},
"on_true": {
"cases": [
{
"when": [
"gui",
"thirdperson_righthand",
"thirdperson_lefthand",
"ground",
"head",
"fixed"
],
"model": {
"type": "minecraft:model",
"model": "item/models/custom_model"
}
}
],
"fallback": {
"type": "minecraft:model",
"model": "item/models/custom_model_firstperson"
}
}
}
}

cerulean oarBOT
#
Welcome to the help forum!

Please make sure to read #1029373817119838218 as it may answer your question!

Once your question has been resolved, please mark the post as closed by using the </close:1163944441741049897> command.

true grove
#

You never tell it that it's meant to check display_context at that point

cerulean oarBOT
#

<:e:1311744042664726618>

crystal forum
# true grove Your jsons are missing the information about what these cases are for

Hey, so it works when applying the item model onto a shield.

However I just noticed a few minutes ago: in the newer versions it's possible to make every item block, not just the shield ( /give @s paper[blocks_attacks={}] ).

However for those blocking-animations, it appearently doesn't work.
Do you have any idea if it is possible using these kind of blocks?

#

@true grove ,

This is how the json looks:

{
"model": {
"type": "minecraft:condition",
"property": "minecraft:using_item",
"on_false": {
"type": "minecraft:select",
"property": "minecraft:display_context",
"cases": [
{
"when": [
"gui",
"thirdperson_righthand",
"thirdperson_lefthand",
"ground",
"head",
"fixed"
],
"model": {
"type": "minecraft:model",
"model": "item/models/modelexample"
}
}
],
"fallback": {
"type": "minecraft:model",
"model": "item/models/modelexample"
}
},
"on_true": {
"type": "minecraft:select",
"property": "minecraft:display_context",
"cases": [
{
"when": [
"gui",
"thirdperson_righthand",
"thirdperson_lefthand",
"ground",
"head",
"fixed"
],
"model": {
"type": "minecraft:model",
"model": "item/models/modelexample"
}
}
],
"fallback": {
"type": "minecraft:model",
"model": "item/models/modelexample"
}
}
}
}

true grove
#

-# though in your example all models are "modelexample", so your exact example wouldn't do anything special

crystal forum
true grove
#

only difference is that the holding angle isn't the same

#

left = stick that isn't blocking (shows blackstone and blaze for placedholder models)
right = stick that is blocking (shows stone and stick for placeholder models)

#

meanwhile with a shield using the same models and item definition file I get this result when blocking 🤔

crystal forum
# true grove only difference is that the holding angle isn't the same

well that's the problem. When blocking, it changes the angle.
My goal is to be able to block, but the first person view shows the EXACT same model in both cases (block/not-blocking) so the user doesnt even see that he is blocking unless he goes into 3rd person.
I believe if you try it with a shield instead of a stick, it will stay the same angle

true grove
#

yeah, that's my second screenshot

crystal forum
true grove
#

unfortunately I don't see how to fix that either
the only way I know how to assign an animation to an item is via the consumable component, but that cancels the blocks_attack behavior 🤔