Jump to content

Crash when spawning entity in SMP.


WildBamaBoy

Recommended Posts

Whenever I try to spawn an entity that belongs to my mod in SMP, it throws this error and crashes.

 

2012-12-23 21:33:03 [sEVERE] [Minecraft] Encountered an unexpected exception NoClassDefFoundError
java.lang.NoClassDefFoundError: net/minecraft/client/entity/EntityClientPlayerMP
at mca.ItemEggMale.spawnVillager(ItemEggMale.java:105)
at mca.ItemEggMale.onItemUse(ItemEggMale.java:83)
at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:135)
at net.minecraft.item.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:424)
at net.minecraft.network.NetServerHandler.handlePlace(NetServerHandler.java:579)
at net.minecraft.network.packet.Packet15Place.processPacket(Packet15Place.java:79)
at net.minecraft.network.TcpConnection.processReadPackets(TcpConnection.java:454)
at net.minecraft.network.NetServerHandler.networkTick(NetServerHandler.java:137)
at net.minecraft.network.NetworkListenThread.networkTick(NetworkListenThread.java:57)
at net.minecraft.server.dedicated.DedicatedServerListenThread.networkTick(DedicatedServerListenThread.java:34)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:702)
at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:270)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:598)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:497)
at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
Caused by: java.lang.ClassNotFoundException: net.minecraft.client.entity.EntityClientPlayerMP
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:179)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 15 more
Caused by: java.lang.RuntimeException: Attempted to load class net/minecraft/client/entity/EntityClientPlayerMP for invalid side SERVER
at cpw.mods.fml.common.asm.transformers.SideTransformer.transform(SideTransformer.java:38)
at cpw.mods.fml.relauncher.RelaunchClassLoader.runTransformers(RelaunchClassLoader.java:222)
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:171)
... 17 more

 

I understand what the error means, but neither the egg nor the entity reference EntityClientPlayerMP anywhere. The only kind of player I use is EntityPlayer.

 

Code for the egg: http://pastebin.com/HHReW9R2

Code for the entity: http://pastebin.com/1jjAsd6N

 

Why is this happening if I don't use EntityClientPlayerMP?

Link to comment
Share on other sites

1) if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) is bad, and expensive. Use World.isRemote

2) Why did you pastebin partial classes? The error clearly states the it's on line 105 but your class only has 103

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Ugh, getting tired of asking for your complete code as I said SOMEWHERE you're referring to EntityClient

Zip your entire code and post it.

 

The more code you post shows the more classes that you're not posting.

See:

        public FamilyTree familyTree = new FamilyTree(this);
        public ChoreCombat combatChore = new ChoreCombat(this);
        public ChoreFarming farmingChore = new ChoreFarming(this);
        public ChoreFishing fishingChore = new ChoreFishing(this);
        public ChoreWoodcutting woodcuttingChore = new ChoreWoodcutting(this);
        public ChoreMining  miningChore = new ChoreMining(this);
        public Inventory inventory = new Inventory(this);

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Oh my god, so many hard references to client side only classes its ridiculousness.

Also, you seriously need to fix your instalation process, death on your config folder not being there, my god those 15 errors were so fucking annoying to fix 1 by one.

 

Anyways shit like this creates a hard reference:

 

ModLoader.openGUI(entityPlayer, new GuiInteractionVillagerAdult(this, entityPlayer));

Hard reference to GuiScreen

if (hearts > 100 && !Minecraft.getMinecraft().statFileWriter.hasAchievementUnlocked(MCA.instance.achievementCharmer))

Hard reference to Minecraft {yes even when sourrounded by 'getEffectiveSide' checks {which, again, is stupid and waistful.

Minecraft.getMinecraft().thePlayer.triggerAchievement(MCA.instance.achievementCharmer)

Not only hard reference to Minecraft, but also to EntityClientPlayerMP as thts what 'thePlayer' is.

 

Its ridiculousness trying to track down all the hard references.

Here is a tip, go to forge/mcp/src/minecraft and re-name 'client' to '______'

And then fix all the errors that are in your package.

 

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Got that all figured out but now it's having some problem with packets.

 

Client Side

2012-12-24 15:16:04 [iNFO] [sTDOUT] Connecting to 127.0.0.1, 25565
2012-12-24 15:16:06 [iNFO] [sTDOUT] Minecraft Comes Alive CLIENT: SENT SYNC REQUEST 173
2012-12-24 15:16:06 [iNFO] [sTDOUT] Minecraft Comes Alive CLIENT: [b@2158592a
2012-12-24 15:16:06 [iNFO] [sTDOUT] Minecraft Comes Alive CLIENT: SENT SYNC REQUEST 177
2012-12-24 15:16:06 [iNFO] [sTDOUT] Minecraft Comes Alive CLIENT: [b@15de4ebf

 

Server Side

2012-12-24 15:16:06 [iNFO] [sTDOUT] Minecraft Comes Alive SERVER: Received packet: MCA_SYNC_REQ
2012-12-24 15:16:06 [iNFO] [sTDERR] java.lang.NullPointerException
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at java.io.ByteArrayInputStream.<init>(Unknown Source)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at mca.PacketHandler.handleSyncRequest(PacketHandler.java:458)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at mca.PacketHandler.onPacketData(PacketHandler.java:95)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:243)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:233)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:71)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.network.NetServerHandler.handleCustomPayload(NetServerHandler.java:1111)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.network.packet.Packet250CustomPayload.processPacket(Packet250CustomPayload.java:70)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.network.TcpConnection.processReadPackets(TcpConnection.java:454)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.network.NetServerHandler.networkTick(NetServerHandler.java:137)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.network.NetworkListenThread.networkTick(NetworkListenThread.java:57)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.server.dedicated.DedicatedServerListenThread.networkTick(DedicatedServerListenThread.java:34)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:702)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:270)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:598)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:497)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.server.ThreadMinecraftServer.run(ThreadMinecraftServer.java:16)
2012-12-24 15:16:06 [iNFO] [sTDERR] java.io.IOException: Bad packet id 172
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.network.packet.Packet.readPacket(Packet.java:151)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.network.TcpConnection.readPacket(TcpConnection.java:320)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.network.TcpConnection.readNetworkPacket(TcpConnection.java:540)
2012-12-24 15:16:06 [iNFO] [sTDERR] 	at net.minecraft.network.TcpReaderThread.run(TcpReaderThread.java:23)
2012-12-24 15:16:06 [iNFO] [Minecraft] Player172 lost connection: disconnect.genericReason

 

The data is sent correctly, as you can see in the Client log. In the case of the MCA_SYNC_REQ packet it is an entity's ID. However when the server receives it, data is null. If I skip sending the sync packet, I can successfully log in to the server. However when I send any other kind of packet, the same thing happens: no data in the received packet when there was data in it when it was sent.

 

I have a feeling this is something simple I'm missing. Here's my updated source, all hard references to the client removed: https://dl.dropbox.com/u/64124307/Minecraft%20Comes%20Alive/Build/SRC.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
    • Let me try and help you with love spells, traditional healing, native healing, fortune telling, witchcraft, psychic readings, black magic, voodoo, herbalist healing, or any other service your may desire within the realm of african native healing, the spirits and the ancestors. I am a sangoma and healer. I could help you to connect with the ancestors , interpret dreams, diagnose illness through divination with bones, and help you heal both physical and spiritual illness. We facilitate the deepening of your relationship to the spirit world and the ancestors. Working in partnership with one\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\’s ancestors is a gift representing a close link with the spirit realm as a mediator between the worlds.*   Witchdoctors, or sorcerers, are often purveyors of mutis and charms that cause harm to people. we believe that we are here for only one purpose, to heal through love and compassion.*   African people share a common understanding of the importance of ancestors in daily life. When they have lost touch with their ancestors, illness may result or bad luck. Then a traditional healer, or sangoma, is sought out who may prescribe herbs, changes in lifestyle, a career change, or changes in relationships. The client may also be told to perform a ceremony or purification ritual to appease the ancestors.*   Let us solve your problems using powerful African traditional methods. We believe that our ancestors and spirits give us enlightenment, wisdom, divine guidance, enabling us to overcome obstacles holding your life back. Our knowledge has been passed down through centuries, being refined along the way from generation to generation. We believe in the occult, the paranormal, the spirit world, the mystic world.*   The services here are based on the African Tradition Value system/religion,where we believe the ancestors and spirits play a very important role in society. The ancestors and spirits give guidance and counsel in society. They could enable us to see into the future and give solutions to the problems affecting us. We use rituals, divination, spells, chants and prayers to enable us tackle the task before us.*   I have experience in helping and guiding many people from all over the world. My psychic abilities may help you answer and resolve many unanswered questions
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.