Make blockstate model loader more resilient
This commit is contained in:
parent
a0f391e258
commit
9d584d13d2
|
|
@ -56,10 +56,13 @@ public abstract class BlockStateModelLoaderMixin implements IBlockStateModelLoad
|
||||||
ModernFix.LOGGER.error("Exception filtering states on {}", location, e);
|
ModernFix.LOGGER.error("Exception filtering states on {}", location, e);
|
||||||
filteredStates = null;
|
filteredStates = null;
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
this.loadBlockStateDefinitions(location.id(), optionalBlock.get().getStateDefinition());
|
this.loadBlockStateDefinitions(location.id(), optionalBlock.get().getStateDefinition());
|
||||||
|
} finally {
|
||||||
filteredStates = null;
|
filteredStates = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Redirect(method = "loadAllBlockStates", at = @At(value = "INVOKE", target = "Lnet/minecraft/core/DefaultedRegistry;iterator()Ljava/util/Iterator;"))
|
@Redirect(method = "loadAllBlockStates", at = @At(value = "INVOKE", target = "Lnet/minecraft/core/DefaultedRegistry;iterator()Ljava/util/Iterator;"))
|
||||||
private Iterator<?> skipIteratingBlocks(DefaultedRegistry instance) {
|
private Iterator<?> skipIteratingBlocks(DefaultedRegistry instance) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user