mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-11-19 19:59:43 +00:00
Add color selector GUI for the Color Applicator and color pickup (#998)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
a5f32ac6dc
commit
7d24d7d2b1
8 files changed
+621
-111
No files matched your search
@@ -396,7 +396,7 @@ public class ClientHelper extends ServerHelper {
|
||||
|
||||
@SubscribeEvent
|
||||
public void wheelEvent(final MouseEvent me) {
|
||||
if (me.isCanceled() || me.dwheel == 0) {
|
||||
if (me.isCanceled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -404,7 +404,12 @@ public class ClientHelper extends ServerHelper {
|
||||
final EntityPlayer player = mc.thePlayer;
|
||||
final ItemStack is = player.getHeldItem();
|
||||
|
||||
if (is != null && is.getItem() instanceof IMouseWheelItem && player.isSneaking()) {
|
||||
if (is == null || !(is.getItem() instanceof IMouseWheelItem)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Wheel Scroll
|
||||
if (me.dwheel != 0 && player.isSneaking()) {
|
||||
try {
|
||||
NetworkHandler.instance
|
||||
.sendToServer(new PacketValueConfig("Item", me.dwheel > 0 ? "WheelUp" : "WheelDown"));
|
||||
@@ -413,6 +418,15 @@ public class ClientHelper extends ServerHelper {
|
||||
AELog.debug(e);
|
||||
}
|
||||
}
|
||||
|
||||
// Wheel Click
|
||||
else if (me.button == 2 && me.buttonstate) {
|
||||
if (player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IMouseWheelItem) {
|
||||
final IMouseWheelItem si = (IMouseWheelItem) is.getItem();
|
||||
si.onWheelClick(player, is);
|
||||
me.setCanceled(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
Reference in new issue
Block a user