26 lines
646 B
Kotlin
26 lines
646 B
Kotlin
package net.shadowfacts.asmr.program.blocks
|
|
|
|
import net.minecraft.util.Identifier
|
|
import net.shadowfacts.asmr.ASMR
|
|
import net.shadowfacts.asmr.program.*
|
|
import net.shadowfacts.asmr.program.execution.SimpleExecutableBlock
|
|
|
|
/**
|
|
* @author shadowfacts
|
|
*/
|
|
class PrintBlock<Type: Any>(
|
|
val type: ProgramType<Type>
|
|
): SimpleExecutableBlock(
|
|
Identifier(ASMR.modid, "print")
|
|
) {
|
|
|
|
val input = ProgramBlockInput(Identifier(ASMR.modid, "print.input"), type, this)
|
|
|
|
override val inputs: Array<ProgramBlockInput<*>> = arrayOf(input)
|
|
override val outputs: Array<ProgramBlockOutput<*>> = arrayOf()
|
|
|
|
override fun execute() {
|
|
println(input.value)
|
|
}
|
|
|
|
} |