Illuminations ๐Ÿ”ฅ

Illuminations ๐Ÿ”ฅ

6M Downloads

Need caches for some predicate

SettingDust opened this issue ยท 0 comments

commented

I'll try to fix these. For recording.

https://github.com/Ladysnake/Illuminations/blob/main/src/main/java/ladysnake/illuminations/client/Illuminations.java#L88

  • The LocalDate.now().getMonth() need cache.
  • world.getLightLevel(blockPos), world.getBlockState(blockPos).getBlock() maybe. If cache too many, can cause desync. If loweer size, won't take effect. Need test

https://github.com/Ladysnake/Illuminations/blob/main/src/main/java/ladysnake/illuminations/client/Illuminations.java#L80-L84

  • Use the cache with above Need test

Due to https://github.com/Ladysnake/Illuminations/blob/974b2ea0a3006c25491ce63b6aaec9d4af5835d5/src/main/java/ladysnake/illuminations/mixin/ClientWorldMixin.java. The predicates above are called at "same" time. So, need cache for block state/block type.