Search in sources :

Example 1 with TranslatableText

use of net.minecraft.text.TranslatableText in project EnvironmentZ by Globox1997.

the class CommandInit method executeEnvCommand.

private static int executeEnvCommand(ServerCommandSource source, Collection<ServerPlayerEntity> targets, String environment, boolean affected) {
    Iterator<ServerPlayerEntity> var3 = targets.iterator();
    while (var3.hasNext()) {
        ServerPlayerEntity serverPlayerEntity = (ServerPlayerEntity) var3.next();
        if (environment.equals("hot"))
            ((PlayerEnvAccess) serverPlayerEntity).setHotEnvAffected(affected);
        if (environment.equals("cold"))
            ((PlayerEnvAccess) serverPlayerEntity).setColdEnvAffected(affected);
        EnvironmentServerPacket.writeS2CSyncEnvPacket(serverPlayerEntity, ((PlayerEnvAccess) serverPlayerEntity).isHotEnvAffected(), ((PlayerEnvAccess) serverPlayerEntity).isColdEnvAffected());
    }
    source.sendFeedback(new TranslatableText("commands.environment.changed"), true);
    return targets.size();
}
Also used : TranslatableText(net.minecraft.text.TranslatableText) ServerPlayerEntity(net.minecraft.server.network.ServerPlayerEntity)

Example 2 with TranslatableText

use of net.minecraft.text.TranslatableText in project MCDoom by AzureDoom.

the class Mullet3DoomArmor method appendTooltip.

@Override
public void appendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context) {
    tooltip.add(new TranslatableText("doom.mulletarmor.text").formatted(Formatting.YELLOW).formatted(Formatting.ITALIC));
    super.appendTooltip(stack, world, tooltip, context);
}
Also used : TranslatableText(net.minecraft.text.TranslatableText)

Example 3 with TranslatableText

use of net.minecraft.text.TranslatableText in project MCDoom by AzureDoom.

the class NightmareDoomArmor method appendTooltip.

@Override
public void appendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context) {
    tooltip.add(new TranslatableText("doom.nightmarearmor.text").formatted(Formatting.YELLOW).formatted(Formatting.ITALIC));
    super.appendTooltip(stack, world, tooltip, context);
}
Also used : TranslatableText(net.minecraft.text.TranslatableText)

Example 4 with TranslatableText

use of net.minecraft.text.TranslatableText in project MCDoom by AzureDoom.

the class PraetorDoomArmor method appendTooltip.

@Override
public void appendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context) {
    tooltip.add(new TranslatableText("doom.praetorarmor.text").formatted(Formatting.YELLOW).formatted(Formatting.ITALIC));
    super.appendTooltip(stack, world, tooltip, context);
}
Also used : TranslatableText(net.minecraft.text.TranslatableText)

Example 5 with TranslatableText

use of net.minecraft.text.TranslatableText in project MCDoom by AzureDoom.

the class PurplePonyDoomArmor method appendTooltip.

@Override
public void appendTooltip(ItemStack stack, World world, List<Text> tooltip, TooltipContext context) {
    tooltip.add(new TranslatableText("doom.purplearmor.text").formatted(Formatting.YELLOW).formatted(Formatting.ITALIC));
    super.appendTooltip(stack, world, tooltip, context);
}
Also used : TranslatableText(net.minecraft.text.TranslatableText)

Aggregations

TranslatableText (net.minecraft.text.TranslatableText)161 LiteralText (net.minecraft.text.LiteralText)30 Text (net.minecraft.text.Text)19 ItemStack (net.minecraft.item.ItemStack)16 ArrayList (java.util.ArrayList)15 ButtonWidget (net.minecraft.client.gui.widget.ButtonWidget)14 List (java.util.List)12 MinecraftClient (net.minecraft.client.MinecraftClient)12 ServerPlayerEntity (net.minecraft.server.network.ServerPlayerEntity)12 SPEInterface (eu.pb4.armorstandeditor.helpers.SPEInterface)9 LivingEntity (net.minecraft.entity.LivingEntity)9 PlayerEntity (net.minecraft.entity.player.PlayerEntity)8 ListTag (net.minecraft.nbt.ListTag)8 Formatting (net.minecraft.util.Formatting)8 BlockPos (net.minecraft.util.math.BlockPos)8 Environment (net.fabricmc.api.Environment)7 AbstractButtonWidget (net.minecraft.client.gui.widget.AbstractButtonWidget)7 Entity (net.minecraft.entity.Entity)7 Collection (java.util.Collection)6 ArmorStandPreset (eu.pb4.armorstandeditor.config.ArmorStandPreset)5