component slots

This commit is contained in:
2026-04-19 12:50:13 +02:00
parent d3fb4a65cb
commit 74d1015bcd
29 changed files with 277 additions and 11 deletions

View File

@@ -0,0 +1,20 @@
package org.neoflock.neocomputers.item
import net.minecraft.world.item.ItemStack
import org.neoflock.neocomputers.network.Networking
// need not necessarily be just a component, can be upgrades as well
interface ComponentItem {
fun getComponentRoles(itemStack: ItemStack): Set<String>
fun getComponentTier(itemStack: ItemStack): Int
// Get machine properties they can influence
fun getMemoryCapacity(itemStack: ItemStack): Int
fun getComponentCapacity(itemStack: ItemStack): Int
fun whenComponentPlaced(itemStack: ItemStack, newRole: String)
fun whenComponentTaken(itemStack: ItemStack, previousRole: String)
// To node, if applicable
fun toComponentNode(itemStack: ItemStack): Networking.Node?
}