Jump to content

[1.8] [SEMI-SOLVED] Connected Textures?


saxon564

Recommended Posts

I am working on a new mod and would like to be able to implement connected textures. Being 1.8 there is little documentation about how to do anything like this. So I am wondering if anyone would be able to give me a rough idea of how I need to set this up.

 

Do I need to run it off metadata depending on what blocks are around it, or is there some other way?

Link to comment
Share on other sites

Hi

 

This link might help a bit

http://greyminecraftcoder.blogspot.co.at/2014/12/blocks-18.html

 

in particular this bit

"The same method Block.getActualState() is also used by blocks which change appearance depending on their neighbours - for example BlockFence, BlockRedstoneWire.

Block.getActualState() is generally called just before a render, to make sure the block has the correct appearance."

 

 

-TGG

 

Link to comment
Share on other sites

ok, I think I might be figuring it out, but the one thing I see that I cannot figure out is in the fence.json file for the fence block state, the thing I am see is "uvlock." I cannot find reference to this anywhere, and would like to know what it does so I know if I need to use it or not. Would you happen to know what that is used for?

Link to comment
Share on other sites

ok, thank you for that. Now I've been testing around and for some reason, the texture path is not wanting to update. I modified the .json file to go an extra folder deeper, because I had to make several new textures to use, but when it loads it still looks in the old location.

 

new code:

 

 

{
    "parent": "block/cube_all",
    "textures": {
        "all": "symbology:blocks/blank_rune_block/blank_rune_block"
    }
}

 

 

 

old code that is no longer in the mod:

 

 

{
    "parent": "block/cube_all",
    "textures": {
        "all": "symbology:blocks/blank_rune_block"
    }
}

 

 

 

I don't understand why it is still trying to look in the old location.

 

 

EDIT:

After playing around with it some more, it is making even less sense. If the file I'm pointing to exists, it tries to point a folder back to get the file, but if the file doesn't exist in that folder, it complains the file isn't in that folder. This is making 0 sense to me, and it's becoming a game of cat and mouse, where I do something to fix it, and it goes to where I was before I tried to fix it.

 

EDIT2:

While waiting to a response, I was doing some code prep, and found that it would take over 400 files to achieve what I am trying to do using basically what I found with a fence. This would be to get the block to be able to connect textures in any direction with another of the same block. 62 files for each block, and I have 7 blocks currently to do this to. Could there be a better way around this?

Link to comment
Share on other sites

Hi

 

Yeah there is a better way, look at ISmartBlockModel.  It lets you choose which parts of your model to return without having to create a model for every single combination.  If you search this forum you should find a couple of posts about it, there is also one in the tutorials section from a couple of weeks ago.

 

This troubleshooting guide might help you get to the bottom of the texture problem

http://greyminecraftcoder.blogspot.com.au/2015/03/troubleshooting-block-and-item-rendering.html

 

Must admit I've never tried subfolders like that before, don't know if it should work.  Try calling your subfolder something distinctly different from the block name?

 

-TGG

Link to comment
Share on other sites

I've read through your blog post on textures, that didn't help, and I did change the name to just "blank_rune" and just "blank" same exact thing kept happening. I don't really understand why it wouldn't be able to read from sub-folders, but, I'm sure there's a reason, if that's how it works.

 

I'll take a look at the ISmartBlockModel and see what I can find, at this point, just about anything is better than 434 model files, or trying to add every single connection combination to the block state files.

Link to comment
Share on other sites

I guess I'm going to have to put this on hold until later, I wasn't expecting it to become this complex and I have other things that are more important to figure out for the mod... like why ore generation will never work right for me.. but thats for a different topic. Thanks for the advice, I'm sure I will use it later when we do finally go to add connected textures.

Link to comment
Share on other sites

At the risk of this being considered spamming the post (not the intention,) would it be possible to render the block using layers and check the state using 1 option, eg. Is stead of checking all: north, south, east, west, up, down in all comvinations, only check 1 at a time, if there isnt a block on that side, then add this layer to the render? If that is possible, that would be the easiest way to create connected textures.

Link to comment
Share on other sites

ok, I followed the tutorial here on ISmartBlockModel, and the 2 things I am most confused it, what do I need to do to send the textures as layers, I know you said to "group" them, but by group do you mean to send them as a Collection, or something else?

 

Also for the BakedBlockModel, im guessing that "..." is to say "put more code of your own here," but I'm not sure about the "myquad" variable, I see no mention of it anywhere in the tutorial. I have a slight idea of how this works, but these are just going  over me.

 

Finally, would I check the blocks around the block in the main block class eg. "MyBlock?" If not, where would I check the blocks around it?

 

1.8 has really screwed me up, I feel so lost now. :(

Link to comment
Share on other sites

ok, I followed the tutorial here on ISmartBlockModel, and the 2 things I am most confused it, what do I need to do to send the textures as layers, I know you said to "group" them, but by group do you mean to send them as a Collection, or something else?

 

Also for the BakedBlockModel, im guessing that "..." is to say "put more code of your own here," but I'm not sure about the "myquad" variable, I see no mention of it anywhere in the tutorial. I have a slight idea of how this works, but these are just going  over me.

 

Finally, would I check the blocks around the block in the main block class eg. "MyBlock?" If not, where would I check the blocks around it?

 

1.8 has really screwed me up, I feel so lost now. :(

 

b.addGeneralQuad(myquad);

b.addFaceQuad(EnumFacing.UP, myquad);

These two statements are just examples of adding face to the result model. myquad is a BakedQuad.

You could check the around blocks in getExtendedState, where you would get World and BlockPos objects.

 

Author of Tao Land Mod.

width=200 height=69http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img]

Also, author of RenderTo

----

I'm not an English native speaker. I just try my best.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.