Skip to content

Commit

Permalink
should solve #15
Browse files Browse the repository at this point in the history
Null?
  • Loading branch information
manmaed committed Jan 23, 2025
1 parent ba4ef10 commit 031b15b
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ public class AntiBlocksReChiseled {

public static final String MOD_ID = "antiblocksrechiseled";
public static final DeferredRegister<CreativeModeTab> CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, MOD_ID);
private static final Logger LOGGER = LogManager.getLogger();
public static final RegistryObject<CreativeModeTab> ABRC_TAB = CREATIVE_MODE_TABS.register(MOD_ID, () -> CreativeModeTab.builder()
.icon(() -> new ItemStack(ABRCBrightColors.BRIGHT_WHITE_BORDER.get()))
.title(Component.translatable("itemGroup." + MOD_ID ))
.displayItems((parameters, output) -> {
for (Item item: ForgeRegistries.ITEMS.getValues()) {
if (item.getCreatorModId(item.getDefaultInstance()).equals(MOD_ID)) {
String creatorModId = item.getCreatorModId(item.getDefaultInstance());
if (creatorModId == null) {
//Null
/* ResourceLocation registryName = ForgeRegistries.ITEMS.getKey(item);
LOGGER.warn("Item '{}' has a null creator mod ID", registryName);*/
} else if (MOD_ID.equals(creatorModId)) {
output.accept(item);
}
}
Expand Down

0 comments on commit 031b15b

Please sign in to comment.