-
[SOLVED][1.7.10]Entity stops server?
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!
-
[SOLVED][1.7.10]Entity stops server?
I always see updateEntities(). Although, I am starting to see another pattern... let me test.
-
Please help with Teleportation Code
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.
-
Please help with Teleportation Code
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.
-
[SOLVED][1.7.10]Entity stops server?
Yes, it is. In the last few times I paused it, it was on this:
-
[SOLVED][1.7.10]Entity stops server?
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.
-
[SOLVED][1.7.10]Entity stops server?
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?
-
[SOLVED][1.7.10]Entity stops server?
It seems like it happens when I assign currentAttack to a variable. Time to debug and check on the variables.
-
[SOLVED][1.7.10]Entity stops server?
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.
-
[SOLVED][1.7.10]Entity stops server?
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.
-
[SOLVED][1.7.10]Entity stops server?
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.
-
[SOLVED][1.7.10]Entity instantly despawning?
MultiMote, that worked! Thank you. Also the chat event is server side.
-
[SOLVED][1.7.10]Entity instantly despawning?
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?
-
[1.7.2]Background Music
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.
- [1.7.2]Background Music
IPS spam blocked by CleanTalk.