GUI/Block
-
Tu peux appliquer un fichier différent sur chaque morceau du modèle.
-
d’accord mais comment je fait ça en json ?
-
Le plus simple est d’utiliser un logiciel tiers comme MrCrayfish’s Model Creator
http://minecraft.gamepedia.com/Programs_and_editors/3D_modeling
Après tu peux toujours les faire à la main, mais c’est long. -
J’ai déjà le model, donc tu veut dire que l’application des textures se fait dans le json du model?
les models se place bien dans le dossier models/block n’est-ce pas? -
Oui. C’est en effet au niveau du json qu’on précise quelle texture utiliser.
-
Comment fait-on un block avec une metadata ? car je ne crois pas que soit identique a l’1.7
-
Mes textures ne s’applique pas

et le rendu en jeux est assez bizarre : c’est le rendu d’un item et non d’un block, comment je oeut regler ça[03:24:56] [Client thread/ERROR]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+= [03:24:56] [Client thread/ERROR]: The following texture errors were found. [03:24:56] [Client thread/ERROR]: ================================================== [03:24:56] [Client thread/ERROR]: DOMAIN spyutil [03:24:56] [Client thread/ERROR]: –------------------------------------------------ [03:24:56] [Client thread/ERROR]: domain spyutil is missing 0 textures [03:24:56] [Client thread/ERROR]: domain spyutil has 1 location: [03:24:56] [Client thread/ERROR]: mod spyutil resources at S:\Files\Java Modding\SpyUtil\out\production\SpyUtil [03:24:56] [Client thread/ERROR]: –----------------------- [03:24:56] [Client thread/ERROR]: The following other errors were reported for domain spyutil: [03:24:56] [Client thread/ERROR]: –----------------------- [03:24:56] [Client thread/ERROR]: Problem: broken aspect ratio and not an animation [03:24:56] [Client thread/ERROR]: textures/blocks/models/lantern_torch_off.png [03:24:56] [Client thread/ERROR]: textures/blocks/models/lantern_torch_on.png [03:24:56] [Client thread/ERROR]: ================================================== [03:24:56] [Client thread/ERROR]: +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=Je comprend pas ça car elle se trouve bien dans le bon dossier

S:\Files\Java Modding\SpyUtil\src\main\resources\assets\spyutil\textures\blocks\models -
Tu peux renvoyer le json en question et la texture ?
-
blocks/models
{ "textures": { "stone": "blocks/stone", "glass": "blocks/glass", "torch_off": "spyutil:blocks/models/lantern_torch_off" }, "elements": [ { "name": "bottom", "from": [ 5.0, 0.0, 5.0 ], "to": [ 11.0, 1.0, 11.0 ], "faces": { "north": { "texture": "#stone", "uv": [ 0.0, 0.0, 6.0, 1.0 ] }, "east": { "texture": "#stone", "uv": [ 0.0, 0.0, 6.0, 1.0 ] }, "south": { "texture": "#stone", "uv": [ 0.0, 0.0, 6.0, 1.0 ] }, "west": { "texture": "#stone", "uv": [ 0.0, 0.0, 6.0, 1.0 ] }, "up": { "texture": "#stone", "uv": [ 0.0, 0.0, 6.0, 6.0 ] }, "down": { "texture": "#stone", "uv": [ 0.0, 0.0, 6.0, 6.0 ] } } }, { "name": "top", "from": [ 5.0, 8.0, 5.0 ], "to": [ 11.0, 9.0, 11.0 ], "faces": { "north": { "texture": "#stone", "uv": [ 0.0, 0.0, 6.0, 1.0 ] }, "east": { "texture": "#stone", "uv": [ 0.0, 0.0, 6.0, 1.0 ] }, "south": { "texture": "#stone", "uv": [ 0.0, 0.0, 6.0, 1.0 ] }, "west": { "texture": "#stone", "uv": [ 0.0, 0.0, 6.0, 1.0 ] }, "up": { "texture": "#stone", "uv": [ 0.0, 0.0, 6.0, 6.0 ] }, "down": { "texture": "#stone", "uv": [ 0.0, 0.0, 6.0, 6.0 ] } } }, { "name": "side1", "from": [ 5.0, 1.0, 5.0 ], "to": [ 6.0, 8.0, 6.0 ], "faces": { "north": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "east": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "south": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "west": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "up": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 1.0 ] } } }, { "name": "side2", "from": [ 10.0, 1.0, 5.0 ], "to": [ 11.0, 8.0, 6.0 ], "faces": { "north": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "east": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "south": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "west": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "up": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 1.0 ] } } }, { "name": "side4", "from": [ 5.0, 1.0, 10.0 ], "to": [ 6.0, 8.0, 11.0 ], "faces": { "north": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "east": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "south": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "west": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "up": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 1.0 ] } } }, { "name": "side3", "from": [ 10.0, 1.0, 10.0 ], "to": [ 11.0, 8.0, 11.0 ], "faces": { "north": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "east": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "south": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "west": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "up": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 1.0 ] }, "down": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 1.0 ] } } }, { "name": "candel", "from": [ 7.0, 1.0, 7.0 ], "to": [ 9.0, 6.0, 9.0 ], "faces": { "north": { "texture": "#torch_off", "uv": [ 0.0, 0.0, 2.0, 5.0 ] }, "east": { "texture": "#torch_off", "uv": [ 0.0, 0.0, 2.0, 5.0 ] }, "south": { "texture": "#torch_off", "uv": [ 0.0, 0.0, 2.0, 5.0 ] }, "west": { "texture": "#torch_off", "uv": [ 0.0, 0.0, 2.0, 5.0 ] }, "up": { "texture": "#torch_off", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, "down": { "texture": "#torch_off", "uv": [ 0.0, 0.0, 2.0, 2.0 ] } } }, { "name": "glasspane1", "from": [ 6.0, 1.0, 6.0 ], "to": [ 7.0, 8.0, 10.0 ], "faces": { "north": { "texture": "#glass", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "east": { "texture": "#glass", "uv": [ 0.0, 0.0, 4.0, 7.0 ] }, "south": { "texture": "#glass", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "west": { "texture": "#glass", "uv": [ 0.0, 0.0, 4.0, 7.0 ] }, "up": { "texture": "#glass", "uv": [ 0.0, 0.0, 1.0, 4.0 ] }, "down": { "texture": "#glass", "uv": [ 0.0, 0.0, 1.0, 4.0 ] } } }, { "name": "glasspane2", "from": [ 9.0, 1.0, 6.0 ], "to": [ 10.0, 8.0, 10.0 ], "faces": { "north": { "texture": "#glass", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "east": { "texture": "#glass", "uv": [ 0.0, 0.0, 4.0, 7.0 ] }, "south": { "texture": "#glass", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "west": { "texture": "#glass", "uv": [ 0.0, 0.0, 4.0, 7.0 ] }, "up": { "texture": "#glass", "uv": [ 0.0, 0.0, 1.0, 4.0 ] }, "down": { "texture": "#glass", "uv": [ 0.0, 0.0, 1.0, 4.0 ] } } }, { "name": "glasspane3", "from": [ 7.0, 1.0, 6.0 ], "to": [ 9.0, 8.0, 7.0 ], "faces": { "north": { "texture": "#glass", "uv": [ 0.0, 0.0, 2.0, 7.0 ] }, "east": { "texture": "#glass", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "south": { "texture": "#glass", "uv": [ 0.0, 0.0, 2.0, 7.0 ] }, "west": { "texture": "#glass", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "up": { "texture": "#glass", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, "down": { "texture": "#glass", "uv": [ 0.0, 0.0, 2.0, 1.0 ] } } }, { "name": "glasspane4", "from": [ 7.0, 1.0, 9.0 ], "to": [ 9.0, 8.0, 10.0 ], "faces": { "north": { "texture": "#glass", "uv": [ 0.0, 0.0, 2.0, 7.0 ] }, "east": { "texture": "#glass", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "south": { "texture": "#glass", "uv": [ 0.0, 0.0, 2.0, 7.0 ] }, "west": { "texture": "#glass", "uv": [ 0.0, 0.0, 1.0, 7.0 ] }, "up": { "texture": "#glass", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, "down": { "texture": "#glass", "uv": [ 0.0, 0.0, 2.0, 1.0 ] } } }, { "name": "hand1", "from": [ 6.0, 9.0, 7.0 ], "to": [ 7.0, 11.0, 9.0 ], "faces": { "north": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "east": { "texture": "#stone", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, "south": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "west": { "texture": "#stone", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, "up": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "down": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 2.0 ] } } }, { "name": "hand2", "from": [ 9.0, 9.0, 7.0 ], "to": [ 10.0, 11.0, 9.0 ], "faces": { "north": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "east": { "texture": "#stone", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, "south": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "west": { "texture": "#stone", "uv": [ 0.0, 0.0, 2.0, 2.0 ] }, "up": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 2.0 ] }, "down": { "texture": "#stone", "uv": [ 0.0, 0.0, 1.0, 2.0 ] } } }, { "name": "hand3", "from": [ 7.0, 11.0, 7.0 ], "to": [ 9.0, 12.0, 9.0 ], "faces": { "north": { "texture": "#stone", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, "east": { "texture": "#stone", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, "south": { "texture": "#stone", "uv": [ 0.0, 0.0, -8.0, -1.0 ] }, "west": { "texture": "#stone", "uv": [ 0.0, 0.0, 2.0, 1.0 ] }, "up": { "texture": "#stone", "uv": [ 0.0, 0.0, 5.0, 2.0 ] }, "down": { "texture": "#stone", "uv": [ 0.0, 0.0, 2.0, 2.0 ] } } } ] } -
Normalement ça serait plutôt :
“torch_off”: “spyutil:blocks/lantern_torch_off”
Et la texture devrait être dans assets/spyutil/textures/blocks/Et tu peux envoyer le fichier de la texture ?
-
voici les textures en question
blocks.zipj’ai testé en les mettant seulement dans le dossier block mais cela ne change rien
-
C’est bien ce que je pensais, tes textures n’ont pas une largeur et une hauteur identique, et les dimensions ne sont pas toutes un multiple de 2.
D’où le “Problem: broken aspect ratio and not an animation” -
'd’accord alors comment je peut faire?
-
Il faut un fichier de 16x16.
Laisse ce dont tu n’as pas besoin en transparence. -
d’accord je vais faire comment ça, mais aussi comment on regles la le blockbound ?
et je comprend pas pourquoi j’ai un rendu pareil dans l’inventaire (c’est pas rendu comme un block mais comme un item)

Y a-t-il un moyen de pouvoir gérer la transparence, car en jeu elle n’est pas présente?
-
Ton item est bien rendu comme un bloc dans l’inventaire mais tu ne vois que sur haut.
Appuies sur F5 et tu verra.Pour autoriser la transparance :
@SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return BlockRenderLayer.CUTOUT; }à mettre dans la classe du bloc bien sûr.
-
et le Block Bound comment on le modifie ?
-
La boite de collision ?
-
ouiii
-
public AxisAlignedBB getBoundingBox(IBlockState state, IBlockAccess source, BlockPos pos)