Skip to content

Commit

Permalink
adv modifiers back to load bus. Idk why this was moved
Browse files Browse the repository at this point in the history
  • Loading branch information
MehVahdJukaar committed Aug 1, 2024
1 parent 8075d2c commit 398dc1b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public void addModifier(IAdvancementModifier mod) {
public void addListeners(ZAddReloadListener event) {
if(!gatheredAddons) {
IAdvancementModifierDelegate delegateImpl = new DelegateImpl();
zeta.playBus.fire(new ZGatherAdvancementModifiers() {
zeta.loadBus.fire(new ZGatherAdvancementModifiers() {
@Override
public void register(IAdvancementModifier modifier) {
addModifier(modifier);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import net.minecraft.world.level.block.Block;
import org.violetmoon.zeta.event.bus.IZetaPlayEvent;

public interface ZGatherAdvancementModifiers extends IZetaPlayEvent {
public interface ZGatherAdvancementModifiers extends IZetaLoadEvent {
void register(IAdvancementModifier modifier);

IAdvancementModifierDelegate getDelegate();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package org.violetmoon.zetaimplforge.api;

import net.minecraftforge.fml.event.IModBusEvent;
import org.violetmoon.zeta.Zeta;
import org.violetmoon.zeta.api.IAdvancementModifier;
import org.violetmoon.zeta.api.IAdvancementModifierDelegate;
import org.violetmoon.zeta.event.load.ZGatherAdvancementModifiers;

import net.minecraftforge.eventbus.api.Event;

public class ForgeZGatherAdvancementModifiers extends Event implements ZGatherAdvancementModifiers {
public class ForgeZGatherAdvancementModifiers extends Event implements ZGatherAdvancementModifiers, IModBusEvent {
private final ZGatherAdvancementModifiers wrapped;

public ForgeZGatherAdvancementModifiers(ZGatherAdvancementModifiers inner) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ public <ZF extends Z, ZB extends Z> void registerSubClass(Class<ZB> baseZetaEven
r.registerSubClass(ZConfigChanged.class, ForgeZConfigChange.class);
r.registerSubClass(ZLoadComplete.class, ForgeZLoadComplete.class);

//zeta own
r.registerSubClass(ZGatherAdvancementModifiers.class, ForgeZGatherAdvancementModifiers.class);

// client ones again?
if (FMLEnvironment.dist == Dist.DEDICATED_SERVER) return;

Expand Down Expand Up @@ -251,7 +254,6 @@ public <ZF extends Z, ZB extends Z> void registerSubClass(Class<ZB> baseZetaEven
r.registerSubClass(ZServerTick.Start.class, ForgeZServerTick.Start.class);
r.registerSubClass(ZServerTick.End.class, ForgeZServerTick.End.class);
r.registerSubClass(ZAddReloadListener.class, ForgeZAddReloadListener.class);
r.registerSubClass(ZGatherAdvancementModifiers.class, ForgeZGatherAdvancementModifiers.class);
r.registerSubClass(ZGatherHints.class, ForgeZGatherHints.class);
r.registerSubClass(ZSleepingLocationCheck.class, ForgeZSleepingLocationCheck.class);
r.registerSubClass(ZAnimalTame.class, ForgeZAnimalTame.class);
Expand Down

0 comments on commit 398dc1b

Please sign in to comment.