Jump to content

Some recompile errors with reflection


Alexiy

Recommended Posts

Eclipse doesn't complain about anything, but recompile.bat gives:

== MCP 7.44 (data: 7.44, client: 1.5.1, server: 1.5.1) ==
# found ff, ff patches, srgs, name csvs, doc csvs, param csvs, renumber csv, ast
yle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.6.0_25\bin\javac" -encoding UTF-8 -Xlint:-options -
deprecation -g -sourc...' failed : 1

== ERRORS FOUND ==

src\minecraft\notEnoghKnowledge\mod_NotEnoghKnowledge.java:86: inconvertible typ
es
found   : java.lang.Object
required: boolean
                                                boolean in=(boolean) isPointInRe
gion.invoke(containerGui,slot.xDisplayPosition,slot.yDisplayPosition,16,16,mouse
X,mouseY);

           ^

src\minecraft\notEnoghKnowledge\mod_NotEnoghKnowledge.java:121: type parameters
of <T>T cannot be determined; no unique maximal instance exists for type variabl
e T with upper bounds int,java.lang.Object
                                                        int damage=ModLoader.get
PrivateValue(ItemSword.class, sword, 0);

            ^

src\minecraft\notEnoghKnowledge\mod_NotEnoghKnowledge.java:157: type parameters
of <T>T cannot be determined; no unique maximal instance exists for type variabl
e T with upper bounds boolean,java.lang.Object
                                                        boolean alwaysEdible=Mod
Loader.getPrivateValue(ItemFood.class, food, 4);

                      ^

3 errors
15 warnings
==================

!! Can not find server sources, try decompiling !!
Press any key to continue . . .

Link to comment
Share on other sites

(I'm assuming "Eclipse doesn't complain about anything" means "I can compile it and run in Eclipse".)

 

Are you using same Java version in eclipse (1.6)? Also some source code would be useful.

mnn.getNativeLang() != English

If I helped you please click on the "thank you" button.

Link to comment
Share on other sites

(I'm assuming "Eclipse doesn't complain about anything" means "I can compile it and run in Eclipse".)

 

Are you using same Java version in eclipse (1.6)? Also some source code would be useful.

 

From what I've seen codewise in the error is that you (the thread poster) are trying to cast an Object (which is returned by the invoke method) into a boolean. You cannot cast Objects into primitive datatypes directly, except it's the wrapper object of that specific datatype, so I suggest you change the (boolean) to (Boolean). Boolean is the wrapper object class for the datatype boolean.

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

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