Cheatable
This commit is contained in:
@@ -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.EntryType
|
||||||
import me.shedaniel.rei.api.common.entry.type.EntryTypeRegistry
|
import me.shedaniel.rei.api.common.entry.type.EntryTypeRegistry
|
||||||
import me.shedaniel.rei.api.common.entry.type.VanillaEntryTypes
|
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.LegacyTagParser
|
||||||
import moe.nea.notenoughupdates.NotEnoughUpdates.neuRepo
|
import moe.nea.notenoughupdates.NotEnoughUpdates.neuRepo
|
||||||
import net.minecraft.ChatFormatting
|
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.util.datafix.fixes.References
|
||||||
import net.minecraft.world.item.ItemStack
|
import net.minecraft.world.item.ItemStack
|
||||||
import net.minecraft.world.item.Items
|
import net.minecraft.world.item.Items
|
||||||
import net.minecraft.world.item.enchantment.Enchantments
|
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
import java.util.stream.Stream
|
import java.util.stream.Stream
|
||||||
|
|
||||||
@@ -77,7 +75,7 @@ class NEUReiPlugin : REIClientPlugin {
|
|||||||
}
|
}
|
||||||
val itemInstance = ItemStack.of(itemTag_modern)
|
val itemInstance = ItemStack.of(itemTag_modern)
|
||||||
return itemInstance.also {
|
return itemInstance.also {
|
||||||
if(false)it.appendLore(
|
if (false) it.appendLore(
|
||||||
listOf(
|
listOf(
|
||||||
TextComponent("Old: $minecraftItemId").withStyle {
|
TextComponent("Old: $minecraftItemId").withStyle {
|
||||||
it.withItalic(false).withColor(ChatFormatting.RED)
|
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
|
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 getValueType(): Class<NEUItem> = NEUItem::class.java
|
||||||
override fun getType(): EntryType<NEUItem> =
|
override fun getType(): EntryType<NEUItem> =
|
||||||
EntryType.deferred(hehe)
|
EntryType.deferred(hehe)
|
||||||
@@ -181,10 +182,8 @@ class NEUReiPlugin : REIClientPlugin {
|
|||||||
|
|
||||||
override fun registerEntries(registry: EntryRegistry) {
|
override fun registerEntries(registry: EntryRegistry) {
|
||||||
neuRepo.items.items.values.forEach {
|
neuRepo.items.items.values.forEach {
|
||||||
|
if (!it.isVanilla)
|
||||||
registry.addEntry(EntryStack.of(SBItemEntryDefinition, it))
|
registry.addEntry(EntryStack.of(SBItemEntryDefinition, it))
|
||||||
}
|
}
|
||||||
registry.addEntry(EntryStacks.of(ItemStack(Items.DIAMOND).also {
|
|
||||||
it.enchant(Enchantments.ALL_DAMAGE_PROTECTION, 10)
|
|
||||||
}))
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user