Code Cleanup

This commit is contained in:
yueh
2020-06-19 16:09:06 +02:00
parent fb31fab2cc
commit fe215f0a91
270 changed files with 823 additions and 671 deletions
@@ -33,16 +33,16 @@ import appeng.api.implementations.items.IAEItemPowerStorage;
/** /**
* A registry to allow mapping {@link Item}s to a specific charge rate when * A registry to allow mapping {@link Item}s to a specific charge rate when
* being placed inside a charger. * being placed inside a charger.
* *
* The registry is used in favor of an additional method for * The registry is used in favor of an additional method for
* {@link IAEItemPowerStorage} with a fixed value per item. This allows more * {@link IAEItemPowerStorage} with a fixed value per item. This allows more
* flexibility for other charger like machines to choose their own values when * flexibility for other charger like machines to choose their own values when
* needed. * needed.
* *
* There is no guarantee that this is charged per tick, it only represents the * There is no guarantee that this is charged per tick, it only represents the
* value per operation. By default this is one charging operation every 10 ticks * value per operation. By default this is one charging operation every 10 ticks
* in case of an AE2 charger. * in case of an AE2 charger.
* *
* @author yueh * @author yueh
* @version rv5 * @version rv5
* @since rv5 * @since rv5
@@ -51,10 +51,10 @@ public interface IChargerRegistry {
/** /**
* Fetch a charge rate for a specific item. * Fetch a charge rate for a specific item.
* *
* The specific item does not need to have a mapping registered at all. In this * The specific item does not need to have a mapping registered at all. In this
* case it will use a default value of 160 AE. * case it will use a default value of 160 AE.
* *
* @param item A {@link Item} implementing {@link IAEItemPowerStorage}. * @param item A {@link Item} implementing {@link IAEItemPowerStorage}.
* @return custom rate or default of 160 * @return custom rate or default of 160
*/ */
@@ -63,12 +63,12 @@ public interface IChargerRegistry {
/** /**
* Register a custom charge rate for a specific item. * Register a custom charge rate for a specific item.
* *
* Capped at 16000 to avoid extracting too much energy from a network for each * Capped at 16000 to avoid extracting too much energy from a network for each
* operation. This is done silently without any feedback or exception. Further * operation. This is done silently without any feedback or exception. Further
* the cap is not fixed, it can change at any time in the future should power * the cap is not fixed, it can change at any time in the future should power
* issues arise. * issues arise.
* *
* @param item A {@link Item} implementing {@link IAEItemPowerStorage}. * @param item A {@link Item} implementing {@link IAEItemPowerStorage}.
* @param chargeRate the custom rate, must be > 0, capped to 16000d * @param chargeRate the custom rate, must be > 0, capped to 16000d
*/ */
@@ -76,9 +76,9 @@ public interface IChargerRegistry {
/** /**
* Remove the custom rate for a specific item. * Remove the custom rate for a specific item.
* *
* It will revert to the default value afterwards. * It will revert to the default value afterwards.
* *
* @param item A {@link Item} implementing {@link IAEItemPowerStorage}. * @param item A {@link Item} implementing {@link IAEItemPowerStorage}.
*/ */
void removeChargeRate(@Nonnull Item item); void removeChargeRate(@Nonnull Item item);
@@ -25,12 +25,10 @@ package appeng.api.implementations.items;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.dimension.DimensionType; import net.minecraft.world.dimension.DimensionType;
import appeng.api.implementations.TransitionResult; import appeng.api.implementations.TransitionResult;
import appeng.api.storage.ISpatialDimension;
import appeng.api.util.WorldCoord; import appeng.api.util.WorldCoord;
/** /**
@@ -29,7 +29,6 @@ import javax.annotation.Nonnull;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.world.IWorld; import net.minecraft.world.IWorld;
import net.minecraft.world.World;
import appeng.api.IAppEngApi; import appeng.api.IAppEngApi;
import appeng.api.util.AEPartLocation; import appeng.api.util.AEPartLocation;
@@ -36,15 +36,15 @@ import appeng.api.config.Actionable;
public interface IEnergyGridProvider { public interface IEnergyGridProvider {
/** /**
* internal use only * internal use only
* *
* Can return a list of providers behind the current. * Can return a list of providers behind the current.
* *
* An example would be something acting as proxy between different * An example would be something acting as proxy between different
* {@link IEnergyGrid}s. * {@link IEnergyGrid}s.
* *
* This can contain duplicate entries, AE will ensure that each provider is only * This can contain duplicate entries, AE will ensure that each provider is only
* visited once. * visited once.
* *
* internal use only * internal use only
*/ */
@Nonnull @Nonnull
@@ -52,12 +52,12 @@ public interface IEnergyGridProvider {
/** /**
* internal use only * internal use only
* *
* Extracts the requested amount from the provider. * Extracts the requested amount from the provider.
* *
* This should never forward a call to another {@link IEnergyGridProvider}, * This should never forward a call to another {@link IEnergyGridProvider},
* instead return them via {@link IEnergyGridProvider#providers()} * instead return them via {@link IEnergyGridProvider#providers()}
* *
* @return the used amount * @return the used amount
*/ */
@Nonnegative @Nonnegative
@@ -65,12 +65,12 @@ public interface IEnergyGridProvider {
/** /**
* Injects the offered amount into the provider. * Injects the offered amount into the provider.
* *
* This should never forward a call to another {@link IEnergyGridProvider}, * This should never forward a call to another {@link IEnergyGridProvider},
* instead return them via {@link IEnergyGridProvider#providers()} * instead return them via {@link IEnergyGridProvider#providers()}
* *
* internal use only * internal use only
* *
* @return the leftover amount * @return the leftover amount
*/ */
@Nonnegative @Nonnegative
@@ -78,13 +78,13 @@ public interface IEnergyGridProvider {
/** /**
* internal use only * internal use only
* *
* Returns the current demand of an provider. * Returns the current demand of an provider.
* *
* This should never forward a call to another {@link IEnergyGridProvider}, * This should never forward a call to another {@link IEnergyGridProvider},
* instead return them via {@link IEnergyGridProvider#providers()} * instead return them via {@link IEnergyGridProvider#providers()}
* *
* *
* @param d the max amount offered, the demand should never exceed it. * @param d the max amount offered, the demand should never exceed it.
* @return the total amount demanded * @return the total amount demanded
*/ */
@@ -93,33 +93,33 @@ public interface IEnergyGridProvider {
/** /**
* internal use only * internal use only
* *
* AE currently uses this to enqueue the next visited provider. * AE currently uses this to enqueue the next visited provider.
* *
* There is no guarantee that this works on in a perfect way. It can be limited * There is no guarantee that this works on in a perfect way. It can be limited
* to the returns of the past {@link IEnergyGridProvider#providers()}, but not * to the returns of the past {@link IEnergyGridProvider#providers()}, but not
* any future one discovered by visiting further providers. * any future one discovered by visiting further providers.
* *
* E.g. inject into the the lowest one first or extract from the highest one. * E.g. inject into the the lowest one first or extract from the highest one.
* *
* @return the current stored amount. * @return the current stored amount.
* *
* *
*/ */
@Nonnegative @Nonnegative
double getProviderStoredEnergy(); double getProviderStoredEnergy();
/** /**
* internal use only * internal use only
* *
* AE currently uses this to enqueue the next visited provider. * AE currently uses this to enqueue the next visited provider.
* *
* There is no guarantee that this works on in a perfect way. It can be limited * There is no guarantee that this works on in a perfect way. It can be limited
* to the returns of the past {@link IEnergyGridProvider#providers()}, but not * to the returns of the past {@link IEnergyGridProvider#providers()}, but not
* any future one discovered by visiting further providers. * any future one discovered by visiting further providers.
* *
* E.g. inject into the the lowest one first or extract from the highest one. * E.g. inject into the the lowest one first or extract from the highest one.
* *
* @return the maximum amount stored. * @return the maximum amount stored.
*/ */
@Nonnegative @Nonnegative
@@ -23,8 +23,6 @@
package appeng.api.parts; package appeng.api.parts;
import javax.annotation.Nullable;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
//@formatter:off //@formatter:off
@@ -32,7 +32,7 @@ public interface ICellInventoryHandler<T extends IAEStack<T>> extends IMEInvento
/** /**
* Get access to the ICellInventory. Can be null for custom cells. * Get access to the ICellInventory. Can be null for custom cells.
* *
* @return get access to the Cell Inventory. * @return get access to the Cell Inventory.
*/ */
@Nullable @Nullable
@@ -33,7 +33,7 @@ import javax.annotation.Nullable;
public interface ISaveProvider { public interface ISaveProvider {
/** /**
* Cell has changed and needs to be changed. * Cell has changed and needs to be changed.
* *
* @param cellInventory can be null for custom cells. * @param cellInventory can be null for custom cells.
*/ */
void saveChanges(@Nullable ICellInventory<?> cellInventory); void saveChanges(@Nullable ICellInventory<?> cellInventory);
@@ -24,7 +24,6 @@ import javax.annotation.Nullable;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.World;
import net.minecraft.world.dimension.DimensionType; import net.minecraft.world.dimension.DimensionType;
import net.minecraft.world.server.ServerWorld; import net.minecraft.world.server.ServerWorld;
@@ -11,7 +11,7 @@ import appeng.api.storage.data.IAEStack;
public interface IClientHelper { public interface IClientHelper {
/** /**
* Add cell information to the provided list. Used for tooltip content. * Add cell information to the provided list. Used for tooltip content.
* *
* @param handler Cell handler. * @param handler Cell handler.
* @param lines List of lines to add to. * @param lines List of lines to add to.
*/ */
+2 -2
View File
@@ -30,8 +30,8 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType; import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.Rotation; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.*; import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes; import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader; import net.minecraft.world.IBlockReader;
@@ -29,7 +29,6 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType; import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
@@ -23,7 +23,6 @@ import javax.annotation.Nullable;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@@ -52,7 +52,6 @@ import net.minecraftforge.api.distmarker.OnlyIn;
import appeng.api.AEApi; import appeng.api.AEApi;
import appeng.api.util.AEAxisAlignedBB; import appeng.api.util.AEAxisAlignedBB;
import appeng.block.AEBaseTileBlock; import appeng.block.AEBaseTileBlock;
import appeng.client.render.effects.ChargedOreFX;
import appeng.client.render.effects.LightningFX; import appeng.client.render.effects.LightningFX;
import appeng.client.render.renderable.ItemRenderable; import appeng.client.render.renderable.ItemRenderable;
import appeng.client.render.tesr.ModularTESR; import appeng.client.render.tesr.ModularTESR;
@@ -29,12 +29,10 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.World; import net.minecraft.world.World;
import appeng.api.util.AEPartLocation;
import appeng.block.AEBaseTileBlock; import appeng.block.AEBaseTileBlock;
import appeng.container.ContainerLocator; import appeng.container.ContainerLocator;
import appeng.container.ContainerOpener; import appeng.container.ContainerOpener;
import appeng.container.implementations.ContainerCondenser; import appeng.container.implementations.ContainerCondenser;
import appeng.container.implementations.ContainerDrive;
import appeng.tile.misc.TileCondenser; import appeng.tile.misc.TileCondenser;
import appeng.util.Platform; import appeng.util.Platform;
@@ -34,8 +34,6 @@ import appeng.block.AEBaseTileBlock;
import appeng.container.ContainerLocator; import appeng.container.ContainerLocator;
import appeng.container.ContainerOpener; import appeng.container.ContainerOpener;
import appeng.container.implementations.ContainerInscriber; import appeng.container.implementations.ContainerInscriber;
import appeng.container.implementations.ContainerInterface;
import appeng.fluids.container.ContainerFluidLevelEmitter;
import appeng.tile.misc.TileInscriber; import appeng.tile.misc.TileInscriber;
public class BlockInscriber extends AEBaseTileBlock<TileInscriber> { public class BlockInscriber extends AEBaseTileBlock<TileInscriber> {
@@ -32,14 +32,12 @@ import net.minecraft.util.Direction;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
import appeng.api.util.IOrientable; import appeng.api.util.IOrientable;
import appeng.block.AEBaseTileBlock; import appeng.block.AEBaseTileBlock;
import appeng.container.ContainerLocator; import appeng.container.ContainerLocator;
import appeng.container.ContainerOpener; import appeng.container.ContainerOpener;
import appeng.container.implementations.ContainerDrive;
import appeng.container.implementations.ContainerInterface; import appeng.container.implementations.ContainerInterface;
import appeng.tile.misc.TileInterface; import appeng.tile.misc.TileInterface;
import appeng.util.Platform; import appeng.util.Platform;
@@ -94,6 +94,7 @@ public class BlockQuartzFixture extends AEBaseBlock implements IOrientableBlock
} }
// For reference, see WallTorchBlock // For reference, see WallTorchBlock
@Override
@Nullable @Nullable
public BlockState getStateForPlacement(BlockItemUseContext context) { public BlockState getStateForPlacement(BlockItemUseContext context) {
BlockState blockstate = super.getStateForPlacement(context); BlockState blockstate = super.getStateForPlacement(context);
@@ -29,7 +29,6 @@ import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer; import net.minecraft.state.StateContainer;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
@@ -28,21 +28,16 @@ import net.minecraft.item.ItemStack;
import net.minecraft.state.BooleanProperty; import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer; import net.minecraft.state.StateContainer;
import net.minecraft.util.ActionResultType; import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
import appeng.api.util.AEPartLocation;
import appeng.block.AEBaseTileBlock; import appeng.block.AEBaseTileBlock;
import appeng.container.ContainerLocator; import appeng.container.ContainerLocator;
import appeng.container.ContainerOpener; import appeng.container.ContainerOpener;
import appeng.container.implementations.ContainerFormationPlane;
import appeng.container.implementations.ContainerSecurityStation; import appeng.container.implementations.ContainerSecurityStation;
import appeng.tile.misc.TileSecurityStation; import appeng.tile.misc.TileSecurityStation;
import appeng.util.Platform;
public class BlockSecurityStation extends AEBaseTileBlock<TileSecurityStation> { public class BlockSecurityStation extends AEBaseTileBlock<TileSecurityStation> {
@@ -22,8 +22,6 @@ import javax.annotation.Nullable;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
@@ -35,13 +35,11 @@ import net.minecraft.util.Direction;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
import appeng.block.AEBaseTileBlock; import appeng.block.AEBaseTileBlock;
import appeng.container.ContainerLocator; import appeng.container.ContainerLocator;
import appeng.container.ContainerOpener; import appeng.container.ContainerOpener;
import appeng.container.implementations.ContainerDrive;
import appeng.container.implementations.ContainerVibrationChamber; import appeng.container.implementations.ContainerVibrationChamber;
import appeng.core.AEConfig; import appeng.core.AEConfig;
import appeng.tile.AEBaseTile; import appeng.tile.AEBaseTile;
@@ -4,7 +4,8 @@ package appeng.block.misc;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import appeng.bootstrap.*; import appeng.bootstrap.TileEntityRendering;
import appeng.bootstrap.TileEntityRenderingCustomizer;
import appeng.client.render.tesr.InscriberTESR; import appeng.client.render.tesr.InscriberTESR;
import appeng.tile.misc.TileInscriber; import appeng.tile.misc.TileInscriber;
@@ -21,7 +21,8 @@ package appeng.block.misc;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import appeng.bootstrap.*; import appeng.bootstrap.TileEntityRendering;
import appeng.bootstrap.TileEntityRenderingCustomizer;
import appeng.client.render.tesr.SkyCompassTESR; import appeng.client.render.tesr.SkyCompassTESR;
import appeng.tile.misc.TileSkyCompass; import appeng.tile.misc.TileSkyCompass;
@@ -35,15 +35,21 @@ import net.minecraft.entity.Entity;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.fluid.IFluidState; import net.minecraft.fluid.IFluidState;
import net.minecraft.item.*; import net.minecraft.item.BlockItemUseContext;
import net.minecraft.state.BooleanProperty; import net.minecraft.item.DyeColor;
import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ActionResultType; import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraft.util.math.*; import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.util.math.RayTraceResult;
import net.minecraft.util.math.RayTraceResult.Type; import net.minecraft.util.math.RayTraceResult.Type;
import net.minecraft.util.math.Vec3d;
import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes; import net.minecraft.util.math.shapes.VoxelShapes;
@@ -69,7 +75,6 @@ import appeng.parts.ICableBusContainer;
import appeng.parts.NullCableBusContainer; import appeng.parts.NullCableBusContainer;
import appeng.tile.AEBaseTile; import appeng.tile.AEBaseTile;
import appeng.tile.networking.TileCableBus; import appeng.tile.networking.TileCableBus;
import appeng.tile.networking.TileCableBusTESR;
import appeng.util.Platform; import appeng.util.Platform;
public class BlockCableBus extends AEBaseTileBlock<TileCableBus> /* FIXME implements IAEFacade */ { public class BlockCableBus extends AEBaseTileBlock<TileCableBus> /* FIXME implements IAEFacade */ {
@@ -26,7 +26,6 @@ import net.minecraft.state.StateContainer;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.IStringSerializable; import net.minecraft.util.IStringSerializable;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld; import net.minecraft.world.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
@@ -18,7 +18,6 @@
package appeng.block.networking; package appeng.block.networking;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import appeng.block.AEBaseTileBlock; import appeng.block.AEBaseTileBlock;
@@ -18,11 +18,8 @@
package appeng.block.networking; package appeng.block.networking;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import appeng.api.implementations.items.IAEItemPowerStorage;
import appeng.block.AEBaseBlockItemChargeable;
import appeng.bootstrap.BlockRenderingCustomizer; import appeng.bootstrap.BlockRenderingCustomizer;
import appeng.bootstrap.IBlockRendering; import appeng.bootstrap.IBlockRendering;
import appeng.bootstrap.IItemRendering; import appeng.bootstrap.IItemRendering;
@@ -23,7 +23,6 @@ import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.state.EnumProperty; import net.minecraft.state.EnumProperty;
import net.minecraft.state.StateContainer; import net.minecraft.state.StateContainer;
import net.minecraft.state.properties.BlockStateProperties;
import net.minecraft.util.ActionResultType; import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
@@ -35,7 +34,6 @@ import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes; import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader; import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
import appeng.block.AEBaseTileBlock; import appeng.block.AEBaseTileBlock;
@@ -24,13 +24,11 @@ import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.ILightReader; import net.minecraft.world.ILightReader;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import appeng.api.util.AEColor; import appeng.api.util.AEColor;
import appeng.client.render.cablebus.CableBusRenderState;
import appeng.parts.CableBusContainer; import appeng.parts.CableBusContainer;
import appeng.tile.networking.TileCableBus; import appeng.tile.networking.TileCableBus;
@@ -24,8 +24,6 @@ import net.minecraftforge.api.distmarker.OnlyIn;
import appeng.bootstrap.BlockRenderingCustomizer; import appeng.bootstrap.BlockRenderingCustomizer;
import appeng.bootstrap.IBlockRendering; import appeng.bootstrap.IBlockRendering;
import appeng.bootstrap.IItemRendering; import appeng.bootstrap.IItemRendering;
import appeng.client.render.cablebus.CableBusModel;
import appeng.core.features.registries.PartModels;
/** /**
* Customizes the rendering behavior for cable busses, which are the biggest * Customizes the rendering behavior for cable busses, which are the biggest
@@ -14,12 +14,10 @@ import com.google.common.collect.ImmutableList;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.model.BakedQuad; import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.ItemOverrideList; import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.model.Material; import net.minecraft.client.renderer.model.Material;
import net.minecraft.client.renderer.texture.AtlasTexture; import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.data.IDynamicBakedModel; import net.minecraftforge.client.model.data.IDynamicBakedModel;
@@ -7,7 +7,12 @@ import java.util.function.Function;
import com.mojang.datafixers.util.Pair; import com.mojang.datafixers.util.Pair;
import net.minecraft.client.renderer.model.*; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.IModelTransform;
import net.minecraft.client.renderer.model.IUnbakedModel;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.model.Material;
import net.minecraft.client.renderer.model.ModelBakery;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.IModelConfiguration; import net.minecraftforge.client.model.IModelConfiguration;
@@ -22,14 +22,12 @@ import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.state.BooleanProperty; import net.minecraft.state.BooleanProperty;
import net.minecraft.state.StateContainer; import net.minecraft.state.StateContainer;
import net.minecraft.util.Direction;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.shapes.VoxelShape;
import net.minecraft.util.math.shapes.VoxelShapes; import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader; import net.minecraft.world.IBlockReader;
import net.minecraft.world.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
import appeng.block.AEBaseTileBlock; import appeng.block.AEBaseTileBlock;
@@ -18,15 +18,11 @@
package appeng.block.qnb; package appeng.block.qnb;
import java.util.Collections;
import java.util.List;
import java.util.Random; import java.util.Random;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType; import net.minecraft.util.ActionResultType;
@@ -40,7 +36,6 @@ import net.minecraft.util.math.shapes.VoxelShapes;
import net.minecraft.world.IBlockReader; import net.minecraft.world.IBlockReader;
import net.minecraft.world.World; import net.minecraft.world.World;
import appeng.api.util.AEPartLocation;
import appeng.client.EffectType; import appeng.client.EffectType;
import appeng.container.ContainerLocator; import appeng.container.ContainerLocator;
import appeng.container.ContainerOpener; import appeng.container.ContainerOpener;
@@ -1,7 +1,11 @@
package appeng.block.qnb; package appeng.block.qnb;
import java.util.*; import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Random;
import java.util.Set;
import java.util.function.Function; import java.util.function.Function;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -7,7 +7,12 @@ import java.util.function.Function;
import com.mojang.datafixers.util.Pair; import com.mojang.datafixers.util.Pair;
import net.minecraft.client.renderer.model.*; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.IModelTransform;
import net.minecraft.client.renderer.model.IUnbakedModel;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.model.Material;
import net.minecraft.client.renderer.model.ModelBakery;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.IModelConfiguration; import net.minecraftforge.client.model.IModelConfiguration;
@@ -18,9 +18,6 @@
package appeng.block.spatial; package appeng.block.spatial;
import java.util.Collections;
import java.util.List;
import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
@@ -30,7 +27,6 @@ import net.minecraft.entity.Entity;
import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemGroup;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.shapes.ISelectionContext;
import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.shapes.VoxelShape;
@@ -31,12 +31,10 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.World; import net.minecraft.world.World;
import appeng.api.util.AEPartLocation;
import appeng.block.AEBaseTileBlock; import appeng.block.AEBaseTileBlock;
import appeng.container.ContainerLocator; import appeng.container.ContainerLocator;
import appeng.container.ContainerOpener; import appeng.container.ContainerOpener;
import appeng.container.implementations.ContainerSpatialIOPort; import appeng.container.implementations.ContainerSpatialIOPort;
import appeng.fluids.container.ContainerFluidLevelEmitter;
import appeng.tile.spatial.TileSpatialIOPort; import appeng.tile.spatial.TileSpatialIOPort;
import appeng.util.Platform; import appeng.util.Platform;
@@ -28,21 +28,17 @@ import net.minecraft.item.ItemStack;
import net.minecraft.state.EnumProperty; import net.minecraft.state.EnumProperty;
import net.minecraft.state.StateContainer; import net.minecraft.state.StateContainer;
import net.minecraft.util.ActionResultType; import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction;
import net.minecraft.util.Hand; import net.minecraft.util.Hand;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.BlockRayTraceResult;
import net.minecraft.world.IWorld;
import net.minecraft.world.World; import net.minecraft.world.World;
import appeng.block.AEBaseTileBlock; import appeng.block.AEBaseTileBlock;
import appeng.container.ContainerLocator; import appeng.container.ContainerLocator;
import appeng.container.ContainerOpener; import appeng.container.ContainerOpener;
import appeng.container.implementations.ContainerChest; import appeng.container.implementations.ContainerChest;
import appeng.container.implementations.ContainerQNB;
import appeng.core.localization.PlayerMessages; import appeng.core.localization.PlayerMessages;
import appeng.tile.storage.TileChest; import appeng.tile.storage.TileChest;
import appeng.util.Platform;
public class BlockChest extends AEBaseTileBlock<TileChest> { public class BlockChest extends AEBaseTileBlock<TileChest> {
@@ -33,7 +33,6 @@ import appeng.block.AEBaseTileBlock;
import appeng.container.ContainerLocator; import appeng.container.ContainerLocator;
import appeng.container.ContainerOpener; import appeng.container.ContainerOpener;
import appeng.container.implementations.ContainerDrive; import appeng.container.implementations.ContainerDrive;
import appeng.container.implementations.ContainerQuartzKnife;
import appeng.tile.storage.TileDrive; import appeng.tile.storage.TileDrive;
import appeng.util.Platform; import appeng.util.Platform;
@@ -35,7 +35,6 @@ import appeng.block.AEBaseTileBlock;
import appeng.container.ContainerLocator; import appeng.container.ContainerLocator;
import appeng.container.ContainerOpener; import appeng.container.ContainerOpener;
import appeng.container.implementations.ContainerIOPort; import appeng.container.implementations.ContainerIOPort;
import appeng.fluids.container.ContainerFluidInterface;
import appeng.tile.storage.TileIOPort; import appeng.tile.storage.TileIOPort;
import appeng.util.Platform; import appeng.util.Platform;
@@ -23,7 +23,6 @@ import javax.annotation.Nullable;
import net.minecraft.block.BlockRenderType; import net.minecraft.block.BlockRenderType;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResultType; import net.minecraft.util.ActionResultType;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
@@ -21,7 +21,6 @@ package appeng.block.storage;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import appeng.api.implementations.tiles.IChestOrDrive; import appeng.api.implementations.tiles.IChestOrDrive;
@@ -25,10 +25,6 @@ import net.minecraft.block.Block;
import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.IUnbakedModel;
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.tileentity.TileEntityType;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
@@ -31,7 +31,6 @@ import java.util.function.Supplier;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.IUnbakedModel;
import net.minecraft.entity.Entity; import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityClassification; import net.minecraft.entity.EntityClassification;
import net.minecraft.entity.EntityType; import net.minecraft.entity.EntityType;
@@ -19,16 +19,11 @@
package appeng.bootstrap; package appeng.bootstrap;
import java.util.function.BiFunction; import java.util.function.BiFunction;
import java.util.function.Function;
import java.util.function.Predicate; import java.util.function.Predicate;
import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.IUnbakedModel;
import net.minecraft.client.renderer.model.ModelResourceLocation;
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
@@ -18,8 +18,6 @@
package appeng.bootstrap; package appeng.bootstrap;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.model.ModelResourceLocation;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@@ -21,7 +21,6 @@ package appeng.bootstrap.components;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraftforge.api.distmarker.Dist;
public class BlockColorComponent implements IInitComponent { public class BlockColorComponent implements IInitComponent {
@@ -1,7 +1,6 @@
package appeng.bootstrap.components; package appeng.bootstrap.components;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType; import net.minecraft.entity.EntityType;
import net.minecraftforge.registries.IForgeRegistry; import net.minecraftforge.registries.IForgeRegistry;
@@ -18,8 +18,6 @@
package appeng.bootstrap.components; package appeng.bootstrap.components;
import net.minecraftforge.api.distmarker.Dist;
import appeng.bootstrap.IBootstrapComponent; import appeng.bootstrap.IBootstrapComponent;
@FunctionalInterface @FunctionalInterface
@@ -1,7 +1,6 @@
package appeng.bootstrap.components; package appeng.bootstrap.components;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.item.crafting.IRecipeSerializer; import net.minecraft.item.crafting.IRecipeSerializer;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.registries.IForgeRegistry; import net.minecraftforge.registries.IForgeRegistry;
@@ -41,6 +41,7 @@ public class ModelOverrideComponent implements IModelBakeComponent {
this.customizer.put(resourcePath, customizer); this.customizer.put(resourcePath, customizer);
} }
@Override
public void onModelBakeEvent(final ModelBakeEvent event) { public void onModelBakeEvent(final ModelBakeEvent event) {
Map<ResourceLocation, IBakedModel> modelRegistry = event.getModelRegistry(); Map<ResourceLocation, IBakedModel> modelRegistry = event.getModelRegistry();
Set<ResourceLocation> keys = Sets.newHashSet(modelRegistry.keySet()); Set<ResourceLocation> keys = Sets.newHashSet(modelRegistry.keySet());
@@ -18,8 +18,6 @@
package appeng.bootstrap.components; package appeng.bootstrap.components;
import net.minecraft.block.Block;
import net.minecraft.client.Minecraft;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import appeng.bootstrap.IModelRegistry; import appeng.bootstrap.IModelRegistry;
@@ -22,8 +22,6 @@ import java.util.function.Consumer;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import appeng.tile.AEBaseTile;
/** /**
* @author GuntherDW * @author GuntherDW
*/ */
@@ -22,7 +22,6 @@ import java.util.List;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import net.minecraft.world.World;
import net.minecraft.world.dimension.DimensionType; import net.minecraft.world.dimension.DimensionType;
import net.minecraft.world.server.ServerWorld; import net.minecraft.world.server.ServerWorld;
@@ -18,7 +18,10 @@
package appeng.client; package appeng.client;
import java.util.*; import java.util.Collections;
import java.util.EnumMap;
import java.util.List;
import java.util.Random;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.settings.KeyBinding; import net.minecraft.client.settings.KeyBinding;
@@ -33,12 +36,13 @@ import net.minecraftforge.client.event.InputEvent;
import net.minecraftforge.client.event.RenderLivingEvent; import net.minecraftforge.client.event.RenderLivingEvent;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.client.registry.ClientRegistry; import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import appeng.api.parts.CableRenderMode; import appeng.api.parts.CableRenderMode;
import appeng.block.AEBaseBlock; import appeng.block.AEBaseBlock;
import appeng.client.render.effects.*; import appeng.client.render.effects.EnergyFx;
import appeng.client.render.effects.LightningArcFX;
import appeng.client.render.effects.LightningFX;
import appeng.client.render.effects.VibrantFX;
import appeng.core.AEConfig; import appeng.core.AEConfig;
import appeng.core.AppEng; import appeng.core.AppEng;
import appeng.core.sync.network.NetworkHandler; import appeng.core.sync.network.NetworkHandler;
+15 -2
View File
@@ -18,7 +18,11 @@
package appeng.client.gui; package appeng.client.gui;
import java.util.*; import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
@@ -63,8 +67,17 @@ import appeng.client.me.SlotDisconnected;
import appeng.client.me.SlotME; import appeng.client.me.SlotME;
import appeng.client.render.StackSizeRenderer; import appeng.client.render.StackSizeRenderer;
import appeng.container.AEBaseContainer; import appeng.container.AEBaseContainer;
import appeng.container.slot.*; import appeng.container.slot.AppEngCraftingSlot;
import appeng.container.slot.AppEngSlot;
import appeng.container.slot.AppEngSlot.CalculatedValidity; import appeng.container.slot.AppEngSlot.CalculatedValidity;
import appeng.container.slot.IOptionalSlot;
import appeng.container.slot.SlotCraftingTerm;
import appeng.container.slot.SlotDisabled;
import appeng.container.slot.SlotFake;
import appeng.container.slot.SlotInaccessible;
import appeng.container.slot.SlotOutput;
import appeng.container.slot.SlotPatternTerm;
import appeng.container.slot.SlotRestrictedInput;
import appeng.core.AELog; import appeng.core.AELog;
import appeng.core.AppEng; import appeng.core.AppEng;
import appeng.core.sync.network.NetworkHandler; import appeng.core.sync.network.NetworkHandler;
@@ -23,7 +23,6 @@ import java.util.List;
import java.util.Locale; import java.util.Locale;
import net.minecraft.entity.player.PlayerInventory; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Container;
import net.minecraft.inventory.container.Slot; import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
@@ -13,7 +13,11 @@ import appeng.api.definitions.IDefinitions;
import appeng.api.definitions.IParts; import appeng.api.definitions.IParts;
import appeng.client.gui.AEBaseGui; import appeng.client.gui.AEBaseGui;
import appeng.client.gui.widgets.GuiTabButton; import appeng.client.gui.widgets.GuiTabButton;
import appeng.container.implementations.*; import appeng.container.implementations.ContainerChest;
import appeng.container.implementations.ContainerCraftingTerm;
import appeng.container.implementations.ContainerMEMonitorable;
import appeng.container.implementations.ContainerPatternTerm;
import appeng.container.implementations.ContainerWirelessTerm;
import appeng.core.sync.network.NetworkHandler; import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketSwitchGuis; import appeng.core.sync.packets.PacketSwitchGuis;
import appeng.helpers.IPriorityHost; import appeng.helpers.IPriorityHost;
@@ -18,7 +18,6 @@
package appeng.client.gui.implementations; package appeng.client.gui.implementations;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.entity.player.PlayerInventory; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import net.minecraftforge.fml.client.gui.GuiUtils; import net.minecraftforge.fml.client.gui.GuiUtils;
@@ -22,14 +22,11 @@
package appeng.client.gui.implementations; package appeng.client.gui.implementations;
import java.io.IOException;
import net.minecraft.client.gui.widget.button.Button; import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.entity.player.PlayerInventory; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import appeng.container.implementations.ContainerCraftingStatus; import appeng.container.implementations.ContainerCraftingStatus;
import appeng.core.AELog;
import appeng.core.localization.GuiText; import appeng.core.localization.GuiText;
import appeng.core.sync.network.NetworkHandler; import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketValueConfig; import appeng.core.sync.packets.PacketValueConfig;
@@ -23,9 +23,7 @@ import net.minecraft.inventory.container.Slot;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import appeng.api.config.ActionItems; import appeng.api.config.ActionItems;
import appeng.api.config.Settings;
import appeng.client.gui.widgets.GuiActionButton; import appeng.client.gui.widgets.GuiActionButton;
import appeng.client.gui.widgets.GuiSettingToggleButton;
import appeng.container.implementations.ContainerCraftingTerm; import appeng.container.implementations.ContainerCraftingTerm;
import appeng.container.slot.SlotCraftingMatrix; import appeng.container.slot.SlotCraftingMatrix;
import appeng.core.localization.GuiText; import appeng.core.localization.GuiText;
@@ -18,7 +18,14 @@
package appeng.client.gui.implementations; package appeng.client.gui.implementations;
import java.util.*; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.WeakHashMap;
import com.google.common.collect.HashMultimap; import com.google.common.collect.HashMultimap;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
@@ -27,9 +27,13 @@ import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.container.Slot; import net.minecraft.inventory.container.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.api.config.*; import appeng.api.config.SearchBoxMode;
import appeng.api.config.Settings;
import appeng.api.config.SortDir;
import appeng.api.config.SortOrder;
import appeng.api.config.TerminalStyle;
import appeng.api.config.ViewItems;
import appeng.api.implementations.guiobjects.IPortableCell; import appeng.api.implementations.guiobjects.IPortableCell;
import appeng.api.implementations.tiles.IMEChest; import appeng.api.implementations.tiles.IMEChest;
import appeng.api.implementations.tiles.IViewCellStorage; import appeng.api.implementations.tiles.IViewCellStorage;
@@ -21,7 +21,6 @@ package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import appeng.api.implementations.guiobjects.IPortableCell;
import appeng.container.implementations.ContainerMEPortableCell; import appeng.container.implementations.ContainerMEPortableCell;
public class GuiMEPortableCell extends GuiMEMonitorable<ContainerMEPortableCell> { public class GuiMEPortableCell extends GuiMEMonitorable<ContainerMEPortableCell> {
@@ -21,7 +21,11 @@ package appeng.client.gui.implementations;
import net.minecraft.entity.player.PlayerInventory; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import appeng.api.config.*; import appeng.api.config.AccessRestriction;
import appeng.api.config.ActionItems;
import appeng.api.config.FuzzyMode;
import appeng.api.config.Settings;
import appeng.api.config.StorageFilter;
import appeng.client.gui.widgets.GuiActionButton; import appeng.client.gui.widgets.GuiActionButton;
import appeng.client.gui.widgets.GuiServerSettingToggleButton; import appeng.client.gui.widgets.GuiServerSettingToggleButton;
import appeng.client.gui.widgets.GuiSettingToggleButton; import appeng.client.gui.widgets.GuiSettingToggleButton;
@@ -22,12 +22,9 @@ import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import net.minecraftforge.fml.client.gui.GuiUtils; import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.api.config.Settings;
import appeng.client.gui.AEBaseGui; import appeng.client.gui.AEBaseGui;
import appeng.client.gui.widgets.CommonButtons; import appeng.client.gui.widgets.CommonButtons;
import appeng.client.gui.widgets.GuiSettingToggleButton;
import appeng.container.implementations.ContainerWireless; import appeng.container.implementations.ContainerWireless;
import appeng.core.AEConfig;
import appeng.core.localization.GuiText; import appeng.core.localization.GuiText;
import appeng.util.Platform; import appeng.util.Platform;
@@ -1,8 +1,6 @@
package appeng.client.gui.widgets; package appeng.client.gui.widgets;
import appeng.api.config.FuzzyMode;
import appeng.api.config.PowerUnits; import appeng.api.config.PowerUnits;
import appeng.api.config.RedstoneMode;
import appeng.api.config.Settings; import appeng.api.config.Settings;
import appeng.core.AEConfig; import appeng.core.AEConfig;
@@ -18,22 +18,10 @@
package appeng.client.gui.widgets; package appeng.client.gui.widgets;
import java.util.EnumMap;
import java.util.HashMap;
import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import com.mojang.blaze3d.systems.RenderSystem; import appeng.api.config.ActionItems;
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.text.ITextComponent;
import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.api.config.*;
import appeng.core.localization.ButtonToolTips; import appeng.core.localization.ButtonToolTips;
public class GuiActionButton extends GuiIconButton implements ITooltip { public class GuiActionButton extends GuiIconButton implements ITooltip {
@@ -18,22 +18,14 @@
package appeng.client.gui.widgets; package appeng.client.gui.widgets;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.button.Button; import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraftforge.fml.client.gui.GuiUtils; import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.api.config.*;
import appeng.core.localization.ButtonToolTips;
public abstract class GuiIconButton extends Button implements ITooltip { public abstract class GuiIconButton extends Button implements ITooltip {
public static final ResourceLocation TEXTURE_STATES = new ResourceLocation("appliedenergistics2", public static final ResourceLocation TEXTURE_STATES = new ResourceLocation("appliedenergistics2",
"textures/guis/states.png"); "textures/guis/states.png");
@@ -20,7 +20,6 @@ package appeng.client.gui.widgets;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.Widget; import net.minecraft.client.gui.widget.Widget;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.client.gui.GuiUtils; import net.minecraftforge.fml.client.gui.GuiUtils;
@@ -18,16 +18,7 @@
package appeng.client.gui.widgets; package appeng.client.gui.widgets;
import java.util.HashMap; import appeng.api.config.Settings;
import java.util.Map;
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 appeng.api.config.*;
import appeng.core.localization.ButtonToolTips;
import appeng.core.sync.network.NetworkHandler; import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketConfigButton; import appeng.core.sync.packets.PacketConfigButton;
@@ -28,7 +28,24 @@ import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.button.Button; import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.util.text.ITextComponent; import net.minecraft.util.text.ITextComponent;
import appeng.api.config.*; import appeng.api.config.AccessRestriction;
import appeng.api.config.CondenserOutput;
import appeng.api.config.FullnessMode;
import appeng.api.config.FuzzyMode;
import appeng.api.config.LevelType;
import appeng.api.config.OperationMode;
import appeng.api.config.PowerUnits;
import appeng.api.config.RedstoneMode;
import appeng.api.config.RelativeDirection;
import appeng.api.config.SchedulingMode;
import appeng.api.config.SearchBoxMode;
import appeng.api.config.Settings;
import appeng.api.config.SortDir;
import appeng.api.config.SortOrder;
import appeng.api.config.StorageFilter;
import appeng.api.config.TerminalStyle;
import appeng.api.config.ViewItems;
import appeng.api.config.YesNo;
import appeng.core.localization.ButtonToolTips; import appeng.core.localization.ButtonToolTips;
import appeng.util.EnumCycler; import appeng.util.EnumCycler;
@@ -21,14 +21,11 @@ package appeng.client.gui.widgets;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.Widget;
import net.minecraft.client.gui.widget.button.Button; import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.ItemRenderer;
import net.minecraft.client.renderer.RenderHelper; import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.client.gui.GuiUtils;
public class GuiTabButton extends Button implements ITooltip { public class GuiTabButton extends Button implements ITooltip {
public static final ResourceLocation TEXTURE_STATES = new ResourceLocation("appliedenergistics2", public static final ResourceLocation TEXTURE_STATES = new ResourceLocation("appliedenergistics2",
@@ -19,7 +19,6 @@
package appeng.client.me; package appeng.client.me;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import appeng.container.slot.AppEngSlot; import appeng.container.slot.AppEngSlot;
@@ -21,7 +21,6 @@ package appeng.client.me;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.items.SlotItemHandler; import net.minecraftforge.items.SlotItemHandler;
@@ -19,7 +19,6 @@
package appeng.client.me; package appeng.client.me;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraftforge.items.SlotItemHandler; import net.minecraftforge.items.SlotItemHandler;
@@ -24,7 +24,6 @@ import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.tileentity.TileEntity; import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.ILightReader; import net.minecraft.world.ILightReader;
import appeng.api.implementations.tiles.IColorableTile; import appeng.api.implementations.tiles.IColorableTile;
@@ -25,8 +25,6 @@ import javax.annotation.Nullable;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import org.apache.commons.lang3.tuple.Pair;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.model.BakedQuad; import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.model.IBakedModel;
@@ -25,7 +25,12 @@ import java.util.function.Function;
import com.mojang.datafixers.util.Pair; import com.mojang.datafixers.util.Pair;
import net.minecraft.client.renderer.model.*; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.IModelTransform;
import net.minecraft.client.renderer.model.IUnbakedModel;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.model.Material;
import net.minecraft.client.renderer.model.ModelBakery;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.IModelConfiguration; import net.minecraftforge.client.model.IModelConfiguration;
@@ -20,7 +20,10 @@ package appeng.client.render;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.renderer.*; import net.minecraft.client.renderer.Matrix4f;
import net.minecraft.client.renderer.Quaternion;
import net.minecraft.client.renderer.Vector3f;
import net.minecraft.client.renderer.Vector4f;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.IStringSerializable; import net.minecraft.util.IStringSerializable;
import net.minecraft.util.math.Vec3i; import net.minecraft.util.math.Vec3i;
@@ -20,9 +20,11 @@ package appeng.client.render;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.renderer.*; import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.TransformationMatrix;
import net.minecraft.client.renderer.Vector3f;
import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IAEItemStack;
import appeng.core.AEConfig; import appeng.core.AEConfig;
@@ -23,7 +23,6 @@ import javax.annotation.Nullable;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.IBlockColor;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.ILightReader; import net.minecraft.world.ILightReader;
import appeng.api.util.AEColor; import appeng.api.util.AEColor;
@@ -48,7 +48,7 @@ public class TesrRenderHelper {
switch (face) { switch (face) {
case UP: case UP:
mStack.rotate(Vector3f.XP.rotationDegrees(270)); mStack.rotate(Vector3f.XP.rotationDegrees(270));
mStack.rotate(Vector3f.ZP.rotationDegrees(- spin * 90.0F)); mStack.rotate(Vector3f.ZP.rotationDegrees(-spin * 90.0F));
break; break;
case DOWN: case DOWN:
@@ -102,7 +102,7 @@ public class TesrRenderHelper {
/** /**
* Render an item in 2D and the given text below it. * Render an item in 2D and the given text below it.
* *
* @param matrixStack * @param matrixStack
* @param buffers * @param buffers
* @param spacing Specifies how far apart the item and the item stack * @param spacing Specifies how far apart the item and the item stack
@@ -29,22 +29,27 @@ public class CableBusBreakingParticle extends SpriteTexturedParticle {
this(world, x, y, z, 0, 0, 0, sprite); this(world, x, y, z, 0, 0, 0, sprite);
} }
@Override
public IParticleRenderType getRenderType() { public IParticleRenderType getRenderType() {
return IParticleRenderType.TERRAIN_SHEET; return IParticleRenderType.TERRAIN_SHEET;
} }
@Override
protected float getMinU() { protected float getMinU() {
return this.sprite.getInterpolatedU((this.field_217571_C + 1.0F) / 4.0F * 16.0F); return this.sprite.getInterpolatedU((this.field_217571_C + 1.0F) / 4.0F * 16.0F);
} }
@Override
protected float getMaxU() { protected float getMaxU() {
return this.sprite.getInterpolatedU(this.field_217571_C / 4.0F * 16.0F); return this.sprite.getInterpolatedU(this.field_217571_C / 4.0F * 16.0F);
} }
@Override
protected float getMinV() { protected float getMinV() {
return this.sprite.getInterpolatedV(this.field_217572_F / 4.0F * 16.0F); return this.sprite.getInterpolatedV(this.field_217572_F / 4.0F * 16.0F);
} }
@Override
protected float getMaxV() { protected float getMaxV() {
return this.sprite.getInterpolatedV((this.field_217572_F + 1.0F) / 4.0F * 16.0F); return this.sprite.getInterpolatedV((this.field_217572_F + 1.0F) / 4.0F * 16.0F);
} }
@@ -27,7 +27,12 @@ import java.util.function.Function;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.mojang.datafixers.util.Pair; import com.mojang.datafixers.util.Pair;
import net.minecraft.client.renderer.model.*; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.IModelTransform;
import net.minecraft.client.renderer.model.IUnbakedModel;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.model.Material;
import net.minecraft.client.renderer.model.ModelBakery;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.IModelConfiguration; import net.minecraftforge.client.model.IModelConfiguration;
@@ -44,7 +44,6 @@ import net.minecraft.util.Direction.Axis;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockReader;
import net.minecraft.world.ILightReader; import net.minecraft.world.ILightReader;
import net.minecraftforge.client.ForgeHooksClient; import net.minecraftforge.client.ForgeHooksClient;
import net.minecraftforge.client.model.data.EmptyModelData; import net.minecraftforge.client.model.data.EmptyModelData;
@@ -5,11 +5,14 @@ import java.util.Collections;
import java.util.Set; import java.util.Set;
import java.util.function.Function; import java.util.function.Function;
import javax.annotation.Nullable;
import com.mojang.datafixers.util.Pair; import com.mojang.datafixers.util.Pair;
import net.minecraft.client.renderer.model.*; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.IModelTransform;
import net.minecraft.client.renderer.model.IUnbakedModel;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.model.Material;
import net.minecraft.client.renderer.model.ModelBakery;
import net.minecraft.client.renderer.texture.AtlasTexture; import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@@ -1,8 +1,5 @@
package appeng.client.render.cablebus; package appeng.client.render.cablebus;
import javax.annotation.Nullable;
import net.minecraftforge.client.model.data.IModelData;
import net.minecraftforge.client.model.data.ModelProperty; import net.minecraftforge.client.model.data.ModelProperty;
import appeng.client.render.model.AEInternalModelData; import appeng.client.render.model.AEInternalModelData;
@@ -18,7 +18,11 @@
package appeng.client.render.crafting; package appeng.client.render.crafting;
import java.util.*; import java.util.ArrayList;
import java.util.Collections;
import java.util.EnumSet;
import java.util.List;
import java.util.Random;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
@@ -33,7 +37,6 @@ import net.minecraftforge.client.model.data.IModelData;
import appeng.client.render.cablebus.CubeBuilder; import appeng.client.render.cablebus.CubeBuilder;
import appeng.tile.crafting.CraftingCubeModelData; import appeng.tile.crafting.CraftingCubeModelData;
import appeng.tile.crafting.TileCraftingTile;
import appeng.util.Platform; import appeng.util.Platform;
/** /**
@@ -25,7 +25,12 @@ import java.util.function.Function;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.mojang.datafixers.util.Pair; import com.mojang.datafixers.util.Pair;
import net.minecraft.client.renderer.model.*; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.IModelTransform;
import net.minecraft.client.renderer.model.IUnbakedModel;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.model.Material;
import net.minecraft.client.renderer.model.ModelBakery;
import net.minecraft.client.renderer.texture.AtlasTexture; import net.minecraft.client.renderer.texture.AtlasTexture;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
@@ -23,18 +23,12 @@ import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.renderer.tileentity.TileEntityRenderer; import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.registry.Registry;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.OnlyIn;
import net.minecraftforge.registries.ForgeRegistries;
import appeng.api.storage.channels.IItemStorageChannel;
import appeng.api.storage.data.IAEItemStack; import appeng.api.storage.data.IAEItemStack;
import appeng.client.render.TesrRenderHelper; import appeng.client.render.TesrRenderHelper;
import appeng.core.Api;
import appeng.tile.crafting.TileCraftingMonitorTile; import appeng.tile.crafting.TileCraftingMonitorTile;
/** /**
@@ -1,30 +1,20 @@
package appeng.client.render.crafting; package appeng.client.render.crafting;
import java.util.List;
import java.util.Random;
import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack;
import net.minecraft.block.BlockState;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.Screen;
import net.minecraft.client.renderer.TransformationMatrix; import net.minecraft.client.renderer.TransformationMatrix;
import net.minecraft.client.renderer.model.BakedQuad;
import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.ItemCameraTransforms; import net.minecraft.client.renderer.model.ItemCameraTransforms;
import net.minecraft.client.renderer.model.ItemOverrideList; import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.Direction;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.client.model.PerspectiveMapWrapper; import net.minecraftforge.client.model.PerspectiveMapWrapper;
import net.minecraftforge.client.model.data.IDynamicBakedModel;
import net.minecraftforge.client.model.data.IModelData;
import appeng.client.render.DelegateBakedModel; import appeng.client.render.DelegateBakedModel;
import appeng.items.misc.ItemEncodedPattern; import appeng.items.misc.ItemEncodedPattern;
@@ -6,7 +6,12 @@ import java.util.function.Function;
import com.mojang.datafixers.util.Pair; import com.mojang.datafixers.util.Pair;
import net.minecraft.client.renderer.model.*; import net.minecraft.client.renderer.model.IBakedModel;
import net.minecraft.client.renderer.model.IModelTransform;
import net.minecraft.client.renderer.model.IUnbakedModel;
import net.minecraft.client.renderer.model.ItemOverrideList;
import net.minecraft.client.renderer.model.Material;
import net.minecraft.client.renderer.model.ModelBakery;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.util.ResourceLocation; import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.model.IModelConfiguration; import net.minecraftforge.client.model.IModelConfiguration;
@@ -20,7 +20,6 @@ package appeng.client.render.crafting;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.vertex.VertexFormat;
import net.minecraft.util.Direction; import net.minecraft.util.Direction;
import net.minecraftforge.client.model.data.IModelData; import net.minecraftforge.client.model.data.IModelData;
@@ -64,6 +64,7 @@ public class ChargedOreFX extends RedstoneParticle {
this.spriteSet = p_i50477_1_; this.spriteSet = p_i50477_1_;
} }
@Override
public Particle makeParticle(BasicParticleType typeIn, World worldIn, double x, double y, double z, public Particle makeParticle(BasicParticleType typeIn, World worldIn, double x, double y, double z,
double xSpeed, double ySpeed, double zSpeed) { double xSpeed, double ySpeed, double zSpeed) {
return new ChargedOreFX(worldIn, x, y, z, xSpeed, ySpeed, zSpeed, this.spriteSet); return new ChargedOreFX(worldIn, x, y, z, xSpeed, ySpeed, zSpeed, this.spriteSet);
@@ -20,7 +20,11 @@ package appeng.client.render.effects;
import com.mojang.blaze3d.vertex.IVertexBuilder; import com.mojang.blaze3d.vertex.IVertexBuilder;
import net.minecraft.client.particle.*; import net.minecraft.client.particle.IAnimatedSprite;
import net.minecraft.client.particle.IParticleFactory;
import net.minecraft.client.particle.IParticleRenderType;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.SpriteTexturedParticle;
import net.minecraft.client.renderer.ActiveRenderInfo; import net.minecraft.client.renderer.ActiveRenderInfo;
import net.minecraft.client.renderer.Vector3f; import net.minecraft.client.renderer.Vector3f;
import net.minecraft.particles.BasicParticleType; import net.minecraft.particles.BasicParticleType;
@@ -71,7 +75,7 @@ public class CraftingFx extends SpriteTexturedParticle {
@Override @Override
public void renderParticle(IVertexBuilder buffer, ActiveRenderInfo renderInfo, float partialTicks) { public void renderParticle(IVertexBuilder buffer, ActiveRenderInfo renderInfo, float partialTicks) {
float f = (this.age + partialTicks) / (float) this.maxAge; float f = (this.age + partialTicks) / this.maxAge;
float offX = (float) posX + MathHelper.lerp(f, offsetX, 0); float offX = (float) posX + MathHelper.lerp(f, offsetX, 0);
float offY = (float) posY + MathHelper.lerp(f, offsetY, 0); float offY = (float) posY + MathHelper.lerp(f, offsetY, 0);
@@ -137,6 +141,7 @@ public class CraftingFx extends SpriteTexturedParticle {
this.spriteSet = p_i50477_1_; this.spriteSet = p_i50477_1_;
} }
@Override
public Particle makeParticle(BasicParticleType data, World worldIn, double x, double y, double z, double xSpeed, public Particle makeParticle(BasicParticleType data, World worldIn, double x, double y, double z, double xSpeed,
double ySpeed, double zSpeed) { double ySpeed, double zSpeed) {
return new CraftingFx(worldIn, x, y, z, spriteSet); return new CraftingFx(worldIn, x, y, z, spriteSet);
@@ -18,11 +18,10 @@
package appeng.client.render.effects; package appeng.client.render.effects;
import net.minecraft.client.particle.*; import net.minecraft.client.particle.BreakingParticle;
import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.particle.IAnimatedSprite;
import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.particle.IParticleFactory;
import net.minecraft.entity.Entity; import net.minecraft.client.particle.Particle;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.Items; import net.minecraft.item.Items;
import net.minecraft.particles.BasicParticleType; import net.minecraft.particles.BasicParticleType;
@@ -172,6 +171,7 @@ public class EnergyFx extends BreakingParticle {
this.spriteSet = spriteSet; this.spriteSet = spriteSet;
} }
@Override
public Particle makeParticle(BasicParticleType typeIn, World worldIn, double x, double y, double z, public Particle makeParticle(BasicParticleType typeIn, World worldIn, double x, double y, double z,
double xSpeed, double ySpeed, double zSpeed) { double xSpeed, double ySpeed, double zSpeed) {
EnergyFx result = new EnergyFx(worldIn, x, y, z, spriteSet); EnergyFx result = new EnergyFx(worldIn, x, y, z, spriteSet);
@@ -20,8 +20,10 @@ package appeng.client.render.effects;
import java.util.Random; import java.util.Random;
import net.minecraft.client.particle.*; import net.minecraft.client.particle.IAnimatedSprite;
import net.minecraft.particles.BasicParticleType; import net.minecraft.client.particle.IParticleFactory;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.SpriteTexturedParticle;
import net.minecraft.particles.ParticleType; import net.minecraft.particles.ParticleType;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.Dist;
@@ -80,6 +82,7 @@ public class LightningArcFX extends LightningFX {
this.spriteSet = spriteSet; this.spriteSet = spriteSet;
} }
@Override
public Particle makeParticle(LightningArcParticleData data, World worldIn, double x, double y, double z, public Particle makeParticle(LightningArcParticleData data, World worldIn, double x, double y, double z,
double xSpeed, double ySpeed, double zSpeed) { double xSpeed, double ySpeed, double zSpeed) {
SpriteTexturedParticle lightningFX = new LightningArcFX(worldIn, x, y, z, data.target.x, data.target.y, SpriteTexturedParticle lightningFX = new LightningArcFX(worldIn, x, y, z, data.target.x, data.target.y,
@@ -23,12 +23,12 @@ import java.util.Random;
import com.mojang.blaze3d.vertex.IVertexBuilder; import com.mojang.blaze3d.vertex.IVertexBuilder;
import net.minecraft.client.Minecraft; import net.minecraft.client.Minecraft;
import net.minecraft.client.particle.*; import net.minecraft.client.particle.IAnimatedSprite;
import net.minecraft.client.particle.IParticleFactory;
import net.minecraft.client.particle.IParticleRenderType;
import net.minecraft.client.particle.Particle;
import net.minecraft.client.particle.SpriteTexturedParticle;
import net.minecraft.client.renderer.ActiveRenderInfo; import net.minecraft.client.renderer.ActiveRenderInfo;
import net.minecraft.client.renderer.BufferBuilder;
import net.minecraft.client.renderer.Quaternion;
import net.minecraft.client.renderer.Vector3f;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.particles.BasicParticleType; import net.minecraft.particles.BasicParticleType;
import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.MathHelper;
@@ -259,6 +259,7 @@ public class LightningFX extends SpriteTexturedParticle {
this.spriteSet = spriteSet; this.spriteSet = spriteSet;
} }
@Override
public Particle makeParticle(BasicParticleType typeIn, World worldIn, double x, double y, double z, public Particle makeParticle(BasicParticleType typeIn, World worldIn, double x, double y, double z,
double xSpeed, double ySpeed, double zSpeed) { double xSpeed, double ySpeed, double zSpeed) {
LightningFX lightningFX = new LightningFX(worldIn, x, y, z, xSpeed, ySpeed, zSpeed); LightningFX lightningFX = new LightningFX(worldIn, x, y, z, xSpeed, ySpeed, zSpeed);

Some files were not shown because too many files have changed in this diff Show More