@@ -116,33 +116,33 @@ public class EncodedPatternItem extends AEBaseItem {
|
||||
return;
|
||||
}
|
||||
|
||||
stack.setDisplayName(GuiText.InvalidPattern.text().deepCopy().func_240701_a_(TextFormatting.RED));
|
||||
stack.setDisplayName(GuiText.InvalidPattern.text().deepCopy().mergeStyle(TextFormatting.RED));
|
||||
|
||||
InvalidPatternHelper invalid = new InvalidPatternHelper(stack);
|
||||
|
||||
final ITextComponent label = (invalid.isCraftable() ? GuiText.Crafts.text() : GuiText.Creates.text())
|
||||
.deepCopy().func_240702_b_(": ");
|
||||
final ITextComponent and = new StringTextComponent(" ").deepCopy().func_230529_a_(GuiText.And.text())
|
||||
.deepCopy().func_240702_b_(" ");
|
||||
final ITextComponent with = GuiText.With.text().deepCopy().func_240702_b_(": ");
|
||||
.deepCopy().appendString(": ");
|
||||
final ITextComponent and = new StringTextComponent(" ").deepCopy().append(GuiText.And.text()).deepCopy()
|
||||
.appendString(" ");
|
||||
final ITextComponent with = GuiText.With.text().deepCopy().appendString(": ");
|
||||
|
||||
boolean first = true;
|
||||
for (final InvalidPatternHelper.PatternIngredient output : invalid.getOutputs()) {
|
||||
lines.add((first ? label : and).deepCopy().func_230529_a_(output.getFormattedToolTip()));
|
||||
lines.add((first ? label : and).deepCopy().append(output.getFormattedToolTip()));
|
||||
first = false;
|
||||
}
|
||||
|
||||
first = true;
|
||||
for (final InvalidPatternHelper.PatternIngredient input : invalid.getInputs()) {
|
||||
lines.add((first ? with : and).deepCopy().func_230529_a_(input.getFormattedToolTip()));
|
||||
lines.add((first ? with : and).deepCopy().append(input.getFormattedToolTip()));
|
||||
first = false;
|
||||
}
|
||||
|
||||
if (invalid.isCraftable()) {
|
||||
final ITextComponent substitutionLabel = GuiText.Substitute.text().deepCopy().func_240702_b_(" ");
|
||||
final ITextComponent substitutionLabel = GuiText.Substitute.text().deepCopy().appendString(" ");
|
||||
final ITextComponent canSubstitute = invalid.canSubstitute() ? GuiText.Yes.text() : GuiText.No.text();
|
||||
|
||||
lines.add(substitutionLabel.deepCopy().func_230529_a_(canSubstitute));
|
||||
lines.add(substitutionLabel.deepCopy().append(canSubstitute));
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -159,10 +159,9 @@ public class EncodedPatternItem extends AEBaseItem {
|
||||
final Collection<IAEItemStack> out = details.getOutputs();
|
||||
|
||||
final ITextComponent label = (isCrafting ? GuiText.Crafts.text() : GuiText.Creates.text()).deepCopy()
|
||||
.func_240702_b_(": ");
|
||||
final ITextComponent and = new StringTextComponent(" ").deepCopy().func_230529_a_(GuiText.And.text())
|
||||
.func_240702_b_(" ");
|
||||
final ITextComponent with = GuiText.With.text().deepCopy().func_240702_b_(": ");
|
||||
.appendString(": ");
|
||||
final ITextComponent and = new StringTextComponent(" ").deepCopy().append(GuiText.And.text()).appendString(" ");
|
||||
final ITextComponent with = GuiText.With.text().deepCopy().appendString(": ");
|
||||
|
||||
boolean first = true;
|
||||
for (final IAEItemStack anOut : out) {
|
||||
@@ -170,8 +169,8 @@ public class EncodedPatternItem extends AEBaseItem {
|
||||
continue;
|
||||
}
|
||||
|
||||
lines.add((first ? label : and).deepCopy().func_240702_b_(anOut.getStackSize() + "x ")
|
||||
.func_230529_a_(Platform.getItemDisplayName(anOut)));
|
||||
lines.add((first ? label : and).deepCopy().appendString(anOut.getStackSize() + "x ")
|
||||
.append(Platform.getItemDisplayName(anOut)));
|
||||
first = false;
|
||||
}
|
||||
|
||||
@@ -181,16 +180,16 @@ public class EncodedPatternItem extends AEBaseItem {
|
||||
continue;
|
||||
}
|
||||
|
||||
lines.add((first ? with : and).deepCopy().func_240702_b_(anIn.getStackSize() + "x ")
|
||||
.func_230529_a_(Platform.getItemDisplayName(anIn)));
|
||||
lines.add((first ? with : and).deepCopy().appendString(anIn.getStackSize() + "x ")
|
||||
.append(Platform.getItemDisplayName(anIn)));
|
||||
first = false;
|
||||
}
|
||||
|
||||
if (isCrafting) {
|
||||
final ITextComponent substitutionLabel = GuiText.Substitute.text().deepCopy().func_240702_b_(" ");
|
||||
final ITextComponent substitutionLabel = GuiText.Substitute.text().deepCopy().appendString(" ");
|
||||
final ITextComponent canSubstitute = substitute ? GuiText.Yes.text() : GuiText.No.text();
|
||||
|
||||
lines.add(substitutionLabel.deepCopy().func_230529_a_(canSubstitute));
|
||||
lines.add(substitutionLabel.deepCopy().append(canSubstitute));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public class FacadeItem extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
try {
|
||||
final ItemStack in = this.getTextureItem(is);
|
||||
if (!in.isEmpty()) {
|
||||
return super.getDisplayName(is).deepCopy().func_240702_b_(" - ").func_230529_a_(in.getDisplayName());
|
||||
return super.getDisplayName(is).deepCopy().appendString(" - ").append(in.getDisplayName());
|
||||
}
|
||||
} catch (final Throwable ignored) {
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class SpatialStorageCellItem extends AEBaseItem implements ISpatialStorag
|
||||
final ITooltipFlag advancedTooltips) {
|
||||
final RegistryKey<World> worldId = this.getStoredDimension(stack);
|
||||
if (worldId == null) {
|
||||
lines.add(GuiText.Unformatted.text().deepCopy().func_240699_a_(TextFormatting.ITALIC));
|
||||
lines.add(GuiText.Unformatted.text().deepCopy().mergeStyle(TextFormatting.ITALIC));
|
||||
lines.add(GuiText.SpatialCapacity.text(maxRegion, maxRegion, maxRegion));
|
||||
} else {
|
||||
SpatialDimensionManager.INSTANCE.addCellDimensionTooltip(worldId, lines);
|
||||
|
||||
@@ -78,7 +78,7 @@ public class BiometricCardItem extends AEBaseItem implements IBiometricCard {
|
||||
@Override
|
||||
public ITextComponent getDisplayName(final ItemStack is) {
|
||||
final GameProfile username = this.getProfile(is);
|
||||
return username != null ? super.getDisplayName(is).deepCopy().func_240702_b_(" - " + username.getName())
|
||||
return username != null ? super.getDisplayName(is).deepCopy().appendString(" - " + username.getName())
|
||||
: super.getDisplayName(is);
|
||||
}
|
||||
|
||||
@@ -167,8 +167,8 @@ public class BiometricCardItem extends AEBaseItem implements IBiometricCard {
|
||||
if (msg == null) {
|
||||
msg = new TranslationTextComponent(sp.getTranslatedName());
|
||||
} else {
|
||||
msg = msg.deepCopy().func_240702_b_(", ")
|
||||
.func_230529_a_(new TranslationTextComponent(sp.getTranslatedName()));
|
||||
msg = msg.deepCopy().appendString(", ")
|
||||
.append(new TranslationTextComponent(sp.getTranslatedName()));
|
||||
}
|
||||
}
|
||||
lines.add(msg);
|
||||
|
||||
@@ -207,7 +207,7 @@ public class ColorApplicatorItem extends AEBasePoweredItem
|
||||
extra = new TranslationTextComponent(selected.translationKey);
|
||||
}
|
||||
|
||||
return super.getDisplayName(is).deepCopy().func_240702_b_(" - ").func_230529_a_(extra);
|
||||
return super.getDisplayName(is).deepCopy().appendString(" - ").append(extra);
|
||||
}
|
||||
|
||||
public AEColor getActiveColor(final ItemStack tol) {
|
||||
@@ -328,7 +328,7 @@ public class ColorApplicatorItem extends AEBasePoweredItem
|
||||
Block recolored = BlockRecolorer.recolor(blk, newColor);
|
||||
if (recolored != blk) {
|
||||
BlockState newState = recolored.getDefaultState();
|
||||
for (Property<?> prop : newState.func_235904_r_()) {
|
||||
for (Property<?> prop : newState.getProperties()) {
|
||||
newState = copyProp(state, newState, prop);
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ public class ColorApplicatorItem extends AEBasePoweredItem
|
||||
|
||||
private static <T extends Comparable<T>> BlockState copyProp(BlockState oldState, BlockState newState,
|
||||
Property<T> prop) {
|
||||
if (newState.func_235901_b_(prop)) {
|
||||
if (newState.hasProperty(prop)) {
|
||||
return newState.with(prop, oldState.get(prop));
|
||||
}
|
||||
return newState;
|
||||
|
||||
@@ -67,9 +67,9 @@ public abstract class AEBasePoweredItem extends AEBaseItem implements IAEItemPow
|
||||
final double percent = internalCurrentPower / internalMaxPower;
|
||||
|
||||
lines.add(GuiText.StoredEnergy.text().deepCopy()
|
||||
.func_240702_b_(':' + MessageFormat.format(" {0,number,#} ", internalCurrentPower))
|
||||
.func_230529_a_(PowerUnits.AE.textComponent())
|
||||
.func_240702_b_(" - " + MessageFormat.format(" {0,number,#.##%} ", percent)));
|
||||
.appendString(':' + MessageFormat.format(" {0,number,#} ", internalCurrentPower))
|
||||
.append(PowerUnits.AE.textComponent())
|
||||
.appendString(" - " + MessageFormat.format(" {0,number,#.##%} ", percent)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user