Skip to content

Commit

Permalink
Fix JEI plugin failure when no potions are registered to the zeta reg…
Browse files Browse the repository at this point in the history
…istry, fix crash from ForgeZGatherHints (#50)
  • Loading branch information
mezz authored Sep 10, 2024
1 parent e7c935f commit 72376d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,6 @@ protected <O> void trackRegisteredObject(ResourceKey<Registry<O>> keyGeneric, Ho
* Gets all the registered objects from this Zeta
*/
public <O> Collection<Holder<O>> getRegisteredObjects(ResourceKey<Registry<O>> registry) {
return (Collection<Holder<O>>) (Collection) myRegisteredObjects.get((ResourceKey) registry);
return (Collection<Holder<O>>) (Collection) myRegisteredObjects.getOrDefault((ResourceKey) registry, List.of());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
import net.minecraft.network.chat.Component;
import net.minecraft.world.level.ItemLike;
import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.fml.event.IModBusEvent;
import org.violetmoon.zeta.config.ConfigFlagManager;
import org.violetmoon.zeta.event.load.ZGatherHints;
import org.violetmoon.zeta.module.ZetaModule;

public class ForgeZGatherHints extends Event implements ZGatherHints {
public class ForgeZGatherHints extends Event implements ZGatherHints, IModBusEvent {
private final ZGatherHints wrapped;

public ForgeZGatherHints(ZGatherHints e) {
Expand Down

0 comments on commit 72376d4

Please sign in to comment.