[Solved] Make a fish mob flop on land

Started by Rebuilt on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Solved] Make a fish mob flop on land
Sun, 03/01/2026 - 00:20 (edited)

I have seen the other forum post about this same idea and have created my own procedure for this. However, I was wondering if there was a way to do this via mixins. I've never used them but I wanted to know if it was possible to make my custom fish more akin to the vanilla fish and less buggy.

Edited by Rebuilt on Sun, 03/01/2026 - 00:20
Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Alright I have fixed my…
Sun, 03/01/2026 - 00:52

Alright I have fixed my issue. I have made a procedure that makes it so that custom modded fish flop on land :D

READ EVERYTHING BEFORE STARTING! it is important that you understand what is going on

Example below:

(On Entity Tick Update)
IF:
is <event/target entity> tagged in entity tags as <oceanica:flop_on_land>
and not is <get block at x:x y:y z:z> tagged in block tags as <oceanica:water/waterlogged>
and is <event/target entity> on ground
DO:
play sound <entity.cod.flop> at x:x y:y z:z level:1 pitch:1 category:<neutral>
wait <1> ticks then on server-side:
IF:
is <event/target entity> tagged in entity tags as <oceanica:flop_on_land>
and not is <get block at x:x y:y z:z> tagged in block tags as <oceanica:water/waterlogged>
and is <event/target entity> on ground
DO:
Attempt to override motion vector of <event/target entity>:
to vx: random integer between min: <-1> max: <1> included / <20>
vy: Y delta movement of <event/target entity> + 0.4
vz: random integer between min: <-1> max: <1> included / <20>

Side note: set both IF:DO blocks to IF:DO:ELSE and leave the ELSE condition blank

Also, the <oceanica:flop_on_land> and <oceanica:water/waterlogged> are tags to ensure the mechanic works without making the code a huge line of blocks. <oceanica:flop_on_land> is a mob tag that lets me add more mobs to this easier though it can be swapped out with the is <event/target entity> (sub)type of <Entity> block. <oceanica:water/waterlogged> is a block tag to fix an issue with how some water type blocks in the game are handled by minecraft itself for example seagrass is not water or waterlogged, therefore, it is in this tag to make sure the custom fish don't freak out when colliding with it. This can be replaced with checking for the blocks you want with the string: is <get block at x:x y:y z:z> the same block as <ChosenBlock>