Skip to content

Commit

Permalink
Fix creative tab modifiers overwriting previous values
Browse files Browse the repository at this point in the history
  • Loading branch information
tterrag1098 committed Jun 10, 2023
1 parent 8c2741d commit 52fc07d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/tterrag/registrate/AbstractRegistrate.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public static boolean isDevEnvironment() {

private final Table<Pair<String, ResourceKey<? extends Registry<?>>>, ProviderType<?>, Consumer<? extends RegistrateProvider>> datagensByEntry = HashBasedTable.create();
private final ListMultimap<ProviderType<?>, @NonnullType NonNullConsumer<? extends RegistrateProvider>> datagens = ArrayListMultimap.create();
private final Map<Supplier<? extends CreativeModeTab>, Consumer<CreativeModeTabModifier>> creativeModeTabModifiers = Maps.newLinkedHashMap();
private final Multimap<Supplier<? extends CreativeModeTab>, Consumer<CreativeModeTabModifier>> creativeModeTabModifiers = HashMultimap.create();
private final List<CreativeModeTabRegistration> creativeModeTabsRegistrars = Lists.newArrayList();
@Nullable private Supplier<? extends CreativeModeTab> defaultCreativeModeTab = null;

Expand Down Expand Up @@ -872,7 +872,7 @@ public S creativeModeTab(Supplier<? extends CreativeModeTab> creativeModeTab) {
* Registeres a new callback to be invoked during the {@link CreativeModeTabEvent.BuildContents} event and
* used to modify what items are displayed on the given {@link CreativeModeTab}.
* <p>
* Calling this method multiple times will replace previously registered callbacks.
* Calling this method multiple times will add additional callbacks.
*
* @param creativeModeTab The {@link CreativeModeTab} to register this callback for
* @param modifier The modifier callback to be registered
Expand Down

0 comments on commit 52fc07d

Please sign in to comment.