Add screwdriver item

This commit is contained in:
Shadowfacts 2019-10-28 12:37:54 -04:00
parent c7da691ffd
commit 04f0ae6d41
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
2 changed files with 19 additions and 0 deletions

View File

@ -4,6 +4,7 @@ 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
@ -19,11 +20,15 @@ object PhyItems {
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) {

View File

@ -0,0 +1,14 @@
package net.shadowfacts.phycon.item
import net.minecraft.item.Item
import net.minecraft.util.Identifier
import net.shadowfacts.phycon.PhysicalConnectivity
/**
* @author shadowfacts
*/
class ScrewdriverItem: Item(Settings()) {
companion object {
val ID = Identifier(PhysicalConnectivity.MODID, "screwdriver")
}
}