Jump to content

loawkise

Members
  • Posts

    186
  • Joined

  • Last visited

Everything posted by loawkise

  1. I have it all working thank you. I will now get to work studying and learning exactly what is going on so I can adapt and create my own
  2. Oh, I will take a look at this and get back to you. I saw this before but couldn't find much on it. Thanks
  3. I am wanting to create a custom inventory for my custom entity. I have begun by implementing IInventory and have added the unimplemented methods. I am using the wiki tutorial for help (http://www.minecraftforge.net/wiki/Containers_and_GUIs) but I have some methods that aren't entirely the same, plus the wiki doesn't explain a whole lot so some of my code is giving me errors. It hasn't used these methods, so I don't know what they are used for/how to use them: None of those appear on the wiki tutorial but these ones do, however I don't know how to use them correctly as there is no explanation. If anyone could explain some of this it would be highly appreciated as it is my first time trying to make a custom inventory.
  4. Okay thanks for clearing that up.
  5. How would I open the default chest gui so that I can give my custom entity an inventory, or is that not how it works.
  6. Ohhhh... Hahahah thank you
  7. Apparently it can't play the sound as it is unkown... I used this: worldObj.playSoundAtEntity(this, "random.eat1", 1.0F, 0.5F * ((rand.nextFloat() - rand.nextFloat()) * 0.7F + 1.8F));
  8. How would I go about playing the normal Minecraft eating sound when I feed my custom tamed entity.
  9. I will just have a google, that solves many problems. Edit: New plan, I will make all the models I need in the constructor and then just set them hidden when I don't need them, I think that should work, maybe...
  10. How would I increase the size of an existing shape? There is only .addBox(-4F, -4F, -4F, 8, 8, ; which I use to set the size.
  11. Ahhh so am I basically creating a new shape each time it is called which is then causing the game to lag? That would make a whole lot of sense.
  12. I am fairly sure it isn't packets as I ran it without creating any and the problem still persisted with these debug errors still: I also removed all their AI and still got these debug errors: I then removed the reading and writing to NBT methods and still got these errors: Now removed the onLivingUpdate() method, still got these debug errors: Removed the interact method, still got this: Now I tried removing the setLivingAnimations() method and it appears to completely remove the lag spike issue. Here is the model class, any reasons it could be causing the lag spike issue? https://gist.github.com/WillR27/5fef86e88a4c464ce8f0 Thanks for all your help guys, especially Elyon
  13. Nothing seemed to change, and I checked all the packets again to see when they were created and processed/received and they were only created when they needed to be, so I don't think packets is the issue. Sorry if this is dragging on now, but it doesn't make any sense.
  14. Hrmmm, I think I understand what you mean now, I will write the attackTimer to NBT and see if there is any difference.
  15. Overall, I don't think it is to do with packets being sent too often. They are only sent when the blockling first spawns and when it is attacking. This also cropped up and I am not sure if I have seen it before. [07:59:29] [server thread/WARN]: Something's taking too long! 'root.connection' took aprox 303.72053 ms [07:59:29] [server thread/WARN]: Something's taking too long! 'root' took aprox 311.402088 ms
  16. I couldn't figure git hub out Here are all the classes that are mainly linked with the entity class. Main Class https://gist.github.com/WillR27/3b96450ff32ba240b8fe Blockling Class https://gist.github.com/WillR27/56f0e8da4b24a9e2eace Register Blockling Class https://gist.github.com/WillR27/4dc74083bc4cd7f37d3d Model Class https://gist.github.com/WillR27/e8a3587929914d1224f4 Packet Handling Classes (Not sure if this helps) https://gist.github.com/WillR27/92517b2ffd3ec80f421a https://gist.github.com/WillR27/1bc97353f1f901987d00 https://gist.github.com/WillR27/d822d873ea9b1cb712d0 https://gist.github.com/WillR27/2b89357f27fcdb27e020 https://gist.github.com/WillR27/a4fafe8ee92a1e85fd8b
  17. I will post it on github no problem, thanks for the help.
  18. Yeah it appeared to have gone at first then it started up again. I tried only having a few blocklings in the world which seemed to be fine, only giving me these 2 errors: [20:56:29] [server thread/WARN]: Something's taking too long! 'root.save' took aprox 140.203791 ms [20:56:29] [server thread/WARN]: Something's taking too long! 'root' took aprox 150.196966 ms [20:58:04] [server thread/WARN]: Something's taking too long! 'root.connection' took aprox 252.576806 ms [20:58:04] [server thread/WARN]: Something's taking too long! 'root' took aprox 261.481067 ms Then once I added roughly 20 in I got this and the lag spikes again:
  19. Okay I have done that, no errors and everything still works.
  20. This is my ProcessPacketClientSide class, I am not entirely sure what you mean by that as I still haven't fully got to grips with packets yet.
  21. Okay, I will give you as much information as I can... When you load up the world everything is fine. You can spawn a few in and tame them and have no real issues at first. As you continue playing in that world during that session, small lag spikes begin to occur which you may expect to happen normally. However, they then begin to pause the game for a good second or so and become more frequent until one is happening every 2 seconds and then one will eventually freeze the game all together. This all happens within a 3 - 4 minute time period I am not doing anything specific when they occur either, well not that I am aware of. Here is the full console from my latest test. In this case, I had to close it via task manager because I couldn't even press x or pause the menu to quit. Hope that makes it a little easier to understand, and helps to figure out why it is happening. Also here is the error that started it all off, from the first one that appeared to the last:
  22. Do you mean like the entire console or a crash report type thing, because it doesn't crash so I am not getting a crash report?
  23. Here you go https://gist.github.com/WillR27/db0664dd9705ac504fc7 Here is the error I get when debugging too:
  24. Okay, everything is working fine now. I am now not sure what is causing the lag spike issue.
×
×
  • Create New...

Important Information

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