Land and Water monster

Started by Alex_n_italy on

Topic category: Help with Minecraft modding (Java Edition)

Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Land and Water monster

Ok so, how do i exactly make a mob capable of chasing the mob in and out of the water (a Land-Water creature hybrid, an Anthro-Shark basically)
This is driving me crazy

Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Please i need help Water…
Wed, 03/10/2021 - 11:13

Please i need help

Water entities moves a lot slow and if i give them doplhin grace they are faster than light (and sometimes doesn't even work)

And if i add the "enable walking" procedure they are both slow in water and doesn't move on land
just

i want to scream

Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
normally you can use a…
Fri, 04/02/2021 - 19:35

normally you can use a procedure to replace the water entity with the land entity when it is on blocks and vice versa

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
that would ruin the hole…
Sat, 05/22/2021 - 00:48

that would ruin the hole thing, the entity must be the same

Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
this is the part that…
Sat, 05/22/2021 - 02:29

this is the part that control movement on water, i guess something must be changed here to make it move on land too.. i tried some editing here but no luck

 

@Override
				public void tick() {
					if (CustomEntity.this.areEyesInFluid(FluidTags.WATER))
						CustomEntity.this.setMotion(CustomEntity.this.getMotion().add(0, 0.005, 0));
					if (this.action == MovementController.Action.MOVE_TO && !CustomEntity.this.getNavigator().noPath()) {
						double dx = this.posX - CustomEntity.this.getPosX();
						double dy = this.posY - CustomEntity.this.getPosY();
						double dz = this.posZ - CustomEntity.this.getPosZ();
						dy = dy / (double) MathHelper.sqrt(dx * dx + dy * dy + dz * dz);
						CustomEntity.this.rotationYaw = this.limitAngle(CustomEntity.this.rotationYaw,
								(float) (MathHelper.atan2(dz, dx) * (double) (180 / (float) Math.PI)) - 90, 90);
						CustomEntity.this.renderYawOffset = CustomEntity.this.rotationYaw;
						CustomEntity.this.setAIMoveSpeed(MathHelper.lerp(0.125f, CustomEntity.this.getAIMoveSpeed(),
								(float) (this.speed * CustomEntity.this.getAttributeValue(Attributes.MOVEMENT_SPEED))));
						CustomEntity.this.setMotion(CustomEntity.this.getMotion().add(0, CustomEntity.this.getAIMoveSpeed() * dy * 0.1, 0));
					} else {
						CustomEntity.this.setAIMoveSpeed(0);
					}
				}
			};
			this.navigator = new SwimmerPathNavigator(this, this.world);
		}

 

Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Have both wander around and…
Wed, 07/12/2023 - 11:17

Have both wander around and swim randomly in the ai goal.

Make sure it can breathe water

 

Create a new procedure:

-If is Event/Target Entity in water

-|do return true

-return false