Class NbtCradle
java.lang.Object
com.samsthenerd.inline.utils.EntityCradle
com.samsthenerd.inline.utils.cradles.NbtCradle
An entity cradle backed by the entity's full nbt data
-
Nested Class Summary
Nested classes/interfaces inherited from class com.samsthenerd.inline.utils.EntityCradle
EntityCradle.CradleType<C extends EntityCradle>
-
Field Summary
Fields inherited from class com.samsthenerd.inline.utils.EntityCradle
CRADLE_CODEC
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.samsthenerd.inline.utils.EntityCradle
addCradleType, getId
-
Constructor Details
-
NbtCradle
public NbtCradle(net.minecraft.entity.Entity entity) -
NbtCradle
public NbtCradle(net.minecraft.nbt.NbtCompound tag)
-
-
Method Details
-
getTag
public net.minecraft.nbt.NbtCompound getTag() -
getType
- Specified by:
getType
in classEntityCradle
-
getEntity
public net.minecraft.entity.Entity getEntity(net.minecraft.world.World world) Description copied from class:EntityCradle
Supplies an entity wrapped by the cradle. This isn't guaranteed to be server-safe.Implementations should try to cache their entity if possible.
- Specified by:
getEntity
in classEntityCradle
- Returns:
- an entity based on this cradle
-