Class OnyxBlockUtils
java.lang.Object
com.zombienw.onyxlib.impl.block.OnyxBlockUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Display.BrightnessSamples nearby neighbors to get the max appropriate lighting.static booleanhasOnyxId(ItemDisplay display) Checks if an ItemDisplay entity has any namespaced tag ending with "onyx_id"static voidupdateDisplayLight(ItemDisplay display) Sets the display brightness of an entity based on its environmentstatic voidupdateNearbyDisplays(Location origin) Update all nearby OnyxBlock ItemDisplay entity light values.
-
Constructor Details
-
OnyxBlockUtils
public OnyxBlockUtils()
-
-
Method Details
-
updateNearbyDisplays
Update all nearby OnyxBlock ItemDisplay entity light values.- Parameters:
origin- The center block
-
updateDisplayLight
Sets the display brightness of an entity based on its environment- Parameters:
display- The ItemDisplay entity to re-light
-
hasOnyxId
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
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
-