The Great Renamening of 2020
This commit is contained in:
+3
-3
@@ -15,16 +15,16 @@ import net.minecraftforge.fluids.FluidUtil;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.IUpgradeableHost;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.container.implementations.ContainerUpgradeable;
|
||||
import appeng.container.implementations.UpgradeableContainer;
|
||||
import appeng.fluids.helper.FluidSyncHelper;
|
||||
import appeng.fluids.util.AEFluidStack;
|
||||
import appeng.fluids.util.IAEFluidTank;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public abstract class ContainerFluidConfigurable extends ContainerUpgradeable implements IFluidSyncContainer {
|
||||
public abstract class FluidConfigurableContainer extends UpgradeableContainer implements IFluidSyncContainer {
|
||||
private FluidSyncHelper sync = null;
|
||||
|
||||
public ContainerFluidConfigurable(ContainerType<?> containerType, int id, PlayerInventory ip, IUpgradeableHost te) {
|
||||
public FluidConfigurableContainer(ContainerType<?> containerType, int id, PlayerInventory ip, IUpgradeableHost te) {
|
||||
super(containerType, id, ip, te);
|
||||
}
|
||||
|
||||
+14
-14
@@ -12,18 +12,18 @@ import appeng.api.config.Upgrades;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.implementations.ContainerHelper;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
import appeng.fluids.parts.PartFluidFormationPlane;
|
||||
import appeng.container.slot.RestrictedInputSlot;
|
||||
import appeng.fluids.parts.FluidFormationPlanePart;
|
||||
import appeng.fluids.util.IAEFluidTank;
|
||||
|
||||
public class ContainerFluidFormationPlane extends ContainerFluidConfigurable {
|
||||
public class FluidFormationPlaneContainer extends FluidConfigurableContainer {
|
||||
|
||||
public static ContainerType<ContainerFluidFormationPlane> TYPE;
|
||||
public static ContainerType<FluidFormationPlaneContainer> TYPE;
|
||||
|
||||
private static final ContainerHelper<ContainerFluidFormationPlane, PartFluidFormationPlane> helper = new ContainerHelper<>(
|
||||
ContainerFluidFormationPlane::new, PartFluidFormationPlane.class, SecurityPermissions.BUILD);
|
||||
private static final ContainerHelper<FluidFormationPlaneContainer, FluidFormationPlanePart> helper = new ContainerHelper<>(
|
||||
FluidFormationPlaneContainer::new, FluidFormationPlanePart.class, SecurityPermissions.BUILD);
|
||||
|
||||
public static ContainerFluidFormationPlane fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
|
||||
public static FluidFormationPlaneContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
|
||||
return helper.fromNetwork(windowId, inv, buf);
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ public class ContainerFluidFormationPlane extends ContainerFluidConfigurable {
|
||||
return helper.open(player, locator);
|
||||
}
|
||||
|
||||
private final PartFluidFormationPlane plane;
|
||||
private final FluidFormationPlanePart plane;
|
||||
|
||||
public ContainerFluidFormationPlane(int id, final PlayerInventory ip, final PartFluidFormationPlane te) {
|
||||
public FluidFormationPlaneContainer(int id, final PlayerInventory ip, final FluidFormationPlanePart te) {
|
||||
super(TYPE, id, ip, te);
|
||||
this.plane = te;
|
||||
}
|
||||
@@ -51,15 +51,15 @@ public class ContainerFluidFormationPlane extends ContainerFluidConfigurable {
|
||||
@Override
|
||||
protected void setupConfig() {
|
||||
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName("upgrades");
|
||||
this.addSlot((new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8,
|
||||
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 0, 187, 8,
|
||||
this.getPlayerInventory())).setNotDraggable());
|
||||
this.addSlot((new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18,
|
||||
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18,
|
||||
this.getPlayerInventory())).setNotDraggable());
|
||||
this.addSlot((new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187,
|
||||
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 2, 187,
|
||||
8 + 18 * 2, this.getPlayerInventory())).setNotDraggable());
|
||||
this.addSlot((new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187,
|
||||
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 3, 187,
|
||||
8 + 18 * 3, this.getPlayerInventory())).setNotDraggable());
|
||||
this.addSlot((new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187,
|
||||
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 4, 187,
|
||||
8 + 18 * 4, this.getPlayerInventory())).setNotDraggable());
|
||||
}
|
||||
|
||||
+8
-8
@@ -26,7 +26,7 @@ import net.minecraft.network.PacketBuffer;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.implementations.ContainerHelper;
|
||||
import appeng.fluids.parts.PartSharedFluidBus;
|
||||
import appeng.fluids.parts.SharedFluidBusPart;
|
||||
import appeng.fluids.util.IAEFluidTank;
|
||||
|
||||
/**
|
||||
@@ -34,14 +34,14 @@ import appeng.fluids.util.IAEFluidTank;
|
||||
* @version rv5 - 1/05/2018
|
||||
* @since rv5 1/05/2018
|
||||
*/
|
||||
public class ContainerFluidIO extends ContainerFluidConfigurable {
|
||||
public class FluidIOContainer extends FluidConfigurableContainer {
|
||||
|
||||
public static ContainerType<ContainerFluidIO> TYPE;
|
||||
public static ContainerType<FluidIOContainer> TYPE;
|
||||
|
||||
private static final ContainerHelper<ContainerFluidIO, PartSharedFluidBus> helper = new ContainerHelper<>(
|
||||
ContainerFluidIO::new, PartSharedFluidBus.class, SecurityPermissions.BUILD);
|
||||
private static final ContainerHelper<FluidIOContainer, SharedFluidBusPart> helper = new ContainerHelper<>(
|
||||
FluidIOContainer::new, SharedFluidBusPart.class, SecurityPermissions.BUILD);
|
||||
|
||||
public static ContainerFluidIO fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
|
||||
public static FluidIOContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
|
||||
return helper.fromNetwork(windowId, inv, buf);
|
||||
}
|
||||
|
||||
@@ -49,9 +49,9 @@ public class ContainerFluidIO extends ContainerFluidConfigurable {
|
||||
return helper.open(player, locator);
|
||||
}
|
||||
|
||||
private final PartSharedFluidBus bus;
|
||||
private final SharedFluidBusPart bus;
|
||||
|
||||
public ContainerFluidIO(int id, PlayerInventory ip, PartSharedFluidBus te) {
|
||||
public FluidIOContainer(int id, PlayerInventory ip, SharedFluidBusPart te) {
|
||||
super(TYPE, id, ip, te);
|
||||
this.bus = te;
|
||||
}
|
||||
+6
-6
@@ -38,14 +38,14 @@ import appeng.fluids.helper.IFluidInterfaceHost;
|
||||
import appeng.fluids.util.IAEFluidTank;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ContainerFluidInterface extends ContainerFluidConfigurable {
|
||||
public class FluidInterfaceContainer extends FluidConfigurableContainer {
|
||||
|
||||
public static ContainerType<ContainerFluidInterface> TYPE;
|
||||
public static ContainerType<FluidInterfaceContainer> TYPE;
|
||||
|
||||
private static final ContainerHelper<ContainerFluidInterface, IFluidInterfaceHost> helper = new ContainerHelper<>(
|
||||
ContainerFluidInterface::new, IFluidInterfaceHost.class, SecurityPermissions.BUILD);
|
||||
private static final ContainerHelper<FluidInterfaceContainer, IFluidInterfaceHost> helper = new ContainerHelper<>(
|
||||
FluidInterfaceContainer::new, IFluidInterfaceHost.class, SecurityPermissions.BUILD);
|
||||
|
||||
public static ContainerFluidInterface fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
|
||||
public static FluidInterfaceContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
|
||||
return helper.fromNetwork(windowId, inv, buf);
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ContainerFluidInterface extends ContainerFluidConfigurable {
|
||||
private final DualityFluidInterface myDuality;
|
||||
private final FluidSyncHelper tankSync;
|
||||
|
||||
public ContainerFluidInterface(int id, final PlayerInventory ip, final IFluidInterfaceHost te) {
|
||||
public FluidInterfaceContainer(int id, final PlayerInventory ip, final IFluidInterfaceHost te) {
|
||||
super(TYPE, id, ip, te.getDualityFluidInterface().getHost());
|
||||
|
||||
this.myDuality = te.getDualityFluidInterface();
|
||||
+8
-8
@@ -14,17 +14,17 @@ import appeng.api.config.Settings;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
import appeng.container.implementations.ContainerHelper;
|
||||
import appeng.fluids.parts.PartFluidLevelEmitter;
|
||||
import appeng.fluids.parts.FluidLevelEmitterPart;
|
||||
import appeng.fluids.util.IAEFluidTank;
|
||||
import appeng.util.Platform;
|
||||
|
||||
public class ContainerFluidLevelEmitter extends ContainerFluidConfigurable {
|
||||
public static ContainerType<ContainerFluidLevelEmitter> TYPE;
|
||||
public class FluidLevelEmitterContainer extends FluidConfigurableContainer {
|
||||
public static ContainerType<FluidLevelEmitterContainer> TYPE;
|
||||
|
||||
private static final ContainerHelper<ContainerFluidLevelEmitter, PartFluidLevelEmitter> helper = new ContainerHelper<>(
|
||||
ContainerFluidLevelEmitter::new, PartFluidLevelEmitter.class, SecurityPermissions.BUILD);
|
||||
private static final ContainerHelper<FluidLevelEmitterContainer, FluidLevelEmitterPart> helper = new ContainerHelper<>(
|
||||
FluidLevelEmitterContainer::new, FluidLevelEmitterPart.class, SecurityPermissions.BUILD);
|
||||
|
||||
public static ContainerFluidLevelEmitter fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
|
||||
public static FluidLevelEmitterContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
|
||||
return helper.fromNetwork(windowId, inv, buf);
|
||||
}
|
||||
|
||||
@@ -32,14 +32,14 @@ public class ContainerFluidLevelEmitter extends ContainerFluidConfigurable {
|
||||
return helper.open(player, locator);
|
||||
}
|
||||
|
||||
private final PartFluidLevelEmitter lvlEmitter;
|
||||
private final FluidLevelEmitterPart lvlEmitter;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
private TextFieldWidget textField;
|
||||
@GuiSync(3)
|
||||
public long EmitterValue = -1;
|
||||
|
||||
public ContainerFluidLevelEmitter(int id, final PlayerInventory ip, final PartFluidLevelEmitter te) {
|
||||
public FluidLevelEmitterContainer(int id, final PlayerInventory ip, final FluidLevelEmitterPart te) {
|
||||
super(TYPE, id, ip, te);
|
||||
this.lvlEmitter = te;
|
||||
}
|
||||
+14
-14
@@ -40,8 +40,8 @@ import appeng.api.storage.data.IItemList;
|
||||
import appeng.container.ContainerLocator;
|
||||
import appeng.container.guisync.GuiSync;
|
||||
import appeng.container.implementations.ContainerHelper;
|
||||
import appeng.container.slot.SlotRestrictedInput;
|
||||
import appeng.fluids.parts.PartFluidStorageBus;
|
||||
import appeng.container.slot.RestrictedInputSlot;
|
||||
import appeng.fluids.parts.FluidStorageBusPart;
|
||||
import appeng.fluids.util.IAEFluidTank;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.iterators.NullIterator;
|
||||
@@ -51,14 +51,14 @@ import appeng.util.iterators.NullIterator;
|
||||
* @version rv6 - 22/05/2018
|
||||
* @since rv6 22/05/2018
|
||||
*/
|
||||
public class ContainerFluidStorageBus extends ContainerFluidConfigurable {
|
||||
public class FluidStorageBusContainer extends FluidConfigurableContainer {
|
||||
|
||||
public static ContainerType<ContainerFluidStorageBus> TYPE;
|
||||
public static ContainerType<FluidStorageBusContainer> TYPE;
|
||||
|
||||
private static final ContainerHelper<ContainerFluidStorageBus, PartFluidStorageBus> helper = new ContainerHelper<>(
|
||||
ContainerFluidStorageBus::new, PartFluidStorageBus.class);
|
||||
private static final ContainerHelper<FluidStorageBusContainer, FluidStorageBusPart> helper = new ContainerHelper<>(
|
||||
FluidStorageBusContainer::new, FluidStorageBusPart.class);
|
||||
|
||||
public static ContainerFluidStorageBus fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
|
||||
public static FluidStorageBusContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
|
||||
return helper.fromNetwork(windowId, inv, buf);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ public class ContainerFluidStorageBus extends ContainerFluidConfigurable {
|
||||
return helper.open(player, locator);
|
||||
}
|
||||
|
||||
private final PartFluidStorageBus storageBus;
|
||||
private final FluidStorageBusPart storageBus;
|
||||
|
||||
@GuiSync(3)
|
||||
public AccessRestriction rwMode = AccessRestriction.READ_WRITE;
|
||||
@@ -74,7 +74,7 @@ public class ContainerFluidStorageBus extends ContainerFluidConfigurable {
|
||||
@GuiSync(4)
|
||||
public StorageFilter storageFilter = StorageFilter.EXTRACTABLE_ONLY;
|
||||
|
||||
public ContainerFluidStorageBus(int id, PlayerInventory ip, PartFluidStorageBus te) {
|
||||
public FluidStorageBusContainer(int id, PlayerInventory ip, FluidStorageBusPart te) {
|
||||
super(TYPE, id, ip, te);
|
||||
this.storageBus = te;
|
||||
}
|
||||
@@ -87,15 +87,15 @@ public class ContainerFluidStorageBus extends ContainerFluidConfigurable {
|
||||
@Override
|
||||
protected void setupConfig() {
|
||||
final IItemHandler upgrades = this.getUpgradeable().getInventoryByName("upgrades");
|
||||
this.addSlot((new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 0, 187, 8,
|
||||
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 0, 187, 8,
|
||||
this.getPlayerInventory())).setNotDraggable());
|
||||
this.addSlot((new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18,
|
||||
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 1, 187, 8 + 18,
|
||||
this.getPlayerInventory())).setNotDraggable());
|
||||
this.addSlot((new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 2, 187,
|
||||
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 2, 187,
|
||||
8 + 18 * 2, this.getPlayerInventory())).setNotDraggable());
|
||||
this.addSlot((new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 3, 187,
|
||||
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 3, 187,
|
||||
8 + 18 * 3, this.getPlayerInventory())).setNotDraggable());
|
||||
this.addSlot((new SlotRestrictedInput(SlotRestrictedInput.PlacableItemType.UPGRADES, upgrades, 4, 187,
|
||||
this.addSlot((new RestrictedInputSlot(RestrictedInputSlot.PlacableItemType.UPGRADES, upgrades, 4, 187,
|
||||
8 + 18 * 4, this.getPlayerInventory())).setNotDraggable());
|
||||
}
|
||||
|
||||
+14
-14
@@ -67,9 +67,9 @@ import appeng.container.guisync.GuiSync;
|
||||
import appeng.container.implementations.ContainerHelper;
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketMEFluidInventoryUpdate;
|
||||
import appeng.core.sync.packets.PacketTargetFluidStack;
|
||||
import appeng.core.sync.packets.PacketValueConfig;
|
||||
import appeng.core.sync.packets.MEFluidInventoryUpdatePacket;
|
||||
import appeng.core.sync.packets.TargetFluidStackPacket;
|
||||
import appeng.core.sync.packets.ConfigValuePacket;
|
||||
import appeng.fluids.util.AEFluidStack;
|
||||
import appeng.helpers.InventoryAction;
|
||||
import appeng.me.helpers.ChannelPowerSrc;
|
||||
@@ -82,15 +82,15 @@ import appeng.util.Platform;
|
||||
* @version rv6 - 12/05/2018
|
||||
* @since rv6 12/05/2018
|
||||
*/
|
||||
public class ContainerFluidTerminal extends AEBaseContainer
|
||||
public class FluidTerminalContainer extends AEBaseContainer
|
||||
implements IConfigManagerHost, IConfigurableObject, IMEMonitorHandlerReceiver<IAEFluidStack> {
|
||||
|
||||
public static ContainerType<ContainerFluidTerminal> TYPE;
|
||||
public static ContainerType<FluidTerminalContainer> TYPE;
|
||||
|
||||
private static final ContainerHelper<ContainerFluidTerminal, ITerminalHost> helper = new ContainerHelper<>(
|
||||
ContainerFluidTerminal::new, ITerminalHost.class, SecurityPermissions.BUILD);
|
||||
private static final ContainerHelper<FluidTerminalContainer, ITerminalHost> helper = new ContainerHelper<>(
|
||||
FluidTerminalContainer::new, ITerminalHost.class, SecurityPermissions.BUILD);
|
||||
|
||||
public static ContainerFluidTerminal fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
|
||||
public static FluidTerminalContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
|
||||
return helper.fromNetwork(windowId, inv, buf);
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@ public class ContainerFluidTerminal extends AEBaseContainer
|
||||
// Holds the fluid the client wishes to extract, or null for insert
|
||||
private IAEFluidStack clientRequestedTargetFluid = null;
|
||||
|
||||
public ContainerFluidTerminal(int id, PlayerInventory ip, ITerminalHost terminal) {
|
||||
public FluidTerminalContainer(int id, PlayerInventory ip, ITerminalHost terminal) {
|
||||
super(TYPE, id, ip, terminal);
|
||||
this.terminal = terminal;
|
||||
this.clientCM = new ConfigManager(this);
|
||||
@@ -193,7 +193,7 @@ public class ContainerFluidTerminal extends AEBaseContainer
|
||||
private void queueInventory(final IContainerListener c) {
|
||||
if (Platform.isServer() && c instanceof PlayerEntity && this.monitor != null) {
|
||||
try {
|
||||
PacketMEFluidInventoryUpdate piu = new PacketMEFluidInventoryUpdate();
|
||||
MEFluidInventoryUpdatePacket piu = new MEFluidInventoryUpdatePacket();
|
||||
final IItemList<IAEFluidStack> monitorCache = this.monitor.getStorageList();
|
||||
|
||||
for (final IAEFluidStack send : monitorCache) {
|
||||
@@ -202,7 +202,7 @@ public class ContainerFluidTerminal extends AEBaseContainer
|
||||
} catch (final BufferOverflowException boe) {
|
||||
NetworkHandler.instance().sendTo(piu, (ServerPlayerEntity) c);
|
||||
|
||||
piu = new PacketMEFluidInventoryUpdate();
|
||||
piu = new MEFluidInventoryUpdatePacket();
|
||||
piu.appendFluid(send);
|
||||
}
|
||||
}
|
||||
@@ -231,7 +231,7 @@ public class ContainerFluidTerminal extends AEBaseContainer
|
||||
&& stack.getFluidStack().isFluidEqual(this.clientRequestedTargetFluid.getFluidStack())) {
|
||||
return;
|
||||
}
|
||||
NetworkHandler.instance().sendToServer(new PacketTargetFluidStack((AEFluidStack) stack));
|
||||
NetworkHandler.instance().sendToServer(new TargetFluidStackPacket((AEFluidStack) stack));
|
||||
}
|
||||
|
||||
this.clientRequestedTargetFluid = stack == null ? null : stack.copy();
|
||||
@@ -260,7 +260,7 @@ public class ContainerFluidTerminal extends AEBaseContainer
|
||||
this.clientCM.putSetting(set, sideLocal);
|
||||
for (final IContainerListener crafter : this.listeners) {
|
||||
if (crafter instanceof ServerPlayerEntity) {
|
||||
NetworkHandler.instance().sendTo(new PacketValueConfig(set.name(), sideLocal.name()),
|
||||
NetworkHandler.instance().sendTo(new ConfigValuePacket(set.name(), sideLocal.name()),
|
||||
(ServerPlayerEntity) crafter);
|
||||
}
|
||||
}
|
||||
@@ -271,7 +271,7 @@ public class ContainerFluidTerminal extends AEBaseContainer
|
||||
try {
|
||||
final IItemList<IAEFluidStack> monitorCache = this.monitor.getStorageList();
|
||||
|
||||
final PacketMEFluidInventoryUpdate piu = new PacketMEFluidInventoryUpdate();
|
||||
final MEFluidInventoryUpdatePacket piu = new MEFluidInventoryUpdatePacket();
|
||||
|
||||
for (final IAEFluidStack is : this.fluids) {
|
||||
final IAEFluidStack send = monitorCache.findPrecise(is);
|
||||
Reference in New Issue
Block a user