Jump to content

[Solved] Integer not incrementing (It sounds weird, I know) [1.6]


larsgerrits

Recommended Posts

Hello once again,

 

This time i have a very simple problem for you guys, but i can't see it. The problem is that i use this code:

this.redstonePower+=1000;

but that won't increment, it just stays at 0.

 

Any ideas why?

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

Ok, so it actually wasn't the

this.redstonePower+=1000;

, but this code

public int getRedstonePowerScaled(int scaleFactor)
{
     System.out.println(this.redstonePower * scaleFactor)
}

and i'm passing 27 as my scaleFactor, but it's just returning 0, even when the redstonePower > 1000 is. When i have the System.out.println() in my smeltItem() method (i'm making a sort-of furnace type thingy) it gives the right value, but if i put the same System.out.println() in my getRedstonePowerScaled method, it doesn't work.

 

Any ideas? I will not be responding so quickly, because i'm gonna sleep now ( i'm 14 years old and it's 03:30 AM here in the netherlands :) )

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

That isn't actually printing the value of redstonePower nor the code that increments the variable.

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.

Link to comment
Share on other sites

That could be... But how would i resolve that? I know it uses the getDescriptionPacket or something like that method, but i don't know how to use it. Maybe you could give a example?

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

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.