Water mob swimming faster

Started by Skart2000 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Water mob swimming faster

I made a water mob but I have a problem: It swims so slowly. I've tried making it swim faster but its speed doesn't seem to change in water. How do I change it?

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
For whatever reason,…
Mon, 06/12/2023 - 19:14

For whatever reason, MCreator doesn't allow you to change swim speed when you create an entity; however, there are separate "MOVEMENT_SPEED" and "SWIM_SPEED" values in the entity's code, if they are considered a water entity.

You just need to open up your entity's .java class in the code editor, change the value, and save and lock the code.

An alternative would be giving your entity the dolphin's grace status effect, but you may or may not like how its movement changes and kind of 'slides around' with the effect.

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
did you try that? because i…
Sat, 11/18/2023 - 01:17

did you try that? because i did on 2020 did not worked.. i will try now since now on 2023 the dolphin grace also is not working too so idk...

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ok so the swim speed works…
Sat, 11/18/2023 - 01:29

ok so the swim speed works now :) we dont need dolphin grace schnelligans anymore

change here on the code:

 

public static AttributeSupplier.Builder createAttributes() {
		AttributeSupplier.Builder builder = Mob.createMobAttributes();
		builder = builder.add(Attributes.MOVEMENT_SPEED, 0.3);
		builder = builder.add(Attributes.MAX_HEALTH, 40);
		builder = builder.add(Attributes.ARMOR, 0);
		builder = builder.add(Attributes.ATTACK_DAMAGE, 3);
		builder = builder.add(Attributes.FOLLOW_RANGE, 16);
		builder = builder.add(ForgeMod.SWIM_SPEED.get(), 1);
// <--- change swim speed here
		return builder;
	}