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

Posted

I've struggled with this for way too long now, so I have decided to ask for some assistance here because there is almost no information about this online.

I made a hostile mob and I built it like this:

public static final Supplier<EntityType<Bunyip>> BUNYIP = ENTITY_TYPES.register("bunyip" , () -> EntityType.Builder. of(Bunyip::new, MobCategory.MONSTER).sized(3f, 2.5f).eyeHeight(1.75f).build("bunyip"));

However, I have discovered that a BoundingBox of 3 is too big for the vanilla pathfinding to work well. In fact, anything bigger than a block will not work well. This is especially noticeable when having it chase a player in a negative X and/or negative Z direction. The mob starts spinning, walking backwards, walking diagonally, etc.

I am using the Goal system:

protected void registerGoals() { super.registerGoals(); this.goalSelector.addGoal(1, new MeleeAttackGoal(this, 1.25, true)); this.targetSelector.addGoal(2, new NearestAttackableTargetGoal<>(this, Player.class, true, true)); }

This does not seem to be a me issue as the ravager, one of the biggest vanilla mobs, also struggles with proper pathfinding. I am a bit familiar with how Minecraft's pathfinding works, but not enough to make a pathfinding system from scratch (or at least not in a reasonable amount of time). Is there any way to fix this with some tweaks or will I have to make a custom pathfinding system?

Edited by VictorEvers

  • VictorEvers changed the title to Bad pathfinding for big mobs (1.21.1)

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.