diff --git a/src/main/java/com/simibubi/create/compat/computercraft/events/KineticsChangeEvent.java b/src/main/java/com/simibubi/create/compat/computercraft/events/KineticsChangeEvent.java new file mode 100644 index 0000000000..4918c8155c --- /dev/null +++ b/src/main/java/com/simibubi/create/compat/computercraft/events/KineticsChangeEvent.java @@ -0,0 +1,17 @@ +package com.simibubi.create.compat.computercraft.events; + +public class KineticsChangeEvent implements ComputerEvent { + + public float speed; + public float capacity; + public float stress; + public boolean overStressed; + + public KineticsChangeEvent(float speed, float capacity, float stress, boolean overStressed) { + this.speed = speed; + this.capacity = capacity; + this.stress = stress; + this.overStressed = overStressed; + } + +} diff --git a/src/main/java/com/simibubi/create/compat/computercraft/implementation/peripherals/SpeedGaugePeripheral.java b/src/main/java/com/simibubi/create/compat/computercraft/implementation/peripherals/SpeedGaugePeripheral.java index d6ff9d20bf..af5afc98f6 100644 --- a/src/main/java/com/simibubi/create/compat/computercraft/implementation/peripherals/SpeedGaugePeripheral.java +++ b/src/main/java/com/simibubi/create/compat/computercraft/implementation/peripherals/SpeedGaugePeripheral.java @@ -2,6 +2,9 @@ package com.simibubi.create.compat.computercraft.implementation.peripherals; import org.jetbrains.annotations.NotNull; + +import com.simibubi.create.compat.computercraft.events.ComputerEvent; +import com.simibubi.create.compat.computercraft.events.KineticsChangeEvent; import com.simibubi.create.content.kinetics.gauge.SpeedGaugeBlockEntity; import dan200.computercraft.api.lua.LuaFunction; @@ -17,6 +20,13 @@ public class SpeedGaugePeripheral extends SyncedPeripheral