use of net.minecraft.text.TranslatableText in project CopperEquipment by Redy1aye.
the class XmasCookie method appendTooltip.
@Override
public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context) {
tooltip.add(new TranslatableText(xmasEventCongrats));
super.appendTooltip(stack, world, tooltip, context);
}
use of net.minecraft.text.TranslatableText in project CopperEquipment by Redy1aye.
the class CandySwordSkin method appendTooltip.
@Override
public void appendTooltip(ItemStack stack, @Nullable World world, List<Text> tooltip, TooltipContext context) {
tooltip.add(new TranslatableText(xmasEventCongrats));
tooltip.add(new TranslatableText(" "));
tooltip.add(new TranslatableText(skinInfo));
tooltip.add(new TranslatableText(skinSuitable + "candy_sword_skin"));
super.appendTooltip(stack, world, tooltip, context);
}
use of net.minecraft.text.TranslatableText in project LittleMaidReBirth-Fabric by SistrScarlet.
the class LittleMaidScreen method drawForeground.
@Override
protected void drawForeground(MatrixStack matrices, int mouseX, int mouseY) {
RenderSystem.disableBlend();
this.textRenderer.draw(matrices, this.stateText.getString(), 8F, 65F, 0x404040);
String insideSkirt = new TranslatableText("entity.littlemaidrebirth.little_maid_mob.InsideSkirt").getString();
this.textRenderer.draw(matrices, insideSkirt, 168F - textRenderer.getWidth(insideSkirt), 65F, 0x404040);
float left = (width - backgroundWidth) / 2F;
float top = (height - backgroundHeight) / 2F;
if (left + 7 <= mouseX && mouseX < left + 96 && top + 7 <= mouseY && mouseY < top + 60) {
drawArmor(matrices);
} else {
drawHealth(matrices, mouseX, mouseY);
}
}
use of net.minecraft.text.TranslatableText in project LittleMaidReBirth-Fabric by SistrScarlet.
the class LittleMaidScreen method getStateText.
public Text getStateText() {
MutableText stateText = new TranslatableText("state." + LittleMaidReBirthMod.MODID + "." + openAt.getMovingState().getName());
openAt.getModeName().ifPresent(modeName -> stateText.append(" : ").append(new TranslatableText("mode." + LittleMaidReBirthMod.MODID + "." + modeName)));
return stateText;
}
use of net.minecraft.text.TranslatableText in project LittleMaidReBirth-Fabric by SistrScarlet.
the class IFFType method render.
@Environment(EnvType.CLIENT)
public void render(MatrixStack matrices, int x, int y, int mouseX, int mouseY) {
TextRenderer textRenderer = MinecraftClient.getInstance().textRenderer;
textRenderer.drawWithShadow(matrices, new TranslatableText(entityType.getTranslationKey()), (float) x + 60, (float) y - textRenderer.fontHeight, 0xFFFFFFFF);
if (renderClashed || !(entity instanceof LivingEntity))
return;
try {
InventoryScreen.drawEntity(x, y, 15, mouseX, mouseY, (LivingEntity) entity);
} catch (Exception e) {
LOGGER.warn("描画処理がクラッシュしました。" + entityType + ":" + entity);
e.printStackTrace();
renderClashed = true;
// 行われない終了処理を行う
// ちょっと強引
VertexConsumerProvider.Immediate immediate = MinecraftClient.getInstance().getBufferBuilders().getEntityVertexConsumers();
immediate.draw();
EntityRenderDispatcher entityRenderDispatcher = MinecraftClient.getInstance().getEntityRenderDispatcher();
entityRenderDispatcher.setRenderShadows(true);
RenderSystem.popMatrix();
}
}
Aggregations