Added spotless back and reformatted
This commit is contained in:
@@ -18,17 +18,19 @@
|
||||
|
||||
package appeng.attributes;
|
||||
|
||||
import alexiil.mc.lib.attributes.Attribute;
|
||||
import alexiil.mc.lib.attributes.Attributes;
|
||||
import alexiil.mc.lib.attributes.SearchOptions;
|
||||
import appeng.api.storage.IStorageMonitorableAccessor;
|
||||
import appeng.parts.AEBasePart;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.ChunkPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import alexiil.mc.lib.attributes.Attribute;
|
||||
import alexiil.mc.lib.attributes.Attributes;
|
||||
import alexiil.mc.lib.attributes.SearchOptions;
|
||||
|
||||
import appeng.api.storage.IStorageMonitorableAccessor;
|
||||
import appeng.parts.AEBasePart;
|
||||
|
||||
/**
|
||||
* Utility class that holds various attributes, both by AE2 and other Mods.
|
||||
*/
|
||||
@@ -37,8 +39,8 @@ public final class MEAttributes {
|
||||
private MEAttributes() {
|
||||
}
|
||||
|
||||
public static Attribute<IStorageMonitorableAccessor> STORAGE_MONITORABLE_ACCESSOR
|
||||
= Attributes.createDefaulted(IStorageMonitorableAccessor.class, new NullMENetworkAccessor());
|
||||
public static Attribute<IStorageMonitorableAccessor> STORAGE_MONITORABLE_ACCESSOR = Attributes
|
||||
.createDefaulted(IStorageMonitorableAccessor.class, new NullMENetworkAccessor());
|
||||
|
||||
public static <T> T getFirstAttributeOnSide(Attribute<T> attribute, BlockEntity be, Direction side) {
|
||||
World world = be.getWorld();
|
||||
@@ -49,7 +51,8 @@ public final class MEAttributes {
|
||||
return attribute.getFirstOrNull(world, be.getPos().offset(side), SearchOptions.inDirection(side.getOpposite()));
|
||||
}
|
||||
|
||||
// Convenience function to get an attribute of the block that is in front of a part
|
||||
// Convenience function to get an attribute of the block that is in front of a
|
||||
// part
|
||||
public static <T> T getAttributeInFrontOfPart(Attribute<T> attribute, AEBasePart part) {
|
||||
BlockEntity self = part.getHost().getTile();
|
||||
Direction direction = part.getSide().getFacing();
|
||||
|
||||
Reference in New Issue
Block a user