June 11, 201411 yr I think you may be making this harder on yourself. All you need is an invisible block to occupy the block position above the block. We already went through this idea -- the problem is that would block all entities, including players. He wants to only block certain mobs from crossing. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
June 11, 201411 yr jabelar, I think this 'addCollisionBoxesToList' might change that. I've never looked into it before. Have you? I did a quick call Heirarchy search and it might actually work. It won't work for preventing a mob from walking over a block. It does look like it could prevent a mob from walking through a certain type of block. Long time Bukkit & Forge Programmer Happy to try and help
June 13, 201411 yr I think you may be making this harder on yourself. All you need is an invisible block to occupy the block position above the block. We already went through this idea -- the problem is that would block all entities, including players. He wants to only block certain mobs from crossing. Overriding the addCollisionBoxToList will allow you to selectively block things. Look at the code I posted. Also, the vanilla Pathfinding will path around the invisible blocks, as they are stacked 2 high, as well. The only real caveat is if you bury the block, in a hole, the mob could walk over the invisible blocks, but i would call that user error, as they aren't using the block right. You could even add a simple check for such a thing to prevent placing if their is no block 3 blocks above where it is placed or something.
June 13, 201411 yr I think you may be making this harder on yourself. All you need is an invisible block to occupy the block position above the block. We already went through this idea -- the problem is that would block all entities, including players. He wants to only block certain mobs from crossing. Overriding the addCollisionBoxToList will allow you to selectively block things. Look at the code I posted. Also, the vanilla Pathfinding will path around the invisible blocks, as they are stacked 2 high, as well. The only real caveat is if you bury the block, in a hole, the mob could walk over the invisible blocks, but i would call that user error, as they aren't using the block right. You could even add a simple check for such a thing to prevent placing if their is no block 3 blocks above where it is placed or something. Okay, after looking into it I agree. In your original post you should have pointed out what you were really suggesting -- you made it sound like you were simply putting invisible blocks above. The trick is that these have dynamic bounding boxes. Very cool trick. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
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.