mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-03-04 06:44:40 +01:00
Merge branch 'mc1.20.1/feature-dev' into mc1.21.1/dev
This commit is contained in:
commit
61e08b13a2
40 changed files with 449 additions and 432 deletions
|
@ -136,7 +136,7 @@ repositories {
|
|||
dependencies {
|
||||
jarJar(implementation("com.tterrag.registrate:Registrate:${registrate_version}"))
|
||||
|
||||
jarJar("dev.engine-room.flywheel:flywheel-forge-${flywheel_minecraft_version}:${flywheel_version}") {
|
||||
jarJar("dev.engine-room.flywheel:flywheel-neoforge-${flywheel_minecraft_version}:${flywheel_version}") {
|
||||
version {
|
||||
strictly "[1.0,2.0)"
|
||||
}
|
||||
|
|
|
@ -7,8 +7,8 @@ import com.simibubi.create.foundation.item.TooltipHelper;
|
|||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import net.createmod.catnip.lang.FontHelper.Palette;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
|
||||
public interface IDisplayAssemblyExceptions {
|
||||
|
@ -19,7 +19,7 @@ public interface IDisplayAssemblyExceptions {
|
|||
return false;
|
||||
|
||||
if (!tooltip.isEmpty())
|
||||
tooltip.add(Lang.IMMUTABLE_EMPTY);
|
||||
tooltip.add(CommonComponents.EMPTY);
|
||||
|
||||
CreateLang.translate("gui.assembly.exception").style(ChatFormatting.GOLD)
|
||||
.forGoggles(tooltip);
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package com.simibubi.create.content.contraptions.elevator;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
@ -23,6 +21,7 @@ import net.minecraft.ChatFormatting;
|
|||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.EditBox;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.util.FormattedCharSequence;
|
||||
|
||||
|
@ -108,7 +107,7 @@ public class ElevatorContactScreen extends AbstractSimiScreen {
|
|||
}
|
||||
|
||||
private EditBox editBox(int x, int width, int chars) {
|
||||
EditBox editBox = new EditBox(font, guiLeft + x, guiTop + 30, width, 10, Lang.IMMUTABLE_EMPTY);
|
||||
EditBox editBox = new EditBox(font, guiLeft + x, guiTop + 30, width, 10, CommonComponents.EMPTY);
|
||||
editBox.setTextColor(-1);
|
||||
editBox.setTextColorUneditable(-1);
|
||||
editBox.setBordered(false);
|
||||
|
|
|
@ -12,13 +12,13 @@ import net.createmod.catnip.platform.CatnipServices;
|
|||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
import com.simibubi.create.foundation.utility.RaycastHelper;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.outliner.Outliner;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.client.player.LocalPlayer;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.entity.ai.attributes.Attributes;
|
||||
|
@ -64,7 +64,7 @@ public class SuperGlueSelectionHandler {
|
|||
|
||||
if (clusterCooldown > 0) {
|
||||
if (clusterCooldown == 25)
|
||||
player.displayClientMessage(Lang.IMMUTABLE_EMPTY, true);
|
||||
player.displayClientMessage(CommonComponents.EMPTY, true);
|
||||
Outliner.getInstance().keep(clusterOutlineSlot);
|
||||
clusterCooldown--;
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ public class SuperGlueSelectionHandler {
|
|||
if (mc.hitResult instanceof BlockHitResult bhr) {
|
||||
face = bhr.getDirection();
|
||||
BlockState blockState = level.getBlockState(hoveredPos);
|
||||
if (blockState.getBlock()instanceof AbstractChassisBlock cb)
|
||||
if (blockState.getBlock() instanceof AbstractChassisBlock cb)
|
||||
if (cb.getGlueableSide(blockState, bhr.getDirection()) != null)
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -13,11 +13,11 @@ import com.simibubi.create.foundation.utility.DistExecutor;
|
|||
import com.simibubi.create.infrastructure.config.AllConfigs;
|
||||
|
||||
import it.unimi.dsi.fastutil.objects.Object2IntMap.Entry;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.component.DataComponents;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.network.protocol.game.ClientboundSetSubtitleTextPacket;
|
||||
|
@ -102,7 +102,7 @@ public class BacktankUtil {
|
|||
player.connection.send(new ClientboundSetSubtitleTextPacket(
|
||||
Component.literal("\u26A0 ").withStyle(depleted ? ChatFormatting.RED : ChatFormatting.GOLD)
|
||||
.append(component.withStyle(ChatFormatting.GRAY))));
|
||||
player.connection.send(new ClientboundSetTitleTextPacket(Lang.IMMUTABLE_EMPTY));
|
||||
player.connection.send(new ClientboundSetTitleTextPacket(CommonComponents.EMPTY));
|
||||
}
|
||||
|
||||
public static int maxAir(ItemStack backtank) {
|
||||
|
|
|
@ -1,21 +1,22 @@
|
|||
package com.simibubi.create.content.equipment.goggles;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.simibubi.create.AllItems;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
import com.simibubi.create.infrastructure.config.AllConfigs;
|
||||
|
||||
import net.createmod.catnip.gui.AbstractSimiScreen;
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.FormattedText;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class GoggleConfigScreen extends AbstractSimiScreen {
|
||||
|
||||
private int offsetX;
|
||||
|
@ -30,19 +31,19 @@ public class GoggleConfigScreen extends AbstractSimiScreen {
|
|||
tooltip.add(componentSpacing.plainCopy()
|
||||
.append(CreateLang.translateDirect("gui.config.overlay2")
|
||||
.withStyle(ChatFormatting.GRAY)));
|
||||
tooltip.add(Lang.IMMUTABLE_EMPTY);
|
||||
tooltip.add(CommonComponents.EMPTY);
|
||||
tooltip.add(componentSpacing.plainCopy()
|
||||
.append(CreateLang.translateDirect("gui.config.overlay3")));
|
||||
tooltip.add(componentSpacing.plainCopy()
|
||||
.append(CreateLang.translateDirect("gui.config.overlay4")));
|
||||
tooltip.add(Lang.IMMUTABLE_EMPTY);
|
||||
tooltip.add(CommonComponents.EMPTY);
|
||||
tooltip.add(componentSpacing.plainCopy()
|
||||
.append(CreateLang.translateDirect("gui.config.overlay5")
|
||||
.withStyle(ChatFormatting.GRAY)));
|
||||
tooltip.add(componentSpacing.plainCopy()
|
||||
.append(CreateLang.translateDirect("gui.config.overlay6")
|
||||
.withStyle(ChatFormatting.GRAY)));
|
||||
tooltip.add(Lang.IMMUTABLE_EMPTY);
|
||||
tooltip.add(CommonComponents.EMPTY);
|
||||
tooltip.add(componentSpacing.plainCopy()
|
||||
.append(CreateLang.translateDirect("gui.config.overlay7")));
|
||||
tooltip.add(componentSpacing.plainCopy()
|
||||
|
|
|
@ -27,7 +27,6 @@ import com.simibubi.create.infrastructure.config.CClient;
|
|||
import net.createmod.catnip.data.Iterate;
|
||||
import net.createmod.catnip.gui.element.BoxElement;
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.outliner.Outline;
|
||||
import net.createmod.catnip.outliner.Outliner;
|
||||
import net.createmod.catnip.outliner.Outliner.OutlineEntry;
|
||||
|
@ -40,6 +39,7 @@ import net.minecraft.client.gui.LayeredDraw;
|
|||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.FormattedText;
|
||||
import net.minecraft.util.Mth;
|
||||
|
@ -114,7 +114,7 @@ public class GoggleOverlayRenderer {
|
|||
|
||||
if (hasHoveringInformation) {
|
||||
if (!tooltip.isEmpty())
|
||||
tooltip.add(Lang.IMMUTABLE_EMPTY);
|
||||
tooltip.add(CommonComponents.EMPTY);
|
||||
IHaveHoveringInformation hte = (IHaveHoveringInformation) be;
|
||||
hoverAddedInformation = hte.addToTooltip(tooltip, isShifting);
|
||||
|
||||
|
@ -161,7 +161,7 @@ public class GoggleOverlayRenderer {
|
|||
return;
|
||||
}
|
||||
if (!tooltip.isEmpty())
|
||||
tooltip.add(Lang.IMMUTABLE_EMPTY);
|
||||
tooltip.add(CommonComponents.EMPTY);
|
||||
|
||||
CreateLang.translate("gui.goggles.pole_length")
|
||||
.text(" " + poles)
|
||||
|
|
|
@ -5,7 +5,12 @@ import java.util.Optional;
|
|||
import java.util.function.Consumer;
|
||||
import java.util.function.Predicate;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.minecraft.core.Holder;
|
||||
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
@ -29,9 +34,6 @@ import net.minecraft.client.player.AbstractClientPlayer;
|
|||
import net.minecraft.client.player.LocalPlayer;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
|
@ -242,12 +244,12 @@ public class PotatoCannonItem extends ProjectileWeaponItem implements CustomArmP
|
|||
String _reload = "potato_cannon.ammo.reload_ticks";
|
||||
String _knockback = "potato_cannon.ammo.knockback";
|
||||
|
||||
tooltip.add(Lang.IMMUTABLE_EMPTY);
|
||||
tooltip.add(CommonComponents.EMPTY);
|
||||
tooltip.add(Component.translatable(ammo.getDescriptionId()).append(Component.literal(":"))
|
||||
.withStyle(ChatFormatting.GRAY));
|
||||
PotatoCannonProjectileType type = PotatoProjectileTypeManager.getTypeForStack(ammo)
|
||||
.get();
|
||||
MutableComponent spacing = Component.literal(" ");
|
||||
MutableComponent spacing = CommonComponents.space();
|
||||
ChatFormatting green = ChatFormatting.GREEN;
|
||||
ChatFormatting darkGreen = ChatFormatting.DARK_GREEN;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.simibubi.create.content.equipment.symmetryWand;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.platform.CatnipServices;
|
||||
|
||||
import org.joml.Vector3f;
|
||||
|
@ -23,6 +22,7 @@ import com.simibubi.create.foundation.utility.CreateLang;
|
|||
import net.createmod.catnip.gui.AbstractSimiScreen;
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -65,9 +65,9 @@ public class SymmetryWandScreen extends AbstractSimiScreen {
|
|||
int x = guiLeft;
|
||||
int y = guiTop;
|
||||
|
||||
labelType = new Label(x + 51, y + 28, Lang.IMMUTABLE_EMPTY).colored(0xFFFFFFFF)
|
||||
labelType = new Label(x + 51, y + 28, CommonComponents.EMPTY).colored(0xFFFFFFFF)
|
||||
.withShadow();
|
||||
labelAlign = new Label(x + 51, y + 50, Lang.IMMUTABLE_EMPTY).colored(0xFFFFFFFF)
|
||||
labelAlign = new Label(x + 51, y + 50, CommonComponents.EMPTY).colored(0xFFFFFFFF)
|
||||
.withShadow();
|
||||
|
||||
int state =
|
||||
|
|
|
@ -13,9 +13,9 @@ import com.simibubi.create.foundation.utility.CreateLang;
|
|||
|
||||
import net.createmod.catnip.gui.AbstractSimiScreen;
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.platform.CatnipServices;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -44,7 +44,7 @@ public abstract class ZapperScreen extends AbstractSimiScreen {
|
|||
this.background = background;
|
||||
this.zapper = zapper;
|
||||
this.hand = hand;
|
||||
title = Lang.IMMUTABLE_EMPTY;
|
||||
title = CommonComponents.EMPTY;
|
||||
brightColor = 0xFEFEFE;
|
||||
fontColor = AllGuiTextures.FONT_COLOR;
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@ import com.simibubi.create.foundation.gui.widget.ScrollInput;
|
|||
import com.simibubi.create.foundation.gui.widget.SelectionScrollInput;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -43,7 +43,7 @@ public class WorldshaperScreen extends ZapperScreen {
|
|||
protected Indicator acrossMaterialsIndicator;
|
||||
|
||||
protected TerrainBrushes currentBrush;
|
||||
protected int[] currentBrushParams = new int[] { 1, 1, 1 };
|
||||
protected int[] currentBrushParams = new int[]{1, 1, 1};
|
||||
protected boolean currentFollowDiagonals;
|
||||
protected boolean currentAcrossMaterials;
|
||||
protected TerrainTools currentTool;
|
||||
|
@ -78,7 +78,7 @@ public class WorldshaperScreen extends ZapperScreen {
|
|||
int x = guiLeft;
|
||||
int y = guiTop;
|
||||
|
||||
brushLabel = new Label(x + 61, y + 25, Lang.IMMUTABLE_EMPTY).withShadow();
|
||||
brushLabel = new Label(x + 61, y + 25, CommonComponents.EMPTY).withShadow();
|
||||
brushInput = new SelectionScrollInput(x + 56, y + 20, 77, 18).forOptions(brushOptions)
|
||||
.titled(CreateLang.translateDirect("gui.terrainzapper.brush"))
|
||||
.writingTo(brushLabel)
|
||||
|
@ -107,7 +107,7 @@ public class WorldshaperScreen extends ZapperScreen {
|
|||
brushParams.clear();
|
||||
|
||||
for (int index = 0; index < 3; index++) {
|
||||
Label label = new Label(x + 65 + 20 * index, y + 45, Lang.IMMUTABLE_EMPTY).withShadow();
|
||||
Label label = new Label(x + 65 + 20 * index, y + 45, CommonComponents.EMPTY).withShadow();
|
||||
|
||||
final int finalIndex = index;
|
||||
ScrollInput input = new ScrollInput(x + 56 + 20 * index, y + 40, 18, 18)
|
||||
|
@ -151,10 +151,10 @@ public class WorldshaperScreen extends ZapperScreen {
|
|||
if (currentBrush.hasConnectivityOptions()) {
|
||||
int x1 = x + 7 + 4 * 18;
|
||||
int y1 = y + 79;
|
||||
followDiagonalsIndicator = new Indicator(x1, y1 - 6, Lang.IMMUTABLE_EMPTY);
|
||||
followDiagonalsIndicator = new Indicator(x1, y1 - 6, CommonComponents.EMPTY);
|
||||
followDiagonals = new IconButton(x1, y1, AllIcons.I_FOLLOW_DIAGONAL);
|
||||
x1 += 18;
|
||||
acrossMaterialsIndicator = new Indicator(x1, y1 - 6, Lang.IMMUTABLE_EMPTY);
|
||||
acrossMaterialsIndicator = new Indicator(x1, y1 - 6, CommonComponents.EMPTY);
|
||||
acrossMaterials = new IconButton(x1, y1, AllIcons.I_FOLLOW_MATERIAL);
|
||||
|
||||
followDiagonals.withCallback(() -> {
|
||||
|
|
|
@ -8,12 +8,12 @@ import com.simibubi.create.content.fluids.potion.PotionFluid.BottleType;
|
|||
import com.simibubi.create.foundation.fluid.FluidHelper;
|
||||
import com.simibubi.create.foundation.fluid.FluidIngredient;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.data.Pair;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.component.DataComponents;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.world.effect.MobEffect;
|
||||
|
@ -32,6 +32,7 @@ import net.minecraft.world.item.alchemy.Potions;
|
|||
import net.minecraft.world.item.component.ItemAttributeModifiers;
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
import net.minecraft.world.level.material.Fluids;
|
||||
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
import net.neoforged.api.distmarker.OnlyIn;
|
||||
import net.neoforged.neoforge.fluids.FluidStack;
|
||||
|
@ -127,7 +128,7 @@ public class PotionFluidHandler {
|
|||
}
|
||||
|
||||
if (!list1.isEmpty()) {
|
||||
tooltip.add(Lang.IMMUTABLE_EMPTY);
|
||||
tooltip.add(CommonComponents.EMPTY);
|
||||
tooltip.add((Component.translatable("potion.whenDrank")).withStyle(ChatFormatting.DARK_PURPLE));
|
||||
|
||||
for (Pair<Holder<Attribute>, AttributeModifier> pair : list1) {
|
||||
|
|
|
@ -6,8 +6,6 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import com.simibubi.create.AllBlocks;
|
||||
|
@ -22,13 +20,14 @@ import com.simibubi.create.foundation.fluid.FluidHelper;
|
|||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import joptsimple.internal.Strings;
|
||||
import net.createmod.catnip.data.Iterate;
|
||||
import net.createmod.catnip.animation.LerpedFloat;
|
||||
import net.createmod.catnip.animation.LerpedFloat.Chaser;
|
||||
import net.createmod.catnip.data.Iterate;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
|
@ -37,6 +36,7 @@ import net.minecraft.util.Mth;
|
|||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
|
||||
import net.neoforged.neoforge.fluids.FluidStack;
|
||||
import net.neoforged.neoforge.fluids.capability.IFluidHandler;
|
||||
|
||||
|
@ -67,7 +67,7 @@ public class BoilerData {
|
|||
private int maxHeatForWater = 0;
|
||||
private int minValue = 0;
|
||||
private int maxValue = 0;
|
||||
public boolean[] occludedDirections = { true, true, true, true };
|
||||
public boolean[] occludedDirections = {true, true, true, true};
|
||||
|
||||
public LerpedFloat gauge = LerpedFloat.linear();
|
||||
|
||||
|
@ -209,7 +209,7 @@ public class BoilerData {
|
|||
double totalSU = getEngineEfficiency(boilerSize) * 16 * Math.max(boilerLevel, attachedEngines)
|
||||
* BlockStressValues.getCapacity(AllBlocks.STEAM_ENGINE.get());
|
||||
|
||||
tooltip.add(Lang.IMMUTABLE_EMPTY);
|
||||
tooltip.add(CommonComponents.EMPTY);
|
||||
|
||||
if (attachedEngines > 0 && maxHeatForSize > 0 && maxHeatForWater == 0 && (passiveHeat ? 1 : activeHeat) > 0) {
|
||||
CreateLang.translate("boiler.water_input_rate")
|
||||
|
|
|
@ -15,7 +15,6 @@ import com.simibubi.create.content.kinetics.belt.transport.TransportedItemStack;
|
|||
import com.simibubi.create.foundation.block.ProperWaterloggedBlock;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.math.VecHelper;
|
||||
import net.createmod.catnip.outliner.Outliner;
|
||||
import net.minecraft.ChatFormatting;
|
||||
|
@ -24,6 +23,7 @@ import net.minecraft.client.multiplayer.ClientLevel;
|
|||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Direction.Axis;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
|
@ -164,7 +164,8 @@ public class BeltSlicer {
|
|||
|
||||
int amountRetrieved = 0;
|
||||
boolean beltFound = false;
|
||||
Search: while (true) {
|
||||
Search:
|
||||
while (true) {
|
||||
for (int i = 0; i < player.getInventory().getContainerSize(); ++i) {
|
||||
if (amountRetrieved == requiredShafts && beltFound)
|
||||
break Search;
|
||||
|
@ -222,7 +223,7 @@ public class BeltSlicer {
|
|||
newController.inventory = null;
|
||||
newController.setController(newController.getBlockPos());
|
||||
for (Iterator<TransportedItemStack> iterator = inventory.getTransportedItems()
|
||||
.iterator(); iterator.hasNext();) {
|
||||
.iterator(); iterator.hasNext(); ) {
|
||||
TransportedItemStack transportedItemStack = iterator.next();
|
||||
float newPosition = transportedItemStack.beltPosition - hitSegment - (towardPositive ? 1 : 0);
|
||||
if (newPosition <= 0)
|
||||
|
@ -478,7 +479,7 @@ public class BeltSlicer {
|
|||
mc.player.displayClientMessage(CreateLang.translateDirect(feedback.langKey)
|
||||
.withStyle(feedback.formatting), true);
|
||||
else
|
||||
mc.player.displayClientMessage(Lang.IMMUTABLE_EMPTY, true);
|
||||
mc.player.displayClientMessage(CommonComponents.EMPTY, true);
|
||||
|
||||
if (feedback.bb != null)
|
||||
Outliner.getInstance().chaseAABB("BeltSlicer", feedback.bb)
|
||||
|
|
|
@ -28,7 +28,6 @@ import com.simibubi.create.foundation.utility.CreateLang;
|
|||
|
||||
import dev.engine_room.flywheel.lib.model.baked.PartialModel;
|
||||
import net.createmod.catnip.animation.LerpedFloat;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.math.VecHelper;
|
||||
import net.createmod.catnip.nbt.NBTHelper;
|
||||
import net.minecraft.ChatFormatting;
|
||||
|
@ -38,6 +37,7 @@ import net.minecraft.core.HolderLookup;
|
|||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.ListTag;
|
||||
import net.minecraft.nbt.Tag;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
|
@ -515,7 +515,7 @@ public class DeployerBlockEntity extends KineticBlockEntity {
|
|||
|
||||
float stressAtBase = calculateStressApplied();
|
||||
if (StressImpact.isEnabled() && !Mth.equal(stressAtBase, 0)) {
|
||||
tooltip.add(Lang.IMMUTABLE_EMPTY);
|
||||
tooltip.add(CommonComponents.EMPTY);
|
||||
addStressImpactStats(tooltip, stressAtBase);
|
||||
}
|
||||
|
||||
|
|
|
@ -19,14 +19,13 @@ import com.simibubi.create.foundation.gui.widget.Label;
|
|||
import com.simibubi.create.foundation.gui.widget.SelectionScrollInput;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import net.createmod.catnip.data.Pair;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.platform.CatnipServices;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
|
@ -93,9 +92,9 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterM
|
|||
});
|
||||
blacklist.setToolTip(denyN);
|
||||
|
||||
whitelistDisIndicator = new Indicator(x + 47, y + 55, Lang.IMMUTABLE_EMPTY);
|
||||
whitelistConIndicator = new Indicator(x + 65, y + 55, Lang.IMMUTABLE_EMPTY);
|
||||
blacklistIndicator = new Indicator(x + 83, y + 55, Lang.IMMUTABLE_EMPTY);
|
||||
whitelistDisIndicator = new Indicator(x + 47, y + 55, CommonComponents.EMPTY);
|
||||
whitelistConIndicator = new Indicator(x + 65, y + 55, CommonComponents.EMPTY);
|
||||
blacklistIndicator = new Indicator(x + 83, y + 55, CommonComponents.EMPTY);
|
||||
|
||||
addRenderableWidgets(blacklist, whitelistCon, whitelistDis, blacklistIndicator, whitelistConIndicator,
|
||||
whitelistDisIndicator);
|
||||
|
@ -113,10 +112,10 @@ public class AttributeFilterScreen extends AbstractFilterScreen<AttributeFilterM
|
|||
|
||||
handleIndicators();
|
||||
|
||||
attributeSelectorLabel = new Label(x + 43, y + 28, Lang.IMMUTABLE_EMPTY).colored(0xF3EBDE)
|
||||
attributeSelectorLabel = new Label(x + 43, y + 28, CommonComponents.EMPTY).colored(0xF3EBDE)
|
||||
.withShadow();
|
||||
attributeSelector = new SelectionScrollInput(x + 39, y + 23, 137, 18);
|
||||
attributeSelector.forOptions(Arrays.asList(Lang.IMMUTABLE_EMPTY));
|
||||
attributeSelector.forOptions(Arrays.asList(CommonComponents.EMPTY));
|
||||
attributeSelector.removeCallback();
|
||||
referenceItemChanged(menu.ghostInventory.getStackInSlot(0));
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ import java.util.Objects;
|
|||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import com.simibubi.create.AllDataComponents;
|
||||
|
@ -21,6 +20,7 @@ import com.simibubi.create.foundation.utility.CreateLang;
|
|||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.core.component.DataComponentType;
|
||||
import net.minecraft.core.component.TypedDataComponent;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
|
@ -35,6 +35,7 @@ import net.minecraft.world.item.ItemStack;
|
|||
import net.minecraft.world.item.TooltipFlag;
|
||||
import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
import net.neoforged.api.distmarker.OnlyIn;
|
||||
import net.neoforged.neoforge.items.ItemStackHandler;
|
||||
|
@ -80,7 +81,7 @@ public class FilterItem extends Item implements MenuProvider {
|
|||
List<Component> makeSummary = makeSummary(stack);
|
||||
if (makeSummary.isEmpty())
|
||||
return;
|
||||
tooltip.add(Component.literal(" "));
|
||||
tooltip.add(CommonComponents.SPACE);
|
||||
tooltip.addAll(makeSummary);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import com.simibubi.create.foundation.gui.widget.IconButton;
|
|||
import com.simibubi.create.foundation.gui.widget.Indicator;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
|
@ -58,8 +58,8 @@ public class FilterScreen extends AbstractFilterScreen<FilterMenu> {
|
|||
sendOptionUpdate(Option.WHITELIST);
|
||||
});
|
||||
whitelist.setToolTip(allowN);
|
||||
blacklistIndicator = new Indicator(x + 18, y + 69, Lang.IMMUTABLE_EMPTY);
|
||||
whitelistIndicator = new Indicator(x + 36, y + 69, Lang.IMMUTABLE_EMPTY);
|
||||
blacklistIndicator = new Indicator(x + 18, y + 69, CommonComponents.EMPTY);
|
||||
whitelistIndicator = new Indicator(x + 36, y + 69, CommonComponents.EMPTY);
|
||||
addRenderableWidgets(blacklist, whitelist, blacklistIndicator, whitelistIndicator);
|
||||
|
||||
respectNBT = new IconButton(x + 60, y + 75, AllIcons.I_RESPECT_NBT);
|
||||
|
@ -74,8 +74,8 @@ public class FilterScreen extends AbstractFilterScreen<FilterMenu> {
|
|||
sendOptionUpdate(Option.IGNORE_DATA);
|
||||
});
|
||||
ignoreNBT.setToolTip(ignoreDataN);
|
||||
respectNBTIndicator = new Indicator(x + 60, y + 69, Lang.IMMUTABLE_EMPTY);
|
||||
ignoreNBTIndicator = new Indicator(x + 78, y + 69, Lang.IMMUTABLE_EMPTY);
|
||||
respectNBTIndicator = new Indicator(x + 60, y + 69, CommonComponents.EMPTY);
|
||||
ignoreNBTIndicator = new Indicator(x + 78, y + 69, CommonComponents.EMPTY);
|
||||
addRenderableWidgets(respectNBT, ignoreNBT, respectNBTIndicator, ignoreNBTIndicator);
|
||||
|
||||
handleIndicators();
|
||||
|
|
|
@ -19,10 +19,10 @@ import com.simibubi.create.foundation.fluid.FluidIngredient;
|
|||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.codec.ByteBufCodecs;
|
||||
import net.minecraft.network.codec.StreamCodec;
|
||||
|
@ -244,7 +244,7 @@ public class SequencedAssemblyRecipe implements Recipe<RecipeWrapper> {
|
|||
int step = sequencedAssemblyRecipe.getStep(stack);
|
||||
int total = length * sequencedAssemblyRecipe.loops;
|
||||
List<Component> tooltip = event.getToolTip();
|
||||
tooltip.add(Lang.IMMUTABLE_EMPTY);
|
||||
tooltip.add(CommonComponents.EMPTY);
|
||||
tooltip.add(CreateLang.translateDirect("recipe.sequenced_assembly")
|
||||
.withStyle(ChatFormatting.GRAY));
|
||||
tooltip.add(CreateLang.translateDirect("recipe.assembly.progress", step, total)
|
||||
|
|
|
@ -21,13 +21,12 @@ import com.simibubi.create.foundation.utility.CreateLang;
|
|||
import com.simibubi.create.infrastructure.ponder.AllCreatePonderTags;
|
||||
|
||||
import dev.engine_room.flywheel.lib.transform.TransformStack;
|
||||
import net.createmod.catnip.data.Couple;
|
||||
import net.createmod.catnip.gui.AbstractSimiScreen;
|
||||
import net.createmod.catnip.gui.ScreenOpener;
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.createmod.catnip.gui.widget.AbstractSimiWidget;
|
||||
import net.createmod.catnip.gui.widget.ElementWidget;
|
||||
import net.createmod.catnip.data.Couple;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.ponder.foundation.ui.PonderTagScreen;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
|
@ -35,6 +34,7 @@ import net.minecraft.client.gui.components.events.GuiEventListener;
|
|||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -138,7 +138,7 @@ public class DisplayLinkScreen extends AbstractSimiScreen {
|
|||
int rows = stats.maxRows();
|
||||
int startIndex = Math.min(blockEntity.targetLine, rows);
|
||||
|
||||
targetLineLabel = new Label(x + 65, y + 109, Lang.IMMUTABLE_EMPTY).withShadow();
|
||||
targetLineLabel = new Label(x + 65, y + 109, CommonComponents.EMPTY).withShadow();
|
||||
targetLineLabel.text = target.getLineOptionText(startIndex);
|
||||
|
||||
if (rows > 1) {
|
||||
|
@ -190,7 +190,7 @@ public class DisplayLinkScreen extends AbstractSimiScreen {
|
|||
if (!sources.isEmpty()) {
|
||||
int startIndex = Math.max(sources.indexOf(blockEntity.activeSource), 0);
|
||||
|
||||
sourceTypeLabel = new Label(x + 65, y + 30, Lang.IMMUTABLE_EMPTY).withShadow();
|
||||
sourceTypeLabel = new Label(x + 65, y + 30, CommonComponents.EMPTY).withShadow();
|
||||
sourceTypeLabel.text = sources.get(startIndex)
|
||||
.getName();
|
||||
|
||||
|
|
|
@ -14,8 +14,10 @@ import com.simibubi.create.content.trains.display.FlapDisplayLayout;
|
|||
import com.simibubi.create.foundation.gui.ModularGuiLineBuilder;
|
||||
|
||||
import net.createmod.catnip.nbt.NBTProcessors;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
import net.neoforged.api.distmarker.OnlyIn;
|
||||
|
||||
|
@ -26,7 +28,7 @@ public abstract class DisplaySource extends DisplayBehaviour {
|
|||
public static final MutableComponent WHITESPACE;
|
||||
|
||||
static {
|
||||
WHITESPACE = Component.literal(" ");
|
||||
WHITESPACE = CommonComponents.space();
|
||||
}
|
||||
|
||||
public abstract List<MutableComponent> provideText(DisplayLinkContext context, DisplayTargetStats stats);
|
||||
|
@ -51,13 +53,21 @@ public abstract class DisplaySource extends DisplayBehaviour {
|
|||
activeTarget.acceptText(line, text, context);
|
||||
}
|
||||
|
||||
public void onSignalReset(DisplayLinkContext context) {};
|
||||
public void onSignalReset(DisplayLinkContext context) {
|
||||
}
|
||||
|
||||
public void populateData(DisplayLinkContext context) {};
|
||||
;
|
||||
|
||||
public void populateData(DisplayLinkContext context) {
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
public int getPassiveRefreshTicks() {
|
||||
return 100;
|
||||
};
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
public boolean shouldPassiveReset() {
|
||||
return true;
|
||||
|
@ -89,6 +99,7 @@ public abstract class DisplaySource extends DisplayBehaviour {
|
|||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void initConfigurationWidgets(DisplayLinkContext context, ModularGuiLineBuilder builder,
|
||||
boolean isFirstLine) {}
|
||||
boolean isFirstLine) {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -7,8 +7,6 @@ import java.util.List;
|
|||
|
||||
import net.createmod.catnip.platform.CatnipServices;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import com.mojang.blaze3d.platform.InputConstants;
|
||||
|
@ -33,6 +31,7 @@ import net.minecraft.client.gui.LayeredDraw;
|
|||
import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.client.player.LocalPlayer;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
|
@ -216,7 +215,6 @@ public class LinkedControllerClientHandler {
|
|||
public static void renderOverlay(GuiGraphics guiGraphics, DeltaTracker deltaTracker) {
|
||||
int width1 = guiGraphics.guiWidth();
|
||||
int height1 = guiGraphics.guiHeight();
|
||||
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
if (mc.options.hideGui)
|
||||
return;
|
||||
|
@ -226,7 +224,7 @@ public class LinkedControllerClientHandler {
|
|||
|
||||
PoseStack poseStack = guiGraphics.pose();
|
||||
poseStack.pushPose();
|
||||
Screen tooltipScreen = new Screen(Lang.IMMUTABLE_EMPTY) {
|
||||
Screen tooltipScreen = new Screen(CommonComponents.EMPTY) {
|
||||
};
|
||||
tooltipScreen.init(mc, width1, height1);
|
||||
|
||||
|
|
|
@ -23,13 +23,12 @@ import com.simibubi.create.foundation.utility.CreateLang;
|
|||
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.createmod.catnip.lang.FontHelper.Palette;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.AbstractWidget;
|
||||
import net.minecraft.client.renderer.Rect2i;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
|
@ -95,17 +94,17 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
|||
playButton.withCallback(() -> {
|
||||
sendOptionUpdate(Option.PLAY, true);
|
||||
});
|
||||
playIndicator = new Indicator(x + 75, y + 79, Lang.IMMUTABLE_EMPTY);
|
||||
playIndicator = new Indicator(x + 75, y + 79, CommonComponents.EMPTY);
|
||||
pauseButton = new IconButton(x + 93, y + 85, AllIcons.I_PAUSE);
|
||||
pauseButton.withCallback(() -> {
|
||||
sendOptionUpdate(Option.PAUSE, true);
|
||||
});
|
||||
pauseIndicator = new Indicator(x + 93, y + 79, Lang.IMMUTABLE_EMPTY);
|
||||
pauseIndicator = new Indicator(x + 93, y + 79, CommonComponents.EMPTY);
|
||||
resetButton = new IconButton(x + 111, y + 85, AllIcons.I_STOP);
|
||||
resetButton.withCallback(() -> {
|
||||
sendOptionUpdate(Option.STOP, true);
|
||||
});
|
||||
resetIndicator = new Indicator(x + 111, y + 79, Lang.IMMUTABLE_EMPTY);
|
||||
resetIndicator = new Indicator(x + 111, y + 79, CommonComponents.EMPTY);
|
||||
resetIndicator.state = State.RED;
|
||||
addRenderableWidgets(playButton, playIndicator, pauseButton, pauseIndicator, resetButton,
|
||||
resetIndicator);
|
||||
|
@ -122,7 +121,7 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
|||
});
|
||||
showSettingsButton.setToolTip(CreateLang.translateDirect(_showSettings));
|
||||
addRenderableWidget(showSettingsButton);
|
||||
showSettingsIndicator = new Indicator(x + 9, y + 111, Lang.IMMUTABLE_EMPTY);
|
||||
showSettingsIndicator = new Indicator(x + 9, y + 111, CommonComponents.EMPTY);
|
||||
// addRenderableWidget(showSettingsIndicator);
|
||||
|
||||
extraAreas = ImmutableList.of(new Rect2i(x + BG_TOP.getWidth(), y + BG_TOP.getHeight() + BG_BOTTOM.getHeight() - 62, 84, 92));
|
||||
|
@ -151,7 +150,7 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
|||
CreateLang.translateDirect("gui.schematicannon.option.replaceWithEmpty"));
|
||||
|
||||
for (int i = 0; i < 4; i++) {
|
||||
replaceLevelIndicators.add(new Indicator(x + 33 + i * 18, y + 111, Lang.IMMUTABLE_EMPTY));
|
||||
replaceLevelIndicators.add(new Indicator(x + 33 + i * 18, y + 111, CommonComponents.EMPTY));
|
||||
IconButton replaceLevelButton = new IconButton(x + 33 + i * 18, y + 111, icons.get(i));
|
||||
int replaceMode = i;
|
||||
replaceLevelButton.withCallback(() -> {
|
||||
|
@ -170,7 +169,7 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
|||
sendOptionUpdate(Option.SKIP_MISSING, !menu.contentHolder.skipMissing);
|
||||
});
|
||||
skipMissingButton.setToolTip(CreateLang.translateDirect("gui.schematicannon.option.skipMissing"));
|
||||
skipMissingIndicator = new Indicator(x + 111, y + 111, Lang.IMMUTABLE_EMPTY);
|
||||
skipMissingIndicator = new Indicator(x + 111, y + 111, CommonComponents.EMPTY);
|
||||
Collections.addAll(placementSettingWidgets, skipMissingButton);
|
||||
|
||||
skipBlockEntitiesButton = new IconButton(x + 135, y + 111, AllIcons.I_SKIP_BLOCK_ENTITIES);
|
||||
|
@ -178,7 +177,7 @@ public class SchematicannonScreen extends AbstractSimiContainerScreen<Schematica
|
|||
sendOptionUpdate(Option.SKIP_BLOCK_ENTITIES, !menu.contentHolder.replaceBlockEntities);
|
||||
});
|
||||
skipBlockEntitiesButton.setToolTip(CreateLang.translateDirect("gui.schematicannon.option.skipBlockEntities"));
|
||||
skipBlockEntitiesIndicator = new Indicator(x + 129, y + 111, Lang.IMMUTABLE_EMPTY);
|
||||
skipBlockEntitiesIndicator = new Indicator(x + 129, y + 111, CommonComponents.EMPTY);
|
||||
Collections.addAll(placementSettingWidgets, skipBlockEntitiesButton);
|
||||
|
||||
addRenderableWidgets(placementSettingWidgets);
|
||||
|
|
|
@ -15,11 +15,11 @@ import com.simibubi.create.foundation.utility.CreateLang;
|
|||
|
||||
import net.createmod.catnip.gui.AbstractSimiScreen;
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.EditBox;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.nbt.NbtUtils;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.block.Mirror;
|
||||
|
@ -60,9 +60,9 @@ public class SchematicEditScreen extends AbstractSimiScreen {
|
|||
int x = guiLeft;
|
||||
int y = guiTop + 2;
|
||||
|
||||
xInput = new EditBox(font, x + 50, y + 26, 34, 10, Lang.IMMUTABLE_EMPTY);
|
||||
yInput = new EditBox(font, x + 90, y + 26, 34, 10, Lang.IMMUTABLE_EMPTY);
|
||||
zInput = new EditBox(font, x + 130, y + 26, 34, 10, Lang.IMMUTABLE_EMPTY);
|
||||
xInput = new EditBox(font, x + 50, y + 26, 34, 10, CommonComponents.EMPTY);
|
||||
yInput = new EditBox(font, x + 90, y + 26, 34, 10, CommonComponents.EMPTY);
|
||||
zInput = new EditBox(font, x + 130, y + 26, 34, 10, CommonComponents.EMPTY);
|
||||
|
||||
BlockPos anchor = handler.getTransformation()
|
||||
.getAnchor();
|
||||
|
@ -77,7 +77,7 @@ public class SchematicEditScreen extends AbstractSimiScreen {
|
|||
zInput.setValue("" + alt.getZ());
|
||||
}
|
||||
|
||||
for (EditBox widget : new EditBox[] { xInput, yInput, zInput }) {
|
||||
for (EditBox widget : new EditBox[]{xInput, yInput, zInput}) {
|
||||
widget.setMaxLength(6);
|
||||
widget.setBordered(false);
|
||||
widget.setTextColor(0xFFFFFF);
|
||||
|
@ -97,14 +97,14 @@ public class SchematicEditScreen extends AbstractSimiScreen {
|
|||
|
||||
StructurePlaceSettings settings = handler.getTransformation()
|
||||
.toSettings();
|
||||
Label labelR = new Label(x + 50, y + 48, Lang.IMMUTABLE_EMPTY).withShadow();
|
||||
Label labelR = new Label(x + 50, y + 48, CommonComponents.EMPTY).withShadow();
|
||||
rotationArea = new SelectionScrollInput(x + 45, y + 43, 118, 18).forOptions(rotationOptions)
|
||||
.titled(rotationLabel.plainCopy())
|
||||
.setState(settings.getRotation()
|
||||
.ordinal())
|
||||
.writingTo(labelR);
|
||||
|
||||
Label labelM = new Label(x + 50, y + 70, Lang.IMMUTABLE_EMPTY).withShadow();
|
||||
Label labelM = new Label(x + 50, y + 70, CommonComponents.EMPTY).withShadow();
|
||||
mirrorArea = new SelectionScrollInput(x + 45, y + 65, 118, 18).forOptions(mirrorOptions)
|
||||
.titled(mirrorLabel.plainCopy())
|
||||
.setState(settings.getMirror()
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package com.simibubi.create.content.schematics.client;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
import com.simibubi.create.AllItems;
|
||||
|
@ -15,6 +13,7 @@ import net.createmod.catnip.gui.AbstractSimiScreen;
|
|||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.EditBox;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
|
||||
public class SchematicPromptScreen extends AbstractSimiScreen {
|
||||
|
@ -43,7 +42,7 @@ public class SchematicPromptScreen extends AbstractSimiScreen {
|
|||
int x = guiLeft;
|
||||
int y = guiTop + 2;
|
||||
|
||||
nameField = new EditBox(font, x + 49, y + 26, 131, 10, Lang.IMMUTABLE_EMPTY);
|
||||
nameField = new EditBox(font, x + 49, y + 26, 131, 10, CommonComponents.EMPTY);
|
||||
nameField.setTextColor(-1);
|
||||
nameField.setTextColorUneditable(-1);
|
||||
nameField.setBordered(false);
|
||||
|
|
|
@ -21,12 +21,11 @@ import com.simibubi.create.foundation.gui.widget.SelectionScrollInput;
|
|||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.minecraft.Util;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.renderer.Rect2i;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.util.Mth;
|
||||
import net.minecraft.world.entity.player.Inventory;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -74,8 +73,8 @@ public class SchematicTableScreen extends AbstractSimiContainerScreen<SchematicT
|
|||
int x = leftPos;
|
||||
int y = topPos + 2;
|
||||
|
||||
schematicsLabel = new Label(x + 51, y + 26, Lang.IMMUTABLE_EMPTY).withShadow();
|
||||
schematicsLabel.text = Lang.IMMUTABLE_EMPTY;
|
||||
schematicsLabel = new Label(x + 51, y + 26, CommonComponents.EMPTY).withShadow();
|
||||
schematicsLabel.text = CommonComponents.EMPTY;
|
||||
if (!availableSchematics.isEmpty()) {
|
||||
schematicsArea =
|
||||
new SelectionScrollInput(x + 45, y + 21, 139, 18).forOptions(availableSchematics)
|
||||
|
@ -119,7 +118,7 @@ public class SchematicTableScreen extends AbstractSimiContainerScreen<SchematicT
|
|||
addRenderableWidget(schematicsArea);
|
||||
} else {
|
||||
schematicsArea = null;
|
||||
schematicsLabel.text = Lang.IMMUTABLE_EMPTY;
|
||||
schematicsLabel.text = CommonComponents.EMPTY;
|
||||
}
|
||||
});
|
||||
refreshButton.setToolTip(refresh);
|
||||
|
|
|
@ -10,7 +10,6 @@ import com.simibubi.create.foundation.blockEntity.behaviour.BlockEntityBehaviour
|
|||
import com.simibubi.create.foundation.utility.DyeHelper;
|
||||
import com.simibubi.create.foundation.utility.DynamicComponent;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.nbt.NBTHelper;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.BlockPos.MutableBlockPos;
|
||||
|
@ -18,6 +17,7 @@ import net.minecraft.core.Direction;
|
|||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.core.Vec3i;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
|
@ -150,7 +150,7 @@ public class FlapDisplayBlockEntity extends KineticBlockEntity {
|
|||
FlapDisplaySection flapDisplaySection = sections.get(0);
|
||||
if (componentText == null) {
|
||||
manualLines[lineIndex] = false;
|
||||
flapDisplaySection.setText(Lang.IMMUTABLE_EMPTY);
|
||||
flapDisplaySection.setText(CommonComponents.EMPTY);
|
||||
notifyUpdate();
|
||||
return;
|
||||
}
|
||||
|
@ -314,7 +314,8 @@ public class FlapDisplayBlockEntity extends KineticBlockEntity {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {}
|
||||
public void addBehaviours(List<BlockEntityBehaviour> behaviours) {
|
||||
}
|
||||
|
||||
public int getLineColor(int line) {
|
||||
DyeColor color = colour[line];
|
||||
|
|
|
@ -29,7 +29,6 @@ import com.simibubi.create.foundation.utility.CreateLang;
|
|||
import com.simibubi.create.infrastructure.config.AllConfigs;
|
||||
|
||||
import net.createmod.catnip.data.Couple;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.math.VecHelper;
|
||||
import net.createmod.catnip.theme.Color;
|
||||
import net.minecraft.core.BlockPos;
|
||||
|
@ -38,6 +37,7 @@ import net.minecraft.core.Direction.Axis;
|
|||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||
|
@ -51,6 +51,7 @@ import net.minecraft.world.entity.player.Player;
|
|||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate.StructureBlockInfo;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
import net.neoforged.api.distmarker.OnlyIn;
|
||||
|
||||
|
@ -157,7 +158,7 @@ public class CarriageContraptionEntity extends OrientedContraptionEntity {
|
|||
}
|
||||
|
||||
public boolean isLocalCoordWithin(BlockPos localPos, int min, int max) {
|
||||
if (!(getContraption()instanceof CarriageContraption cc))
|
||||
if (!(getContraption() instanceof CarriageContraption cc))
|
||||
return false;
|
||||
Direction facing = cc.getAssemblyDirection();
|
||||
Axis axis = facing.getClockWise()
|
||||
|
@ -389,7 +390,8 @@ public class CarriageContraptionEntity extends OrientedContraptionEntity {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void handleStallInformation(double x, double y, double z, float angle) {}
|
||||
protected void handleStallInformation(double x, double y, double z, float angle) {
|
||||
}
|
||||
|
||||
Vec3 derailParticleOffset;
|
||||
|
||||
|
@ -691,7 +693,7 @@ public class CarriageContraptionEntity extends OrientedContraptionEntity {
|
|||
private void cleanUpApproachStationMessage(Player player) {
|
||||
if (!stationMessage)
|
||||
return;
|
||||
player.displayClientMessage(Lang.IMMUTABLE_EMPTY, true);
|
||||
player.displayClientMessage(CommonComponents.EMPTY, true);
|
||||
stationMessage = false;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ import net.createmod.catnip.nbt.NBTHelper;
|
|||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.Tag;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.util.Mth;
|
||||
|
@ -327,7 +328,8 @@ public class ScheduleRuntime {
|
|||
}
|
||||
|
||||
ScheduleEntry scheduleEntry = schedule.entries.get(index);
|
||||
Columns: for (List<ScheduleWaitCondition> list : scheduleEntry.conditions) {
|
||||
Columns:
|
||||
for (List<ScheduleWaitCondition> list : scheduleEntry.conditions) {
|
||||
int total = 0;
|
||||
for (ScheduleWaitCondition condition : list) {
|
||||
if (!(condition instanceof ScheduledDelay wait))
|
||||
|
@ -347,7 +349,7 @@ public class ScheduleRuntime {
|
|||
int size = schedule.entries.size();
|
||||
if (index >= size) {
|
||||
if (!schedule.cyclic) {
|
||||
return new TrainDeparturePrediction(train, time, Component.literal(" "), destination);
|
||||
return new TrainDeparturePrediction(train, time, CommonComponents.space(), destination);
|
||||
}
|
||||
index %= size;
|
||||
}
|
||||
|
|
|
@ -46,7 +46,6 @@ import net.createmod.catnip.data.IntAttached;
|
|||
import net.createmod.catnip.data.Pair;
|
||||
import net.createmod.catnip.animation.LerpedFloat;
|
||||
import net.createmod.catnip.animation.LerpedFloat.Chaser;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.gui.Font;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
|
@ -54,6 +53,7 @@ import net.minecraft.client.gui.components.EditBox;
|
|||
import net.minecraft.client.gui.components.Renderable;
|
||||
import net.minecraft.client.renderer.Rect2i;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.util.FormattedCharSequence;
|
||||
import net.minecraft.util.Mth;
|
||||
|
@ -114,7 +114,7 @@ public class ScheduleScreen extends AbstractSimiContainerScreen<ScheduleMenu> im
|
|||
confirmButton.withCallback(() -> minecraft.player.closeContainer());
|
||||
addRenderableWidget(confirmButton);
|
||||
|
||||
cyclicIndicator = new Indicator(leftPos + 21, topPos + 196, Lang.IMMUTABLE_EMPTY);
|
||||
cyclicIndicator = new Indicator(leftPos + 21, topPos + 196, CommonComponents.EMPTY);
|
||||
cyclicIndicator.state = schedule.cyclic ? State.ON : State.OFF;
|
||||
|
||||
List<Component> tip = new ArrayList<>();
|
||||
|
@ -179,7 +179,7 @@ public class ScheduleScreen extends AbstractSimiContainerScreen<ScheduleMenu> im
|
|||
resetProgress.visible = false;
|
||||
|
||||
scrollInput = new SelectionScrollInput(leftPos + 56, topPos + 65, 143, 16);
|
||||
scrollInputLabel = new Label(leftPos + 59, topPos + 69, Lang.IMMUTABLE_EMPTY).withShadow();
|
||||
scrollInputLabel = new Label(leftPos + 59, topPos + 69, CommonComponents.EMPTY).withShadow();
|
||||
editorConfirm = new IconButton(leftPos + 56 + 168, topPos + 65 + 22, AllIcons.I_CONFIRM);
|
||||
if (allowDeletion)
|
||||
editorDelete = new IconButton(leftPos + 56 - 45, topPos + 65 + 22, AllIcons.I_TRASH);
|
||||
|
@ -325,7 +325,8 @@ public class ScheduleScreen extends AbstractSimiContainerScreen<ScheduleMenu> im
|
|||
String filter = destination.getFilterForRegex();
|
||||
if (filter.isBlank())
|
||||
continue;
|
||||
Graphs: for (Iterator<TrackGraph> iterator = viableGraphs.iterator(); iterator.hasNext();) {
|
||||
Graphs:
|
||||
for (Iterator<TrackGraph> iterator = viableGraphs.iterator(); iterator.hasNext(); ) {
|
||||
TrackGraph trackGraph = iterator.next();
|
||||
for (GlobalStation station : trackGraph.getPoints(EdgePointType.STATION)) {
|
||||
if (station.name.matches(filter))
|
||||
|
@ -651,7 +652,7 @@ public class ScheduleScreen extends AbstractSimiContainerScreen<ScheduleMenu> im
|
|||
if (editingCondition != null || editingDestination != null)
|
||||
return false;
|
||||
|
||||
Component empty = Lang.IMMUTABLE_EMPTY;
|
||||
Component empty = CommonComponents.EMPTY;
|
||||
|
||||
int mx = (int) mouseX;
|
||||
int my = (int) mouseY;
|
||||
|
|
|
@ -3,8 +3,6 @@ package com.simibubi.create.content.trains.station;
|
|||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
|
||||
import com.simibubi.create.AllBlockEntityTypes;
|
||||
import com.simibubi.create.AllMapDecorationTypes;
|
||||
import com.simibubi.create.content.trains.track.TrackTargetingBehaviour;
|
||||
|
@ -15,6 +13,7 @@ import net.minecraft.core.BlockPos;
|
|||
import net.minecraft.core.HolderLookup;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.nbt.NbtUtils;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.saveddata.maps.MapDecoration;
|
||||
|
@ -36,7 +35,7 @@ public class StationMarker {
|
|||
BlockPos source = NBTHelper.readBlockPos(tag, "source");
|
||||
BlockPos target = NBTHelper.readBlockPos(tag, "target");
|
||||
Component name = Component.Serializer.fromJson(tag.getString("name"), registries);
|
||||
if (name == null) name = Lang.IMMUTABLE_EMPTY;
|
||||
if (name == null) name = CommonComponents.EMPTY;
|
||||
|
||||
return new StationMarker(source, target, name);
|
||||
}
|
||||
|
|
|
@ -23,14 +23,14 @@ import net.createmod.catnip.platform.CatnipServices;
|
|||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import dev.engine_room.flywheel.lib.model.baked.PartialModel;
|
||||
import net.createmod.catnip.gui.UIRenderHelper;
|
||||
import net.createmod.catnip.animation.AnimationTickHolder;
|
||||
import net.createmod.catnip.data.Pair;
|
||||
import net.createmod.catnip.animation.LerpedFloat;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.data.Pair;
|
||||
import net.createmod.catnip.gui.UIRenderHelper;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.gui.GuiGraphics;
|
||||
import net.minecraft.client.gui.components.EditBox;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.util.Mth;
|
||||
|
@ -120,7 +120,7 @@ public class StationScreen extends AbstractStationScreen {
|
|||
addRenderableWidget(colorTypeScroll);
|
||||
|
||||
onTextChanged = s -> trainNameBox.setX(nameBoxX(s, trainNameBox));
|
||||
trainNameBox = new EditBox(font, x + 23, y + 47, background.getWidth() - 75, 10, Lang.IMMUTABLE_EMPTY);
|
||||
trainNameBox = new EditBox(font, x + 23, y + 47, background.getWidth() - 75, 10, CommonComponents.EMPTY);
|
||||
trainNameBox.setBordered(false);
|
||||
trainNameBox.setMaxLength(35);
|
||||
trainNameBox.setTextColor(0xC6C6C6);
|
||||
|
@ -263,7 +263,7 @@ public class StationScreen extends AbstractStationScreen {
|
|||
newTrainButton.setToolTip(CreateLang.translateDirect("station.create_train"));
|
||||
return;
|
||||
}
|
||||
for (IconButton ib : new IconButton[] { disassembleTrainButton, newTrainButton }) {
|
||||
for (IconButton ib : new IconButton[]{disassembleTrainButton, newTrainButton}) {
|
||||
List<Component> toolTip = ib.getToolTip();
|
||||
toolTip.clear();
|
||||
toolTip.add(CreateLang.translateDirect("station." + key)
|
||||
|
|
|
@ -18,7 +18,7 @@ import net.minecraft.client.renderer.MultiBufferSource;
|
|||
import net.minecraft.client.renderer.entity.ItemRenderer;
|
||||
import net.minecraft.client.resources.model.BakedModel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.component.DataComponents;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -30,8 +30,8 @@ import net.minecraft.world.phys.Vec3;
|
|||
public class ValueBox extends ChasingAABBOutline {
|
||||
|
||||
protected Component label;
|
||||
protected Component sublabel = Lang.IMMUTABLE_EMPTY;
|
||||
protected Component scrollTooltip = Lang.IMMUTABLE_EMPTY;
|
||||
protected Component sublabel = CommonComponents.EMPTY;
|
||||
protected Component scrollTooltip = CommonComponents.EMPTY;
|
||||
protected Vec3 labelOffset = Vec3.ZERO;
|
||||
|
||||
public int overrideColor = -1;
|
||||
|
@ -112,7 +112,8 @@ public class ValueBox extends ChasingAABBOutline {
|
|||
return outline;
|
||||
}
|
||||
|
||||
public void renderContents(PoseStack ms, MultiBufferSource buffer) {}
|
||||
public void renderContents(PoseStack ms, MultiBufferSource buffer) {
|
||||
}
|
||||
|
||||
public static class ItemValueBox extends ValueBox {
|
||||
ItemStack stack;
|
||||
|
|
|
@ -11,13 +11,13 @@ import com.simibubi.create.foundation.blockEntity.behaviour.ValueBox;
|
|||
import com.simibubi.create.foundation.blockEntity.behaviour.ValueBoxTransform;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.math.VecHelper;
|
||||
import net.createmod.catnip.outliner.Outliner;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
@ -77,7 +77,7 @@ public class EdgeInteractionRenderer {
|
|||
.scale(.469))
|
||||
.add(VecHelper.CENTER_OF_ORIGIN);
|
||||
|
||||
ValueBox box = new ValueBox(Lang.IMMUTABLE_EMPTY, bb, pos).passive(!hit)
|
||||
ValueBox box = new ValueBox(CommonComponents.EMPTY, bb, pos).passive(!hit)
|
||||
.transform(new EdgeValueBoxTransform(offset))
|
||||
.wideOutline();
|
||||
Outliner.getInstance().showOutline("edge", box)
|
||||
|
|
|
@ -9,9 +9,9 @@ import com.simibubi.create.foundation.gui.widget.TooltipArea;
|
|||
|
||||
import net.createmod.catnip.data.Couple;
|
||||
import net.createmod.catnip.data.Pair;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.minecraft.client.gui.Font;
|
||||
import net.minecraft.client.gui.components.EditBox;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
|
||||
public class ModularGuiLineBuilder {
|
||||
|
||||
|
@ -52,7 +52,7 @@ public class ModularGuiLineBuilder {
|
|||
}
|
||||
|
||||
private <T extends ScrollInput> void addScrollInput(T input, BiConsumer<T, Label> inputTransform, String dataKey) {
|
||||
Label label = new Label(input.getX() + 5, y, Lang.IMMUTABLE_EMPTY);
|
||||
Label label = new Label(input.getX() + 5, y, CommonComponents.EMPTY);
|
||||
label.withShadow();
|
||||
inputTransform.accept(input, label);
|
||||
input.writingTo(label);
|
||||
|
@ -76,7 +76,7 @@ public class ModularGuiLineBuilder {
|
|||
|
||||
public ModularGuiLineBuilder addTextInput(int x, int width, BiConsumer<EditBox, TooltipArea> inputTransform,
|
||||
String dataKey) {
|
||||
EditBox input = new EditBox(font, x + this.x + 5, y, width - 9, 8, Lang.IMMUTABLE_EMPTY);
|
||||
EditBox input = new EditBox(font, x + this.x + 5, y, width - 9, 8, CommonComponents.EMPTY);
|
||||
input.setBordered(false);
|
||||
input.setTextColor(0xffffff);
|
||||
input.setFocused(false);
|
||||
|
|
|
@ -11,8 +11,6 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
|
@ -23,13 +21,16 @@ import net.createmod.catnip.lang.FontHelper.Palette;
|
|||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.client.resources.language.I18n;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.ItemLike;
|
||||
|
||||
import net.neoforged.neoforge.event.entity.player.ItemTooltipEvent;
|
||||
|
||||
public record ItemDescription(ImmutableList<Component> lines, ImmutableList<Component> linesOnShift, ImmutableList<Component> linesOnCtrl) {
|
||||
public record ItemDescription(ImmutableList<Component> lines, ImmutableList<Component> linesOnShift,
|
||||
ImmutableList<Component> linesOnCtrl) {
|
||||
private static final Map<Item, Supplier<String>> CUSTOM_TOOLTIP_KEYS = new IdentityHashMap<>();
|
||||
|
||||
@Nullable
|
||||
|
@ -144,7 +145,7 @@ public record ItemDescription(ImmutableList<Component> lines, ImmutableList<Comp
|
|||
}
|
||||
|
||||
if (!behaviours.isEmpty()) {
|
||||
linesOnShift.add(Lang.IMMUTABLE_EMPTY);
|
||||
linesOnShift.add(CommonComponents.EMPTY);
|
||||
}
|
||||
|
||||
for (Pair<String, String> behaviourPair : behaviours) {
|
||||
|
@ -201,7 +202,7 @@ public record ItemDescription(ImmutableList<Component> lines, ImmutableList<Comp
|
|||
}
|
||||
|
||||
if (shift || ctrl)
|
||||
list.add(hasDescription && hasControls ? 2 : 1, Lang.IMMUTABLE_EMPTY);
|
||||
list.add(hasDescription && hasControls ? 2 : 1, CommonComponents.EMPTY);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,11 +22,13 @@ import com.simibubi.create.infrastructure.config.CKinetics;
|
|||
import net.createmod.catnip.data.Couple;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.lang.LangBuilder;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.BlockItem;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
|
||||
import net.neoforged.neoforge.event.entity.player.ItemTooltipEvent;
|
||||
|
||||
public class KineticStats implements TooltipModifier {
|
||||
|
@ -52,7 +54,7 @@ public class KineticStats implements TooltipModifier {
|
|||
List<Component> kineticStats = getKineticStats(block, context.getEntity());
|
||||
if (!kineticStats.isEmpty()) {
|
||||
List<Component> tooltip = context.getToolTip();
|
||||
tooltip.add(Lang.IMMUTABLE_EMPTY);
|
||||
tooltip.add(CommonComponents.EMPTY);
|
||||
tooltip.addAll(kineticStats);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,14 +11,13 @@ import com.simibubi.create.foundation.utility.CreateLang;
|
|||
|
||||
import dev.engine_room.flywheel.lib.transform.TransformStack;
|
||||
import net.createmod.catnip.config.ui.BaseConfigScreen;
|
||||
import net.createmod.catnip.data.Iterate;
|
||||
import net.createmod.catnip.gui.AbstractSimiScreen;
|
||||
import net.createmod.catnip.gui.ScreenOpener;
|
||||
import net.createmod.catnip.gui.element.BoxElement;
|
||||
import net.createmod.catnip.gui.element.GuiGameElement;
|
||||
import net.createmod.catnip.lang.FontHelper;
|
||||
import net.createmod.catnip.lang.FontHelper.Palette;
|
||||
import net.createmod.catnip.data.Iterate;
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.theme.Color;
|
||||
import net.createmod.ponder.foundation.ui.PonderTagIndexScreen;
|
||||
import net.minecraft.ChatFormatting;
|
||||
|
@ -31,8 +30,8 @@ import net.minecraft.client.gui.screens.Screen;
|
|||
import net.minecraft.client.gui.screens.TitleScreen;
|
||||
import net.minecraft.client.renderer.CubeMap;
|
||||
import net.minecraft.client.renderer.PanoramaRenderer;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.util.Mth;
|
||||
|
||||
|
@ -232,7 +231,7 @@ public class CreateMainMenuScreen extends AbstractSimiScreen {
|
|||
protected final float scale;
|
||||
|
||||
public PlatformIconButton(int pX, int pY, int pWidth, int pHeight, AllGuiTextures icon, float scale, OnPress pOnPress, Tooltip tooltip) {
|
||||
super(pX, pY, pWidth, pHeight, Lang.IMMUTABLE_EMPTY, pOnPress, DEFAULT_NARRATION);
|
||||
super(pX, pY, pWidth, pHeight, CommonComponents.EMPTY, pOnPress, DEFAULT_NARRATION);
|
||||
this.icon = icon;
|
||||
this.scale = scale;
|
||||
setTooltip(tooltip);
|
||||
|
|
|
@ -4,8 +4,6 @@ import java.util.Arrays;
|
|||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
|
||||
import org.apache.commons.lang3.mutable.MutableObject;
|
||||
|
||||
import com.simibubi.create.AllItems;
|
||||
|
@ -22,7 +20,9 @@ import net.minecraft.client.gui.screens.PauseScreen;
|
|||
import net.minecraft.client.gui.screens.Screen;
|
||||
import net.minecraft.client.gui.screens.TitleScreen;
|
||||
import net.minecraft.client.resources.language.I18n;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
import net.neoforged.api.distmarker.Dist;
|
||||
import net.neoforged.bus.api.SubscribeEvent;
|
||||
import net.neoforged.fml.common.EventBusSubscriber;
|
||||
|
@ -33,7 +33,7 @@ public class OpenCreateMenuButton extends Button {
|
|||
public static final ItemStack ICON = AllItems.GOGGLES.asStack();
|
||||
|
||||
public OpenCreateMenuButton(int x, int y) {
|
||||
super(x, y, 20, 20, Lang.IMMUTABLE_EMPTY, OpenCreateMenuButton::click, DEFAULT_NARRATION);
|
||||
super(x, y, 20, 20, CommonComponents.EMPTY, OpenCreateMenuButton::click, DEFAULT_NARRATION);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -7,7 +7,6 @@ import com.simibubi.create.content.equipment.clipboard.ClipboardOverrides.Clipbo
|
|||
import com.simibubi.create.foundation.ponder.CreateSceneBuilder;
|
||||
import com.simibubi.create.foundation.utility.CreateLang;
|
||||
|
||||
import net.createmod.catnip.lang.Lang;
|
||||
import net.createmod.catnip.math.Pointing;
|
||||
import net.createmod.ponder.api.PonderPalette;
|
||||
import net.createmod.ponder.api.element.ElementLink;
|
||||
|
@ -17,8 +16,8 @@ import net.createmod.ponder.api.scene.SceneBuildingUtil;
|
|||
import net.createmod.ponder.api.scene.Selection;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.network.chat.CommonComponents;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.world.item.DyeColor;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
|
@ -139,7 +138,7 @@ public class DisplayScenes {
|
|||
|
||||
scene.world().hideSection(depot, Direction.SOUTH);
|
||||
scene.idle(5);
|
||||
scene.world().setDisplayBoardText(board, 1, Lang.IMMUTABLE_EMPTY);
|
||||
scene.world().setDisplayBoardText(board, 1, CommonComponents.EMPTY);
|
||||
scene.world().flashDisplayLink(linkPos);
|
||||
scene.idle(5);
|
||||
ElementLink<WorldSectionElement> dirtElement = scene.world().showIndependentSection(dirt, Direction.SOUTH);
|
||||
|
@ -190,7 +189,7 @@ public class DisplayScenes {
|
|||
scene.idle(10);
|
||||
scene.world().setDisplayBoardText(board, 1,
|
||||
Component.literal("6:00 ").append(CreateLang.translateDirect("generic.daytime.pm")));
|
||||
scene.world().setDisplayBoardText(board, 2, Lang.IMMUTABLE_EMPTY);
|
||||
scene.world().setDisplayBoardText(board, 2, CommonComponents.EMPTY);
|
||||
scene.world().flashDisplayLink(linkPos);
|
||||
scene.idle(90);
|
||||
|
||||
|
@ -358,7 +357,7 @@ public class DisplayScenes {
|
|||
|
||||
scene.overlay().showControls(target, Pointing.RIGHT, 40).rightClick();
|
||||
scene.idle(6);
|
||||
scene.world().setDisplayBoardText(board, 0, Lang.IMMUTABLE_EMPTY);
|
||||
scene.world().setDisplayBoardText(board, 0, CommonComponents.EMPTY);
|
||||
scene.idle(25);
|
||||
|
||||
scene.overlay().showText(70)
|
||||
|
@ -451,7 +450,7 @@ public class DisplayScenes {
|
|||
scene.world().moveSection(redstoneBlock, util.vector().of(-1, 0, 1), 0);
|
||||
scene.idle(10);
|
||||
scene.world().flashDisplayLink(linkPos);
|
||||
scene.world().setDisplayBoardText(board, 1, Lang.IMMUTABLE_EMPTY);
|
||||
scene.world().setDisplayBoardText(board, 1, CommonComponents.EMPTY);
|
||||
scene.idle(25);
|
||||
|
||||
scene.overlay().showOutlineWithText(depot, 80)
|
||||
|
|
Loading…
Add table
Reference in a new issue