2021-03-29 23:18:15 +00:00
|
|
|
package net.shadowfacts.phycon.plugin.rei
|
|
|
|
|
2021-12-22 23:59:51 +00:00
|
|
|
import me.shedaniel.rei.api.common.display.Display
|
|
|
|
import me.shedaniel.rei.api.common.transfer.info.MenuInfo
|
2021-03-29 23:18:15 +00:00
|
|
|
import net.fabricmc.api.ModInitializer
|
|
|
|
import net.minecraft.util.Identifier
|
|
|
|
import net.shadowfacts.phycon.block.terminal.CraftingTerminalScreenHandler
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @author shadowfacts
|
|
|
|
*/
|
|
|
|
object PhyConPluginCommon: ModInitializer {
|
|
|
|
|
|
|
|
override fun onInitialize() {
|
2021-12-22 23:59:51 +00:00
|
|
|
// ContainerInfoHandler.registerContainerInfo(Identifier("minecraft", "plugins/crafting"), TerminalInfo)
|
2021-03-29 23:18:15 +00:00
|
|
|
}
|
|
|
|
|
2021-12-22 23:59:51 +00:00
|
|
|
// object TerminalInfo: ContainerInfo<CraftingTerminalScreenHandler> {
|
|
|
|
// override fun getContainerClass() = CraftingTerminalScreenHandler::class.java
|
|
|
|
//
|
|
|
|
// override fun getCraftingResultSlotIndex(container: CraftingTerminalScreenHandler): Int {
|
|
|
|
// return container.resultSlot.id
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// override fun getCraftingWidth(container: CraftingTerminalScreenHandler): Int {
|
|
|
|
// return 3
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// override fun getCraftingHeight(container: CraftingTerminalScreenHandler): Int {
|
|
|
|
// return 3
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// override fun getGridStacks(context: ContainerContext<CraftingTerminalScreenHandler>): List<StackAccessor> {
|
|
|
|
// val handler = context.container
|
|
|
|
// return (handler.craftingSlotsStart until handler.craftingSlotsEnd).map(context::getStack)
|
|
|
|
// }
|
|
|
|
//
|
|
|
|
// override fun getInventoryStacks(context: ContainerContext<CraftingTerminalScreenHandler>): List<StackAccessor> {
|
|
|
|
// val handler = context.container
|
|
|
|
// val slots = (handler.playerSlotsStart until handler.playerSlotsEnd) + (handler.bufferSlotsStart until handler.bufferSlotsEnd)
|
|
|
|
// return slots.map(context::getStack)
|
|
|
|
// }
|
|
|
|
// }
|
2021-03-29 23:18:15 +00:00
|
|
|
|
|
|
|
}
|