Post-Rename Formatting Fixes

This commit is contained in:
Sebastian Hartte
2020-06-22 13:25:38 +02:00
parent b4471b1abb
commit 26bb08ddb5
98 changed files with 273 additions and 228 deletions
@@ -60,8 +60,8 @@ import net.minecraftforge.fml.client.gui.GuiUtils;
import appeng.api.storage.data.IAEFluidStack;
import appeng.api.storage.data.IAEItemStack;
import appeng.client.gui.widgets.CustomSlotWidget;
import appeng.client.gui.widgets.Scrollbar;
import appeng.client.gui.widgets.ITooltip;
import appeng.client.gui.widgets.Scrollbar;
import appeng.client.me.InternalSlotME;
import appeng.client.me.SlotDisconnected;
import appeng.client.me.SlotME;
@@ -70,10 +70,10 @@ import appeng.container.AEBaseContainer;
import appeng.container.slot.AppEngCraftingSlot;
import appeng.container.slot.AppEngSlot;
import appeng.container.slot.AppEngSlot.CalculatedValidity;
import appeng.container.slot.IOptionalSlot;
import appeng.container.slot.CraftingTermSlot;
import appeng.container.slot.DisabledSlot;
import appeng.container.slot.FakeSlot;
import appeng.container.slot.IOptionalSlot;
import appeng.container.slot.InaccessibleSlot;
import appeng.container.slot.OutputSlot;
import appeng.container.slot.PatternTermSlot;
@@ -98,8 +98,8 @@ final class AESubScreen {
label = previousContainerIcon.getDisplayName().getString();
}
ItemRenderer itemRenderer = gui.getMinecraft().getItemRenderer();
TabButton button = new TabButton(gui.getGuiLeft() + x, gui.getGuiTop() + y, previousContainerIcon,
label, itemRenderer, btn -> goBack());
TabButton button = new TabButton(gui.getGuiLeft() + x, gui.getGuiTop() + y, previousContainerIcon, label,
itemRenderer, btn -> goBack());
buttonAdder.accept(button);
return button;
}
@@ -42,7 +42,8 @@ public class CellWorkbenchScreen extends UpgradeableScreen<CellWorkbenchContaine
private ToggleButton copyMode;
public CellWorkbenchScreen(CellWorkbenchContainer container, PlayerInventory playerInventory, ITextComponent title) {
public CellWorkbenchScreen(CellWorkbenchContainer container, PlayerInventory playerInventory,
ITextComponent title) {
super(container, playerInventory, title);
this.ySize = 251;
}
@@ -51,12 +52,11 @@ public class CellWorkbenchScreen extends UpgradeableScreen<CellWorkbenchContaine
protected void addButtons() {
this.fuzzyMode = this.addButton(new SettingToggleButton<>(this.guiLeft - 18, this.guiTop + 68,
Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL, this::toggleFuzzyMode));
this.addButton(new ActionButton(this.guiLeft - 18, this.guiTop + 28, ActionItems.WRENCH,
act1 -> action("Partition")));
this.addButton(
new ActionButton(this.guiLeft - 18, this.guiTop + 8, ActionItems.CLOSE, act -> action("Clear")));
this.copyMode = this.addButton(new ToggleButton(this.guiLeft - 18, this.guiTop + 48, 11 * 16 + 5,
12 * 16 + 5, GuiText.CopyMode.getLocal(), GuiText.CopyModeDesc.getLocal(), act -> action("CopyMode")));
new ActionButton(this.guiLeft - 18, this.guiTop + 28, ActionItems.WRENCH, act1 -> action("Partition")));
this.addButton(new ActionButton(this.guiLeft - 18, this.guiTop + 8, ActionItems.CLOSE, act -> action("Clear")));
this.copyMode = this.addButton(new ToggleButton(this.guiLeft - 18, this.guiTop + 48, 11 * 16 + 5, 12 * 16 + 5,
GuiText.CopyMode.getLocal(), GuiText.CopyModeDesc.getLocal(), act -> action("CopyMode")));
}
@Override
@@ -48,8 +48,8 @@ public class CondenserScreen extends AEBaseScreen<CondenserContainer> {
this.mode = new ServerSettingToggleButton<>(128 + this.guiLeft, 52 + this.guiTop, Settings.CONDENSER_OUTPUT,
this.container.getOutput());
this.addButton(new ProgressBar(this.container, "guis/condenser.png", 120 + this.guiLeft, 25 + this.guiTop,
178, 25, 6, 18, Direction.VERTICAL, GuiText.StoredEnergy.getLocal()));
this.addButton(new ProgressBar(this.container, "guis/condenser.png", 120 + this.guiLeft, 25 + this.guiTop, 178,
25, 6, 18, Direction.VERTICAL, GuiText.StoredEnergy.getLocal()));
this.addButton(this.mode);
}
@@ -43,8 +43,8 @@ import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList;
import appeng.api.util.AEColor;
import appeng.client.gui.AEBaseScreen;
import appeng.client.gui.widgets.Scrollbar;
import appeng.client.gui.widgets.ISortSource;
import appeng.client.gui.widgets.Scrollbar;
import appeng.container.implementations.CraftingCPUContainer;
import appeng.core.AEConfig;
import appeng.core.localization.GuiText;
@@ -37,7 +37,8 @@ public class CraftingStatusScreen extends CraftingCPUScreen<CraftingStatusContai
private Button selectCPU;
public CraftingStatusScreen(CraftingStatusContainer container, PlayerInventory playerInventory, ITextComponent title) {
public CraftingStatusScreen(CraftingStatusContainer container, PlayerInventory playerInventory,
ITextComponent title) {
super(container, playerInventory, title);
this.subGui = new AESubScreen(this, container.getTarget());
}
@@ -55,8 +55,8 @@ public class CraftingTermScreen extends MEMonitorableScreen<CraftingTermContaine
@Override
public void init() {
super.init();
ActionButton clearBtn = this.addButton(new ActionButton(this.guiLeft + 92, this.guiTop + this.ySize - 156,
ActionItems.STASH, btn -> clear()));
ActionButton clearBtn = this.addButton(
new ActionButton(this.guiLeft + 92, this.guiTop + this.ySize - 156, ActionItems.STASH, btn -> clear()));
clearBtn.setHalfSize(true);
}
@@ -37,7 +37,8 @@ public class FormationPlaneScreen extends UpgradeableScreen<FormationPlaneContai
private SettingToggleButton<YesNo> placeMode;
public FormationPlaneScreen(FormationPlaneContainer container, PlayerInventory playerInventory, ITextComponent title) {
public FormationPlaneScreen(FormationPlaneContainer container, PlayerInventory playerInventory,
ITextComponent title) {
super(container, playerInventory, title);
this.ySize = 251;
}
@@ -46,8 +46,7 @@ public class InscriberScreen extends AEBaseScreen<InscriberContainer> {
public void init() {
super.init();
this.pb = new ProgressBar(this.container, "guis/inscriber.png", 135, 39, 135, 177, 6, 18,
Direction.VERTICAL);
this.pb = new ProgressBar(this.container, "guis/inscriber.png", 135, 39, 135, 177, 6, 18, Direction.VERTICAL);
this.addButton(this.pb);
}
@@ -49,8 +49,7 @@ public class InterfaceScreen extends UpgradeableScreen<InterfaceContainer> {
this.addButton(new TabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(),
this.itemRenderer, btn -> openPriorityGui()));
this.blockMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 8, Settings.BLOCK,
YesNo.NO);
this.blockMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 8, Settings.BLOCK, YesNo.NO);
this.addButton(this.blockMode);
this.interfaceMode = new ToggleButton(this.guiLeft - 18, this.guiTop + 26, 84, 85,
@@ -44,8 +44,8 @@ import appeng.api.AEApi;
import appeng.api.storage.channels.IItemStorageChannel;
import appeng.client.ActionKey;
import appeng.client.gui.AEBaseScreen;
import appeng.client.gui.widgets.Scrollbar;
import appeng.client.gui.widgets.AETextField;
import appeng.client.gui.widgets.Scrollbar;
import appeng.client.me.ClientDCInternalInv;
import appeng.client.me.SlotDisconnected;
import appeng.container.implementations.InterfaceTerminalContainer;
@@ -49,8 +49,8 @@ import appeng.core.AEConfig;
import appeng.core.AppEng;
import appeng.core.localization.GuiText;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.SwitchGuisPacket;
import appeng.core.sync.packets.ConfigValuePacket;
import appeng.core.sync.packets.SwitchGuisPacket;
import appeng.helpers.WirelessTerminalGuiObject;
import appeng.integration.abstraction.JEIFacade;
import appeng.parts.reporting.AbstractTerminalPart;
@@ -211,8 +211,8 @@ public class MEMonitorableScreen<T extends MEMonitorableContainer> extends AEBas
offset += 20;
if (!(this instanceof MEPortableCellScreen) || this instanceof WirelessTermScreen) {
this.addButton(new SettingToggleButton<>(this.guiLeft - 18, offset, Settings.TERMINAL_STYLE,
terminalStyle, this::toggleTerminalStyle));
this.addButton(new SettingToggleButton<>(this.guiLeft - 18, offset, Settings.TERMINAL_STYLE, terminalStyle,
this::toggleTerminalStyle));
}
this.searchField = new AETextField(this.font, this.guiLeft + Math.max(80, this.offsetX), this.guiTop + 4, 90,
@@ -25,7 +25,8 @@ import appeng.container.implementations.MEPortableCellContainer;
public class MEPortableCellScreen extends MEMonitorableScreen<MEPortableCellContainer> {
public MEPortableCellScreen(MEPortableCellContainer container, PlayerInventory playerInventory, ITextComponent title) {
public MEPortableCellScreen(MEPortableCellContainer container, PlayerInventory playerInventory,
ITextComponent title) {
super(container, playerInventory, title);
}
@@ -34,8 +34,8 @@ import appeng.api.config.ViewItems;
import appeng.api.storage.data.IAEItemStack;
import appeng.client.gui.AEBaseScreen;
import appeng.client.gui.widgets.CommonButtons;
import appeng.client.gui.widgets.Scrollbar;
import appeng.client.gui.widgets.ISortSource;
import appeng.client.gui.widgets.Scrollbar;
import appeng.client.me.ItemRepo;
import appeng.client.me.SlotME;
import appeng.container.implementations.NetworkStatusContainer;
@@ -48,7 +48,8 @@ public class NetworkStatusScreen extends AEBaseScreen<NetworkStatusContainer> im
private final int rows = 4;
private int tooltip = -1;
public NetworkStatusScreen(NetworkStatusContainer container, PlayerInventory playerInventory, ITextComponent title) {
public NetworkStatusScreen(NetworkStatusContainer container, PlayerInventory playerInventory,
ITextComponent title) {
super(container, playerInventory, title);
final Scrollbar scrollbar = new Scrollbar();
@@ -77,8 +77,8 @@ public class PatternTermScreen extends MEMonitorableScreen<PatternTermContainer>
this.substitutionsDisabledBtn.setHalfSize(true);
this.addButton(this.substitutionsDisabledBtn);
ActionButton clearBtn = new ActionButton(this.guiLeft + 74, this.guiTop + this.ySize - 163,
ActionItems.CLOSE, act -> clear());
ActionButton clearBtn = new ActionButton(this.guiLeft + 74, this.guiTop + this.ySize - 163, ActionItems.CLOSE,
act -> clear());
clearBtn.setHalfSize(true);
this.addButton(clearBtn);
@@ -30,7 +30,8 @@ import appeng.util.Platform;
public class SpatialIOPortScreen extends AEBaseScreen<SpatialIOPortContainer> {
public SpatialIOPortScreen(SpatialIOPortContainer container, PlayerInventory playerInventory, ITextComponent title) {
public SpatialIOPortScreen(SpatialIOPortContainer container, PlayerInventory playerInventory,
ITextComponent title) {
super(container, playerInventory, title);
this.ySize = 199;
}
@@ -34,8 +34,8 @@ import appeng.container.implementations.PriorityContainer;
import appeng.container.implementations.StorageBusContainer;
import appeng.core.localization.GuiText;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.SwitchGuisPacket;
import appeng.core.sync.packets.ConfigValuePacket;
import appeng.core.sync.packets.SwitchGuisPacket;
public class StorageBusScreen extends UpgradeableScreen<StorageBusContainer> {
@@ -26,7 +26,8 @@ import appeng.container.implementations.MEPortableCellContainer;
// FIXME: Extended from GuiPortableCell before... Why?
public class WirelessTermScreen extends MEMonitorableScreen<MEPortableCellContainer> {
public WirelessTermScreen(MEPortableCellContainer container, PlayerInventory playerInventory, ITextComponent title) {
public WirelessTermScreen(MEPortableCellContainer container, PlayerInventory playerInventory,
ITextComponent title) {
super(container, playerInventory, title);
}
@@ -69,8 +69,8 @@ public class SettingToggleButton<T extends Enum<T>> extends IconButton {
this(x, y, setting, val, t -> true, onPress);
}
public SettingToggleButton(final int x, final int y, final Settings setting, final T val,
Predicate<T> isValidValue, IHandler<SettingToggleButton<T>> onPress) {
public SettingToggleButton(final int x, final int y, final Settings setting, final T val, Predicate<T> isValidValue,
IHandler<SettingToggleButton<T>> onPress) {
super(x, y, SettingToggleButton::onPress);
this.onPress = onPress;
@@ -52,8 +52,8 @@ import net.minecraftforge.client.model.data.ModelDataMap;
import net.minecraftforge.client.model.data.ModelProperty;
import net.minecraftforge.client.model.pipeline.BakedQuadBuilder;
import appeng.decorative.solid.QuartzGlassBlock;
import appeng.decorative.solid.GlassState;
import appeng.decorative.solid.QuartzGlassBlock;
class GlassBakedModel implements IDynamicBakedModel {
@@ -115,7 +115,8 @@ class SpatialPylonBakedModel implements IDynamicBakedModel {
this.textures.get(getTextureTypeFromSideOutside(flags, ori, Direction.WEST)));
builder.addCube(0, 0, 0, 16, 16, 16);
if ((flags & SpatialPylonTileEntity.DISPLAY_POWERED_ENABLED) == SpatialPylonTileEntity.DISPLAY_POWERED_ENABLED) {
if ((flags
& SpatialPylonTileEntity.DISPLAY_POWERED_ENABLED) == SpatialPylonTileEntity.DISPLAY_POWERED_ENABLED) {
builder.setRenderFullBright(true);
}
@@ -48,8 +48,8 @@ public class CrankTESR extends TileEntityRenderer<CrankTileEntity> {
}
@Override
public void render(CrankTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers, int combinedLightIn,
int combinedOverlayIn) {
public void render(CrankTileEntity te, float partialTicks, MatrixStack ms, IRenderTypeBuffer buffers,
int combinedLightIn, int combinedOverlayIn) {
// Apply GL transformations relative to the center of the block: 1) TE rotation
// and 2) crank rotation
@@ -65,9 +65,9 @@ import appeng.container.slot.PlayerHotBarSlot;
import appeng.container.slot.PlayerInvSlot;
import appeng.core.AELog;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.ConfigValuePacket;
import appeng.core.sync.packets.InventoryActionPacket;
import appeng.core.sync.packets.TargetItemStackPacket;
import appeng.core.sync.packets.ConfigValuePacket;
import appeng.helpers.ICustomNameObject;
import appeng.helpers.InventoryAction;
import appeng.me.helpers.PlayerSource;
@@ -30,8 +30,8 @@ import net.minecraft.util.text.ITextComponent;
import appeng.container.AEBaseContainer;
import appeng.core.AELog;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.ProgressBarPacket;
import appeng.core.sync.packets.ConfigValuePacket;
import appeng.core.sync.packets.ProgressBarPacket;
/**
* This class is responsible for synchronizing Container-fields from server to
@@ -44,8 +44,8 @@ import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IItemList;
import appeng.container.ContainerLocator;
import appeng.container.guisync.GuiSync;
import appeng.container.slot.OptionalRestrictedInputSlot;
import appeng.container.slot.FakeTypeOnlySlot;
import appeng.container.slot.OptionalRestrictedInputSlot;
import appeng.container.slot.RestrictedInputSlot;
import appeng.tile.misc.CellWorkbenchTileEntity;
import appeng.util.EnumCycler;
@@ -33,8 +33,8 @@ public class ChestContainer extends AEBaseContainer {
public static ContainerType<ChestContainer> TYPE;
private static final ContainerHelper<ChestContainer, ChestTileEntity> helper = new ContainerHelper<>(ChestContainer::new,
ChestTileEntity.class, SecurityPermissions.BUILD);
private static final ContainerHelper<ChestContainer, ChestTileEntity> helper = new ContainerHelper<>(
ChestContainer::new, ChestTileEntity.class, SecurityPermissions.BUILD);
public ChestContainer(int id, final PlayerInventory ip, final ChestTileEntity chest) {
super(TYPE, id, ip, chest, null);
@@ -44,8 +44,8 @@ import appeng.container.AEBaseContainer;
import appeng.container.ContainerLocator;
import appeng.container.guisync.GuiSync;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.MEInventoryUpdatePacket;
import appeng.core.sync.packets.ConfigValuePacket;
import appeng.core.sync.packets.MEInventoryUpdatePacket;
import appeng.helpers.ICustomNameObject;
import appeng.me.cluster.IAEMultiBlock;
import appeng.me.cluster.implementations.CraftingCPUCluster;
@@ -32,8 +32,8 @@ public class DriveContainer extends AEBaseContainer {
public static ContainerType<DriveContainer> TYPE;
private static final ContainerHelper<DriveContainer, DriveTileEntity> helper = new ContainerHelper<>(DriveContainer::new,
DriveTileEntity.class);
private static final ContainerHelper<DriveContainer, DriveTileEntity> helper = new ContainerHelper<>(
DriveContainer::new, DriveTileEntity.class);
public static DriveContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer buf) {
return helper.fromNetwork(windowId, inv, buf);
@@ -31,8 +31,8 @@ import appeng.api.config.Upgrades;
import appeng.api.config.YesNo;
import appeng.container.ContainerLocator;
import appeng.container.guisync.GuiSync;
import appeng.container.slot.OptionalTypeOnlyFakeSlot;
import appeng.container.slot.FakeTypeOnlySlot;
import appeng.container.slot.OptionalTypeOnlyFakeSlot;
import appeng.container.slot.RestrictedInputSlot;
import appeng.parts.automation.FormationPlanePart;
import appeng.util.Platform;
@@ -68,8 +68,8 @@ import appeng.container.guisync.GuiSync;
import appeng.container.slot.RestrictedInputSlot;
import appeng.core.AELog;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.MEInventoryUpdatePacket;
import appeng.core.sync.packets.ConfigValuePacket;
import appeng.core.sync.packets.MEInventoryUpdatePacket;
import appeng.me.helpers.ChannelPowerSrc;
import appeng.util.ConfigManager;
import appeng.util.IConfigManagerHost;
@@ -54,9 +54,9 @@ import appeng.api.storage.data.IItemList;
import appeng.container.ContainerLocator;
import appeng.container.ContainerNull;
import appeng.container.guisync.GuiSync;
import appeng.container.slot.FakeCraftingMatrixSlot;
import appeng.container.slot.IOptionalSlotHost;
import appeng.container.slot.OptionalFakeSlot;
import appeng.container.slot.FakeCraftingMatrixSlot;
import appeng.container.slot.PatternOutputsSlot;
import appeng.container.slot.PatternTermSlot;
import appeng.container.slot.RestrictedInputSlot;
@@ -40,8 +40,8 @@ import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList;
import appeng.container.ContainerLocator;
import appeng.container.guisync.GuiSync;
import appeng.container.slot.OptionalTypeOnlyFakeSlot;
import appeng.container.slot.FakeTypeOnlySlot;
import appeng.container.slot.OptionalTypeOnlyFakeSlot;
import appeng.container.slot.RestrictedInputSlot;
import appeng.parts.misc.StorageBusPart;
import appeng.util.Platform;
@@ -43,10 +43,10 @@ import appeng.api.util.IConfigManager;
import appeng.container.AEBaseContainer;
import appeng.container.ContainerLocator;
import appeng.container.guisync.GuiSync;
import appeng.container.slot.FakeTypeOnlySlot;
import appeng.container.slot.IOptionalSlotHost;
import appeng.container.slot.OptionalFakeSlot;
import appeng.container.slot.OptionalTypeOnlyFakeSlot;
import appeng.container.slot.FakeTypeOnlySlot;
import appeng.container.slot.RestrictedInputSlot;
import appeng.items.contents.NetworkToolViewer;
import appeng.items.tools.NetworkToolItem;
@@ -52,7 +52,8 @@ public class VibrationChamberContainer extends AEBaseContainer implements IProgr
@GuiSync(1)
public int remainingBurnTime = 0;
public VibrationChamberContainer(int id, final PlayerInventory ip, final VibrationChamberTileEntity vibrationChamber) {
public VibrationChamberContainer(int id, final PlayerInventory ip,
final VibrationChamberTileEntity vibrationChamber) {
super(TYPE, id, ip, vibrationChamber, null);
this.vibrationChamber = vibrationChamber;
@@ -23,9 +23,8 @@ import appeng.client.gui.widgets.ProgressBar;
/**
* This interface provides the data for anything simulating a progress.
*
* Its main use is in combination with the
* {@link ProgressBar}, which ensures to scale it
* to a percentage of 0 to 100.
* Its main use is in combination with the {@link ProgressBar}, which ensures to
* scale it to a percentage of 0 to 100.
*/
public interface IProgressProvider {
@@ -40,50 +40,50 @@ import appeng.block.AEBaseBlockItemChargeable;
import appeng.block.crafting.AbstractCraftingUnitBlock.CraftingUnitType;
import appeng.block.crafting.CraftingMonitorBlock;
import appeng.block.crafting.CraftingStorageBlock;
import appeng.block.crafting.MolecularAssemblerBlock;
import appeng.block.crafting.CraftingUnitBlock;
import appeng.block.crafting.CraftingStorageItem;
import appeng.block.crafting.CraftingUnitBlock;
import appeng.block.crafting.MolecularAssemblerBlock;
import appeng.block.grindstone.CrankBlock;
import appeng.block.grindstone.GrinderBlock;
import appeng.block.misc.CellWorkbenchBlock;
import appeng.block.misc.ChargerBlock;
import appeng.block.misc.CondenserBlock;
import appeng.block.misc.InscriberBlock;
import appeng.block.misc.InscriberRendering;
import appeng.block.misc.InterfaceBlock;
import appeng.block.misc.LightDetectorBlock;
import appeng.block.misc.QuartzFixtureBlock;
import appeng.block.misc.QuartzGrowthAcceleratorBlock;
import appeng.block.misc.SecurityStationBlock;
import appeng.block.misc.SecurityStationRendering;
import appeng.block.misc.SkyCompassBlock;
import appeng.block.misc.SkyCompassRendering;
import appeng.block.misc.TinyTNTBlock;
import appeng.block.misc.VibrationChamberBlock;
import appeng.block.misc.InscriberRendering;
import appeng.block.misc.SecurityStationRendering;
import appeng.block.misc.SkyCompassRendering;
import appeng.block.networking.CableBusBlock;
import appeng.block.networking.CableBusRendering;
import appeng.block.networking.ControllerBlock;
import appeng.block.networking.ControllerRendering;
import appeng.block.networking.CreativeEnergyCellBlock;
import appeng.block.networking.DenseEnergyCellBlock;
import appeng.block.networking.EnergyAcceptorBlock;
import appeng.block.networking.EnergyCellBlock;
import appeng.block.networking.WirelessBlock;
import appeng.block.networking.CableBusRendering;
import appeng.block.networking.ControllerRendering;
import appeng.block.networking.WirelessRendering;
import appeng.block.paint.PaintSplotchesBlock;
import appeng.block.paint.PaintSplotchesRendering;
import appeng.block.qnb.QuantumBridgeRendering;
import appeng.block.qnb.QuantumLinkChamberBlock;
import appeng.block.qnb.QuantumRingBlock;
import appeng.block.qnb.QuantumBridgeRendering;
import appeng.block.spatial.MatrixFrameBlock;
import appeng.block.spatial.SpatialIOPortBlock;
import appeng.block.spatial.SpatialPylonBlock;
import appeng.block.storage.ChestBlock;
import appeng.block.storage.ChestRendering;
import appeng.block.storage.DriveBlock;
import appeng.block.storage.DriveRendering;
import appeng.block.storage.IOPortBlock;
import appeng.block.storage.SkyChestBlock;
import appeng.block.storage.ChestRendering;
import appeng.block.storage.DriveRendering;
import appeng.bootstrap.BlockRenderingCustomizer;
import appeng.bootstrap.FeatureFactory;
import appeng.bootstrap.IBlockRendering;
@@ -101,14 +101,14 @@ import appeng.client.render.tesr.CrankTESR;
import appeng.client.render.tesr.DriveLedTileEntityRenderer;
import appeng.client.render.tesr.SkyChestTESR;
import appeng.debug.ChunkLoaderBlock;
import appeng.debug.CubeGeneratorBlock;
import appeng.debug.EnergyGeneratorBlock;
import appeng.debug.ItemGenBlock;
import appeng.debug.PhantomNodeBlock;
import appeng.debug.ChunkLoaderTileEntity;
import appeng.debug.CubeGeneratorBlock;
import appeng.debug.CubeGeneratorTileEntity;
import appeng.debug.EnergyGeneratorBlock;
import appeng.debug.EnergyGeneratorTileEntity;
import appeng.debug.ItemGenBlock;
import appeng.debug.ItemGenTileEntity;
import appeng.debug.PhantomNodeBlock;
import appeng.debug.PhantomNodeTileEntity;
import appeng.decorative.AEDecorativeBlock;
import appeng.decorative.solid.ChargedQuartzOreBlock;
@@ -122,10 +122,10 @@ import appeng.entity.TinyTNTPrimedEntity;
import appeng.fluids.block.FluidInterfaceBlock;
import appeng.fluids.tile.FluidInterfaceTileEntity;
import appeng.hooks.TinyTNTDispenseItemBehavior;
import appeng.tile.crafting.MolecularAssemblerRenderer;
import appeng.tile.crafting.CraftingMonitorTileEntity;
import appeng.tile.crafting.CraftingStorageTileEntity;
import appeng.tile.crafting.CraftingTileEntity;
import appeng.tile.crafting.MolecularAssemblerRenderer;
import appeng.tile.crafting.MolecularAssemblerTileEntity;
import appeng.tile.grindstone.CrankTileEntity;
import appeng.tile.grindstone.GrinderTileEntity;
@@ -313,7 +313,8 @@ public final class ApiBlocks implements IBlocks {
Block.Properties skyStoneChestProps = defaultProps(Material.ROCK).hardnessAndResistance(50, 150).notSolid();
TileEntityDefinition skyChestTile = registry.tileEntity("sky_chest", SkyChestTileEntity.class, SkyChestTileEntity::new)
TileEntityDefinition skyChestTile = registry
.tileEntity("sky_chest", SkyChestTileEntity.class, SkyChestTileEntity::new)
.rendering(new TileEntityRenderingCustomizer<SkyChestTileEntity>() {
@Override
@OnlyIn(Dist.CLIENT)
@@ -337,7 +338,8 @@ public final class ApiBlocks implements IBlocks {
this.grindstone = registry
.block("grindstone", () -> new GrinderBlock(defaultProps(Material.ROCK).hardnessAndResistance(3.2f)))
.features(AEFeature.GRIND_STONE)
.tileEntity(registry.tileEntity("grindstone", GrinderTileEntity.class, GrinderTileEntity::new).build()).build();
.tileEntity(registry.tileEntity("grindstone", GrinderTileEntity.class, GrinderTileEntity::new).build())
.build();
this.crank = registry
.block("crank",
() -> new CrankBlock(
@@ -359,7 +361,8 @@ public final class ApiBlocks implements IBlocks {
.build();
this.wirelessAccessPoint = registry.block("wireless_access_point", WirelessBlock::new)
.features(AEFeature.WIRELESS_ACCESS_TERMINAL)
.tileEntity(registry.tileEntity("wireless_access_point", WirelessTileEntity.class, WirelessTileEntity::new).build())
.tileEntity(registry
.tileEntity("wireless_access_point", WirelessTileEntity.class, WirelessTileEntity::new).build())
.rendering(new WirelessRendering()).build();
this.charger = registry.block("charger", ChargerBlock::new).features(AEFeature.CHARGER)
.tileEntity(registry.tileEntity("charger", ChargerTileEntity.class, ChargerTileEntity::new)
@@ -385,8 +388,10 @@ public final class ApiBlocks implements IBlocks {
.registerDispenseBehavior(item, new TinyTNTDispenseItemBehavior()))
.build();
this.securityStation = registry.block("security_station", SecurityStationBlock::new)
.features(AEFeature.SECURITY).tileEntity(registry
.tileEntity("security_station", SecurityStationTileEntity.class, SecurityStationTileEntity::new).build())
.features(AEFeature.SECURITY)
.tileEntity(registry
.tileEntity("security_station", SecurityStationTileEntity.class, SecurityStationTileEntity::new)
.build())
.rendering(new SecurityStationRendering()).build();
TileEntityDefinition quantumRingTile = registry
@@ -398,14 +403,17 @@ public final class ApiBlocks implements IBlocks {
.features(AEFeature.QUANTUM_NETWORK_BRIDGE).tileEntity(quantumRingTile)
.rendering(new QuantumBridgeRendering()).build();
this.spatialPylon = registry.block("spatial_pylon", SpatialPylonBlock::new).features(AEFeature.SPATIAL_IO)
.tileEntity(registry.tileEntity("spatial_pylon", SpatialPylonTileEntity.class, SpatialPylonTileEntity::new).build())
.tileEntity(registry
.tileEntity("spatial_pylon", SpatialPylonTileEntity.class, SpatialPylonTileEntity::new).build())
.rendering(new SpatialPylonRendering()).build();
this.spatialIOPort = registry.block("spatial_io_port", SpatialIOPortBlock::new).features(AEFeature.SPATIAL_IO)
.tileEntity(
registry.tileEntity("spatial_io_port", SpatialIOPortTileEntity.class, SpatialIOPortTileEntity::new).build())
.tileEntity(registry
.tileEntity("spatial_io_port", SpatialIOPortTileEntity.class, SpatialIOPortTileEntity::new)
.build())
.build();
this.controller = registry.block("controller", ControllerBlock::new).features(AEFeature.CHANNELS)
.tileEntity(registry.tileEntity("controller", ControllerTileEntity.class, ControllerTileEntity::new).build())
this.controller = registry
.block("controller", ControllerBlock::new).features(AEFeature.CHANNELS).tileEntity(registry
.tileEntity("controller", ControllerTileEntity.class, ControllerTileEntity::new).build())
.rendering(new ControllerRendering()).build();
this.drive = registry.block("drive", DriveBlock::new).features(AEFeature.STORAGE_CELLS, AEFeature.ME_DRIVE)
.tileEntity(registry.tileEntity("drive", DriveTileEntity.class, DriveTileEntity::new)
@@ -421,46 +429,53 @@ public final class ApiBlocks implements IBlocks {
.tileEntity(registry.tileEntity("chest", ChestTileEntity.class, ChestTileEntity::new).build())
.rendering(new ChestRendering()).build();
this.iface = registry.block("interface", InterfaceBlock::new).features(AEFeature.INTERFACE)
.tileEntity(registry.tileEntity("interface", InterfaceTileEntity.class, InterfaceTileEntity::new).build()).build();
.tileEntity(
registry.tileEntity("interface", InterfaceTileEntity.class, InterfaceTileEntity::new).build())
.build();
this.fluidIface = registry.block("fluid_interface", FluidInterfaceBlock::new)
.features(AEFeature.FLUID_INTERFACE).tileEntity(registry
.tileEntity("fluid_interface", FluidInterfaceTileEntity.class, FluidInterfaceTileEntity::new).build())
.features(AEFeature.FLUID_INTERFACE)
.tileEntity(registry
.tileEntity("fluid_interface", FluidInterfaceTileEntity.class, FluidInterfaceTileEntity::new)
.build())
.build();
this.cellWorkbench = registry.block("cell_workbench", CellWorkbenchBlock::new).features(AEFeature.STORAGE_CELLS)
.tileEntity(
registry.tileEntity("cell_workbench", CellWorkbenchTileEntity.class, CellWorkbenchTileEntity::new).build())
.tileEntity(registry
.tileEntity("cell_workbench", CellWorkbenchTileEntity.class, CellWorkbenchTileEntity::new)
.build())
.build();
this.iOPort = registry.block("io_port", IOPortBlock::new).features(AEFeature.STORAGE_CELLS, AEFeature.IO_PORT)
.tileEntity(registry.tileEntity("io_port", IOPortTileEntity.class, IOPortTileEntity::new).build()).build();
.tileEntity(registry.tileEntity("io_port", IOPortTileEntity.class, IOPortTileEntity::new).build())
.build();
this.condenser = registry.block("condenser", CondenserBlock::new).features(AEFeature.CONDENSER)
.tileEntity(registry.tileEntity("condenser", CondenserTileEntity.class, CondenserTileEntity::new).build()).build();
.tileEntity(
registry.tileEntity("condenser", CondenserTileEntity.class, CondenserTileEntity::new).build())
.build();
this.energyAcceptor = registry.block("energy_acceptor", EnergyAcceptorBlock::new)
.features(AEFeature.ENERGY_ACCEPTOR).tileEntity(registry
.tileEntity("energy_acceptor", EnergyAcceptorTileEntity.class, EnergyAcceptorTileEntity::new).build())
.features(AEFeature.ENERGY_ACCEPTOR)
.tileEntity(registry
.tileEntity("energy_acceptor", EnergyAcceptorTileEntity.class, EnergyAcceptorTileEntity::new)
.build())
.build();
this.vibrationChamber = registry.block("vibration_chamber", VibrationChamberBlock::new)
.features(AEFeature.POWER_GEN)
.tileEntity(registry
.tileEntity("vibration_chamber", VibrationChamberTileEntity.class, VibrationChamberTileEntity::new).build())
.features(AEFeature.POWER_GEN).tileEntity(registry.tileEntity("vibration_chamber",
VibrationChamberTileEntity.class, VibrationChamberTileEntity::new).build())
.build();
this.quartzGrowthAccelerator = registry.block("quartz_growth_accelerator", QuartzGrowthAcceleratorBlock::new)
.tileEntity(registry.tileEntity("quartz_growth_accelerator", QuartzGrowthAcceleratorTileEntity.class,
QuartzGrowthAcceleratorTileEntity::new).build())
.features(AEFeature.CRYSTAL_GROWTH_ACCELERATOR).build();
this.energyCell = registry.block("energy_cell", EnergyCellBlock::new).features(AEFeature.ENERGY_CELLS)
.item(AEBaseBlockItemChargeable::new)
.tileEntity(registry.tileEntity("energy_cell", EnergyCellTileEntity.class, EnergyCellTileEntity::new).build())
.item(AEBaseBlockItemChargeable::new).tileEntity(registry
.tileEntity("energy_cell", EnergyCellTileEntity.class, EnergyCellTileEntity::new).build())
.build();
this.energyCellDense = registry.block("dense_energy_cell", DenseEnergyCellBlock::new)
.features(AEFeature.ENERGY_CELLS, AEFeature.DENSE_ENERGY_CELLS).item(AEBaseBlockItemChargeable::new)
.tileEntity(registry
.tileEntity("dense_energy_cell", DenseEnergyCellTileEntity.class, DenseEnergyCellTileEntity::new).build())
.tileEntity(registry.tileEntity("dense_energy_cell", DenseEnergyCellTileEntity.class,
DenseEnergyCellTileEntity::new).build())
.build();
this.energyCellCreative = registry.block("creative_energy_cell", CreativeEnergyCellBlock::new)
.features(AEFeature.CREATIVE)
.tileEntity(registry
.tileEntity("creative_energy_cell", CreativeEnergyCellTileEntity.class, CreativeEnergyCellTileEntity::new)
.build())
.features(AEFeature.CREATIVE).tileEntity(registry.tileEntity("creative_energy_cell",
CreativeEnergyCellTileEntity.class, CreativeEnergyCellTileEntity::new).build())
.build();
TileEntityDefinition craftingUnit = registry
@@ -477,7 +492,8 @@ public final class ApiBlocks implements IBlocks {
.rendering(new CraftingCubeRendering()).tileEntity(craftingUnit).build();
TileEntityDefinition craftingStorage = registry
.tileEntity("crafting_storage", CraftingStorageTileEntity.class, CraftingStorageTileEntity::new).build();
.tileEntity("crafting_storage", CraftingStorageTileEntity.class, CraftingStorageTileEntity::new)
.build();
this.craftingStorage1k = crafting
.block("1k_crafting_storage",
() -> new CraftingStorageBlock(craftingBlockProps, CraftingUnitType.STORAGE_1K))
@@ -533,7 +549,8 @@ public final class ApiBlocks implements IBlocks {
}
})
.tileEntity(registry
.tileEntity("molecular_assembler", MolecularAssemblerTileEntity.class, MolecularAssemblerTileEntity::new)
.tileEntity("molecular_assembler", MolecularAssemblerTileEntity.class,
MolecularAssemblerTileEntity::new)
.rendering(new TileEntityRenderingCustomizer<MolecularAssemblerTileEntity>() {
@Override
@OnlyIn(Dist.CLIENT)
@@ -545,8 +562,9 @@ public final class ApiBlocks implements IBlocks {
this.lightDetector = registry.block("light_detector", LightDetectorBlock::new)
.features(AEFeature.LIGHT_DETECTOR)
.tileEntity(
registry.tileEntity("light_detector", LightDetectorTileEntity.class, LightDetectorTileEntity::new).build())
.tileEntity(registry
.tileEntity("light_detector", LightDetectorTileEntity.class, LightDetectorTileEntity::new)
.build())
.rendering(new BlockRenderingCustomizer() {
@Override
@OnlyIn(Dist.CLIENT)
@@ -554,8 +572,9 @@ public final class ApiBlocks implements IBlocks {
rendering.renderType(RenderType.getCutout());
}
}).build();
this.paint = registry.block("paint", PaintSplotchesBlock::new).features(AEFeature.PAINT_BALLS)
.tileEntity(registry.tileEntity("paint", PaintSplotchesTileEntity.class, PaintSplotchesTileEntity::new).build())
this.paint = registry
.block("paint", PaintSplotchesBlock::new).features(AEFeature.PAINT_BALLS).tileEntity(registry
.tileEntity("paint", PaintSplotchesTileEntity.class, PaintSplotchesTileEntity::new).build())
.rendering(new PaintSplotchesRendering()).build();
this.skyStoneStairs = deco
@@ -623,25 +642,32 @@ public final class ApiBlocks implements IBlocks {
this.itemGen = registry.block("debug_item_gen", ItemGenBlock::new)
.features(AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE)
.tileEntity(registry.tileEntity("debug_item_gen", ItemGenTileEntity.class, ItemGenTileEntity::new).build()).build();
.tileEntity(
registry.tileEntity("debug_item_gen", ItemGenTileEntity.class, ItemGenTileEntity::new).build())
.build();
this.chunkLoader = registry.block("debug_chunk_loader", ChunkLoaderBlock::new)
.features(AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE)
.tileEntity(
registry.tileEntity("debug_chunk_loader", ChunkLoaderTileEntity.class, ChunkLoaderTileEntity::new).build())
.tileEntity(registry
.tileEntity("debug_chunk_loader", ChunkLoaderTileEntity.class, ChunkLoaderTileEntity::new)
.build())
.build();
this.phantomNode = registry.block("debug_phantom_node", PhantomNodeBlock::new)
.features(AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE)
.tileEntity(
registry.tileEntity("debug_phantom_node", PhantomNodeTileEntity.class, PhantomNodeTileEntity::new).build())
.tileEntity(registry
.tileEntity("debug_phantom_node", PhantomNodeTileEntity.class, PhantomNodeTileEntity::new)
.build())
.build();
this.cubeGenerator = registry.block("debug_cube_gen", CubeGeneratorBlock::new)
.features(AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE)
.tileEntity(
registry.tileEntity("debug_cube_gen", CubeGeneratorTileEntity.class, CubeGeneratorTileEntity::new).build())
.tileEntity(registry
.tileEntity("debug_cube_gen", CubeGeneratorTileEntity.class, CubeGeneratorTileEntity::new)
.build())
.build();
this.energyGenerator = registry.block("debug_energy_gen", EnergyGeneratorBlock::new)
.features(AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE).tileEntity(registry
.tileEntity("debug_energy_gen", EnergyGeneratorTileEntity.class, EnergyGeneratorTileEntity::new).build())
.features(AEFeature.UNSUPPORTED_DEVELOPER_TOOLS, AEFeature.CREATIVE)
.tileEntity(registry
.tileEntity("debug_energy_gen", EnergyGeneratorTileEntity.class, EnergyGeneratorTileEntity::new)
.build())
.build();
}
@@ -59,17 +59,17 @@ import appeng.parts.misc.InvertedToggleBusPart;
import appeng.parts.misc.StorageBusPart;
import appeng.parts.misc.ToggleBusPart;
import appeng.parts.networking.CoveredCablePart;
import appeng.parts.networking.GlassCablePart;
import appeng.parts.networking.SmartCablePart;
import appeng.parts.networking.CoveredDenseCablePart;
import appeng.parts.networking.SmartDenseCablePart;
import appeng.parts.networking.GlassCablePart;
import appeng.parts.networking.QuartzFiberPart;
import appeng.parts.networking.SmartCablePart;
import appeng.parts.networking.SmartDenseCablePart;
import appeng.parts.p2p.FEP2PTunnelPart;
import appeng.parts.p2p.FluidP2PTunnelPart;
import appeng.parts.p2p.ItemP2PTunnelPart;
import appeng.parts.p2p.LightP2PTunnelPart;
import appeng.parts.p2p.RedstoneP2PTunnelPart;
import appeng.parts.p2p.MEP2PTunnelPart;
import appeng.parts.p2p.RedstoneP2PTunnelPart;
import appeng.parts.reporting.ConversionMonitorPart;
import appeng.parts.reporting.CraftingTerminalPart;
import appeng.parts.reporting.DarkPanelPart;
@@ -186,11 +186,13 @@ public final class ApiParts implements IParts {
this.p2PTunnelRedstone = createPart(registry, "redstone_p2p_tunnel", PartType.P2P_TUNNEL_REDSTONE,
RedstoneP2PTunnelPart::new);
this.p2PTunnelItems = createPart(registry, "item_p2p_tunnel", PartType.P2P_TUNNEL_ITEM, ItemP2PTunnelPart::new);
this.p2PTunnelFluids = createPart(registry, "fluid_p2p_tunnel", PartType.P2P_TUNNEL_FLUID, FluidP2PTunnelPart::new);
this.p2PTunnelFluids = createPart(registry, "fluid_p2p_tunnel", PartType.P2P_TUNNEL_FLUID,
FluidP2PTunnelPart::new);
this.p2PTunnelEU = null; // FIXME createPart( "ic2_p2p_tunnel", PartType.P2P_TUNNEL_IC2,
// PartP2PIC2Power::new);
this.p2PTunnelFE = createPart(registry, "fe_p2p_tunnel", PartType.P2P_TUNNEL_FE, FEP2PTunnelPart::new);
this.p2PTunnelLight = createPart(registry, "light_p2p_tunnel", PartType.P2P_TUNNEL_LIGHT, LightP2PTunnelPart::new);
this.p2PTunnelLight = createPart(registry, "light_p2p_tunnel", PartType.P2P_TUNNEL_LIGHT,
LightP2PTunnelPart::new);
this.interfaceTerminal = createPart(registry, "interface_terminal", PartType.INTERFACE_TERMINAL,
InterfaceTerminalPart::new);
this.fluidTerminal = createPart(registry, "fluid_terminal", PartType.FLUID_TERMINAL, FluidTerminalPart::new);
@@ -40,7 +40,7 @@ public abstract class BasePacket {
}
public final int getPacketID() {
return PacketHandlerBase.PacketTypes.getID(this.getClass()).ordinal();
return BasePacketHandler.PacketTypes.getID(this.getClass()).ordinal();
}
public void clientPacketData(final INetworkInfo network, final PlayerEntity player) {
@@ -22,10 +22,11 @@ import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;
import appeng.core.sync.packets.*;
import net.minecraft.network.PacketBuffer;
public class PacketHandlerBase {
import appeng.core.sync.packets.*;
public class BasePacketHandler {
private static final Map<Class<? extends BasePacket>, PacketTypes> REVERSE_LOOKUP = new HashMap<>();
public enum PacketTypes {
@@ -25,9 +25,9 @@ import net.minecraft.network.PacketBuffer;
import appeng.core.AELog;
import appeng.core.sync.BasePacket;
import appeng.core.sync.PacketHandlerBase;
import appeng.core.sync.BasePacketHandler;
public class ClientPacketHandler extends PacketHandlerBase implements IPacketHandler {
public class ClientPacketHandler extends BasePacketHandler implements IPacketHandler {
@Override
public void onPacketData(final INetworkInfo manager, final INetHandler handler, final PacketBuffer packet,
@@ -24,9 +24,9 @@ import net.minecraft.network.PacketBuffer;
import appeng.core.AELog;
import appeng.core.sync.BasePacket;
import appeng.core.sync.PacketHandlerBase;
import appeng.core.sync.BasePacketHandler;
public final class ServerPacketHandler extends PacketHandlerBase implements IPacketHandler {
public final class ServerPacketHandler extends BasePacketHandler implements IPacketHandler {
@Override
public void onPacketData(final INetworkInfo manager, final INetHandler handler, final PacketBuffer packet,
@@ -18,8 +18,6 @@
package appeng.core.sync.packets;
import appeng.client.gui.implementations.CraftingCPUScreen;
import appeng.core.sync.BasePacket;
import io.netty.buffer.Unpooled;
import net.minecraft.client.Minecraft;
@@ -34,6 +32,7 @@ import appeng.api.config.FuzzyMode;
import appeng.api.config.Settings;
import appeng.api.util.IConfigManager;
import appeng.api.util.IConfigurableObject;
import appeng.client.gui.implementations.CraftingCPUScreen;
import appeng.container.AEBaseContainer;
import appeng.container.implementations.CellWorkbenchContainer;
import appeng.container.implementations.CraftConfirmContainer;
@@ -46,6 +45,7 @@ import appeng.container.implementations.PriorityContainer;
import appeng.container.implementations.QuartzKnifeContainer;
import appeng.container.implementations.SecurityStationContainer;
import appeng.container.implementations.StorageBusContainer;
import appeng.core.sync.BasePacket;
import appeng.core.sync.network.INetworkInfo;
import appeng.fluids.container.FluidLevelEmitterContainer;
import appeng.fluids.container.FluidStorageBusContainer;
@@ -35,7 +35,8 @@ import appeng.fluids.helper.DualityFluidInterface;
import appeng.fluids.util.IAEFluidTank;
public class FluidInterfaceScreen extends UpgradeableScreen<FluidInterfaceContainer> {
public FluidInterfaceScreen(FluidInterfaceContainer container, PlayerInventory playerInventory, ITextComponent title) {
public FluidInterfaceScreen(FluidInterfaceContainer container, PlayerInventory playerInventory,
ITextComponent title) {
super(container, playerInventory, title);
this.ySize = 231;
}
@@ -54,8 +55,8 @@ public class FluidInterfaceScreen extends UpgradeableScreen<FluidInterfaceContai
this.guiSlots.add(new FluidSlotWidget(configFluids, i, i, 35 + 18 * i, 35));
}
this.addButton(new TabButton(this.getGuiLeft() + 154, this.getGuiTop(), 2 + 4 * 16,
GuiText.Priority.getLocal(), this.itemRenderer, btn -> openPriorityGui()));
this.addButton(new TabButton(this.getGuiLeft() + 154, this.getGuiTop(), 2 + 4 * 16, GuiText.Priority.getLocal(),
this.itemRenderer, btn -> openPriorityGui()));
}
@Override
@@ -34,8 +34,8 @@ import appeng.client.gui.widgets.TabButton;
import appeng.container.implementations.PriorityContainer;
import appeng.core.localization.GuiText;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.SwitchGuisPacket;
import appeng.core.sync.packets.ConfigValuePacket;
import appeng.core.sync.packets.SwitchGuisPacket;
import appeng.fluids.client.gui.widgets.FluidSlotWidget;
import appeng.fluids.client.gui.widgets.OptionalFluidSlotWidget;
import appeng.fluids.container.FluidStorageBusContainer;
@@ -88,8 +88,8 @@ public class FluidStorageBusScreen extends UpgradeableScreen<FluidStorageBusCont
this.fuzzyMode = new ServerSettingToggleButton<>(this.guiLeft - 18, this.guiTop + 88, Settings.FUZZY_MODE,
FuzzyMode.IGNORE_ALL);
addButton(this.addButton(new TabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16,
GuiText.Priority.getLocal(), this.itemRenderer, btn -> openPriorityGui())));
addButton(this.addButton(new TabButton(this.guiLeft + 154, this.guiTop, 2 + 4 * 16, GuiText.Priority.getLocal(),
this.itemRenderer, btn -> openPriorityGui())));
this.addButton(this.storageFilter);
this.addButton(this.fuzzyMode);
@@ -41,10 +41,10 @@ import appeng.api.storage.data.IAEFluidStack;
import appeng.api.util.IConfigManager;
import appeng.client.ActionKey;
import appeng.client.gui.AEBaseMEScreen;
import appeng.client.gui.widgets.AETextField;
import appeng.client.gui.widgets.ISortSource;
import appeng.client.gui.widgets.Scrollbar;
import appeng.client.gui.widgets.SettingToggleButton;
import appeng.client.gui.widgets.ISortSource;
import appeng.client.gui.widgets.AETextField;
import appeng.client.me.FluidRepo;
import appeng.client.me.InternalFluidSlotME;
import appeng.client.me.SlotFluidME;
@@ -52,8 +52,8 @@ import appeng.core.AELog;
import appeng.core.AppEng;
import appeng.core.localization.GuiText;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.InventoryActionPacket;
import appeng.core.sync.packets.ConfigValuePacket;
import appeng.core.sync.packets.InventoryActionPacket;
import appeng.fluids.container.FluidTerminalContainer;
import appeng.fluids.container.slots.IMEFluidSlot;
import appeng.helpers.InventoryAction;
@@ -65,7 +65,8 @@ import appeng.util.Platform;
* @version rv6 - 12/05/2018
* @since rv6 12/05/2018
*/
public class FluidTerminalScreen extends AEBaseMEScreen<FluidTerminalContainer> implements ISortSource, IConfigManagerHost {
public class FluidTerminalScreen extends AEBaseMEScreen<FluidTerminalContainer>
implements ISortSource, IConfigManagerHost {
private final List<SlotFluidME> meFluidSlots = new LinkedList<>();
private final FluidRepo repo;
private final IConfigManager configSrc;
@@ -79,7 +80,8 @@ public class FluidTerminalScreen extends AEBaseMEScreen<FluidTerminalContainer>
private SettingToggleButton<SortOrder> sortByBox;
private SettingToggleButton<SortDir> sortDirBox;
public FluidTerminalScreen(FluidTerminalContainer container, PlayerInventory playerInventory, ITextComponent title) {
public FluidTerminalScreen(FluidTerminalContainer container, PlayerInventory playerInventory,
ITextComponent title) {
super(container, playerInventory, title);
this.xSize = 185;
this.ySize = 222;
@@ -108,8 +110,8 @@ public class FluidTerminalScreen extends AEBaseMEScreen<FluidTerminalContainer>
getSortBy(), Platform::isSortOrderAvailable, this::toggleServerSetting));
offset += 20;
this.sortDirBox = this.addButton(new SettingToggleButton<>(this.guiLeft - 18, offset,
Settings.SORT_DIRECTION, getSortDir(), this::toggleServerSetting));
this.sortDirBox = this.addButton(new SettingToggleButton<>(this.guiLeft - 18, offset, Settings.SORT_DIRECTION,
getSortDir(), this::toggleServerSetting));
for (int y = 0; y < ROWS; y++) {
for (int x = 0; x < COLS; x++) {
@@ -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.ConfigValuePacket;
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;
@@ -51,7 +51,8 @@ import appeng.fluids.helper.IFluidInterfaceHost;
import appeng.helpers.IPriorityHost;
import appeng.tile.grid.AENetworkTileEntity;
public class FluidInterfaceTileEntity extends AENetworkTileEntity implements IGridTickable, IFluidInterfaceHost, IPriorityHost {
public class FluidInterfaceTileEntity extends AENetworkTileEntity
implements IGridTickable, IFluidInterfaceHost, IPriorityHost {
private final DualityFluidInterface duality = new DualityFluidInterface(this.getProxy(), this);
public FluidInterfaceTileEntity(TileEntityType<?> tileEntityTypeIn) {
@@ -35,8 +35,8 @@ import appeng.tile.misc.ChargerTileEntity;
public class ChargerInfoProvider implements ITileProbInfoProvider {
@Override
public void addProbeInfo(AEBaseTileEntity tile, ProbeMode mode, IProbeInfo probeInfo, PlayerEntity player, World world,
BlockState blockState, IProbeHitData data) {
public void addProbeInfo(AEBaseTileEntity tile, ProbeMode mode, IProbeInfo probeInfo, PlayerEntity player,
World world, BlockState blockState, IProbeHitData data) {
if (tile instanceof ChargerTileEntity) {
final ChargerTileEntity charger = (ChargerTileEntity) tile;
final IItemHandler chargerInventory = charger.getInternalInventory();
@@ -36,8 +36,8 @@ import appeng.tile.crafting.CraftingMonitorTileEntity;
public class CraftingMonitorInfoProvider implements ITileProbInfoProvider {
@Override
public void addProbeInfo(AEBaseTileEntity tile, ProbeMode mode, IProbeInfo probeInfo, PlayerEntity player, World world,
BlockState blockState, IProbeHitData data) {
public void addProbeInfo(AEBaseTileEntity tile, ProbeMode mode, IProbeInfo probeInfo, PlayerEntity player,
World world, BlockState blockState, IProbeHitData data) {
if (tile instanceof CraftingMonitorTileEntity) {
final CraftingMonitorTileEntity monitor = (CraftingMonitorTileEntity) tile;
final IAEItemStack displayStack = monitor.getJobProgress();
@@ -33,8 +33,8 @@ import appeng.tile.AEBaseTileEntity;
public class PowerStateInfoProvider implements ITileProbInfoProvider {
@Override
public void addProbeInfo(AEBaseTileEntity tile, ProbeMode mode, IProbeInfo probeInfo, PlayerEntity player, World world,
BlockState blockState, IProbeHitData data) {
public void addProbeInfo(AEBaseTileEntity tile, ProbeMode mode, IProbeInfo probeInfo, PlayerEntity player,
World world, BlockState blockState, IProbeHitData data) {
if (tile instanceof IPowerChannelState) {
final IPowerChannelState state = (IPowerChannelState) tile;
@@ -34,8 +34,8 @@ import appeng.util.Platform;
public class PowerStorageInfoProvider implements ITileProbInfoProvider {
@Override
public void addProbeInfo(AEBaseTileEntity tile, ProbeMode mode, IProbeInfo probeInfo, PlayerEntity player, World world,
BlockState blockState, IProbeHitData data) {
public void addProbeInfo(AEBaseTileEntity tile, ProbeMode mode, IProbeInfo probeInfo, PlayerEntity player,
World world, BlockState blockState, IProbeHitData data) {
if (tile instanceof IAEPowerStorage) {
final IAEPowerStorage storage = (IAEPowerStorage) tile;
final double maxPower = storage.getAEMaxPower();
@@ -47,17 +47,17 @@ import appeng.parts.misc.InvertedToggleBusPart;
import appeng.parts.misc.StorageBusPart;
import appeng.parts.misc.ToggleBusPart;
import appeng.parts.networking.CoveredCablePart;
import appeng.parts.networking.GlassCablePart;
import appeng.parts.networking.SmartCablePart;
import appeng.parts.networking.CoveredDenseCablePart;
import appeng.parts.networking.SmartDenseCablePart;
import appeng.parts.networking.GlassCablePart;
import appeng.parts.networking.QuartzFiberPart;
import appeng.parts.networking.SmartCablePart;
import appeng.parts.networking.SmartDenseCablePart;
import appeng.parts.p2p.FEP2PTunnelPart;
import appeng.parts.p2p.FluidP2PTunnelPart;
import appeng.parts.p2p.ItemP2PTunnelPart;
import appeng.parts.p2p.LightP2PTunnelPart;
import appeng.parts.p2p.RedstoneP2PTunnelPart;
import appeng.parts.p2p.MEP2PTunnelPart;
import appeng.parts.p2p.RedstoneP2PTunnelPart;
import appeng.parts.reporting.ConversionMonitorPart;
import appeng.parts.reporting.CraftingTerminalPart;
import appeng.parts.reporting.DarkPanelPart;
+1 -1
View File
@@ -36,8 +36,8 @@ import appeng.api.networking.events.MENetworkPowerStatusChange;
import appeng.api.networking.ticking.ITickManager;
import appeng.core.AELog;
import appeng.me.cache.helpers.TunnelCollection;
import appeng.parts.p2p.P2PTunnelPart;
import appeng.parts.p2p.MEP2PTunnelPart;
import appeng.parts.p2p.P2PTunnelPart;
public class P2PCache implements IGridCache {
private static final TunnelCollection<P2PTunnelPart> NULL_COLLECTION = new TunnelCollection<P2PTunnelPart>(null,
@@ -105,8 +105,8 @@ public class MolecularAssemblerRenderer extends TileEntityRenderer<MolecularAsse
lightsModel, 1, 1, 1, combinedLightIn, combinedOverlayIn, EmptyModelData.INSTANCE);
}
private void renderStatus(MolecularAssemblerTileEntity molecularAssembler, MatrixStack ms, IRenderTypeBuffer bufferIn,
int combinedLightIn, AssemblerAnimationStatus status) {
private void renderStatus(MolecularAssemblerTileEntity molecularAssembler, MatrixStack ms,
IRenderTypeBuffer bufferIn, int combinedLightIn, AssemblerAnimationStatus status) {
double centerX = molecularAssembler.getPos().getX() + 0.5f;
double centerY = molecularAssembler.getPos().getY() + 0.5f;
double centerZ = molecularAssembler.getPos().getZ() + 0.5f;
@@ -42,7 +42,8 @@ import appeng.util.helpers.ItemHandlerUtil;
import appeng.util.inv.IAEAppEngInventory;
import appeng.util.inv.InvOperation;
public class CellWorkbenchTileEntity extends AEBaseTileEntity implements IUpgradeableHost, IAEAppEngInventory, IConfigManagerHost {
public class CellWorkbenchTileEntity extends AEBaseTileEntity
implements IUpgradeableHost, IAEAppEngInventory, IConfigManagerHost {
private final AppEngInternalInventory cell = new AppEngInternalInventory(this, 1);
private final AppEngInternalAEInventory config = new AppEngInternalAEInventory(this, 63);
@@ -73,7 +73,8 @@ import appeng.util.item.AEItemStack;
* @version rv2
* @since rv0
*/
public class InscriberTileEntity extends AENetworkPowerTileEntity implements IGridTickable, IUpgradeableHost, IConfigManagerHost {
public class InscriberTileEntity extends AENetworkPowerTileEntity
implements IGridTickable, IUpgradeableHost, IConfigManagerHost {
private final int maxProcessingTime = 100;
private final IConfigManager settings;
@@ -414,7 +415,8 @@ public class InscriberTileEntity extends AENetworkPowerTileEntity implements IGr
return false;
}
return inv == InscriberTileEntity.this.topItemHandler || inv == InscriberTileEntity.this.bottomItemHandler || slot == 1;
return inv == InscriberTileEntity.this.topItemHandler || inv == InscriberTileEntity.this.bottomItemHandler
|| slot == 1;
}
@Override
@@ -80,8 +80,8 @@ import appeng.util.inv.IAEAppEngInventory;
import appeng.util.inv.InvOperation;
import appeng.util.item.AEItemStack;
public class SecurityStationTileEntity extends AENetworkTileEntity implements ITerminalHost, IAEAppEngInventory, ILocatable,
IConfigManagerHost, ISecurityProvider, IColorableTile {
public class SecurityStationTileEntity extends AENetworkTileEntity implements ITerminalHost, IAEAppEngInventory,
ILocatable, IConfigManagerHost, ISecurityProvider, IColorableTile {
private static int difference = 0;
private final AppEngInternalInventory configSlot = new AppEngInternalInventory(this, 1);
@@ -41,7 +41,8 @@ import appeng.api.networking.events.MENetworkPowerStorage.PowerEventType;
import appeng.capabilities.Capabilities;
import appeng.tile.AEBaseInvTileEntity;
public abstract class AEBasePoweredTileEntity extends AEBaseInvTileEntity implements IAEPowerStorage, IExternalPowerSink {
public abstract class AEBasePoweredTileEntity extends AEBaseInvTileEntity
implements IAEPowerStorage, IExternalPowerSink {
// values that determine general function, are set by inheriting classes if
// needed. These should generally remain static.
@@ -588,7 +588,8 @@ public class ChestTileEntity extends AENetworkPowerTileEntity
@Override
public boolean isValid(final Object verificationToken) {
ChestTileEntity.this.updateHandler();
if (ChestTileEntity.this.cellHandler != null && this.chan == ChestTileEntity.this.cellHandler.getChannel()) {
if (ChestTileEntity.this.cellHandler != null
&& this.chan == ChestTileEntity.this.cellHandler.getChannel()) {
return verificationToken == ChestTileEntity.this.cellHandler;
}
return false;
@@ -704,8 +705,8 @@ public class ChestTileEntity extends AENetworkPowerTileEntity
private class FluidHandler implements IFluidHandler, IFluidTank {
private boolean canAcceptLiquids() {
return ChestTileEntity.this.cellHandler != null && ChestTileEntity.this.cellHandler.getChannel() == AEApi.instance()
.storage().getStorageChannel(IFluidStorageChannel.class);
return ChestTileEntity.this.cellHandler != null && ChestTileEntity.this.cellHandler.getChannel() == AEApi
.instance().storage().getStorageChannel(IFluidStorageChannel.class);
}
@Nonnull
@@ -754,8 +755,9 @@ public class ChestTileEntity extends AENetworkPowerTileEntity
public int fill(FluidStack resource, FluidAction action) {
ChestTileEntity.this.updateHandler();
if (canAcceptLiquids()) {
final IAEFluidStack results = Platform.poweredInsert(ChestTileEntity.this, ChestTileEntity.this.cellHandler,
AEFluidStack.fromFluidStack(resource), ChestTileEntity.this.mySrc,
final IAEFluidStack results = Platform.poweredInsert(ChestTileEntity.this,
ChestTileEntity.this.cellHandler, AEFluidStack.fromFluidStack(resource),
ChestTileEntity.this.mySrc,
action == FluidAction.EXECUTE ? Actionable.MODULATE : Actionable.SIMULATE);
if (results == null) {
@@ -789,8 +791,8 @@ public class ChestTileEntity extends AENetworkPowerTileEntity
public boolean allowInsert(IItemHandler inv, int slot, ItemStack stack) {
if (ChestTileEntity.this.isPowered()) {
ChestTileEntity.this.updateHandler();
return ChestTileEntity.this.cellHandler != null && ChestTileEntity.this.cellHandler.getChannel() == AEApi.instance()
.storage().getStorageChannel(IItemStorageChannel.class);
return ChestTileEntity.this.cellHandler != null && ChestTileEntity.this.cellHandler
.getChannel() == AEApi.instance().storage().getStorageChannel(IItemStorageChannel.class);
}
return false;
}
@@ -22,7 +22,6 @@ import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;
import appeng.tile.grid.AENetworkInvTileEntity;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT;
@@ -62,6 +61,7 @@ import appeng.me.GridAccessException;
import appeng.me.helpers.MachineSource;
import appeng.parts.automation.BlockUpgradeInventory;
import appeng.parts.automation.UpgradeInventory;
import appeng.tile.grid.AENetworkInvTileEntity;
import appeng.tile.inventory.AppEngInternalInventory;
import appeng.util.ConfigManager;
import appeng.util.IConfigManagerHost;
@@ -74,7 +74,8 @@ import appeng.util.inv.WrapperChainedItemHandler;
import appeng.util.inv.WrapperFilteredItemHandler;
import appeng.util.inv.filter.AEItemFilters;
public class IOPortTileEntity extends AENetworkInvTileEntity implements IUpgradeableHost, IConfigManagerHost, IGridTickable {
public class IOPortTileEntity extends AENetworkInvTileEntity
implements IUpgradeableHost, IConfigManagerHost, IGridTickable {
private static final int NUMBER_OF_CELL_SLOTS = 6;
private static final int NUMBER_OF_UPGRADE_SLOTS = 3;