Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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/

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

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.

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.

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...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.