Skip to content

Commit

Permalink
Fix lighting issues with walls in HITW
Browse files Browse the repository at this point in the history
  • Loading branch information
Aeltumn committed Oct 24, 2022
1 parent 8b1e313 commit 5bbe5cc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ A fabric mod with feature additions, bugfixes and various performance improvemen

### Bugfixes
- Always display head layer in TAB menu
- Change teleport packets to teleport vehicle passengers to their vehicle
- Change teleport packets to teleport vehicle passengers to their vehicle
- Fixes lighting issues with moving piston walls
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ loader_version=0.14.9
#Fabric api
fabric_version=0.60.0+1.19.2
# Mod Properties
mod_version=0.1.0
mod_version=0.1.1
maven_group=com.noxcrew
archives_base_name=noxesium

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package com.noxcrew.noxesium.mixin.client;

import net.minecraft.client.renderer.blockentity.PistonHeadRenderer;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;

@Mixin(PistonHeadRenderer.class)
public class PistonRenderingMixin {

@Redirect(method = "render(Lnet/minecraft/world/level/block/piston/PistonMovingBlockEntity;FLcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;II)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/core/BlockPos;relative(Lnet/minecraft/core/Direction;)Lnet/minecraft/core/BlockPos;", ordinal = 0), allow = 1)
private BlockPos redirected(BlockPos instance, Direction direction) {
// Refuse to do the first relative in the method!
return instance;
}
}
1 change: 1 addition & 0 deletions src/main/resources/noxesium.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"client.ClientPacketListenerMixin",
"client.LivingEntityMixin",
"client.MinecraftMixin",
"client.PistonRenderingMixin",
"client.PlayerTabOverlayMixin",
"client.adventure.GameRendererMixin",
"client.adventure.ItemStackMixin",
Expand Down

0 comments on commit 5bbe5cc

Please sign in to comment.