Posted May 2, 20169 yr Alright. This question sound familiar? I hope so. Unlike most projects, mines a bit more unusual. I'm trying to get it so that when these blocks (note- they are animated and multitextured)are put in a 4x4 position like so: (Code of block: http://pastebin.com/dJSEzxNi) When placed in this condition, I want these blocks to create a connected texture that like so: (64x64) One thing- I have absolutely no clue as to where to even begin. I've tried making my own rudimentary attempt, but alas, to no avail. Perhaps one more knowledgeable may be able to assist.
May 2, 20169 yr Read about multilock structures. Here is a good tutorial: https://lomeli12.net/tutorials/tutorial-how-to-make-a-simple-multiblock-structure/ Creating Potatium Craft, please wait. For a better (and yet poor explanation of my WIP mod, go to: Potatium Craft Overview )
May 2, 20169 yr Author You are looking to do something similar to how Snow / Iron golems are created? Once the last block is placed, if placed in the proper fashion, it will remove the old blocks and replace them with a large clock? I hadn't thought of that. What I actually want is for that 4x4 block setup to have a new texture. So that each block will form that 64x64 texture down there in the bottom. Similarly to how many mods have seamless glass textures.
May 2, 20169 yr You're creating a multiblock structure (don't think of it like a snowman, that's an entity). Once your 16 blocks are in place, replace them with a different block that has metadata from 1 to 16 corresponding to which segment of the texture it should display. You could do it with the existing block, but it would be more difficult and less efficient (the getIcon method would need to validate the structure every time it was called, where as using metadata means it only needs to be done once). Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
May 2, 20169 yr Author You're creating a multiblock structure (don't think of it like a snowman, that's an entity). Once your 16 blocks are in place, replace them with a different block that has metadata from 1 to 16 corresponding to which segment of the texture it should display. You could do it with the existing block, but it would be more difficult and less efficient (the getIcon method would need to validate the structure every time it was called, where as using metadata means it only needs to be done once). Excellent, just what I needed! So, I've created a new block to handle all this. Registered all the icons (split the 64x64 into 16x16 sub-images), believe I set up metadata properly, however, I have no idea how to go about using getIcon() and such. I also believe that I should not be using the OnBlockPlacedBy method, but I could be incorrect. http://pastebin.com/txXeTgww
May 2, 20169 yr @Override public IIcon getIcon(int meta, int side) { return icons[meta]; } Make sure it's actually overriding a method in Block to make sure I didn't typo something. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
May 3, 20169 yr Author @Override public IIcon getIcon(int meta, int side) { return icons[meta]; } Make sure it's actually overriding a method in Block to make sure I didn't typo something. That put textures on my block, so that's working now. But I still can't get manage to figure out how to get the correct textures and connect everything There must be a lot wrong with my logic in the code.
May 3, 20169 yr Your structure should be laid out with metadata as follows: [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [10] [11] [12] [13] [14] [15] [16] As your texture should be split up as well. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
May 3, 20169 yr Author Your structure should be laid out with metadata as follows: [ 1] [ 2] [ 3] [ 4] [ 5] [ 6] [ 7] [ 8] [ 9] [10] [11] [12] [13] [14] [15] [16] As your texture should be split up as well. Indeed, that's the part I understand. But setting up the metadata,recognizing when the blocks should be placed and setting the textures accordingly completely evades me. I've never dealt with anything quite like this; going through other's source code isn't adding to my well of knowledge. (Even Galacticrafts! And I've been looking at the launchpad classes extensively!) Currently, all I've got is: http://pastebin.com/AXVBEFCe I don't suppose you've got any knowledge on this or sources I can use?
May 3, 20169 yr That's going to be on your multiblock detection code, you'll identify a "top left" and set that one to clock:1 and work outwards from there. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
May 4, 20169 yr That's going to be on your multiblock detection code, you'll identify a "top left" and set that one to clock:1 and work outwards from there. You mean 0, right? I think you mean 0.
May 4, 20169 yr Oh m yeah, 0. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.