Skip to content

Commit

Permalink
0.6.16
Browse files Browse the repository at this point in the history
Backports:
- b1.7.3 port (StationAPI required)
- 1.2.5 port
- 1.4.7 port
- 1.5.2 port
- 1.6.4 port
Ported to 24w13a and 24w14potato
Added Iris 1.7 beta compatibility to 1.20.1 and 1.20.4 (Fixes the crash)
Added linear interpolation to value layer updates
Updated Simplified Chinese translation (#586)

Fixed first person hand flashing red on 1.7.10 (Closes #583)
Fixed crash with RenderPlayer API on 1.12.2 (Closes #566)
Fixed translucent textures showing solid on 1.7.10 and 1.8.9 (#401)
Fixed crash with Optifine 1.20.4 (Closes #585)
Fixed Copy Transform tooltip reports incorrect toggles (Closes #587)
  • Loading branch information
tom5454 committed Apr 2, 2024
1 parent 7eafb7b commit 3221e85
Show file tree
Hide file tree
Showing 434 changed files with 205,173 additions and 9,210 deletions.
14,796 changes: 7,406 additions & 7,390 deletions Blockbench/cpm_plugin.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Blockbench/cpm_plugin.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion CustomPlayerModels-1.10/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.15a
mod_version=0.6.16a
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.12/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.15a
mod_version=0.6.16a
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,8 @@ public ClassNode apply(ClassNode input) {
public ClassNode apply(ClassNode input) {
boolean isDeobf = false;
input.interfaces.add("com/tom/cpmcore/IPlayerRenderer");
MethodNode renderModel = null;

for(MethodNode method : input.methods) {
if(method.name.equals("<init>")) {
LOG.info("CPM RenderPlayer Hook: Found constructor");
Expand Down Expand Up @@ -327,41 +329,58 @@ public ClassNode apply(ClassNode input) {
}
}
}
if(method.name.equals("renderModel") || (method.name.equals("a") && method.desc.equals("(Lvp;FFFFFF)V"))) {
renderModel = method;
LOG.info("CPM Render Invis Hook: Found renderModel method");
}
}
//func_77036_a(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V
//renderModel(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V

InsnList list;
boolean fullMethod = false;
String name = isDeobf ? "renderModel" : "func_77036_a";
LOG.info("CPM Render Invis Hook: Injecting method " + (isDeobf ? "deobf" : ""));
MethodNode mn = new MethodNode(Opcodes.ACC_PUBLIC, name, "(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V", null, null);
mn.instructions.add(new VarInsnNode(Opcodes.ALOAD, 0));
mn.instructions.add(new VarInsnNode(Opcodes.ALOAD, 1));
mn.instructions.add(new VarInsnNode(Opcodes.FLOAD, 2));
mn.instructions.add(new VarInsnNode(Opcodes.FLOAD, 3));
mn.instructions.add(new VarInsnNode(Opcodes.FLOAD, 4));
mn.instructions.add(new VarInsnNode(Opcodes.FLOAD, 5));
mn.instructions.add(new VarInsnNode(Opcodes.FLOAD, 6));
mn.instructions.add(new VarInsnNode(Opcodes.FLOAD, 7));
mn.instructions.add(new MethodInsnNode(Opcodes.INVOKESTATIC, HOOKS_CLASS, "onRenderPlayerModel", "(Lnet/minecraft/client/renderer/entity/RenderPlayer;Lnet/minecraft/entity/EntityLivingBase;FFFFFF)Z", false));
if (renderModel == null) {
//func_77036_a(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V
//renderModel(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V
LOG.info("CPM Render Invis Hook: Injecting method " + (isDeobf ? "deobf" : ""));
renderModel = new MethodNode(Opcodes.ACC_PUBLIC, name, "(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V", null, null);
input.methods.add(renderModel);
list = renderModel.instructions;
fullMethod = true;
} else {
list = new InsnList();
}
list.add(new VarInsnNode(Opcodes.ALOAD, 0));
list.add(new VarInsnNode(Opcodes.ALOAD, 1));
list.add(new VarInsnNode(Opcodes.FLOAD, 2));
list.add(new VarInsnNode(Opcodes.FLOAD, 3));
list.add(new VarInsnNode(Opcodes.FLOAD, 4));
list.add(new VarInsnNode(Opcodes.FLOAD, 5));
list.add(new VarInsnNode(Opcodes.FLOAD, 6));
list.add(new VarInsnNode(Opcodes.FLOAD, 7));
list.add(new MethodInsnNode(Opcodes.INVOKESTATIC, HOOKS_CLASS, "onRenderPlayerModel", "(Lnet/minecraft/client/renderer/entity/RenderPlayer;Lnet/minecraft/entity/EntityLivingBase;FFFFFF)Z", false));
LabelNode lbln = new LabelNode();
mn.instructions.add(new JumpInsnNode(Opcodes.IFEQ, lbln));
mn.instructions.add(new InsnNode(Opcodes.RETURN));
mn.instructions.add(lbln);

mn.instructions.add(new VarInsnNode(Opcodes.ALOAD, 0));
mn.instructions.add(new VarInsnNode(Opcodes.ALOAD, 1));
mn.instructions.add(new VarInsnNode(Opcodes.FLOAD, 2));
mn.instructions.add(new VarInsnNode(Opcodes.FLOAD, 3));
mn.instructions.add(new VarInsnNode(Opcodes.FLOAD, 4));
mn.instructions.add(new VarInsnNode(Opcodes.FLOAD, 5));
mn.instructions.add(new VarInsnNode(Opcodes.FLOAD, 6));
mn.instructions.add(new VarInsnNode(Opcodes.FLOAD, 7));
mn.instructions.add(new MethodInsnNode(Opcodes.INVOKESPECIAL, "net/minecraft/client/renderer/entity/RenderLivingBase", name, "(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V", false));
mn.instructions.add(new InsnNode(Opcodes.RETURN));
input.methods.add(mn);
list.add(new JumpInsnNode(Opcodes.IFEQ, lbln));
list.add(new InsnNode(Opcodes.RETURN));
list.add(lbln);

if (fullMethod) {
list.add(new VarInsnNode(Opcodes.ALOAD, 0));
list.add(new VarInsnNode(Opcodes.ALOAD, 1));
list.add(new VarInsnNode(Opcodes.FLOAD, 2));
list.add(new VarInsnNode(Opcodes.FLOAD, 3));
list.add(new VarInsnNode(Opcodes.FLOAD, 4));
list.add(new VarInsnNode(Opcodes.FLOAD, 5));
list.add(new VarInsnNode(Opcodes.FLOAD, 6));
list.add(new VarInsnNode(Opcodes.FLOAD, 7));
list.add(new MethodInsnNode(Opcodes.INVOKESPECIAL, "net/minecraft/client/renderer/entity/RenderLivingBase", name, "(Lnet/minecraft/entity/EntityLivingBase;FFFFFF)V", false));
list.add(new InsnNode(Opcodes.RETURN));
} else {
renderModel.instructions.insertBefore(renderModel.instructions.getFirst(), list);
}
LOG.info("CPM Render Invis Hook: injected");

name = isDeobf ? "isVisible" : "func_193115_c";
mn = new MethodNode(Opcodes.ACC_PUBLIC, "cpm$isVisible", "(Lnet/minecraft/client/entity/AbstractClientPlayer;)Z", null, null);
MethodNode mn = new MethodNode(Opcodes.ACC_PUBLIC, "cpm$isVisible", "(Lnet/minecraft/client/entity/AbstractClientPlayer;)Z", null, null);
mn.instructions.add(new VarInsnNode(Opcodes.ALOAD, 0));
mn.instructions.add(new VarInsnNode(Opcodes.ALOAD, 1));
mn.instructions.add(new MethodInsnNode(Opcodes.INVOKEVIRTUAL, input.name, name, "(Lnet/minecraft/entity/EntityLivingBase;)Z", false));
Expand Down
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.14/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.15a
mod_version=0.6.16a
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.15/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.15a
mod_version=0.6.16a
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.16/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.15a
mod_version=0.6.16a
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.17/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.15a
mod_version=0.6.16a
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.18/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.15a
mod_version=0.6.16a
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.19.3/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.15a
mod_version=0.6.16a
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.19.4/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.15a
mod_version=0.6.16a
2 changes: 1 addition & 1 deletion CustomPlayerModels-1.19/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

mod_version=0.6.15a
mod_version=0.6.16a
9 changes: 9 additions & 0 deletions CustomPlayerModels-1.2/README.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Installation
See: [Agent Installation](https://github.com/tom5454/CustomPlayerModels/wiki/Agent-Install)

Dedicated server not supported currently

## Building

`gradlew copyArtifact runObfDump`
`gradlew build`
Loading

0 comments on commit 3221e85

Please sign in to comment.