API compiles

This commit is contained in:
Sebastian Hartte
2020-06-27 18:09:44 +02:00
parent ba71a82288
commit 80fbb58d4f
572 changed files with 2995 additions and 3037 deletions
@@ -25,7 +25,7 @@ import java.util.Locale;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraft.util.text.TextFormatting;
import appeng.api.storage.data.IAEItemStack;
@@ -36,7 +36,7 @@ import appeng.core.localization.ButtonToolTips;
public abstract class AEBaseMEScreen<T extends AEBaseContainer> extends AEBaseScreen<T> {
public AEBaseMEScreen(T container, PlayerInventory playerInventory, ITextComponent title) {
public AEBaseMEScreen(T container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
}
@@ -51,8 +51,8 @@ import net.minecraft.inventory.container.ClickType;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.Identifier;
import net.minecraft.text.Text;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.fluids.FluidAttributes;
import net.minecraftforge.fml.client.gui.GuiUtils;
@@ -100,7 +100,7 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
private Slot bl_clicked;
protected final List<CustomSlotWidget> guiSlots = new ArrayList<>();
public AEBaseScreen(T container, PlayerInventory playerInventory, ITextComponent title) {
public AEBaseScreen(T container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
}
@@ -587,7 +587,7 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
}
public void bindTexture(final String base, final String file) {
final ResourceLocation loc = new ResourceLocation(base, "textures/" + file);
final Identifier loc = new Identifier(base, "textures/" + file);
getMinecraft().getTextureManager().bindTexture(loc);
}
@@ -646,7 +646,7 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
final Fluid fluid = fs.getFluid();
FluidAttributes fluidAttributes = fluid.getAttributes();
bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE);
ResourceLocation fluidStillTexture = fluidAttributes.getStillTexture(fs.getFluidStack());
Identifier fluidStillTexture = fluidAttributes.getStillTexture(fs.getFluidStack());
final TextureAtlasSprite sprite = getMinecraft()
.getAtlasSpriteGetter(AtlasTexture.LOCATION_BLOCKS_TEXTURE).apply(fluidStillTexture);
@@ -762,11 +762,11 @@ public abstract class AEBaseScreen<T extends AEBaseContainer> extends ContainerS
}
public void bindTexture(final String file) {
final ResourceLocation loc = new ResourceLocation(AppEng.MOD_ID, "textures/" + file);
final Identifier loc = new Identifier(AppEng.MOD_ID, "textures/" + file);
getMinecraft().getTextureManager().bindTexture(loc);
}
public void bindTexture(final ResourceLocation loc) {
public void bindTexture(final Identifier loc) {
getMinecraft().getTextureManager().bindTexture(loc);
}
@@ -6,8 +6,8 @@ import javax.annotation.Nonnull;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraftforge.items.SlotItemHandler;
/**
@@ -58,7 +58,7 @@ class Size1Slot extends SlotItemHandler {
}
@Override
@OnlyIn(Dist.CLIENT)
@Environment(EnvType.CLIENT)
public boolean isEnabled() {
return this.delegate.isEnabled();
}
@@ -20,9 +20,9 @@ package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import net.minecraftforge.items.IItemHandler;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import appeng.api.config.ActionItems;
import appeng.api.config.CopyMode;
@@ -43,7 +43,7 @@ public class CellWorkbenchScreen extends UpgradeableScreen<CellWorkbenchContaine
private ToggleButton copyMode;
public CellWorkbenchScreen(CellWorkbenchContainer container, PlayerInventory playerInventory,
ITextComponent title) {
Text title) {
super(container, playerInventory, title);
this.ySize = 251;
}
@@ -118,7 +118,7 @@ public class CellWorkbenchScreen extends UpgradeableScreen<CellWorkbenchContaine
this.copyMode.setState(this.container.getCopyMode() == CopyMode.CLEAR_ON_REMOVE);
boolean hasFuzzy = false;
final IItemHandler inv = this.container.getCellUpgradeInventory();
final ItemTransferable inv = this.container.getCellUpgradeInventory();
for (int x = 0; x < inv.getSlots(); x++) {
final ItemStack is = inv.getStackInSlot(x);
if (!is.isEmpty() && is.getItem() instanceof IUpgradeModule) {
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.client.gui.AEBaseScreen;
@@ -32,7 +32,7 @@ import appeng.core.sync.packets.SwitchGuisPacket;
public class ChestScreen extends AEBaseScreen<ChestContainer> {
public ChestScreen(ChestContainer container, PlayerInventory playerInventory, ITextComponent title) {
public ChestScreen(ChestContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.ySize = 166;
}
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.api.config.CondenserOutput;
@@ -36,7 +36,7 @@ public class CondenserScreen extends AEBaseScreen<CondenserContainer> {
private SettingToggleButton<CondenserOutput> mode;
public CondenserScreen(CondenserContainer container, PlayerInventory playerInventory, ITextComponent title) {
public CondenserScreen(CondenserContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.ySize = 197;
}
@@ -21,7 +21,7 @@ package appeng.client.gui.implementations;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.util.InputMappings;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.client.gui.AEBaseScreen;
@@ -39,7 +39,7 @@ public class CraftAmountScreen extends AEBaseScreen<CraftAmountContainer> {
private Button next;
public CraftAmountScreen(CraftAmountContainer container, PlayerInventory playerInventory, ITextComponent title) {
public CraftAmountScreen(CraftAmountContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.subGui = new AESubScreen(this, container.getTarget());
}
@@ -30,7 +30,7 @@ import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.util.InputMappings;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.api.AEApi;
@@ -64,7 +64,7 @@ public class CraftConfirmScreen extends AEBaseScreen<CraftConfirmContainer> {
private Button selectCPU;
private int tooltip = -1;
public CraftConfirmScreen(CraftConfirmContainer container, PlayerInventory playerInventory, ITextComponent title) {
public CraftConfirmScreen(CraftConfirmContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.subGui = new AESubScreen(this, container.getTarget());
this.xSize = 238;
@@ -31,7 +31,7 @@ import org.apache.commons.lang3.time.DurationFormatUtils;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.api.AEApi;
@@ -90,7 +90,7 @@ public class CraftingCPUScreen<T extends CraftingCPUContainer> extends AEBaseScr
private Button cancel;
private int tooltip = -1;
public CraftingCPUScreen(T container, PlayerInventory playerInventory, ITextComponent title) {
public CraftingCPUScreen(T container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.ySize = GUI_HEIGHT;
this.xSize = GUI_WIDTH;
@@ -24,7 +24,7 @@ package appeng.client.gui.implementations;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.container.implementations.CraftingStatusContainer;
import appeng.core.localization.GuiText;
@@ -38,7 +38,7 @@ public class CraftingStatusScreen extends CraftingCPUScreen<CraftingStatusContai
private Button selectCPU;
public CraftingStatusScreen(CraftingStatusContainer container, PlayerInventory playerInventory,
ITextComponent title) {
Text title) {
super(container, playerInventory, title);
this.subGui = new AESubScreen(this, container.getTarget());
}
@@ -20,7 +20,7 @@ package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Slot;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.config.ActionItems;
import appeng.client.gui.widgets.ActionButton;
@@ -33,7 +33,7 @@ import appeng.helpers.InventoryAction;
public class CraftingTermScreen extends MEMonitorableScreen<CraftingTermContainer> {
public CraftingTermScreen(CraftingTermContainer container, PlayerInventory playerInventory, ITextComponent title) {
public CraftingTermScreen(CraftingTermContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.setReservedSpace(73);
}
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.client.gui.AEBaseScreen;
@@ -32,7 +32,7 @@ import appeng.core.sync.packets.SwitchGuisPacket;
public class DriveScreen extends AEBaseScreen<DriveContainer> {
public DriveScreen(DriveContainer container, PlayerInventory playerInventory, ITextComponent title) {
public DriveScreen(DriveContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.ySize = 199;
}
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.config.FuzzyMode;
import appeng.api.config.Settings;
@@ -38,7 +38,7 @@ public class FormationPlaneScreen extends UpgradeableScreen<FormationPlaneContai
private SettingToggleButton<YesNo> placeMode;
public FormationPlaneScreen(FormationPlaneContainer container, PlayerInventory playerInventory,
ITextComponent title) {
Text title) {
super(container, playerInventory, title);
this.ySize = 251;
}
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.client.gui.AEBaseScreen;
@@ -28,7 +28,7 @@ import appeng.core.localization.GuiText;
public class GrinderScreen extends AEBaseScreen<GrinderContainer> {
public GrinderScreen(GrinderContainer container, PlayerInventory playerInventory, ITextComponent title) {
public GrinderScreen(GrinderContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.ySize = 176;
}
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.AEApi;
import appeng.api.config.FullnessMode;
@@ -37,7 +37,7 @@ public class IOPortScreen extends UpgradeableScreen<IOPortContainer> {
private SettingToggleButton<FullnessMode> fullMode;
private SettingToggleButton<OperationMode> operationMode;
public IOPortScreen(IOPortContainer container, PlayerInventory playerInventory, ITextComponent title) {
public IOPortScreen(IOPortContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.ySize = 166;
}
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.client.gui.AEBaseScreen;
@@ -32,7 +32,7 @@ public class InscriberScreen extends AEBaseScreen<InscriberContainer> {
private ProgressBar pb;
public InscriberScreen(InscriberContainer container, PlayerInventory playerInventory, ITextComponent title) {
public InscriberScreen(InscriberContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.ySize = 176;
this.xSize = this.hasToolbox() ? 246 : 211;
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.config.Settings;
import appeng.api.config.YesNo;
@@ -39,7 +39,7 @@ public class InterfaceScreen extends UpgradeableScreen<InterfaceContainer> {
private SettingToggleButton<YesNo> blockMode;
private ToggleButton interfaceMode;
public InterfaceScreen(InterfaceContainer container, PlayerInventory playerInventory, ITextComponent title) {
public InterfaceScreen(InterfaceContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.ySize = 211;
}
@@ -37,7 +37,7 @@ import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.ListNBT;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.api.AEApi;
@@ -68,7 +68,7 @@ public class InterfaceTerminalScreen extends AEBaseScreen<InterfaceTerminalConta
private AETextField searchField;
public InterfaceTerminalScreen(InterfaceTerminalContainer container, PlayerInventory playerInventory,
ITextComponent title) {
Text title) {
super(container, playerInventory, title);
final Scrollbar scrollbar = new Scrollbar();
this.setScrollBar(scrollbar);
@@ -217,7 +217,7 @@ public class InterfaceTerminalScreen extends AEBaseScreen<InterfaceTerminalConta
try {
final long id = Long.parseLong(key.substring(1), Character.MAX_RADIX);
final CompoundTag invData = in.getCompound(key);
ITextComponent un = ITextComponent.Serializer.fromJson(invData.getString("un"));
Text un = Text.Serializer.fromJson(invData.getString("un"));
final ClientDCInternalInv current = this.getById(id, invData.getLong("sortBy"), un);
for (int x = 0; x < current.getInventory().getSlots(); x++) {
@@ -367,7 +367,7 @@ public class InterfaceTerminalScreen extends AEBaseScreen<InterfaceTerminalConta
return this.names.size() + this.byId.size();
}
private ClientDCInternalInv getById(final long id, final long sortBy, final ITextComponent name) {
private ClientDCInternalInv getById(final long id, final long sortBy, final Text name) {
ClientDCInternalInv o = this.byId.get(id);
if (o == null) {
@@ -21,7 +21,7 @@ package appeng.client.gui.implementations;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.util.InputMappings;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.config.FuzzyMode;
import appeng.api.config.LevelType;
@@ -54,7 +54,7 @@ public class LevelEmitterScreen extends UpgradeableScreen<LevelEmitterContainer>
private SettingToggleButton<LevelType> levelMode;
private SettingToggleButton<YesNo> craftingMode;
public LevelEmitterScreen(LevelEmitterContainer container, PlayerInventory playerInventory, ITextComponent title) {
public LevelEmitterScreen(LevelEmitterContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
}
@@ -26,7 +26,7 @@ import net.minecraft.client.util.InputMappings;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.config.*;
import appeng.api.implementations.guiobjects.IPortableCell;
@@ -87,7 +87,7 @@ public class MEMonitorableScreen<T extends MEMonitorableContainer> extends AEBas
private int currentMouseX = 0;
private int currentMouseY = 0;
public MEMonitorableScreen(T container, PlayerInventory playerInventory, ITextComponent title) {
public MEMonitorableScreen(T container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
final Scrollbar scrollbar = new Scrollbar();
@@ -19,14 +19,14 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.container.implementations.MEPortableCellContainer;
public class MEPortableCellScreen extends MEMonitorableScreen<MEPortableCellContainer> {
public MEPortableCellScreen(MEPortableCellContainer container, PlayerInventory playerInventory,
ITextComponent title) {
Text title) {
super(container, playerInventory, title);
}
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.config.RedstoneMode;
import appeng.api.config.Settings;
@@ -34,7 +34,7 @@ public class MolecularAssemblerScreen extends UpgradeableScreen<MolecularAssembl
private ProgressBar pb;
public MolecularAssemblerScreen(MolecularAssemblerContainer container, PlayerInventory playerInventory,
ITextComponent title) {
Text title) {
super(container, playerInventory, title);
this.ySize = 197;
}
@@ -25,7 +25,7 @@ import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.api.config.SortDir;
@@ -49,7 +49,7 @@ public class NetworkStatusScreen extends AEBaseScreen<NetworkStatusContainer> im
private int tooltip = -1;
public NetworkStatusScreen(NetworkStatusContainer container, PlayerInventory playerInventory,
ITextComponent title) {
Text title) {
super(container, playerInventory, title);
final Scrollbar scrollbar = new Scrollbar();
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.client.gui.AEBaseScreen;
@@ -33,7 +33,7 @@ public class NetworkToolScreen extends AEBaseScreen<NetworkToolContainer> {
private ToggleButton tFacades;
public NetworkToolScreen(NetworkToolContainer container, PlayerInventory playerInventory, ITextComponent title) {
public NetworkToolScreen(NetworkToolContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.ySize = 166;
}
@@ -21,7 +21,7 @@ package appeng.client.gui.implementations;
import net.minecraft.block.Blocks;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.config.ActionItems;
import appeng.client.gui.widgets.ActionButton;
@@ -48,7 +48,7 @@ public class PatternTermScreen extends MEMonitorableScreen<PatternTermContainer>
private ActionButton substitutionsEnabledBtn;
private ActionButton substitutionsDisabledBtn;
public PatternTermScreen(PatternTermContainer container, PlayerInventory playerInventory, ITextComponent title) {
public PatternTermScreen(PatternTermContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.setReservedSpace(81);
}
@@ -21,7 +21,7 @@ package appeng.client.gui.implementations;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.util.InputMappings;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.client.gui.AEBaseScreen;
import appeng.client.gui.widgets.NumberBox;
@@ -37,7 +37,7 @@ public class PriorityScreen extends AEBaseScreen<PriorityContainer> {
private NumberBox priority;
public PriorityScreen(PriorityContainer container, PlayerInventory playerInventory, ITextComponent title) {
public PriorityScreen(PriorityContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.subGui = new AESubScreen(this, container.getPriorityHost());
}
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.client.gui.AEBaseScreen;
@@ -28,7 +28,7 @@ import appeng.core.localization.GuiText;
public class QNBScreen extends AEBaseScreen<QNBContainer> {
public QNBScreen(QNBContainer container, PlayerInventory playerInventory, ITextComponent title) {
public QNBScreen(QNBContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.ySize = 166;
}
@@ -23,7 +23,7 @@ import org.lwjgl.glfw.GLFW;
import net.minecraft.client.gui.widget.TextFieldWidget;
import net.minecraft.client.util.InputMappings;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.client.ActionKey;
@@ -38,7 +38,7 @@ public class QuartzKnifeScreen extends AEBaseScreen<QuartzKnifeContainer> {
private TextFieldWidget name;
public QuartzKnifeScreen(QuartzKnifeContainer container, PlayerInventory playerInventory, ITextComponent title) {
public QuartzKnifeScreen(QuartzKnifeContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.ySize = 184;
}
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.config.SecurityPermissions;
import appeng.api.config.SortOrder;
@@ -38,7 +38,7 @@ public class SecurityStationScreen extends MEMonitorableScreen<SecurityStationCo
private ToggleButton security;
public SecurityStationScreen(SecurityStationContainer container, PlayerInventory playerInventory,
ITextComponent title) {
Text title) {
super(container, playerInventory, title);
this.setCustomSortOrder(false);
this.setReservedSpace(33);
@@ -19,8 +19,8 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.Identifier;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.client.gui.AEBaseScreen;
@@ -30,9 +30,9 @@ import appeng.core.localization.GuiText;
public class SkyChestScreen extends AEBaseScreen<SkyChestContainer> {
private static final ResourceLocation TEXTURE = new ResourceLocation(AppEng.MOD_ID, "textures/guis/skychest.png");
private static final Identifier TEXTURE = new Identifier(AppEng.MOD_ID, "textures/guis/skychest.png");
public SkyChestScreen(SkyChestContainer container, PlayerInventory playerInv, ITextComponent title) {
public SkyChestScreen(SkyChestContainer container, PlayerInventory playerInv, Text title) {
super(container, playerInv, title);
this.ySize = 195;
}
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.client.gui.AEBaseScreen;
@@ -31,7 +31,7 @@ import appeng.util.Platform;
public class SpatialIOPortScreen extends AEBaseScreen<SpatialIOPortContainer> {
public SpatialIOPortScreen(SpatialIOPortContainer container, PlayerInventory playerInventory,
ITextComponent title) {
Text title) {
super(container, playerInventory, title);
this.ySize = 199;
}
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.config.AccessRestriction;
import appeng.api.config.ActionItems;
@@ -42,7 +42,7 @@ public class StorageBusScreen extends UpgradeableScreen<StorageBusContainer> {
private SettingToggleButton<AccessRestriction> rwMode;
private SettingToggleButton<StorageFilter> storageFilter;
public StorageBusScreen(StorageBusContainer container, PlayerInventory playerInventory, ITextComponent title) {
public StorageBusScreen(StorageBusContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.ySize = 251;
}
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.api.config.FuzzyMode;
@@ -47,7 +47,7 @@ public class UpgradeableScreen<T extends UpgradeableContainer> extends AEBaseScr
protected SettingToggleButton<YesNo> craftMode;
protected SettingToggleButton<SchedulingMode> schedulingMode;
public UpgradeableScreen(T container, PlayerInventory playerInventory, ITextComponent title) {
public UpgradeableScreen(T container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.cvb = container;
@@ -21,7 +21,7 @@ package appeng.client.gui.implementations;
import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.client.gui.AEBaseScreen;
@@ -36,7 +36,7 @@ public class VibrationChamberScreen extends AEBaseScreen<VibrationChamberContain
private ProgressBar pb;
public VibrationChamberScreen(VibrationChamberContainer container, PlayerInventory playerInventory,
ITextComponent title) {
Text title) {
super(container, playerInventory, title);
this.ySize = 166;
}
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.client.gui.AEBaseScreen;
@@ -30,7 +30,7 @@ import appeng.util.Platform;
public class WirelessScreen extends AEBaseScreen<WirelessContainer> {
public WirelessScreen(WirelessContainer container, PlayerInventory playerInventory, ITextComponent title) {
public WirelessScreen(WirelessContainer container, PlayerInventory playerInventory, Text title) {
super(container, playerInventory, title);
this.ySize = 166;
}
@@ -19,7 +19,7 @@
package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.container.implementations.MEPortableCellContainer;
@@ -27,7 +27,7 @@ import appeng.container.implementations.MEPortableCellContainer;
public class WirelessTermScreen extends MEMonitorableScreen<MEPortableCellContainer> {
public WirelessTermScreen(MEPortableCellContainer container, PlayerInventory playerInventory,
ITextComponent title) {
Text title) {
super(container, playerInventory, title);
}
@@ -23,11 +23,11 @@ import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Identifier;
import net.minecraftforge.fml.client.gui.GuiUtils;
public abstract class IconButton extends Button implements ITooltip {
public static final ResourceLocation TEXTURE_STATES = new ResourceLocation("appliedenergistics2",
public static final Identifier TEXTURE_STATES = new Identifier("appliedenergistics2",
"textures/guis/states.png");
private boolean halfSize = false;
@@ -20,7 +20,7 @@ package appeng.client.gui.widgets;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.Widget;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Identifier;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.container.interfaces.IProgressProvider;
@@ -29,7 +29,7 @@ import appeng.core.localization.GuiText;
public class ProgressBar extends Widget implements ITooltip {
private final IProgressProvider source;
private final ResourceLocation texture;
private final Identifier texture;
private final int fill_u;
private final int fill_v;
private final Direction layout;
@@ -45,7 +45,7 @@ public class ProgressBar extends Widget implements ITooltip {
final int u, final int y, final int width, final int height, final Direction dir, final String title) {
super(posX, posY, width, height, "");
this.source = source;
this.texture = new ResourceLocation("appliedenergistics2", "textures/" + texture);
this.texture = new Identifier("appliedenergistics2", "textures/" + texture);
this.fill_u = u;
this.fill_v = y;
this.layout = dir;
@@ -26,7 +26,7 @@ import java.util.regex.Pattern;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.config.AccessRestriction;
import appeng.api.config.CondenserOutput;
@@ -234,7 +234,7 @@ public class SettingToggleButton<T extends Enum<T>> extends IconButton {
}
private static void registerApp(final int iconIndex, final Settings setting, final Enum<?> val,
final ButtonToolTips title, final ITextComponent hint) {
final ButtonToolTips title, final Text hint) {
final ButtonAppearance a = new ButtonAppearance();
a.displayName = title.getTranslationKey();
a.displayValue = hint;
@@ -279,8 +279,8 @@ public class SettingToggleButton<T extends Enum<T>> extends IconButton {
@Override
public String getMessage() {
ITextComponent displayName = null;
ITextComponent displayValue = null;
Text displayName = null;
Text displayValue = null;
if (this.buttonSetting != null && this.currentValue != null) {
final ButtonAppearance buttonAppearance = appearances
@@ -355,7 +355,7 @@ public class SettingToggleButton<T extends Enum<T>> extends IconButton {
private static class ButtonAppearance {
public int index;
public ITextComponent displayName;
public ITextComponent displayValue;
public Text displayName;
public Text displayValue;
}
}
@@ -25,10 +25,10 @@ import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Identifier;
public class TabButton extends Button implements ITooltip {
public static final ResourceLocation TEXTURE_STATES = new ResourceLocation("appliedenergistics2",
public static final Identifier TEXTURE_STATES = new Identifier("appliedenergistics2",
"textures/guis/states.png");
private final ItemRenderer itemRenderer;
private int hideEdge = 0;
@@ -25,11 +25,11 @@ import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Identifier;
import net.minecraftforge.fml.client.gui.GuiUtils;
public class ToggleButton extends Button implements ITooltip {
public static final ResourceLocation TEXTURE_STATES = new ResourceLocation("appliedenergistics2",
public static final Identifier TEXTURE_STATES = new Identifier("appliedenergistics2",
"textures/guis/states.png");
private static final Pattern PATTERN_NEW_LINE = Pattern.compile("\\n", Pattern.LITERAL);
private final int iconIdxOn;