Skip to content

Commit

Permalink
Achievementhandler Fixes (#770)
Browse files Browse the repository at this point in the history
* Add check for BM and Avaritia

* Only execute onEntityUpdate on the logical server
  • Loading branch information
glowredman authored Dec 4, 2023
1 parent ed94c08 commit f67998d
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 @@ -18,6 +18,7 @@
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent.Phase;
import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;
import cpw.mods.fml.relauncher.Side;
import fox.spiteful.avaritia.items.LudicrousItems;

public class AchievementHandler {
Expand Down Expand Up @@ -50,7 +51,7 @@ public static void init() {

@SubscribeEvent
public void onEntityUpdate(PlayerTickEvent event) {
if (event.phase == Phase.START) {
if (event.side == Side.CLIENT || event.phase == Phase.START) {
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/dreammaster/main/MainRegistry.java
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ public void CompleteLoad(FMLLoadCompleteEvent event) {
BW_RadHatchMaterial.runRadHatchAdder();
}
if (Thaumcraft.isModLoaded()) TCLoader.checkRecipeProblems();
if (Loader.isModLoaded("amazingtrophies")) {
if (Loader.isModLoaded("amazingtrophies") && BloodMagic.isModLoaded() && Avaritia.isModLoaded()) {
AchievementHandler.init();
AchievementHandler handler = new AchievementHandler();
MinecraftForge.EVENT_BUS.register(handler);
Expand Down

0 comments on commit f67998d

Please sign in to comment.