Jump to content

TheOther

Members
  • Posts

    4
  • Joined

  • Last visited

Converted

  • Gender
    Male
  • Personal Text
    Creator of Project Aurora

TheOther's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Okay, so it appears that event.blockMetadata always is 0, so I found a better way, event.world.getBlockMetadata(event.x, event.y, event.z) . However, in the console, the event fires twice for each block, initially getting the metadata correct, but then firing the event with a metadata of 0 as well, which makes a different liquid. How would I get around this?
  2. Wouldn't 32bit make your game even slower?
  3. You're kind of right. My console messages print whenever any block is placed, not just tin, and they always print a metadata of 0. But thanks for the heads up, I'll change my code.
  4. I have some code that turns metal blocks into fluids in a custom dimension, and while testing it against some blocks that are only metal via metadata, it only spawned the fluid which was for the metadata of 0. After debugging a little, I found that the metadata of the block placed is always zero, regardless of the block. I was wondering how to fix this. Code: if(OreDictionary.doesOreNameExist("blockTin")) { for(ItemStack ore : OreDictionary.getOres("blockTin")) { if(ore != null) { if(event.block == Block.getBlockFromItem(ore.getItem()) && event.blockMetadata == ore.getItemDamage()) { System.out.println("block=" + Block.getBlockFromItem(ore.getItem()) + ", meta=" + ore.getItemDamage()); System.out.println("event.block=" + event.block + ", event.meta=" + event.blockMetadata); if(FluidRegistry.getFluid("tin.molten") != null) { event.world.setBlock(event.x, event.y, event.z, FluidRegistry.getFluid("tin.molten").getBlock()); } else { event.world.setBlock(event.x, event.y, event.z, Blocks.lava); } } } } }
×
×
  • Create New...

Important Information

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