Skip to content

Commit

Permalink
Remove unnecessary access transformer, rearrange some annotation values
Browse files Browse the repository at this point in the history
  • Loading branch information
62832 committed May 13, 2024
1 parent bcbdfb8 commit 90c555e
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 17 deletions.
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ repositories {
minecraft {
mappings("parchment", "2023.09.03-1.20.1")
copyIdeResources.set(true)
accessTransformer(file("src/main/resources/META-INF/accesstransformer.cfg"))

runs {
configureEach {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public EMCInterfaceScreen(M menu, Inventory playerInventory, Component title, Sc
var button = new SetAmountButton(btn -> {
var idx = amountButtons.indexOf(btn);
var configSlot = configSlots.get(idx);
menu.openSetAmountMenu(configSlot.slot);
menu.openSetAmountMenu(configSlot.getSlotIndex());
});

button.setDisableBackground(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
import gripe._90.appliede.me.misc.EMCInterfaceLogic;
import gripe._90.appliede.part.EMCInterfacePart;

@Mixin(value = EMCInterfacePart.class, remap = false)
@Mixin(EMCInterfacePart.class)
public abstract class EMCInterfacePartMixin extends AEBasePart implements AECapFix.Invalidator {
public EMCInterfacePartMixin(IPartItem<?> partItem) {
super(partItem);
}

@Shadow
@Shadow(remap = false)
public abstract EMCInterfaceLogic getInterfaceLogic();

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@

import gripe._90.appliede.me.key.EMCKey;

@Mixin(value = MEStorageMenu.class, remap = false)
@Mixin(MEStorageMenu.class)
public abstract class MEStorageMenuMixin {
// spotless:off
@Redirect(
method = "lambda$tryFillContainerItem$2",
at = @At(
value = "INVOKE",
target = "Lappeng/api/storage/StorageHelper;poweredExtraction(Lappeng/api/networking/energy/IEnergySource;Lappeng/api/storage/MEStorage;Lappeng/api/stacks/AEKey;JLappeng/api/networking/security/IActionSource;Lappeng/api/config/Actionable;)J"))
target = "Lappeng/api/storage/StorageHelper;poweredExtraction(Lappeng/api/networking/energy/IEnergySource;Lappeng/api/storage/MEStorage;Lappeng/api/stacks/AEKey;JLappeng/api/networking/security/IActionSource;Lappeng/api/config/Actionable;)J",
remap = false))
// spotless:on
private long emcExtraction(
IEnergySource powerSource,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@

import appeng.api.features.P2PTunnelAttunement;

@Mixin(value = P2PTunnelAttunement.class, remap = false)
@Mixin(P2PTunnelAttunement.class)
public interface P2PTunnelAttunementAccessor {
@Accessor
@Accessor(remap = false)
static Map<TagKey<Item>, Item> getTagTunnels() {
throw new AssertionError();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
import moze_intel.projecte.api.capabilities.IKnowledgeProvider;
import moze_intel.projecte.impl.TransmutationOffline;

@Mixin(value = TransmutationOffline.class, remap = false)
@Mixin(TransmutationOffline.class)
public interface TransmutationOfflineAccessor {
@Invoker
@Invoker(remap = false)
static IKnowledgeProvider invokeForPlayer(UUID uuid) {
throw new AssertionError();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

import appeng.core.sync.BasePacket;

@Mixin(value = BasePacket.class, remap = false)
@Mixin(BasePacket.class)
public interface BasePacketAccessor {
@Invoker
@Invoker(remap = false)
void invokeConfigureWrite(FriendlyByteBuf data);
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@

import gripe._90.appliede.me.reporting.GridInventoryEMCEntry;

@Mixin(value = MEInventoryUpdatePacket.class, remap = false)
@Mixin(MEInventoryUpdatePacket.class)
public abstract class MEInventoryUpdatePacketMixin {
// spotless:off
@Redirect(
method = "<init>(Lnet/minecraft/network/FriendlyByteBuf;)V",
at = @At(
value = "INVOKE",
target = "Lappeng/core/sync/packets/MEInventoryUpdatePacket;readEntry(Lnet/minecraft/network/FriendlyByteBuf;)Lappeng/menu/me/common/GridInventoryEntry;"))
target = "Lappeng/core/sync/packets/MEInventoryUpdatePacket;readEntry(Lnet/minecraft/network/FriendlyByteBuf;)Lappeng/menu/me/common/GridInventoryEntry;",
remap = false))
// spotless:on
private GridInventoryEntry readEntryWithEmc(FriendlyByteBuf buffer) {
return GridInventoryEMCEntry.readEntry(buffer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ public MEStorageScreenMixin(C menu, Inventory playerInventory, Component title,
method = "renderGridInventoryEntryTooltip",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/Minecraft;getInstance()Lnet/minecraft/client/Minecraft;",
remap = true),
target = "Lnet/minecraft/client/Minecraft;getInstance()Lnet/minecraft/client/Minecraft;"),
locals = LocalCapture.CAPTURE_FAILEXCEPTION,
remap = false)
// spotless:on
Expand Down
1 change: 0 additions & 1 deletion src/main/resources/META-INF/accesstransformer.cfg

This file was deleted.

0 comments on commit 90c555e

Please sign in to comment.