Jump to content

[1.7.2] Moved By piston detection?


Electrobob99

Recommended Posts

Basically What I ask is it possible to detect whether a block is moved by pistons, because currently I'm using breakBlock to make it drop and place a block when destroyed, and it sadly keeps activating the this with the piston movement.

Member of Aerotech Networks, a Multi-Gaming server.

Also Currently porting the "Rise of the Automatons" minecraft mod

Link to comment
Share on other sites

Hi

 

The piston will break your block if it's made of the wrong material - perhaps that is the problem.  Look at Block.getMobilityFlag() for clues.

 

If no joy with that, try looking in BlockPistonBase.tryExtend() to get a better idea of what is happening; perhaps this line

 

                    block.dropBlockAsItemWithChance(p_150079_1_, i1, j1, k1, p_150079_1_.getBlockMetadata(i1, j1, k1), chance, 0);

 

-TGG

 

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.