tag:blogger.com,1999:blog-7152610993519162429.post6848999524480548320..comments2024-03-28T17:46:10.047+10:30Comments on Minecraft Modding: Block Models [1.8]The Grey Ghosthttp://www.blogger.com/profile/13883358338801683207noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-7152610993519162429.post-55161296423629330802018-01-15T22:27:27.185+10:302018-01-15T22:27:27.185+10:30does anyone have the block texture for a torch?does anyone have the block texture for a torch?Anonymoushttps://www.blogger.com/profile/09167466337913770917noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-24229464868895240852018-01-15T22:27:12.314+10:302018-01-15T22:27:12.314+10:30does anyone have the block texture for a torch?does anyone have the block texture for a torch?Anonymoushttps://www.blogger.com/profile/09167466337913770917noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-89277388203436728072017-06-06T21:11:36.224+09:302017-06-06T21:11:36.224+09:30Same feeling, the json file looks like some sort o...Same feeling, the json file looks like some sort of code/script but actually its not. And u can not set breakpoints inside a json file, takes me years to find out syntax errors /w\<br /><br />I made a 1.11.2 mod DEMO<br />https://github.com/rikka0w0/MinecraftModBasicDemo<br /><br />Have a look at BasicBlock.java tut_block.json(2 of them), the texture is tut_block.pngRikka0_0https://www.blogger.com/profile/13441674184996489663noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-9766167472436373972017-06-06T21:05:52.256+09:302017-06-06T21:05:52.256+09:30This comment has been removed by the author.Rikka0_0https://www.blogger.com/profile/13441674184996489663noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-67953434599873514452015-05-25T23:25:57.910+09:302015-05-25T23:25:57.910+09:30Hi. Try asking the question here, there are lot o...Hi. Try asking the question here, there are lot of helpful folks that can give advice.<br />http://www.minecraftforge.net/forum/index.php/board,73.0.html<br />Also perhaps this link<br />http://greyminecraftcoder.blogspot.com.au/2015/03/troubleshooting-block-and-item-rendering.html<br />-TGG<br />The Grey Ghosthttps://www.blogger.com/profile/13883358338801683207noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-65516807168985954462015-05-23T21:12:20.489+09:302015-05-23T21:12:20.489+09:30Can someone tell me the problem? The particles are...Can someone tell me the problem? The particles are displaying the null texture. Thanks.<br /><br />{<br />"textures": {<br />"particle": "blocks/anvil_base",<br />"0": "blocks/anvil_base",<br />},Anonymoushttps://www.blogger.com/profile/06125762349149254189noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-29521293719887209652015-05-23T21:04:45.910+09:302015-05-23T21:04:45.910+09:30This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/06125762349149254189noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-78192280583851260452015-05-23T21:03:26.879+09:302015-05-23T21:03:26.879+09:30This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/02085382095947819536noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-35481944285822953812015-03-30T04:00:43.629+10:302015-03-30T04:00:43.629+10:30Okay, I figured it out based on your reference you...Okay, I figured it out based on your reference you sent me on another forum. The issue is that you can't put the full texture name down in the elements, but rather you need to define all the textures first and reference them with the # annotation. So a working example looks like this:<br />{ <br /><br /> "textures": <br /> {<br /> "particle": "blocks/lapis_block",<br /> "leather": "items/leather",<br /> "pole": "blocks/stone"<br /> },<br /> "elements":[ <br /> { <br /> "__comment":"The skin on the tanning rack", <br /> "from":[ 4, 3, 7.5 ],<br /> "to":[ 12, 15, 7.5 ],<br /> "faces":{ <br /> "north":{ "uv": [ 0, 0, 15, 15 ], "texture":"#leather" },<br /> "south":{ "uv": [ 0, 0, 15, 15 ], "texture":"#leather" }<br /> }<br /> },<br /> { <br /> "__comment":"The right post of the tanning rack", <br /> "from":[ 13, 0, 7 ],<br /> "to":[ 15, 16, 8 ],<br /> "faces":{ <br /> "down":{ "texture":"#pole" },<br /> "up":{ "texture": "#pole" },<br /> "north":{ "texture":"#pole" },<br /> "south":{ "texture":"#pole" },<br /> "west":{ "texture":"#pole" },<br /> "east":{ "texture":"#pole" }<br /> }<br /> },<br /> { <br /> "__comment":"The left post of the tanning rack", <br /> "from":[ 1, 0, 7 ],<br /> "to":[ 3, 16, 8 ],<br /> "faces":{ <br /> "down":{ "texture": "#pole" },<br /> "up":{ "texture": "#pole" },<br /> "north":{ "texture": "#pole" },<br /> "south":{ "texture": "#pole" },<br /> "west":{ "texture": "#pole" },<br /> "east":{ "texture": "#pole" }<br /> }<br /> }<br /> ]<br />}Julian Abelarhttps://www.blogger.com/profile/03003230541420264945noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-65423412117019454092015-03-29T10:08:10.929+10:302015-03-29T10:08:10.929+10:30Sorry, need help again. I've successfully cre...Sorry, need help again. I've successfully created several blocks that are full blocks, with orientable parent. Now I'm trying a more complicated shape -- in this case it is a tanning rack that has two posts and a plane between them. I want the posts to have a wood texture and the plane will have a leather hide texture.<br /><br />Anyway, the cuboid shapes work fine but I'm trying to map a texture and it is just using the pink and black checkered default. To keep it simple, I started by avoiding the uv mapping and just trying to map a hardened clay texture onto all faces of all three elements. However, it doesn't seem to put the textures on. Here is my JSON:<br />{ <br /> "elements":[ <br /> { <br /> "__comment":"The skin on the tanning rack", <br /> "from":[ 4, 3, 7.5 ],<br /> "to":[ 12, 15, 7.5 ],<br /> "faces":{ <br /> "north":{ "texture":"blocks/hardened_clay_stained_brown" },<br /> "south":{ "texture":"blocks/hardened_clay_stained_brown" }<br /> }<br /> },<br /> { <br /> "__comment":"The right post of the tanning rack", <br /> "from":[ 13, 0, 7 ],<br /> "to":[ 15, 16, 8 ],<br /> "faces":{ <br /> "down":{ "texture":"blocks/hardened_clay_stained_brown" },<br /> "up":{ "texture":"blocks/hardened_clay_stained_brown" },<br /> "north":{ "texture":"blocks/hardened_clay_stained_brown" },<br /> "south":{ "texture":"blocks/hardened_clay_stained_brown" },<br /> "west":{ "texture":"blocks/hardened_clay_stained_brown" },<br /> "east":{ "texture":"blocks/hardened_clay_stained_brown" }<br /> }<br /> },<br /> { <br /> "__comment":"The left post of the tanning rack", <br /> "from":[ 1, 0, 7 ],<br /> "to":[ 3, 16, 8 ],<br /> "faces":{ <br /> "down":{ "texture":"blocks/hardened_clay_stained_brown" },<br /> "up":{ "texture":"blocks/hardened_clay_stained_brown" },<br /> "north":{ "texture":"blocks/hardened_clay_stained_brown" },<br /> "south":{ "texture":"blocks/hardened_clay_stained_brown" },<br /> "west":{ "texture":"blocks/hardened_clay_stained_brown" },<br /> "east":{ "texture":"blocks/hardened_clay_stained_brown" }<br /> }<br /> }<br /> ]<br />}<br /><br />Any ideas? I understand the concept, but I must have a type or am missing something. Do I need to specify a parent? (I tried that but it makes the model into a full block).Julian Abelarhttps://www.blogger.com/profile/03003230541420264945noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-36967955447608461862015-03-01T11:59:54.609+10:302015-03-01T11:59:54.609+10:30Keen. The reason it doesn't always complain i...Keen. The reason it doesn't always complain is because there are several steps between specifying the texture and rendering the model. If the file is not found, you get an error message, but if it doesn't find your variant in the bakery, it just silently substitutes missing. I don't know why they did that, it's very confusing. -TGGThe Grey Ghosthttps://www.blogger.com/profile/13883358338801683207noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-61902938734264459902015-02-28T02:28:37.115+10:302015-02-28T02:28:37.115+10:30Okay, finally got it working. I had two problems ...Okay, finally got it working. I had two problems going on, first one was a cut and paste error where the block states json was actually pointing to another non-working json. Secondly, this block was supposed to be translucent but it seems there is some subtle changes to the way that works in 1.8 -- for example there is some EnumBlockLayer.TRANSLUCENT that needs to be implemented.<br /><br />My only beef is that the console should have better errors when it can't find texture. It seems strange it will sometimes display the default texture even though it didn't complain...Julian Abelarhttps://www.blogger.com/profile/03003230541420264945noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-31747043559148532992015-02-27T06:19:29.124+10:302015-02-27T06:19:29.124+10:30I was able to take your code and get blocks to ren...I was able to take your code and get blocks to render. So now I just need to work through and see what's wrong with mine. Definitely thanks for giving me a reference point!Julian Abelarhttps://www.blogger.com/profile/03003230541420264945noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-53528789310615943322015-02-27T05:37:35.867+10:302015-02-27T05:37:35.867+10:30It seems like my code is really similar to yours. ...It seems like my code is really similar to yours. In client proxy I have a registerBlockRenderers() which has code:<br /> public void registerItemRenderers()<br /> {<br /> // DEBUG<br /> System.out.println("Registering item renderers");<br /> <br /> RenderItem renderItem = Minecraft.getMinecraft().getRenderItem();<br /><br /> renderItem.getItemModelMesher().register(MagicBeans.magicBeans, 0, new ModelResourceLocation(MagicBeans.MODID + ":" + MagicBeans.magicBeans.getUnlocalizedName().substring(5), "inventory"));<br /> renderItem.getItemModelMesher().register(MagicBeans.itemGoldenEgg, 0, new ModelResourceLocation(MagicBeans.MODID + ":" + MagicBeans.itemGoldenEgg.getUnlocalizedName().substring(5), "inventory"));<br /> renderItem.getItemModelMesher().register(MagicBeans.goldenGooseMeat, 0, new ModelResourceLocation(MagicBeans.MODID + ":" + MagicBeans.goldenGooseMeat.getUnlocalizedName().substring(5), "inventory"));<br /> renderItem.getItemModelMesher().register(MagicBeans.bootsOfSafeFalling, 0, new ModelResourceLocation(MagicBeans.MODID + ":" + MagicBeans.bootsOfSafeFalling.getUnlocalizedName().substring(5), "inventory"));<br /> }<br /><br />In the console, the debug statement prints out indicating that this code is run. There is no complaints at all in the console about missing models or textures. The block item in the creative tab is a pink and black checkered default texture, but when placed in the world the block is invisible (you can see the bounding box if you hover and it casts some shadow as expected for that block).<br /><br />I'll keep chipping away at it, but it is weird that it is showing default texture but without any console complaint about missing texture...<br />Julian Abelarhttps://www.blogger.com/profile/03003230541420264945noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-85122560046293157182015-02-26T19:30:16.586+10:302015-02-26T19:30:16.586+10:30Hi Julian Yeah I feel your pain, it's very har...Hi Julian Yeah I feel your pain, it's very hard to get it right first time and tracking down why the texture is checkered isn't so easy.<br />This repository has some examples of blocks with textures<br />https://github.com/TheGreyGhost/MinecraftByExample<br />Try MBE01 for a very simple example.<br /><br />-TGG<br /><br />The Grey Ghosthttps://www.blogger.com/profile/13883358338801683207noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-5678182931106968292015-02-26T17:07:27.317+10:302015-02-26T17:07:27.317+10:30Actually, still having some problem with this. I ...Actually, still having some problem with this. I can get item textures to work fine, but blocks still have the pink and black checkered default texture. Even a pretty simple block. Do you have a github repository of working code I could peek at? Just need a block with working texture.Julian Abelarhttps://www.blogger.com/profile/03003230541420264945noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-75336335479031612502015-02-26T16:09:57.217+10:302015-02-26T16:09:57.217+10:30Nevermind, I solved it. In order for me to avoid ...Nevermind, I solved it. In order for me to avoid typos I used unlocalized name in several places. But forgot that the method for getting the unlocalized name appends the "tile." or "item." to the name -- I hate that because I like setter and getter methods to be symmetrical. Anyway, adding a .substring(5) to each fixed that.Julian Abelarhttps://www.blogger.com/profile/03003230541420264945noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-27028342052841257772015-02-26T15:53:46.778+10:302015-02-26T15:53:46.778+10:30Hey TGG, I've finally gotten around to upgradi...Hey TGG, I've finally gotten around to upgrading some mods to 1.8. I'm pretty comfortable upgrading the Java stuff, but I have to say that converting to BlockPos, IBlockState, and these JSONs is pretty tedious. Anyway, I think I understand the JSON concept -- a JSON that maps the block states to models, and then models that map to textures based on conditions of what is being rendered. However, my effort is failing with "model definition not found" errors. I have a thread here (http://www.minecraftforge.net/forum/index.php/topic,28211.0.html) that shows my asset structure, JSON file content and other related code. I'm pretty sure it is just some typo, or wrong folder structure but I've been looking at it for days with no success. Can you take a look?Julian Abelarhttps://www.blogger.com/profile/03003230541420264945noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-74385972988591939912015-02-23T18:54:24.473+10:302015-02-23T18:54:24.473+10:30Hi. I'm not familiar with .obj files, but giv...Hi. I'm not familiar with .obj files, but given how restrictive the minecraft block model format is, I think in many cases it won't be possible to convert an .obj to the block model.<br />You could try this program:<br />BDcraft cubik<br />http://bdcraft.net/cubik<br /><br />I haven't tried it but I've heard good things about it. You might be able to import obj (and export minecraft block model) with it.<br /><br />-TGGThe Grey Ghosthttps://www.blogger.com/profile/13883358338801683207noreply@blogger.comtag:blogger.com,1999:blog-7152610993519162429.post-65290016821597617072015-02-23T08:19:49.549+10:302015-02-23T08:19:49.549+10:30Any idea how to convert a .obj to a .json file?Any idea how to convert a .obj to a .json file?Anonymoushttps://www.blogger.com/profile/14614084264420513219noreply@blogger.com