Skip to content

Commit

Permalink
rename event
Browse files Browse the repository at this point in the history
  • Loading branch information
LLytho committed Oct 3, 2023
1 parent 9897c54 commit 1a8fdd9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ private LootTableEvents() {
/**
* This event can be used for post-processing after all loot tables have been loaded and modified by fabric.
*/
public static final Event<Loaded> LOADED = EventFactory.createArrayBacked(Loaded.class, listeners -> (resourceManager, lootManager) -> {
public static final Event<Loaded> ALL_LOADED = EventFactory.createArrayBacked(Loaded.class, listeners -> (resourceManager, lootManager) -> {
for (Loaded listener : listeners) {
listener.onLootTableLoaded(resourceManager, lootManager);
listener.onLootTablesLoaded(resourceManager, lootManager);
}
});

Expand Down Expand Up @@ -133,6 +133,6 @@ public interface Loaded {
* @param resourceManager the server resource manager
* @param lootManager the loot manager
*/
void onLootTableLoaded(ResourceManager resourceManager, LootManager lootManager);
void onLootTablesLoaded(ResourceManager resourceManager, LootManager lootManager);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,6 @@ private void applyLootTableEvents(ResourceManager resourceManager, LootManager l
});

this.keyToValue = newTables.build();
LootTableEvents.LOADED.invoker().onLootTableLoaded(resourceManager, lootManager);
LootTableEvents.ALL_LOADED.invoker().onLootTablesLoaded(resourceManager, lootManager);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void onInitialize() {
}
});

LootTableEvents.LOADED.register((resourceManager, lootManager) -> {
LootTableEvents.ALL_LOADED.register((resourceManager, lootManager) -> {
LootTable blackWoolTable = lootManager.getLootTable(Blocks.BLACK_WOOL.getLootTableId());

if (blackWoolTable == LootTable.EMPTY) {
Expand Down

0 comments on commit 1a8fdd9

Please sign in to comment.