mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
After internal discussion, it was decided that we need to include "contributors" to the license header. This avoids claiming that the Java source files are under the exclusive copyright ownership of Forge LLC, which excludes contributors that still hold copyright ownership over their contributions (but is licensed under the LGPLv2.1 as stated in the Forge CLA).
43 lines
1.1 KiB
Java
43 lines
1.1 KiB
Java
/*
|
|
* Copyright (c) Forge Development LLC and contributors
|
|
* SPDX-License-Identifier: LGPL-2.1-only
|
|
*/
|
|
|
|
package net.minecraftforge.event;
|
|
|
|
import net.minecraft.world.Difficulty;
|
|
import net.minecraftforge.common.ForgeHooks;
|
|
import net.minecraftforge.common.MinecraftForge;
|
|
import net.minecraftforge.eventbus.api.Event;
|
|
|
|
/**
|
|
* DifficultyChangeEvent is fired when difficulty is changing. <br>
|
|
* <br>
|
|
* This event is fired via the {@link ForgeHooks#onDifficultyChange(Difficulty, Difficulty)}.<br>
|
|
* <br>
|
|
* This event does not have a result. {@link HasResult}<br>
|
|
* <br>
|
|
* This event is fired on the {@link MinecraftForge#EVENT_BUS}.
|
|
**/
|
|
public class DifficultyChangeEvent extends Event
|
|
{
|
|
private final Difficulty difficulty;
|
|
private final Difficulty oldDifficulty;
|
|
|
|
public DifficultyChangeEvent(Difficulty difficulty, Difficulty oldDifficulty)
|
|
{
|
|
this.difficulty = difficulty;
|
|
this.oldDifficulty = oldDifficulty;
|
|
}
|
|
|
|
public Difficulty getDifficulty()
|
|
{
|
|
return difficulty;
|
|
}
|
|
|
|
public Difficulty getOldDifficulty()
|
|
{
|
|
return oldDifficulty;
|
|
}
|
|
}
|