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

38 lines
1.0 KiB
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-24 03:05:05 +00:00
import net.shadowfacts.phycon.networking.*
2021-02-26 22:04:18 +00:00
import org.apache.logging.log4j.LogManager
2019-10-27 01:36:31 +00:00
/**
* @author shadowfacts
*/
object PhysicalConnectivity: ModInitializer {
val MODID = "phycon"
2021-02-26 22:04:18 +00:00
val NETWORK_LOGGER = LogManager.getLogger("PhyNet")
2019-10-27 01:36:31 +00:00
override fun onInitialize() {
PhyBlocks.init()
PhyBlockEntities.init()
PhyItems.init()
PhyScreens.init()
2021-02-16 03:51:33 +00:00
registerGlobalReceiver(C2STerminalRequestItem)
registerGlobalReceiver(C2STerminalUpdateDisplayedItems)
2021-02-24 03:05:05 +00:00
registerGlobalReceiver(C2SConfigureActivationMode)
registerGlobalReceiver(C2SConfigureRedstoneController)
2021-02-16 03:51:33 +00:00
}
private fun registerGlobalReceiver(receiver: ServerReceiver) {
ServerPlayNetworking.registerGlobalReceiver(receiver.CHANNEL, receiver)
}
}