GeyserExtensionists / GeyserModelEngine

MIT License
39 stars 12 forks source link

Error: Unable to create packet class ClientboundAddEntityPacket #21

Closed 0zl closed 1 month ago

0zl commented 1 month ago
java.lang.NullPointerException: Unable to create packet instance for class class net.minecraft.network.protocol.game.ClientboundAddEntityPacket - true - com.comphenix.protocol.wrappers.WrappedStreamCodec[handle=net.minecraft.network.codec.StreamCodec$5@408ee35d]
  at java.base/java.util.Objects.requireNonNull(Unknown Source) ~[?:?]
  at ProtocolLib.jar/com.comphenix.protocol.injector.StructureCache.lambda$newPacket$4(StructureCache.java:130) ~[?:?]
  at ProtocolLib.jar/com.comphenix.protocol.injector.StructureCache.newPacket(StructureCache.java:134) ~[?:?]
  at ProtocolLib.jar/com.comphenix.protocol.injector.StructureCache.newPacket(StructureCache.java:144) ~[?:?]
  at ProtocolLib.jar/com.comphenix.protocol.events.PacketContainer.<init>(PacketContainer.java:119) ~[?:?]
  at ProtocolLib.jar/com.comphenix.protocol.injector.PacketFilterManager.createPacket(PacketFilterManager.java:389) ~[?:?]
  at ProtocolLib.jar/com.comphenix.protocol.injector.PacketFilterManager.createPacket(PacketFilterManager.java:384) ~[?:?]
  at GeyserModelEngine-1.0-SNAPSHOT.jar/re.imc.geysermodelengine.packet.EntitySpawnPacket.encode(EntitySpawnPacket.java:27) ~[?:?]
  at GeyserModelEngine-1.0-SNAPSHOT.jar/re.imc.geysermodelengine.packet.entity.PacketEntity.lambda$sendSpawnPacket$0(PacketEntity.java:72) ~[?:?]
  at java.base/java.util.Collections$SingletonList.forEach(Unknown Source) ~[?:?]
  at GeyserModelEngine-1.0-SNAPSHOT.jar/re.imc.geysermodelengine.packet.entity.PacketEntity.sendSpawnPacket(PacketEntity.java:71) ~[?:?]
  at GeyserModelEngine-1.0-SNAPSHOT.jar/re.imc.geysermodelengine.model.EntityTask.lambda$sendEntityData$2(EntityTask.java:164) ~[?:?]
  at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:101) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
  at org.bukkit.craftbukkit.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
  at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[purpur-1.20.6.jar:?]
  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
  at java.base/java.lang.Thread.run(Unknown Source) [?:?]

I am using Purpur 1.20.6 and GeyserMC version for 1.20.6. Model Engine 4.0.7 (Not Legacy) I have tested using Ezekiel model and Dragon pack model, and tried using the free one as well, the error still persists when I try to spawn a mob using MythicMobs.

zimzaza4 commented 1 month ago

Try update your ProtocolLib to latest version

0zl commented 1 month ago

Try update your ProtocolLib to latest version

Oooh! Fixed! Thanks! But I noticed some models have weird/error(?) textures (pink). Is this because of the model conversion? I converted the models to Bedrock Entity and not the legacy ones.

zimzaza4 commented 1 month ago

are u using a model with multi textures?

0zl commented 1 month ago

are u using a model with multi textures?

Yes, some models unfortunately have multiple textures. I might need to merge them into one but haven't figured out how yet. Anyway, Thanks! This is a really great plugin!