From 7d02199eb1cc35e0b72fffa4f96edf06ed710be2 Mon Sep 17 00:00:00 2001 From: DaMachinator Date: Sat, 10 Feb 2018 12:39:38 -0500 Subject: [PATCH] Update 1.11.2 EventWrapper --- 1.11.2/src/main/kotlin/matterlink/EventWrapper.kt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/1.11.2/src/main/kotlin/matterlink/EventWrapper.kt b/1.11.2/src/main/kotlin/matterlink/EventWrapper.kt index c987464..4471a74 100644 --- a/1.11.2/src/main/kotlin/matterlink/EventWrapper.kt +++ b/1.11.2/src/main/kotlin/matterlink/EventWrapper.kt @@ -12,7 +12,7 @@ import net.minecraft.tileentity.TileEntityCommandBlock import net.minecraftforge.event.CommandEvent import net.minecraftforge.event.ServerChatEvent import net.minecraftforge.event.entity.living.LivingDeathEvent -import net.minecraftforge.event.entity.player.AdvancementEvent +import net.minecraftforge.event.entity.player.AchievementEvent import net.minecraftforge.fml.common.FMLCommonHandler import net.minecraftforge.fml.common.Mod import net.minecraftforge.fml.common.eventhandler.SubscribeEvent @@ -26,10 +26,9 @@ object EventWrapper { //MC-VERSION & FORGE DEPENDENT @SubscribeEvent @JvmStatic - fun progressEvent(e: AdvancementEvent) { - if (e.advancement.display == null) return + fun progressEvent(e: AchievementEvent) { val name = e.entityPlayer.name - val text = "has made the advancement ${e.advancement.displayText.unformattedText}" + val text = "has earned the achievement ${e.achievement.statName.unformattedText}" ProgressHandler.handleProgress(name, text) }