Skip to content

Commit

Permalink
Fix packet sending a list of useless info (#13)
Browse files Browse the repository at this point in the history
* Fix packet sending a list of useless info

This caused the packet verification to fail since List wasn't on the
whitelist. Solution is to not send the list in the first place

* spotlessApply

---------

Co-authored-by: GitHub GTNH Actions <>
  • Loading branch information
firenoo authored Jul 26, 2023
1 parent a8e1464 commit eaf6690
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,4 @@ object VisualisationData {

object VisualisationModes extends Enumeration {
val FULL, NODES, CHANNELS, NONUM, P2P = Value
val modes = List(FULL, NODES, CHANNELS, NONUM, P2P)
}
6 changes: 4 additions & 2 deletions src/main/scala/net/bdew/ae2stuff/misc/MouseEventHandler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import net.minecraftforge.client.event.MouseEvent
import net.minecraftforge.common.MinecraftForge

object MouseEventHandler {
private val VISUALISATION_MODES = VisualisationModes.values.toList

def init(): Unit = {
MinecraftForge.EVENT_BUS.register(this)
}
Expand All @@ -37,12 +39,12 @@ object MouseEventHandler {
val newMode =
if (ev.dwheel.signum > 0)
Misc.nextInSeq(
VisualisationModes.modes,
VISUALISATION_MODES,
ItemVisualiser.getMode(stack)
)
else
Misc.prevInSeq(
VisualisationModes.modes,
VISUALISATION_MODES,
ItemVisualiser.getMode(stack)
)
ItemVisualiser.setMode(stack, newMode)
Expand Down

0 comments on commit eaf6690

Please sign in to comment.