Skip to content

Commit

Permalink
Update 1.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
Fox2Code committed May 13, 2023
1 parent a96fef7 commit b217d3f
Show file tree
Hide file tree
Showing 12 changed files with 23 additions and 521 deletions.
19 changes: 15 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ subprojects {
rootProject.tasks.publishToMavenLocal.dependsOn(publishToMavenLocal)

afterEvaluate {
final String reindevVersion = project['reindev.version'] as String
final String reindevVersionAllowFrom = project['reindev.version.allowFrom'] as String

publishing {
publications {
release(MavenPublication) {
Expand All @@ -56,10 +59,18 @@ subprojects {
version = '1.0' // JitPack only work with "1.0" as version
pom {
url = 'https://github.com/Fox2Code/FoxLoader'
properties = [
"foxloader.version": project['foxloader.version'] as String,
"reindev.version" : project['reindev.version'] as String,
]
if (reindevVersion == reindevVersionAllowFrom) {
properties = [
"foxloader.version": project['foxloader.version'] as String,
"reindev.version" : reindevVersion,
]
} else {
properties = [
"foxloader.version": project['foxloader.version'] as String,
"reindev.version" : reindevVersion,
"reindev.version.allowFrom" : reindevVersionAllowFrom,
]
}
}
}
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,4 @@ public List<? extends RegisteredTileEntity> getRegisteredTileEntities() {
public List<? extends NetworkPlayer> getRegisteredNetworkPlayers() {
return (List<? extends NetworkPlayer>) (Object) this.playerEntities;
}

@Redirect(method = "getLoadedBlockIdOrM1", at = @At(value = "INVOKE", target =
"Lnet/minecraft/src/game/level/World;getLoadedChunkFromBlockCoords(III)Lnet/minecraft/src/game/level/chunk/Chunk;"))
public Chunk hotfix_getLoadedBlockIdOrM1(World instance, int x, int y, int z) {
return instance.getLoadedChunkFromChunkCoords(x, y, z);
}
}
2 changes: 0 additions & 2 deletions client/src/main/resources/foxloader.client.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
"MixinEntityPlayerSP",
"MixinEntityRenderer",
"MixinGameSettings",
"MixinGuiChat",
"MixinGuiContainer",
"MixinGuiDebug",
"MixinGuiMainMenu",
"MixinGuiTextField",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,10 @@ static void loadPrePatches(boolean client) {
}
registerPrePatch(new VarNameTransformer());
registerPrePatch(new RegistryTransformer());
registerPrePatch(new OptimizerChunkCacheTransformer());
if (client) {
registerPrePatch(new MinecraftClientDebugTransformer());
registerPrePatch(new FrustrumHelperTransformer());
registerPrePatch(new NetworkMappingTransformer());
registerPrePatch(new OptimizerTessellatorTransformer());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import org.objectweb.asm.tree.*;

public class FrustrumHelperTransformer implements PreClassTransformer {
private static final String PARTICLE = "net/minecraft/src/client/particle/EntityFX";
private static final String BOUNDINGBOX ="net/minecraft/src/client/physics/AxisAlignedBB";
private static final String FRUSTRUM = "net/minecraft/src/client/renderer/Frustrum";
private static final String FRUSTRUM_HELPER = "com/fox2code/foxloader/client/FrustrumHelper";
private static final String FRUSTRUM_HOOKS = "com/fox2code/foxloader/client/FrustrumHelper$Hooks";
Expand All @@ -13,7 +11,6 @@ public class FrustrumHelperTransformer implements PreClassTransformer {
public void transform(ClassNode classNode, String className) {
if (!className.startsWith("net.minecraft.")) return;
boolean entityRenderer = className.equals("net.minecraft.src.client.renderer.EntityRenderer");
boolean effectRenderer = className.equals("net.minecraft.src.client.particle.EffectRenderer");
for (MethodNode methodNode : classNode.methods) {
InsnList insnList = methodNode.instructions;
for (AbstractInsnNode abstractInsnNode : methodNode.instructions) {
Expand All @@ -40,27 +37,6 @@ public void transform(ClassNode classNode, String className) {
FRUSTRUM_HOOKS, "update", "(L" + FRUSTRUM + ";DDD)V", false));
insnList.remove(methodInsnNode);
}
} else if (effectRenderer && abstractInsnNode.getOpcode() == CHECKCAST &&
methodNode.name.startsWith("render")) {
TypeInsnNode typeInsnNode = (TypeInsnNode) abstractInsnNode;
if (!typeInsnNode.desc.equals(PARTICLE)) continue;
abstractInsnNode = typeInsnNode.getNext();
if (!(abstractInsnNode.getOpcode() == ASTORE)) continue;
VarInsnNode varInsnNode = (VarInsnNode) abstractInsnNode;
InsnList insns = new InsnList();
LabelNode endLabel = new LabelNode();
insns.add(new VarInsnNode(ALOAD, varInsnNode.var));
insns.add(new FieldInsnNode(GETFIELD, PARTICLE,
"boundingBox", "L" + BOUNDINGBOX + ";"));
insns.add(new MethodInsnNode(INVOKESTATIC, FRUSTRUM_HELPER,
"isBoundingBoxInFrustum", "(L" + BOUNDINGBOX + ";)Z"));
insns.add(new JumpInsnNode(IFEQ, endLabel));
AbstractInsnNode nextReal = varInsnNode.getNext();
insnList.insert(varInsnNode, insns);
while (nextReal != null && nextReal.getOpcode() != INVOKEVIRTUAL) {
nextReal = nextReal.getNext();
}
insnList.insert(nextReal, endLabel);
}
}
}
Expand Down
Loading

0 comments on commit b217d3f

Please sign in to comment.