Class NbtCradle

java.lang.Object
com.samsthenerd.inline.utils.EntityCradle
com.samsthenerd.inline.utils.cradles.NbtCradle

public class NbtCradle extends EntityCradle
An entity cradle backed by the entity's full nbt data
  • 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

      public EntityCradle.CradleType<?> getType()
      Specified by:
      getType in class EntityCradle
    • 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 class EntityCradle
      Returns:
      an entity based on this cradle