mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Expand PlayerWakupEvent to expose the three parameters passed into EntityPlayer.wakeUp. Closes #1486
This commit is contained in:
1 parent
4cc278a125
commit
81086375e8
2 files changed
+29
-3
No files matched your search
@@ -9,8 +9,34 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
*/
|
||||
public class PlayerWakeUpEvent extends PlayerEvent
|
||||
{
|
||||
@Deprecated //ToDo: Remove in 1.8
|
||||
public PlayerWakeUpEvent(EntityPlayer player)
|
||||
{
|
||||
this(player, false, false, false);
|
||||
}
|
||||
/**
|
||||
* Used for the 'wake up animation'.
|
||||
* This is false if the player is considered 'sleepy' and the overlay should slowly fade away.
|
||||
*/
|
||||
public final boolean wakeImmediatly;
|
||||
|
||||
/**
|
||||
* Indicates if the server should be notified of sleeping changes.
|
||||
* This will only be false if the server is considered 'up to date' already, because, for example, it initiated the call.
|
||||
*/
|
||||
public final boolean updateWorld;
|
||||
|
||||
/**
|
||||
* Indicates if the player's sleep was considered successful.
|
||||
* In vanilla, this is used to determine if the spawn chunk is to be set to the bed's position.
|
||||
*/
|
||||
public final boolean setSpawn;
|
||||
|
||||
public PlayerWakeUpEvent(EntityPlayer player, boolean wakeImmediatly, boolean updateWorld, boolean setSpawn)
|
||||
{
|
||||
super(player);
|
||||
this.wakeImmediatly = wakeImmediatly;
|
||||
this.updateWorld = updateWorld;
|
||||
this.setSpawn = setSpawn;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user