card # placemenet work - still not ideal but it's better
This commit is contained in:
@@ -20,6 +20,10 @@ import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.util.FormattedCharSequence;
|
||||
|
||||
public final class TriadCardItemRenderer extends BlockEntityWithoutLevelRenderer {
|
||||
private static final float TOP_VALUE_Y = 0.28F;
|
||||
private static final float BOTTOM_VALUE_Y = -0.22F;
|
||||
private static final float SIDE_VALUE_X = 0.27F;
|
||||
private static final float SIDE_VALUE_Y = 0.03F;
|
||||
private static TriadCardItemRenderer INSTANCE;
|
||||
private static final CardPalette NEUTRAL_PALETTE = new CardPalette(
|
||||
new float[] {0.88F, 0.84F, 0.72F},
|
||||
@@ -76,10 +80,10 @@ public final class TriadCardItemRenderer extends BlockEntityWithoutLevelRenderer
|
||||
|
||||
if (card != null) {
|
||||
Font font = Minecraft.getInstance().font;
|
||||
drawValue(poseStack, buffer, font, Integer.toString(card.top()), 0.0F, 0.13F);
|
||||
drawValue(poseStack, buffer, font, Integer.toString(card.bottom()), 0.0F, -0.23F);
|
||||
drawValue(poseStack, buffer, font, Integer.toString(card.left()), -0.16F, -0.04F);
|
||||
drawValue(poseStack, buffer, font, Integer.toString(card.right()), 0.16F, -0.04F);
|
||||
drawValue(poseStack, buffer, font, Integer.toString(card.top()), 0.0F, TOP_VALUE_Y);
|
||||
drawValue(poseStack, buffer, font, Integer.toString(card.bottom()), 0.0F, BOTTOM_VALUE_Y);
|
||||
drawValue(poseStack, buffer, font, Integer.toString(card.left()), -SIDE_VALUE_X, SIDE_VALUE_Y);
|
||||
drawValue(poseStack, buffer, font, Integer.toString(card.right()), SIDE_VALUE_X, SIDE_VALUE_Y);
|
||||
}
|
||||
poseStack.popPose();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user