mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 05:33:00 +00:00 
			
		
		
		
	Fix turtle labels not rendering
The X scale factor should now be flipped. I'm not quite sure what in MC has meant this should be changed, possibly the cameraOrientation matrix? Fixes #1872
This commit is contained in:
		| @@ -21,6 +21,7 @@ import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; | |||||||
| import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; | import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; | ||||||
| import net.minecraft.client.resources.model.BakedModel; | import net.minecraft.client.resources.model.BakedModel; | ||||||
| import net.minecraft.resources.ResourceLocation; | import net.minecraft.resources.ResourceLocation; | ||||||
|  | import net.minecraft.util.CommonColors; | ||||||
| import net.minecraft.world.phys.BlockHitResult; | import net.minecraft.world.phys.BlockHitResult; | ||||||
| import net.minecraft.world.phys.HitResult; | import net.minecraft.world.phys.HitResult; | ||||||
| 
 | 
 | ||||||
| @@ -62,13 +63,13 @@ public class TurtleBlockEntityRenderer implements BlockEntityRenderer<TurtleBloc | |||||||
|             transform.pushPose(); |             transform.pushPose(); | ||||||
|             transform.translate(0.5, 1.2, 0.5); |             transform.translate(0.5, 1.2, 0.5); | ||||||
|             transform.mulPose(mc.getEntityRenderDispatcher().cameraOrientation()); |             transform.mulPose(mc.getEntityRenderDispatcher().cameraOrientation()); | ||||||
|             transform.scale(-0.025f, -0.025f, 0.025f); |             transform.scale(0.025f, -0.025f, 0.025f); | ||||||
| 
 | 
 | ||||||
|             var matrix = transform.last().pose(); |             var matrix = transform.last().pose(); | ||||||
|             var opacity = (int) (mc.options.getBackgroundOpacity(0.25f) * 255) << 24; |             var opacity = (int) (mc.options.getBackgroundOpacity(0.25f) * 255) << 24; | ||||||
|             var width = -font.width(label) / 2.0f; |             var width = -font.width(label) / 2.0f; | ||||||
|             font.drawInBatch(label, width, (float) 0, 0x20ffffff, false, matrix, buffers, Font.DisplayMode.SEE_THROUGH, opacity, lightmapCoord); |             font.drawInBatch(label, width, (float) 0, 0x20ffffff, false, matrix, buffers, Font.DisplayMode.SEE_THROUGH, opacity, lightmapCoord); | ||||||
|             font.drawInBatch(label, width, (float) 0, 0xffffffff, false, matrix, buffers, Font.DisplayMode.NORMAL, 0, lightmapCoord); |             font.drawInBatch(label, width, (float) 0, CommonColors.WHITE, false, matrix, buffers, Font.DisplayMode.NORMAL, 0, lightmapCoord); | ||||||
| 
 | 
 | ||||||
|             transform.popPose(); |             transform.popPose(); | ||||||
|         } |         } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jonathan Coates
					Jonathan Coates