Browse Source

Give players 'Enter the Aether' achievement if they login right into the Aether and WorldBelowAether is set to the Aether itself

1.7.10-rivoreo-fork
WHR 3 weeks ago
parent
commit
0f710cd60a
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      src/main/java/com/gildedgames/the_aether/events/AetherEntityEvents.java

+ 8
- 0
src/main/java/com/gildedgames/the_aether/events/AetherEntityEvents.java View File

@@ -6,6 +6,7 @@ import com.gildedgames.the_aether.entities.util.EntityHook;
import com.gildedgames.the_aether.player.PlayerAether;
import com.gildedgames.the_aether.world.AetherWorldProvider;
import com.gildedgames.the_aether.world.AetherTeleporter;
import com.gildedgames.the_aether.registry.achievements.AetherAchievements;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import net.minecraft.entity.player.EntityPlayerMP;
@@ -196,4 +197,11 @@ public class AetherEntityEvents {
event.entity.registerExtendedProperties("aether_legacy:entity_hook", new EntityHook());
}
}

@SubscribeEvent
public void on_player_login(cpw.mods.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent event) {
if(void_teleport_disabled && event.player.worldObj.provider instanceof AetherWorldProvider) {
event.player.triggerAchievement(AetherAchievements.enter_aether);
}
}
}

Loading…
Cancel
Save