Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.19.2 [EchoPet] Could not add PetGoals to Pet AI. #132

Closed
andrewkm opened this issue Aug 11, 2022 · 5 comments
Closed

1.19.2 [EchoPet] Could not add PetGoals to Pet AI. #132

andrewkm opened this issue Aug 11, 2022 · 5 comments

Comments

@andrewkm
Copy link
Contributor

Paper 1.19.2 Build 125
EchoPet compiled against: 1f5554c

https://pastebin.com/raw/4znarhud

@andrewkm
Copy link
Contributor Author

andrewkm commented Aug 11, 2022

So like... it seems followSpeedModifier: 1 wants followSpeedModifier: 1.0
Lol, fixed as such: https://i.imgur.com/A4XqGQ4.png

@mibby
Copy link

mibby commented Aug 13, 2022

Seconding.

[22:58:28] [Server thread/WARN]: [EchoPet] Could not add PetGoals to Pet AI.
java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Double (java.lang.Integer and java.lang.Double are in module java.base of loader 'bootstrap')
	at com.dsh105.echopet.compat.nms.v1_19_2.entity.ai.PetGoalFollowOwner.<init>(PetGoalFollowOwner.java:55) ~[EchoPet.jar:?]
	at com.dsh105.echopet.compat.nms.v1_19_2.entity.base.EntityPetHandle.setPathfinding(EntityPetHandle.java:100) ~[EchoPet.jar:?]
	at com.dsh105.echopet.compat.nms.v1_19_2.entity.base.EntityPetHandle.initiateEntityPet(EntityPetHandle.java:90) ~[EchoPet.jar:?]
	at com.dsh105.echopet.compat.nms.v1_19_2.entity.base.LivingEntityPetHandle.initiateEntityPet(LivingEntityPetHandle.java:54) ~[EchoPet.jar:?]
	at com.dsh105.echopet.compat.nms.v1_19_2.entity.base.EntityPetHandle.<init>(EntityPetHandle.java:58) ~[EchoPet.jar:?]
	at com.dsh105.echopet.compat.nms.v1_19_2.entity.base.LivingEntityPetHandle.<init>(LivingEntityPetHandle.java:44) ~[EchoPet.jar:?]
	at com.dsh105.echopet.compat.nms.v1_19_2.entity.base.EntityFrogPetHandle.<init>(EntityFrogPetHandle.java:32) ~[EchoPet.jar:?]
	at com.dsh105.echopet.compat.nms.v1_19_2.entity.type.EntityFrogPet.<init>(EntityFrogPet.java:67) ~[EchoPet.jar:?]
	at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67) ~[?:?]
	at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:483) ~[?:?]
	at com.dsh105.echopet.compat.api.registration.PetRegistrationEntry.createEntityPet(PetRegistrationEntry.java:96) ~[EchoPet.jar:?]
	at com.dsh105.echopet.compat.api.entity.PetType.getNewEntityPetInstance(PetType.java:247) ~[EchoPet.jar:?]
	at com.dsh105.echopet.compat.nms.v1_19_2.SpawnUtil.spawn(SpawnUtil.java:75) ~[EchoPet.jar:?]
	at com.dsh105.echopet.api.pet.Pet.spawnPet(Pet.java:99) ~[EchoPet.jar:?]
	at com.dsh105.echopet.commands.PetCommand.onCommand(PetCommand.java:513) ~[EchoPet.jar:?]
	at com.dsh105.echopet.commands.util.DynamicPluginCommand.execute(DynamicPluginCommand.java:50) ~[EchoPet.jar:?]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:168) ~[purpur-api-1.19.2-R0.1-SNAPSHOT.jar:?]
	at org.bukkit.craftbukkit.v1_19_R1.CraftServer.dispatchCommand(CraftServer.java:942) ~[purpur-1.19.2.jar:git-Purpur-1759]
	at org.bukkit.craftbukkit.v1_19_R1.command.BukkitCommandWrapper.run(BukkitCommandWrapper.java:64) ~[purpur-1.19.2.jar:git-Purpur-1759]
	at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) ~[purpur-1.19.2.jar:?]
	at net.minecraft.commands.Commands.performCommand(Commands.java:311) ~[?:?]
	at net.minecraft.commands.Commands.performCommand(Commands.java:295) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.performChatCommand(ServerGamePacketListenerImpl.java:2387) ~[?:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.lambda$handleChatCommand$21(ServerGamePacketListenerImpl.java:2341) ~[?:?]
	at net.minecraft.util.thread.BlockableEventLoop.lambda$submitAsync$0(BlockableEventLoop.java:59) ~[?:?]
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.19.2.jar:git-Purpur-1759]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153) ~[?:?]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[?:?]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1387) ~[purpur-1.19.2.jar:git-Purpur-1759]
	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:185) ~[purpur-1.19.2.jar:git-Purpur-1759]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1364) ~[purpur-1.19.2.jar:git-Purpur-1759]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1357) ~[purpur-1.19.2.jar:git-Purpur-1759]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1335) ~[purpur-1.19.2.jar:git-Purpur-1759]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1223) ~[purpur-1.19.2.jar:git-Purpur-1759]
	at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:310) ~[purpur-1.19.2.jar:git-Purpur-1759]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]

@andrewkm
Copy link
Contributor Author

@mibby editing your config to set them to 1.0 is a temp solution that will work for you in the meantime.

@johngonole
Copy link

I concur. That is the error. And the temp fix of changing all the config file's follow speed modifiers from 1 to 1.0 fixes the issue. Running the latest build #97 on spigot 1.19.2.

Arnuh added a commit that referenced this issue Aug 22, 2022


Any number from yml can be an int or double, safely convert to the type we need by using the Number object.

Might be able to handle this better? But for now this is the solution
@andrewkm
Copy link
Contributor Author

andrewkm commented Sep 4, 2022

Fixed. :)

@andrewkm andrewkm closed this as completed Sep 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants