20 lines
569 B
Kotlin
20 lines
569 B
Kotlin
package net.shadowfacts.phycon.network
|
|
|
|
import net.minecraft.block.BlockState
|
|
import net.minecraft.entity.player.PlayerEntity
|
|
import net.minecraft.util.math.BlockPos
|
|
import net.minecraft.world.World
|
|
import net.shadowfacts.phycon.block.BlockWithEntity
|
|
|
|
/**
|
|
* @author shadowfacts
|
|
*/
|
|
abstract class DeviceBlock<T: DeviceBlockEntity>(settings: Settings): BlockWithEntity<T>(settings) {
|
|
|
|
override fun onBreak(world: World, pos: BlockPos, state: BlockState, player: PlayerEntity) {
|
|
super.onBreak(world, pos, state, player)
|
|
getBlockEntity(world, pos)!!.onBreak()
|
|
}
|
|
|
|
}
|