public interface ICustomDurabilityBar
| Modifier and Type | Method and Description |
|---|---|
float |
getCustomDurability(net.minecraft.item.ItemStack stack)
Get the actual value for the custom durability of the item, which controls the width of the drawn bar.
|
int |
getCustomDurabilityColour(net.minecraft.item.ItemStack stack)
Get the colour of the custom durability bar for this item, in RGB format (alpha will always be full)
|
default boolean |
isShowingOtherBar(net.minecraft.item.ItemStack stack)
Is this item already showing a regular durability bar? This controls if the custom bar needs a small Y
offset so both bars can be seen.
|
boolean |
shouldShowCustomDurabilityBar(net.minecraft.item.ItemStack stack)
Check if this item should be showing its custom bar at this time.
|
boolean shouldShowCustomDurabilityBar(net.minecraft.item.ItemStack stack)
stack - the item stackint getCustomDurabilityColour(net.minecraft.item.ItemStack stack)
stack - the item stackfloat getCustomDurability(net.minecraft.item.ItemStack stack)
stack - the item stackdefault boolean isShowingOtherBar(net.minecraft.item.ItemStack stack)
stack - the item stack