Bloc Orientable (TileEntity)
-
Erreur, le model de mon bloc disparait
dans les logs il y a marqué :
[09:31:35] [Client thread/ERROR] [FML]: Model definition for location ut:platecrafter#facing=east not found
[09:31:35] [Client thread/ERROR] [FML]: Model definition for location ut:platecrafter#facing=south not found
[09:31:35] [Client thread/ERROR] [FML]: Model definition for location ut:platecrafter#facing=north not found
[09:31:35] [Client thread/ERROR] [FML]: Model definition for location ut:platecrafter#facing=west not found -
Dans ton .json, il faut que tu rajoutes un model pour chaque orientation.
-
Pfioouuu… Sérieusement ?
Comment je fait ça ?
Je les empile ?
Comment le jeu va savoir la quelle est pour quelle orientation ?
La Pumpkin ou le four , ils ont pas ça dans leur .json ! -
Si :
{ "parent": "block/orientable", // C'est ici qu'il faut regarder ! "textures": { "top": "blocks/pumpkin_top", "front": "blocks/pumpkin_face_off", "side": "blocks/pumpkin_side" } }Oh tiens, un fichier JSON tout fait pour les développeurs (orientable.json):
{ "parent": "block/cube", "textures": { "particle": "#front", "down": "#top", "up": "#top", "north": "#front", "east": "#side", "south": "#side", "west": "#side" } } -
Oui, mais ça ne m’aide pas… Ou je suis vraiment très con (Ce qui est le cas)
Mon .json n’a pas de “parent”, c’est un .json custom
:::
{
“textures”: {
“0”: “ut:blocks/back”,
“1”: “ut:blocks/sides”,
“2”: “ut:blocks/front”,
“3”: “ut:blocks/cobblestone”,
“4”: “ut:blocks/planks_oak”,
“5”: “ut:blocks/iron_block”
},
“elements”: [
{
“name”: “Base”,
“from”: [
0.0,
0.0,
0.0
],
“to”: [
16.0,
16.0,
16.0
],
“faces”: {
“north”: {
“texture”: “#0”,
“uv”: [
0.0,
0.0,
16.0,
16.0
]
},
“east”: {
“texture”: “#1”,
“uv”: [
0.0,
0.0,
16.0,
16.0
]
},
“south”: {
“texture”: “#2”,
“uv”: [
0.0,
0.0,
16.0,
16.0
]
},
“west”: {
“texture”: “#1”,
“uv”: [
0.0,
0.0,
16.0,
16.0
]
},
“up”: {
“texture”: “#3”,
“uv”: [
0.0,
0.0,
16.0,
16.0
]
},
“down”: {
“texture”: “#4”,
“uv”: [
0.0,
0.0,
16.0,
16.0
]
}
}
},
{
“name”: “Remblais 2”,
“from”: [
0.0,
16.0,
0.0
],
“to”: [
16.0,
19.0,
3.0
],
“faces”: {
“north”: {
“texture”: “#3”,
“uv”: [
0.0,
3.0,
16.0,
6.0
]
},
“east”: {
“texture”: “#3”,
“uv”: [
0.0,
0.0,
3.0,
3.0
]
},
“south”: {
“texture”: “#3”,
“uv”: [
0.0,
0.0,
16.0,
3.0
]
},
“west”: {
“texture”: “#3”,
“uv”: [
0.0,
0.0,
3.0,
3.0
]
},
“up”: {
“texture”: “#3”,
“uv”: [
0.0,
0.0,
16.0,
3.0
]
},
“down”: {
“texture”: “#3”,
“uv”: [
0.0,
0.0,
16.0,
3.0
]
}
}
},
{
“name”: “Remblais 1”,
“from”: [
0.0,
19.0,
0.0
],
“to”: [
16.0,
22.0,
2.0
],
“faces”: {
“north”: {
“texture”: “#3”,
“uv”: [
0.0,
0.0,
16.0,
3.0
]
},
“east”: {
“texture”: “#3”,
“uv”: [
0.0,
0.0,
2.0,
3.0
]
},
“south”: {
“texture”: “#3”,
“uv”: [
0.0,
0.0,
16.0,
3.0
]
},
“west”: {
“texture”: “#3”,
“uv”: [
0.0,
0.0,
2.0,
3.0
]
},
“up”: {
“texture”: “#3”,
“uv”: [
0.0,
0.0,
16.0,
2.0
]
},
“down”: {
“texture”: “#3”,
“uv”: [
0.0,
0.0,
16.0,
2.0
]
}
}
},
{
“name”: “Manche Marteau”,
“from”: [
7.0,
13.0,
0.0
],
“to”: [
9.0,
18.0,
2.0
],
“rotation”: {
“origin”: [
7.0,
14.0,
8.0
],
“axis”: “x”,
“angle”: 45.0
},
“faces”: {
“north”: {
“texture”: “#4”,
“uv”: [
0.0,
0.0,
4.0,
11.0
]
},
“east”: {
“texture”: “#4”,
“uv”: [
0.0,
0.0,
3.0,
11.0
]
},
“south”: {
“texture”: “#4”,
“uv”: [
0.0,
0.0,
3.0,
11.0
]
},
“west”: {
“texture”: “#4”,
“uv”: [
0.0,
0.0,
5.0,
11.0
]
},
“up”: {
“texture”: “#4”,
“uv”: [
0.0,
0.0,
-1.0,
5.0
]
},
“down”: {
“texture”: “#4”,
“uv”: [
0.0,
0.0,
2.0,
2.0
]
}
}
},
{
“name”: “Tête marteau”,
“from”: [
6.0,
18.0,
-1.0
],
“to”: [
10.0,
21.0,
5.0
],
“rotation”: {
“origin”: [
8.0,
15.0,
8.0
],
“axis”: “x”,
“angle”: 45.0
},
“faces”: {
“north”: {
“texture”: “#5”,
“uv”: [
3.0,
3.0,
7.0,
6.0
]
},
“east”: {
“texture”: “#5”,
“uv”: [
8.0,
3.0,
14.0,
6.0
]
},
“south”: {
“texture”: “#5”,
“uv”: [
3.0,
3.0,
7.0,
6.0
]
},
“west”: {
“texture”: “#5”,
“uv”: [
3.0,
3.0,
9.0,
6.0
]
},
“up”: {
“texture”: “#5”,
“uv”: [
3.0,
3.0,
7.0,
9.0
]
},
“down”: {
“texture”: “#5”,
“uv”: [
3.0,
3.0,
7.0,
9.0
]
}
}
}
]
}
:::
Dois-je en ajouter un ? -
Qu’est-ce que ton block représente ?
-
Un bloc normal, avec deux sorte de… Barrières , et un marteau
Screen : ( Sur Modelcreator, car mon Minecraft preend 5 ans a se lancer )
http://www.noelshack.com/2015-24-1433945128-qsdsefrgtyuicaco-p.png -
Il faut faire le model de base (commence par le sens que tu veux) et ensuite recopie le model pour chaque orientation.
PS : je pense que tu devrais pouvoir alléger ton model, les logiciels ne sont pas toujours bien optimisés.
-
Oui, j’avais compris, mais comment je fais pour les stocker ?
J’en crée un qui s’apelle platecrafter, un autre platecrafter_north, un autre platecrafter_south ect ?
EDIT : Je vais tester un truc, je vais voir si c’est concluant
EDIT² : Je ne vais pas tester mon hypothèse 1, mais une autre -
-
Euh… En quoi cela m’aide ? Ça m’apprend juste a faire un Model, mais pas a faire un model ‘rotatif’
-
Tu cherches à faire le fichier json non ?
-
Oui, mais a faire un sorte qu’il puisse être tourné, qu’il soit orientable, il est déjà fait mon .json
-
Apparemment non :
[09:31:35] [Client thread/ERROR] [FML]: Model definition for location ut:platecrafter#facing=east not found [09:31:35] [Client thread/ERROR] [FML]: Model definition for location ut:platecrafter#facing=south not found [09:31:35] [Client thread/ERROR] [FML]: Model definition for location ut:platecrafter#facing=north not found [09:31:35] [Client thread/ERROR] [FML]: Model definition for location ut:platecrafter#facing=west not found -
Bah il est fait, mais faut faire en sorte qu’il puisse se tourner, et sa, je ne sais pas comment faire
Rappel : Ce n’est pas un .json normal -
Pourquoi ne serait-il pas “normal” ?
-
Ce que je veut dire , c’est que ce n’est pas un simple bloc, c’est un model custom
-
Oui, et alors ?
-
Un cube et un model sont tous deux des blocs, ils peuvent donc être tous les deux orientables de la même manière, ça ne diffère pas entre les deux.
-
J’ai changé d’avis à propos du bloc. Pour facilité le GUI, j’ai fait un TileEntity
Je vais essayer de suivre le tuto de robin, et si ça ne fonctionne pas, je reviendrai ici