Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Everything posted by Vitridax

  1. I managed to solve my problems by myself. It took a week of many tests and crashes, but at least it was very informative. For the first question, my NetHandler wasn't being updated because it's manager was a client side manager. The server side manager it was connected to was stored in a private list in the NetworkSystem, so I got it using reflection, and used it for my NetHandler instead. For the second question, right now I'm just creating packets in NetHandlerPMPlayServer.update() and calling the correct method to handle the packet. I'm not sure if this will cause problems later,
  2. For what Entity? I can't change any vanilla classes and I'm trying not to use my old entity (EntityPMPlayerServer) because of all the problems it causes. Instead I'm just using the NetHandlerPMPlayServer. Or are you talking about the very first question I asked on March 2nd? That's resolved because I'm not using EntityPMPlayerServer anymore.
  3. Ok, so I've found a few problems that I can't seem to handle in the past few days. At first I kept trying to use the entity that extended from EntityPlayerMP, but there were so many things to override that I decided to just have a custom net handler only (extends from NetHandlerPlayServer, I called it NetHandlerPMPlayServer). I can link it with a player just fine, but for some reason EntityPlayerMP only updates(super.onUpdate()) when its net handler recieves a packet from the client (C03PacketPlayer), which is sent every tick in EntityPlayerSP's onUpdate(). Of course, my players don't have a c
  4. I know. The only problem is that I can't do a constructor with super(world) because EntityPlayerMP doesn't have that constructor either, but for some reason it works. I don't know how to do a constructor that just has one parameter (World world) while still referring to the EntityPlayerMP constructor (super(server, world, profile, interactionManager)) without making up lots of hard coded things to fill in the blanks.
  5. Here is the code I use to spawn the player.
  6. Edit: This first question is resolved. Scroll down to see my later questions. I created an entity (EntityPMPlayer) that extends EntityPlayerMP. When I tried spawning it in the exact same way I spawned an EntityPlayerMP the console spat out an error that it was missing the method <init>(net.minecraft.world.World). Why does it do this with my entity but not with EntityPlayerMP, and how can I fix it? EntityPMPlayer: Error:
  7. I already knew about them, but thanks for trying . It seems like people don't have much suggestions so I'll wait another day and then I'll just assume my method is fine and that there are no tutorials on NetworkManager.
  8. I'm trying to make a mod that adds computer controlled players into the game. I want to make them as close to players as possible (at least in their abilities, the AI probably will be a bit harder). This means that spawners will activate with them nearby, players can't sleep unless my computer ones are in their beds too, death messages etc. I think the easiest way to do this is to make them extend from EntityPlayerMP and be treated as clients. I managed to make several fake clients with the following code: // construct profile ServerConfigurationManager scm = MinecraftServer.getServer(
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.