PhysicalConnectivity/src/main/kotlin/net/shadowfacts/phycon/PhysicalConnectivity.kt

33 lines
858 B
Kotlin
Raw Normal View History

2019-10-27 01:36:31 +00:00
package net.shadowfacts.phycon
import net.fabricmc.api.ModInitializer
2021-02-16 03:51:33 +00:00
import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking
2019-10-27 01:36:31 +00:00
import net.shadowfacts.phycon.init.PhyBlockEntities
import net.shadowfacts.phycon.init.PhyBlocks
import net.shadowfacts.phycon.init.PhyItems
import net.shadowfacts.phycon.init.PhyScreens
2021-02-16 03:51:33 +00:00
import net.shadowfacts.phycon.networking.C2STerminalRequestItem
import net.shadowfacts.phycon.networking.ServerReceiver
2019-10-27 01:36:31 +00:00
/**
* @author shadowfacts
*/
object PhysicalConnectivity: ModInitializer {
val MODID = "phycon"
override fun onInitialize() {
PhyBlocks.init()
PhyBlockEntities.init()
PhyItems.init()
PhyScreens.init()
2021-02-16 03:51:33 +00:00
registerGlobalReceiver(C2STerminalRequestItem)
}
private fun registerGlobalReceiver(receiver: ServerReceiver) {
ServerPlayNetworking.registerGlobalReceiver(receiver.CHANNEL, receiver)
}
}