Jump to content

Nimbleguy

Forge Modder
  • Posts

    77
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Nimbleguy's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  1. I fixed it! I think doing EntityAIWatchClosest with a model that is basically nothing does not work... I just removed it and it worked. I don't even know why I put in that watch closest. Thank you!
  2. I always see updateEntities(). Although, I am starting to see another pattern... let me test.
  3. I don't know of a tutorial that shows how to do NBT for a player, but I have used it before. NBT is basically data that is saved. Because trying to use variables on a block will affect every instance of it, you can do the check on player's NBT. NBT saves the player's inventory, things with tile entities, etc. In the case of doing a Player's NBT, using ExtendedEntityData did not work for me. Here is some example code: NBTTagCompound entityData = p.getEntityData(); NBTTagCompound persist; if (!entityData.hasKey(EntityPlayer.PERSISTED_NBT_TAG)) { entityData.setTag(EntityPlayer.PERSISTED_NBT_TAG, (persist = new NBTTagCompound())); } else { persist = entityData.getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG); } Where p is an entityplayer. This gets the Player's persisted NBT data, so if he dies the player keeps your boolean. It also keeps the data if the player logs off. With this code, persist becomes a place where you can save and read data. For example you can call setBoolean(key, value); on persist. That will save a boolean value to the player, with the name of key and the boolean value of value. So if key was "TEST" and value was true, then if you later called getBoolean(key);, where key was still "TEST" you would get true because you assigned "TEST" to true. You can use that to store various other data for the player, from int to byte to char, string, and boolean. So you can make a method with the code I put above that returns persist, then call yourMethod(EntityPlayer p).setBoolean("EnderCooldown", true); when the player uses it, then before you teleport the player you can check if "EnderCooldown" in the NBT is true, if it is then set it to false and don't teleport. If it is false then teleport them. Hope I helped. I hope I helped.
  4. You could try adding a cooldown value to the player's NBT, so after they teleport the cooldown prevents them from teleporting again. Just add the cooldown to the player's NBT when they teleport, and before teleporting check if the cooldown is 0, if not subtract one from it and check later. Since it is on a collision, you may just want a boolean value instead of an int seeing if they just teleported.
  5. Yes, it is. In the last few times I paused it, it was on this:
  6. Here is the stack trace: Ok, I don't even know the cause anymore. The thread seems to be executing perfectly. I checked at multiple times and it was not freezing.
  7. I tested on a dedicated server. It seems like it only freezes the server, not crash. I cannot connect back to the server when I test it. What I think is happening is the main thread gets in an infinite loop. Debug says that the thread is still running when on client. Not sure on server. Any help?
  8. It seems like it happens when I assign currentAttack to a variable. Time to debug and check on the variables.
  9. And after even further testing, it seems like the attacks are not the problem. The server-shutdown seems to happen regardless of which attack it does. It could be something in onLivingUpdate.
  10. After further investigation, it seems like it is GlitchCorrupt that might be doing it. https://github.com/Nimbleguy/The-Void/blob/dev/aj/Java/Nullvoid/Entity/Attack/GlitchCorrupt.java When GlitchCorrupt is called, it does not teleport to the target's location. I think the server-crash might be causing that. There are also a few more problems that if I don't figure out I will put in another thread. It keeps sysouting, but the symptoms I described still happens. It seems like onLivingUpdate stops being called. I will try using breakpoints for it, but from my testing it stops right when GlitchCorrupt is called.
  11. Whenever my custom boss uses one of it's attacks, it stops the internal server. The client is still working, though, and when I exit game it never saves properly. EntityGlitch: https://github.com/Nimbleguy/The-Void/blob/dev/aj/Java/Nullvoid/Entity/EntityGlitch.java GlitchReach(The attack that I think is crashing): https://github.com/Nimbleguy/The-Void/blob/dev/aj/Java/Nullvoid/Entity/Attack/GlitchReach.java It uses the attack, then after a second the server stops. Nothing appears in the logs, but particle packets stop being sent, chat won't work, and nothing moves.
  12. MultiMote, that worked! Thank you. Also the chat event is server side.
  13. I am trying to make a boss, but whenever it is spawned it instantly dies. It has full health when it is spawned. I am on Normal mode. VoidMod: EntityGlitch: Code where I spawn the entity(I spawn it in a playerchatevent): Also, I have it not have a model but be able to be seen by particles, if that makes a difference. I see the particles appear for a second, then stop. Also, am I able to post links to github instead of the code?
  14. Is there at least a way to check if music is playing or have a looped piece of music? Also, the MusicType enum seems interesting for this purpose.
×
×
  • Create New...

Important Information

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