package net.shadowfacts.asmr.program import net.minecraft.util.Identifier import net.minecraft.util.Language /** * @author shadowfacts */ class ProgramBlockInput( val identifier: Identifier, val type: ProgramType, val block: ProgramBlock, source: ProgramBlockOutput? = null ) { var source: ProgramBlockOutput? = source internal set val value: Type? get() = source?.value fun link(from: ProgramBlockOutput) { from.link(to = this) } fun unlink() { source?.unlink(to = this) } fun translateName(): String { return Language.getInstance().translate("programblock.param.${identifier.namespace}.${identifier.path}") } }