aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornea <romangraef@gmail.com>2022-07-26 12:42:11 +0200
committernea <romangraef@gmail.com>2022-07-26 12:42:11 +0200
commit3aa6b486d80654f4c3ca284f665d1293555adb72 (patch)
treeae024a4f369a924629213fdc42c7f3a4c303bef6
parent37218614c6d7f8a903b6532196dfa7d1e94a948f (diff)
downloadfirmament-3aa6b486d80654f4c3ca284f665d1293555adb72.tar.gz
firmament-3aa6b486d80654f4c3ca284f665d1293555adb72.tar.bz2
firmament-3aa6b486d80654f4c3ca284f665d1293555adb72.zip
Cheatable
-rw-r--r--common/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUReiPlugin.kt15
1 files changed, 7 insertions, 8 deletions
diff --git a/common/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUReiPlugin.kt b/common/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUReiPlugin.kt
index 0fb3621..ccb9b0b 100644
--- a/common/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUReiPlugin.kt
+++ b/common/src/main/kotlin/moe/nea/notenoughupdates/rei/NEUReiPlugin.kt
@@ -16,7 +16,6 @@ import me.shedaniel.rei.api.common.entry.type.EntryDefinition
import me.shedaniel.rei.api.common.entry.type.EntryType
import me.shedaniel.rei.api.common.entry.type.EntryTypeRegistry
import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes
-import me.shedaniel.rei.api.common.util.EntryStacks
import moe.nea.notenoughupdates.LegacyTagParser
import moe.nea.notenoughupdates.NotEnoughUpdates.neuRepo
import net.minecraft.ChatFormatting
@@ -31,7 +30,6 @@ import net.minecraft.util.datafix.DataFixers.getDataFixer
import net.minecraft.util.datafix.fixes.References
import net.minecraft.world.item.ItemStack
import net.minecraft.world.item.Items
-import net.minecraft.world.item.enchantment.Enchantments
import java.util.concurrent.ConcurrentHashMap
import java.util.stream.Stream
@@ -77,7 +75,7 @@ class NEUReiPlugin : REIClientPlugin {
}
val itemInstance = ItemStack.of(itemTag_modern)
return itemInstance.also {
- if(false)it.appendLore(
+ if (false) it.appendLore(
listOf(
TextComponent("Old: $minecraftItemId").withStyle {
it.withItalic(false).withColor(ChatFormatting.RED)
@@ -87,7 +85,6 @@ class NEUReiPlugin : REIClientPlugin {
},
)
)
- it.hoverName = TextComponent(this.skyblockItemId)
}
}
@@ -109,6 +106,10 @@ class NEUReiPlugin : REIClientPlugin {
return o1 == o2
}
+ override fun cheatsAs(entry: EntryStack<NEUItem>?, value: NEUItem?): ItemStack? {
+ return value?.asItemStack()
+ }
+
override fun getValueType(): Class<NEUItem> = NEUItem::class.java
override fun getType(): EntryType<NEUItem> =
EntryType.deferred(hehe)
@@ -181,10 +182,8 @@ class NEUReiPlugin : REIClientPlugin {
override fun registerEntries(registry: EntryRegistry) {
neuRepo.items.items.values.forEach {
- registry.addEntry(EntryStack.of(SBItemEntryDefinition, it))
+ if (!it.isVanilla)
+ registry.addEntry(EntryStack.of(SBItemEntryDefinition, it))
}
- registry.addEntry(EntryStacks.of(ItemStack(Items.DIAMOND).also {
- it.enchant(Enchantments.ALL_DAMAGE_PROTECTION, 10)
- }))
}
}