Skip to content

Commit

Permalink
Alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Apr 27, 2024
1 parent cc395a5 commit 2baa46b
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
org.gradle.jvmargs=-Xmx2G

# Mod Properties
mod_version = 0.0.5
mod_version = 0.0.6
maven_group = dev.ithundxr
archives_base_name = RailwaysTweaks

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package dev.ithundxr.railwaystweaks.mixin.client;

import net.minecraft.client.renderer.texture.HttpTexture;
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.CallbackInfo;

@Mixin(HttpTexture.class)
public class HttpTextureMixin {
@Inject(method = "setNoAlpha", at = @At("HEAD"), cancellable = true)
private static void railwaysTweaks$noAlpha(CallbackInfo ci) {
ci.cancel();
}

@Inject(method = "doNotchTransparencyHack", at = @At("HEAD"), cancellable = true)
private static void railwaysTweaks$noTransparencyHack(CallbackInfo ci) {
ci.cancel();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package dev.ithundxr.railwaystweaks.mixin.client;

import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.entity.player.PlayerRenderer;
import net.minecraft.resources.ResourceLocation;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

@Mixin(PlayerRenderer.class)
public class PlayerRendererMixin {
@Redirect(method = "renderHand", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/RenderType;entitySolid(Lnet/minecraft/resources/ResourceLocation;)Lnet/minecraft/client/renderer/RenderType;"))
private RenderType railwaysTweaks$fixHandTranslucency(ResourceLocation location) {
return RenderType.entityTranslucent(location);
}
}
2 changes: 2 additions & 0 deletions src/main/resources/railwaystweaks.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
"LivingEntityMixin"
],
"client": [
"client.HttpTextureMixin",
"client.PlayerRendererMixin"
],
"injectors": {
"defaultRequire": 1
Expand Down

0 comments on commit 2baa46b

Please sign in to comment.