Jump to content

[1.14.4] [UNSOLVED] Server Thread Freezes After Entity Explodes


Recommended Posts

Posted

My entities have the ability to explode similar to a creeper, and use almost the exact same code as a creeper, but when the entity explodes the server thread freezes. I can still move around and the item entities still spin. But I cannot pickup anything, save the game, or even close the game. I cannot figure out what is causing it.

The code is located here.

Posted
  On 12/6/2019 at 9:12 AM, loordgek said:
Expand  

The value only ever gets used on the client side for sending chat messages when the tamed entity dies. Are you saying you believe that is what is causing the hang though?

Posted (edited)
  On 12/6/2019 at 1:13 PM, saxon564 said:

The value only ever gets used on the client side for sending chat messages when the tamed entity dies. Are you saying you believe that is what is causing the hang though?

Expand  

No, it will outright crash the dedicated server. You can't do this at all. You want to send a message to a player you need to send a message to a player.

Edited by Draco18s

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted
  On 12/6/2019 at 3:51 PM, Draco18s said:

No, it will outright crash the dedicated server. You can't do this at all. You want to send a message to a player you need to send a message to a player.

Expand  

OK, I will add that to my list of things to address. For now though, can we focus on the issue I made the post for?

Posted

I have condensed my code down  so the link in my first post is off by several lines. So here is the correct link. I also commented out all the code using the Minecraft instance since none of that is important right now. I still can't figure out what is causing the hang. Putting in debug code between each line and even overriding the remove methods and all the debug lines do get called. So it seems to me it is something after the my entity is removed, which makes no sense since if the entity dies in any other way, this is not an issue.

Posted (edited)

Maybe because you're removing entity while ticking or something like that.  At least that's the error I am see while trying to use livingTick() and making an entity explode.  Possibly move the blowUp parts out of livingTick() and put them under tick(). see CreeperEntity.

Edited by Lea9ue
language
Posted
  On 12/7/2019 at 5:54 PM, Lea9ue said:

Maybe because you're removing entity while ticking or something like that.  At least that's the error I am see while trying to use livingTick() and making an entity explode.  Possibly move the blowUp parts out of livingTick() and put them under tick(). see CreeperEntity.

Expand  

I feel like I've done that before with no positive results, but that may have been for a different issue, so I will give it a shot tonight and see if that works.

Posted
  On 12/7/2019 at 5:54 PM, Lea9ue said:

Maybe because you're removing entity while ticking or something like that.  At least that's the error I am see while trying to use livingTick() and making an entity explode.  Possibly move the blowUp parts out of livingTick() and put them under tick(). see CreeperEntity.

Expand  

Unfortunately that was not the case, there was no change in the result at all.

Posted

Why do you appear to have a base EntityMoChicken that has not just copypasted vanilla code rather than extending the vanilla chicken, but also the code for every specialized chicken that (at least I would think) should be split into each respective special chicken?

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted
  On 12/8/2019 at 6:40 AM, DaemonUmbra said:

Why do you appear to have a base EntityMoChicken that has not just copypasted vanilla code rather than extending the vanilla chicken, but also the code for every specialized chicken that (at least I would think) should be split into each respective special chicken?

Expand  

Since I first built this in 1.5.2 I do not remember the reason I did not extend the vanilla chiclen. I would guess that at the time, it was because of spawning issues or issues with making the chickens hostile. As for why code isn"t split between each individual chicken, that is because I have made the chickens highly configurable, so any chicken can do anything. So to put the "respective" code in each chicken class, I would have 21 classes that would be almost 100% identical. Which would also mean loads more time would have to go into updating since I would have to update 21 classes instead of just a single class. I will admit, when I was first building the mod, I did copy and paste a lot of vanilla code, but I have also made several changes to get the code to work the way I wanted/needes it to.

Posted

So I have found that the cause seems to be the createExplosion method, which tells me I must be passing some sort of bad information to it, or calling it improperly. But as far as I can tell, I am doing everything right with it.

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



×
×
  • Create New...

Important Information

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