Fish entities cant swim in custom fluids of Water category.

Started by Moldyfishy on

Topic category: Troubleshooting, bugs, and solutions

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Fish entities cant swim in custom fluids of Water category.

Im making a custom Titanian Fish That will spawn in the Methane Seas Of Titan. Which are custom fluids. I set up the entity properly and tested it on normal vanilla water and it swam greatly, but it doesnt work on the modded fluid. Vanilla fish also cant swim in it and they jsut drown a little after. What do i have to do to fix it?

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey there, I do not know if…
Wed, 02/05/2025 - 18:16

Hey there, I do not know if you still need help with this, but to help anyway.

You can simply add a procedure to the fish entity tick event that when inside the custom fluid (Methane), will reset oxygen levels to max for the creature.

 

Should be a little something like:

if get block at [x] [y] [z] = ["yourfluid"]
	set oxygen of [event target entity] to [#]

"Oxygen reset procedure"

 

Also another thing to note, if your fish entity is taller/larger than one block, you are going to want to modify it to be something similar to:

if get block at [x] [y + #(extra height in blocks, usually do this if it is taller than one)] [z] = ["yourfluid"]

The reason this works is we are "replenishing" the fish entity's oxygen every tick it is in the custom fluid, making it seem more like it actually breathes it.

 

Now for the other part I noticed, if the entity cannot swim, you could make it a flying entity, and add the condition:

if get block at [x] [y] [z] = ["yourfluid"]
	return true
return false

Add this to the flying condition.

Then add:

if [and output 1]: [not] get block at [x] [y] [z] = ["yourfluid"]
[and output 2]: get block at [x] [y - 1] [z] = ["minecraft:air"]
	vector velocity [x] [0] [y] [-1] [z] [0] (I don't remember the name of the code block, but it is a velocity vector thing)

to the tick event procedure.
What this is doing is moving the now flying entity downwards if it is not within your custom fluid.

 

This is definitely a band-aid solution, and there will be bugs and problems, meaning tweaking it will be necessary.

I hope this helps with your issues, if you ever need more help, I am willing to help you out.

I would also like to ask you are more specific in certain things, as it took a bit to figure out what you meant here.

Other than that, I'm done here for now.

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if [and output 1]: [not] get…
Wed, 02/05/2025 - 20:53
if [and output 1]: [not] get block at [x] [y] [z] = ["yourfluid"]
[and output 2]: get block at [x] [y - 1] [z] = ["minecraft:air"]
	vector velocity [x] [0] [y] [-1] [z] [0] (I don't remember the name of the code block, but it is a velocity vector thing)

Realistically, I keep making mistakes on this one section.

Here's what it really should be:

if [and output 1]: get block at [x] [y] [z] = ["minecraft:air"]
[and output 2]: [or output 1]: get block at [x] [y - 1] [z] = ["minecraft:air"]
[or output 2]: get block at [x] [y - 1] [z] = ["yourfluid"]
	vector velocity x [0] y [-1] z [0] (haven't checked block name)

Quick summary here, checks if the current block the entity is currently in is air, and if the block below it is air or your custom fluid, because we want the entity to fall and not just be a flying fish.

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i think i saw u comment on…
Wed, 02/05/2025 - 21:45

i think i saw u comment on my Space Mod. Also thank u for this suggestion originally i had made it so the custom fish can dash around and that worked

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes, I was the person that…
Wed, 02/05/2025 - 22:39

Yes, I was the person that suggested space stations. I am still (somewhat) actively working on mods. My main project being Volcanism right now.

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Well actually the 1.1.8…
Wed, 02/05/2025 - 22:44

Well actually the 1.1.8 update is Space Stations!

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I may make a space mod…
Wed, 02/05/2025 - 22:58

I may make a space mod..

Honestly, I need to do more research to finish Volcanism, then I can work on a space mod.

Don't worry, because if I do, mine won't be too similar to yours (and others), and will be more of a KSP/AR type mod, with deep space exploration mechanics, and maybe similar things to F:SA/F:SEM..

Also, you do a good job at making mods, you seem organized in what you are doing.

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
We need more high quality…
Wed, 02/05/2025 - 23:01

We need more high quality space mods tbh.
Also thanks for saying it wont be like mine also what are those that you mentioned?
Thanks i rly am organized more than i was before in mod making ig that worked cuz i got MOTW :D

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can check the links…
Wed, 02/05/2025 - 23:13

You can check the links.

Here's what they are:

KSP -> Kerbal Space Program

AR -> Advanced Rocketry

F:SA -> Factorio: Space Age

F:SEM -> Factorio: Space Exploration Mod

 

I do agree on the high quality space mods. I don't really like mods that are too similar to Galacticraft too much, but I guess Advanced Rocketry has changed my view on what a "quality space mod is"... You should definitely keep going, until I somehow figure out turning a set of blocks into a movable vehicle, Volcanism will be on hold for now...

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Does your Volcanism mod…
Wed, 02/05/2025 - 23:23

Does your Volcanism mod travel to another dimension where u are in the inner Earth and perhaps mine for Ores?

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No, it's based on Volcanoids…
Wed, 02/05/2025 - 23:36

No, it's based on Volcanoids... You can check out the current version here, I'm just trying to overhaul it right now.

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
U can maybe use the Create…
Wed, 02/05/2025 - 23:56

U can maybe use the Create API to make vehicles?

Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't want any required…
Thu, 02/06/2025 - 02:13

I don't want any required mods.

I actually started working on my own system for controlling vehicles.