Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[ 1.7.10 ] Where is the null point exception?


Recommended Posts

Hi, I'm going to ask a question.
I'm implementing the player's movements through the Obsidian API. But there was a problem..

1. first person
2018-08-18_13_36_14.png.52e82cd5ec4a691e27aafd160e7df098.png

2. Third person
2018-08-18_13_36_19.png.5af6f4d8c48c6d2417bb7c90fb802f34.png

 

In this way, the player is invisible when you are in third person, and it emits the following error. (Repeat continuously)

[13:36:21] [Client thread/ERROR]: Couldn't render entity
java.lang.NullPointerException
    at obsidianAPI.render.player.ModelAnimatedPlayer.setRotationAngles(ModelAnimatedPlayer.java:62) ~[ModelAnimatedPlayer.class:?]
    at obsidianAPI.render.ModelObj.render(ModelObj.java:355) ~[ModelObj.class:?]
    at net.minecraft.client.renderer.entity.RendererLivingEntity.renderModel(RendererLivingEntity.java:309) ~[RendererLivingEntity.class:?]
    at net.minecraft.client.renderer.entity.RendererLivingEntity.doRender(RendererLivingEntity.java:165) [RendererLivingEntity.class:?]
    at net.minecraft.client.renderer.entity.RenderPlayer.doRender(RenderPlayer.java:167) [RenderPlayer.class:?]
    at net.minecraft.client.renderer.entity.RenderPlayer.doRender(RenderPlayer.java:565) [RenderPlayer.class:?]
    at net.minecraft.client.renderer.entity.RenderManager.func_147939_a(RenderManager.java:300) [RenderManager.class:?]
    at net.minecraft.client.renderer.entity.RenderManager.renderEntityStatic(RenderManager.java:278) [RenderManager.class:?]
    at net.minecraft.client.renderer.entity.RenderManager.renderEntitySimple(RenderManager.java:251) [RenderManager.class:?]
    at net.minecraft.client.renderer.RenderGlobal.renderEntities(RenderGlobal.java:527) [RenderGlobal.class:?]
    at net.minecraft.client.renderer.EntityRenderer.renderWorld(EntityRenderer.java:1300) [EntityRenderer.class:?]
    at net.minecraft.client.renderer.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1087) [EntityRenderer.class:?]
    at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1067) [Minecraft.class:?]
    at net.minecraft.client.Minecraft.run(Minecraft.java:962) [Minecraft.class:?]
    at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_172]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_172]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_172]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
    at net.minecraftforge.gradle.GradleStartCommon.launch(Unknown Source) [start/:?]
    at GradleStart.main(Unknown Source) [start/:?]


These two pictures are CommonProxy and ClientProxy I touched.
1. CommonProxy
2.PNG.d768b6bffe728794537fee480288fb31.PNG

2. ClientProxy
1094895406_.thumb.PNG.8df3d33c6dbd220ea2c8fcbc00881c7d.PNG

 

As noted in the log, NullPointerException is a problem. I really wonder where this NullPointerException happens.

RenderPlayerAnimated: https://github.com/ObsidianSuite/ObsidianSuite/blob/master/API/src/main/java/com/dabigjoe/obsidianAPI/render/player/RenderPlayerAnimated.java
ModelAnimatedPlayer: https://github.com/ObsidianSuite/ObsidianSuite/blob/master/API/src/main/java/com/dabigjoe/obsidianAPI/render/player/ModelAnimatedPlayer.java

 

If you know where NullPointerException is happening, the developer can help.
Please help me...!

Link to post
Share on other sites
1 minute ago, Guebeul said:

Please help me...!

Anything below 1.8 is unsupported on this forum update if you want help. Soon 1.8.9 support will also be dropped if it isn't already. A Moderator will lock this thread later.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to post
Share on other sites
5 minutes ago, Animefan8888 said:

Anything below 1.8 is unsupported on this forum update if you want help. Soon 1.8.9 support will also be dropped if it isn't already. A Moderator will lock this thread later.

You can not ask questions below version 1.8? It's really important that it is ...

Link to post
Share on other sites
1 minute ago, Guebeul said:

You can not ask questions below version 1.8? It's really important that it is ...

Other forums will answer this question, it just makes it difficult to answer questions on older versions because supporting the massive changes between 1.7 and 1.8 and the changes between every other version that changed some core system. Would you expect Mojang to go back and update 1.7 versions to fix a bug or Oracle to go back to Java 6 to add new features? Or supply support? No. That is why other places exist. What makes your reason so important?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to post
Share on other sites

Anyway, a null pointer is a Java problem, not really a modding problem. It means that at that point in the code, something is null when it is not expected to be. Just use your debugger or console statements to trace through the execution leading up to that point in the code. Basically the error message tells you what is wrong so now up to you to fix it.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to post
Share on other sites
Guest
This topic is now closed to further replies.


  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • I may have simply needed to update the import. Sorry about that.
    • I'm using forge-1.17.1-37.0.15-mdk, and the empty project starts without any problems. I have no idea where the problem lies.
    • It happens with Language Support for Java. Because of this error, my code will not be able to resolve the reference. Please help me. Error Messages: ---------------------------------- [Warn  - 9:37:53] 2021/08/01 9:37:53 While loading class "org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersions$LookupStrategy", thread "Thread[Worker-1: Loading available Gradle versions,5,main]" timed out waiting (30035ms) for thread "Thread[pool-2-thread-1,5,main]" to finish starting bundle "org.eclipse.buildship.core_3.1.5.v20210112-1646-s [14]". To avoid deadlock, thread "Thread[Worker-1: Loading available Gradle versions,5,main]" is proceeding but "org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersions$LookupStrategy" may not be fully initialized. Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="3.1.5.v20210112-1646-s"; osgi.identity="org.eclipse.buildship.core"; singleton:="true" [id=14] STARTED [STARTED] org.osgi.framework.BundleException: Unable to acquire the state change lock for the module: osgi.identity; type="osgi.bundle"; version:Version="3.1.5.v20210112-1646-s"; osgi.identity="org.eclipse.buildship.core"; singleton:="true" [id=14] STARTED [STARTED]     at org.eclipse.osgi.container.Module.lockStateChange(Module.java:350)     at org.eclipse.osgi.container.Module.start(Module.java:419)     at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:511)     at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:117)     at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:572)     at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:345)     at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:401)     at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:480)     at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:170)     at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)     at org.eclipse.buildship.core.internal.util.gradle.PublishedGradleVersionsWrapper$LoadVersionsJob.run(PublishedGradleVersionsWrapper.java:60)     at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: java.util.concurrent.TimeoutException: Timeout after waiting 30 seconds to acquire the lock.     at org.eclipse.osgi.container.Module.lockStateChange(Module.java:347)     ... 11 more Caused by: org.eclipse.osgi.framework.util.ThreadInfoReport: Thread dump ... ----------------------------------  
    • Can someone please tell me why this is happening and help me find a solution. thanks. Edit: Nevermind I figured it out.
    • I am trying to store data through my ItemStack capability storage, but I stumbled upon a roadblock. My ItemStack Capability Storage: public class WandItemStorage implements Capability.IStorage<IWandCap> { @Nullable @Override public INBT writeNBT(Capability<IWandCap> capability, IWandCap instance, Direction side) { CompoundNBT tag = new CompoundNBT(); tag.put("spells", instance.getSpells()); return tag; } @Override public void readNBT(Capability<IWandCap> capability, IWandCap instance, Direction side, INBT nbt) { } } My ItemStack Capability: public class WandCap implements IWandCap { private List<Spell> spells; public WandCap () { spells = new ArrayList<>(); } @Override public List<Spell> getSpells() { return this.spells; } @Override public void addSpells(Spell... spells) { this.spells.addAll(Arrays.asList(spells)); } @Override public void addSpell(Spell spell) { this.spells.add(spell); } @Override public void removeSpells(Spell... spells) { this.spells.removeAll(Arrays.asList(spells)); } @Override public void removeSpell(Spell spell) { this.spells.remove(spell); } @Override public boolean containsSpell(Spell spell) { return this.spells.contains(spell); } } I'm currently trying to put a List of Spells (my custom object) to the Write and Read NBT methods of my ItemStack cap storage, but CompoundNBT doesn't have a method for putting a custom object into a tag. All it has is the put() method from what I'm seeing, however the put() method requires an INBT for the second parameter, which I do not have. Would I need to convert my List of Spells to an INBT, and how would I go about doing that?
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.