ah yes
This commit is contained in:
parent
98a4e91df3
commit
158f68e068
@ -113,7 +113,7 @@ class ItemFilter private constructor(private val filter: Array<ItemStack>, val i
|
||||
val CODEC: Codec<ItemFilter> by lazy {
|
||||
RecordCodecBuilder.create<ItemFilter> {
|
||||
it.group(
|
||||
Codec.list(ItemStack.CODEC, 0, 40).fieldOf("filter").forGetter { ObjectArrayList.wrap(it.filter) },
|
||||
Codec.list(ItemStack.OPTIONAL_CODEC, 0, 40).fieldOf("filter").forGetter { ObjectArrayList.wrap(it.filter) },
|
||||
Codec.BOOL.optionalFieldOf("isWhitelist", false).forGetter { it.isWhitelist },
|
||||
Codec.BOOL.optionalFieldOf("matchTag", false).forGetter { it.matchTag },
|
||||
Codec.BOOL.optionalFieldOf("matchComponents", false).forGetter { it.matchComponents },
|
||||
|
@ -191,7 +191,7 @@ open class MatteryContainer(var listener: ContainerListener, private val size: I
|
||||
companion object {
|
||||
val CODEC: Codec<SerializedItem> = RecordCodecBuilder.create {
|
||||
it.group(
|
||||
ItemStack.CODEC.fieldOf("item").forGetter { it.item },
|
||||
ItemStack.OPTIONAL_CODEC.fieldOf("item").forGetter { it.item },
|
||||
Codec.INT.minRange(0).fieldOf("slot").forGetter { it.slot },
|
||||
).apply(it, ::SerializedItem)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user