You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in 1.17, candles were added, which can be stacked up to 4 in a single block
Light level emitted by candles depends on the amount of candles in block and their lit status, which is handled by the lambda in the candle block class looking like follows:
Since passed lambda is initialized inside of the BlockCandle as a static field and then referenced in Blocks class, currently burger will not resolve it properly through intercepting GETSTATIC, so default object will be returned, which will cause JSON serialization issues down the line
Simplest solution would be to hard-code light level of 12 to candles, by looking at the signature of the field get and falling back to hard-coded value. Obviously proper solution would involve looking into static fields and their initializers, but it's rather hard and requires investigating code outside of the primary blocks class
The text was updated successfully, but these errors were encountered:
Thanks for looking into this; I was aware of the problem but hadn't had time to look into it.
I believe sea pickles behave similarly, but Burger currently just skips them and doesn't assign any light information. That would probably be appropriate for candles as well. Hardcoding a specific value seems less useful to me.
bandaid solution I implemented locally was simply not assigning light information if provided object is not an int, but obviously it's a hacky one and there should probably be a proper way to intercept that, but unfortunately i'm not that familiar with jawa python package (and python in general) to find it quickly
in 1.17, candles were added, which can be stacked up to 4 in a single block
Light level emitted by candles depends on the amount of candles in block and their lit status, which is handled by the lambda in the candle block class looking like follows:
Since passed lambda is initialized inside of the BlockCandle as a static field and then referenced in Blocks class, currently burger will not resolve it properly through intercepting GETSTATIC, so default object will be returned, which will cause JSON serialization issues down the line
Simplest solution would be to hard-code light level of 12 to candles, by looking at the signature of the field get and falling back to hard-coded value. Obviously proper solution would involve looking into static fields and their initializers, but it's rather hard and requires investigating code outside of the primary blocks class
The text was updated successfully, but these errors were encountered: