Jump to content

pryingtuna85649

Members
  • Posts

    7
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

pryingtuna85649's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. @ShieldBug1 - Thanks for the response. Combined with jabelar's response, that helped a lot. I've looked several times at the vanilla log class, but the math never made sense because I never understood what was going on with the metadata (despite googling it multiple times). I couldn't find any explanations that cleared the fuzz for me. @jabelar - Your explanation is gold! That kind of breakdown is what I needed. Thanks A TON! I've seen that list of metadata uses before but I've just never understood it. I've also googled bitwise before, but couldn't make the connection to metadata. I think that's probably because the explanations are typically very abstract and don't give concrete examples (I actually don't like referring to oracle java docs for this reason...it's just not conducive to how I learn, I guess). I will dig into learning about bitwise and binary bit representations more. What you described with the door reminds me of the way a circuit works. Going off of that, I have a quick question. You said an open door might have a metadata value of 4, 5, 6, or 7, but to mask the bits before testing them. So if you are testing a door with metadata value of 5, for example, does that mean it would look like this: if ((metadata & 5) == 4)? I'm about to read more about bitwise right now and concentrate on getting a handle on it more before digging into Minecraft code again, so maybe that's a really stupid question that I'll realize after learning more about bitwise, but right now that's how I'm comprehending it. @sequituri - Thanks for the response. Given what jabelar said, I need a better understanding of bitwise before I can do (and understand) what you are saying. Hopefully it will all be clear soon, though. Thanks again, everyone. This has REALLY helped a ton!
  2. Cool, thanks for the explanation! That does make a bit more sense now. So when this (for lack of better words) translates to code, does this mean that each method takes up a bit? Because the decay and placement of leaves are determined by methods, it sounds like those are parts of the bits (and thus become the metadata?). This is all really abstract, which is something I've always struggled with, so again I apologize for having to clarify so much. *crosses eyes*
  3. OK, sorry for continued stupid questions. I have actually read that about metadata before (and again just now), but metadata has been hard for me to fully understand. While what you say makes sense, I still don't fully understand due to other blocks that use metadata. Leaves are also metadata (unless I'm farther off in understanding than I thought), but I can only have 2 separate leaves per class. The leaves don't have rotation like logs do, so I don't understand why those classes only work with 2 blocks per class. Meanwhile, my grass and dirt blocks allow for all 5 blocks in one class. Do you have a good resource for how metadata works? I've looked through this several times: http://www.minecraftforge.net/wiki/Metadata_Based_Subblocks, but I can't apply what is explained there to what you have said. The pieces just aren't coming together yet. Or something is missing. Also, I've looked at code from other mods to get an idea at how other people have done things (not to copy...I WILL NOT plagiarize code...but it does help me put the pieces together and understand concepts better from seeing how others have done things...as well as exposes me to new concepts sometimes), and I've seen others who have registered more than 4 logs in one class. Which is also why I'm confused. Thanks for the help. I really appreciate it.
  4. I'm sorry if these are really stupid questions, but it's something I've been wondering about and unable to find an answer to. So I created custom logs for custom trees. My code works, but the issue I ran into was that I had 5 logs I wanted to create. This doesn't seem like it should be an issue, given that logs are created in an array that are then cycled through in the getSubBlocks method. But when I tried this with 5 blocks (and also rewrote the code in getSubBlocks to account for 5 blocks), it didn't work. What happened was that my 5th log in the array was the texture of the first log. After looking at the vanilla code, I realized there was a BlockOldLog class, which has a string of 4 logs, and BlockNewLog class, which has a string of 2 logs. When I separated my code up similarly (ie, one class with an array of 4 logs, the other with an array of 1, since I had 5 custom log blocks I wanted to create), the textures worked. The only thing that I know isn't right about it is for some reason (despite being a separate class), my 5th log's name (before registering it in my lang file) shows up as the first log from the class with 4 logs. That might be confusing...sorry. But for anyone who followed the description, have you ever heard of this? What's going on with this? My leaf class is doing the same, except it will only take an array of 2, but my sapling class doesn't have this problem. I also created dirt and grass without needing multiple classes. Another question...and I really hate asking this because I think I already know the answer (but I'm of course going to ask anyway)...I'm creating biomes that I want to have my custom grass as the top block and custom dirt as the filler block. I've created my grass and dirt by cycling through a string, as I said above. When I'm setting my this.topBlock and this.fillerBlock in my biome classes, however, it (as I expected) didn't cycle through the array, but created each biome with the first grass/dirt blocks in the arrays as the top/filler blocks for each biome. Obviously I can't set the this.topBlock equal to the array name and location of the specific block I want it to be...that's an error because this.topBlock requires a block, and the array is a string. But is there some other way to do this? I was trying to think of a for loop or an if loop, but that still leads to the problem of blocks vs strings. The one thing I haven't tried is having my biomes all be in one class as a string to cycle through at the top...but I kinda think that will cause an error since it's biomes and then all my biomes would be the same land layout, but with different colors. Which ultimately, I don't want. Anyway, sorry for the stupid (if even comprehended) questions. And thanks in advance.
  5. But the custom creative tab is there...it's just the items/blocks aren't in the creative tab. Do you mean in order for the items to show up in the creative tab, that I have to have the creative tab registered first in the PreInit?
  6. Which block? Here is my dirt block: http://pastebin.com/AjPr4kAY Right now I have it in the block creative tabs since it's not working in the custom one. I do have my stuff registered and created in PreInit. Here is my main class: http://pastebin.com/Jy17HyMD I have tried creating the custom creative tab in a separate class, but the same problem occurs. I've also tried assigning items to my custom creative tab both in my main class and the item/block classes...neither has worked. I have searched the all tab...the items aren't there at all. But I can still craft them in the crafting table, so I know the game still recognizes their existence. Also, my custom biomes (which has custom grass and dirt) still show up correctly. I've hit a brick wall and I'm so frustrated that I want to bang my head against it. Preferably until I pass out, so the frustration disappears a while. *crosses eyes* Thanks for the help, though. I really appreciate it!
  7. I'm having a problem with my creative tab. Only a few items are showing up, even though I have many more I've put in there (and I've checked and rechecked...I've definitely set the creative tab under the different item and block classes to my custom tab...and those items aren't showing up anywhere in the creative tabs, even though I've set them to my custom tab). I'm not getting any error at all...and it doesn't look like there's anything in the console that correlates to the creative tab. Here is what shows up in the console: http://pastebin.com/NWCcMkMg Here is my creative tab code (located in my main class): public static CreativeTabs OzTab; OzTab = new CreativeTabs("OzTab") { @Override @SideOnly(Side.CLIENT) public Item getTabIconItem() { return Item.getItemFromBlock(YellowBrickRoad.YellowBrick); } }; And in each item/block class, I have: setCreativeTab(OzMod.OzTab); No errors anywhere, but also most of the items/blocks not showing up. Anyone have any ideas?
×
×
  • Create New...

Important Information

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