diff options
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinItemStack.java')
-rw-r--r-- | src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinItemStack.java | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinItemStack.java b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinItemStack.java index 9e2fcc519..eef185561 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinItemStack.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/mixins/MixinItemStack.java @@ -1,42 +1,42 @@ -package com.thatgravyboat.skyblockhud.mixins; - -import at.lorenz.mod.LorenzMod; -import com.thatgravyboat.skyblockhud.api.item.IAbility; -import com.thatgravyboat.skyblockhud.handlers.CooldownHandler; -import java.util.regex.Matcher; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; - -@Mixin(ItemStack.class) -public class MixinItemStack implements IAbility { - - private String ability; - private int abilityTime; - - @Inject(method = "setTagCompound", at = @At("HEAD")) - public void onNbt(NBTTagCompound nbt, CallbackInfo ci) { - if (LorenzMod.config != null && !LorenzMod.config.misc.hideItemCooldowns) { - Matcher abilityMatcher = CooldownHandler.getAbility(nbt); - if (abilityMatcher != null) { - ability = abilityMatcher.group(1); - try { - abilityTime = Integer.parseInt(abilityMatcher.group(2).trim()); - } catch (Exception ignored) {} - } - } - } - - @Override - public String getAbility() { - return ability; - } - - @Override - public int getAbilityTime() { - return abilityTime; - } -} +//package com.thatgravyboat.skyblockhud.mixins; +// +//import at.lorenz.mod.LorenzMod; +//import com.thatgravyboat.skyblockhud.api.item.IAbility; +//import com.thatgravyboat.skyblockhud.handlers.CooldownHandler; +//import java.util.regex.Matcher; +//import net.minecraft.item.ItemStack; +//import net.minecraft.nbt.NBTTagCompound; +//import org.spongepowered.asm.mixin.Mixin; +//import org.spongepowered.asm.mixin.injection.At; +//import org.spongepowered.asm.mixin.injection.Inject; +//import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +// +//@Mixin(ItemStack.class) +//public class MixinItemStack implements IAbility { +// +// private String ability; +// private int abilityTime; +// +// @Inject(method = "setTagCompound", at = @At("HEAD")) +// public void onNbt(NBTTagCompound nbt, CallbackInfo ci) { +// if (LorenzMod.config != null && !LorenzMod.config.misc.hideItemCooldowns) { +// Matcher abilityMatcher = CooldownHandler.getAbility(nbt); +// if (abilityMatcher != null) { +// ability = abilityMatcher.group(1); +// try { +// abilityTime = Integer.parseInt(abilityMatcher.group(2).trim()); +// } catch (Exception ignored) {} +// } +// } +// } +// +// @Override +// public String getAbility() { +// return ability; +// } +// +// @Override +// public int getAbilityTime() { +// return abilityTime; +// } +//} |