sachingorkar102 / Tweakin

29 stars 17 forks source link

BUG: Animals do not flee, Console Error #20

Closed Brickgard closed 3 years ago

Brickgard commented 3 years ago

Animals do not flee when the Tweak is enabled. When they should flee, this console error appears:


[21:26:00 INFO]:  > java.lang.NullPointerException: Cannot invoke "net.minecraft.world.entity.Entity.getPositionVector()" because "entity" is null
[21:26:00 INFO]:  >     at net.minecraft.world.entity.Entity.distanceToSqr(Entity.java:1811) ~[patched_1.17.1.jar:git-Purpur-1329]
[21:26:00 INFO]:  >     at net.minecraft.world.entity.ai.goal.AvoidEntityGoal.tick(AvoidEntityGoal.java:88) ~[app:?]
[21:26:00 INFO]:  >     at net.minecraft.world.entity.ai.goal.WrappedGoal.tick(WrappedGoal.java:53) ~[app:?]
[21:26:00 INFO]:  >     at net.minecraft.world.entity.ai.goal.GoalSelector.tick(GoalSelector.java:151) ~[app:?]
[21:26:00 INFO]:  >     at net.minecraft.world.entity.Mob.serverAiStep(Mob.java:881) ~[app:?]
[21:26:00 INFO]:  >     at net.minecraft.world.entity.LivingEntity.aiStep(LivingEntity.java:3221) ~[app:?]
[21:26:00 INFO]:  >     at net.minecraft.world.entity.Mob.aiStep(Mob.java:662) ~[app:?]
[21:26:00 INFO]:  >     at net.minecraft.world.entity.AgeableMob.aiStep(AgeableMob.java:154) ~[app:?]
[21:26:00 INFO]:  >     at net.minecraft.world.entity.animal.Animal.aiStep(Animal.java:60) ~[app:?]
[21:26:00 INFO]:  >     at net.minecraft.world.entity.animal.Chicken.aiStep(Chicken.java:117) ~[app:?]
[21:26:00 INFO]:  >     at net.minecraft.world.entity.LivingEntity.tick(LivingEntity.java:2947) ~[app:?]
[21:26:00 INFO]:  >     at net.minecraft.world.entity.Mob.tick(Mob.java:424) ~[app:?]
[21:26:00 INFO]:  >     at net.minecraft.server.level.ServerLevel.tickNonPassenger(ServerLevel.java:1186) ~[app:?]
[21:26:00 INFO]:  >     at net.minecraft.world.level.Level.guardEntityTick(Level.java:1034) ~[app:?]
[21:26:00 INFO]:  >     at net.minecraft.server.level.ServerLevel.lambda$tick$7(ServerLevel.java:803) ~[app:?]
[21:26:00 INFO]:  >     at net.minecraft.world.level.entity.EntityTickList.forEach(EntityTickList.java:43) ~[patched_1.17.1.jar:git-Purpur-1329]
[21:26:00 INFO]:  >     at net.minecraft.server.level.ServerLevel.tick(ServerLevel.java:784) ~[app:?]
[21:26:01 INFO]:  >     at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1629) ~[patched_1.17.1.jar:git-Purpur-1329]
[21:26:01 INFO]:  >     at net.minecraft.server.dedicated.DedicatedServer.tickChildren(DedicatedServer.java:492) ~[patched_1.17.1.jar:git-Purpur-1329]
[21:26:01 INFO]:  >     at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1480) ~[patched_1.17.1.jar:git-Purpur-1329]
[21:26:01 INFO]:  >     at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1270) ~[patched_1.17.1.jar:git-Purpur-1329]
[21:26:01 INFO]:  >     at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[patched_1.17.1.jar:git-Purpur-1329]
[21:26:01 INFO]:  >     at java.lang.Thread.run(Thread.java:831) [?:?]```
Brickgard commented 3 years ago

No more error as of latest version, but not seeing any effects of the Tweak in-game either.

sachingorkar102 commented 3 years ago

Be in survival You should NOT have tweakin.fleemobs.bypass permission

Brickgard commented 3 years ago

Here's what I've checked so far: Config Section:

animal-flee:
  enabled: true
  black-list-worlds: []
  ignore-breeded: false
  cooldown: 76
  sprint-speed: 1.7
  fleeable-mobs:
  - 'COW'
  - 'MUSHROOM_COW'
  - 'SHEEP'
  - 'PIG'
  - 'CHICKEN'
  - 'GOAT'

Tested with users that have tweakin.fleemobs.bypass permission undefined, and have it expressly disabled. All testing users are in Survival. All testing users have relogged several times, especially after permission changes or server restarts with such settings.

The hit animal flees like in vanilla, but no other mobs respond in any visible way.

sachingorkar102 commented 3 years ago

Uhm i will see whats up with it tmr Can i join the server for testing purposes if you dont mind?

Brickgard commented 3 years ago

Much appreciated! Of course, let me know if there's other stuff that I should test to help out or investigate it.

sachingorkar102 commented 3 years ago

Can i join the server for testing purposes if you dont mind?

Brickgard commented 3 years ago

I don't mind, I'll try to get it open publicly as soon as I can.

sachingorkar102 commented 3 years ago

Oh private message me on spigot site if you dont have a discord

Brickgard commented 3 years ago

I have a Discord; you can DM me at Brickgard#0427