From 529f5cddb87252a9f94eaa7f0671192f923eec05 Mon Sep 17 00:00:00 2001 From: Abdiel Kavash <19243993+AbdielKavash@users.noreply.github.com> Date: Thu, 31 Oct 2024 09:53:52 -0600 Subject: [PATCH] Add getPickBlock (middle-click) support. --- .../machines/wireless/BlockWireless.scala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/scala/net/bdew/ae2stuff/machines/wireless/BlockWireless.scala b/src/main/scala/net/bdew/ae2stuff/machines/wireless/BlockWireless.scala index f62c0a4..6135acc 100644 --- a/src/main/scala/net/bdew/ae2stuff/machines/wireless/BlockWireless.scala +++ b/src/main/scala/net/bdew/ae2stuff/machines/wireless/BlockWireless.scala @@ -70,6 +70,22 @@ object BlockWireless } } + override def getPickBlock( + target: MovingObjectPosition, + world: World, + x: Int, + y: Int, + z: Int, + player: EntityPlayer + ): ItemStack = { + val stack = new ItemStack(this) + val te = getTE(world, x, y, z) + if (te.color != AEColor.Transparent) { + stack.setItemDamage(te.color.ordinal() + 1) + } + stack + } + override def breakBlock( world: World, x: Int,