August 31, 20205 yr Author 3 hours ago, diesieben07 said: Call AbstractBlock.Properties#func_235838_a_ when creating your block properties. do i assign int to it
August 31, 20205 yr I don't know, what's the method signature? 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.
August 31, 20205 yr 1 hour ago, PutoPug said: do i assign int to it Call func_235838_a_ passing a lambda expression that returns the light level. Like this: .func_235838_a_((lightLevel) -> 10) Where 10 is the light level you expect it to have.
August 31, 20205 yr 1 hour ago, samjviana said: Call func_235838_a_ passing a lambda expression that returns the light level. Like this: .func_235838_a_((lightLevel) -> 10) Where 10 is the light level you expect it to have. FYI, the parameter you've named "lightLevel" there is badly named. That's a parameter in and is most likely a BlockState 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.
August 31, 20205 yr 30 minutes ago, Draco18s said: FYI, the parameter you've named "lightLevel" there is badly named. That's a parameter in and is most likely a BlockState I know that the function should receive ToIntFunction<BlockState>, i just named the parameter as "lightLevel" because the number returned is the light level that the block will have. And i couldn't think in a better/proper way to name it. But thanks, btw what would you recommend then?
August 31, 20205 yr 42 minutes ago, samjviana said: i just named the parameter as "lightLevel" because the number returned is the light level that the block will have But that's not what that means. What you just said is equivalent to this: int anonymousFunction(BlockState lightLevelToReturn) { return 10; } Notice how the thing named "light level" is not, in fact, the light level? 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.
August 31, 20205 yr 1 hour ago, Draco18s said: But that's not what that means. What you just said is equivalent to this: int anonymousFunction(BlockState lightLevelToReturn) { return 10; } Notice how the thing named "light level" is not, in fact, the light level? 🤔🤔 Ooh, you're right. So to get the light level first the BlockState is passed as parameters. Now i get it, didn't realize that. I haven't gotten used to lamba expressions yet
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.