Search in sources :

Example 6 with MaterialGrade

use of net.silentchaos512.gear.api.part.MaterialGrade in project Silent-Gear by SilentChaos512.

the class GraderScreen method renderLabels.

/*    @Override
    public List<String> getTooltipFromItem(ItemStack stack) {
        List<String> list = super.getTooltipFromItem(stack);
        // Add catalyst tier to tooltip, only in part analyzer
        int catalystTier = GraderTileEntity.getCatalystTier(stack);
        if (catalystTier > 0) {
            list.add(I18n.format("gui.silentgear.material_grader.catalystTier", String.valueOf(catalystTier)));
        }
        return list;
    }*/
@Override
protected void renderLabels(PoseStack matrixStack, int x, int y) {
    Component text = ModBlocks.MATERIAL_GRADER.asBlock().getName();
    font.draw(matrixStack, text.getString(), 28, 6, 0x404040);
    MaterialGrade lastAttempt = this.menu.getLastGradeAttempt();
    if (lastAttempt != MaterialGrade.NONE) {
        font.drawShadow(matrixStack, lastAttempt.getDisplayName().getVisualOrderText(), 50, 55, 0xFFFFFF);
    }
}
Also used : Component(net.minecraft.network.chat.Component) MaterialGrade(net.silentchaos512.gear.api.part.MaterialGrade)

Aggregations

MaterialGrade (net.silentchaos512.gear.api.part.MaterialGrade)6 ResourceLocation (net.minecraft.resources.ResourceLocation)3 JsonObject (com.google.gson.JsonObject)1 Nullable (javax.annotation.Nullable)1 Component (net.minecraft.network.chat.Component)1 ItemStack (net.minecraft.world.item.ItemStack)1