Posted October 1, 20204 yr I'm a beginner on modding and I created a entity named Fishy but when I spawn it, it stop and dies drowned, what should I add to my code to make it breath underwater and swim? Entity class: https://pastebin.com/MP9usA3m
October 1, 20204 yr You have to override canBreatheUnderwater and make it return true always. Anyway if you are making a fish like entity, why not taking a look at how vanilla implements water mobs? You can find useful information in the classes: AbstractFishEntity, WaterMobEntity and GuardianEntity Check out the port of the BetterEnd fabric mod (WIP): https://www.curseforge.com/minecraft/mc-mods/betterend-forge-port
October 1, 20204 yr Author 3 hours ago, Beethoven92 said: You have to override canBreatheUnderwater and make it return true always. Anyway if you are making a fish like entity, why not taking a look at how vanilla implements water mobs? You can find useful information in the classes: AbstractFishEntity, WaterMobEntity and GuardianEntity Thank you!
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.