Skip to content

Commit

Permalink
Update 1.2.13
Browse files Browse the repository at this point in the history
  • Loading branch information
Fox2Code committed Sep 6, 2023
1 parent d0fddea commit 9e34b33
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,25 @@ private void patchPlayerControllerMP(ClassNode classNode) {
.getMethod(classNode, "clickSlot");
InsnList earlyInject = new InsnList();
LabelNode labelNode = new LabelNode();
earlyInject.insert(new VarInsnNode(ILOAD, 1));
earlyInject.insert(new InsnNode(ICONST_M1));
earlyInject.insert(new JumpInsnNode(IF_ICMPNE, labelNode));
earlyInject.insert(new VarInsnNode(ALOAD, 0));
earlyInject.insert(new VarInsnNode(ILOAD, 1));
earlyInject.insert(new VarInsnNode(ILOAD, 2));
earlyInject.insert(new VarInsnNode(ILOAD, 3));
earlyInject.insert(new VarInsnNode(ILOAD, 4));
earlyInject.insert(new VarInsnNode(ALOAD, 5));
earlyInject.insert(new MethodInsnNode(INVOKESPECIAL,
earlyInject.add(new VarInsnNode(ILOAD, 1));
earlyInject.add(new InsnNode(ICONST_M1));
earlyInject.add(new JumpInsnNode(IF_ICMPNE, labelNode));
earlyInject.add(new VarInsnNode(ALOAD, 0));
earlyInject.add(new VarInsnNode(ILOAD, 1));
earlyInject.add(new VarInsnNode(ILOAD, 2));
earlyInject.add(new VarInsnNode(ILOAD, 3));
earlyInject.add(new VarInsnNode(ILOAD, 4));
earlyInject.add(new VarInsnNode(ALOAD, 5));
earlyInject.add(new MethodInsnNode(INVOKESPECIAL,
"net/minecraft/src/client/player/PlayerController", "clickSlot",
"(IIIILnet/minecraft/src/game/entity/player/EntityPlayer;)Lnet/minecraft/src/game/item/ItemStack;"));
earlyInject.insert(new InsnNode(ARETURN));
earlyInject.insert(labelNode);
sendClickSlot.instructions.insert(earlyInject);
earlyInject.add(new InsnNode(ARETURN));
earlyInject.add(labelNode);
AbstractInsnNode firstCodeNode =
sendClickSlot.instructions.getFirst();
while (firstCodeNode.getOpcode() == -1)
firstCodeNode = firstCodeNode.getNext();
sendClickSlot.instructions.insertBefore(firstCodeNode, earlyInject);
}

private void patchNetClientHandler(ClassNode classNode) {
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ org.gradle.parallel=true
org.gradle.jvmargs=-Xmx1024m -XX:-UseGCOverheadLimit -Dfile.encoding=UTF-8

# FoxLoader properties
foxloader.version=1.2.12
foxloader.lastReIndevTransformerChanges=1.2.12
foxloader.version=1.2.13
foxloader.lastReIndevTransformerChanges=1.2.13

# ReIndev properties
reindev.clientUrl=https://cdn.fox2code.com/files/reindev_2.8.1_04.jar
Expand All @@ -15,5 +15,5 @@ reindev.version=2.8.1_4
reindev.version.allowFrom=2.8.1_3

#Spark properties
spark.dependency=maven.modrinth:spark:1.10.37-fabric
spark.version=1.10.37
spark.dependency=maven.modrinth:spark:1.10.53-fabric
spark.version=1.10.53

0 comments on commit 9e34b33

Please sign in to comment.