Jump to content

Setting a Block to be Replaceable


Zetal

Recommended Posts

As you probably know, there are blocks in Minecraft such as fire, brush, and vines that can all be replaced simply by right-clicking with another block. I'm trying to create a block that replicates this, but I'm not quite sure where I'm going wrong.

 

My block is invisible and is basically meant to just 'not exist' as far as the player is concerned. It's a method of temporarily saving one type of blocks location when destroyed and maintaining a timer using Tile Entities. So, this block is a BlockContainer (since it has a tileentity) but besides that shares all of what I thought was relevant with BlockFire.

ie...

 

isOpaqueCube

isCollidable

renderAsNormalBlock

getCollisionBoundingBoxFromPool

 

Basically, I right click with a block and lose a block, but nothing happens. I right click again, and the block is placed, and I regain the block that I tried to place the first time. :/

Any ideas? Thanks!

 

I suppose I should note that this was working fine pre-1.5, so I'm not sure what the issue is.

Have a modding question? PM me and hopefully I'll be able to help. Good at 2d Pixel Art? We need your help!  http://www.minecraftforum.net/topic/1806355-looking-for-2d-pixel-artist/

Link to comment
Share on other sites

As you probably know, there are blocks in Minecraft such as fire, brush, and vines that can all be replaced simply by right-clicking with another block. I'm trying to create a block that replicates this, but I'm not quite sure where I'm going wrong.

 

My block is invisible and is basically meant to just 'not exist' as far as the player is concerned. It's a method of temporarily saving one type of blocks location when destroyed and maintaining a timer using Tile Entities. So, this block is a BlockContainer (since it has a tileentity) but besides that shares all of what I thought was relevant with BlockFire.

ie...

 

isOpaqueCube

isCollidable

renderAsNormalBlock

getCollisionBoundingBoxFromPool

 

Basically, I right click with a block and lose a block, but nothing happens. I right click again, and the block is placed, and I regain the block that I tried to place the first time. :/

Any ideas? Thanks!

 

I suppose I should note that this was working fine pre-1.5, so I'm not sure what the issue is.

Have a modding question? PM me and hopefully I'll be able to help. Good at 2d Pixel Art? We need your help!  http://www.minecraftforum.net/topic/1806355-looking-for-2d-pixel-artist/

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.