Class OnyxBlockUtils

java.lang.Object
com.zombienw.onyxlib.impl.block.OnyxBlockUtils

public class OnyxBlockUtils extends Object
  • Constructor Details

    • OnyxBlockUtils

      public OnyxBlockUtils()
  • Method Details

    • updateNearbyDisplays

      public static void updateNearbyDisplays(Location origin)
      Update all nearby OnyxBlock ItemDisplay entity light values.
      Parameters:
      origin - The center block
    • updateDisplayLight

      public static void updateDisplayLight(ItemDisplay display)
      Sets the display brightness of an entity based on its environment
      Parameters:
      display - The ItemDisplay entity to re-light
    • hasOnyxId

      public static boolean hasOnyxId(ItemDisplay display)
      Checks if an ItemDisplay entity has any namespaced tag ending with "onyx_id"
      Parameters:
      display - The ItemDisplay to check
      Returns:
      True if a tag is found, false otherwise
    • getMaximumNearbyLight

      public static Display.Brightness getMaximumNearbyLight(Location loc)
      Samples nearby neighbors to get the max appropriate lighting.
      Parameters:
      loc - The center location to sample around.
      Returns:
      A Display.Brightness object with the max block/sky lighting values