Jump to content

Targeting blocks for destruction.


Oninaig

Recommended Posts

I am currently working on a block that will act as a quarry. However, I am currently stuck on how to actually target a specific block in the world for destruction. I have tried world.setBlockWithNotify(x,y,z,0) but after the blocks were destroyed I could not run into the area as I kept hitting an invisible wall of blocks (the new 'air' blocks i guess?).

 

Any ideas?

Link to comment
Share on other sites

Look at buildcraft, it is open source you know

 

 

I have looked at buildcraft and he too uses setBlockwithNotify to replace blocks with air blocks once they are mined. My issue is that when I do the same thing the blocks do get replaced but I cant walk into the new 'air' blocks without being pushed back away from them as if they are still solid blocks.

Link to comment
Share on other sites

Rather than replacing the blocks with air, make a small explosion that's 1 block big and won't spawn any particle effects. It's something like

Explosion exp = new Explosion()

exp.doExplosionB(true)

//exp.doExplosionA;

or you could try World.spawnExplosion()

That should break the blocks properly

:)

"you seem to be THE best modder I've seen imo."

~spynathan

 

ლ(́◉◞౪◟◉‵ლ

Link to comment
Share on other sites

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.