aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/thatgravyboat/skyblockhud_2/mixins
diff options
context:
space:
mode:
authorLorenz <ESs95s3P5z8Pheb>2022-07-14 11:26:34 +0200
committerLorenz <ESs95s3P5z8Pheb>2022-07-14 11:26:34 +0200
commitc65416e03ce0791c4a99e9bdfc18c0fa0863028a (patch)
tree653e7e8bbfce0cb2f25592fd48b531f863c3575e /src/main/java/com/thatgravyboat/skyblockhud_2/mixins
parentb2108f37f551fba5cb43f4919d69e5db7bb1e44c (diff)
downloadskyhanni-c65416e03ce0791c4a99e9bdfc18c0fa0863028a.tar.gz
skyhanni-c65416e03ce0791c4a99e9bdfc18c0fa0863028a.tar.bz2
skyhanni-c65416e03ce0791c4a99e9bdfc18c0fa0863028a.zip
remove old sbh/skyblockhud code
Diffstat (limited to 'src/main/java/com/thatgravyboat/skyblockhud_2/mixins')
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud_2/mixins/GuiChestAccessor.java12
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinEntityArrow.java26
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinGuiIngameForge.java113
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinItemStack.java42
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinNetHandlerPlayClient.java67
-rw-r--r--src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinRenderItem.java63
6 files changed, 0 insertions, 323 deletions
diff --git a/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/GuiChestAccessor.java b/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/GuiChestAccessor.java
deleted file mode 100644
index 1dc3d336e..000000000
--- a/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/GuiChestAccessor.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.thatgravyboat.skyblockhud_2.mixins;
-
-import net.minecraft.client.gui.inventory.GuiChest;
-import net.minecraft.inventory.IInventory;
-import org.spongepowered.asm.mixin.Mixin;
-import org.spongepowered.asm.mixin.gen.Accessor;
-
-@Mixin(GuiChest.class)
-public interface GuiChestAccessor {
- @Accessor
- IInventory getLowerChestInventory();
-}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinEntityArrow.java b/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinEntityArrow.java
deleted file mode 100644
index d892c01f1..000000000
--- a/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinEntityArrow.java
+++ /dev/null
@@ -1,26 +0,0 @@
-//package com.thatgravyboat.skyblockhud.mixins;
-//
-//import com.thatgravyboat.skyblockhud.api.KillTracking;
-//import net.minecraft.client.Minecraft;
-//import net.minecraft.entity.Entity;
-//import net.minecraft.entity.projectile.EntityArrow;
-//import net.minecraft.util.MovingObjectPosition;
-//import org.spongepowered.asm.mixin.Mixin;
-//import org.spongepowered.asm.mixin.Shadow;
-//import org.spongepowered.asm.mixin.injection.At;
-//import org.spongepowered.asm.mixin.injection.ModifyVariable;
-//
-//@Mixin(EntityArrow.class)
-//public class MixinEntityArrow {
-//
-// @Shadow
-// public Entity shootingEntity;
-//
-// @ModifyVariable(method = "onUpdate", at = @At(value = "STORE", ordinal = 1))
-// public MovingObjectPosition onUpdate(MovingObjectPosition position) {
-// if (position != null && position.entityHit != null && this.shootingEntity != null && this.shootingEntity.getUniqueID().equals(Minecraft.getMinecraft().thePlayer.getUniqueID())) {
-// KillTracking.attackedEntities.add(position.entityHit.getUniqueID());
-// }
-// return position;
-// }
-//}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinGuiIngameForge.java b/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinGuiIngameForge.java
deleted file mode 100644
index 078bdce8f..000000000
--- a/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinGuiIngameForge.java
+++ /dev/null
@@ -1,113 +0,0 @@
-//package com.thatgravyboat.skyblockhud.mixins;
-//
-//import static net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.*;
-//
-//import at.lorenz.mod.LorenzMod;
-//import com.thatgravyboat.skyblockhud.overlay.MiningHud;
-//import com.thatgravyboat.skyblockhud.utils.Utils;
-//import net.minecraft.client.Minecraft;
-//import net.minecraftforge.client.GuiIngameForge;
-//import net.minecraftforge.client.event.RenderGameOverlayEvent;
-//import net.minecraftforge.common.MinecraftForge;
-//import org.spongepowered.asm.mixin.Mixin;
-//import org.spongepowered.asm.mixin.Shadow;
-//import org.spongepowered.asm.mixin.Unique;
-//import org.spongepowered.asm.mixin.injection.At;
-//import org.spongepowered.asm.mixin.injection.Inject;
-//import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-//
-//@Mixin(GuiIngameForge.class)
-//public class MixinGuiIngameForge {
-//
-// @Shadow(remap = false)
-// private RenderGameOverlayEvent eventParent;
-//
-// @Inject(method = "renderArmor", at = @At("HEAD"), cancellable = true, remap = false)
-// public void onRenderArmor(int width, int height, CallbackInfo ci) {
-// if (LorenzMod.config.renderer.hideArmor && LorenzMod.hasSkyblockScoreboard()) {
-// ci.cancel();
-// if (prePost(ARMOR, eventParent)) return;
-// postPost(ARMOR, eventParent);
-// }
-// }
-//
-// @Inject(method = "renderHealth", at = @At("HEAD"), cancellable = true, remap = false)
-// public void onRenderHealth(int width, int height, CallbackInfo ci) {
-// if (LorenzMod.config.renderer.hideHearts && LorenzMod.hasSkyblockScoreboard()) {
-// ci.cancel();
-// if (prePost(HEALTH, eventParent)) return;
-// postPost(HEALTH, eventParent);
-// }
-// }
-//
-// @Inject(method = "renderAir", at = @At("HEAD"), cancellable = true, remap = false)
-// public void onRenderAir(int width, int height, CallbackInfo ci) {
-// if (LorenzMod.config.renderer.hideAir && LorenzMod.hasSkyblockScoreboard()) {
-// ci.cancel();
-// if (prePost(AIR, eventParent)) return;
-// postPost(AIR, eventParent);
-// }
-// }
-//
-// @Inject(method = "renderHealthMount", at = @At("HEAD"), cancellable = true, remap = false)
-// public void onRenderHealthMount(int width, int height, CallbackInfo ci) {
-// if (LorenzMod.config.renderer.hideAnimalHearts && LorenzMod.hasSkyblockScoreboard()) {
-// ci.cancel();
-// if (prePost(HEALTHMOUNT, eventParent)) return;
-// postPost(HEALTHMOUNT, eventParent);
-// }
-// }
-//
-// @Inject(method = "renderExperience", at = @At("HEAD"), cancellable = true, remap = false)
-// public void onRenderExperience(int width, int height, CallbackInfo ci) {
-// if (LorenzMod.config.renderer.hideXpBar && LorenzMod.hasSkyblockScoreboard()) {
-// ci.cancel();
-// if (prePost(EXPERIENCE, eventParent)) return;
-// postPost(EXPERIENCE, eventParent);
-// } else if (LorenzMod.config.mining.barMode == 1) {
-// if (!LorenzMod.config.renderer.hideXpBar && (LorenzMod.config.mining.showDrillBar || LorenzMod.config.mining.showHeatBar) && LorenzMod.hasSkyblockScoreboard()) {
-// if (MiningHud.getHeat() > 0 || Utils.isDrill(Minecraft.getMinecraft().thePlayer.getHeldItem())) {
-// ci.cancel();
-// if (prePost(EXPERIENCE, eventParent)) return;
-// postPost(EXPERIENCE, eventParent);
-// }
-// }
-// }
-// }
-//
-// @Inject(method = "renderJumpBar", at = @At("HEAD"), cancellable = true, remap = false)
-// public void onRenderJumpBar(int width, int height, CallbackInfo ci) {
-// if (LorenzMod.config.renderer.hideXpBar && LorenzMod.hasSkyblockScoreboard()) {
-// ci.cancel();
-// if (prePost(JUMPBAR, eventParent)) return;
-// postPost(JUMPBAR, eventParent);
-// } else if (LorenzMod.config.mining.barMode == 1) {
-// if (!LorenzMod.config.renderer.hideXpBar && (LorenzMod.config.mining.showDrillBar || LorenzMod.config.mining.showHeatBar) && LorenzMod.hasSkyblockScoreboard()) {
-// if (MiningHud.getHeat() > 0 || Utils.isDrill(Minecraft.getMinecraft().thePlayer.getHeldItem())) {
-// ci.cancel();
-// if (prePost(JUMPBAR, eventParent)) return;
-// postPost(JUMPBAR, eventParent);
-// }
-// }
-// }
-// }
-//
-// @Inject(method = "renderFood", at = @At("HEAD"), cancellable = true, remap = false)
-// public void onRenderFood(int width, int height, CallbackInfo ci) {
-// if (LorenzMod.config.renderer.hideFood && LorenzMod.hasSkyblockScoreboard()) {
-// ci.cancel();
-// if (prePost(FOOD, eventParent)) return;
-// postPost(FOOD, eventParent);
-// }
-// }
-//
-// @Unique
-// private static boolean prePost(RenderGameOverlayEvent.ElementType type, RenderGameOverlayEvent eventParent) {
-// return MinecraftForge.EVENT_BUS.post(new RenderGameOverlayEvent.Pre(eventParent, type));
-// }
-//
-// @Unique
-// private static void postPost(RenderGameOverlayEvent.ElementType type, RenderGameOverlayEvent eventParent) {
-// MinecraftForge.EVENT_BUS.post(new RenderGameOverlayEvent.Post(eventParent, type));
-// }
-//}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinItemStack.java b/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinItemStack.java
deleted file mode 100644
index eef185561..000000000
--- a/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinItemStack.java
+++ /dev/null
@@ -1,42 +0,0 @@
-//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;
-// }
-//}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinNetHandlerPlayClient.java b/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinNetHandlerPlayClient.java
deleted file mode 100644
index 9d5bf57bc..000000000
--- a/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinNetHandlerPlayClient.java
+++ /dev/null
@@ -1,67 +0,0 @@
-//package com.thatgravyboat.skyblockhud.mixins;
-//
-//import at.lorenz.mod.LorenzMod;
-//import com.thatgravyboat.skyblockhud.tracker.TrackerHandler;
-//import net.minecraft.client.Minecraft;
-//import net.minecraft.client.network.NetHandlerPlayClient;
-//import net.minecraft.item.ItemStack;
-//import net.minecraft.nbt.NBTTagCompound;
-//import net.minecraft.network.PacketThreadUtil;
-//import net.minecraft.network.play.server.S2FPacketSetSlot;
-//import net.minecraft.network.play.server.S3EPacketTeams;
-//import net.minecraft.scoreboard.ScorePlayerTeam;
-//import net.minecraft.scoreboard.Scoreboard;
-//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;
-//import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
-//
-//@Mixin(NetHandlerPlayClient.class)
-//public class MixinNetHandlerPlayClient {
-//
-// @Inject(method = "handleSetSlot", at = @At("HEAD"))
-// public void onHandleSetSlot(S2FPacketSetSlot packetIn, CallbackInfo ci) {
-// if (LorenzMod.hasSkyblockScoreboard()) {
-// Minecraft mc = Minecraft.getMinecraft();
-// PacketThreadUtil.checkThreadAndEnqueue(packetIn, mc.getNetHandler(), mc);
-// if (packetIn.func_149175_c() == 0) {
-// ItemStack stack = packetIn.func_149174_e();
-//
-// if (stack != null && stack.hasTagCompound()) {
-// if (stack.getTagCompound().hasKey("ExtraAttributes")) {
-// NBTTagCompound extraAttributes = stack.getTagCompound().getCompoundTag("ExtraAttributes");
-// String id = extraAttributes.getString("id");
-// ItemStack slotStack = Minecraft.getMinecraft().thePlayer.inventoryContainer.getSlot(packetIn.func_149173_d()).getStack();
-// int changeAmount = stack.stackSize - (slotStack == null ? 0 : slotStack.stackSize);
-// String specialId = null;
-// int number = -1;
-// if (extraAttributes.hasKey("enchantments")) {
-// NBTTagCompound enchantments = extraAttributes.getCompoundTag("enchantments");
-// if (enchantments.getKeySet().size() == 1) {
-// for (String e : enchantments.getKeySet()) {
-// specialId = e;
-// break;
-// }
-// if (specialId != null) number = enchantments.getInteger(specialId);
-// }
-// }
-// TrackerHandler.onItemAdded(id, changeAmount, specialId, number);
-// }
-// }
-// }
-// }
-// }
-//
-// @Inject(method = "handleTeams", locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/network/play/server/S3EPacketTeams;getAction()I", ordinal = 0, shift = At.Shift.BEFORE), cancellable = true)
-// public void handleTeams(S3EPacketTeams packetIn, CallbackInfo ci, Scoreboard scoreboard) {
-// //This stops Hypixel from being stupid and spamming our logs because they dont have different ids for things.
-// if (scoreboard.getTeam(packetIn.getName()) != null && packetIn.getAction() == 0) ci.cancel();
-// }
-//
-// @Inject(method = "handleTeams", locals = LocalCapture.CAPTURE_FAILHARD, at = @At(value = "INVOKE", target = "Lnet/minecraft/network/play/server/S3EPacketTeams;getAction()I", ordinal = 6, shift = At.Shift.BEFORE), cancellable = true)
-// public void handleTeamRemove(S3EPacketTeams packetIn, CallbackInfo ci, Scoreboard scoreboard, ScorePlayerTeam scoreplayerteam) {
-// //This stops Hypixel from being stupid and spamming our logs because they dont have different ids for things.
-// if (scoreplayerteam == null) ci.cancel();
-// }
-//}
diff --git a/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinRenderItem.java b/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinRenderItem.java
deleted file mode 100644
index 64f9086fb..000000000
--- a/src/main/java/com/thatgravyboat/skyblockhud_2/mixins/MixinRenderItem.java
+++ /dev/null
@@ -1,63 +0,0 @@
-//package com.thatgravyboat.skyblockhud.mixins;
-//
-//import com.thatgravyboat.skyblockhud.handlers.CooldownHandler;
-//import com.thatgravyboat.skyblockhud.location.MinesHandler;
-//import java.lang.ref.WeakReference;
-//import net.minecraft.client.gui.FontRenderer;
-//import net.minecraft.client.renderer.GlStateManager;
-//import net.minecraft.client.renderer.Tessellator;
-//import net.minecraft.client.renderer.WorldRenderer;
-//import net.minecraft.client.renderer.entity.RenderItem;
-//import net.minecraft.item.ItemStack;
-//import org.spongepowered.asm.mixin.Mixin;
-//import org.spongepowered.asm.mixin.Shadow;
-//import org.spongepowered.asm.mixin.injection.At;
-//import org.spongepowered.asm.mixin.injection.Inject;
-//import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
-//
-//@Mixin(RenderItem.class)
-//public abstract class MixinRenderItem {
-//
-// @Shadow
-// protected abstract void draw(WorldRenderer renderer, int x, int y, int width, int height, int red, int green, int blue, int alpha);
-//
-// @Inject(method = "renderItemOverlayIntoGUI", at = @At("RETURN"))
-// public void renderItemOverlayIntoGUI(FontRenderer fr, ItemStack stack, int xPosition, int yPosition, String text, CallbackInfo ci) {
-// if (stack == null) return;
-// float cooldown = CooldownHandler.getAbilityTime(stack);
-//
-// WeakReference<MinesHandler.PrehistoricEggProgress> weakProgress = MinesHandler.getEggColorAndProgress(stack);
-//
-// if (weakProgress != null) {
-// MinesHandler.PrehistoricEggProgress progress = weakProgress.get();
-// if (progress == null) return;
-// GlStateManager.disableLighting();
-// GlStateManager.disableDepth();
-// GlStateManager.disableTexture2D();
-// GlStateManager.disableAlpha();
-// GlStateManager.disableBlend();
-// WorldRenderer worldrenderer = Tessellator.getInstance().getWorldRenderer();
-// this.draw(worldrenderer, xPosition + 2, yPosition + 13, 13, 2, 0, 0, 0, 255);
-// this.draw(worldrenderer, xPosition + 2, yPosition + 13, Math.round(progress.progress * 13f), 1, (progress.currentColor >> 16) & 0xFF, (progress.currentColor >> 8) & 0xFF, progress.currentColor & 0xFF, 255);
-// GlStateManager.enableAlpha();
-// GlStateManager.enableTexture2D();
-// GlStateManager.enableLighting();
-// GlStateManager.enableDepth();
-// }
-//
-// if (cooldown > -1) {
-// GlStateManager.disableLighting();
-// GlStateManager.disableDepth();
-// GlStateManager.disableTexture2D();
-// GlStateManager.disableAlpha();
-// GlStateManager.disableBlend();
-// WorldRenderer worldrenderer = Tessellator.getInstance().getWorldRenderer();
-// this.draw(worldrenderer, xPosition + 2, yPosition + 13, 13, 2, 0, 0, 0, 255);
-// this.draw(worldrenderer, xPosition + 2, yPosition + 13, Math.round(cooldown * 13f), 1, 102, 102, 255, 255);
-// GlStateManager.enableAlpha();
-// GlStateManager.enableTexture2D();
-// GlStateManager.enableLighting();
-// GlStateManager.enableDepth();
-// }
-// }
-//}