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

"How to make an aquatic mob in Forge 1.21.1"

Hi! I'm working on a custom turtle mob for my mod using Minecraft Forge 1.21.1, and I'm having some trouble with its swimming behavior.

I want the turtle to swim properly, like a real turtle — moving freely through water and avoiding the sea floor so it doesn’t get stuck between blocks. Right now, it either sinks too much, swims awkwardly, or keeps bumping into the bottom.

Any advice on how to handle pathfinding, movement control, or AI goals for aquatic mobs? Maybe examples from existing mods or vanilla code?

Thanks in advance!

You should be able to browse the Minecraft source through your IDE to look at existing vanilla mobs. Been a few since I've look at much MC, so not sure what mobs would be good examples, but I know they have at least fish lol. :)

For instance, in Eclipse, on the left side where it shows your source packages/files, there's a section for 'Referenced Libraries'. Expanding that, there's a list of jars that are used in the project. The project I'm looking at, there's one for "forge-1.20.4-49.0.38_mapped_parchment_2024.02.25-1.20.4-recomp.jar". Dropping that down shows a big list of packages, including the net.minecraft.* packages, and dropping those down show the classes included, which can be clicked on to view the source.

If you use IntelliJ, it's more or less the same thing, look around for the Referenced Libraries, and find the forge one, boom, Bob's your uncle. :)) 

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.