Class ServerPlayerMixin
java.lang.Object
com.bleudev.nine_lifes.mixin.ServerPlayerMixin
- All Implemented Interfaces:
CustomServerPlayer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected int[]protected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet player lifesintnl$getLifesPlayTime(int lifesCount) Get play time with specifiedlifesCountintGet amethyst stick use effect ticksvoidnl$setLifes(int newLifesCount) Set player lifes tonewLifesCountvoidnl$setStickUsedTicks(int newTicks) Set amethyst stick use effect ticksprotected voidreadCustomData(net.minecraft.world.level.storage.ValueInput input, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) protected voidwriteCustomData(net.minecraft.world.level.storage.ValueOutput output, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci)
-
Field Details
-
lifes
protected int lifes -
lifesPlayTime
protected int[] lifesPlayTime -
stickUsedTicks
protected int stickUsedTicks
-
-
Constructor Details
-
ServerPlayerMixin
public ServerPlayerMixin()
-
-
Method Details
-
nl$getLifes
public int nl$getLifes()Description copied from interface:CustomServerPlayerGet player lifesNote: This method is unstable and use of this method is not recommended. Use
ServerPlayer.lifesinject instead.- Specified by:
nl$getLifesin interfaceCustomServerPlayer- Returns:
- Player lifes
-
nl$setLifes
Description copied from interface:CustomServerPlayerSet player lifes tonewLifesCountNote: This method is unstable and use of this method is not recommended. Use
ServerPlayer.lifesinject instead.- Specified by:
nl$setLifesin interfaceCustomServerPlayer- Parameters:
newLifesCount- New lifes count- Throws:
IllegalArgumentException-newLifesCountout of range[0; 9]
-
nl$getLifesPlayTime
Description copied from interface:CustomServerPlayerGet play time with specifiedlifesCountNote: This method is unstable and use of this method is not recommended. Use
ServerPlayer.lifesPlayTime()inject instead.- Specified by:
nl$getLifesPlayTimein interfaceCustomServerPlayer- Parameters:
lifesCount- Lifes count to get play time with- Returns:
- Play time with specified lifes count
- Throws:
NullPointerException-lifesCountout of range [0; 9]
-
nl$getStickUsedTicks
public int nl$getStickUsedTicks()Description copied from interface:CustomServerPlayerGet amethyst stick use effect ticksNote: This method is unstable and use of this method is not recommended. Use
ServerPlayer.stickUsedTicksinject instead.- Specified by:
nl$getStickUsedTicksin interfaceCustomServerPlayer- Returns:
- Amethyst stick use effect ticks
-
nl$setStickUsedTicks
public void nl$setStickUsedTicks(int newTicks) Description copied from interface:CustomServerPlayerSet amethyst stick use effect ticksNote: This method is unstable and use of this method is not recommended. Use
ServerPlayer.stickUsedTicksinject instead.- Specified by:
nl$setStickUsedTicksin interfaceCustomServerPlayer- Parameters:
newTicks- New amethyst stick use effect ticks
-
readCustomData
protected void readCustomData(net.minecraft.world.level.storage.ValueInput input, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci) -
writeCustomData
protected void writeCustomData(net.minecraft.world.level.storage.ValueOutput output, org.spongepowered.asm.mixin.injection.callback.CallbackInfo ci)
-