@@ -71,9 +71,9 @@ public class AEBaseBlockItemChargeable extends AEBaseBlockItem implements IAEIte
|
||||
final double percent = internalCurrentPower / internalMaxPower;
|
||||
|
||||
lines.add(GuiText.StoredEnergy.text().deepCopy()
|
||||
.func_240702_b_(':' + MessageFormat.format(" {0,number,#} ", internalCurrentPower))
|
||||
.func_230529_a_(new TranslationTextComponent(PowerUnits.AE.unlocalizedName))
|
||||
.func_240702_b_(" - " + MessageFormat.format("{0,number,#.##%}", percent)));
|
||||
.appendString(':' + MessageFormat.format(" {0,number,#} ", internalCurrentPower))
|
||||
.append(new TranslationTextComponent(PowerUnits.AE.unlocalizedName))
|
||||
.appendString(" - " + MessageFormat.format("{0,number,#.##%}", percent)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ public class CableBusBlock extends AEBaseTileBlock<CableBusTileEntity> implement
|
||||
// FIXME: Check how this looks, probably like shit, maybe provide parts the
|
||||
// ability to supply particle textures???
|
||||
effectRenderer.addEffect(
|
||||
new CableBusBreakingParticle((ClientWorld) world, x, y, z, texture).multipleParticleScaleBy(0.8F));
|
||||
new CableBusBreakingParticle((ClientWorld) world, x, y, z, texture).multiplyParticleScaleBy(0.8F));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -63,7 +63,7 @@ public abstract class AEBaseMEScreen<T extends AEBaseContainer> extends AEBaseSc
|
||||
final String formattedAmount = NumberFormat.getNumberInstance(Locale.US)
|
||||
.format(myStack.getStackSize());
|
||||
currentToolTip
|
||||
.add(ButtonToolTips.ItemsStored.text(formattedAmount).func_240699_a_(TextFormatting.GRAY));
|
||||
.add(ButtonToolTips.ItemsStored.text(formattedAmount).mergeStyle(TextFormatting.GRAY));
|
||||
}
|
||||
|
||||
if (myStack.getCountRequestable() > 0) {
|
||||
@@ -77,8 +77,7 @@ public abstract class AEBaseMEScreen<T extends AEBaseContainer> extends AEBaseSc
|
||||
return;
|
||||
} else if (stack.getCount() > bigNumber) {
|
||||
final String formattedAmount = NumberFormat.getNumberInstance(Locale.US).format(stack.getCount());
|
||||
currentToolTip
|
||||
.add(ButtonToolTips.ItemsStored.text(formattedAmount).func_240699_a_(TextFormatting.GRAY));
|
||||
currentToolTip.add(ButtonToolTips.ItemsStored.text(formattedAmount).mergeStyle(TextFormatting.GRAY));
|
||||
|
||||
this.renderToolTip(matrixStack, currentToolTip, x, y, this.font);
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
|
||||
List<ITextComponent> styledLines = new ArrayList<>(lines.size());
|
||||
for (int i = 0; i < lines.size(); i++) {
|
||||
Style style = (i == 0) ? TOOLTIP_HEADER : TOOLTIP_BODY;
|
||||
styledLines.add(lines.get(i).deepCopy().func_240700_a_(s -> style));
|
||||
styledLines.add(lines.get(i).deepCopy().modifyStyle(s -> style));
|
||||
}
|
||||
|
||||
this.renderTooltip(matrices, styledLines, x, y);
|
||||
@@ -219,7 +219,7 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void func_230451_b_(MatrixStack matrixStack, final int x, final int y) {
|
||||
protected final void drawGuiContainerForegroundLayer(MatrixStack matrixStack, final int x, final int y) {
|
||||
final int ox = this.guiLeft; // (width - xSize) / 2;
|
||||
final int oy = this.guiTop; // (height - ySize) / 2;
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
@@ -234,7 +234,8 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
|
||||
public abstract void drawFG(MatrixStack matrixStack, int offsetX, int offsetY, int mouseX, int mouseY);
|
||||
|
||||
@Override
|
||||
protected final void func_230450_a_(MatrixStack matrixStack, final float f, final int x, final int y) {
|
||||
protected final void drawGuiContainerBackgroundLayer(MatrixStack matrixStack, final float f, final int x,
|
||||
final int y) {
|
||||
final int ox = this.guiLeft; // (width - xSize) / 2;
|
||||
final int oy = this.guiTop; // (height - ySize) / 2;
|
||||
RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
@@ -544,11 +545,6 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removed() {
|
||||
super.removed();
|
||||
}
|
||||
|
||||
protected Slot getSlot(final int mouseX, final int mouseY) {
|
||||
final List<Slot> slots = this.getInventorySlots();
|
||||
for (final Slot slot : slots) {
|
||||
@@ -630,7 +626,7 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
|
||||
* hackery...
|
||||
*/
|
||||
@Override
|
||||
public void func_238746_a_(MatrixStack matrices, Slot s) {
|
||||
public void moveItems(MatrixStack matrices, Slot s) {
|
||||
if (s instanceof SlotME) {
|
||||
|
||||
try {
|
||||
@@ -639,7 +635,7 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
|
||||
}
|
||||
|
||||
// Annoying but easier than trying to splice into render item
|
||||
super.func_238746_a_(matrices, new Size1Slot((SlotME) s));
|
||||
super.moveItems(matrices, new Size1Slot((SlotME) s));
|
||||
|
||||
this.stackSizeRenderer.renderStackSize(this.font, ((SlotME) s).getAEStack(), s.xPos, s.yPos);
|
||||
|
||||
@@ -755,9 +751,9 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
|
||||
|
||||
if (s instanceof AppEngSlot) {
|
||||
((AppEngSlot) s).setDisplay(true);
|
||||
super.func_238746_a_(matrices, s);
|
||||
super.moveItems(matrices, s);
|
||||
} else {
|
||||
super.func_238746_a_(matrices, s);
|
||||
super.moveItems(matrices, s);
|
||||
}
|
||||
|
||||
return;
|
||||
@@ -766,7 +762,7 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
|
||||
}
|
||||
}
|
||||
// do the usual for non-ME Slots.
|
||||
super.func_238746_a_(matrices, s);
|
||||
super.moveItems(matrices, s);
|
||||
}
|
||||
|
||||
protected boolean isPowered() {
|
||||
|
||||
@@ -314,8 +314,8 @@ public class MEMonitorableScreen<T extends MEMonitorableContainer> extends AEBas
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removed() {
|
||||
super.removed();
|
||||
public void onClose() {
|
||||
super.onClose();
|
||||
getMinecraft().keyboardListener.enableRepeatEvents(false);
|
||||
memoryText = this.searchField.getText();
|
||||
}
|
||||
|
||||
@@ -87,8 +87,8 @@ public class ProgressBar extends Widget implements ITooltip {
|
||||
}
|
||||
ITextComponent result = this.titleName != null ? this.titleName : new StringTextComponent("");
|
||||
|
||||
return result.deepCopy().func_240702_b_("\n").func_240702_b_(this.source.getCurrentProgress() + " ")
|
||||
.func_230529_a_(GuiText.Of.text().deepCopy().func_240702_b_(" " + this.source.getMaxProgress()));
|
||||
return result.deepCopy().appendString("\n").appendString(this.source.getCurrentProgress() + " ")
|
||||
.append(GuiText.Of.text().deepCopy().appendString(" " + this.source.getMaxProgress()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -159,7 +159,7 @@ public class SkyCompassBakedModel implements IDynamicBakedModel {
|
||||
float offRads = (float) (player.rotationYaw / 180.0f * (float) Math.PI + Math.PI);
|
||||
|
||||
SkyCompassBakedModel.this.fallbackRotation = offRads
|
||||
+ getAnimatedRotation(player.func_233580_cy_(), true);
|
||||
+ getAnimatedRotation(player.getPosition(), true);
|
||||
} else {
|
||||
SkyCompassBakedModel.this.fallbackRotation = getAnimatedRotation(null, false);
|
||||
}
|
||||
|
||||
@@ -52,13 +52,11 @@ public class ApiClientHelper implements IClientHelper {
|
||||
final ICellInventory<?> cellInventory = handler.getCellInv();
|
||||
|
||||
if (cellInventory != null) {
|
||||
lines.add(new StringTextComponent(cellInventory.getUsedBytes() + " ").func_230529_a_(GuiText.Of.text())
|
||||
.func_240702_b_(" " + cellInventory.getTotalBytes() + " ")
|
||||
.func_230529_a_(GuiText.BytesUsed.text()));
|
||||
lines.add(new StringTextComponent(cellInventory.getUsedBytes() + " ").append(GuiText.Of.text())
|
||||
.appendString(" " + cellInventory.getTotalBytes() + " ").append(GuiText.BytesUsed.text()));
|
||||
|
||||
lines.add(new StringTextComponent(cellInventory.getStoredItemTypes() + " ")
|
||||
.func_230529_a_(GuiText.Of.text()).func_240702_b_(" " + cellInventory.getTotalItemTypes() + " ")
|
||||
.func_230529_a_(GuiText.Types.text()));
|
||||
lines.add(new StringTextComponent(cellInventory.getStoredItemTypes() + " ").append(GuiText.Of.text())
|
||||
.appendString(" " + cellInventory.getTotalItemTypes() + " ").append(GuiText.Types.text()));
|
||||
}
|
||||
|
||||
if (handler.isPreformatted()) {
|
||||
@@ -66,9 +64,9 @@ public class ApiClientHelper implements IClientHelper {
|
||||
: GuiText.Excluded).getLocal();
|
||||
|
||||
if (handler.isFuzzy()) {
|
||||
lines.add(GuiText.Partitioned.withSuffix(" - " + list + " ").func_230529_a_(GuiText.Fuzzy.text()));
|
||||
lines.add(GuiText.Partitioned.withSuffix(" - " + list + " ").append(GuiText.Fuzzy.text()));
|
||||
} else {
|
||||
lines.add(GuiText.Partitioned.withSuffix(" - " + list + " ").func_230529_a_(GuiText.Precise.text()));
|
||||
lines.add(GuiText.Partitioned.withSuffix(" - " + list + " ").append(GuiText.Precise.text()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -111,11 +111,11 @@ public enum GuiText {
|
||||
}
|
||||
|
||||
public IFormattableTextComponent withSuffix(String text) {
|
||||
return text().deepCopy().func_240702_b_(text);
|
||||
return text().deepCopy().appendString(text);
|
||||
}
|
||||
|
||||
public IFormattableTextComponent withSuffix(ITextComponent text) {
|
||||
return text().deepCopy().func_230529_a_(text);
|
||||
return text().deepCopy().append(text);
|
||||
}
|
||||
|
||||
public IFormattableTextComponent text(Object... args) {
|
||||
|
||||
@@ -86,7 +86,7 @@ public class AppEngAdvancementTrigger
|
||||
}
|
||||
|
||||
@Override
|
||||
public Instance func_230307_a_(JsonObject p_230307_1_, ConditionArrayParser p_230307_2_) {
|
||||
public Instance deserialize(JsonObject p_230307_1_, ConditionArrayParser p_230307_2_) {
|
||||
return new AppEngAdvancementTrigger.Instance(this.getId());
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public class AppEngAdvancementTrigger
|
||||
}
|
||||
|
||||
@Override
|
||||
public JsonObject func_230240_a_(ConditionArraySerializer p_230240_1_) {
|
||||
public JsonObject serialize(ConditionArraySerializer p_230240_1_) {
|
||||
return new JsonObject();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public class FluidTankWidget extends Widget implements ITooltip {
|
||||
final IAEFluidStack fluid = this.tank.getFluidInSlot(this.slot);
|
||||
if (fluid != null && fluid.getStackSize() > 0) {
|
||||
return fluid.getFluid().getAttributes().getDisplayName(fluid.getFluidStack()).deepCopy()
|
||||
.func_240702_b_("\n" + (fluid.getStackSize() + "mB"));
|
||||
.appendString("\n" + (fluid.getStackSize() + "mB"));
|
||||
}
|
||||
return new StringTextComponent("");
|
||||
}
|
||||
|
||||
@@ -126,11 +126,10 @@ public class InvalidPatternHelper {
|
||||
}
|
||||
|
||||
public ITextComponent getFormattedToolTip() {
|
||||
IFormattableTextComponent result = new StringTextComponent(this.getCount() + " ")
|
||||
.func_230529_a_(this.getName());
|
||||
IFormattableTextComponent result = new StringTextComponent(this.getCount() + " ").append(this.getName());
|
||||
|
||||
if (!this.isValid()) {
|
||||
result.func_240699_a_(TextFormatting.RED);
|
||||
result.mergeStyle(TextFormatting.RED);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -58,12 +58,12 @@ public class MetaRotation implements IOrientable {
|
||||
public Direction getUp() {
|
||||
final BlockState state = this.w.getBlockState(this.pos);
|
||||
|
||||
if (this.facingProp != null && state.func_235901_b_(this.facingProp)) {
|
||||
if (this.facingProp != null && state.hasProperty(this.facingProp)) {
|
||||
return state.get(this.facingProp);
|
||||
}
|
||||
|
||||
// TODO 1.10.2-R - Temp
|
||||
if (state.func_235901_b_(QuartzPillarBlock.AXIS)) {
|
||||
if (state.hasProperty(QuartzPillarBlock.AXIS)) {
|
||||
Axis a = state.get(QuartzPillarBlock.AXIS);
|
||||
switch (a) {
|
||||
case X:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1106,7 +1106,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU {
|
||||
|
||||
if (te.hasCustomInventoryName()) {
|
||||
if (this.myName != null) {
|
||||
this.myName.deepCopy().func_240702_b_(" ").func_230529_a_(te.getCustomInventoryName());
|
||||
this.myName.deepCopy().appendString(" ").append(te.getCustomInventoryName());
|
||||
} else {
|
||||
this.myName = te.getCustomInventoryName().deepCopy();
|
||||
}
|
||||
|
||||
@@ -54,16 +54,16 @@ public class MinecraftServerMixin implements DynamicDimensions {
|
||||
|
||||
// Each worlds must have a corresponding dimension options, otherwise they will
|
||||
// not be re-created on load
|
||||
DimensionGeneratorSettings generatorOptions = this.field_240768_i_.func_230418_z_();
|
||||
DimensionGeneratorSettings generatorOptions = this.field_240768_i_.getDimensionGeneratorSettings();
|
||||
Preconditions.checkArgument(!generatorOptions.func_236224_e_().containsKey(worldId.func_240901_a_()),
|
||||
"Dimension config with id %s already exists.", worldId.func_240901_a_());
|
||||
|
||||
DimensionType dimensionType = field_240767_f_.func_230520_a_().func_230516_a_(dimensionTypeId);
|
||||
DimensionType dimensionType = field_240767_f_.func_230520_a_().getValueForKey(dimensionTypeId);
|
||||
Preconditions.checkArgument(dimensionType != null, "dimensionTypeId %s is not registered", dimensionTypeId);
|
||||
|
||||
// Create dimension options with the given world-id and chunk generator
|
||||
Dimension dimensionOptions = new Dimension(
|
||||
() -> field_240767_f_.func_230520_a_().func_230516_a_(dimensionTypeId), chunkGenerator);
|
||||
() -> field_240767_f_.func_230520_a_().getValueForKey(dimensionTypeId), chunkGenerator);
|
||||
|
||||
IServerWorldInfo serverWorldProperties = this.field_240768_i_.func_230407_G_();
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ public class CableAnchorPart implements IPart {
|
||||
|
||||
@Override
|
||||
public boolean isLadder(final LivingEntity entity) {
|
||||
return this.mySide.yOffset == 0 && (entity.collidedHorizontally || !entity.func_233570_aj_());
|
||||
return this.mySide.yOffset == 0 && (entity.collidedHorizontally || !entity.isOnGround());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -169,12 +169,12 @@ public class TestMeteoritesCommand implements ISubCommand {
|
||||
}
|
||||
|
||||
IFormattableTextComponent msg = new StringTextComponent(" #" + (i + 1) + " ");
|
||||
msg.func_230529_a_(getClickablePosition(world, settings, pos)).func_230529_a_(restOfLine);
|
||||
msg.append(getClickablePosition(world, settings, pos)).append(restOfLine);
|
||||
|
||||
// Add a tooltip
|
||||
ITextComponent tooltip = new StringTextComponent(settings.toString() + "\nBiome: ").deepCopy()
|
||||
.func_230529_a_(world.getBiome(pos).getDisplayName());
|
||||
msg.func_240700_a_(style -> style.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, tooltip)));
|
||||
.append(world.getBiome(pos).getDisplayName());
|
||||
msg.modifyStyle(style -> style.setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, tooltip)));
|
||||
|
||||
sender.sendFeedback(msg, true);
|
||||
}
|
||||
@@ -192,8 +192,8 @@ public class TestMeteoritesCommand implements ISubCommand {
|
||||
String displayText = String.format(Locale.ROOT, "pos=%d,%d,%d", tpPos.getX(), tpPos.getY(), tpPos.getZ());
|
||||
String tpCommand = String.format(Locale.ROOT, "/tp @s %d %d %d", tpPos.getX(), tpPos.getY(), tpPos.getZ());
|
||||
|
||||
return new StringTextComponent(displayText).func_240699_a_(TextFormatting.UNDERLINE)
|
||||
.func_240700_a_(style -> style.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, tpCommand)));
|
||||
return new StringTextComponent(displayText).mergeStyle(TextFormatting.UNDERLINE)
|
||||
.modifyStyle(style -> style.setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, tpCommand)));
|
||||
}
|
||||
|
||||
private static MeteoriteStructurePiece getMeteoritePieceFromChunk(IChunk chunk) {
|
||||
|
||||
@@ -35,8 +35,8 @@ public class StorageCellBiome extends Biome {
|
||||
new ConfiguredSurfaceBuilder<>(SurfaceBuilder.NOPE, SurfaceBuilder.STONE_STONE_GRAVEL_CONFIG))
|
||||
.precipitation(RainType.NONE).category(Category.NONE).depth(0).scale(1)
|
||||
// Copied from the vanilla void biome
|
||||
.temperature(0.5F).downfall(0.5F).func_235097_a_(new BiomeAmbience.Builder().func_235246_b_(4159204)
|
||||
.func_235248_c_(329011).func_235239_a_(0).func_235238_a_())
|
||||
.temperature(0.5F).downfall(0.5F).func_235097_a_(new BiomeAmbience.Builder().setWaterColor(4159204)
|
||||
.setWaterFogColor(329011).setFogColor(0).build())
|
||||
.parent(null));
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ public class StorageChunkGenerator extends ChunkGenerator {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int func_222529_a(int p_222529_1_, int p_222529_2_, Heightmap.Type heightmapType) {
|
||||
public int getHeight(int p_222529_1_, int p_222529_2_, Heightmap.Type heightmapType) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ public class Platform {
|
||||
final ISecurityGrid sg = g.getCache(ISecurityGrid.class);
|
||||
if (!sg.hasPermission(player, requiredPermission)) {
|
||||
player.sendMessage(new TranslationTextComponent("appliedenergistics2.permission_denied")
|
||||
.func_240699_a_(TextFormatting.RED), Util.DUMMY_UUID);
|
||||
.mergeStyle(TextFormatting.RED), Util.DUMMY_UUID);
|
||||
// FIXME trace logging?
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ import net.minecraft.world.gen.feature.ReplaceBlockConfig;
|
||||
public class ChargedQuartzOreConfig implements IFeatureConfig {
|
||||
|
||||
public static final Codec<ChargedQuartzOreConfig> CODEC = RecordCodecBuilder.create((instance) -> instance
|
||||
.group(BlockState.field_235877_b_.fieldOf("target").forGetter((config) -> config.target),
|
||||
BlockState.field_235877_b_.fieldOf("state").forGetter((config) -> config.state),
|
||||
.group(BlockState.BLOCKSTATE_CODEC.fieldOf("target").forGetter((config) -> config.target),
|
||||
BlockState.BLOCKSTATE_CODEC.fieldOf("state").forGetter((config) -> config.state),
|
||||
Codec.FLOAT.fieldOf("chance").withDefault(0f).forGetter((config) -> config.chance))
|
||||
.apply(instance, ChargedQuartzOreConfig::new));
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ public class MeteoriteStructureStart extends StructureStart<NoFeatureConfig> {
|
||||
int scanRadius = (int) Math.max(1, meteoriteRadius * 2);
|
||||
for (int x = -scanRadius; x <= scanRadius; x++) {
|
||||
for (int z = -scanRadius; z <= scanRadius; z++) {
|
||||
int h = generator.func_222529_a(centerX + x, centerZ + z, heightmapType);
|
||||
int h = generator.getHeight(centerX + x, centerZ + z, heightmapType);
|
||||
stats.add(h);
|
||||
}
|
||||
}
|
||||
@@ -106,7 +106,7 @@ public class MeteoriteStructureStart extends StructureStart<NoFeatureConfig> {
|
||||
final double distanceFrom = dx * dx + dz * dz;
|
||||
|
||||
if (maxY > h + distanceFrom * 0.0175 && maxY < h + distanceFrom * 0.02) {
|
||||
int heigth = generator.func_222529_a(blockPos.getX(), blockPos.getZ(), Heightmap.Type.OCEAN_FLOOR);
|
||||
int heigth = generator.getHeight(blockPos.getX(), blockPos.getZ(), Heightmap.Type.OCEAN_FLOOR);
|
||||
if (heigth < seaLevel) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user