Class DifficultyChangeEvent


  • public class DifficultyChangeEvent
    extends net.minecraftforge.eventbus.api.Event
    DifficultyChangeEvent is fired when difficulty is changing.

    This event is fired via the ForgeHooks#onDifficultyChange(EnumDifficulty, EnumDifficulty).

    This event does not have a result. Event.HasResult

    This event is fired on the MinecraftForge.EVENT_BUS.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event

        net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Difficulty getDifficulty()  
      Difficulty getOldDifficulty()  
      • Methods inherited from class net.minecraftforge.eventbus.api.Event

        getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • oldDifficulty

        private final Difficulty oldDifficulty
    • Constructor Detail

      • DifficultyChangeEvent

        public DifficultyChangeEvent​(Difficulty difficulty,
                                     Difficulty oldDifficulty)
    • Method Detail

      • getDifficulty

        public Difficulty getDifficulty()
      • getOldDifficulty

        public Difficulty getOldDifficulty()