use of net.minecraft.world.level.block.piston.PistonMovingBlockEntity in project fabric-carpet by gnembon.
the class PistonHeadRenderer_movableBEMixin method endMethod3576.
@Inject(method = "render", at = @At("RETURN"), locals = LocalCapture.NO_CAPTURE)
private void endMethod3576(PistonMovingBlockEntity pistonBlockEntity_1, float partialTicks, PoseStack matrixStack_1, MultiBufferSource layeredVertexConsumerStorage_1, int int_1, int init_2, CallbackInfo ci) {
if (((PistonBlockEntityInterface) pistonBlockEntity_1).getRenderCarriedBlockEntity()) {
BlockEntity carriedBlockEntity = ((PistonBlockEntityInterface) pistonBlockEntity_1).getCarriedBlockEntity();
if (carriedBlockEntity != null) {
// maybe ??? 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));
matrixStack_1.translate(pistonBlockEntity_1.getXOff(partialTicks), pistonBlockEntity_1.getYOff(partialTicks), pistonBlockEntity_1.getZOff(partialTicks));
dispatcher.render(carriedBlockEntity, partialTicks, matrixStack_1, layeredVertexConsumerStorage_1);
}
}
}
Aggregations