19w41a first pass
This commit is contained in:
1 parent
5ebfb7d1c0
commit
7b649f9ccd
28 files changed
+164
-178
No files matched your search
@@ -4,11 +4,11 @@ import carpet.settings.CarpetSettings;
|
||||
import carpet.fakes.PistonBlockEntityInterface;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.block.entity.PistonBlockEntity;
|
||||
import net.minecraft.class_4587;
|
||||
import net.minecraft.class_4597;
|
||||
import net.minecraft.client.render.LayeredVertexConsumerStorage;
|
||||
import net.minecraft.client.render.block.entity.BlockEntityRenderDispatcher;
|
||||
import net.minecraft.client.render.block.entity.BlockEntityRenderer;
|
||||
import net.minecraft.client.render.block.entity.PistonBlockEntityRenderer;
|
||||
import net.minecraft.util.math.MatrixStack;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
@@ -24,8 +24,9 @@ public abstract class PistonBlockEntityRenderer_movableTEMixin extends BlockEnti
|
||||
}
|
||||
|
||||
@Inject(method = "method_3576", at = @At(value = "INVOKE",
|
||||
target = "Lnet/minecraft/client/render/block/entity/PistonBlockEntityRenderer;method_3575(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/class_4587;Lnet/minecraft/class_4597;Lnet/minecraft/world/World;Z)V", ordinal = 3))
|
||||
private void updateRenderBool(PistonBlockEntity pistonBlockEntity_1, double double_1, double double_2, double double_3, float float_1, class_4587 class_4587_1, class_4597 class_4597_1, int int_1, CallbackInfo ci)
|
||||
target = "Lnet/minecraft/client/render/block/entity/PistonBlockEntityRenderer;method_3575(Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/MatrixStack;Lnet/minecraft/client/render/LayeredVertexConsumerStorage;Lnet/minecraft/world/World;ZI)V", ordinal = 3))
|
||||
private void updateRenderBool(PistonBlockEntity pistonBlockEntity_1, double double_1, double double_2, double double_3, float float_1, MatrixStack matrixStack_1, LayeredVertexConsumerStorage layeredVertexConsumerStorage_1, int int_1, int int_2, CallbackInfo ci)
|
||||
//private void updateRenderBool(PistonBlockEntity pistonBlockEntity_1, double double_1, double double_2, double double_3, float float_1, class_4587 class_4587_1, class_4597 class_4597_1, int int_1, CallbackInfo ci)
|
||||
{
|
||||
if (!((PistonBlockEntityInterface) pistonBlockEntity_1).isRenderModeSet())
|
||||
((PistonBlockEntityInterface) pistonBlockEntity_1).setRenderCarriedBlockEntity(CarpetSettings.movableBlockEntities && ((PistonBlockEntityInterface) pistonBlockEntity_1).getCarriedBlockEntity() != null);
|
||||
@@ -33,7 +34,7 @@ public abstract class PistonBlockEntityRenderer_movableTEMixin extends BlockEnti
|
||||
|
||||
|
||||
@Inject(method = "method_3576", at = @At("RETURN"), locals = LocalCapture.NO_CAPTURE)
|
||||
private void endMethod3576(PistonBlockEntity pistonBlockEntity_1, double xOffset, double yOffset, double zOffset, float partialTicks, class_4587 transform, class_4597 bufferWrapper, int int_1, CallbackInfo ci)
|
||||
private void endMethod3576(PistonBlockEntity pistonBlockEntity_1, double xOffset, double yOffset, double zOffset, float partialTicks, MatrixStack matrixStack_1, LayeredVertexConsumerStorage layeredVertexConsumerStorage_1, int int_1, int init_2, CallbackInfo ci)
|
||||
{
|
||||
if (((PistonBlockEntityInterface) pistonBlockEntity_1).getRenderCarriedBlockEntity())
|
||||
{
|
||||
@@ -42,12 +43,12 @@ public abstract class PistonBlockEntityRenderer_movableTEMixin extends BlockEnti
|
||||
{
|
||||
carriedBlockEntity.setPos(pistonBlockEntity_1.getPos());
|
||||
//((BlockEntityRenderDispatcherInterface) BlockEntityRenderDispatcher.INSTANCE).renderBlockEntityOffset(carriedBlockEntity, float_1, int_1, BlockRenderLayer.field_20799, bufferBuilder_1, pistonBlockEntity_1.getRenderOffsetX(float_1), pistonBlockEntity_1.getRenderOffsetY(float_1), pistonBlockEntity_1.getRenderOffsetZ(float_1));
|
||||
transform.method_22904( // translate
|
||||
matrixStack_1.translate(
|
||||
pistonBlockEntity_1.getRenderOffsetX(partialTicks),
|
||||
pistonBlockEntity_1.getRenderOffsetY(partialTicks),
|
||||
pistonBlockEntity_1.getRenderOffsetZ(partialTicks)
|
||||
);
|
||||
BlockEntityRenderDispatcher.INSTANCE.render(carriedBlockEntity, partialTicks, transform, bufferWrapper, xOffset, yOffset, zOffset);
|
||||
BlockEntityRenderDispatcher.INSTANCE.render(carriedBlockEntity, partialTicks, matrixStack_1, layeredVertexConsumerStorage_1, xOffset, yOffset, zOffset);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user