Remove Interface right-click printing
This commit is contained in:
parent
a8b53e1117
commit
6e87092dde
|
@ -53,13 +53,6 @@ class NetworkInterfaceBlock: BlockWithEntity<NetworkInterfaceBlockEntity>(Settin
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun activate(state: BlockState, world: World, pos: BlockPos, player: PlayerEntity, hand: Hand, result: BlockHitResult): Boolean {
|
|
||||||
if (!world.isClient) {
|
|
||||||
getBlockEntity(world, pos)!!.printContents()
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun addAllAttributes(world: World, pos: BlockPos, state: BlockState, to: AttributeList<*>) {
|
override fun addAllAttributes(world: World, pos: BlockPos, state: BlockState, to: AttributeList<*>) {
|
||||||
to.offer(getBlockEntity(world, pos))
|
to.offer(getBlockEntity(world, pos))
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,14 +28,6 @@ class NetworkInterfaceBlockEntity: DeviceBlockEntity(PhyBlockEntities.NETWORK_IN
|
||||||
inventory = ItemAttributes.GROUPED_INV.getFirstOrNull(world, offsetPos, option)
|
inventory = ItemAttributes.GROUPED_INV.getFirstOrNull(world, offsetPos, option)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun printContents() {
|
|
||||||
inventory?.also { inv ->
|
|
||||||
inv.storedStacks.forEach {
|
|
||||||
println(it)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun handlePacket(packet: Packet) {
|
override fun handlePacket(packet: Packet) {
|
||||||
when (packet) {
|
when (packet) {
|
||||||
is RequestReadAllPacket -> handleReadAll(packet)
|
is RequestReadAllPacket -> handleReadAll(packet)
|
||||||
|
|
Loading…
Reference in New Issue