Skip to content

Commit

Permalink
quick fix (i hope)
Browse files Browse the repository at this point in the history
  • Loading branch information
WMF-Industries committed Dec 21, 2023
1 parent 0f4056e commit f7e7088
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/floodcompat/floodcompat.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@

public class floodcompat extends Mod{
boolean flood, applied;
Ability PulsarAbility, BrydeAbility;
public floodcompat(){
Log.info("Flood Compatibility loaded!");
Ability PulsarAbility = UnitTypes.pulsar.abilities.get(0);
Ability BrydeAbility = UnitTypes.bryde.abilities.get(0);

Vars.netClient.addPacketHandler("flood", (integer) -> {
if(Strings.canParseInt(integer)){
Expand Down Expand Up @@ -120,6 +119,11 @@ public floodcompat(){
}
});

Events.on(EventType.ContentInitEvent.class, e -> {
PulsarAbility = UnitTypes.pulsar.abilities.get(0);
BrydeAbility = UnitTypes.bryde.abilities.get(0);
});

Events.on(EventType.WorldLoadEvent.class, e -> {
// no delay if the client's hosting, that would break stuff!
int delay = Vars.net.client() ? 3 : 0;
Expand Down

0 comments on commit f7e7088

Please sign in to comment.