Jump to content

Recommended Posts

Posted

Hey guys I'm just wondering if it was possible to set two block ids for one block or make the block indestructible once the block has been activated.

 

For example when my block is placed on the ground I want it to be able to be broken but once its been activated the block generates a structure and is placed at the top of the structure and made indestructible so the player can't cheat and make multiple structures using one block.

Posted

Hey guys I'm just wondering if it was possible to set two block ids for one block or make the block indestructible once the block has been activated.

 

For example when my block is placed on the ground I want it to be able to be broken but once its been activated the block generates a structure and is placed at the top of the structure and made indestructible so the player can't cheat and make multiple structures using one block.

Different metadata can have different hardness, so just change the metadata.

Posted

Note that setting hardness level to -1 renders the block indestructible.

 

OR

 

Use function provided by Forge Block.setBlockUnbreakable() (which does exactly the same as the first option but looks and reads nicer.

Posted

Use function provided by Forge Block.setBlockUnbreakable() (which does exactly the same as the first option but looks and reads nicer.

That however will do it for the entire block, not per metadata, unless a new override was added (not last I noticed?).

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.