39 lines
1.1 KiB
Kotlin
39 lines
1.1 KiB
Kotlin
package net.shadowfacts.phycon.init
|
|
|
|
import net.minecraft.item.BlockItem
|
|
import net.minecraft.item.Item
|
|
import net.minecraft.util.Identifier
|
|
import net.minecraft.util.registry.Registry
|
|
import net.shadowfacts.phycon.item.ScrewdriverItem
|
|
import net.shadowfacts.phycon.network.block.cable.CableBlock
|
|
import net.shadowfacts.phycon.network.block.netinterface.InterfaceBlock
|
|
import net.shadowfacts.phycon.network.block.netswitch.SwitchBlock
|
|
import net.shadowfacts.phycon.network.block.terminal.TerminalBlock
|
|
|
|
/**
|
|
* @author shadowfacts
|
|
*/
|
|
object PhyItems {
|
|
|
|
val INTERFACE = BlockItem(PhyBlocks.INTERFACE, Item.Settings())
|
|
val TERMINAL = BlockItem(PhyBlocks.TERMINAL, Item.Settings())
|
|
val SWITCH = BlockItem(PhyBlocks.SWITCH, Item.Settings())
|
|
val CABLE = BlockItem(PhyBlocks.CABLE, Item.Settings())
|
|
|
|
val SCREWDRIVER = ScrewdriverItem()
|
|
|
|
fun init() {
|
|
register(InterfaceBlock.ID, INTERFACE)
|
|
register(TerminalBlock.ID, TERMINAL)
|
|
register(SwitchBlock.ID, SWITCH)
|
|
register(CableBlock.ID, CABLE)
|
|
|
|
register(ScrewdriverItem.ID, SCREWDRIVER)
|
|
}
|
|
|
|
private fun register(id: Identifier, item: Item) {
|
|
Registry.register(Registry.ITEM, id, item)
|
|
}
|
|
|
|
}
|