@@ -275,7 +275,7 @@ class EnterHiveGoal extends Goal {
275275 public boolean canStart () {
276276 if (
277277 SilkMoth .this .hivePos != null && SilkMoth .this .canEnterHive ()
278- && SilkMoth .this .hivePos .isWithinDistance (SilkMoth .this .getPos (), 2.0 )
278+ && SilkMoth .this .hivePos .isWithinDistance (SilkMoth .this .getEntityPos (), 2.0 )
279279 ) {
280280 SilkMothNestEntity nest = SilkMoth .this .getHive ();
281281 if (nest != null && nest .getOccupancy () < SilkMothNestEntity .MAX_MOTH_COUNT ) {
@@ -380,8 +380,8 @@ public void tick() {
380380 if (this .ticks > this .getTickCount (MIN_TICKS_BETWEEN_ENTERING_HIVE )) {
381381 this .makeChosenHivePossibleHive ();
382382 } else if (!SilkMoth .this .navigation .isFollowingPath ()) {
383- if (!SilkMoth .this .hivePos .isWithinDistance (SilkMoth .this .getPos (), 16 )) {
384- if (!SilkMoth .this .hivePos .isWithinDistance (SilkMoth .this .getPos (),
383+ if (!SilkMoth .this .hivePos .isWithinDistance (SilkMoth .this .getEntityPos (), 16 )) {
384+ if (!SilkMoth .this .hivePos .isWithinDistance (SilkMoth .this .getEntityPos (),
385385 MAX_DISTANCE_FROM_HIVE )) {
386386 SilkMoth .this .clearHivePos ();
387387 } else {
@@ -408,7 +408,7 @@ public void tick() {
408408 }
409409
410410 private boolean startMovingToFar (BlockPos pos ) {
411- int i = pos .isWithinDistance (SilkMoth .this .getPos (), 3 ) ? 1 : 2 ;
411+ int i = pos .isWithinDistance (SilkMoth .this .getEntityPos (), 3 ) ? 1 : 2 ;
412412 SilkMoth .this .navigation .setRangeMultiplier (10.0F );
413413 SilkMoth .this .navigation .startMovingTo (pos .getX (), pos .getY (), pos .getZ (), i , 1.0 );
414414 return SilkMoth .this .navigation .getCurrentPath () != null
@@ -542,7 +542,7 @@ private Vec3d getRandomLocation() {
542542 if (SilkMoth .this .getHive () != null && SilkMoth .this .hivePos .isWithinDistance (
543543 SilkMoth .this .getBlockPos (), this .getMaxWanderDistance ())) {
544544 Vec3d vec3d = Vec3d .ofCenter (SilkMoth .this .hivePos );
545- vec3d2 = vec3d .subtract (SilkMoth .this .getPos ()).normalize ();
545+ vec3d2 = vec3d .subtract (SilkMoth .this .getEntityPos ()).normalize ();
546546 } else {
547547 vec3d2 = SilkMoth .this .getRotationVec (0.0F );
548548 }
0 commit comments