WIP: Re-Enable REI

This commit is contained in:
Linnea Gräf
2024-12-07 14:45:21 +01:00
parent bf7795df22
commit 4ae0fd6174
9 changed files with 33 additions and 102 deletions

View File

@@ -70,6 +70,12 @@ object ItemCache : IReloadable {
val ItemStack.isBroken
get() = get(FirmamentDataComponentTypes.IS_BROKEN) ?: false
fun ItemStack.withFallback(fallback: ItemStack?): ItemStack {
if (isBroken && fallback != null) return fallback
return this
}
fun brokenItemStack(neuItem: NEUItem?, idHint: SkyblockId? = null): ItemStack {
return ItemStack(Items.PAINTING).apply {
setCustomName(Text.literal(neuItem?.displayName ?: idHint?.neuItem ?: "null"))