Remove toImmutableList
This commit is contained in:
parent
844323ead6
commit
339cacc545
@ -1,5 +1,6 @@
|
|||||||
package ru.dbotthepony.mc.otm.compat.jei
|
package ru.dbotthepony.mc.otm.compat.jei
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList
|
||||||
import it.unimi.dsi.fastutil.ints.Int2IntArrayMap
|
import it.unimi.dsi.fastutil.ints.Int2IntArrayMap
|
||||||
import it.unimi.dsi.fastutil.ints.IntArraySet
|
import it.unimi.dsi.fastutil.ints.IntArraySet
|
||||||
import mezz.jei.api.constants.RecipeTypes
|
import mezz.jei.api.constants.RecipeTypes
|
||||||
@ -16,7 +17,6 @@ import net.minecraft.world.inventory.Slot
|
|||||||
import net.minecraft.world.item.crafting.CraftingRecipe
|
import net.minecraft.world.item.crafting.CraftingRecipe
|
||||||
import net.minecraft.world.item.crafting.RecipeHolder
|
import net.minecraft.world.item.crafting.RecipeHolder
|
||||||
import ru.dbotthepony.mc.otm.util.TranslatableComponent
|
import ru.dbotthepony.mc.otm.util.TranslatableComponent
|
||||||
import ru.dbotthepony.mc.otm.util.toImmutableList
|
|
||||||
import ru.dbotthepony.mc.otm.menu.ExopackInventoryMenu
|
import ru.dbotthepony.mc.otm.menu.ExopackInventoryMenu
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import kotlin.collections.ArrayList
|
import kotlin.collections.ArrayList
|
||||||
@ -116,9 +116,9 @@ class ExopackInventoryTransferHandler(private val helper: IRecipeTransferHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val outputs = recipeSlots.getSlotViews(RecipeIngredientRole.OUTPUT).toImmutableList()
|
val outputs = ImmutableList.copyOf(recipeSlots.getSlotViews(RecipeIngredientRole.OUTPUT))
|
||||||
val catalysts = recipeSlots.getSlotViews(RecipeIngredientRole.CATALYST).toImmutableList()
|
val catalysts = ImmutableList.copyOf(recipeSlots.getSlotViews(RecipeIngredientRole.CATALYST))
|
||||||
val render = recipeSlots.getSlotViews(RecipeIngredientRole.RENDER_ONLY).toImmutableList()
|
val render = ImmutableList.copyOf(recipeSlots.getSlotViews(RecipeIngredientRole.RENDER_ONLY))
|
||||||
|
|
||||||
val combine = ArrayList<IRecipeSlotView>(filteredInputs.size + outputs.size + render.size)
|
val combine = ArrayList<IRecipeSlotView>(filteredInputs.size + outputs.size + render.size)
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ class ExopackInventoryTransferHandler(private val helper: IRecipeTransferHandler
|
|||||||
combine.addAll(outputs)
|
combine.addAll(outputs)
|
||||||
combine.addAll(render)
|
combine.addAll(render)
|
||||||
|
|
||||||
val combined = combine.toImmutableList()
|
val combined = ImmutableList.copyOf(combine)
|
||||||
|
|
||||||
val newView = object : IRecipeSlotsView {
|
val newView = object : IRecipeSlotsView {
|
||||||
override fun getSlotViews(): List<IRecipeSlotView> {
|
override fun getSlotViews(): List<IRecipeSlotView> {
|
||||||
|
@ -131,10 +131,6 @@ operator fun <S : StateHolder<*, *>, T : Comparable<T>> S.set(property: Property
|
|||||||
return setValue(property, value) as S
|
return setValue(property, value) as S
|
||||||
}
|
}
|
||||||
|
|
||||||
fun <T> List<T>.toImmutableList(): List<T> {
|
|
||||||
return ImmutableList.copyOf(this)
|
|
||||||
}
|
|
||||||
|
|
||||||
operator fun <R> (() -> R).getValue(thisRef: Any, property: KProperty<*>): R {
|
operator fun <R> (() -> R).getValue(thisRef: Any, property: KProperty<*>): R {
|
||||||
return invoke()
|
return invoke()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user