Skip to content

Commit

Permalink
Revert 1.19 mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
FxMorin committed Jul 6, 2022
1 parent 5b7267f commit 13a46c7
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import net.minecraft.util.math.random.Random;
import net.minecraft.world.BlockRenderView;
import net.minecraft.world.BlockView;
import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -19,6 +18,8 @@
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;

import java.util.Random;

@Mixin(BlockModelRenderer.class)
public class BlockModelRenderer_drawSideMixin {

Expand All @@ -30,7 +31,7 @@ public class BlockModelRenderer_drawSideMixin {
method = "renderSmooth(Lnet/minecraft/world/BlockRenderView;" +
"Lnet/minecraft/client/render/model/BakedModel;Lnet/minecraft/block/BlockState;" +
"Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/client/util/math/MatrixStack;" +
"Lnet/minecraft/client/render/VertexConsumer;ZLnet/minecraft/util/math/random/Random;JI)V",
"Lnet/minecraft/client/render/VertexConsumer;ZLjava/util/Random;JI)Z",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/util/math/BlockPos$Mutable;set(" +
Expand All @@ -50,7 +51,7 @@ private void getBakedQuadsSmooth(BlockRenderView world, BakedModel model, BlockS
method = "renderSmooth(Lnet/minecraft/world/BlockRenderView;" +
"Lnet/minecraft/client/render/model/BakedModel;Lnet/minecraft/block/BlockState;" +
"Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/client/util/math/MatrixStack;" +
"Lnet/minecraft/client/render/VertexConsumer;ZLnet/minecraft/util/math/random/Random;JI)V",
"Lnet/minecraft/client/render/VertexConsumer;ZLjava/util/Random;JI)Z",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/block/Block;shouldDrawSide(Lnet/minecraft/block/BlockState;" +
Expand All @@ -68,7 +69,7 @@ private boolean shouldDrawSideSmooth(BlockState state, BlockView world,
method = "renderFlat(Lnet/minecraft/world/BlockRenderView;" +
"Lnet/minecraft/client/render/model/BakedModel;Lnet/minecraft/block/BlockState;" +
"Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/client/util/math/MatrixStack;" +
"Lnet/minecraft/client/render/VertexConsumer;ZLnet/minecraft/util/math/random/Random;JI)V",
"Lnet/minecraft/client/render/VertexConsumer;ZLjava/util/Random;JI)Z",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/util/math/BlockPos$Mutable;set(" +
Expand All @@ -85,10 +86,11 @@ private void getBakedQuadsFlat(BlockRenderView world, BakedModel model, BlockSta


@Redirect(
method = "renderFlat(Lnet/minecraft/world/BlockRenderView;" +
method = "Lnet/minecraft/client/render/block/BlockModelRenderer;" +
"renderFlat(Lnet/minecraft/world/BlockRenderView;" +
"Lnet/minecraft/client/render/model/BakedModel;Lnet/minecraft/block/BlockState;" +
"Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/client/util/math/MatrixStack;" +
"Lnet/minecraft/client/render/VertexConsumer;ZLnet/minecraft/util/math/random/Random;JI)V",
"Lnet/minecraft/client/render/VertexConsumer;ZLjava/util/Random;JI)Z",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/block/Block;shouldDrawSide(Lnet/minecraft/block/BlockState;" +
Expand Down

0 comments on commit 13a46c7

Please sign in to comment.