Jump to content

TheTrollingTrollguy

Forge Modder
  • Posts

    64
  • Joined

  • Last visited

Everything posted by TheTrollingTrollguy

  1. oh, I didn't know that tutorial was there, I'll play with it later because I thought that somebody will reply on this most later... thanks anyways!
  2. Hey guys! Does anyone know how to make my mod load a block ID from a .txt file?
  3. you should override the onBlockPlacedBy method in this method you can get the block ID and the metadata so it would look like this: @Override public void onBlockPlacedBy(World world, int X, int Y, int Z, EntityLivingBase entityLivingBase, ItemStack itemStack) { int metadata = world.getBlockMetadata(X, Y, Z); int playerDirection = MathHelper.floor_double((double)((entityLivingBase.rotationYaw * 4F) / 360F) + 0.5D) & 3; if(metadata == 0) { switch(playerDirection) { // then you put here what metadata will be placed based on where you're pointing at like this case 0: metadata = 2; break; } } world.setBlock(X, Y, Z, blockID, metadata, 2); }
  4. I tried, but it doesn't work. Mybe I should put it in another function's body?
  5. I know that, I just asked that because I thought that he didn't write something at the end of his post. That's all. I have patience.
  6. yes, I am able to figure the half directions, but can you please paste an example code, beacuse I get stuck with some parts...
  7. Hey guys. It's me. Again! Last time I asked for help, I didn't get any help, so once again. I need to make a function that will check where the player is pointing at(south, Southeast, east and so on...) and to check which metadata of the block is placed. I can't explain so well with what do I need help. So here is the thing for one block: first and the second metadata of blocks are regular blocks. They have no special things. So the third metadata has an arrow texture on top of it pointing at north, the fourth should be pointing at Northwest and so on. I have made all these textures. So if the player places the block with the third metadata while his pointing at west, the metadata placed on the world will be fifth one or number 4. Can you help me guys, please! If you don't understand what I just have written then I'll explain it again.
  8. Hey guys! Does anybody know how to make a block fuction that cheks where the player is pointing at and based on that it places a block with different metadata. Example: if the player is facing south and has clicked to place a block with metadata 0, the metadata placed will be 2. Please help!
×
×
  • Create New...

Important Information

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