Added spotless back and reformatted
This commit is contained in:
@@ -22,13 +22,13 @@ import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
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.PacketByteBuf;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
@@ -21,21 +21,22 @@ package appeng.parts.misc;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import alexiil.mc.lib.attributes.AttributeList;
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.inventory.CraftingInventory;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import alexiil.mc.lib.attributes.AttributeList;
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.networking.IGridNode;
|
||||
@@ -190,7 +191,7 @@ public class InterfacePart extends BasicStatePart implements IGridTickable, ISto
|
||||
|
||||
@Override
|
||||
public void onChangeInventory(final FixedItemInv inv, final int slot, final InvOperation mc,
|
||||
final ItemStack removedStack, final ItemStack newStack) {
|
||||
final ItemStack removedStack, final ItemStack newStack) {
|
||||
this.duality.onChangeInventory(inv, slot, mc, removedStack, newStack);
|
||||
}
|
||||
|
||||
|
||||
@@ -28,8 +28,7 @@ import appeng.parts.PartModel;
|
||||
|
||||
public class InvertedToggleBusPart extends ToggleBusPart {
|
||||
@PartModels
|
||||
public static final Identifier MODEL_BASE = new Identifier(AppEng.MOD_ID,
|
||||
"part/inverted_toggle_bus_base");
|
||||
public static final Identifier MODEL_BASE = new Identifier(AppEng.MOD_ID, "part/inverted_toggle_bus_base");
|
||||
|
||||
public static final PartModel MODELS_OFF = new PartModel(MODEL_BASE, MODEL_STATUS_OFF);
|
||||
public static final PartModel MODELS_ON = new PartModel(MODEL_BASE, MODEL_STATUS_ON);
|
||||
|
||||
@@ -25,9 +25,10 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import alexiil.mc.lib.attributes.Simulation;
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.networking.security.IActionSource;
|
||||
@@ -74,7 +75,8 @@ class ItemHandlerAdapter implements IMEInventory<IAEItemStack>, IBaseMonitor<IAE
|
||||
// This uses a brute force approach and tries to jam it in every slot the
|
||||
// inventory exposes.
|
||||
for (int i = 0; i < slotCount && !remaining.isEmpty(); i++) {
|
||||
remaining = this.itemHandler.getSlot(i).attemptInsertion(remaining, simulate ? Simulation.SIMULATE : Simulation.ACTION);
|
||||
remaining = this.itemHandler.getSlot(i).attemptInsertion(remaining,
|
||||
simulate ? Simulation.SIMULATE : Simulation.ACTION);
|
||||
}
|
||||
|
||||
// At this point, we still have some items left...
|
||||
@@ -94,7 +96,8 @@ class ItemHandlerAdapter implements IMEInventory<IAEItemStack>, IBaseMonitor<IAE
|
||||
return AEItemStack.fromItemStack(remaining);
|
||||
}
|
||||
|
||||
// FIXME FABRIC: this really needs to be rewritten to use the other interface types and not do slot iterations
|
||||
// FIXME FABRIC: this really needs to be rewritten to use the other interface
|
||||
// types and not do slot iterations
|
||||
@Override
|
||||
public IAEItemStack extractItems(IAEItemStack request, Actionable mode, IActionSource src) {
|
||||
|
||||
@@ -122,7 +125,8 @@ class ItemHandlerAdapter implements IMEInventory<IAEItemStack>, IBaseMonitor<IAE
|
||||
// maxSize, even if we request more. So even if it returns a valid stack, it
|
||||
// might have more stuff.
|
||||
do {
|
||||
extracted = this.itemHandler.getSlot(i).attemptAnyExtraction(remainingCurrentSlot, simulate ? Simulation.SIMULATE : Simulation.ACTION);
|
||||
extracted = this.itemHandler.getSlot(i).attemptAnyExtraction(remainingCurrentSlot,
|
||||
simulate ? Simulation.SIMULATE : Simulation.ACTION);
|
||||
if (!extracted.isEmpty()) {
|
||||
if (extracted.getCount() > remainingCurrentSlot) {
|
||||
// Something broke. It should never return more than we requested...
|
||||
|
||||
@@ -22,22 +22,22 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import alexiil.mc.lib.attributes.Attributes;
|
||||
import alexiil.mc.lib.attributes.item.ItemAttributes;
|
||||
import appeng.attributes.MEAttributes;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.screen.ScreenHandlerType;
|
||||
import net.minecraft.server.network.ServerPlayerEntity;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.BlockView;
|
||||
|
||||
import alexiil.mc.lib.attributes.Attributes;
|
||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||
import alexiil.mc.lib.attributes.item.ItemAttributes;
|
||||
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
@@ -73,6 +73,7 @@ import appeng.api.storage.data.IItemList;
|
||||
import appeng.api.util.AECableType;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.attributes.MEAttributes;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.ContainerOpener;
|
||||
import appeng.container.implementations.StorageBusContainer;
|
||||
@@ -167,7 +168,7 @@ public class StorageBusPart extends UpgradeablePart
|
||||
|
||||
@Override
|
||||
public void onChangeInventory(final FixedItemInv inv, final int slot, final InvOperation mc,
|
||||
final ItemStack removedStack, final ItemStack newStack) {
|
||||
final ItemStack removedStack, final ItemStack newStack) {
|
||||
super.onChangeInventory(inv, slot, mc, removedStack, newStack);
|
||||
|
||||
if (inv == this.Config) {
|
||||
|
||||
@@ -20,10 +20,10 @@ package appeng.parts.misc;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.block.entity.BlockEntity;
|
||||
import net.minecraft.util.Hand;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
@@ -50,11 +50,9 @@ public class ToggleBusPart extends BasicStatePart {
|
||||
@PartModels
|
||||
public static final Identifier MODEL_BASE = new Identifier(AppEng.MOD_ID, "part/toggle_bus_base");
|
||||
@PartModels
|
||||
public static final Identifier MODEL_STATUS_OFF = new Identifier(AppEng.MOD_ID,
|
||||
"part/toggle_bus_status_off");
|
||||
public static final Identifier MODEL_STATUS_OFF = new Identifier(AppEng.MOD_ID, "part/toggle_bus_status_off");
|
||||
@PartModels
|
||||
public static final Identifier MODEL_STATUS_ON = new Identifier(AppEng.MOD_ID,
|
||||
"part/toggle_bus_status_on");
|
||||
public static final Identifier MODEL_STATUS_ON = new Identifier(AppEng.MOD_ID, "part/toggle_bus_status_on");
|
||||
@PartModels
|
||||
public static final Identifier MODEL_STATUS_HAS_CHANNEL = new Identifier(AppEng.MOD_ID,
|
||||
"part/toggle_bus_status_has_channel");
|
||||
|
||||
Reference in New Issue
Block a user