Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

doku

Members
  • Posts

    8
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

doku's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Thanks, I will take a look at the event. I potentially have another way of achieving what I'm trying to do but I have one issue. How do I reference 'the world' in a Block class? I'm trying to retrieve the chunk in which a block exists using this line : @Override public int getBlockTexture(IBlockAccess iBlock, int x, int y, int z, int side) { Chunk chunk = Chunk.worldObj.getChunkFromBlockCoords(x,z); However 'Chunk.worldObj' throws up the error “Cannot make a static reference to the non-static field Chunk.worldObj” Suggestions?
  2. I'm using metadata to give grass blocks a random texture index. So far I've managed to get this working using 'onBlockAdded'. However I would need the metadata value to be given to existing blocks in the world ( when world is loaded?) , not just ones that are added. How would I go about doing this, or is there another approach I can take?
  3. Something that just popped into my head that would also like to know - if my mod replaces vanilla block with a custom one ( via chunk generation for example ), what happens when the mod is unloaded? do any maps generated with the mod enabled no longer work correctly??
  4. Ok, so I've explored further and I'm not entirely sure the tile entity is appropriate. I should of explained a bit more of what I'm trying to do : The blocks I'm trying to give random textures to are the ones that make up the world already, not a block I'm adding to the world. For example I would like to have multiple texture indexes ( randomised ) for the top face of the grass block. 'onBlockPlacedBy' only seems to be called when actually putting a new block into the world, I need to modify blocks that already exist. Due to the number of grass blocks I have the feeling that making them all tile entities will be an excessive cost.
  5. Perfect, many thanks. I feel like a door has been opened
  6. Great, you are being very helpful thanks. If you don't mind could you expand a bit on 'onBlockPlacedBy() function and saving it in a tile entity'. I literally started with forge a couple of days ago and have little knowledge ( growing steadily ) on where and how to implement certain functions.
  7. Thanks for the quick reply. I will have a look at implementing this. One question though, why does it use playerAngle to determine a direction? isn't the playerAngle always changing as the player moves? or am I missunderstanding what it is? Also do you have any ideas for the other questions from OP? Thanks.
  8. Hi gents / ladies, I'm trying to expand my minecraft editting capabilities from just texturing so I've started tinkering around with forge. I've managed to get some of what I want working but I have 3 questions and would be grateful if anyone could provide answers. 1. How do you override the default blocks to use a custom one. e.g blockgrass becomes doku_grass when mod is running. ( currently I'm replacing the block declaration in Block.java but would like to not modify existing code if possible ) 2. How do you ( can you? ) rotate a texture index for the side of a block by say 90degrees. 3. How do you randomise a texture index for a block side. - When I tried this it initially worked, however everytime any block in the current chunk was modified the randomisation was re-applied which obviously is crap . Thanks in advance doku.
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.