API compiles
This commit is contained in:
@@ -28,7 +28,7 @@ import com.google.common.base.Splitter;
|
||||
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraftforge.fml.client.gui.HoverChecker;
|
||||
|
||||
import mezz.jei.api.constants.VanillaTypes;
|
||||
@@ -51,7 +51,7 @@ import appeng.tile.misc.CondenserTileEntity;
|
||||
|
||||
class CondenserCategory implements IRecipeCategory<CondenserOutput> {
|
||||
|
||||
public static final ResourceLocation UID = new ResourceLocation(AppEng.MOD_ID, "condenser");
|
||||
public static final Identifier UID = new Identifier(AppEng.MOD_ID, "condenser");
|
||||
|
||||
private final String localizedName;
|
||||
|
||||
@@ -73,10 +73,10 @@ class CondenserCategory implements IRecipeCategory<CondenserOutput> {
|
||||
this.localizedName = I18n.format("gui.appliedenergistics2.Condenser");
|
||||
this.icon = guiHelper.createDrawableIngredient(Api.INSTANCE.definitions().blocks().condenser().stack(1));
|
||||
|
||||
ResourceLocation location = new ResourceLocation(AppEng.MOD_ID, "textures/guis/condenser.png");
|
||||
Identifier location = new Identifier(AppEng.MOD_ID, "textures/guis/condenser.png");
|
||||
this.background = guiHelper.createDrawable(location, 50, 25, 94, 48);
|
||||
|
||||
ResourceLocation statesLocation = new ResourceLocation(AppEng.MOD_ID, "textures/guis/states.png");
|
||||
Identifier statesLocation = new Identifier(AppEng.MOD_ID, "textures/guis/states.png");
|
||||
this.iconTrash = guiHelper.drawableBuilder(statesLocation, 241, 81, 14, 14).addPadding(28, 0, 2, 0).build();
|
||||
this.iconButton = guiHelper.drawableBuilder(statesLocation, 240, 240, 16, 16).addPadding(28, 0, 78, 0).build();
|
||||
|
||||
@@ -106,7 +106,7 @@ class CondenserCategory implements IRecipeCategory<CondenserOutput> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getUid() {
|
||||
public Identifier getUid() {
|
||||
return CondenserCategory.UID;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ import java.util.List;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.item.crafting.ShapedRecipe;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import mezz.jei.api.constants.VanillaRecipeCategoryUid;
|
||||
import mezz.jei.api.recipe.IFocus;
|
||||
@@ -51,7 +51,7 @@ class FacadeRegistryPlugin implements IRecipeManagerPlugin {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <V> List<ResourceLocation> getRecipeCategoryUids(IFocus<V> focus) {
|
||||
public <V> List<Identifier> getRecipeCategoryUids(IFocus<V> focus) {
|
||||
if (focus.getMode() == IFocus.Mode.OUTPUT && focus.getValue() instanceof ItemStack) {
|
||||
// Looking up how a certain facade is crafted
|
||||
ItemStack itemStack = (ItemStack) focus.getValue();
|
||||
@@ -101,7 +101,7 @@ class FacadeRegistryPlugin implements IRecipeManagerPlugin {
|
||||
|
||||
private ShapedRecipe make(ItemStack textureItem, ItemStack cableAnchor, ItemStack result) {
|
||||
// This id should only be used within JEI and not really matter
|
||||
ResourceLocation id = new ResourceLocation(AppEng.MOD_ID,
|
||||
Identifier id = new Identifier(AppEng.MOD_ID,
|
||||
"facade/" + textureItem.getItem().getRegistryName().toString().replace(':', '/'));
|
||||
|
||||
NonNullList<Ingredient> ingredients = NonNullList.withSize(9, Ingredient.EMPTY);
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import mezz.jei.api.constants.VanillaTypes;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
@@ -41,7 +41,7 @@ import appeng.recipes.handlers.GrinderRecipe;
|
||||
|
||||
class GrinderRecipeCategory implements IRecipeCategory<GrinderRecipe> {
|
||||
|
||||
public static final ResourceLocation UID = new ResourceLocation(AppEng.MOD_ID, "grinder");
|
||||
public static final Identifier UID = new Identifier(AppEng.MOD_ID, "grinder");
|
||||
|
||||
private final String localizedName;
|
||||
|
||||
@@ -52,14 +52,14 @@ class GrinderRecipeCategory implements IRecipeCategory<GrinderRecipe> {
|
||||
public GrinderRecipeCategory(IGuiHelper guiHelper) {
|
||||
this.localizedName = I18n.format("block.appliedenergistics2.grindstone");
|
||||
|
||||
ResourceLocation location = new ResourceLocation(AppEng.MOD_ID, "textures/guis/grinder.png");
|
||||
Identifier location = new Identifier(AppEng.MOD_ID, "textures/guis/grinder.png");
|
||||
this.background = guiHelper.createDrawable(location, 11, 16, 154, 70);
|
||||
|
||||
this.icon = guiHelper.createDrawableIngredient(Api.INSTANCE.definitions().blocks().grindstone().stack(1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getUid() {
|
||||
public Identifier getUid() {
|
||||
return GrinderRecipeCategory.UID;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
package appeng.integration.modules.jei;
|
||||
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import mezz.jei.api.constants.VanillaTypes;
|
||||
import mezz.jei.api.gui.IRecipeLayout;
|
||||
@@ -42,7 +42,7 @@ class InscriberRecipeCategory implements IRecipeCategory<InscriberRecipe> {
|
||||
private static final int SLOT_INPUT_BOTTOM = 2;
|
||||
private static final int SLOT_OUTPUT = 3;
|
||||
|
||||
static final ResourceLocation UID = new ResourceLocation(AppEng.MOD_ID, "appliedenergistics2.inscriber");
|
||||
static final Identifier UID = new Identifier(AppEng.MOD_ID, "appliedenergistics2.inscriber");
|
||||
|
||||
private final IDrawable background;
|
||||
|
||||
@@ -53,7 +53,7 @@ class InscriberRecipeCategory implements IRecipeCategory<InscriberRecipe> {
|
||||
private final IDrawable icon;
|
||||
|
||||
public InscriberRecipeCategory(IGuiHelper guiHelper) {
|
||||
ResourceLocation location = new ResourceLocation(AppEng.MOD_ID, "textures/guis/inscriber.png");
|
||||
Identifier location = new Identifier(AppEng.MOD_ID, "textures/guis/inscriber.png");
|
||||
this.background = guiHelper.createDrawable(location, 44, 15, 97, 64);
|
||||
this.localizedName = I18n.format("block.appliedenergistics2.inscriber");
|
||||
|
||||
@@ -66,7 +66,7 @@ class InscriberRecipeCategory implements IRecipeCategory<InscriberRecipe> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getUid() {
|
||||
public Identifier getUid() {
|
||||
return UID;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.RecipeManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import mezz.jei.api.IModPlugin;
|
||||
import mezz.jei.api.JeiPlugin;
|
||||
@@ -53,10 +53,10 @@ import appeng.recipes.handlers.InscriberRecipe;
|
||||
|
||||
@JeiPlugin
|
||||
public class JEIPlugin implements IModPlugin {
|
||||
private static final ResourceLocation ID = new ResourceLocation(AppEng.MOD_ID, "core");
|
||||
private static final Identifier ID = new Identifier(AppEng.MOD_ID, "core");
|
||||
|
||||
@Override
|
||||
public ResourceLocation getPluginUid() {
|
||||
public Identifier getPluginUid() {
|
||||
return ID;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ import java.util.Optional;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import mcjty.theoneprobe.api.IProbeHitData;
|
||||
@@ -64,7 +64,7 @@ public final class PartInfoProvider implements IProbeInfoProvider {
|
||||
@Override
|
||||
public void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, PlayerEntity player, World world,
|
||||
BlockState blockState, IProbeHitData data) {
|
||||
final TileEntity te = world.getTileEntity(data.getPos());
|
||||
final BlockEntity te = world.getTileEntity(data.getPos());
|
||||
final Optional<IPart> maybePart = this.accessor.getMaybePart(te, data);
|
||||
|
||||
if (maybePart.isPresent()) {
|
||||
|
||||
@@ -20,7 +20,7 @@ package appeng.integration.modules.theoneprobe;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import net.minecraft.text.TranslatableText;
|
||||
|
||||
public enum TheOneProbeText {
|
||||
CRAFTING, DEVICE_ONLINE, DEVICE_OFFLINE, DEVICE_MISSING_CHANNEL, P2P_UNLINKED, P2P_INPUT_ONE_OUTPUT,
|
||||
@@ -36,8 +36,8 @@ public enum TheOneProbeText {
|
||||
return getTranslationComponent(args).getFormattedText();
|
||||
}
|
||||
|
||||
public TranslationTextComponent getTranslationComponent(Object... args) {
|
||||
return new TranslationTextComponent(this.getUnlocalized(), args);
|
||||
public TranslatableText getTranslationComponent(Object... args) {
|
||||
return new TranslatableText(this.getUnlocalized(), args);
|
||||
}
|
||||
|
||||
public String getUnlocalized() {
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import mcjty.theoneprobe.api.IProbeHitData;
|
||||
@@ -60,7 +60,7 @@ public final class TileInfoProvider implements IProbeInfoProvider {
|
||||
@Override
|
||||
public void addProbeInfo(ProbeMode mode, IProbeInfo probeInfo, PlayerEntity player, World world,
|
||||
BlockState blockState, IProbeHitData data) {
|
||||
final TileEntity tile = world.getTileEntity(data.getPos());
|
||||
final BlockEntity tile = world.getTileEntity(data.getPos());
|
||||
|
||||
if (tile instanceof AEBaseTileEntity) {
|
||||
final AEBaseTileEntity aeBaseTile = (AEBaseTileEntity) tile;
|
||||
|
||||
@@ -20,7 +20,7 @@ package appeng.integration.modules.theoneprobe.part;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
@@ -32,7 +32,7 @@ import appeng.api.parts.SelectedPart;
|
||||
|
||||
public final class PartAccessor {
|
||||
|
||||
public Optional<IPart> getMaybePart(final TileEntity te, final IProbeHitData data) {
|
||||
public Optional<IPart> getMaybePart(final BlockEntity te, final IProbeHitData data) {
|
||||
if (te instanceof IPartHost) {
|
||||
BlockPos pos = data.getPos();
|
||||
final Vec3d position = data.getHitVec().add(-pos.getX(), -pos.getY(), -pos.getZ());
|
||||
|
||||
@@ -22,7 +22,7 @@ import net.minecraft.block.BlockState;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import alexiil.mc.lib.attributes.item.ItemTransferable;
|
||||
|
||||
import mcjty.theoneprobe.api.ElementAlignment;
|
||||
import mcjty.theoneprobe.api.IProbeHitData;
|
||||
@@ -39,7 +39,7 @@ public class ChargerInfoProvider implements ITileProbInfoProvider {
|
||||
World world, BlockState blockState, IProbeHitData data) {
|
||||
if (tile instanceof ChargerTileEntity) {
|
||||
final ChargerTileEntity charger = (ChargerTileEntity) tile;
|
||||
final IItemHandler chargerInventory = charger.getInternalInventory();
|
||||
final ItemTransferable chargerInventory = charger.getInternalInventory();
|
||||
final ItemStack chargingItem = chargerInventory.getStackInSlot(0);
|
||||
|
||||
if (!chargingItem.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user