Small post-init change/fix

This commit is contained in:
Frank 2022-05-27 17:07:11 +02:00
parent bc565577cb
commit 50fe9c2342

View file

@ -52,10 +52,6 @@ public class PostInitAPI {
* @param isClient {@code boolean}, {@code true} for client, {@code false} for server.
*/
public static void postInit(boolean isClient) {
if (postInitFunctions == null) {
return;
}
postInitFunctions.forEach(function -> function.accept(isClient));
Registry.BLOCK.forEach(block -> {
processBlockCommon(block);
if (isClient) {
@ -67,7 +63,11 @@ public class PostInitAPI {
Registry.ITEM.forEach(item -> {
processItemCommon(item);
});
postInitFunctions = null;
if (postInitFunctions != null) {
postInitFunctions.forEach(function -> function.accept(isClient));
postInitFunctions = null;
}
blockTags = null;
itemTags = null;
BiomeAPI.loadFabricAPIBiomes();