Skip to content

Commit

Permalink
Refactored mixin accessors into their own package
Browse files Browse the repository at this point in the history
  • Loading branch information
0xTas committed Nov 7, 2024
1 parent 4cd4144 commit f7068b8
Show file tree
Hide file tree
Showing 29 changed files with 44 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import net.minecraft.client.util.SelectionManager;
import org.spongepowered.asm.mixin.injection.Inject;
import meteordevelopment.meteorclient.systems.modules.Modules;
import dev.stardust.mixin.accessor.AbstractSignEditScreenAccessor;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import net.minecraft.client.gui.screen.ingame.AbstractSignEditScreen;

Expand Down
1 change: 1 addition & 0 deletions src/main/java/dev/stardust/mixin/BookEditScreenMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import net.minecraft.client.gui.widget.ButtonWidget;
import dev.stardust.mixin.accessor.BookEditScreenAccessor;
import net.minecraft.client.gui.screen.ingame.BookEditScreen;
import meteordevelopment.meteorclient.systems.modules.Modules;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/dev/stardust/mixin/BookScreenMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.spongepowered.asm.mixin.injection.Inject;
import net.minecraft.client.gui.widget.ButtonWidget;
import net.minecraft.client.gui.screen.ingame.BookScreen;
import dev.stardust.mixin.accessor.BookScreenContentsAccessor;
import meteordevelopment.meteorclient.systems.modules.Modules;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

Expand Down
1 change: 1 addition & 0 deletions src/main/java/dev/stardust/mixin/MusicTrackerMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.client.sound.MusicTracker;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import dev.stardust.mixin.accessor.MusicTrackerAccessor;
import meteordevelopment.meteorclient.systems.modules.Modules;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

Expand Down
1 change: 1 addition & 0 deletions src/main/java/dev/stardust/mixin/ScreenMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.spongepowered.asm.mixin.Mutable;
import net.minecraft.client.gui.screen.Screen;
import org.spongepowered.asm.mixin.injection.At;
import dev.stardust.mixin.accessor.StyleAccessor;
import org.spongepowered.asm.mixin.injection.Inject;
import net.minecraft.client.gui.AbstractParentElement;
import meteordevelopment.meteorclient.systems.modules.Modules;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/dev/stardust/mixin/SoundSystemMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import net.minecraft.util.math.MathHelper;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import dev.stardust.mixin.accessor.SourceManagerAccessor;
import meteordevelopment.meteorclient.systems.modules.Modules;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.stardust.mixin;
package dev.stardust.mixin.accessor;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.stardust.mixin;
package dev.stardust.mixin.accessor;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.stardust.mixin;
package dev.stardust.mixin.accessor;

import net.minecraft.screen.Property;
import org.spongepowered.asm.mixin.Mixin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.stardust.mixin;
package dev.stardust.mixin.accessor;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.stardust.mixin;
package dev.stardust.mixin.accessor;

import java.util.List;
import net.minecraft.text.Text;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.stardust.mixin;
package dev.stardust.mixin.accessor;

import javax.annotation.Nullable;
import org.spongepowered.asm.mixin.Mixin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.stardust.mixin;
package dev.stardust.mixin.accessor;

import net.minecraft.text.Text;
import org.spongepowered.asm.mixin.Mixin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.stardust.mixin;
package dev.stardust.mixin.accessor;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Invoker;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.stardust.mixin;
package dev.stardust.mixin.accessor;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.stardust.mixin;
package dev.stardust.mixin.accessor;

import javax.annotation.Nullable;
import org.spongepowered.asm.mixin.Mixin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.stardust.mixin;
package dev.stardust.mixin.accessor;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.stardust.mixin;
package dev.stardust.mixin.accessor;

import javax.annotation.Nullable;
import net.minecraft.client.sound.Source;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.stardust.mixin;
package dev.stardust.mixin.accessor;

import net.minecraft.text.Style;
import net.minecraft.text.HoverEvent;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/stardust/mixin/meteor/AutoLogMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
import meteordevelopment.meteorclient.utils.Utils;
import meteordevelopment.meteorclient.MeteorClient;
import org.spongepowered.asm.mixin.injection.Inject;
import dev.stardust.mixin.DisconnectS2CPacketAccessor;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.BoolSetting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import dev.stardust.mixin.accessor.DisconnectS2CPacketAccessor;
import meteordevelopment.meteorclient.systems.modules.Category;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.systems.modules.misc.AutoLog;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import meteordevelopment.meteorclient.gui.GuiTheme;
import org.spongepowered.asm.mixin.injection.Inject;
import meteordevelopment.meteorclient.gui.tabs.TabScreen;
import dev.stardust.mixin.meteor.accessor.CategoryAccessor;
import meteordevelopment.meteorclient.systems.modules.Category;
import meteordevelopment.meteorclient.gui.screens.ModulesScreen;
import meteordevelopment.meteorclient.gui.widgets.containers.WWindow;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package dev.stardust.mixin.meteor;
package dev.stardust.mixin.meteor.accessor;

import net.minecraft.item.ItemStack;
import org.spongepowered.asm.mixin.Mixin;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/stardust/modules/AutoDrawDistance.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
import dev.stardust.util.StardustUtil;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.client.MinecraftClient;
import dev.stardust.mixin.GameOptionsAccessor;
import net.minecraft.client.option.GameOptions;
import it.unimi.dsi.fastutil.ints.IntArrayList;
import net.minecraft.client.option.SimpleOption;
import dev.stardust.mixin.accessor.GameOptionsAccessor;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.IntSetting;
import meteordevelopment.meteorclient.settings.BoolSetting;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/stardust/modules/ChatSigns.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
import meteordevelopment.meteorclient.settings.*;
import meteordevelopment.meteorclient.utils.Utils;
import net.minecraft.block.entity.SignBlockEntity;
import dev.stardust.mixin.DisconnectS2CPacketAccessor;
import net.minecraft.client.network.ClientPlayerEntity;
import meteordevelopment.meteorclient.renderer.ShapeMode;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.mixininterface.IChatHud;
import dev.stardust.mixin.accessor.DisconnectS2CPacketAccessor;
import meteordevelopment.meteorclient.utils.render.RenderUtils;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import meteordevelopment.meteorclient.events.world.ChunkDataEvent;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/stardust/modules/MusicTweaks.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
import net.minecraft.util.math.MathHelper;
import net.minecraft.client.MinecraftClient;
import meteordevelopment.orbit.EventHandler;
import dev.stardust.mixin.MusicTrackerAccessor;
import io.netty.util.internal.ThreadLocalRandom;
import net.minecraft.client.sound.SoundInstance;
import meteordevelopment.meteorclient.settings.*;
import dev.stardust.mixin.accessor.MusicTrackerAccessor;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.meteorclient.mixininterface.IChatHud;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dev/stardust/modules/RocketMan.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
import meteordevelopment.meteorclient.settings.*;
import net.minecraft.component.DataComponentTypes;
import meteordevelopment.meteorclient.utils.Utils;
import dev.stardust.mixin.PlayerMoveC2SPacketAccessor;
import dev.stardust.mixin.FireworkRocketEntityAccessor;
import meteordevelopment.meteorclient.utils.misc.Keybind;
import net.minecraft.entity.projectile.FireworkRocketEntity;
import meteordevelopment.meteorclient.utils.player.InvUtils;
Expand All @@ -29,6 +27,8 @@
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.systems.modules.Modules;
import meteordevelopment.meteorclient.mixininterface.IChatHud;
import dev.stardust.mixin.accessor.PlayerMoveC2SPacketAccessor;
import dev.stardust.mixin.accessor.FireworkRocketEntityAccessor;
import net.minecraft.network.packet.s2c.play.PlaySoundS2CPacket;
import meteordevelopment.meteorclient.events.packets.PacketEvent;
import net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/dev/stardust/modules/StashBrander.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
import dev.stardust.util.StardustUtil;
import net.minecraft.sound.SoundEvents;
import meteordevelopment.orbit.EventHandler;
import dev.stardust.mixin.AnvilScreenAccessor;
import net.minecraft.screen.AnvilScreenHandler;
import meteordevelopment.meteorclient.settings.*;
import net.minecraft.component.DataComponentTypes;
import dev.stardust.mixin.AnvilScreenHandlerAccessor;
import dev.stardust.mixin.accessor.AnvilScreenAccessor;
import net.minecraft.client.gui.screen.ingame.AnvilScreen;
import meteordevelopment.meteorclient.utils.player.InvUtils;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.systems.modules.Module;
import dev.stardust.mixin.accessor.AnvilScreenHandlerAccessor;

/**
* @author Tas [0xTas] <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/dev/stardust/util/StardustUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import io.netty.util.internal.ThreadLocalRandom;
import meteordevelopment.meteorclient.utils.Utils;
import net.minecraft.component.DataComponentTypes;
import dev.stardust.mixin.ClientConnectionAccessor;
import net.minecraft.component.type.ProfileComponent;
import dev.stardust.mixin.accessor.ClientConnectionAccessor;
import static meteordevelopment.meteorclient.MeteorClient.mc;
import meteordevelopment.meteorclient.systems.modules.Modules;
import net.minecraft.network.encryption.NetworkEncryptionUtils;
Expand Down
28 changes: 14 additions & 14 deletions src/main/resources/stardust.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"client": [
"ScreenMixin",
"ChatHudMixin",
"StyleAccessor",
"InGameHudMixin",
"BossBarHudMixin",
"BookScreenMixin",
Expand All @@ -15,23 +14,24 @@
"MusicTrackerMixin",
"GameMenuScreenMixin",
"EntityRendererMixin",
"AnvilScreenAccessor",
"BookEditScreenMixin",
"GameOptionsAccessor",
"MinecraftClientMixin",
"MusicTrackerAccessor",
"NarratorManagerMixin",
"WeightedSoundSetMixin",
"SourceManagerAccessor",
"BookEditScreenAccessor",
"accessor.StyleAccessor",
"SplashTextRendererMixin",
"ClientPlayerEntityMixin",
"ElytraSoundInstanceMixin",
"meteor.ModulesScreenMixin",
"BookScreenContentsAccessor",
"AbstractSignEditScreenMixin",
"SignBlockEntityRendererMixin",
"AbstractSignEditScreenAccessor"
"accessor.AnvilScreenAccessor",
"accessor.GameOptionsAccessor",
"accessor.MusicTrackerAccessor",
"accessor.SourceManagerAccessor",
"accessor.BookEditScreenAccessor",
"accessor.BookScreenContentsAccessor",
"accessor.AbstractSignEditScreenAccessor"
],
"injectors": {
"defaultRequire": 1
Expand All @@ -48,12 +48,12 @@
"meteor.FreecamMixin",
"meteor.AutoMendMixin",
"meteor.NotifierMixin",
"meteor.CategoryAccessor",
"ClientConnectionAccessor",
"FireworkRocketEntityMixin",
"AnvilScreenHandlerAccessor",
"DisconnectS2CPacketAccessor",
"PlayerMoveC2SPacketAccessor",
"FireworkRocketEntityAccessor"
"meteor.accessor.CategoryAccessor",
"accessor.ClientConnectionAccessor",
"accessor.AnvilScreenHandlerAccessor",
"accessor.DisconnectS2CPacketAccessor",
"accessor.PlayerMoveC2SPacketAccessor",
"accessor.FireworkRocketEntityAccessor"
]
}

0 comments on commit f7068b8

Please sign in to comment.