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
@@ -23,26 +23,15 @@
package appeng.api.config;
import net.minecraftforge.fluids.capability.IFluidHandler.FluidAction;
public enum Actionable {
/**
* Perform the intended action.
*/
MODULATE(FluidAction.EXECUTE),
MODULATE,
/**
* Pretend to perform the action.
*/
SIMULATE(FluidAction.SIMULATE);
SIMULATE
private final FluidAction fluidAction;
Actionable(FluidAction fluidAction) {
this.fluidAction = fluidAction;
}
public FluidAction getFluidAction() {
return fluidAction;
}
}
@@ -23,8 +23,8 @@
package appeng.api.config;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraft.text.Text;
import net.minecraft.text.TranslatableText;
public enum PowerUnits {
AE("gui.appliedenergistics2.units.appliedenergstics"), // Native Units - AE Energy
@@ -61,8 +61,8 @@ public enum PowerUnits {
return (value * this.conversionRatio) / target.conversionRatio;
}
public ITextComponent textComponent() {
return new TranslationTextComponent(unlocalizedName);
public Text textComponent() {
return new TranslatableText(unlocalizedName);
}
}
@@ -20,11 +20,11 @@ package appeng.api.definitions;
import java.util.Optional;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.block.entity.BlockEntity;
public interface ITileDefinition extends IBlockDefinition {
/**
* @return the {@link TileEntity} Class if applicable.
* @return the {@link BlockEntity} Class if applicable.
*/
Optional<? extends Class<? extends TileEntity>> maybeEntity();
Optional<? extends Class<? extends BlockEntity>> maybeEntity();
}
@@ -1,6 +1,6 @@
package appeng.api.definitions;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Identifier;
// Private helper class to create AE2 resource locations
final class IdHelper {
@@ -11,8 +11,8 @@ final class IdHelper {
/**
* Creates a ResourceLocation namespaced to AE2.
*/
static ResourceLocation id(String id) {
return new ResourceLocation("appliedenergistics2", id);
static Identifier id(String id) {
return new Identifier("appliedenergistics2", id);
}
}
@@ -23,24 +23,24 @@
package appeng.api.events;
import net.minecraftforge.eventbus.api.Event;
import appeng.api.features.ILocatable;
import net.fabricmc.fabric.api.event.Event;
import net.fabricmc.fabric.api.event.EventFactory;
/**
* Input Event:
*
* <p>
* Used to Notify the Location Registry of objects, and their availability.
*/
public class LocatableEventAnnounce extends Event {
public interface LocatableEventAnnounce {
public final ILocatable target;
public final LocatableEvent change;
Event<LocatableEventAnnounce> EVENT = EventFactory.createArrayBacked(LocatableEventAnnounce.class, listeners -> (ILocatable o, LocatableEvent evt) -> {
for (LocatableEventAnnounce listener : listeners) {
listener.onLocatableAnnounce(o, evt);
}
});
public LocatableEventAnnounce(final ILocatable o, final LocatableEvent ev) {
this.target = o;
this.change = ev;
}
void onLocatableAnnounce(final ILocatable o, final LocatableEvent ev);
public enum LocatableEvent {
/**
@@ -0,0 +1,8 @@
package appeng.api.events;
@FunctionalInterface
public interface LocatableEventCallback {
void onLocatable(LocatableEventAnnounce.LocatableEvent evt);
}
@@ -25,7 +25,7 @@ package appeng.api.features;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Identifier;
public interface IMatterCannonAmmoRegistry {
@@ -45,7 +45,7 @@ public interface IMatterCannonAmmoRegistry {
* @param ammoTag item tag id
* @param weight atomic weight
*/
void registerAmmoTag(ResourceLocation ammoTag, double weight);
void registerAmmoTag(Identifier ammoTag, double weight);
/**
* get the penetration value for a particular ammo, 0 indicates a non-ammo.
@@ -27,7 +27,6 @@ import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.capabilities.Capability;
import appeng.api.config.TunnelType;
@@ -48,8 +47,6 @@ public interface IP2PTunnelRegistry {
void addNewAttunement(@Nonnull String ModId, @Nullable TunnelType type);
void addNewAttunement(@Nonnull Capability<?> cap, @Nullable TunnelType type);
/**
* returns null if no attunement can be found.
*
@@ -23,19 +23,16 @@
package appeng.api.features;
import net.minecraft.util.ResourceLocation;
import net.minecraft.world.IWorld;
import net.minecraft.world.dimension.Dimension;
import net.minecraft.util.Identifier;
import net.minecraft.world.ServerWorldAccess;
public interface IWorldGen {
void disableWorldGenForProviderID(WorldGenType type, Class<? extends Dimension> provider);
void enableWorldGenForDimension(WorldGenType type, Identifier dimID);
void enableWorldGenForDimension(WorldGenType type, ResourceLocation dimID);
void disableWorldGenForDimension(WorldGenType type, Identifier dimID);
void disableWorldGenForDimension(WorldGenType type, ResourceLocation dimID);
boolean isWorldGenEnabled(WorldGenType type, IWorld w);
boolean isWorldGenEnabled(WorldGenType type, ServerWorldAccess w);
enum WorldGenType {
CERTUS_QUARTZ, CHARGED_CERTUS_QUARTZ, METEORITES
@@ -23,7 +23,7 @@
package appeng.api.implementations;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.block.entity.BlockEntity;
import appeng.api.config.Upgrades;
import appeng.api.implementations.tiles.ISegmentedInventory;
@@ -41,5 +41,5 @@ public interface IUpgradeableHost extends IConfigurableObject, ISegmentedInvento
*
* @return tile entity
*/
TileEntity getTile();
BlockEntity getTile();
}
@@ -23,7 +23,7 @@
package appeng.api.implementations.guiobjects;
import net.minecraftforge.items.IItemHandler;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import appeng.api.networking.IGridHost;
@@ -33,5 +33,5 @@ import appeng.api.networking.IGridHost;
public interface INetworkTool extends IGuiItemObject {
IGridHost getGridHost(); // null for most purposes.
IItemHandler getInventory();
ItemTransferable getInventory();
}
@@ -23,7 +23,7 @@
package appeng.api.implementations.tiles;
import net.minecraftforge.items.IItemHandler;
import alexiil.mc.lib.attributes.item.ItemTransferable;
public interface ISegmentedInventory {
@@ -36,5 +36,5 @@ public interface ISegmentedInventory {
*
* @return inventory with inventory name
*/
IItemHandler getInventoryByName(String name);
ItemTransferable getInventoryByName(String name);
}
@@ -23,7 +23,7 @@
package appeng.api.implementations.tiles;
import net.minecraftforge.items.IItemHandler;
import alexiil.mc.lib.attributes.item.ItemTransferable;
public interface IViewCellStorage {
@@ -32,5 +32,5 @@ public interface IViewCellStorage {
*
* @return inventory with at least 5 slot
*/
IItemHandler getViewCellStorage();
ItemTransferable getViewCellStorage();
}
@@ -23,7 +23,7 @@
package appeng.api.movable;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
@@ -38,7 +38,7 @@ public interface IMovableHandler {
*
* @return true if it can handle moving
*/
boolean canHandle(Class<? extends TileEntity> myClass, TileEntity tile);
boolean canHandle(Class<? extends BlockEntity> myClass, BlockEntity tile);
/**
* request that the handler move the the tile from its current location to the
@@ -64,5 +64,5 @@ public interface IMovableHandler {
* @param world world of tile
* @param newPosition the new location
*/
void moveTile(TileEntity tile, World world, BlockPos newPosition);
void moveTile(BlockEntity tile, World world, BlockPos newPosition);
}
@@ -24,7 +24,7 @@
package appeng.api.movable;
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.block.entity.BlockEntity;
/**
* Used to determine if a tile is marked as movable, a block will be considered
@@ -36,7 +36,7 @@ import net.minecraft.tileentity.TileEntity;
* 2. The Tile implements IMovableTile
*
* 3. A IMovableHandler is register that returns canHandle = true for the
* {@link TileEntity} subclass
* {@link BlockEntity} subclass
*
*
* The movement process is as follows,
@@ -72,21 +72,21 @@ public interface IMovableRegistry {
* If you tile is handled with IMovableHandler or IMovableTile you do not need
* to white list it.
*/
void whiteListTileEntity(Class<? extends TileEntity> c);
void whiteListTileEntity(Class<? extends BlockEntity> c);
/**
* @param te to be moved tile entity
*
* @return true if the tile has accepted your request to move it
*/
boolean askToMove(TileEntity te);
boolean askToMove(BlockEntity te);
/**
* tells the tile you are done moving it.
*
* @param te moved tile entity
*/
void doneMoving(TileEntity te);
void doneMoving(BlockEntity te);
/**
* add a new handler movable handler.
@@ -105,7 +105,7 @@ public interface IMovableRegistry {
*
* @return moving handler of tile entity
*/
IMovableHandler getHandler(TileEntity te);
IMovableHandler getHandler(BlockEntity te);
/**
* @return a copy of the default handler
@@ -26,14 +26,14 @@ package appeng.api.networking;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.block.entity.BlockEntity;
import appeng.api.parts.IPart;
import appeng.api.util.AECableType;
import appeng.api.util.AEPartLocation;
/**
* Implement to create a networked {@link TileEntity} or {@link IPart} must be
* Implement to create a networked {@link BlockEntity} or {@link IPart} must be
* implemented for a part, or tile entity to become part of a grid.
*/
public interface IGridHost {
@@ -28,7 +28,7 @@ import java.util.EnumSet;
import javax.annotation.Nonnull;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.world.IWorld;
import net.minecraft.world.WorldAccess;
import appeng.api.IAppEngApi;
import appeng.api.util.AEPartLocation;
@@ -89,7 +89,7 @@ public interface IGridNode {
* @return the world the node is located in
*/
@Nonnull
IWorld getWorld();
WorldAccess getWorld();
/**
* @return a set of the connected sides, INTERNAL represents an invisible
@@ -23,7 +23,7 @@
package appeng.api.networking.crafting;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.networking.security.IActionSource;
import appeng.api.networking.storage.IBaseMonitor;
@@ -54,5 +54,5 @@ public interface ICraftingCPU extends IBaseMonitor<IAEItemStack> {
/**
* @return a null or the name of the cpu.
*/
ITextComponent getName();
Text getName();
}
@@ -26,7 +26,7 @@ package appeng.api.parts;
import java.io.IOException;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import appeng.api.util.AEPartLocation;
@@ -75,7 +75,7 @@ public interface IFacadeContainer {
*
* @throws IOException
*/
boolean readFromStream(PacketBuffer data) throws IOException;
boolean readFromStream(PacketByteBuf data) throws IOException;
/**
* read from NBT
@@ -91,7 +91,7 @@ public interface IFacadeContainer {
*
* @throws IOException
*/
void writeToStream(PacketBuffer data) throws IOException;
void writeToStream(PacketByteBuf data) throws IOException;
/**
* @return true if there are no facades.
+14 -30
View File
@@ -29,27 +29,24 @@ import java.util.Random;
import javax.annotation.Nonnull;
import com.mojang.blaze3d.matrix.MatrixStack;
import alexiil.mc.lib.attributes.AttributeList;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.client.render.VertexConsumerProvider;
import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.PacketBuffer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.network.PacketByteBuf;
import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.BlockView;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.client.model.data.EmptyModelData;
import net.minecraftforge.client.model.data.IModelData;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.util.LazyOptional;
import appeng.api.networking.IGridNode;
import appeng.api.util.AECableType;
@@ -80,8 +77,8 @@ public interface IPart extends ICustomCableConnection {
* part has to return true for {@link #requireDynamicRender()} in order for this
* method to be called.
*/
@OnlyIn(Dist.CLIENT)
default void renderDynamic(float partialTicks, MatrixStack matrixStack, IRenderTypeBuffer buffers,
@Environment(EnvType.CLIENT)
default void renderDynamic(float partialTicks, MatrixStack matrixStack, VertexConsumerProvider buffers,
int combinedLightIn, int combinedOverlayIn) {
}
@@ -155,7 +152,7 @@ public interface IPart extends ICustomCableConnection {
*
* @throws IOException
*/
void writeToStream(PacketBuffer data) throws IOException;
void writeToStream(PacketByteBuf data) throws IOException;
/**
* read data from bus packet.
@@ -166,7 +163,7 @@ public interface IPart extends ICustomCableConnection {
*
* @throws IOException
*/
boolean readFromStream(PacketBuffer data) throws IOException;
boolean readFromStream(PacketByteBuf data) throws IOException;
/**
* get the Grid Node for the Bus, be sure your IGridBlock is NOT
@@ -209,7 +206,7 @@ public interface IPart extends ICustomCableConnection {
* @param host part side
* @param tile tile entity of part
*/
void setPartHostInfo(AEPartLocation side, IPartHost host, TileEntity tile);
void setPartHostInfo(AEPartLocation side, IPartHost host, BlockEntity tile);
/**
* Called when you right click the part, very similar to Block.onActivateBlock
@@ -345,24 +342,11 @@ public interface IPart extends ICustomCableConnection {
* capabilities on the cable bus will be forwarded to parts on the appropriate
* side.
*
* @see TileEntity#getCapability(Capability, net.minecraft.util.math.Direction)
* @see alexiil.mc.lib.attributes.AttributeProvider
*
* @return The capability or null.
*/
default <T> LazyOptional<T> getCapability(Capability<T> capabilityClass) {
return LazyOptional.empty();
}
/**
* Additional model data to be passed to the models for rendering this part.
*
* @return The model data to pass to the model. Only useful if custom models are
* used.
*/
@Nonnull
default IModelData getModelData() {
return EmptyModelData.INSTANCE;
}
default void addAllAttributes(AttributeList<?> to) {}
/**
* add your collision information to the the list.
@@ -27,7 +27,7 @@ import java.util.Set;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.util.math.Direction;
import net.minecraft.util.Hand;
import net.minecraft.util.math.Vec3d;
@@ -118,7 +118,7 @@ public interface IPartHost extends ICustomCableConnection {
* @return the tile entity for the host, this can either be an FMP tile, or a AE
* tile
*/
TileEntity getTile();
BlockEntity getTile();
/**
* @return the color of the host type ( this is determined by the middle cable.
@@ -28,10 +28,10 @@ import java.util.List;
import javax.annotation.Nonnull;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Identifier;
/**
* A container to store a collection of {@link ResourceLocation} as models for a
* A container to store a collection of {@link Identifier} as models for a
* part as well as other properties.
*/
public interface IPartModel {
@@ -49,12 +49,12 @@ public interface IPartModel {
}
/**
* A collection of {@link ResourceLocation} used as models for a part.
* A collection of {@link Identifier} used as models for a part.
*
* @return a collection of models, never null.
*/
@Nonnull
default List<ResourceLocation> getModels() {
default List<Identifier> getModels() {
return Collections.emptyList();
}
@@ -21,7 +21,7 @@ package appeng.api.parts;
import java.util.Arrays;
import java.util.Collection;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.Identifier;
import appeng.api.AEInjectable;
@@ -41,12 +41,12 @@ public interface IPartModels {
* This method must be called during the pre-init phase (as part of your
* plugin's constructor).
*/
void registerModels(Collection<ResourceLocation> partModels);
void registerModels(Collection<Identifier> partModels);
/**
* Convenience overload of {@link #registerModels(Collection)}
*/
default void registerModels(ResourceLocation... partModels) {
default void registerModels(Identifier... partModels) {
registerModels(Arrays.asList(partModels));
}
}
@@ -25,8 +25,8 @@ package appeng.api.parts;
import java.util.Set;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.block.entity.BlockEntityType;
import net.minecraft.util.math.Direction;
import appeng.api.util.AEPartLocation;
@@ -38,10 +38,10 @@ import appeng.api.util.AEPartLocation;
*
* TODO: Consider removing and replacing with capabilities.
*/
public abstract class LayerBase extends TileEntity // implements IPartHost
public abstract class LayerBase extends BlockEntity // implements IPartHost
{
public LayerBase(TileEntityType<?> tileEntityTypeIn) {
public LayerBase(BlockEntityType<?> tileEntityTypeIn) {
super(tileEntityTypeIn);
// TODO Auto-generated constructor stub
}
@@ -23,9 +23,9 @@ import java.util.List;
import javax.annotation.Nullable;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import net.minecraft.world.dimension.DimensionType;
import net.minecraft.world.server.ServerWorld;
import net.minecraft.server.world.ServerWorld;
public interface ISpatialDimension {
ServerWorld getWorld(DimensionType cellDim);
@@ -45,6 +45,6 @@ public interface ISpatialDimension {
* Adds a user-facing tooltip that describes this dimension so that a player can
* keep storage cells apart.
*/
void addCellDimensionTooltip(DimensionType cellDim, List<ITextComponent> lines);
void addCellDimensionTooltip(DimensionType cellDim, List<Text> lines);
}
@@ -30,8 +30,7 @@ import javax.annotation.Nullable;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.fluids.FluidStack;
import net.minecraft.network.PacketByteBuf;
import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IItemList;
@@ -92,7 +91,7 @@ public interface IStorageChannel<T extends IAEStack<T>> {
* @throws IOException
*/
@Nullable
T readFromPacket(@Nonnull PacketBuffer input);
T readFromPacket(@Nonnull PacketByteBuf input);
/**
* create from nbt data
@@ -23,8 +23,8 @@
package appeng.api.storage.cells;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
import appeng.api.config.FuzzyMode;
import appeng.api.storage.IMEInventory;
@@ -50,12 +50,12 @@ public interface ICellInventory<T extends IAEStack<T>> extends IMEInventory<T> {
/**
* @return access configured list
*/
IItemHandler getConfigInventory();
ItemTransferable getConfigInventory();
/**
* @return access installed upgrades.
*/
IItemHandler getUpgradesInventory();
ItemTransferable getUpgradesInventory();
/**
* @return How many bytes are used for each type?
@@ -23,8 +23,8 @@
package appeng.api.storage.cells;
import alexiil.mc.lib.attributes.item.ItemTransferable;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.IItemHandler;
import appeng.api.config.FuzzyMode;
@@ -47,7 +47,7 @@ public interface ICellWorkbenchItem {
*
* onInventoryChange will be called when saving is needed.
*/
IItemHandler getUpgradesInventory(ItemStack is);
ItemTransferable getUpgradesInventory(ItemStack is);
/**
* Used to extract, or mirror the contents of the work bench onto the cell.
@@ -56,7 +56,7 @@ public interface ICellWorkbenchItem {
*
* onInventoryChange will be called when saving is needed.
*/
IItemHandler getConfigInventory(ItemStack is);
ItemTransferable getConfigInventory(ItemStack is);
/**
* @return the current fuzzy status.
@@ -23,8 +23,8 @@
package appeng.api.storage.data;
import alexiil.mc.lib.attributes.fluid.volume.FluidVolume;
import net.minecraft.fluid.Fluid;
import net.minecraftforge.fluids.FluidStack;
/**
* An alternate version of FluidStack for AE to keep tabs on things easier, and
@@ -45,7 +45,7 @@ public interface IAEFluidStack extends IAEStack<IAEFluidStack> {
*
* @return new FluidStack
*/
FluidStack getFluidStack();
FluidVolume getFluidStack();
/**
* Combines two IAEItemStacks via addition.
@@ -27,7 +27,7 @@ import java.io.IOException;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.PacketBuffer;
import net.minecraft.network.PacketByteBuf;
import appeng.api.config.FuzzyMode;
import appeng.api.storage.IStorageChannel;
@@ -162,7 +162,7 @@ public interface IAEStack<T extends IAEStack<T>> {
*
* @throws IOException
*/
void writeToPacket(PacketBuffer data);
void writeToPacket(PacketByteBuf data);
/**
* Clone the Item / Fluid Stack
@@ -18,7 +18,7 @@
package appeng.api.util;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.Box;
/**
* Mutable stand in for Axis Aligned BB, this was used to prevent GC Thrashing..
@@ -35,8 +35,8 @@ public class AEAxisAlignedBB {
public double maxY;
public double maxZ;
public AxisAlignedBB getBoundingBox() {
return new AxisAlignedBB(this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ);
public Box getBoundingBox() {
return new Box(this.minX, this.minY, this.minZ, this.maxX, this.maxY, this.maxZ);
}
public AEAxisAlignedBB(final double a, final double b, final double c, final double d, final double e,
@@ -54,7 +54,7 @@ public class AEAxisAlignedBB {
return new AEAxisAlignedBB(a, b, c, d, e, f);
}
public static AEAxisAlignedBB fromBounds(final AxisAlignedBB bb) {
public static AEAxisAlignedBB fromBounds(final Box bb) {
return new AEAxisAlignedBB(bb.minX, bb.minY, bb.minZ, bb.maxX, bb.maxY, bb.maxZ);
}
}
@@ -26,8 +26,8 @@ package appeng.api.util;
import java.util.Arrays;
import java.util.List;
import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.item.DyeColor;
import net.minecraft.client.render.model.BakedQuad;
import net.minecraft.util.DyeColor;
/**
* List of all colors supported by AE, their names, and various colors for
@@ -75,25 +75,25 @@ public enum AEColor {
PINK, GRAY, LIGHT_GRAY, CYAN, PURPLE, BLUE, BROWN, GREEN, RED, BLACK);
/**
* The {@link BakedQuad#getTintIndex() tint index} that can normally be used to
* The {@link BakedQuad#getColorIndex() tint index} that can normally be used to
* get the {@link #blackVariant dark variant} of the apprioriate AE color.
*/
public static final int TINTINDEX_DARK = 1;
/**
* The {@link BakedQuad#getTintIndex() tint index} that can normally be used to
* The {@link BakedQuad#getColorIndex() tint index} that can normally be used to
* get the {@link #mediumVariant medium variant} of the apprioriate AE color.
*/
public static final int TINTINDEX_MEDIUM = 2;
/**
* The {@link BakedQuad#getTintIndex() tint index} that can normally be used to
* The {@link BakedQuad#getColorIndex() tint index} that can normally be used to
* get the {@link #whiteVariant bright variant} of the apprioriate AE color.
*/
public static final int TINTINDEX_BRIGHT = 3;
/**
* The {@link BakedQuad#getTintIndex() tint index} that can normally be used to
* The {@link BakedQuad#getColorIndex() tint index} that can normally be used to
* get a color between the {@link #mediumVariant medium} and
* {@link #whiteVariant bright variant} of the apprioriate AE color.
*/
@@ -145,7 +145,7 @@ public enum AEColor {
* Will return a variant of this color based on the given tint index.
*
* @param tintIndex A tint index as it can be used for
* {@link BakedQuad#getTintIndex()}.
* {@link BakedQuad#getColorIndex()}.
* @return The appropriate color variant, or -1.
*/
public int getVariantByTintIndex(int tintIndex) {
@@ -24,9 +24,9 @@
package appeng.api.util;
import net.minecraft.block.Block;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
public interface AEColoredItemDefinition {
@@ -41,9 +41,9 @@ public interface AEColoredItemDefinition {
Item item(AEColor color);
/**
* @return the {@link TileEntity} Class if applicable.
* @return the {@link BlockEntity} Class if applicable.
*/
Class<? extends TileEntity> entity(AEColor color);
Class<? extends BlockEntity> entity(AEColor color);
/**
* @return an {@link ItemStack} with specified quantity of this item.
@@ -23,18 +23,18 @@
package appeng.api.util;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;
import net.minecraft.world.dimension.Dimension;
import net.minecraft.world.WorldAccess;
import net.minecraft.world.dimension.DimensionType;
/**
* Represents a location in the Minecraft Universe
*/
public class DimensionalCoord extends WorldCoord {
private final IWorld world;
private final Dimension dimension;
private final WorldAccess world;
private final DimensionType dimension;
public DimensionalCoord(final DimensionalCoord coordinate) {
super(coordinate.x, coordinate.y, coordinate.z);
@@ -42,19 +42,19 @@ public class DimensionalCoord extends WorldCoord {
this.dimension = coordinate.dimension;
}
public DimensionalCoord(final TileEntity tileEntity) {
public DimensionalCoord(final BlockEntity tileEntity) {
super(tileEntity);
this.world = tileEntity.getWorld();
this.dimension = this.world.getDimension();
}
public DimensionalCoord(final IWorld world, final int x, final int y, final int z) {
public DimensionalCoord(final WorldAccess world, final int x, final int y, final int z) {
super(x, y, z);
this.world = world;
this.dimension = world.getDimension();
}
public DimensionalCoord(final IWorld world, final BlockPos pos) {
public DimensionalCoord(final WorldAccess world, final BlockPos pos) {
super(pos);
this.world = world;
this.dimension = world.getDimension();
@@ -80,11 +80,11 @@ public class DimensionalCoord extends WorldCoord {
return "dimension=" + this.dimension + ", " + super.toString();
}
public boolean isInWorld(final IWorld world) {
public boolean isInWorld(final WorldAccess world) {
return this.world == world;
}
public IWorld getWorld() {
public WorldAccess getWorld() {
return this.world;
}
@@ -25,7 +25,7 @@ package appeng.api.util;
import java.util.List;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.text.Text;
import appeng.api.storage.cells.ICellInventoryHandler;
import appeng.api.storage.data.IAEStack;
@@ -37,6 +37,6 @@ public interface IClientHelper {
* @param handler Cell handler.
* @param lines List of lines to add to.
*/
<T extends IAEStack<T>> void addCellInformation(ICellInventoryHandler<T> handler, List<ITextComponent> lines);
<T extends IAEStack<T>> void addCellInformation(ICellInventoryHandler<T> handler, List<Text> lines);
}
@@ -23,7 +23,7 @@
package appeng.api.util;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.hit.HitResult;
/**
* Implement on Tile or part to customize if the info gui opens, or an action is
@@ -31,5 +31,5 @@ import net.minecraft.util.math.RayTraceResult;
*/
public interface INetworkToolAgent {
boolean showNetworkInfo(RayTraceResult where);
boolean showNetworkInfo(HitResult where);
}
@@ -23,7 +23,7 @@
package appeng.api.util;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.block.entity.BlockEntity;
import net.minecraft.util.math.BlockPos;
/**
@@ -38,7 +38,7 @@ public class WorldCoord {
public int y;
public int z;
public WorldCoord(final TileEntity s) {
public WorldCoord(final BlockEntity s) {
this(s.getPos());
}