Jump to content

Keter

Members
  • Posts

    1
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Keter's Achievements

Tree Puncher

Tree Puncher (2/8)

-1

Reputation

  1. So, I'm using the Event PlayerEvent.HarvestCheck and I'm trying to make the harvested block explode in the player's face. Don't ask why. However, I've run into a bit of a problem. There doesn't seem to be any way whatsoever to actually get the location of a block (to make an explosion) with nothing but the block object itself. Entities have static variables that are very easy to use to get an explosion, but I want the explosion to actually originate from the block itself. @ForgeSubscribe public void blockHarvested(PlayerEvent.HarvestCheck event) { event.entityPlayer.worldObj.createExplosion((Entity)null, event.block.posX., event.block.posY, event.block.posZ, 4.0F, true); } Yep, that's all I have. Obviously it doesnt work - the Block class doesn't have posX, or posY, or posZ. Anyone have any clue how this could be accomplished?
×
×
  • Create New...

Important Information

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