Update 1.11.2 EventWrapper

This commit is contained in:
DaMachinator 2018-02-10 12:39:38 -05:00 committed by Arcanitor
parent 25896551bd
commit 7d02199eb1
1 changed files with 3 additions and 4 deletions

View File

@ -12,7 +12,7 @@ import net.minecraft.tileentity.TileEntityCommandBlock
import net.minecraftforge.event.CommandEvent import net.minecraftforge.event.CommandEvent
import net.minecraftforge.event.ServerChatEvent import net.minecraftforge.event.ServerChatEvent
import net.minecraftforge.event.entity.living.LivingDeathEvent 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.FMLCommonHandler
import net.minecraftforge.fml.common.Mod import net.minecraftforge.fml.common.Mod
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
@ -26,10 +26,9 @@ object EventWrapper {
//MC-VERSION & FORGE DEPENDENT //MC-VERSION & FORGE DEPENDENT
@SubscribeEvent @SubscribeEvent
@JvmStatic @JvmStatic
fun progressEvent(e: AdvancementEvent) { fun progressEvent(e: AchievementEvent) {
if (e.advancement.display == null) return
val name = e.entityPlayer.name 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) ProgressHandler.handleProgress(name, text)
} }