Merge remote-tracking branch 'origin/main' into 1.18
This commit is contained in:
commit
b2a8b7dc97
|
|
@ -26,7 +26,7 @@ public class BlockStateCacheHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void rebuildParallel(boolean force) {
|
public static void rebuildParallel(boolean force) {
|
||||||
synchronized (BlockBehaviour.BlockStateBase.Cache.class) {
|
synchronized (BlockBehaviour.BlockStateBase.class) {
|
||||||
for (BlockState blockState : Block.BLOCK_STATE_REGISTRY) {
|
for (BlockState blockState : Block.BLOCK_STATE_REGISTRY) {
|
||||||
((IBlockState)blockState).clearCache();
|
((IBlockState)blockState).clearCache();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ public abstract class BlockStateBaseMixin implements IBlockState {
|
||||||
private BlockBehaviour.BlockStateBase.Cache initCacheIfNeeded(BlockBehaviour.BlockStateBase base) {
|
private BlockBehaviour.BlockStateBase.Cache initCacheIfNeeded(BlockBehaviour.BlockStateBase base) {
|
||||||
if(cacheInvalid) {
|
if(cacheInvalid) {
|
||||||
// Ensure that only one block's cache is built at a time
|
// Ensure that only one block's cache is built at a time
|
||||||
synchronized (BlockBehaviour.BlockStateBase.Cache.class) {
|
synchronized (BlockBehaviour.BlockStateBase.class) {
|
||||||
if(cacheInvalid) {
|
if(cacheInvalid) {
|
||||||
// Ensure that if we end up in here recursively, we just use the original cache
|
// Ensure that if we end up in here recursively, we just use the original cache
|
||||||
if(!buildingCache) {
|
if(!buildingCache) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user