Skip to content

Commit

Permalink
Add getPickBlock (middle-click) support.
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdielKavash committed Oct 31, 2024
1 parent 9b891e3 commit 529f5cd
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 529f5cd

Please sign in to comment.