2018-05-21 13:36:15 +00:00
|
|
|
package net.shadowfacts.forgelin
|
|
|
|
|
2018-06-11 21:21:43 +00:00
|
|
|
import net.minecraftforge.event.entity.player.PlayerInteractEvent
|
2018-05-21 13:36:15 +00:00
|
|
|
import net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock
|
|
|
|
import net.minecraftforge.fml.common.Mod
|
|
|
|
import net.minecraftforge.fml.common.Mod.EventBusSubscriber
|
|
|
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
|
|
|
|
|
|
|
|
@Mod(modid = AutomaticKtSubscriberTest.MODID, modLanguageAdapter = "net.shadowfacts.forgelin.KotlinAdapter")
|
|
|
|
object AutomaticKtSubscriberTest {
|
|
|
|
const val MODID = "ktsubtest"
|
|
|
|
|
|
|
|
@EventBusSubscriber(modid = AutomaticKtSubscriberTest.MODID)
|
|
|
|
object EventSubscriber {
|
|
|
|
@SubscribeEvent
|
|
|
|
fun onRightClickBlock(event: RightClickBlock) {
|
|
|
|
println("Automatic KT subscriber: Right click ${event.pos}")
|
|
|
|
}
|
2018-06-11 21:21:43 +00:00
|
|
|
|
|
|
|
@JvmStatic
|
|
|
|
@SubscribeEvent
|
|
|
|
fun onRightClickItem(event: PlayerInteractEvent.RightClickItem) {
|
|
|
|
println("Right click item")
|
|
|
|
}
|
2018-05-21 13:36:15 +00:00
|
|
|
}
|
|
|
|
}
|