2015-05-22 00:41:44 +02:00
|
|
|
package com.pahimar.ee3.api.event;
|
|
|
|
|
|
|
|
import com.pahimar.ee3.api.exchange.EnergyValue;
|
|
|
|
import com.pahimar.ee3.api.exchange.EnergyValueRegistryProxy;
|
|
|
|
import cpw.mods.fml.common.eventhandler.Event;
|
|
|
|
|
2016-05-17 04:02:23 +02:00
|
|
|
public class EnergyValueEvent extends Event {
|
2015-05-22 00:41:44 +02:00
|
|
|
public final Object object;
|
|
|
|
public final EnergyValueRegistryProxy.Phase phase;
|
|
|
|
|
2016-05-17 04:02:23 +02:00
|
|
|
public EnergyValueEvent(Object object, EnergyValueRegistryProxy.Phase phase) {
|
2015-05-22 00:41:44 +02:00
|
|
|
this.object = object;
|
|
|
|
this.phase = phase;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
2016-05-17 04:02:23 +02:00
|
|
|
public boolean isCancelable() {
|
2015-05-22 00:41:44 +02:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2016-05-17 04:02:23 +02:00
|
|
|
public static class SetEnergyValueEvent extends EnergyValueEvent {
|
2015-05-22 00:41:44 +02:00
|
|
|
public final EnergyValue newEnergyValue;
|
|
|
|
|
2023-01-03 17:47:36 +01:00
|
|
|
public SetEnergyValueEvent(
|
|
|
|
Object object,
|
|
|
|
EnergyValue newEnergyValue,
|
|
|
|
EnergyValueRegistryProxy.Phase phase
|
|
|
|
) {
|
2016-05-17 04:02:23 +02:00
|
|
|
super(object, phase);
|
2015-05-22 00:41:44 +02:00
|
|
|
this.newEnergyValue = newEnergyValue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-17 04:02:23 +02:00
|
|
|
public static class RemoveEnergyValueEvent extends EnergyValueEvent {
|
2023-01-03 17:47:36 +01:00
|
|
|
public RemoveEnergyValueEvent(
|
|
|
|
Object object, EnergyValueRegistryProxy.Phase phase
|
|
|
|
) {
|
2016-05-17 04:02:23 +02:00
|
|
|
super(object, phase);
|
2015-05-22 00:41:44 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|