-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathIGliderCapabilityHandler.java
More file actions
55 lines (47 loc) · 1.79 KB
/
IGliderCapabilityHandler.java
File metadata and controls
55 lines (47 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.crowsofwar.avatar.api.capabilities;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.util.INBTSerializable;
/**
* This interface defines the contract to deal with the gliding status of a player.
* Handled internally/exposed through capabilities.
*
* Acquire an instance of this using {@link net.minecraft.entity.Entity#getCapability(Capability, EnumFacing)}.
* It should only ever be present on players.
*/
public interface IGliderCapabilityHandler extends INBTSerializable<NBTTagCompound> {
/**
* Get the current gliding status of the player.
* If True, it inherently must mean that the glider is deployed as well.
*
* @return - True if the player is gliding, False otherwise.
*/
boolean getIsPlayerGliding();
/**
* Set the player's current gliding status.
* If True, it inherently must mean that the glider is deployed as well.
*
* @param isPlayerGliding - True if the player is gliding, False otherwise.
*/
void setIsPlayerGliding(boolean isPlayerGliding);
/**
* Get the current deployment status of the glider on the player.
*
* @return True is the player has a deployed glider, False otherwise.
*/
boolean getIsGliderDeployed();
/**
* Set the player's glider's deployment status.
*
* @param isGliderDeployed - True if the glider is deployed, False otherwise.
*/
void setIsGliderDeployed(boolean isGliderDeployed);
/**
* Sync the (above) data stored in the capability to a given player.
*
* @param player - the player to sync the data to.
*/
void sync(EntityPlayerMP player);
}