Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Cannot replace replaceable blocks unless they also have a ground cover material.


Recommended Posts

When overriding Block.isBlockReplaceable to return true, players can only replace the blocks if the block's material is also a "ground cover" material (currently snow, vine, water, lava or fire). The following change to Block.java fixes this: (line 888 in Forge 295)


     public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
         int var5 = par1World.getBlockId(par2, par3, par4);
-        return var5 == 0 || blocksList[var5].blockMaterial.isGroundCover();
+        return var5 == 0 || blocksList[var5].blockMaterial.isGroundCover() || blocksList[var5].isBlockReplaceable(par1World, par2, par3, par4);

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.

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.


  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.