Package net.kamkeyke.raccooncore.util
Class PlayerCapabilityUtils
java.lang.Object
net.kamkeyke.raccooncore.util.PlayerCapabilityUtils
Utility methods for player capability handling.
Yes, there's only one method, I know...
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends IPlayerCapability<T>>
voidcloneOnDeath(net.minecraftforge.event.entity.player.PlayerEvent.Clone event, net.minecraftforge.common.capabilities.Capability<T> capability) Clones a capability from the original player to the new player instance.
-
Constructor Details
-
PlayerCapabilityUtils
public PlayerCapabilityUtils()
-
-
Method Details
-
cloneOnDeath
public static <T extends IPlayerCapability<T>> void cloneOnDeath(net.minecraftforge.event.entity.player.PlayerEvent.Clone event, net.minecraftforge.common.capabilities.Capability<T> capability) Clones a capability from the original player to the new player instance.Should be called inside
PlayerEvent.Clone. Only performs cloning ifwasDeathis true.- Type Parameters:
T- capability type extending IPlayerCapability- Parameters:
event- the PlayerEvent.Clone eventcapability- the capability instance
-