Land and Water monster

Started by Alex_n_italy on Wed, 03/10/2021 - 10:13

Topic category: Help with modding (Java Edition)

Last seen on 14:58, 20. Mar 2022
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Land and Water monster
Wed, 03/10/2021 - 10:13

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

Last seen on 14:58, 20. Mar 2022
Joined Oct 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 20:44, 18. May 2022
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I also would like an answer…
Wed, 03/10/2021 - 19:56

I also would like an answer on this.

Last seen on 00:06, 28. May 2022
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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

Last seen on 19:53, 2. Jun 2021
Joined Sep 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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);
		}