Jump to content

Recommended Posts

Posted

I'm getting a NullPointer on this code:

  Reveal hidden contents

I don't understand how it can be null because the line right before it is:

  Reveal hidden contents

Heres the Git repo: https://github.com/Novarch129/JoJo-s-Blocky-Adventure,

the relevant code is at :https://github.com/Novarch129/JoJo-s-Blocky-Adventure/blob/master/src/main/java/com/novarch/jojomod/entities/stands/kingCrimson/EntityKingCrimson.java,

and the debug.log: https://gist.github.com/Novarch129/38e8edc698dcafd745e05e7bb04d7d7e.

It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".

Posted (edited)
  On 4/24/2020 at 10:21 AM, Novârch said:
Expand  

That log looks like it ends prematurely

 

*edit: also, are you sure that this code is only running on the client? Minecraft is a client-only class I do believe. I would set breakpoints and walk through the code to see what is happening.

Edited by Ugdhar
Posted
  On 4/24/2020 at 10:35 AM, diesieben07 said:

Minecraft is a client-only class. You cannot access it from common code (your entity).

Expand  

Then how should I run that code? The entire mod is entity classes and I don't think I can change that.

It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".

Posted
  On 4/24/2020 at 11:07 AM, diesieben07 said:

What are you trying to do there even? What's the end goal?

Expand  

Eventually add effects to all entites and remove their attack targets.

It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".

Posted
  On 4/24/2020 at 11:09 AM, diesieben07 said:

And you do that within an entity class, because...?

Expand  

It's only supposed to happen while the entity is summoned and under certain conditions, all the variables are stored within the class the entity extends, if there's a better way to do do it I would be glad to change it.

It's sad how much time mods spend saying "x is no longer supported on this forum. Please update to a modern version of Minecraft to receive support".

  • Novârch changed the title to [SOLVED] Crash on world.getAllEntities

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.