public interface BehaviorProvider
Modifier and Type | Method and Description |
---|---|
java.lang.Iterable<Behavior> |
createBehaviors(net.minecraft.entity.player.PlayerEntity player)
Create all behaviors valid for the specified player.
|
Behavior |
load(net.minecraft.entity.player.PlayerEntity player,
net.minecraft.nbt.CompoundNBT nbt)
Restore a behavior from NBT.
|
net.minecraft.nbt.CompoundNBT |
save(Behavior behavior)
Write a behavior to NBT.
|
java.lang.Iterable<Behavior> createBehaviors(net.minecraft.entity.player.PlayerEntity player)
save(li.cil.oc.api.nanomachines.Behavior)
and load(net.minecraft.entity.player.PlayerEntity, net.minecraft.nbt.CompoundNBT)
.player
- the player the behaviors should be created for.net.minecraft.nbt.CompoundNBT save(Behavior behavior)
createBehaviors(net.minecraft.entity.player.PlayerEntity)
, so make sure to save all your behaviors.behavior
- the behavior to serialize.Behavior load(net.minecraft.entity.player.PlayerEntity player, net.minecraft.nbt.CompoundNBT nbt)
player
- the player the behaviors should be created for.nbt
- the tag to restore the behavior from.