Posted November 11, 20204 yr My mod keeps crashing the client. Can anyone help? crash-2020-11-10_22.15.47-server.txt
November 11, 20204 yr Quote at io.github.withonetee.entities.DreamEntity.onLivingFall(DreamEntity.java:148) ~[?:?] {re:classloading} Complain to the mod author. 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.
November 11, 20204 yr Author 11 hours ago, diesieben07 said: They are the mod author @hypov Show your code. The entity class? DreamEntity.java
November 11, 20204 yr Author 18 minutes ago, diesieben07 said: Please learn what static means. None of those things should be static. Do not re-use ItemStack instances. Do not cache things like Blocks.WATER in your own fields. That crash is impossible to get with the code you posted. Why can't I re-use ItemStack instances?
November 11, 20204 yr Author 59 minutes ago, diesieben07 said: Because they hold state, like size, damage, etc. This will all be shared. I'm confused What does that mean?
November 11, 20204 yr Author 2 minutes ago, diesieben07 said: You create an ItemStack and store it in a static field. You then do something with that stack, e.g. give it to the player. This will cause this ItemStack reference to get modified (if the player splits the stack in their inventory, for example). Now your static field holds the same ItemStack instance still, but it has changed (now has a different count). You now give this stack to a different player. The first player then changes the stack in their inventory and magically the stack in the 2nd player's inventory changes also. oh right How would I fix this? Also I'm trying to add mlg features to the entity.. how would I do that? Thank you!
November 11, 20204 yr Author Just now, diesieben07 said: Don't re-use Itemstacks. What? Okay Basically if an entity is falling, the entity would place a water bucket below them to counteract the fall damage
November 11, 20204 yr Author 1 minute ago, diesieben07 said: Probably need to check the Y motion for a negative value and check if there is ground below. Uhm yes, I have problems though 1. How do I check if there's ground below an entity? 2. I'm registering the event handler in another class, so how would I set the item of the entity in the other class?
November 11, 20204 yr 44 minutes ago, hypov said: Uhm yes, I have problems though 1. How do I check if there's ground below an entity? world#getBlockState 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.
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.