diff options
author | Linnea Gräf <nea@nea.moe> | 2025-01-08 19:25:29 +0100 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2025-01-08 19:25:29 +0100 |
commit | d1e16a47819509ed645bb93e1a173e0a97025cef (patch) | |
tree | efbe886d9ac1ab4ea01788cb4842812fd0af9079 /src/main/java/moe/nea/ledger/mixin | |
parent | f694daf322bbb4ff530a9332547c5c8337c3e0c0 (diff) | |
download | LocalTransactionLedger-d1e16a47819509ed645bb93e1a173e0a97025cef.tar.gz LocalTransactionLedger-d1e16a47819509ed645bb93e1a173e0a97025cef.tar.bz2 LocalTransactionLedger-d1e16a47819509ed645bb93e1a173e0a97025cef.zip |
build: Move mod to subproject
Diffstat (limited to 'src/main/java/moe/nea/ledger/mixin')
4 files changed, 0 insertions, 114 deletions
diff --git a/src/main/java/moe/nea/ledger/mixin/AccessorGuiEditSign.java b/src/main/java/moe/nea/ledger/mixin/AccessorGuiEditSign.java deleted file mode 100644 index 52b8911..0000000 --- a/src/main/java/moe/nea/ledger/mixin/AccessorGuiEditSign.java +++ /dev/null @@ -1,12 +0,0 @@ -package moe.nea.ledger.mixin; - -import net.minecraft.client.gui.inventory.GuiEditSign; -import net.minecraft.tileentity.TileEntitySign; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.gen.Accessor; - -@Mixin(GuiEditSign.class) -public interface AccessorGuiEditSign { - @Accessor("tileSign") - TileEntitySign getTileEntity_ledger(); -} diff --git a/src/main/java/moe/nea/ledger/mixin/MouseClickEventPatch.java b/src/main/java/moe/nea/ledger/mixin/MouseClickEventPatch.java deleted file mode 100644 index 4e6e360..0000000 --- a/src/main/java/moe/nea/ledger/mixin/MouseClickEventPatch.java +++ /dev/null @@ -1,18 +0,0 @@ -package moe.nea.ledger.mixin; - -import moe.nea.ledger.events.GuiClickEvent; -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.inventory.Slot; -import net.minecraftforge.common.MinecraftForge; -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(GuiContainer.class) -public class MouseClickEventPatch { - @Inject(method = "handleMouseClick", at = @At("HEAD")) - private void onHandleMouseClick(Slot slotIn, int slotId, int clickedButton, int clickType, CallbackInfo ci) { - MinecraftForge.EVENT_BUS.post(new GuiClickEvent(slotIn, slotId, clickedButton, clickType)); - } -} diff --git a/src/main/java/moe/nea/ledger/mixin/OnInitializationCompletePatch.java b/src/main/java/moe/nea/ledger/mixin/OnInitializationCompletePatch.java deleted file mode 100644 index fc9afb7..0000000 --- a/src/main/java/moe/nea/ledger/mixin/OnInitializationCompletePatch.java +++ /dev/null @@ -1,18 +0,0 @@ -package moe.nea.ledger.mixin; - -import moe.nea.ledger.events.InitializationComplete; -import net.minecraft.client.Minecraft; -import net.minecraftforge.common.MinecraftForge; -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(Minecraft.class) -public class OnInitializationCompletePatch { - - @Inject(method = "startGame", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/fml/client/FMLClientHandler;onInitializationComplete()V")) - private void onInitComplete(CallbackInfo ci) { - MinecraftForge.EVENT_BUS.post(new InitializationComplete()); - } -} diff --git a/src/main/java/moe/nea/ledger/mixin/devenv/RegisterModResourcesPatch.java b/src/main/java/moe/nea/ledger/mixin/devenv/RegisterModResourcesPatch.java deleted file mode 100644 index 88e8364..0000000 --- a/src/main/java/moe/nea/ledger/mixin/devenv/RegisterModResourcesPatch.java +++ /dev/null @@ -1,66 +0,0 @@ -package moe.nea.ledger.mixin.devenv; - -import com.google.common.eventbus.EventBus; -import net.minecraftforge.fml.client.FMLFileResourcePack; -import net.minecraftforge.fml.common.DummyModContainer; -import net.minecraftforge.fml.common.LoadController; -import net.minecraftforge.fml.common.ModContainer; -import net.minecraftforge.fml.common.ModMetadata; -import net.minecraftforge.fml.common.discovery.ASMDataTable; -import net.minecraftforge.fml.common.discovery.ContainerType; -import net.minecraftforge.fml.common.discovery.ModCandidate; -import net.minecraftforge.fml.common.discovery.ModDiscoverer; -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.CallbackInfoReturnable; - -import java.io.File; -import java.util.Collections; -import java.util.List; - -@Mixin(value = ModDiscoverer.class, remap = false) -public class RegisterModResourcesPatch { - @Shadow - private List<ModCandidate> candidates; - - @Inject(method = "identifyMods", at = @At("HEAD"), remap = false) - private void addCandidate(CallbackInfoReturnable<List<ModContainer>> cir) { - String bonusResourceMod = System.getProperty("ledger.bonusresourcemod"); - if (bonusResourceMod == null) return; - File file = new File(bonusResourceMod); - if (!file.isDirectory()) return; - ModMetadata modMetadata = new ModMetadata(); - modMetadata.modId = "ledger-bonus"; - modMetadata.name = "Ledger Bonus Resources"; - modMetadata.autogenerated = true; - ModContainer container = new DummyModContainer(modMetadata) { - @Override - public Object getMod() { - return new Object(); - } - - @Override - public boolean registerBus(EventBus bus, LoadController controller) { - return true; - } - - @Override - public File getSource() { - return file; - } - - @Override - public Class<?> getCustomResourcePackClass() { - return FMLFileResourcePack.class; - } - }; - candidates.add(new ModCandidate(file, file, ContainerType.DIR) { - @Override - public List<ModContainer> explore(ASMDataTable table) { - return Collections.singletonList(container); - } - }); - } -} |