Jump to content

Bugsy6

Members
  • Posts

    15
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Bugsy6's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. So I narrowed the error down to when I place a corner piece it lays a straight piece, but then if I remove it and lay it again this time it will be a corner piece. It seems to take the first placed block to change the model then the second time its placed it actually renders the right block. Any ides what is going on?
  2. Ok the good news is that I've got the blocks to render and I have got them to partial change depending on their surrounding blocks. Though they aren't changing as I want them to, of course lol. So I changed the code when the block is added to simply set a value to a variable: Then this variable is called in the createTileEnitity function and used to determine what Entity to use and sets a renderID, which is then used in the getRenderType function: So my issue now is that it seems to be a bit random to what block is place and seems to hold the last placed block model, so when I place another block anywhere if it was the corner pipe it will place that one again, I want it to revert to straight pipe after being used.
  3. Ok so I had a little break did some other bits and now I'm back to being lost on this again. I want to place a block and have it render the correct model depending on its surrounding blocks. Here is my onBlockPlacedBy code which sets the blocks metadata depending on its surroundings: Then I have this code to set the TileEntity: It also sets the variable renderID which is then called in the getRenderType function: Though the block doesn't render at all just the block bounds lines, so any ideas what I'm missing here. Thanks.
  4. So I think it is to do with the getRenderType function. I guess it isn't changing the render type to match the correct renderer. I'm trying to work on this next.
  5. Ok so I have got the onBlockAdded function to send the metadata of the newly placed block to the create TileEntity class, but now the block isn't rendering. It has the correct metadata and seems to be receiving it correctly, I've checked by using System outs, here's the code: The problem seems to be that the renderer isn't running through, if I put a system out in the renderer nothing prints to the console, I'm just left with invisible blocks. Here's the renderer:
  6. So in the Block file I now have this: Then instead of using the creatTileentity method I put this inside the onBlockAdded: Though now when I go into the game the block still places (I can see the bounding lines around the cube), but there is no model rendered. So it doesn't seem to be picking a tileentity in my if statement. Help I'm lost lol. Edit: So my issue (after using the system.out) seems to be in the createTileEntity method. I'm not sure how to pass the metadata into that method so I can then do an if statement to choose which rendering to use depending on the metadata. Thanks for any help.
  7. Instead of trying to change the renderer to choose a certain model and texture depending on metadata, would it be easier to get the Block file to choose a different TileEntityRenderer depending on the meta data?
  8. Ok, I've got myself stuck any guidance would be appreciated. So I added this in the renderer to get the meta data, though I don't think this is right lol. Then I made this function in the block file to set block meta data, I think.
  9. Thanks a bunch Robustus for that I've started implementing that way of doing it, I will report my progress lol. Also thanks Draco for pointing me at Buildcraft source code that has been a huge help. Hopefully get this cracked after work!
  10. Haven't had any luck with trying a few bits out. I've been pouring over the redstone block files and render files to try and see how it decides on what textures, but in the end ths wasn't that helpful as I want to use a different Block model all together. Any help on how to check surrounding blocks and then place the relevant block model would be appreciated.
  11. Ok so I'm not having any luck with these addition, can't think what I need to add. I've been looking at the redstone block to try and use similar code it uses to change texture, but it doesn't seem to transfer across. I think it is because I'm using a full model as opposed to just a texture. Anymore guidance would be appreciated.
  12. Ok, but I want it to find and generate corner pieces. At the moment all that is placed in the world is straight pieces, the code doesn't seem to change them to the corner pieces. It almost seems to either disregard the code or using setBlockId isn't the right function, maybe? Thanks for trying to help.
  13. With the risk of me not seeing how the previous post was the most helpful post ever could someone please elaborate. I'm staring at this if statement trying to see the issue. It always displays the straight pipe even though my if statement says if these to conditions are there then lay a different block ID.
  14. I'm trying to make a water pipe system that works like redstone. This is my first project, it has already helped me learn so much, but now I'm a bit stuck. I would like the Pipe block to change model depending on the blocks surrounding it. So if there is a block above the new block and to the right of the new block then it should place a corner pipe, or if there is a block above, below and to the side or both sides lay a junction type pipe block. I have made the corner model and it works in the game, I just can't get the logic to make it change block model. Here's the code I've written to try and do it. If more code is needed I can post more.
×
×
  • Create New...

Important Information

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