Jump to content

Wierd Errors


julesmaster7

Recommended Posts

Hi there,

 

I am making a minecraft mod for 1.8.9 and I'm getting these two wierd errors when I start up the game.

 

Error 1 happens on start up:

[17:46:23] [Client thread/WARN] [FML]: =============================================================
[17:46:23] [Client thread/WARN] [FML]: MOD HAS DIRECT REFERENCE System.exit() THIS IS NOT ALLOWED REROUTING TO FML!
[17:46:23] [Client thread/WARN] [FML]: Offendor: com/sun/jna/Native.main([Ljava/lang/String;)V
[17:46:23] [Client thread/WARN] [FML]: Use FMLCommonHandler.exitJava instead
[17:46:23] [Client thread/WARN] [FML]: =============================================================
[17:46:24] [Client thread/INFO] [sTDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:246]: ---- Minecraft Crash Report ----

 

Error 2 happens when i load up the world:

[17:51:08] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@634605ca[id=4de10e95-2f24-3513-b65d-4a73193172f6,name=Player802,properties={},legacy=false]
com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time
at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:65) ~[YggdrasilAuthenticationService.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:175) [YggdrasilMinecraftSessionService.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:59) [YggdrasilMinecraftSessionService$1.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:56) [YggdrasilMinecraftSessionService$1.class:?]
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache.get(LocalCache.java:3934) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) [guava-17.0.jar:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:165) [YggdrasilMinecraftSessionService.class:?]
at net.minecraft.client.Minecraft.func_181037_M(Minecraft.java:2915) [Minecraft.class:?]
at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:130) [skinManager$3.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_74]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_74]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_74]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_74]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_74]

 

Also one quick question about crops:

 

How can I make my crop plant not show up in the give command - just like wheat does it?

 

Thanks,

 

JulesMaster7

Link to comment
Share on other sites

Error 1 happens on start up:

[17:46:23] [Client thread/WARN] [FML]: =============================================================
[17:46:23] [Client thread/WARN] [FML]: MOD HAS DIRECT REFERENCE System.exit() THIS IS NOT ALLOWED REROUTING TO FML!
[17:46:23] [Client thread/WARN] [FML]: Offendor: com/sun/jna/Native.main([Ljava/lang/String;)V
[17:46:23] [Client thread/WARN] [FML]: Use FMLCommonHandler.exitJava instead
[17:46:23] [Client thread/WARN] [FML]: =============================================================
[17:46:24] [Client thread/INFO] [sTDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:246]: ---- Minecraft Crash Report ----

 

Are you referencing any classes in the

com.sun.jna

package?

 

 

Error 2 happens when i load up the world:

[17:51:08] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@634605ca[id=4de10e95-2f24-3513-b65d-4a73193172f6,name=Player802,properties={},legacy=false]
com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time
at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:65) ~[YggdrasilAuthenticationService.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:175) [YggdrasilMinecraftSessionService.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:59) [YggdrasilMinecraftSessionService$1.class:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:56) [YggdrasilMinecraftSessionService$1.class:?]
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3524) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2317) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2280) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2195) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache.get(LocalCache.java:3934) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3938) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4821) [guava-17.0.jar:?]
at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4827) [guava-17.0.jar:?]
at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:165) [YggdrasilMinecraftSessionService.class:?]
at net.minecraft.client.Minecraft.func_181037_M(Minecraft.java:2915) [Minecraft.class:?]
at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:130) [skinManager$3.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_74]
at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_74]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_74]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_74]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_74]

 

This is normal in the development environment. Forge forces the profile properties to filled when the integrated server starts, but there aren't any properties to fill because you're not using a real account. When a player's skin/cape texture is first requested, Minecraft sees that the profile properties are still empty and tries to have them filled; but Yggdrasil rejects the request because the previous request was too recent.

 

 

Also one quick question about crops:

 

How can I make my crop plant not show up in the give command - just like wheat does it?

 

If you don't want a

Block

to exist in

Item

form, simply don't register an

ItemBlock

for it.

 

In 1.8.9, call an overload of

GameRegistry.registerBlock

with a

Class<? extends ItemBlock>

argument and pass

null

as that argument.

 

In 1.9+,

Block

and

Item

registration are separated; so simply don't create or register the

ItemBlock

.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Are you referencing any classes in the
com.sun.jna

package?

 

No, I don't think that I am.

 

 

If you don't want a
Block

to exist in

Item

form, simply don't register an

ItemBlock

for it.

 

In 1.8.9, call an overload of

GameRegistry.registerBlock

with a

Class<? extends ItemBlock>

argument and pass

null

as that argument.

 

In 1.9+,

Block

and

Item

registration are separated; so simply don't create or register the

ItemBlock

.

 

Is this right

GameRegistry.registerBlock(candyPlant, null);

 

because it is telling me that:

The method registerBlock(Block, String) is ambiguous for the type GameRegistry

 

Link to comment
Share on other sites

Are you referencing any classes in the
com.sun.jna

package?

 

No, I don't think that I am.

 

Then I'm not sure why the

Native

class is being loaded.

 

 

If you don't want a
Block

to exist in

Item

form, simply don't register an

ItemBlock

for it.

 

In 1.8.9, call an overload of

GameRegistry.registerBlock

with a

Class<? extends ItemBlock>

argument and pass

null

as that argument.

 

In 1.9+,

Block

and

Item

registration are separated; so simply don't create or register the

ItemBlock

.

 

Is this right

GameRegistry.registerBlock(candyPlant, null);

 

because it is telling me that:

The method registerBlock(Block, String) is ambiguous for the type GameRegistry

 

This is one of the rare occasions where you need to cast

null

to the appropriate type (

Class<? extends ItemBlock>

) to avoid ambiguity.

 

Without the cast, that call matches both the

(Block, String)

and

(Block, Class<? extends ItemBlock>)

overloads. The cast tells the compiler which one you're trying to call.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

So what would the code be?

 

I'm not going to give you the code, even for something this simple.

 

You need to cast the

null

argument to

Class<? extends ItemBlock>

. Do you know how to cast?

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

I don't really know how to null cast.

 

You need to have a solid understanding of Java before you can make a mod.

 

You cast

null

just like you cast any other value. This tutorial explains inheritance and casting.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Or you can declare a local variable of the needed type and initialize it to null before passing it as the argument to the call.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

Or you can declare a local variable of the needed type and initialize it to null before passing it as the argument to the call.

Totally unnecessary and just a way around the fact he doesn't know Java.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

Yup, especially when Eclipse might even offer to write the cast for him as a "quick fix" when he hovers on the ambiguous null.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

Error 1 happens on start up:

[17:46:23] [Client thread/WARN] [FML]: =============================================================
[17:46:23] [Client thread/WARN] [FML]: MOD HAS DIRECT REFERENCE System.exit() THIS IS NOT ALLOWED REROUTING TO FML!
[17:46:23] [Client thread/WARN] [FML]: Offendor: com/sun/jna/Native.main([Ljava/lang/String;)V
[17:46:23] [Client thread/WARN] [FML]: Use FMLCommonHandler.exitJava instead
[17:46:23] [Client thread/WARN] [FML]: =============================================================
[17:46:24] [Client thread/INFO] [sTDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:246]: ---- Minecraft Crash Report ----

 

Are you referencing any classes in the

com.sun.jna

package?

 

Choonster do you know what JNA is and what it does ?

no ? https://github.com/java-native-access/jna/blob/master/www/FunctionalDescription.md

forge needs to hide that error or edit com/sun/jna/Native.main to use FMLCommonHandler.exitJava using asm (line 1495 in Native)

Link to comment
Share on other sites

Choonster do you know what JNA is and what it does ?

no ? https://github.com/java-native-access/jna/blob/master/www/FunctionalDescription.md

forge needs to hide that error or edit com/sun/jna/Native.main to use FMLCommonHandler.exitJava using asm (line 1495 in Native)

 

I was vaguely aware of what it was, but I didn't see any direct references to it in the Minecraft/Forge code so I wasn't sure why it was being loaded. Now that I look a bit closer,

OpenGlHelper

references it through the OSHI

SystemInfo

class.

 

1.10.2 doesn't log this error because

TerminalTransformer.ExitVisitor

(the class responsible for logging it) excludes the

com.sun.jna

package, but this wasn't the case in 1.8.9. The exclusion was added by this commit in 1.9.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

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.