Jump to content

How to detect when block is broken by explosion or moved by piston?


Recommended Posts

Posted

I think title says all I need to know.

I want to create mod that will create protection from tnt, creepers in some radius, So if I'd place lots of tnt around protected area it'd create a sphere. Afaik there is only an event detecting breaking block by player in forge api, thats quite disappointing.

Posted

Hi

 

I don't think this is so easy.  I can think of a few possibilities, none of them easy-

modify the Block class

modify the Explosion class

intercept World.createExplosion, World.newExplosion, to substitute a customised MyExplosion class;

modify the TNT and creeper entities

 

I reckon that probably means a core mod.

 

-TGG

 

 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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