Skip to content

Commit

Permalink
Overhaul part 1! 👀
Browse files Browse the repository at this point in the history
  • Loading branch information
Mixces committed May 7, 2024
1 parent 7bfafec commit f3aa1c2
Show file tree
Hide file tree
Showing 19 changed files with 586 additions and 265 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mod_name = GlintColorizer
mod_id = glintcolorizer
mod_version = 1.0.2
mod_version = 1.1.2
mod_archives_name = GlintColorizer

# Gradle Configuration -- DO NOT TOUCH THESE VALUES.
Expand Down
8 changes: 5 additions & 3 deletions root.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ plugins {
}

preprocess {
"1.12.2-forge"(11202, "srg") {
"1.8.9-forge"(10809, "srg", rootProject.file("versions/1.12.2-1.8.9.txt"))
}
// "1.12.2-forge"(11202, "srg") {
"1.8.9-forge"(10809, "srg",
// rootProject.file("versions/1.12.2-1.8.9.txt")
)
// }
}
6 changes: 4 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@ rootProject.buildFileName = "root.gradle.kts"

// Adds all of our build target versions to the classpath if we need to add version-specific code.
listOf(
"1.8.9-forge", // Update this if you want to remove/add a version, along with `build.gradle.kts` and `root.gradle.kts`.
"1.12.2-forge"
"1.8.9-forge"
// ,
// Update this if you want to remove/add a version, along with `build.gradle.kts` and `root.gradle.kts`.
// "1.12.2-forge"
).forEach { version ->
include(":$version")
project(":$version").apply {
Expand Down
36 changes: 0 additions & 36 deletions src/main/java/org/polyfrost/glintcolorizer/GlintColorizer.java

This file was deleted.

This file was deleted.

This file was deleted.

53 changes: 0 additions & 53 deletions src/main/java/org/polyfrost/glintcolorizer/config/GlintConfig.java

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package org.polyfrost.glintcolorizer.mixin;

import org.polyfrost.glintcolorizer.hook.RenderItemHook;
import net.minecraft.client.renderer.block.model.ItemCameraTransforms;
import net.minecraft.client.resources.model.IBakedModel;
import net.minecraftforge.client.ForgeHooksClient;
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.CallbackInfoReturnable;

@Mixin(value = ForgeHooksClient.class, remap = false)
public class ForgeHooksClientMixin {

@Inject(
method = "handleCameraTransforms",
at = @At(
value = "HEAD"
)
)
private static void glintColorizer$setCameraTransform(IBakedModel model, ItemCameraTransforms.TransformType cameraTransformType, CallbackInfoReturnable<IBakedModel> cir) {
RenderItemHook.INSTANCE.setTransformType(cameraTransformType);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,19 @@

@Mixin(value = LayerArmorBase.class, priority = Integer.MIN_VALUE)
public class LayerArmorBaseMixin {
private static final String RENDER_GLINT =
//#if MC<=10809
"renderGlint";
//#else
//$$ "renderEnchantedGlint";
//#endif

@ModifyArgs(method = RENDER_GLINT, at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/GlStateManager;color(FFFF)V"))
private
//#if MC>=11200
//$$ static
//#endif
void modifyColor(Args args) {
int color = GlintConfig.color.getRGB();
@ModifyArgs(
method = "renderGlint",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/renderer/GlStateManager;color(FFFF)V"
)
)
private void glintColorizer$modifyArmorColor(Args args) {
int color = GlintConfig.INSTANCE.getArmorColor().getRGB();
args.set(0, (float) ColorUtils.getRed(color) / 255);
args.set(1, (float) ColorUtils.getGreen(color) / 255);
args.set(2, (float) ColorUtils.getBlue(color) / 255);
}

}

This file was deleted.

This file was deleted.

Loading

0 comments on commit f3aa1c2

Please sign in to comment.