mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-26 15:06:42 +01:00
Merge branch 'mc1.18/dev' into mc1.19/dev
This commit is contained in:
commit
9d1e4883bc
4 changed files with 18 additions and 9 deletions
|
@ -3,7 +3,6 @@ package com.simibubi.create.content.contraptions;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
|
||||
import com.simibubi.create.foundation.item.TooltipHelper;
|
||||
import com.simibubi.create.foundation.item.TooltipHelper.Palette;
|
||||
import com.simibubi.create.foundation.utility.Components;
|
||||
|
@ -28,7 +27,7 @@ public interface IDisplayAssemblyExceptions {
|
|||
String text = e.component.getString();
|
||||
Arrays.stream(text.split("\n"))
|
||||
.forEach(l -> TooltipHelper.cutStringTextComponent(l, Palette.GRAY_AND_WHITE)
|
||||
.forEach(c -> Lang.text(c.getString()).forGoggles(tooltip)));
|
||||
.forEach(c -> Lang.builder().add(c).forGoggles(tooltip)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ import com.simibubi.create.AllBlocks;
|
|||
import com.simibubi.create.Create;
|
||||
import com.simibubi.create.content.decoration.steamWhistle.WhistleBlock;
|
||||
import com.simibubi.create.content.decoration.steamWhistle.WhistleBlockEntity;
|
||||
import com.simibubi.create.content.equipment.goggles.IHaveGoggleInformation;
|
||||
import com.simibubi.create.content.kinetics.BlockStressValues;
|
||||
import com.simibubi.create.content.kinetics.steamEngine.SteamEngineBlock;
|
||||
import com.simibubi.create.foundation.advancement.AdvancementBehaviour;
|
||||
|
@ -151,9 +150,9 @@ public class BoilerData {
|
|||
|
||||
Lang.translate("boiler.status", getHeatLevelTextComponent().withStyle(ChatFormatting.GREEN))
|
||||
.forGoggles(tooltip);
|
||||
Lang.text(getSizeComponent(true, false).getString()).forGoggles(tooltip, 1);
|
||||
Lang.text(getWaterComponent(true, false).getString()).forGoggles(tooltip, 1);
|
||||
Lang.text(getHeatComponent(true, false).getString()).forGoggles(tooltip, 1);
|
||||
Lang.builder().add(getSizeComponent(true, false)).forGoggles(tooltip, 1);
|
||||
Lang.builder().add(getWaterComponent(true, false)).forGoggles(tooltip, 1);
|
||||
Lang.builder().add(getHeatComponent(true, false)).forGoggles(tooltip, 1);
|
||||
|
||||
if (attachedEngines == 0)
|
||||
return true;
|
||||
|
|
|
@ -32,7 +32,7 @@ public class TooltipHelper {
|
|||
Component hint = Lang.translateDirect(hintKey);
|
||||
List<Component> cutComponent = cutTextComponent(hint, Palette.GRAY_AND_WHITE);
|
||||
for (Component component : cutComponent)
|
||||
Lang.text(component.getString()).forGoggles(tooltip);
|
||||
Lang.builder().add(component).forGoggles(tooltip);
|
||||
}
|
||||
|
||||
public static String makeProgressBar(int length, int filledLength) {
|
||||
|
|
|
@ -2,8 +2,6 @@ package com.simibubi.create.foundation.utility;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.simibubi.create.compat.Mods;
|
||||
|
||||
import joptsimple.internal.Strings;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
@ -96,6 +94,19 @@ public class LangBuilder {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Appends a component
|
||||
*
|
||||
* @param component the component to append
|
||||
* @return this builder
|
||||
*/
|
||||
public LangBuilder add(Component component) {
|
||||
if (component instanceof MutableComponent mutableComponent)
|
||||
return add(mutableComponent);
|
||||
else
|
||||
return add(component.copy());
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue