Remove MatteryCraftingContainer usage
This commit is contained in:
parent
d0904da1db
commit
621661c9fe
@ -31,7 +31,6 @@ import ru.dbotthepony.mc.otm.config.MachinesConfig
|
||||
import ru.dbotthepony.mc.otm.container.CombinedContainer
|
||||
import ru.dbotthepony.mc.otm.container.EnhancedContainer
|
||||
import ru.dbotthepony.mc.otm.container.IEnhancedCraftingContainer
|
||||
import ru.dbotthepony.mc.otm.container.MatteryCraftingContainer
|
||||
import ru.dbotthepony.mc.otm.container.util.slotIterator
|
||||
import ru.dbotthepony.mc.otm.core.TranslatableComponent
|
||||
import ru.dbotthepony.mc.otm.core.collect.map
|
||||
|
@ -1,21 +0,0 @@
|
||||
package ru.dbotthepony.mc.otm.container
|
||||
|
||||
import net.minecraft.world.inventory.CraftingContainer
|
||||
import net.minecraft.world.item.ItemStack
|
||||
|
||||
open class MatteryCraftingContainer(listener: ContainerListener, private val width: Int, private val height: Int) : MatteryContainer(listener, width * height), CraftingContainer {
|
||||
constructor(listener: () -> Unit, width: Int, height: Int) : this({ _, _, _ -> listener.invoke() }, width, height)
|
||||
constructor(width: Int, height: Int) : this(EmptyListener, width, height)
|
||||
|
||||
final override fun getWidth(): Int {
|
||||
return width
|
||||
}
|
||||
|
||||
final override fun getHeight(): Int {
|
||||
return height
|
||||
}
|
||||
|
||||
final override fun getItems(): MutableList<ItemStack> {
|
||||
return toList()
|
||||
}
|
||||
}
|
@ -77,7 +77,8 @@ import ru.dbotthepony.mc.otm.capability.drive.IMatteryDrive
|
||||
import ru.dbotthepony.mc.otm.client.isShiftDown
|
||||
import ru.dbotthepony.mc.otm.client.minecraft
|
||||
import ru.dbotthepony.mc.otm.config.ClientConfig
|
||||
import ru.dbotthepony.mc.otm.container.MatteryCraftingContainer
|
||||
import ru.dbotthepony.mc.otm.container.EnhancedContainer
|
||||
import ru.dbotthepony.mc.otm.container.IEnhancedCraftingContainer
|
||||
import ru.dbotthepony.mc.otm.container.util.stream
|
||||
import ru.dbotthepony.mc.otm.core.ResourceLocation
|
||||
import ru.dbotthepony.mc.otm.core.TextComponent
|
||||
@ -500,7 +501,7 @@ object MatterManager {
|
||||
height = it.value.ingredients.size.coerceAtLeast(height)
|
||||
}
|
||||
|
||||
val container = MatteryCraftingContainer(width, height)
|
||||
val container = IEnhancedCraftingContainer.Wrapper(EnhancedContainer.Simple(width * height), width, height)
|
||||
val realIngredients = ArrayList<ArrayList<RecipeEntry>>()
|
||||
|
||||
for (c in it.value.ingredients.indices) {
|
||||
|
Loading…
Reference in New Issue
Block a user