aboutsummaryrefslogtreecommitdiff
path: root/mod/src
diff options
context:
space:
mode:
Diffstat (limited to 'mod/src')
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/PacketInjector.java6
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/ability/FeatureAbilityCooldown.java15
2 files changed, 13 insertions, 8 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/PacketInjector.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/PacketInjector.java
index ab8c1ae9..54ba4f8a 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/PacketInjector.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/PacketInjector.java
@@ -59,20 +59,22 @@ public class PacketInjector extends ChannelDuplexHandler {
if (doStuff) {
RawPacketReceivedEvent receivedEvent = new RawPacketReceivedEvent(packet);
MinecraftForge.EVENT_BUS.post(receivedEvent);
+ packet = receivedEvent.packet;
}
} catch (Throwable t) {
t.printStackTrace();
}
// Hopefully this works? idk
+ Packet finalPacket = packet;
if (doStuff)
Minecraft.getMinecraft().addScheduledTask(() -> {
- MinecraftForge.EVENT_BUS.post(new PacketProcessedEvent.Pre(packet));
+ MinecraftForge.EVENT_BUS.post(new PacketProcessedEvent.Pre(finalPacket));
});
super.channelRead(ctx, packet);
if (doStuff)
Minecraft.getMinecraft().addScheduledTask(() -> {
- MinecraftForge.EVENT_BUS.post(new PacketProcessedEvent.Post(packet));
+ MinecraftForge.EVENT_BUS.post(new PacketProcessedEvent.Post(finalPacket));
});
}
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/ability/FeatureAbilityCooldown.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/ability/FeatureAbilityCooldown.java
index 22d8ed72..5f06ccd6 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/ability/FeatureAbilityCooldown.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/etc/ability/FeatureAbilityCooldown.java
@@ -218,7 +218,7 @@ public class FeatureAbilityCooldown extends TextHUDFeature {
register(new SkyblockAbility("Stinger", 150, -1, "SCORPION_BOW"));
register(new SkyblockAbility("Eye Beam", -1, -1, "PRECURSOR_EYE"));
register(new SkyblockAbility("Water Burst", 20, -1, "SALMON_BOOTS"));
- register(new SkyblockAbility("Mining Speed Boost", -1, 120, null));
+ register(new SkyblockAbility("Mining Speed Boost", -1, 10000, null));
register(new SkyblockAbility("Pikobulus", -1, 110, null));
// abilities
@@ -357,7 +357,6 @@ public class FeatureAbilityCooldown extends TextHUDFeature {
NBTTagCompound extra = nbt.getCompoundTag("ExtraAttributes");
if (extra == null) return;
String id = extra.getString("id");
- if (!skyblockAbilitiesByItemID.containsKey(id)) return;
List<SkyblockAbility> skyblockAbility = skyblockAbilitiesByItemID.get(id);
NBTTagCompound display = nbt.getCompoundTag("display");
@@ -382,12 +381,16 @@ public class FeatureAbilityCooldown extends TextHUDFeature {
if (ability.endsWith(" §e§lRIGHT CLICK")) ability = ability.replace(" §e§lRIGHT CLICK", "");
ability = TextUtils.stripColor(ability).trim();
- for (SkyblockAbility skyblockAbility1 : skyblockAbility) {
- if (skyblockAbility1.getName().equals(ability)) {
- currentAbility = skyblockAbility1;
- break;
+ if (skyblockAbility != null) {
+ for (SkyblockAbility skyblockAbility1 : skyblockAbility) {
+ if (skyblockAbility1.getName().equals(ability)) {
+ currentAbility = skyblockAbility1;
+ break;
+ }
}
}
+ if (currentAbility == null)
+ currentAbility = skyblockAbilities.get(ability);
}
}
}