Class CustomComplexFurniture

java.lang.Object
dev.lone.itemsadder.api.CustomComplexFurniture

public class CustomComplexFurniture extends Object
Wrapper for complex furniture backed by a custom entity renderer.
  • Constructor Details

    • CustomComplexFurniture

      public CustomComplexFurniture()
  • Method Details

    • getNamespacedIdsInRegistry

      public static Set<String> getNamespacedIdsInRegistry()
      Gets all complex furniture namespaced ids currently registered.
      Returns:
      the registered complex furniture namespaced ids.
    • byAlreadySpawned

      @Nullable public static @Nullable CustomComplexFurniture byAlreadySpawned(LivingEntity entity)
      Gets a complex furniture wrapper from an already spawned base entity.
      Parameters:
      entity - the Bukkit base entity.
      Returns:
      the complex furniture wrapper, or null if the entity is not complex furniture.
    • byAlreadySpawned

      @Nullable public static @Nullable CustomComplexFurniture byAlreadySpawned(Block block)
      Gets a complex furniture wrapper from a block occupied by a complex furniture entity.
      Parameters:
      block - the block to check.
      Returns:
      the complex furniture wrapper, or null if no complex furniture is found.
    • spawn

      @Nullable public static @Nullable CustomComplexFurniture spawn(String namespacedId, Location location, BlockFace blockFace, boolean forceNonSolid)
      Spawns complex furniture in the world.
      Parameters:
      namespacedId - the complex furniture namespaced id.
      location - the spawn location.
      blockFace - the placement direction.
      forceNonSolid - true to place it as non-solid.
      Returns:
      the spawned complex furniture wrapper, or null if it cannot be spawned.
    • remove

      public void remove(boolean dropItem)
      Removes this complex furniture from the world.
      Parameters:
      dropItem - true to drop the furniture item.
    • remove

      public static void remove(LivingEntity entity, boolean dropItem)
      Removes a complex furniture entity from the world.
      Parameters:
      entity - the base entity of the complex furniture.
      dropItem - true to drop the furniture item.
    • teleport

      public void teleport(Entity destinationEntity)
      Teleports this complex furniture to another entity location.
      Parameters:
      destinationEntity - the destination entity.
    • teleport

      public void teleport(Location location)
      Teleports this complex furniture to a location.
      Parameters:
      location - the destination location.
    • setColor

      public void setColor(Color color)
      Applies a color to all bones of the complex furniture renderer.
      Parameters:
      color - the color to apply.
    • getOriginalLightLevel

      @Nullable public @Nullable Integer getOriginalLightLevel()
      Gets the light level configured for this complex furniture.
      Returns:
      the configured light level, or null if not configured.
    • getOriginalIsSolid

      @Nullable public @Nullable Boolean getOriginalIsSolid()
      Gets whether this complex furniture is configured as solid.
      Returns:
      true if solid, false if non-solid, or null if not configured.
    • setCurrentLightLevel

      public void setCurrentLightLevel(int level)
      Sets the current light level emitted by this complex furniture.
      Parameters:
      level - the new light level.
    • getEntity

      public LivingEntity getEntity()
      Get the Bukkit base entity for this custom complex furniture.
      Returns:
      null if it's not spawned in world