Skip to content

Commit

Permalink
fix: dont use deprecated bus method
Browse files Browse the repository at this point in the history
  • Loading branch information
bconlon1 committed May 11, 2024
1 parent 4f27da0 commit 6336c23
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import com.aetherteam.treasure_reforging.item.ReforgingItems;
import com.aetherteam.treasure_reforging.recipe.TreasureReforgingRecipeSerializers;
import com.mojang.logging.LogUtils;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.javafmlmod.FMLJavaModLoadingContext;
import net.neoforged.neoforge.registries.DeferredRegister;
import org.slf4j.Logger;

Expand All @@ -16,9 +16,8 @@ public class TreasureReforging {
public static final String MODID = "aether_treasure_reforging";
public static final Logger LOGGER = LogUtils.getLogger();

public TreasureReforging() {
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
modEventBus.addListener(ReforgingData::dataSetup);
public TreasureReforging(IEventBus bus, Dist dist) {
bus.addListener(ReforgingData::dataSetup);

DeferredRegister<?>[] registers = {
ReforgingBlocks.BLOCKS,
Expand All @@ -27,7 +26,7 @@ public TreasureReforging() {
};

for (DeferredRegister<?> register : registers) {
register.register(modEventBus);
register.register(bus);
}
}
}

0 comments on commit 6336c23

Please sign in to comment.