Ivan-Khar / CaracalMob

Mod that adds Caracals to the game
Other
13 stars 3 forks source link

NoSuchFieldError in CaracalSitOnBlockGoal Line 46 #10

Closed Kodikuu closed 2 years ago

Kodikuu commented 2 years ago

https://github.com/AquUpd/CaracalMob/blob/3f874eca38d5953e3a075314bc9d4775b120f84f/src/main/java/com/aqupd/caracal/ai/CaracalSitOnBlockGoal.java#L46

Crash in All of Fabric 5 (1.18.1) upon making a tamed Caracal get up.

java.lang.NoSuchFieldError: field_16443
    at com.aqupd.caracal.ai.CaracalSitOnBlockGoal.isTargetPos(CaracalSitOnBlockGoal.java:46)
    at net.minecraft.entity.ai.goal.MoveToTargetPosGoal.findTargetPos(MoveToTargetPosGoal:119)
    at net.minecraft.entity.ai.goal.MoveToTargetPosGoal.canStart(MoveToTargetPosGoal:47)
    at com.aqupd.caracal.ai.CaracalSitOnBlockGoal.canStart(CaracalSitOnBlockGoal.java:23)
    at net.minecraft.entity.ai.goal.PrioritizedGoal.canStart(PrioritizedGoal:22)
    at net.minecraft.entity.ai.goal.GoalSelector.tick(GoalSelector:98)
    at net.minecraft.entity.mob.MobEntity.tickNewAi(MobEntity:741)
    at net.minecraft.entity.LivingEntity.tickMovement(LivingEntity:2604)
    at net.minecraft.entity.mob.MobEntity.tickMovement(MobEntity:545)
    at net.minecraft.entity.passive.PassiveEntity.tickMovement(PassiveEntity:127)
    at net.minecraft.entity.passive.AnimalEntity.tickMovement(AnimalEntity:58)
    at net.minecraft.entity.LivingEntity.tick(LivingEntity:2349)
    at net.minecraft.entity.mob.MobEntity.tick(MobEntity:345)
    at net.minecraft.server.world.ServerWorld.tickEntity(ServerWorld:699)
    at net.minecraft.world.World.tickEntity(World:487)
    at net.minecraft.server.world.ServerWorld.method_31420(ServerWorld:360)
    at net.minecraft.world.EntityList.forEach(EntityList:54)
    at net.minecraft.server.world.ServerWorld.tick(ServerWorld:328)
    at net.minecraft.server.MinecraftServer.tickWorlds(MinecraftServer:879)
    at net.minecraft.server.dedicated.MinecraftDedicatedServer.tickWorlds(MinecraftDedicatedServer:324)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer:823)
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer:684)
    at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer:270)
    at java.lang.Thread.run(Thread.java:833)

All of Fabric 5 - 1.1.1 Caracal mod version 1.18-1.3.7.1 Fabric 0.13.3 Java 17

Ivan-Khar commented 2 years ago

Thanks! I'll look into this

Kodikuu commented 2 years ago

I should probably also note that it was in the middle of an active base, with various tech mods' blocks around for it attempt to look at.

Ivan-Khar commented 2 years ago

I think I know why is it crashing. I'll fix it tomorrow because it's 11pm for me right now

Ivan-Khar commented 2 years ago

For a quick fix you can install older version that works fine https://www.curseforge.com/minecraft/mc-mods/caracal-mod/files/3580009

Kodikuu commented 2 years ago

The problematic code is older than the oldest version for 1.18.1, so unfortunately that won't work. We already just removed the mod to get the server back (it'd crash the moment the Caracal's chunk loaded), I just wanted to let you know about the issue

Ivan-Khar commented 2 years ago

Okay, thanks!

Ivan-Khar commented 2 years ago

Fixed in 1.3.8 version