mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fix model offsets when scaled
This commit is contained in:
parent
6ffe1f5e58
commit
3b6ad3d094
3 changed files with 2 additions and 6 deletions
|
@ -128,8 +128,6 @@ public class ItemTraitsTooltipRenderer implements Text, OrderedText, TooltipComp
|
|||
String count = value > 99 ? "99+" : Math.round(value) == value ? (int)value + "" : ((Math.round(value * 10) / 10F) + "");
|
||||
|
||||
VertexConsumerProvider.Immediate immediate = MinecraftClient.getInstance().getBufferBuilders().getEffectVertexConsumers();
|
||||
// TODO: Before 1.21 was using tessellator's buffer but we can't get it without calling begin()
|
||||
//VertexConsumerProvider.immediate(Tessellator.getInstance().getBuffer());
|
||||
textRenderer.draw(count, 0, 0, 16777215, true, matrices.peek().getPositionMatrix(), immediate, TextLayerType.SEE_THROUGH, 0, 15728880);
|
||||
immediate.draw();
|
||||
matrices.pop();
|
||||
|
|
|
@ -43,8 +43,7 @@ public class FriendlyCreeperEntityRenderer extends MobEntityRenderer<FriendlyCre
|
|||
protected void setupTransforms(FriendlyCreeperEntity entity, MatrixStack matrices, float animationProgress, float bodyYaw, float tickDelta, float scale) {
|
||||
super.setupTransforms(entity, matrices, animationProgress, bodyYaw, tickDelta, scale);
|
||||
if (entity.isSitting()) {
|
||||
// TODO: Check if creepers are offset correctly
|
||||
matrices.translate(0, -0.25 * scale, 0);
|
||||
matrices.translate(0, -0.25, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,8 +42,7 @@ public class SpellbookEntityRenderer extends LivingEntityRenderer<SpellbookEntit
|
|||
super.setupTransforms(entity, matrices, animationProgress, bodyYaw + 90, tickDelta, scale);
|
||||
|
||||
if (entity.isOpen()) {
|
||||
// TODO: Check that this is correct for extreme scales
|
||||
matrices.translate(-1.25F * scale, -0.35F * scale, 0);
|
||||
matrices.translate(-1.25F, -0.35F, 0);
|
||||
|
||||
float floatPosition = MathHelper.sin((animationProgress + entity.getId()) / 20) * 0.04F;
|
||||
|
||||
|
|
Loading…
Reference in a new issue