-
Notifications
You must be signed in to change notification settings - Fork 37
Description
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:
h = (var0) -> {
return (Boolean)var0.c(f) ? 3 * (Integer)var0.c(e) : 0;
};
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