Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JEI plugin failure when no potions are registered to the zeta registry, fix crash from ForgeZGatherHints #50

Merged
merged 2 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading