Compare commits

..
Author SHA1 Message Date
Martin Robertz 855fe03f75 fix 2025-10-01 18:43:50 +02:00
Martin Robertz 9a7630bdfa update 2025-10-01 18:29:07 +02:00
Kogepan229andboubou19 8c2bd3ceef Adapted to AE2 GuiAmount changes (#338)
Co-authored-by: boubou19 <[email protected]>
2025-09-27 17:59:42 +02:00
lc-1337 0d58fe01b2 make nbt match item after forming press rename (#337) 2025-09-27 17:37:41 +02:00
Martin Robertz 550e3b2bab update 2025-09-15 21:00:18 +02:00
Martin Robertz d6ae1cf144 update 2025-09-09 07:59:47 +02:00
SKProCH de2f625577 Disable hotbar keys handling in terminals (#331) 2025-09-08 17:05:59 +02:00
Martin Robertz 029b479297 merge conflic fix 2025-09-07 13:24:35 +02:00
lc-1337andUltraProdigy 446920485a fix item duplication when cant inject (#334)
Co-authored-by: UltraProdigy <[email protected]>
2025-09-07 12:35:10 +02:00
Dream Master a48914c55c update 2025-09-05 16:18:39 +02:00
lc-1337 f5bdb35783 Fix Auto Filler crash (#335) 2025-09-03 18:29:53 +02:00
Martin Robertz 99822efb6d update 2025-08-31 11:07:13 +02:00
JakubandMartin Robertz 4c19501f38 Fix duping and voiding bug on network changes in p2p interface (#333)
Co-authored-by: Martin Robertz <[email protected]>
2025-08-31 09:03:14 +00:00
Martin Robertz ec26b6a372 update 2025-08-25 18:36:39 +02:00
SKProCHandKogepan229 697217c5cd Middle click craft ordering inserts a proper count (#329)
Co-authored-by: Kogepan229 <[email protected]>
2025-08-25 16:35:20 +00:00
SKProCH 80bcb3bdf3 Force save search text in the wireless terminal on any button press (#330) 2025-08-18 07:45:31 +07:00
Dream Master 8fe16e87bc update 2025-08-08 23:11:48 +07:00
NeOzay e471c1b38c shows Items|Fluids storage disks with NEI search inventories mode of Search Field (#324) 2025-08-08 16:10:04 +00:00
Niclas Klugmann 81c975ce12 German translation (#325) 2025-08-08 12:15:08 +00:00
Kogepan229 17d9ae47c0 Fix dreamcraft mod ID specification (#328) 2025-08-06 14:49:14 +07:00
Dream Master bbcea46300 update 2025-08-04 10:23:06 +07:00
01b08897d2 fix autofiller wont work after boot (#323)
Co-authored-by: NeOzay <[email protected]>
Co-authored-by: NeOzay <[email protected]>
2025-08-01 22:03:34 +07:00
lc-1337andNeOzay 64ecb14e96 reduce p2p interface lags on bind and on pattern change (#322)
Co-authored-by: NeOzay <[email protected]>
2025-07-27 11:57:21 +02:00
Eldrinn-Elantey 12bdd5ebfc Update ru_RU.lang (#318) 2025-07-27 08:59:08 +07:00
Alexdoru 10ee6f40ca fix event handler SPacketMEUpdateBuffer not being registered (#320) 2025-07-20 08:30:21 +00:00
Alexdoru 1e66772abc Cache Tessellator#instance in local var (#321) 2025-07-18 11:51:16 -07:00
NeOzay ae7af4e712 Use new localization message system from AE2 (#319) 2025-07-14 20:28:34 +00:00
Maya f9566ce891 update 2025-07-05 09:54:43 -06:00
8267150fa6 extend level maintainer feedback (#316)
Co-authored-by: Nikolay S. <[email protected]>
Co-authored-by: Maya <[email protected]>
2025-07-05 15:53:35 +00:00
Kogepan229 22b73f9fbf Use CraftingID to check CraftingLink equivalence in Level Maintainer (#317) 2025-07-05 09:49:50 -06:00
Martin Robertz 4669a1e4ed update 2025-07-02 18:21:47 +02:00
c86370caf9 implement pins (#315)
Co-authored-by: Maya <[email protected]>
Co-authored-by: Martin Robertz <[email protected]>
2025-07-01 20:40:42 +02:00
Martin Robertz 10fefc7996 update 2025-07-01 13:19:41 +02:00
8a086d714a Make P2P Tunnel - ME Dual Interface share storage slot contents between input and outputs (#302)
Co-authored-by: Ruling-0 <[email protected]>
Co-authored-by: Martin Robertz <[email protected]>
Co-authored-by: lordIcocain <[email protected]>
2025-06-29 17:51:17 +02:00
zyf051520 25abc806df Fix FluidExportBus NPE (#314) 2025-06-24 07:31:59 +00:00
Martin Robertz 04558b6913 update 2025-06-22 18:22:29 +02:00
0499adcc6f Add Super Stock Replenisher (#278)
Co-authored-by: Maya <[email protected]>
Co-authored-by: boubou19 <[email protected]>
Co-authored-by: lordIcocain <[email protected]>
2025-06-22 17:49:44 +02:00
Martin Robertz 35136c31ee update 2025-06-20 21:56:28 +02:00
lc-1337andboubou19 dffd8e07e0 always use fluid packet for partition (#310)
Co-authored-by: boubou19 <[email protected]>
2025-06-19 08:45:08 +00:00
Ethryanandgithub-actions[bot] 88c5b6be72 Hide EC stuff if EC is not loaded. (#312)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-06-17 16:24:33 +02:00
lc-1337 0095f69da2 fix player null crash magnet (#309) 2025-06-15 00:24:25 -05:00
Alexdoru bfba45e796 Account for client /server desync when teleporting items with magnet (#305) 2025-06-11 06:26:00 +02:00
Michael Doyle dee1277753 Fix Universal Terminal restock hotkey chat message saying the opposite of the current state (#308) 2025-06-10 20:36:14 -05:00
Kogepan229andboubou19 6ac5ea30f0 Rewrite Level Maintainer/Terminal Logic (#294)
Co-authored-by: boubou19 <[email protected]>
2025-06-09 20:12:08 +00:00
Martin Robertz 1ffcea9dd9 update 2025-06-09 15:35:46 +02:00
RecursivePineapple 3428c86f64 Fix div by zero (#306) 2025-06-09 12:25:06 +02:00
Alexdoru c504dbb28a Magnet improvements (#303) 2025-06-08 19:42:19 +02:00
Martin Robertz fe3168ed6e update 2025-05-31 14:55:00 +02:00
c5cea9eb19 Add magnet and restock to Universal terminal (#275)
Co-authored-by: Maya <[email protected]>
Co-authored-by: Caedis <[email protected]>
Co-authored-by: Ruling-0 <[email protected]>
2025-05-30 21:35:35 -06:00
67 changed files with 2029 additions and 752 deletions

No files matched your search

+12 -12
View File
@@ -34,30 +34,30 @@
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
*/
dependencies {
api('com.github.GTNewHorizons:NotEnoughItems:2.7.49-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-622-GTNH-pre:dev')
api('com.github.GTNewHorizons:NotEnoughItems:2.8.0-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-700-GTNH:dev')
api('curse.maven:cofh-core-69162:2388751')
api('com.github.GTNewHorizons:waila:1.8.7:dev')
api("com.github.GTNewHorizons:GTNHLib:0.6.25:dev")
api('com.github.GTNewHorizons:waila:1.9.0:dev')
api("com.github.GTNewHorizons:GTNHLib:0.7.0:dev")
implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.12.3:dev") {
implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.12.7:dev") {
exclude group: 'com.github.GTNewHorizons', module: 'Applied-Energistics-2-Unofficial'
}
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.1.8-GTNH:dev')
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.1.15-GTNH:dev')
compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.35:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ForestryMC:4.10.10:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.9.16:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.314:dev') {
compileOnly('com.github.GTNewHorizons:ForestryMC:4.10.17:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.9.26:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.02:dev') {
exclude group: 'com.github.GTNewHorizons', module: 'AE2FluidCraft-Rework'
exclude group: 'com.github.GTNewHorizons', module: 'Applied-Energistics-2-Unofficial'
}
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
compileOnly('com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.15-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.7.7-GTNH:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.6.66:dev") { transitive = false }
compileOnly('com.github.GTNewHorizons:OpenComputers:1.11.19-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.7.14-GTNH:dev') { transitive = false }
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.6.108:dev") { transitive = false }
runtimeOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.3.4:dev")
}
+1 -1
View File
@@ -151,7 +151,7 @@ modrinthProjectId =
# type can be one of [project, version],
# and the name is the Modrinth project or version slug/id of the other mod.
# Example: required-project:fplib;optional-project:gasstation;incompatible-project:gregtech
# Note: GTNH Mixins is automatically set as a required dependency if usesMixins = true
# Note: UniMixins is automatically set as a required dependency if usesMixins = true.
modrinthRelations =
# Publishing to CurseForge requires you to set the CURSEFORGE_TOKEN environment variable to one of your CurseForge API tokens.
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.38'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.43'
}
@@ -5,5 +5,7 @@ public enum LevelState {
Idle,
Craft,
Export,
Error
Error,
NotFound,
CantCraft
}
@@ -92,7 +92,7 @@ public class GuiCraftingStatus extends appeng.client.gui.implementations.GuiCraf
new CPacketInventoryAction(
InventoryAction.AUTO_CRAFT,
Ae2ReflectClient.getInventorySlots(this).size(),
0,
hoveredAEStack.getStackSize(),
hoveredAEStack));
return;
}
@@ -55,6 +55,7 @@ public class GuiFCPriority extends FCGuiAmount {
protected void addQty(final int i) {
try {
this.amountBox.setText(Long.toString(getAmount() + i));
this.amountBox.setCursorPositionEnd();
} catch (final NumberFormatException ignore) {}
try {
NetworkHandler.instance
@@ -45,9 +45,7 @@ public class GuiFluidCraftAmount extends FCGuiAmount {
this.guiTop + 53,
Settings.CRAFTING_MODE,
CraftingMode.STANDARD));
this.amountBox.setText("1");
this.amountBox.setSelectionPos(0);
((ContainerCraftAmount) this.inventorySlots).setAmountField(this.amountBox);
}
@Override
@@ -7,12 +7,10 @@ import net.minecraft.item.ItemStack;
import com.glodblock.github.client.gui.base.FCGuiMonitor;
import com.glodblock.github.client.gui.container.ContainerItemMonitor;
import com.glodblock.github.util.ModAndClassUtil;
import appeng.api.storage.ITerminalHost;
import appeng.api.storage.data.IAEItemStack;
import appeng.client.me.ItemRepo;
import appeng.core.AEConfig;
import appeng.core.localization.GuiText;
public class GuiItemMonitor extends FCGuiMonitor<IAEItemStack> {
@@ -40,13 +38,6 @@ public class GuiItemMonitor extends FCGuiMonitor<IAEItemStack> {
super.drawFG(offsetX, offsetY, mouseX, mouseY);
}
@Override
public void drawScreen(final int mouseX, final int mouseY, final float btn) {
super.drawScreen(mouseX, mouseY, btn);
if (ModAndClassUtil.isSearchBar && AEConfig.instance.preserveSearchBar && searchField != null)
handleTooltip(mouseX, mouseY, searchField.new TooltipProvider());
}
@Override
public void setTextFieldValue(String displayName, int mousex, int mousey, ItemStack stack) {
setSearchString(displayName, true);
@@ -474,6 +474,18 @@ public class GuiLevelMaintainer extends AEBaseGui implements INEIGuiHandler {
NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_CURRENT) + " "
+ NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_ERROR));
}
case NotFound -> {
this.line.setColor(FCGuiColors.StateError.getColor());
message.add(
NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_CURRENT) + " "
+ NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_NOT_FOUND));
}
case CantCraft -> {
this.line.setColor(FCGuiColors.StateError.getColor());
message.add(
NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_CURRENT) + " "
+ NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_CANT_CRAFT));
}
default -> {
this.line.setColor(FCGuiColors.StateNone.getColor());
message.add(
@@ -490,7 +502,11 @@ public class GuiLevelMaintainer extends AEBaseGui implements INEIGuiHandler {
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_EXPORT));
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_EXPORT_DESC) + "\n");
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_ERROR));
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_ERROR_DESC));
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_ERROR_DESC) + "\n");
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_NOT_FOUND));
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_NOT_FOUND_DESC) + "\n");
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_CANT_CRAFT));
message.add(NameConst.i18n(NameConst.TT_LEVEL_MAINTAINER_CANT_CRAFT_DESC));
} else {
message.add(NameConst.i18n(NameConst.TT_SHIFT_FOR_MORE));
}
@@ -344,7 +344,8 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
/* Draws the top part. */
drawTexturedModalRect(offsetX, offsetY, 0, 0, xSize, HEADER_HEIGHT);
/* Draws the middle part. */
Tessellator.instance.startDrawingQuads();
final Tessellator tess = Tessellator.instance;
tess.startDrawingQuads();
addTexturedRectToTesselator(
offsetX,
offsetY + HEADER_HEIGHT,
@@ -355,7 +356,7 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
(HEADER_HEIGHT + LevelTerminalSection.TITLE_HEIGHT + 1.0f) / 256.0f,
xSize / 256.0f,
(HEADER_HEIGHT + 106.0f) / 256.0f);
Tessellator.instance.draw();
tess.draw();
/* Draw the bottom part */
drawTexturedModalRect(offsetX, offsetY + HEADER_HEIGHT + viewHeight, 0, 158, xSize, INV_HEIGHT);
if (online) {
@@ -483,7 +484,8 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
private int drawEntry(LevelTerminalEntry entry, int viewY, int titleBottom, int relMouseX, int relMouseY) {
final EntityPlayer player = Minecraft.getMinecraft().thePlayer;
mc.getTextureManager().bindTexture(TEX_BG);
Tessellator.instance.startDrawingQuads();
final Tessellator tess = Tessellator.instance;
tess.startDrawingQuads();
int relY = 0;
final int slotLeftMargin = (VIEW_WIDTH - entry.rowSize * 18);
float lastZLevel = renderItem.zLevel;
@@ -512,7 +514,7 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
(173 + 18) / 256f);
}
}
Tessellator.instance.draw();
tess.draw();
/* Draw button */
if (viewY + entry.highlightButton.height > 0 && viewY < viewHeight) {
entry.highlightButton.yPosition = viewY + 1;
@@ -577,7 +579,7 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
case Idle -> FCGuiColors.StateIdle.getColor();
case Craft -> FCGuiColors.StateCraft.getColor();
case Export -> FCGuiColors.StateExport.getColor();
case Error -> FCGuiColors.StateError.getColor();
case Error, NotFound, CantCraft -> FCGuiColors.StateError.getColor();
case None -> FCGuiColors.StateNone.getColor();
};
int offset = 0;
@@ -1260,8 +1262,8 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
BlockPosHighlighter.highlightBlocks(
mc.thePlayer,
Collections.singletonList(blockPos),
PlayerMessages.LevelEmitterHighlighted.getName(),
PlayerMessages.LevelEmitterInAnotherDim.getName());
PlayerMessages.LevelEmitterHighlighted.getUnlocalized(),
PlayerMessages.LevelEmitterInAnotherDim.getUnlocalized());
mc.thePlayer.closeScreen();
}
return true;
@@ -117,8 +117,9 @@ public class GuiPatternMulti extends GuiAmount {
}
@Override
protected long addOrderAmount(final int i) {
return i + getAmount();
protected void addAmount(int i) {
this.amountTextField.setText(Long.toString(i + getAmount()));
this.amountTextField.setCursorPositionEnd();
}
@Override
@@ -28,14 +28,10 @@ import appeng.util.item.AEItemStack;
public class GuiSuperStockReplenisher extends AEBaseGui {
private static final ResourceLocation TEX_BG = FluidCraft.resource("textures/gui/superStockReplenisher.png");
private final ContainerSuperStockReplenisher cont;
private final TileSuperStockReplenisher tile;
private Map<Integer, IAEStack<?>> list = new HashMap<>();
public GuiSuperStockReplenisher(InventoryPlayer ipl, TileSuperStockReplenisher tile) {
super(new ContainerSuperStockReplenisher(ipl, tile));
this.tile = tile;
this.cont = (ContainerSuperStockReplenisher) inventorySlots;
this.ySize = 251;
this.xSize = 216;
}
@@ -1,7 +1,6 @@
package com.glodblock.github.client.gui.base;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.inventory.Container;
import net.minecraft.item.ItemStack;
@@ -12,6 +11,7 @@ import com.glodblock.github.inventory.gui.GuiType;
import appeng.client.gui.AEBaseGui;
import appeng.client.gui.widgets.GuiTabButton;
import appeng.client.gui.widgets.MEGuiTextField;
import appeng.container.AEBaseContainer;
import appeng.core.AEConfig;
import appeng.core.localization.GuiText;
@@ -20,7 +20,7 @@ import appeng.util.calculators.Calculator;
public abstract class FCGuiAmount extends AEBaseGui {
protected GuiTextField amountBox;
protected MEGuiTextField amountBox;
protected GuiTabButton originalGuiBtn;
protected GuiButton submit;
protected GuiButton plus1;
@@ -72,16 +72,10 @@ public abstract class FCGuiAmount extends AEBaseGui {
this.originalGuiBtn.setHideEdge(13);
}
this.amountBox = new GuiTextField(
this.fontRendererObj,
this.guiLeft + 62,
this.guiTop + 57,
59,
this.fontRendererObj.FONT_HEIGHT);
this.amountBox.setEnableBackgroundDrawing(false);
this.amountBox = new MEGuiTextField(61, 12);
this.amountBox.x = this.guiLeft + 60;
this.amountBox.y = this.guiTop + 55;
this.amountBox.setMaxStringLength(16);
this.amountBox.setTextColor(0xFFFFFF);
this.amountBox.setVisible(true);
this.amountBox.setFocused(true);
}
@@ -134,6 +128,7 @@ public abstract class FCGuiAmount extends AEBaseGui {
}
String out = Long.toString(resultI);
this.amountBox.setText(out);
this.amountBox.setCursorPositionEnd();
} catch (final NumberFormatException ignore) {}
}
@@ -16,7 +16,7 @@ import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import com.glodblock.github.FluidCraft;
import com.glodblock.github.client.gui.FCGuiTextField;
import com.glodblock.github.client.gui.GuiFluidMonitor;
import com.glodblock.github.client.gui.GuiItemMonitor;
import com.glodblock.github.client.gui.container.base.FCContainerMonitor;
import com.glodblock.github.inventory.InventoryHandler;
@@ -26,12 +26,15 @@ import com.glodblock.github.util.Ae2ReflectClient;
import com.glodblock.github.util.ModAndClassUtil;
import appeng.api.config.CraftingStatus;
import appeng.api.config.PinsState;
import appeng.api.config.SearchBoxFocusPriority;
import appeng.api.config.SearchBoxMode;
import appeng.api.config.Settings;
import appeng.api.config.TerminalStyle;
import appeng.api.config.YesNo;
import appeng.api.implementations.tiles.IViewCellStorage;
import appeng.api.storage.ITerminalHost;
import appeng.api.storage.ITerminalPins;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IAEStack;
import appeng.api.storage.data.IDisplayRepo;
@@ -42,7 +45,10 @@ import appeng.client.gui.widgets.GuiScrollbar;
import appeng.client.gui.widgets.GuiTabButton;
import appeng.client.gui.widgets.IDropToFillTextField;
import appeng.client.gui.widgets.ISortSource;
import appeng.client.gui.widgets.MEGuiTextField;
import appeng.client.me.InternalSlotME;
import appeng.client.me.ItemRepo;
import appeng.client.me.PinSlotME;
import appeng.client.me.SlotDisconnected;
import appeng.client.me.SlotME;
import appeng.container.AEBaseContainer;
@@ -60,7 +66,9 @@ import appeng.core.localization.ButtonToolTips;
import appeng.core.localization.GuiText;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketInventoryAction;
import appeng.core.sync.packets.PacketPinsUpdate;
import appeng.core.sync.packets.PacketValueConfig;
import appeng.helpers.IPinsHandler;
import appeng.helpers.InventoryAction;
import appeng.integration.IntegrationRegistry;
import appeng.integration.IntegrationType;
@@ -72,7 +80,7 @@ import codechicken.nei.util.TextHistory;
// TODO why is this copy pasting all the UI code from AE2 instead of reusing it ???
public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
implements ISortSource, IConfigManagerHost, IDropToFillTextField {
implements ISortSource, IConfigManagerHost, IDropToFillTextField, IPinsHandler {
public static int craftingGridOffsetX;
public static int craftingGridOffsetY;
@@ -86,7 +94,7 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
public GuiTabButton craftingStatusBtn;
protected IDisplayRepo repo;
protected GuiImgButton craftingStatusImgBtn;
protected FCGuiTextField searchField;
protected MEGuiTextField searchField;
protected int perRow = 9;
protected int reservedSpace = 0;
protected boolean customSortOrder = true;
@@ -102,7 +110,14 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
protected GuiImgButton terminalStyleBox;
protected GuiImgButton searchStringSave;
protected GuiImgButton typeFilter;
protected GuiImgButton pinsStateButton;
protected boolean hasShiftKeyDown = false;
private PinsState pinsState;
public final boolean hasPinHost;
private boolean canBeAutoFocused;
private boolean isAutoFocused;
protected int currentMouseY;
protected int currentMouseX;
@SuppressWarnings("unchecked")
public FCGuiMonitor(final InventoryPlayer inventoryPlayer, final ITerminalHost te, final FCContainerMonitor<T> c) {
@@ -115,6 +130,8 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
this.configSrc = ((IConfigurableObject) this.inventorySlots).getConfigManager();
(this.monitorableContainer = (FCContainerMonitor<T>) this.inventorySlots).setGui(this);
this.viewCell = te instanceof IViewCellStorage;
pinsState = (PinsState) configSrc.getSetting(Settings.PINS_STATE);
hasPinHost = te instanceof ITerminalPins && !(this instanceof GuiFluidMonitor);
}
public int getOffsetY() {
@@ -131,12 +148,13 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
this.getScrollBar().setTop(18).setLeft(175).setHeight(this.rows * 18 - 2);
this.getScrollBar().setRange(
0,
(this.repo.size() + this.perRow - 1) / this.perRow - this.rows,
(this.repo.size() + pinsState.ordinal() * 9 + this.perRow - 1) / this.perRow - this.rows,
Math.max(1, this.rows / 6));
}
@Override
protected void actionPerformed(final GuiButton btn) {
memoryText = this.searchField.getText();
if (btn == this.craftingStatusBtn || btn == this.craftingStatusImgBtn) {
InventoryHandler.switchGui(GuiType.CRAFTING_STATUS);
}
@@ -151,6 +169,15 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
AEConfig.instance.settings.putSetting(iBtn.getSetting(), next);
} else if (ModAndClassUtil.isSaveText && btn == this.searchStringSave) {
AEConfig.instance.preserveSearchBar = next == YesNo.YES;
} else if (btn == this.pinsStateButton) {
try {
if (next.ordinal() >= rows) return; // ignore to avoid hiding terminal inventory
final PacketPinsUpdate p = new PacketPinsUpdate((PinsState) next);
NetworkHandler.instance.sendToServer(p);
} catch (final IOException e) {
AELog.debug(e);
}
} else {
try {
NetworkHandler.instance
@@ -161,7 +188,6 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
}
iBtn.set(next);
if (next.getClass() == SearchBoxMode.class || next.getClass() == TerminalStyle.class) {
memoryText = this.searchField.getText();
super.scheduleGuiResize();
}
}
@@ -169,6 +195,19 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
super.actionPerformed(btn);
}
private void adjustPinsSize() {
final int pinMaxSize = rows - 1;
if (pinsState.ordinal() <= pinMaxSize) return;
try {
PinsState newState = PinsState.fromOrdinal(pinMaxSize);
final PacketPinsUpdate p = new PacketPinsUpdate(newState);
NetworkHandler.instance.sendToServer(p);
} catch (final IOException e) {
AELog.debug(e);
}
}
@Override
public void initGui() {
Keyboard.enableRepeatEvents(true);
@@ -199,10 +238,26 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
}
this.getMeSlots().clear();
for (int y = 0; y < this.rows; y++) {
// make sure we have space at least for one row of normal slots, because pins not adjusted by scroll bar
adjustPinsSize();
int pinsRows = pinsState.ordinal();
for (int y = 0; y < pinsRows; y++) {
for (int x = 0; x < this.perRow; x++) {
this.getMeSlots()
.add(new InternalSlotME(this.repo, x + y * this.perRow, this.offsetX + x * 18, 18 + y * 18));
.add(new PinSlotME(this.repo, x + y * this.perRow, this.offsetX + x * 18, y * 18 + 18));
}
}
for (int y = 0; y < this.rows - pinsRows; y++) {
for (int x = 0; x < this.perRow; x++) {
this.getMeSlots().add(
new InternalSlotME(
this.repo,
x + y * this.perRow,
this.offsetX + x * 18,
18 + y * 18 + pinsRows * 18));
}
}
@@ -224,6 +279,7 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
this.offsetY = this.guiTop + 8;
buttonList.clear();
if (this.customSortOrder) {
this.buttonList.add(
this.SortByBox = new GuiImgButton(
@@ -286,18 +342,19 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
AEConfig.instance.settings.getSetting(Settings.TERMINAL_STYLE)));
this.offsetY += 20;
// Right now 80 > offsetX, but that can be changed later.
// noinspection DataFlowIssue
this.searchField = new FCGuiTextField(
this.fontRendererObj,
this.guiLeft + Math.max(80, this.offsetX),
this.guiTop + 4,
90,
12);
this.searchField.setEnableBackgroundDrawing(false);
this.searchField = new MEGuiTextField(90, 12) {
@Override
public void onTextChange(final String oldText) {
final String text = getText();
repo.setSearchString(text);
repo.updateView();
setScrollBar();
}
};
this.searchField.x = this.guiLeft + Math.max(80, this.offsetX);
this.searchField.y = this.guiTop + 4;
this.searchField.setMaxStringLength(25);
this.searchField.setTextColor(0xFFFFFF);
this.searchField.setVisible(true);
if (ModAndClassUtil.isSearchStringTooltip)
searchField.setMessage(ButtonToolTips.SearchStringTooltip.getLocal());
@@ -323,8 +380,19 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
}
}
if (hasPinHost) {
this.buttonList.add(
this.pinsStateButton = new GuiImgButton(
this.guiLeft + 177,
this.guiTop + 18 + (rows * 18) + 26,
Settings.PINS_STATE,
configSrc.getSetting(Settings.PINS_STATE)));
}
final Enum<?> setting = AEConfig.instance.settings.getSetting(Settings.SEARCH_MODE);
this.searchField.setFocused(SearchBoxMode.AUTOSEARCH == setting || SearchBoxMode.NEI_AUTOSEARCH == setting);
this.canBeAutoFocused = SearchBoxMode.AUTOSEARCH == setting || SearchBoxMode.NEI_AUTOSEARCH == setting;
this.searchField.setFocused(this.canBeAutoFocused);
this.isAutoFocused = this.canBeAutoFocused;
if (ModAndClassUtil.isSearchBar && (AEConfig.instance.preserveSearchBar || this.isSubGui())) {
setSearchString(memoryText, false);
@@ -360,6 +428,7 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
public void setSearchString(String memoryText, boolean updateView) {
this.searchField.setText(memoryText);
this.searchField.setCursorPositionEnd();
this.repo.setSearchString(memoryText);
if (updateView) {
this.repo.updateView();
@@ -369,13 +438,8 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
@Override
protected void mouseClicked(final int xCoord, final int yCoord, final int btn) {
final Enum<?> searchMode = AEConfig.instance.settings.getSetting(Settings.SEARCH_MODE);
if (searchMode != SearchBoxMode.AUTOSEARCH && searchMode != SearchBoxMode.NEI_AUTOSEARCH) {
this.searchField.mouseClicked(xCoord, yCoord, btn);
}
if (btn == 1 && this.searchField.isMouseIn(xCoord, yCoord)) {
setSearchString("", true);
}
this.searchField.mouseClicked(xCoord, yCoord, btn);
isAutoFocused = false;
super.mouseClicked(xCoord, yCoord, btn);
}
@@ -527,13 +591,22 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
return;
}
if (slot instanceof SlotME) {
if (slot instanceof SlotME sme) {
InventoryAction action = null;
IAEItemStack stack = null;
switch (mouseButton) {
case 0: // pickup / set-down.
action = ctrlDown == 1 ? InventoryAction.SPLIT_OR_PLACE_SINGLE : InventoryAction.PICKUP_OR_SET_DOWN;
stack = ((SlotME) slot).getAEStack();
if (sme.isPin() && player.inventory.getItemStack() != null) {
final PacketInventoryAction p = new PacketInventoryAction(
InventoryAction.SET_PIN,
sme.getPinIndex(),
0);
NetworkHandler.instance.sendToServer(p);
return;
}
stack = sme.getAEStack();
if (stack != null && action == InventoryAction.PICKUP_OR_SET_DOWN
&& stack.getStackSize() == 0
&& player.inventory.getItemStack() == null) {
@@ -541,6 +614,15 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
}
break;
case 1:
if (sme.isPin() && ctrlDown == 1) { // clear pin
final PacketInventoryAction p = new PacketInventoryAction(
InventoryAction.SET_PIN,
sme.getPinIndex(),
-1);
NetworkHandler.instance.sendToServer(p);
return;
}
action = ctrlDown == 1 ? InventoryAction.PICKUP_SINGLE : InventoryAction.SHIFT_CLICK;
stack = ((SlotME) slot).getAEStack();
break;
@@ -640,6 +722,9 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
if (this.searchField != null) {
this.searchField.drawTextBox();
}
this.currentMouseX = mouseX;
this.currentMouseY = mouseY;
}
protected String getBackground() {
@@ -662,18 +747,29 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
@Override
protected void keyTyped(final char character, final int key) {
if (!this.checkHotbarKeys(key)) {
if (character == ' ' && this.searchField.getText().isEmpty()) {
return;
}
if (character == ' ' && this.searchField.getText().isEmpty()) {
return;
}
if (this.searchField.textboxKeyTyped(character, key)) {
this.repo.setSearchString(this.searchField.getText());
this.repo.updateView();
this.setScrollBar();
} else {
super.keyTyped(character, key);
}
boolean skipHotbarCheck = searchField.isFocused()
&& (AEConfig.instance.searchBoxFocusPriority == SearchBoxFocusPriority.ALWAYS
|| (AEConfig.instance.searchBoxFocusPriority == SearchBoxFocusPriority.NO_AUTOSEARCH
&& !isAutoFocused));
if (!skipHotbarCheck && checkHotbarKeys(key)) {
return;
}
final boolean mouseInGui = this
.isPointInRegion(0, 0, this.xSize, this.ySize, this.currentMouseX, this.currentMouseY);
if (this.canBeAutoFocused && !searchField.isFocused() && mouseInGui) {
searchField.setFocused(true);
isAutoFocused = true;
}
if (!searchField.textboxKeyTyped(character, key)) {
super.keyTyped(character, key);
}
}
@@ -721,6 +817,13 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
this.typeFilter.set(this.configSrc.getSetting(Settings.TYPE_FILTER));
}
if (this.pinsStateButton != null) {
pinsState = (PinsState) this.configSrc.getSetting(Settings.PINS_STATE);
this.pinsStateButton.set(pinsState);
initGui();
}
this.repo.updateView();
}
@@ -748,13 +851,6 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
this.standardSize = standardSize;
}
@Override
public void drawScreen(final int mouseX, final int mouseY, final float btn) {
super.drawScreen(mouseX, mouseY, btn);
if (ModAndClassUtil.isSearchBar && AEConfig.instance.preserveSearchBar && searchField != null)
handleTooltip(mouseX, mouseY, searchField.new TooltipProvider());
}
public boolean isOverSearchField(int x, int y) {
return searchField.isMouseIn(x, y);
}
@@ -786,4 +882,33 @@ public abstract class FCGuiMonitor<T extends IAEStack<T>> extends FCBaseMEGui
public boolean isOverTextField(int mousex, int mousey) {
return searchField.isMouseIn(mousex, mousey);
}
@Override
public void setAEPins(IAEItemStack[] pins) {
if (repo instanceof ItemRepo) repo.setAEPins(pins);
}
@Override
public void setPinsState(PinsState state) {
configSrc.putSetting(Settings.PINS_STATE, state);
}
@SuppressWarnings("SameParameterValue")
protected boolean isPointInRegion(int rectX, int rectY, int rectWidth, int rectHeight, int pointX, int pointY) {
pointX -= this.guiLeft;
pointY -= this.guiTop;
return pointX >= rectX - 1 && pointX < rectX + rectWidth + 1
&& pointY >= rectY - 1
&& pointY < rectY + rectHeight + 1;
}
// Moving items via hotbar keys in terminals isn't working anyway.
// Let's disable hotbar keys processing for terminal slots to allow proper input of numbers in the search field
@Override
protected boolean checkHotbarKeys(int keyCode) {
if (theSlot instanceof SlotME) {
return false;
}
return super.checkHotbarKeys(keyCode);
}
}
@@ -39,7 +39,7 @@ public class ContainerFluidLevelEmitter extends FCContainerFluidConfigurable {
return this.lvlEmitter;
}
protected IUpgradeableHost getUpgradeable() {
public IUpgradeableHost getUpgradeable() {
return Ae2Reflect.getUpgradeableHost(this);
}
@@ -23,6 +23,7 @@ import appeng.container.slot.IOptionalSlotHost;
import appeng.container.slot.SlotPatternOutputs;
import appeng.container.slot.SlotRestrictedInput;
import appeng.items.storage.ItemBasicStorageCell;
import appeng.util.item.AEItemStack;
public class ContainerSuperStockReplenisher extends AEBaseContainer implements IOptionalSlotHost {
@@ -96,7 +97,7 @@ public class ContainerSuperStockReplenisher extends AEBaseContainer implements I
}
for (int i = 0; i < tile.getInternalInventory().getSizeInventory(); i++) {
tmp.put(i + 100, tile.getInternalAEInventory().getAEStackInSlot(i));
tmp.put(i + 100, AEItemStack.create(tile.getInternalInventory().getStackInSlot(i)));
}
for (final Object g : this.crafters) {
@@ -1,7 +1,5 @@
package com.glodblock.github.client.gui.container.base;
import static appeng.util.Platform.writeStackNBT;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
@@ -27,12 +25,13 @@ import com.glodblock.github.common.item.ItemFluidEncodedPattern;
import com.glodblock.github.common.item.ItemFluidPacket;
import com.glodblock.github.inventory.IPatternConsumer;
import com.glodblock.github.inventory.item.IItemPatternTerminal;
import com.glodblock.github.loader.ItemAndBlockHolder;
import com.glodblock.github.util.FluidPatternDetails;
import com.glodblock.github.util.Util;
import appeng.api.AEApi;
import appeng.api.config.Actionable;
import appeng.api.definitions.IDefinitions;
import appeng.api.implementations.ICraftingPatternItem;
import appeng.api.storage.ITerminalHost;
import appeng.api.storage.data.IAEItemStack;
import appeng.container.guisync.GuiSync;
@@ -44,11 +43,11 @@ import appeng.container.slot.SlotPatternTerm;
import appeng.container.slot.SlotRestrictedInput;
import appeng.helpers.IContainerCraftingPacket;
import appeng.helpers.InventoryAction;
import appeng.items.misc.ItemEncodedPattern;
import appeng.tile.inventory.AppEngInternalInventory;
import appeng.tile.inventory.IAEAppEngInventory;
import appeng.tile.inventory.InvOperation;
import appeng.util.Platform;
import appeng.util.item.AEFluidStack;
import appeng.util.item.AEItemStack;
public abstract class FCContainerEncodeTerminal extends ContainerItemMonitor
@@ -173,7 +172,7 @@ public abstract class FCContainerEncodeTerminal extends ContainerItemMonitor
ItemStack is = clickSlot.getStack();
if (is != null && !patternSlotOUT.getHasStack()
&& is.stackSize == 1
&& is.getItem() instanceof ICraftingPatternItem) {
&& (is.getItem() instanceof ItemFluidEncodedPattern || is.getItem() instanceof ItemEncodedPattern)) {
ItemStack output = is.copy();
patternSlotOUT.putStack(output);
p.inventory.setInventorySlotContents(clickSlot.getSlotIndex(), null);
@@ -244,6 +243,20 @@ public abstract class FCContainerEncodeTerminal extends ContainerItemMonitor
return object > 0;
}
protected boolean checkHasFluidPattern() {
if (this.craftingMode) {
return false;
}
boolean hasFluid = containsFluid(this.craftingSlots);
boolean search = nonNullSlot(this.craftingSlots);
if (!search) { // search=false -> inputs were empty
return false;
}
hasFluid |= containsFluid(this.outputSlots);
search = nonNullSlot(this.outputSlots);
return hasFluid && search; // search=false -> outputs were empty
}
protected ItemStack stampAuthor(ItemStack patternStack) {
if (patternStack.stackTagCompound == null) {
patternStack.stackTagCompound = new NBTTagCompound();
@@ -253,52 +266,13 @@ public abstract class FCContainerEncodeTerminal extends ContainerItemMonitor
}
protected void encodeFluidPattern() {
ItemStack patternStack = AEApi.instance().definitions().items().encodedUltimatePattern().maybeStack(1).orNull();
if (patternStack != null) {
final NBTTagCompound encodedValue = new NBTTagCompound();
final ItemStack[] in = this.getInputs();
final ItemStack[] out = this.getOutputs();
final NBTTagList tagIn = new NBTTagList();
final NBTTagList tagOut = new NBTTagList();
for (final ItemStack i : in) {
if (i != null) {
if (i.getItem() instanceof ItemFluidPacket) {
tagIn.appendTag(
writeStackNBT(
AEFluidStack.create(ItemFluidPacket.getFluidStack(i)),
new NBTTagCompound(),
true));
} else {
tagIn.appendTag(writeStackNBT(AEItemStack.create(i), new NBTTagCompound(), true));
}
}
}
for (final ItemStack i : out) {
if (i != null) {
if (i.getItem() instanceof ItemFluidPacket) {
tagOut.appendTag(
writeStackNBT(
AEFluidStack.create(ItemFluidPacket.getFluidStack(i)),
new NBTTagCompound(),
true));
} else {
tagOut.appendTag(writeStackNBT(AEItemStack.create(i), new NBTTagCompound(), true));
}
}
}
encodedValue.setTag("in", tagIn);
encodedValue.setTag("out", tagOut);
encodedValue.setBoolean("substitute", substitute);
encodedValue.setBoolean("beSubstitute", beSubstitute);
encodedValue.setString("author", this.getPlayerInv().player.getCommandSenderName());
patternStack.setTagCompound(encodedValue);
patternSlotOUT.putStack(patternStack);
}
ItemStack patternStack = new ItemStack(ItemAndBlockHolder.PATTERN);
FluidPatternDetails pattern = new FluidPatternDetails(patternStack);
pattern.setInputs(collectInventory(this.craftingSlots));
pattern.setOutputs(collectInventory(this.outputSlots));
pattern.setCanBeSubstitute(this.beSubstitute ? 1 : 0);
pattern.setCombine(this.combine ? 1 : 0);
patternSlotOUT.putStack(stampAuthor(pattern.writeToStack()));
}
protected static IAEItemStack[] collectInventory(Slot[] slots) {
@@ -396,7 +370,7 @@ public abstract class FCContainerEncodeTerminal extends ContainerItemMonitor
public void encode() {
fillPattern();
if (isCraftingMode()) {
if (!checkHasFluidPattern()) {
encodeItemPattern();
return;
}
@@ -513,10 +487,7 @@ public abstract class FCContainerEncodeTerminal extends ContainerItemMonitor
boolean isPattern = definitions.items().encodedPattern().isSameAs(output);
isPattern |= definitions.materials().blankPattern().isSameAs(output);
boolean isUltimatePattern = definitions.items().encodedUltimatePattern().isSameAs(output);
isUltimatePattern |= definitions.materials().blankPattern().isSameAs(output);
return !isPattern && !isUltimatePattern;
return !isPattern;
}
protected NBTBase createItemTag(final ItemStack i) {
@@ -1,6 +1,8 @@
package com.glodblock.github.client.gui.container.base;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Nonnull;
@@ -10,10 +12,15 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ICrafting;
import net.minecraft.item.ItemStack;
import com.glodblock.github.inventory.item.BaseWirelessInventory;
import com.glodblock.github.inventory.item.IWirelessTerminal;
import com.glodblock.github.network.SPacketMEUpdateBuffer;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import appeng.api.config.Actionable;
import appeng.api.config.CraftingAllow;
import appeng.api.config.PinsState;
import appeng.api.config.PowerMultiplier;
import appeng.api.config.SecurityPermissions;
import appeng.api.config.Settings;
@@ -22,10 +29,16 @@ import appeng.api.config.SortOrder;
import appeng.api.config.TypeFilter;
import appeng.api.config.ViewItems;
import appeng.api.networking.IGridNode;
import appeng.api.networking.crafting.ICraftingCPU;
import appeng.api.networking.crafting.ICraftingGrid;
import appeng.api.networking.energy.IEnergyGrid;
import appeng.api.networking.security.PlayerSource;
import appeng.api.storage.IMEMonitor;
import appeng.api.storage.IMEMonitorHandlerReceiver;
import appeng.api.storage.ITerminalHost;
import appeng.api.storage.ITerminalPins;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IAEStack;
import appeng.api.util.IConfigManager;
import appeng.api.util.IConfigurableObject;
@@ -34,18 +47,22 @@ import appeng.container.slot.SlotRestrictedInput;
import appeng.core.AELog;
import appeng.core.sync.network.NetworkHandler;
import appeng.core.sync.packets.PacketValueConfig;
import appeng.helpers.IPinsHandler;
import appeng.helpers.WirelessTerminalGuiObject;
import appeng.items.contents.PinsHandler;
import appeng.util.ConfigManager;
import appeng.util.IConfigManagerHost;
import appeng.util.Platform;
public abstract class FCContainerMonitor<T extends IAEStack<T>> extends FCBaseContainer
implements IConfigManagerHost, IConfigurableObject, IMEMonitorHandlerReceiver<T> {
implements IConfigManagerHost, IConfigurableObject, IMEMonitorHandlerReceiver<T>, IPinsHandler {
protected final SlotRestrictedInput[] cellView = new SlotRestrictedInput[5];
protected final IConfigManager clientCM;
protected final ITerminalHost host;
protected PinsHandler pinsHandler = null;
@GuiSync(99)
public boolean canAccessViewCells = false;
@@ -70,6 +87,14 @@ public abstract class FCContainerMonitor<T extends IAEStack<T>> extends FCBaseCo
this.clientCM.registerSetting(Settings.VIEW_MODE, ViewItems.ALL);
this.clientCM.registerSetting(Settings.SORT_DIRECTION, SortDir.ASCENDING);
this.clientCM.registerSetting(Settings.TYPE_FILTER, TypeFilter.ALL);
this.clientCM.registerSetting(Settings.PINS_STATE, PinsState.DISABLED); // use for GUI
if (Platform.isServer()) {
if (monitorable instanceof ITerminalPins t && !(monitorable instanceof BaseWirelessInventory bwi
&& bwi.getChannel() == StorageChannel.FLUIDS)) {
pinsHandler = t.getPinsHandler(ip.player);
}
}
}
public IMEMonitor<T> getMonitor() {
@@ -105,6 +130,16 @@ public abstract class FCContainerMonitor<T extends IAEStack<T>> extends FCBaseCo
}
}
}
if (pinsHandler != null) {
if (clientCM.getSetting(Settings.PINS_STATE) != pinsHandler.getPinsState()) {
this.clientCM.putSetting(Settings.PINS_STATE, pinsHandler.getPinsState());
updatePins(true);
} else {
updatePins(false);
}
}
processItemList();
this.updatePowerStatus();
final boolean oldAccessible = this.canAccessViewCells;
@@ -122,6 +157,84 @@ public abstract class FCContainerMonitor<T extends IAEStack<T>> extends FCBaseCo
}
}
private int lastUpdate = 0;
public void updatePins(boolean forceUpdate) {
if (pinsHandler == null || !(host instanceof ITerminalPins itp)) return;
boolean isActive = pinsHandler.getPinsState() != PinsState.DISABLED;
++lastUpdate;
if (!forceUpdate && lastUpdate <= 20) return;
lastUpdate = 0;
if (isActive) {
final ICraftingGrid cc = itp.getGrid().getCache(ICraftingGrid.class);
final ImmutableList<ICraftingCPU> cpuList = cc.getCpus().asList();
List<IAEItemStack> craftedItems = new ArrayList<>();
// fetch the first available crafting output
for (int i = 0; i < cpuList.size(); i++) {
ICraftingCPU cpu = cpuList.get(i);
if (cpu.getCraftingAllowMode() != CraftingAllow.ONLY_NONPLAYER && cpu.getFinalOutput() != null
&& cpu.getCurrentJobSource() instanceof PlayerSource src
&& src.player == pinsHandler.getPlayer()) {
if (craftedItems.contains(cpu.getFinalOutput())) {
continue; // skip if already added
}
if (cpu.isBusy()) craftedItems.add(0, cpu.getFinalOutput().copy());
else craftedItems.add(cpu.getFinalOutput().copy());
}
}
pinsHandler.addItemsToPins(craftedItems);
}
pinsHandler.update(forceUpdate);
onListUpdate(); // notify the repo that the pins have changed
}
@Override
public void setPin(ItemStack is, int idx) {
if (pinsHandler == null || !(host instanceof ITerminalPins itp)) return;
if (is == null) {
final ICraftingGrid cc = itp.getGrid().getCache(ICraftingGrid.class);
final ImmutableSet<ICraftingCPU> cpuSet = cc.getCpus();
for (ICraftingCPU cpu : cpuSet) {
if (cpu.getCraftingAllowMode() != CraftingAllow.ONLY_NONPLAYER && cpu.getFinalOutput() != null
&& cpu.getFinalOutput().isSameType(getPin(idx))) {
if (!cpu.isBusy()) {
cpu.resetFinalOutput();
} else {
return;
}
}
}
}
pinsHandler.setPin(idx, is);
updatePins(true);
}
@Override
public ItemStack getPin(int idx) {
if (pinsHandler == null) return null;
return pinsHandler.getPin(idx);
}
public void setPinsState(PinsState pinsState) {
if (pinsHandler == null) return;
clientCM.putSetting(Settings.PINS_STATE, pinsState);
pinsHandler.setPinsState(pinsState);
updatePins(true);
}
public PinsState getPinsState() {
return pinsHandler != null ? pinsHandler.getPinsState() : PinsState.DISABLED;
}
public PinsHandler getPinsHandler() {
return pinsHandler;
}
protected abstract void processItemList();
protected boolean isInvalid() {
@@ -21,8 +21,8 @@ public class BlockSuperStockReplenisher extends FCBaseBlock {
public BlockSuperStockReplenisher() {
super(Material.web, NameConst.BLOCK_SUPER_STOCK_REPLENISHER);
setTileEntity(TileSuperStockReplenisher.class);
setOpaque(false);
setFullBlock(false);
setOpaque(true);
setFullBlock(true);
this.lightOpacity = 4;
}
@@ -20,6 +20,7 @@ import com.glodblock.github.common.storage.CellType;
import com.glodblock.github.common.storage.FluidCellInventory;
import com.glodblock.github.common.storage.FluidCellInventoryHandler;
import com.glodblock.github.common.storage.IStorageFluidCell;
import com.glodblock.github.inventory.FluidCellConfig;
import com.glodblock.github.loader.ItemAndBlockHolder;
import com.glodblock.github.util.NameConst;
import com.google.common.base.Optional;
@@ -36,7 +37,6 @@ import appeng.core.features.AEFeature;
import appeng.core.localization.GuiText;
import appeng.helpers.ICellRestriction;
import appeng.items.AEBaseItem;
import appeng.items.contents.CellConfig;
import appeng.items.contents.CellUpgrades;
import appeng.util.InventoryAdaptor;
import appeng.util.IterationCounter;
@@ -208,7 +208,7 @@ public abstract class FCBaseItemCell extends AEBaseItem implements IStorageFluid
@Override
public IInventory getConfigInventory(ItemStack is) {
return new CellConfig(is);
return new FluidCellConfig(is);
}
@Override
@@ -54,19 +54,19 @@ public class ItemBaseWirelessTerminal extends ToolWirelessTerminal implements II
}
IWirelessTermRegistry term = AEApi.instance().registries().wireless();
if (!term.isWirelessTerminal(item)) {
player.addChatMessage(PlayerMessages.DeviceNotWirelessTerminal.get());
player.addChatMessage(PlayerMessages.DeviceNotWirelessTerminal.toChat());
return item;
}
final IWirelessTermHandler handler = term.getWirelessTerminalHandler(item);
final String unparsedKey = handler.getEncryptionKey(item);
if (unparsedKey.isEmpty()) {
player.addChatMessage(PlayerMessages.DeviceNotLinked.get());
player.addChatMessage(PlayerMessages.DeviceNotLinked.toChat());
return item;
}
final long parsedKey = Long.parseLong(unparsedKey);
final ILocatable securityStation = AEApi.instance().registries().locatable().getLocatableBy(parsedKey);
if (securityStation == null) {
player.addChatMessage(PlayerMessages.StationCanNotBeLocated.get());
player.addChatMessage(PlayerMessages.StationCanNotBeLocated.toChat());
return item;
}
if (handler.hasPower(player, 0.5, item)) {
@@ -77,7 +77,7 @@ public class ItemBaseWirelessTerminal extends ToolWirelessTerminal implements II
ForgeDirection.UNKNOWN,
this.guiGuiType(item));
} else {
player.addChatMessage(PlayerMessages.DeviceNotPowered.get());
player.addChatMessage(PlayerMessages.DeviceNotPowered.toChat());
}
}
@@ -8,12 +8,12 @@ import net.minecraft.item.ItemStack;
import com.glodblock.github.FluidCraft;
import com.glodblock.github.common.storage.IStorageFluidCell;
import com.glodblock.github.common.tabs.FluidCraftingTabs;
import com.glodblock.github.inventory.FluidCellConfig;
import com.glodblock.github.loader.IRegister;
import com.glodblock.github.util.NameConst;
import appeng.api.config.FuzzyMode;
import appeng.core.features.AEFeature;
import appeng.items.contents.CellConfig;
import appeng.util.Platform;
import cpw.mods.fml.common.registry.GameRegistry;
@@ -30,7 +30,7 @@ public class ItemCreativeFluidStorageCell extends ItemBaseInfinityStorageCell
@Override
public IInventory getConfigInventory(ItemStack is) {
return new CellConfig(is);
return new FluidCellConfig(is);
}
@Override
@@ -14,6 +14,7 @@ import com.glodblock.github.common.storage.IFluidCellInventory;
import com.glodblock.github.common.storage.IFluidCellInventoryHandler;
import com.glodblock.github.common.storage.IStorageFluidCell;
import com.glodblock.github.common.tabs.FluidCraftingTabs;
import com.glodblock.github.inventory.FluidCellConfig;
import com.glodblock.github.loader.IRegister;
import com.glodblock.github.util.NameConst;
@@ -25,7 +26,6 @@ import appeng.api.storage.data.IAEFluidStack;
import appeng.core.features.AEFeature;
import appeng.core.localization.GuiText;
import appeng.items.AEBaseItem;
import appeng.items.contents.CellConfig;
import appeng.items.contents.CellUpgrades;
import appeng.util.Platform;
import cpw.mods.fml.common.registry.GameRegistry;
@@ -116,7 +116,7 @@ public class ItemFluidVoidStorageCell extends AEBaseItem
@Override
public IInventory getConfigInventory(ItemStack is) {
return new CellConfig(is);
return new FluidCellConfig(is);
}
@Override
@@ -20,6 +20,7 @@ import com.glodblock.github.common.storage.IFluidCellInventory;
import com.glodblock.github.common.storage.IFluidCellInventoryHandler;
import com.glodblock.github.common.storage.IStorageFluidCell;
import com.glodblock.github.common.tabs.FluidCraftingTabs;
import com.glodblock.github.inventory.FluidCellConfig;
import com.glodblock.github.inventory.InventoryHandler;
import com.glodblock.github.inventory.gui.GuiType;
import com.glodblock.github.inventory.item.IItemInventory;
@@ -37,7 +38,6 @@ import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEFluidStack;
import appeng.core.features.AEFeature;
import appeng.core.localization.GuiText;
import appeng.items.contents.CellConfig;
import appeng.items.contents.CellUpgrades;
import appeng.items.tools.powered.powersink.AEBasePoweredItem;
import appeng.util.Platform;
@@ -163,7 +163,7 @@ public class ItemPortableFluidCell extends AEBasePoweredItem
@Override
public IInventory getConfigInventory(final ItemStack is) {
return new CellConfig(is);
return new FluidCellConfig(is);
}
@Override
@@ -44,7 +44,7 @@ public class ItemWirelessFluidTerminal extends ItemBaseWirelessTerminal
IGridNode gridNode = Util.getWirelessGrid(stack);
return new WirelessFluidTerminalInventory(stack, x, gridNode, player);
} catch (Exception e) {
player.addChatMessage(PlayerMessages.OutOfRange.get());
player.addChatMessage(PlayerMessages.OutOfRange.toChat());
}
return null;
}
@@ -44,7 +44,7 @@ public class ItemWirelessInterfaceTerminal extends ItemBaseWirelessTerminal
IGridNode gridNode = Util.getWirelessGrid(stack);
return new WirelessInterfaceTerminalInventory(stack, x, gridNode, player);
} catch (Exception e) {
player.addChatMessage(PlayerMessages.OutOfRange.get());
player.addChatMessage(PlayerMessages.OutOfRange.toChat());
}
return null;
}
@@ -44,7 +44,7 @@ public class ItemWirelessLevelTerminal extends ItemBaseWirelessTerminal
IGridNode gridNode = Util.getWirelessGrid(stack);
return new WirelessLevelTerminalInventory(stack, x, gridNode, player);
} catch (Exception e) {
player.addChatMessage(PlayerMessages.OutOfRange.get());
player.addChatMessage(PlayerMessages.OutOfRange.toChat());
}
return null;
}
@@ -44,7 +44,7 @@ public class ItemWirelessPatternTerminal extends ItemBaseWirelessTerminal
IGridNode gridNode = Util.getWirelessGrid(stack);
return new WirelessPatternTerminalInventory(stack, x, gridNode, player);
} catch (Exception e) {
player.addChatMessage(PlayerMessages.OutOfRange.get());
player.addChatMessage(PlayerMessages.OutOfRange.toChat());
}
return null;
}
@@ -135,7 +135,7 @@ public class ItemWirelessUltraTerminal extends ItemBaseWirelessTerminal
return new WirelessFluidTerminalInventory(stack, x, gridNode, player);
}
} catch (Exception e) {
player.addChatMessage(PlayerMessages.OutOfRange.get());
player.addChatMessage(PlayerMessages.OutOfRange.toChat());
}
return null;
}
@@ -274,9 +274,9 @@ public class ItemWirelessUltraTerminal extends ItemBaseWirelessTerminal
@Override
public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int slot, boolean p_77663_5_) {
if (Platform.isServer() && entityIn instanceof EntityPlayer player) {
if (entityIn instanceof EntityPlayer player) {
if (WirelessMagnet.getMode(stack) != WirelessMagnet.Mode.Off) {
WirelessMagnet.doMagnet(stack, player.worldObj, player);
WirelessMagnet.doMagnet(stack, player);
}
}
}
@@ -112,10 +112,9 @@ public class PartFluidExportBus extends FCSharedFluidBus implements ICraftingReq
this.didSomething = false;
this.fluidToSend = this.calculateAmountToSend();
final TileEntity te = this.getConnectedTE();
if (te instanceof IFluidHandler) {
InventoryAdaptor destination;
if (te instanceof IFluidHandler && (destination = this.getHandler(te)) != null) {
try {
final InventoryAdaptor destination = this.getHandler(te);
final ICraftingGrid cg = this.getProxy().getCrafting();
final IFluidHandler fh = (IFluidHandler) te;
final IMEMonitor<IAEFluidStack> inv = this.getProxy().getStorage().getFluidInventory();
@@ -316,9 +316,10 @@ public class PartFluidLevelEmitter extends PartUpgradeable implements IStackWatc
@SideOnly(Side.CLIENT)
public void renderInventory(final IPartRenderHelper rh, final RenderBlocks renderer) {
rh.setTexture(this.getItemStack().getIconIndex());
Tessellator.instance.startDrawingQuads();
final Tessellator tess = Tessellator.instance;
tess.startDrawingQuads();
this.renderTorchAtAngle(0, -0.5, 0);
Tessellator.instance.draw();
tess.draw();
}
private void renderTorchAtAngle(double baseX, double baseY, double baseZ) {
@@ -1,5 +1,7 @@
package com.glodblock.github.common.parts;
import static appeng.helpers.DualityInterface.NUMBER_OF_STORAGE_SLOTS;
import java.util.ArrayList;
import java.util.EnumSet;
import java.util.List;
@@ -56,6 +58,7 @@ import appeng.helpers.DualityInterface;
import appeng.helpers.IInterfaceHost;
import appeng.helpers.IPriorityHost;
import appeng.me.GridAccessException;
import appeng.me.cache.CraftingGridCache;
import appeng.parts.automation.UpgradeInventory;
import appeng.parts.p2p.PartP2PTunnel;
import appeng.parts.p2p.PartP2PTunnelStatic;
@@ -64,23 +67,41 @@ import appeng.tile.inventory.AppEngInternalInventory;
import appeng.tile.inventory.IAEAppEngInventory;
import appeng.tile.inventory.InvOperation;
import appeng.util.Platform;
import appeng.util.inv.AdaptorIInventory;
import appeng.util.inv.IInventoryDestination;
import appeng.util.inv.WrapperInvSlot;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInterface>
implements IGridTickable, IStorageMonitorable, IInventoryDestination, IDualHost, ISidedInventory,
IAEAppEngInventory, ITileStorageMonitorable, IPriorityHost, IInterfaceHost {
boolean needUpdateOnNetworkBooted = false;
boolean lastPowerStart = false;
public PartFluidP2PInterface(ItemStack is) {
super(is);
}
private final DualityInterface duality = new DualityInterface(this.getProxy(), this) {
@Override
public void updateCraftingList() {
if (!isOutput()) {
CraftingGridCache.pauseRebuilds();
super.updateCraftingList();
try {
for (PartFluidP2PInterface p2p : getOutputs()) p2p.duality.updateCraftingList();
for (PartFluidP2PInterface p2p : getOutputs()) {
p2p.duality.updateCraftingList();
}
} catch (GridAccessException e) {
// ?
}
CraftingGridCache.unpauseRebuilds();
} else {
PartFluidP2PInterface p2p = getInput();
if (p2p != null) {
@@ -96,39 +117,51 @@ public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInter
}
@Override
public boolean updateStorage() {
if (!isOutput()) {
super.updateStorage();
try {
for (PartFluidP2PInterface p2p : getOutputs()) p2p.duality.updateStorage();
} catch (GridAccessException e) {
}
} else {
PartFluidP2PInterface p2p = getInput();
if ((p2p != null)) this.setStorage(p2p.duality.getStorage());
this.readConfig();
public TickRateModulation tickingRequest(IGridNode node, int ticksSinceLastCall) {
final boolean powerState = proxy.isActive();
if (needUpdateOnNetworkBooted || lastPowerStart != powerState) {
needUpdateOnNetworkBooted = false;
lastPowerStart = powerState;
updateSharingInventory();
}
return true;
return super.tickingRequest(node, ticksSinceLastCall);
}
@Override
protected boolean hasWorkToDo() {
if (isOutput()) {
return hasItemsToSend() || hasConfig() || !getStorage().isEmpty();
} else return super.hasWorkToDo();
}
@Override
public void readConfig() {
if (!isOutput()) {
super.readConfig();
try {
for (PartFluidP2PInterface p2p : getOutputs()) p2p.duality.readConfig();
} catch (GridAccessException e) {
}
} else {
if (isOutput()) {
PartFluidP2PInterface p2p = getInput();
this.setHasConfig(false);
boolean alertDevice = false;
if (p2p != null) {
if (!p2p.duality.getConfig().isEmpty()) this.setHasConfig(p2p.duality.hasConfig());
this.notifyNeighbors();
this.setHasConfig(p2p.duality.hasConfig());
alertDevice = hasWorkToDo();
} else {
this.setHasConfig(false);
}
if (alertDevice) {
try {
this.gridProxy.getTick().alertDevice(this.gridProxy.getNode());
} catch (final GridAccessException ignored) {}
} else {
try {
this.gridProxy.getTick().sleepDevice(this.gridProxy.getNode());
} catch (final GridAccessException ignored) {}
}
this.notifyNeighbors();
} else {
super.readConfig();
}
}
@@ -138,9 +171,7 @@ public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInter
super.addDrops(drops);
try {
for (PartFluidP2PInterface p2p : getOutputs()) p2p.duality.addDrops(drops);
} catch (GridAccessException e) {
}
} catch (GridAccessException ignored) {}
} else {
if (this.getWaitingToSend() != null) {
for (final ItemStack is : this.getWaitingToSend()) {
@@ -179,20 +210,71 @@ public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInter
private final DualityFluidInterface dualityFluid = new DualityFluidInterface(this.getProxy(), this);
private final AppEngInternalAEInventory config = new AppEngInternalAEInventory(this, 6);
public PartFluidP2PInterface(ItemStack is) {
super(is);
private void updateSharingInventory() {
duality.readConfig();
if (isOutput()) {
PartFluidP2PInterface p2p = getInput();
if (proxy.isActive() && p2p != null) {
if (!duality.sharedInventory && !duality.getStorage().isEmpty()) {
ArrayList<ItemStack> drops = new ArrayList<>();
AppEngInternalInventory storageAppEng = this.duality.getStorage();
AdaptorIInventory p2pInv = new AdaptorIInventory(p2p.duality.getStorage());
for (ItemStack itemStack : storageAppEng) {
if (itemStack == null) continue;
ItemStack drop = p2pInv.addItems(itemStack);
if (drop != null && drop.stackSize > 0) {
drops.add(drop);
}
}
TileEntity te = getTileEntity();
Platform.spawnDrops(te.getWorldObj(), te.xCoord, te.yCoord, te.zCoord, drops);
}
duality.setStorage(p2p.duality.getStorage());
duality.sharedInventory = true;
} else {
if (duality.sharedInventory) {
duality.setStorage(new AppEngInternalInventory(this, NUMBER_OF_STORAGE_SLOTS));
duality.setSlotInv(new WrapperInvSlot(duality.getStorage()));
duality.sharedInventory = false;
}
}
} else {
if (duality.sharedInventory) {
duality.setStorage(new AppEngInternalInventory(this, NUMBER_OF_STORAGE_SLOTS));
duality.setSlotInv(new WrapperInvSlot(duality.getStorage()));
duality.sharedInventory = false;
}
try {
for (PartFluidP2PInterface p2p : getOutputs()) {
p2p.duality.readConfig();
}
} catch (GridAccessException ignored) {}
}
}
@MENetworkEventSubscribe
public void stateChange(final MENetworkChannelsChanged c) {
dualityFluid.onChannelStateChange(c);
duality.notifyNeighbors();
this.duality.notifyNeighbors();
updateSharingInventory();
needUpdateOnNetworkBooted = true;
}
@MENetworkEventSubscribe
public void stateChange(final MENetworkPowerStatusChange c) {
dualityFluid.onPowerStateChange(c);
duality.notifyNeighbors();
this.duality.notifyNeighbors();
updateSharingInventory();
needUpdateOnNetworkBooted = true;
}
@Override
public int getInstalledUpgrades(final Upgrades u) {
return this.duality.getInstalledUpgrades(u);
}
@Override
@SideOnly(Side.CLIENT)
public IIcon getTypeTexture() {
return ItemAndBlockHolder.INTERFACE.getBlockTextureFromSide(0);
}
@Override
@@ -201,20 +283,73 @@ public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInter
dualityFluid.gridChanged();
}
@Override
public void readFromNBT(final NBTTagCompound data) {
super.readFromNBT(data);
this.duality.readFromNBT(data);
}
@Override
public void writeToNBT(final NBTTagCompound data) {
super.writeToNBT(data);
this.duality.writeToNBT(data);
}
@Override
public NBTTagCompound getMemoryCardData() {
final NBTTagCompound output = super.getMemoryCardData();
this.duality.getConfigManager().writeToNBT(output);
return output;
}
@Override
public void pasteMemoryCardData(PartP2PTunnel<?> newTunnel, NBTTagCompound data) throws GridAccessException {
this.duality.getConfigManager().readFromNBT(data);
super.pasteMemoryCardData(newTunnel, data);
}
@Override
public void addToWorld() {
super.addToWorld();
this.duality.initialize();
}
@Override
public void getDrops(final List<ItemStack> drops, final boolean wrenched) {
this.duality.addDrops(drops);
}
@Override
public int cableConnectionRenderTo() {
return 4;
}
@Override
public IConfigManager getConfigManager() {
return this.duality.getConfigManager();
}
@Override
public IInventory getInventoryByName(final String name) {
return this.duality.getInventoryByName(name);
}
@Override
public void onNeighborChanged() {
this.duality.updateRedstoneState();
}
@Override
public boolean onPartActivate(final EntityPlayer player, final Vec3 pos) {
AppEngInternalInventory patterns = (AppEngInternalInventory) duality.getPatterns();
if (super.onPartActivate(player, pos)) {
public boolean onPartActivate(final EntityPlayer p, final Vec3 pos) {
AppEngInternalInventory patterns = this.duality.getPatterns();
if (super.onPartActivate(p, pos)) {
ArrayList<ItemStack> drops = new ArrayList<>();
for (int i = 0; i < patterns.getSizeInventory(); i++) {
if (patterns.getStackInSlot(i) == null) continue;
drops.add(patterns.getStackInSlot(i));
}
final IPart tile = this.getHost().getPart(this.getSide());
if (tile instanceof PartFluidP2PInterface dualTile) {
DualityInterface newDuality = dualTile.duality;
@@ -225,11 +360,15 @@ public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInter
for (int i = 0; i < upgrades.getSizeInventory(); ++i) {
newUpgrade.setInventorySlotContents(i, upgrades.getStackInSlot(i));
}
IInventory storage = duality.getStorage();
IInventory newStorage = newDuality.getStorage();
for (int i = 0; i < storage.getSizeInventory(); ++i) {
newStorage.setInventorySlotContents(i, storage.getStackInSlot(i));
if (!duality.sharedInventory) {
IInventory storage = duality.getStorage();
IInventory newStorage = newDuality.getStorage();
for (int i = 0; i < storage.getSizeInventory(); ++i) {
newStorage.setInventorySlotContents(i, storage.getStackInSlot(i));
}
}
IConfigManager config = duality.getConfigManager();
config.getSettings().forEach(
setting -> newDuality.getConfigManager().putSetting(setting, config.getSetting(setting)));
@@ -240,13 +379,13 @@ public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInter
return true;
}
if (player.isSneaking()) {
if (p.isSneaking()) {
return false;
}
if (Platform.isServer()) {
InventoryHandler.openGui(
player,
p,
this.getHost().getTile().getWorldObj(),
new BlockPos(this.getHost().getTile()),
Objects.requireNonNull(this.getSide()),
@@ -257,13 +396,23 @@ public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInter
}
@Override
public IIcon getTypeTexture() {
return ItemAndBlockHolder.INTERFACE.getBlockTextureFromSide(0);
public IIcon getBreakingTexture() {
return this.getItemStack().getIconIndex();
}
@Override
public IStorageMonitorable getMonitorable(ForgeDirection side, BaseActionSource src) {
return duality.getMonitorable(side, src, this);
public boolean canInsert(final ItemStack stack) {
return this.duality.canInsert(stack);
}
@Override
public IMEMonitor<IAEItemStack> getItemInventory() {
return this.duality.getItemInventory();
}
@Override
public IMEMonitor<IAEFluidStack> getFluidInventory() {
return this.duality.getFluidInventory();
}
@Override
@@ -288,142 +437,216 @@ public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInter
}
}
@Override
public int getInstalledUpgrades(Upgrades u) {
return duality.getInstalledUpgrades(u);
}
@Override
public IMEMonitor<IAEItemStack> getItemInventory() {
return duality.getItemInventory();
}
@Override
public IMEMonitor<IAEFluidStack> getFluidInventory() {
return duality.getFluidInventory();
}
@Override
public int getPriority() {
return duality.getPriority();
}
@Override
public void setPriority(int newValue) {
duality.setPriority(newValue);
}
@Override
public void onTunnelNetworkChange() {
duality.updateCraftingList();
}
@Override
public void onChangeInventory(IInventory inv, int slot, InvOperation op, ItemStack removedStack,
ItemStack newStack) {
duality.onChangeInventory(inv, slot, op, removedStack, newStack);
}
@Override
public boolean canInsert(ItemStack stack) {
return duality.canInsert(stack);
}
@Override
public int getSizeInventory() {
return duality.getStorage().getSizeInventory();
return this.duality.getStorage().getSizeInventory();
}
@Override
public ItemStack getStackInSlot(int slotIn) {
return duality.getStorage().getStackInSlot(slotIn);
public ItemStack getStackInSlot(final int i) {
return this.duality.getStorage().getStackInSlot(i);
}
@Override
public ItemStack decrStackSize(int index, int count) {
return duality.getStorage().decrStackSize(index, count);
public ItemStack decrStackSize(final int i, final int j) {
return this.duality.getStorage().decrStackSize(i, j);
}
@Override
public ItemStack getStackInSlotOnClosing(int index) {
return duality.getStorage().getStackInSlotOnClosing(index);
public ItemStack getStackInSlotOnClosing(final int i) {
return this.duality.getStorage().getStackInSlotOnClosing(i);
}
@Override
public void setInventorySlotContents(int index, ItemStack stack) {
duality.getStorage().setInventorySlotContents(index, stack);
}
@Override
public IInventory getInventoryByName(String name) {
return duality.getInventoryByName(name);
}
@Override
public IConfigManager getConfigManager() {
return duality.getConfigManager();
}
@Override
public IIcon getBreakingTexture() {
return getItemStack().getIconIndex();
public void setInventorySlotContents(final int i, final ItemStack itemstack) {
this.duality.getStorage().setInventorySlotContents(i, itemstack);
}
@Override
public String getInventoryName() {
return duality.getStorage().getInventoryName();
return this.duality.getStorage().getInventoryName();
}
@Override
public boolean hasCustomInventoryName() {
return duality.getStorage().hasCustomInventoryName();
return this.duality.getStorage().hasCustomInventoryName();
}
@Override
public int getInventoryStackLimit() {
return duality.getStorage().getInventoryStackLimit();
return this.duality.getStorage().getInventoryStackLimit();
}
@Override
public void markDirty() {
duality.markDirty();
this.duality.getStorage().markDirty();
}
@Override
public boolean isUseableByPlayer(EntityPlayer player) {
return duality.getStorage().isUseableByPlayer(player);
public boolean isUseableByPlayer(final EntityPlayer entityplayer) {
return this.duality.getStorage().isUseableByPlayer(entityplayer);
}
@Override
public void openInventory() {
duality.getStorage().openInventory();
this.duality.getStorage().openInventory();
}
@Override
public void closeInventory() {
duality.getStorage().closeInventory();
this.duality.getStorage().closeInventory();
}
@Override
public boolean isItemValidForSlot(int index, ItemStack stack) {
return duality.getStorage().isItemValidForSlot(index, stack);
public boolean isItemValidForSlot(final int i, final ItemStack itemstack) {
return this.duality.getStorage().isItemValidForSlot(i, itemstack);
}
@Override
public int[] getAccessibleSlotsFromSide(int side) {
return duality.getAccessibleSlotsFromSide(side);
public int[] getAccessibleSlotsFromSide(final int s) {
return this.duality.getAccessibleSlotsFromSide(s);
}
@Override
public boolean canInsertItem(int p_102007_1_, ItemStack itemStack, int p_102007_3_) {
public boolean canInsertItem(final int i, final ItemStack itemstack, final int j) {
return true;
}
@Override
public boolean canExtractItem(int p_102008_1_, ItemStack p_102008_2_, int p_102008_3_) {
public boolean canExtractItem(final int i, final ItemStack itemstack, final int j) {
return true;
}
@Override
public void onChangeInventory(final IInventory inv, final int slot, final InvOperation mc,
final ItemStack removedStack, final ItemStack newStack) {
this.duality.onChangeInventory(inv, slot, mc, removedStack, newStack);
}
@Override
public DualityInterface getInterfaceDuality() {
return this.duality;
}
@Override
public EnumSet<ForgeDirection> getTargets() {
return EnumSet.of(this.getSide());
}
@Override
public TileEntity getTileEntity() {
return super.getHost().getTile();
}
@Override
public IStorageMonitorable getMonitorable(final ForgeDirection side, final BaseActionSource src) {
return this.duality.getMonitorable(side, src, this);
}
@Override
public boolean pushPattern(final ICraftingPatternDetails patternDetails, final InventoryCrafting table) {
return this.duality.pushPattern(patternDetails, table);
}
@Override
public boolean isBusy() {
return this.duality.isBusy();
}
@Override
public void provideCrafting(final ICraftingProviderHelper craftingTracker) {
this.duality.provideCrafting(craftingTracker);
}
@Override
public ImmutableSet<ICraftingLink> getRequestedJobs() {
return this.duality.getRequestedJobs();
}
@Override
public IAEItemStack injectCraftedItems(final ICraftingLink link, final IAEItemStack items, final Actionable mode) {
return this.duality.injectCraftedItems(link, items, mode);
}
@Override
public void jobStateChange(final ICraftingLink link) {
this.duality.jobStateChange(link);
}
@Override
public int getPriority() {
return this.duality.getPriority();
}
@Override
public void setPriority(final int newValue) {
this.duality.setPriority(newValue);
}
@Override
public void onTunnelNetworkChange() {
this.duality.updateCraftingList();
updateSharingInventory();
}
@Override
public void onTunnelConfigChange() {
updateSharingInventory();
}
@Override
public IInventory getPatterns() {
if (isOutput()) {
PartFluidP2PInterface input = getInput();
if (input != null) {
return input.getPatterns();
}
return IInterfaceHost.super.getPatterns();
}
return IInterfaceHost.super.getPatterns();
}
@Override
public int rows() {
if (isOutput()) {
PartFluidP2PInterface input = getInput();
if (input != null) {
return input.rows();
}
return IInterfaceHost.super.rows();
}
return IInterfaceHost.super.rows();
}
@Override
public int rowSize() {
if (isOutput()) {
PartFluidP2PInterface input = getInput();
if (input != null) {
return input.rowSize();
}
return IInterfaceHost.super.rowSize();
}
return IInterfaceHost.super.rowSize();
}
@Override
public String getName() {
if (isOutput()) {
PartFluidP2PInterface input = getInput();
if (input != null) {
return input.getName();
}
return IInterfaceHost.super.getName();
}
return IInterfaceHost.super.getName();
}
@Override
public ItemStack getSelfRep() {
return this.getItemStack();
}
@Override
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
return dualityFluid.fill(from, resource, doFill);
@@ -494,138 +717,9 @@ public class PartFluidP2PInterface extends PartP2PTunnelStatic<PartFluidP2PInter
}
}
@Override
public DualityInterface getInterfaceDuality() {
return duality;
}
@Override
public EnumSet<ForgeDirection> getTargets() {
return EnumSet.of(this.getSide());
}
@Override
public TileEntity getTileEntity() {
return super.getHost().getTile();
}
@Override
public void provideCrafting(ICraftingProviderHelper craftingTracker) {
duality.provideCrafting(craftingTracker);
}
@Override
public boolean pushPattern(ICraftingPatternDetails patternDetails, InventoryCrafting table) {
return duality.pushPattern(patternDetails, table);
}
@Override
public boolean isBusy() {
return duality.isBusy();
}
@Override
public ImmutableSet<ICraftingLink> getRequestedJobs() {
return duality.getRequestedJobs();
}
@Override
public IAEItemStack injectCraftedItems(ICraftingLink link, IAEItemStack items, Actionable mode) {
return duality.injectCraftedItems(link, items, mode);
}
@Override
public void jobStateChange(ICraftingLink link) {
duality.jobStateChange(link);
}
@Override
public void readFromNBT(NBTTagCompound data) {
super.readFromNBT(data);
duality.readFromNBT(data);
}
@Override
public void writeToNBT(NBTTagCompound data) {
super.writeToNBT(data);
duality.writeToNBT(data);
}
@Override
public NBTTagCompound getMemoryCardData() {
final NBTTagCompound output = super.getMemoryCardData();
this.duality.getConfigManager().writeToNBT(output);
return output;
}
@Override
public void pasteMemoryCardData(PartP2PTunnel<?> newTunnel, NBTTagCompound data) throws GridAccessException {
this.duality.getConfigManager().readFromNBT(data);
super.pasteMemoryCardData(newTunnel, data);
}
@Override
public void addToWorld() {
super.addToWorld();
this.duality.initialize();
}
@Override
public void getDrops(List<ItemStack> drops, boolean wrenched) {
super.getDrops(drops, wrenched);
duality.addDrops(drops);
}
@Override
public boolean shouldDisplay() {
return IInterfaceHost.super.shouldDisplay();
}
@Override
public IInventory getPatterns() {
if (isOutput()) {
PartFluidP2PInterface input = getInput();
if (input != null) {
return input.getPatterns();
}
return IInterfaceHost.super.getPatterns();
}
return IInterfaceHost.super.getPatterns();
}
@Override
public int rows() {
if (isOutput()) {
PartFluidP2PInterface input = getInput();
if (input != null) {
return input.rows();
}
return IInterfaceHost.super.rows();
}
return IInterfaceHost.super.rows();
}
@Override
public int rowSize() {
if (isOutput()) {
PartFluidP2PInterface input = getInput();
if (input != null) {
return input.rowSize();
}
return IInterfaceHost.super.rowSize();
}
return IInterfaceHost.super.rowSize();
}
@Override
public String getName() {
if (isOutput()) {
PartFluidP2PInterface input = getInput();
if (input != null) {
return input.getName();
}
return IInterfaceHost.super.getName();
}
return IInterfaceHost.super.getName();
}
}
@@ -3,6 +3,7 @@ package com.glodblock.github.common.parts.base;
import java.util.ArrayList;
import java.util.List;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -10,14 +11,19 @@ import net.minecraft.nbt.NBTTagCompound;
import com.glodblock.github.common.item.ItemFluidPacket;
import com.glodblock.github.inventory.item.IItemPatternTerminal;
import appeng.api.networking.IGrid;
import appeng.api.storage.ITerminalPins;
import appeng.api.storage.data.IAEItemStack;
import appeng.items.contents.PinsHandler;
import appeng.items.contents.PinsHolder;
import appeng.tile.inventory.AppEngInternalInventory;
public abstract class FCFluidEncodeTerminal extends FCPart implements IItemPatternTerminal {
public abstract class FCFluidEncodeTerminal extends FCPart implements IItemPatternTerminal, ITerminalPins {
protected AppEngInternalInventory crafting;
protected AppEngInternalInventory output;
protected final AppEngInternalInventory pattern = new AppEngInternalInventory(this, 2);
private final PinsHolder pinsInv = new PinsHolder(this);
protected boolean craftingMode = true;
protected boolean substitute = false;
@@ -56,6 +62,7 @@ public abstract class FCFluidEncodeTerminal extends FCPart implements IItemPatte
this.pattern.readFromNBT(data, "pattern");
this.output.readFromNBT(data, "outputList");
this.crafting.readFromNBT(data, "craftingGrid");
pinsInv.readFromNBT(data, "pins");
}
@Override
@@ -72,6 +79,7 @@ public abstract class FCFluidEncodeTerminal extends FCPart implements IItemPatte
this.pattern.writeToNBT(data, "pattern");
this.output.writeToNBT(data, "outputList");
this.crafting.writeToNBT(data, "craftingGrid");
pinsInv.writeToNBT(data, "pins");
}
@Override
@@ -217,4 +225,14 @@ public abstract class FCFluidEncodeTerminal extends FCPart implements IItemPatte
public void setAutoFillPattern(boolean canFill) {
this.autoFillPattern = canFill;
}
@Override
public PinsHandler getPinsHandler(EntityPlayer player) {
return pinsInv.getHandler(player);
}
@Override
public IGrid getGrid() {
return getGridNode().getGrid();
}
}
@@ -366,21 +366,22 @@ public abstract class FCPart extends AEBasePart
rh.setBounds(2, 2, 14, 14, 14, 16);
rh.renderBlock(x, y, z, renderer);
final Tessellator tess = Tessellator.instance;
if (this.getLightLevel() > 0) {
final int l = 13;
Tessellator.instance.setBrightness(l << 20 | l << 4);
tess.setBrightness(l << 20 | l << 4);
}
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = this
.getSpin();
Tessellator.instance.setColorOpaque_I(this.getColor().whiteVariant);
tess.setColorOpaque_I(this.getColor().whiteVariant);
rh.renderFace(x, y, z, this.getFrontBright().getIcon(), ForgeDirection.SOUTH, renderer);
Tessellator.instance.setColorOpaque_I(this.getColor().mediumVariant);
tess.setColorOpaque_I(this.getColor().mediumVariant);
rh.renderFace(x, y, z, this.getFrontDark().getIcon(), ForgeDirection.SOUTH, renderer);
Tessellator.instance.setColorOpaque_I(this.getColor().blackVariant);
tess.setColorOpaque_I(this.getColor().blackVariant);
rh.renderFace(x, y, z, this.getFrontColored().getIcon(), ForgeDirection.SOUTH, renderer);
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
@@ -404,15 +405,15 @@ public abstract class FCPart extends AEBasePart
if (hasChan) {
final int l = 14;
Tessellator.instance.setBrightness(l << 20 | l << 4);
Tessellator.instance.setColorOpaque_I(this.getColor().blackVariant);
tess.setBrightness(l << 20 | l << 4);
tess.setColorOpaque_I(this.getColor().blackVariant);
} else if (hasPower) {
final int l = 9;
Tessellator.instance.setBrightness(l << 20 | l << 4);
Tessellator.instance.setColorOpaque_I(this.getColor().whiteVariant);
tess.setBrightness(l << 20 | l << 4);
tess.setColorOpaque_I(this.getColor().whiteVariant);
} else {
Tessellator.instance.setBrightness(0);
Tessellator.instance.setColorOpaque_I(0x000000);
tess.setBrightness(0);
tess.setColorOpaque_I(0x000000);
}
final IIcon sideStatusLightTexture = CableBusTextures.PartMonitorSidesStatusLights.getIcon();
@@ -148,7 +148,7 @@ public abstract class FCPartMonitor extends AbstractPartDisplay implements IPart
if (Platform.isWrench(player, eq, te.xCoord, te.yCoord, te.zCoord)) {
this.isLocked = !this.isLocked;
player.addChatMessage((this.isLocked ? PlayerMessages.isNowLocked : PlayerMessages.isNowUnlocked).get());
player.addChatMessage((this.isLocked ? PlayerMessages.isNowLocked : PlayerMessages.isNowUnlocked).toChat());
this.getHost().markForUpdate();
} else if (!this.isLocked) {
this.configuredFluid = AEFluidStack.create(Util.FluidUtil.getFluidFromContainer(eq));
@@ -399,21 +399,22 @@ public abstract class FCPartMonitor extends AbstractPartDisplay implements IPart
rh.setBounds(2, 2, 14, 14, 14, 16);
rh.renderBlock(x, y, z, renderer);
final Tessellator tess = Tessellator.instance;
if (this.getLightLevel() > 0) {
final int l = 13;
Tessellator.instance.setBrightness(l << 20 | l << 4);
tess.setBrightness(l << 20 | l << 4);
}
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = this
.getSpin();
Tessellator.instance.setColorOpaque_I(this.getColor().whiteVariant);
tess.setColorOpaque_I(this.getColor().whiteVariant);
rh.renderFace(x, y, z, this.getFrontBright().getIcon(), ForgeDirection.SOUTH, renderer);
Tessellator.instance.setColorOpaque_I(this.getColor().mediumVariant);
tess.setColorOpaque_I(this.getColor().mediumVariant);
rh.renderFace(x, y, z, this.getFrontDark().getIcon(), ForgeDirection.SOUTH, renderer);
Tessellator.instance.setColorOpaque_I(this.getColor().blackVariant);
tess.setColorOpaque_I(this.getColor().blackVariant);
rh.renderFace(x, y, z, this.getFrontColored().getIcon(), ForgeDirection.SOUTH, renderer);
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
@@ -437,15 +438,15 @@ public abstract class FCPartMonitor extends AbstractPartDisplay implements IPart
if (hasChan) {
final int l = 14;
Tessellator.instance.setBrightness(l << 20 | l << 4);
Tessellator.instance.setColorOpaque_I(this.getColor().blackVariant);
tess.setBrightness(l << 20 | l << 4);
tess.setColorOpaque_I(this.getColor().blackVariant);
} else if (hasPower) {
final int l = 9;
Tessellator.instance.setBrightness(l << 20 | l << 4);
Tessellator.instance.setColorOpaque_I(this.getColor().whiteVariant);
tess.setBrightness(l << 20 | l << 4);
tess.setColorOpaque_I(this.getColor().whiteVariant);
} else {
Tessellator.instance.setBrightness(0);
Tessellator.instance.setColorOpaque_I(0x000000);
tess.setBrightness(0);
tess.setColorOpaque_I(0x000000);
}
final IIcon sideStatusLightTexture = CableBusTextures.PartMonitorSidesStatusLights.getIcon();
@@ -200,7 +200,7 @@ public class FluidCellInventory implements IFluidCellInventory {
@Override
public long getRemainingFluidTypes() {
final long basedOnStorage = this.getFreeBytes() / this.getBytesPerType();
final long basedOnStorage = this.getFreeBytes() / Math.max(1, this.getBytesPerType());
final long baseOnTotal = this.getTotalFluidTypes() - this.getStoredFluidTypes();
return Math.min(basedOnStorage, baseOnTotal);
}
@@ -6,6 +6,7 @@ import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
import com.glodblock.github.common.item.ItemFluidPacket;
import com.glodblock.github.util.Ae2Reflect;
import com.glodblock.github.util.Util;
@@ -42,6 +43,12 @@ public class FluidCellInventoryHandler extends MEInventoryHandler<IAEFluidStack>
AEFluidStack stack = AEFluidStack.create(fluid);
stack.setStackSize(1);
priorityList.add(stack);
// convert partition on cells in network
if (!(is.getItem() instanceof ItemFluidPacket)) {
config.setInventorySlotContents(x, ItemFluidPacket.newDisplayStack(fluid));
config.markDirty();
}
}
}
if (!priorityList.isEmpty()) {
@@ -1,6 +1,5 @@
package com.glodblock.github.common.tile;
import static appeng.util.Platform.writeStackNBT;
import static com.glodblock.github.loader.RecipeLoader.BUCKET;
import javax.annotation.Nonnull;
@@ -18,8 +17,7 @@ import net.minecraftforge.fluids.FluidStack;
import org.apache.commons.lang3.tuple.MutablePair;
import com.glodblock.github.FluidCraft;
import com.glodblock.github.util.NameConst;
import com.glodblock.github.common.item.ItemFluidDrop;
import com.glodblock.github.util.Util;
import appeng.api.AEApi;
@@ -55,8 +53,6 @@ import appeng.tile.events.TileEventType;
import appeng.tile.grid.AENetworkInvTile;
import appeng.tile.inventory.AppEngInternalInventory;
import appeng.tile.inventory.InvOperation;
import appeng.util.item.AEItemStack;
import cpw.mods.fml.common.registry.GameRegistry;
public class TileFluidAutoFiller extends AENetworkInvTile
implements ICraftingProvider, IMEMonitorHandlerReceiver<IAEFluidStack>, IGridTickable {
@@ -64,7 +60,7 @@ public class TileFluidAutoFiller extends AENetworkInvTile
private final AppEngInternalInventory inventory = new AppEngInternalInventory(this, 1);
private final BaseActionSource source = new MachineSource(this);
private IItemList<IAEFluidStack> fluids = AEApi.instance().storage().createFluidList();
private final Item encodedPattern = GameRegistry.findItem(FluidCraft.MODID, NameConst.ITEM_FLUID_ENCODED_PATTERN);
private final Item encodedPattern = AEApi.instance().definitions().items().encodedPattern().maybeItem().orNull();
private IAEItemStack returnStack;
private boolean isPowered;
@@ -160,21 +156,19 @@ public class TileFluidAutoFiller extends AENetworkInvTile
MutablePair<Integer, ItemStack> filled = Util.FluidUtil
.fillStack(this.getContainerItem().copy(), new FluidStack(fluid, maxCapacity));
if (filled.right == null) continue;
ItemStack pattern = getPattern(
this.getContainerItem(),
filled.right,
fluidStack.copy().setStackSize(maxCapacity));
ItemStack pattern = getPattern(this.getContainerItem(), filled.right);
ICraftingPatternItem patter = (ICraftingPatternItem) pattern.getItem();
craftingTracker.addCraftingOption(this, patter.getPatternForItem(pattern, getWorldObj()));
}
}
private ItemStack getPattern(ItemStack emptyContainer, ItemStack filledContainer, IAEFluidStack ifs) {
private ItemStack getPattern(ItemStack emptyContainer, ItemStack filledContainer) {
NBTTagList in = new NBTTagList();
NBTTagList out = new NBTTagList();
in.appendTag(writeStackNBT(AEItemStack.create(emptyContainer), new NBTTagCompound()));
in.appendTag(writeStackNBT(ifs, new NBTTagCompound()));
out.appendTag(writeStackNBT(AEItemStack.create(filledContainer), new NBTTagCompound()));
in.appendTag(emptyContainer.writeToNBT(new NBTTagCompound()));
ItemStack fluidDrop = ItemFluidDrop.newStack(Util.FluidUtil.getFluidFromContainer(filledContainer));
in.appendTag(createItemTag(fluidDrop));
out.appendTag(filledContainer.writeToNBT(new NBTTagCompound()));
NBTTagCompound itemTag = new NBTTagCompound();
itemTag.setTag("in", in);
itemTag.setTag("out", out);
@@ -194,7 +188,8 @@ public class TileFluidAutoFiller extends AENetworkInvTile
@Override
public boolean pushPattern(ICraftingPatternDetails patternDetails, InventoryCrafting table) {
this.returnStack = (IAEItemStack) patternDetails.getCondensedOutputs()[0];
this.returnStack = AEApi.instance().storage()
.createItemStack(patternDetails.getCondensedOutputs()[0].getItemStack());
try {
this.getProxy().getTick().alertDevice(this.getProxy().getNode());
} catch (GridAccessException ignored) {
@@ -277,11 +272,20 @@ public class TileFluidAutoFiller extends AENetworkInvTile
@Override
public TickingRequest getTickingRequest(IGridNode node) {
return new TickingRequest(1, 5, this.returnStack == null, true);
return new TickingRequest(1, 5, false, true);
}
boolean initialized = false;
@Override
public TickRateModulation tickingRequest(IGridNode node, int TicksSinceLastCall) {
if (!initialized) { // run postEvent on AE network is ready
initialized = true;
postEvent();
}
if (this.returnStack == null) return TickRateModulation.SLEEP;
if (this.getStorageGrid() == null) {
return TickRateModulation.SLOWER;
}
@@ -104,7 +104,7 @@ public class TileLevelMaintainer extends AENetworkTile
if (idx == -1) {
AELog.warn("Invalid crafting link: " + link);
return items;
} ;
}
try {
if (getProxy().isActive()) {
final IEnergyGrid energy = getProxy().getEnergy();
@@ -137,8 +137,11 @@ public class TileLevelMaintainer extends AENetworkTile
@Override
public void jobStateChange(ICraftingLink link) {
for (int i = 0; i < REQ_COUNT; i++) {
if (requests[i] != null && requests[i].link == link) {
this.updateLink(i, null);
if (requests[i] != null && link != null) {
ICraftingLink prevLink = requests[i].link;
if (prevLink != null && prevLink.getCraftingID().equals(link.getCraftingID())) {
this.updateLink(i, null);
}
}
}
}
@@ -224,7 +227,7 @@ public class TileLevelMaintainer extends AENetworkTile
this.updateLink(i, null);
}
if (!isCraftable) {
updateState(i, LevelState.Error);
updateState(i, LevelState.NotFound);
}
}
@@ -275,7 +278,7 @@ public class TileLevelMaintainer extends AENetworkTile
this.updateState(jobToSubmitIdx, LevelState.Craft);
this.updateLink(jobToSubmitIdx, link);
} else {
this.updateState(jobToSubmitIdx, LevelState.Error);
this.updateState(jobToSubmitIdx, LevelState.CantCraft);
}
} else if (itemToBegin != null) {
// No jobs to submit, start calculating some item.
@@ -410,10 +413,13 @@ public class TileLevelMaintainer extends AENetworkTile
return link == null || link.isDone() || link.isCanceled();
}
private int getRequestIndexByLink(ICraftingLink link) {
private int getRequestIndexByLink(ICraftingLink targetLink) {
for (int i = 0; i < REQ_COUNT; i++) {
if (requests[i] != null && requests[i].link == link) {
return i;
if (requests[i] != null && targetLink != null) {
ICraftingLink link = requests[i].link;
if (link != null && link.getCraftingID().equals(targetLink.getCraftingID())) {
return i;
}
}
}
return -1;
@@ -48,14 +48,15 @@ import appeng.tile.inventory.AppEngInternalAEInventory;
import appeng.tile.inventory.AppEngInternalInventory;
import appeng.tile.inventory.InvOperation;
import appeng.util.item.AEFluidStack;
import appeng.util.item.AEItemStack;
import io.netty.buffer.ByteBuf;
public class TileSuperStockReplenisher extends AENetworkInvTile
implements IAEFluidInventory, IFluidHandler, IPowerChannelState, IGridTickable {
private final AppEngInternalInventory cell = new AppEngInternalInventory(this, 1);
private final AppEngInternalAEInventory invItems = new AppEngInternalAEInventory(this, 63);
private final AEFluidInventory invFluids = new AEFluidInventory(this, 9, Long.MAX_VALUE);
private final AppEngInternalInventory invItems = new AppEngInternalInventory(this, 63);
private final AEFluidInventory invFluids = new AEFluidInventory(this, 9, Integer.MAX_VALUE);
private final AppEngInternalAEInventory configFluids = new AppEngInternalAEInventory(this, 9);
private final AppEngInternalAEInventory configItems = new AppEngInternalAEInventory(this, 63);
private final BaseActionSource source;
@@ -68,6 +69,7 @@ public class TileSuperStockReplenisher extends AENetworkInvTile
getProxy().setIdlePowerUsage(4D);
getProxy().setFlags(GridFlags.REQUIRE_CHANNEL);
this.source = new MachineSource(this);
invItems.setMaxStackSize(Integer.MAX_VALUE);
}
private TickRateModulation doWork() {
@@ -95,26 +97,25 @@ public class TileSuperStockReplenisher extends AENetworkInvTile
}
for (int i = 0; i < 63; i++) {
IAEItemStack invItem = invItems.getAEStackInSlot(i);
ItemStack invItem = invItems.getStackInSlot(i);
IAEItemStack configItem = configItems.getAEStackInSlot(i);
if (configItem != null) {
IAEItemStack is = configItem.copy();
if (invItem == null) requestItem(is, i);
else if (invItem.equals(is)) {
long invSize = invItem.getStackSize();
long confSize = is.getStackSize();
if (invSize < confSize / 2f) {
is.setStackSize(confSize - invSize);
else if (is.equals(invItem)) {
int confSize = (int) is.getStackSize();
if (invItem.stackSize < confSize / 2f) {
is.setStackSize(confSize - invItem.stackSize);
requestItem(is, i);
} else if (invSize > confSize) {
returnItem(i, invSize - confSize);
} else if (invItem.stackSize > confSize) {
returnItem(i, invItem.stackSize - confSize);
}
} else {
returnItem(i, Long.MAX_VALUE);
returnItem(i, Integer.MAX_VALUE);
}
} else if (invItem != null) {
returnItem(i, Long.MAX_VALUE);
returnItem(i, Integer.MAX_VALUE);
}
}
@@ -148,26 +149,26 @@ public class TileSuperStockReplenisher extends AENetworkInvTile
} catch (final GridAccessException ignored) {}
}
private void returnItem(int index, long amount) {
private void returnItem(int index, int amount) {
try {
IAEItemStack ais = invItems.getAEStackInSlot(index);
long originalSize = ais.getStackSize();
if (amount != Long.MAX_VALUE) {
ais.decStackSize(amount);
ais = ais.copy();
ais.setStackSize(amount);
ItemStack is = invItems.getStackInSlot(index);
if (amount != Integer.MAX_VALUE) {
is.stackSize = is.stackSize - amount;
is = is.copy();
is.stackSize = amount;
storedItemCount -= is.stackSize;
} else {
amount = ais.getStackSize();
invItems.setInventorySlotContents(index, null);
}
storedItemCount -= amount;
IAEItemStack notInserted = this.getProxy().getStorage().getItemInventory()
.injectItems(ais, Actionable.MODULATE, this.source);
.injectItems(AEItemStack.create(is), Actionable.MODULATE, this.source);
if (notInserted != null) {
long notInsertedAmount = notInserted.getStackSize();
invItems.setInventorySlotContents(index, notInserted.getItemStack());
invItems.getAEStackInSlot(index).setStackSize(originalSize - (amount - notInsertedAmount));
storedItemCount += notInsertedAmount;
ItemStack tempStack = invItems.getStackInSlot(index);
if (tempStack != null) {
tempStack.stackSize = tempStack.stackSize + (int) notInserted.getStackSize();
storedItemCount += notInserted.getStackSize();
} else invItems.setInventorySlotContents(index, notInserted.getItemStack());
}
} catch (final GridAccessException ignored) {}
}
@@ -180,12 +181,11 @@ public class TileSuperStockReplenisher extends AENetworkInvTile
IAEItemStack extracted = this.getProxy().getStorage().getItemInventory()
.extractItems(is, Actionable.MODULATE, this.source);
if (extracted != null) {
if (invItems.getAEStackInSlot(index) != null) invItems.getAEStackInSlot(index).add(extracted);
else {
invItems.setInventorySlotContents(index, extracted.getItemStack());
invItems.getAEStackInSlot(index).setStackSize(extracted.getStackSize());
}
storedItemCount += extracted.getStackSize();
ItemStack tempStack = invItems.getStackInSlot(index);
if (tempStack != null) {
tempStack.stackSize = tempStack.stackSize + (int) extracted.getStackSize();
storedItemCount += extracted.getStackSize();
} else invItems.setInventorySlotContents(index, extracted.getItemStack());
}
} catch (final GridAccessException ignored) {}
}
@@ -201,10 +201,6 @@ public class TileSuperStockReplenisher extends AENetworkInvTile
return invItems;
}
public AppEngInternalAEInventory getInternalAEInventory() {
return invItems;
}
public AppEngInternalAEInventory getConfigFluid() {
return configFluids;
}
@@ -256,13 +252,26 @@ public class TileSuperStockReplenisher extends AENetworkInvTile
public void onChangeInventory(IInventory inv, int slot, InvOperation mc, ItemStack removed, ItemStack added) {
switch (mc) {
case setInventorySlotContents -> {
if (inv == cell && added != null) {
if (added.getItem() instanceof ItemBasicStorageCell ibsc) {
totalBytes = ibsc.getBytesLong(added);
} else if (added.getItem() instanceof FCBaseItemCell fcbic) {
totalBytes = fcbic.getBytes(added);
if (added != null) {
if (inv == cell) {
if (added.getItem() instanceof ItemBasicStorageCell ibsc) {
totalBytes = ibsc.getBytesLong(added);
} else if (added.getItem() instanceof FCBaseItemCell fcbic) {
totalBytes = fcbic.getBytes(added);
}
getProxy().setIdlePowerUsage(Math.sqrt(Math.pow(totalBytes, 0.576D)));
} else if (inv == invItems) {
storedItemCount += added.stackSize;
}
}
if (removed != null) {
if (inv == cell) {
totalBytes = 0;
getProxy().setIdlePowerUsage(4d);
} else if (inv == invItems) {
storedItemCount -= removed.stackSize;
}
getProxy().setIdlePowerUsage(Math.sqrt(Math.pow(totalBytes, 0.576D)));
}
}
case decreaseStackSize -> {
@@ -270,8 +279,9 @@ public class TileSuperStockReplenisher extends AENetworkInvTile
totalBytes = 0;
getProxy().setIdlePowerUsage(4d);
}
if (inv == invItems && invItems.getAEStackInSlot(slot) != null)
invItems.getAEStackInSlot(slot).decStackSize(removed.stackSize);
if (inv == invItems) {
storedItemCount -= removed.stackSize;
}
}
case markDirty -> {}
}
@@ -293,8 +303,8 @@ public class TileSuperStockReplenisher extends AENetworkInvTile
}
for (int i = 0; i < 63; i++) {
if (invItems.getAEStackInSlot(i) != null) {
returnItem(i, Long.MAX_VALUE);
if (invItems.getStackInSlot(i) != null) {
returnItem(i, Integer.MAX_VALUE);
}
}
}
@@ -321,12 +331,16 @@ public class TileSuperStockReplenisher extends AENetworkInvTile
@Override
public FluidStack drain(ForgeDirection from, FluidStack resource, boolean doDrain) {
return invFluids.drain(from, resource, doDrain);
FluidStack fs = invFluids.drain(from, resource, doDrain);
if (doDrain && fs != null) storedFluidCount -= fs.amount;
return fs;
}
@Override
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
return invFluids.drain(from, maxDrain, doDrain);
FluidStack fs = invFluids.drain(from, maxDrain, doDrain);
if (doDrain && fs != null) storedFluidCount -= fs.amount;
return fs;
}
@Override
@@ -8,6 +8,9 @@ import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.ClassWriter;
import com.glodblock.github.coremod.transform.CraftingCpuTransformer;
import com.glodblock.github.coremod.transform.CraftingGridCacheTransformer;
import com.glodblock.github.coremod.transform.CraftingTreeNodeTransformer;
import com.glodblock.github.coremod.transform.DualityInterfaceTransformer;
import com.glodblock.github.coremod.transform.ExternalStorageRegistryTransformer;
import com.glodblock.github.coremod.transform.GuiCraftingTransformer;
@@ -22,6 +25,9 @@ public class FCClassTransformer implements IClassTransformer {
public byte[] transform(String name, String transformedName, byte[] basicClass) {
ClassMapper tform;
switch (transformedName) {
case "appeng.crafting.CraftingTreeNode" -> tform = CraftingTreeNodeTransformer.INSTANCE;
case "appeng.me.cache.CraftingGridCache" -> tform = CraftingGridCacheTransformer.INSTANCE;
case "appeng.me.cluster.implementations.CraftingCPUCluster" -> tform = CraftingCpuTransformer.INSTANCE;
case "appeng.helpers.DualityInterface" -> tform = DualityInterfaceTransformer.INSTANCE;
case "appeng.client.gui.implementations.GuiCraftingCPU", "appeng.client.gui.implementations.GuiCraftConfirm", "net.p455w0rd.wirelesscraftingterminal.client.gui.GuiCraftConfirm", "appeng.client.gui.widgets.GuiCraftingTree" -> tform = GuiCraftingTransformer.INSTANCE;
case "appeng.integration.modules.NEI" -> tform = NEITransformer.INSTANCE;
@@ -1,8 +1,12 @@
package com.glodblock.github.coremod.hooker;
import java.util.Arrays;
import java.util.List;
import javax.annotation.Nullable;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.common.util.ForgeDirection;
@@ -11,19 +15,72 @@ import net.minecraftforge.fluids.FluidStack;
import com.glodblock.github.client.gui.GuiFluidCraftConfirm;
import com.glodblock.github.common.item.ItemFluidDrop;
import com.glodblock.github.common.item.ItemFluidPacket;
import com.glodblock.github.inventory.CraftingGridCacheFluidInventoryProxyCell;
import com.glodblock.github.inventory.FluidConvertingInventoryAdaptor;
import com.glodblock.github.inventory.FluidConvertingInventoryCrafting;
import com.glodblock.github.loader.ItemAndBlockHolder;
import com.glodblock.github.util.Ae2Reflect;
import appeng.api.config.Actionable;
import appeng.api.networking.IGrid;
import appeng.api.networking.storage.IStorageGrid;
import appeng.api.storage.IMEInventory;
import appeng.api.storage.IMEInventoryHandler;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEFluidStack;
import appeng.api.storage.data.IAEItemStack;
import appeng.client.gui.IGuiTooltipHandler;
import appeng.crafting.MECraftingInventory;
import appeng.me.cache.CraftingGridCache;
import appeng.me.cluster.implementations.CraftingCPUCluster;
import appeng.util.InventoryAdaptor;
public class CoreModHooks {
public static InventoryCrafting wrapCraftingBuffer(InventoryCrafting inv) {
return new FluidConvertingInventoryCrafting(
inv.eventHandler,
inv.inventoryWidth,
inv.getSizeInventory() / inv.inventoryWidth);
}
public static IAEItemStack wrapFluidPacketStack(IAEItemStack stack) {
if (stack.getItem() == ItemAndBlockHolder.PACKET) {
IAEItemStack dropStack = ItemFluidDrop.newAeStack(ItemFluidPacket.getFluidStack(stack.getItemStack()));
if (dropStack != null) {
return dropStack;
}
}
return stack;
}
public static ItemStack removeFluidPackets(InventoryCrafting inv, int index) {
ItemStack stack = inv.getStackInSlot(index);
if (stack != null && stack.getItem() instanceof ItemFluidPacket) {
FluidStack fluid = ItemFluidPacket.getFluidStack(stack);
return ItemFluidDrop.newStack(fluid);
} else {
return stack;
}
}
@Nullable
public static InventoryAdaptor wrapInventory(@Nullable TileEntity tile, ForgeDirection face) {
return tile != null ? FluidConvertingInventoryAdaptor.wrap(tile, face) : null;
}
public static long getCraftingByteCost(IAEItemStack stack) {
return stack.getItem() instanceof ItemFluidDrop ? (long) Math.ceil(stack.getStackSize() / 1000D)
: stack.getStackSize();
}
public static long getFluidDropsByteCost(long totalBytes, long originByte, IAEItemStack stack) {
if (stack != null && stack.getItem() instanceof ItemFluidDrop) {
return (long) Math.ceil(originByte / 1000D) + totalBytes;
}
return originByte + totalBytes;
}
public static ItemStack displayFluid(IAEItemStack aeStack) {
if (aeStack.getItemStack() != null && aeStack.getItemStack().getItem() instanceof ItemFluidDrop) {
FluidStack fluid = ItemFluidDrop.getFluidStack(aeStack.getItemStack());
@@ -31,6 +88,61 @@ public class CoreModHooks {
} else return aeStack.getItemStack();
}
public static long getFluidSize(IAEItemStack aeStack) {
if (aeStack.getItemStack() != null && aeStack.getItemStack().getItem() instanceof ItemFluidDrop) {
return (long) Math.max(aeStack.getStackSize() / 1000D, 1);
} else return aeStack.getStackSize();
}
public static List<IMEInventoryHandler<?>> craftingGridCacheGetCellArray(final CraftingGridCache instance,
final StorageChannel channel) {
// Equivalent to original function, but using the proxy for fluid channel
return channel == StorageChannel.ITEMS ? Arrays.asList(instance)
: Arrays.asList(new CraftingGridCacheFluidInventoryProxyCell(instance));
}
public static void storeFluidItem(CraftingCPUCluster instance) {
final IGrid g = Ae2Reflect.getGrid(instance);
if (g == null) {
return;
}
final IStorageGrid sg = g.getCache(IStorageGrid.class);
final IMEInventory<IAEItemStack> ii = sg.getItemInventory();
final IMEInventory<IAEFluidStack> jj = sg.getFluidInventory();
final MECraftingInventory inventory = Ae2Reflect.getCPUInventory(instance);
for (IAEItemStack is : inventory.getItemList()) {
is = inventory.extractItems(is.copy(), Actionable.MODULATE, Ae2Reflect.getCPUSource(instance));
if (is != null) {
Ae2Reflect.postCPUChange(instance, is, Ae2Reflect.getCPUSource(instance));
if (is.getItem() instanceof ItemFluidDrop) {
IAEFluidStack fluidDrop = ItemFluidDrop.getAeFluidStack(is);
fluidDrop = jj.injectItems(fluidDrop, Actionable.MODULATE, Ae2Reflect.getCPUSource(instance));
if (fluidDrop == null) {
is = null;
} else {
is.setStackSize(fluidDrop.getStackSize());
}
} else {
is = ii.injectItems(is, Actionable.MODULATE, Ae2Reflect.getCPUSource(instance));
}
}
if (is != null) {
inventory.injectItems(is, Actionable.MODULATE, Ae2Reflect.getCPUSource(instance));
}
}
if (inventory.getItemList().isEmpty()) {
Ae2Reflect.setCPUInventory(instance, new MECraftingInventory());
}
Ae2Reflect.markCPUDirty(instance);
}
public static ItemStack getStackUnderMouse(GuiContainer gui, int mousex, int mousey) {
if (gui instanceof IGuiTooltipHandler guiTooltipHandler) {
return guiTooltipHandler.getHoveredStack();
@@ -0,0 +1,142 @@
package com.glodblock.github.coremod.transform;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import com.glodblock.github.coremod.FCClassTransformer;
public class CraftingCpuTransformer extends FCClassTransformer.ClassMapper {
public static final CraftingCpuTransformer INSTANCE = new CraftingCpuTransformer();
private CraftingCpuTransformer() {
// NO-OP
}
@Override
protected ClassVisitor getClassMapper(ClassVisitor downstream) {
return new TransformCraftingCPUCluster(Opcodes.ASM5, downstream);
}
private static class TransformCraftingCPUCluster extends ClassVisitor {
TransformCraftingCPUCluster(int api, ClassVisitor cv) {
super(api, cv);
}
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
if (name.equals("executeCrafting")) {
return new TransformExecuteCrafting(api, super.visitMethod(access, name, desc, signature, exceptions));
} else if (name.equals("cancel")) {
return new TransformStoreItems(api, super.visitMethod(access, name, desc, signature, exceptions));
}
return super.visitMethod(access, name, desc, signature, exceptions);
}
}
private static class TransformExecuteCrafting extends MethodVisitor {
private boolean gotInventory = false;
private int reach_stack = 0;
TransformExecuteCrafting(int api, MethodVisitor mv) {
super(api, mv);
}
@Override
public void visitFieldInsn(int opcode, String owner, String name, String desc) {
if (opcode == Opcodes.GETFIELD && owner.equals("appeng/me/cluster/implementations/CraftingCPUCluster")
&& name.equals("inventory")) {
gotInventory = true;
}
super.visitFieldInsn(opcode, owner, name, desc);
}
@Override
public void visitLineNumber(int line, Label start) {
gotInventory = false;
super.visitLineNumber(line, start);
}
@Override
public void visitJumpInsn(int opcode, Label label) {
if (opcode == Opcodes.IFNULL && reach_stack == 0) {
reach_stack = 1;
}
super.visitJumpInsn(opcode, label);
}
@Override
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {
if (reach_stack == 1) {
if (opcode == Opcodes.INVOKEINTERFACE && owner.equals("appeng/api/storage/data/IAEItemStack")
&& name.equals("getStackSize")) {
reach_stack = 2;
super.visitMethodInsn(
Opcodes.INVOKESTATIC,
"com/glodblock/github/coremod/hooker/CoreModHooks",
"getFluidSize",
"(Lappeng/api/storage/data/IAEItemStack;)J",
false);
return;
}
}
if (opcode == Opcodes.INVOKEVIRTUAL && owner.equals("net/minecraft/inventory/InventoryCrafting")
&& (name.equals("getStackInSlot") || name.equals("func_70301_a"))) {
super.visitMethodInsn(
Opcodes.INVOKESTATIC,
"com/glodblock/github/coremod/hooker/CoreModHooks",
"removeFluidPackets",
"(Lnet/minecraft/inventory/InventoryCrafting;I)Lnet/minecraft/item/ItemStack;",
false);
return;
}
super.visitMethodInsn(opcode, owner, name, desc, itf);
if (gotInventory) {
if (opcode == Opcodes.INVOKESTATIC && owner.equals("appeng/util/item/AEItemStack")
&& name.equals("create")) {
gotInventory = false;
super.visitMethodInsn(
Opcodes.INVOKESTATIC,
"com/glodblock/github/coremod/hooker/CoreModHooks",
"wrapFluidPacketStack",
"(Lappeng/api/storage/data/IAEItemStack;)Lappeng/api/storage/data/IAEItemStack;",
false);
}
} else if (opcode == Opcodes.INVOKESPECIAL && owner.equals("net/minecraft/inventory/InventoryCrafting")
&& name.equals("<init>")) {
super.visitMethodInsn(
Opcodes.INVOKESTATIC,
"com/glodblock/github/coremod/hooker/CoreModHooks",
"wrapCraftingBuffer",
"(Lnet/minecraft/inventory/InventoryCrafting;)Lnet/minecraft/inventory/InventoryCrafting;",
false);
}
}
}
private static class TransformStoreItems extends MethodVisitor {
TransformStoreItems(int api, MethodVisitor mv) {
super(api, mv);
}
@Override
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {
if (opcode == Opcodes.INVOKESPECIAL && owner.equals("appeng/me/cluster/implementations/CraftingCPUCluster")
&& name.equals("storeItems")) {
super.visitMethodInsn(
Opcodes.INVOKESTATIC,
"com/glodblock/github/coremod/hooker/CoreModHooks",
"storeFluidItem",
"(Lappeng/me/cluster/implementations/CraftingCPUCluster;)V",
false);
} else {
super.visitMethodInsn(opcode, owner, name, desc, itf);
}
}
}
}
@@ -0,0 +1,67 @@
package com.glodblock.github.coremod.transform;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import com.glodblock.github.coremod.FCClassTransformer;
public class CraftingGridCacheTransformer extends FCClassTransformer.ClassMapper {
public static final CraftingGridCacheTransformer INSTANCE = new CraftingGridCacheTransformer();
private CraftingGridCacheTransformer() {
// NO-OP
}
@Override
protected ClassVisitor getClassMapper(ClassVisitor downstream) {
return new CraftingGridCacheTransformer.TransformCraftingGridCache(Opcodes.ASM5, downstream);
}
private static class TransformCraftingGridCache extends ClassVisitor {
TransformCraftingGridCache(int api, ClassVisitor cv) {
super(api, cv);
}
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
if (name.equals("getCellArray")) {
return new CraftingGridCacheTransformer.ReplaceGetCellArray(
api,
super.visitMethod(access, name, desc, signature, exceptions));
}
return super.visitMethod(access, name, desc, signature, exceptions);
}
}
private static class ReplaceGetCellArray extends MethodVisitor {
private final MethodVisitor target;
ReplaceGetCellArray(int api, MethodVisitor mv) {
// Original method is replaced
super(api, null);
target = mv;
}
@Override
public void visitCode() {
target.visitCode();
// Equivalent to
// return CoreModHooks::craftingGridCacheGetCellArray(this, channel);
target.visitVarInsn(Opcodes.ALOAD, 0);
target.visitVarInsn(Opcodes.ALOAD, 1);
target.visitMethodInsn(
Opcodes.INVOKESTATIC,
"com/glodblock/github/coremod/hooker/CoreModHooks",
"craftingGridCacheGetCellArray",
"(Lappeng/me/cache/CraftingGridCache;Lappeng/api/storage/StorageChannel;)Ljava/util/List;",
false);
target.visitInsn(Opcodes.ARETURN);
target.visitMaxs(2, 3);
target.visitEnd();
}
}
}
@@ -0,0 +1,102 @@
package com.glodblock.github.coremod.transform;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
import com.glodblock.github.coremod.FCClassTransformer;
public class CraftingTreeNodeTransformer extends FCClassTransformer.ClassMapper {
public static final CraftingTreeNodeTransformer INSTANCE = new CraftingTreeNodeTransformer();
private CraftingTreeNodeTransformer() {
// NO-OP
}
@Override
protected ClassVisitor getClassMapper(ClassVisitor downstream) {
return new TransformCraftingTreeNode(Opcodes.ASM5, downstream);
}
private static class TransformCraftingTreeNode extends ClassVisitor {
TransformCraftingTreeNode(int api, ClassVisitor cv) {
super(api, cv);
}
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
if (name.equals("request")) {
return new TransformRequest(api, super.visitMethod(access, name, desc, signature, exceptions));
}
return super.visitMethod(access, name, desc, signature, exceptions);
}
}
private static class TransformRequest extends MethodVisitor {
private boolean writingBytes = false;
private int cnt = 0;
TransformRequest(int api, MethodVisitor mv) {
super(api, mv);
}
@Override
public void visitFieldInsn(int opcode, String owner, String name, String desc) {
if (opcode == Opcodes.GETFIELD && owner.equals("appeng/crafting/CraftingTreeNode")
&& name.equals("bytes")) {
writingBytes = true;
}
super.visitFieldInsn(opcode, owner, name, desc);
}
@Override
public void visitLineNumber(int line, Label start) {
writingBytes = false; // no write here
super.visitLineNumber(line, start);
}
@Override
public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {
if (writingBytes && opcode == Opcodes.INVOKEINTERFACE
&& owner.equals("appeng/api/storage/data/IAEItemStack")
&& name.equals("getStackSize")) {
writingBytes = false;
cnt++;
super.visitMethodInsn(
Opcodes.INVOKESTATIC,
"com/glodblock/github/coremod/hooker/CoreModHooks",
"getCraftingByteCost",
"(Lappeng/api/storage/data/IAEItemStack;)J",
false);
} else {
super.visitMethodInsn(opcode, owner, name, desc, itf);
}
}
@Override
public void visitInsn(int opcode) {
if (writingBytes && cnt == 5 && opcode == Opcodes.LADD) {
super.visitVarInsn(Opcodes.ALOAD, 0);
super.visitFieldInsn(
Opcodes.GETFIELD,
"appeng/crafting/CraftingTreeNode",
"what",
"Lappeng/api/storage/data/IAEItemStack;");
super.visitMethodInsn(
Opcodes.INVOKESTATIC,
"com/glodblock/github/coremod/hooker/CoreModHooks",
"getFluidDropsByteCost",
"(JJLappeng/api/storage/data/IAEItemStack;)J",
false);
writingBytes = false;
cnt++;
return;
}
super.visitInsn(opcode);
}
}
}
@@ -14,7 +14,9 @@ import net.minecraft.world.World;
import com.glodblock.github.FluidCraft;
import com.glodblock.github.common.item.FCBaseItem;
import com.glodblock.github.util.ModAndClassUtil;
import codechicken.nei.api.API;
import cpw.mods.fml.common.registry.GameRegistry;
/**
@@ -38,6 +40,10 @@ public class ProxyItem extends FCBaseItem {
@Override
public FCBaseItem register() {
GameRegistry.registerItem(this, "ec2placeholder." + name, FluidCraft.MODID);
if (!ModAndClassUtil.EC2) {
API.hideItem("ec2placeholder." + name);
}
return this;
}
@@ -6,10 +6,10 @@ import net.minecraft.item.ItemStack;
import com.glodblock.github.api.FluidCraftAPI;
import com.glodblock.github.common.storage.IStorageFluidCell;
import com.glodblock.github.crossmod.extracells.ProxyItem;
import com.glodblock.github.inventory.FluidCellConfig;
import appeng.api.config.FuzzyMode;
import appeng.api.storage.data.IAEFluidStack;
import appeng.items.contents.CellConfig;
import appeng.items.contents.CellUpgrades;
import appeng.util.Platform;
@@ -88,7 +88,7 @@ public class ProxyFluidStorageCell extends ProxyItem implements IStorageFluidCel
@Override
public IInventory getConfigInventory(ItemStack is) {
return new CellConfig(is);
return new FluidCellConfig(is);
}
@Override
@@ -0,0 +1,85 @@
package com.glodblock.github.inventory;
import org.jetbrains.annotations.NotNull;
import com.glodblock.github.common.item.ItemFluidDrop;
import appeng.api.config.AccessRestriction;
import appeng.api.config.Actionable;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.storage.IMEInventoryHandler;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEFluidStack;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList;
import appeng.me.cache.CraftingGridCache;
public class CraftingGridCacheFluidInventoryProxyCell implements IMEInventoryHandler<IAEFluidStack> {
private final CraftingGridCache inner;
public CraftingGridCacheFluidInventoryProxyCell(final CraftingGridCache craftingGridCache) {
inner = craftingGridCache;
}
@Override
public IAEFluidStack injectItems(IAEFluidStack input, Actionable type, BaseActionSource src) {
return ItemFluidDrop
.getAeFluidStack((IAEItemStack) inner.injectItems(ItemFluidDrop.newAeStack(input), type, src));
}
@Override
public IAEFluidStack extractItems(IAEFluidStack request, Actionable mode, BaseActionSource src) {
return null;
}
@Override
public IItemList<IAEFluidStack> getAvailableItems(IItemList<IAEFluidStack> out, int iteration) {
return out;
}
@Override
public IAEFluidStack getAvailableItem(@NotNull IAEFluidStack request, int iteration) {
return null;
}
@Override
public StorageChannel getChannel() {
return StorageChannel.FLUIDS;
}
@Override
public AccessRestriction getAccess() {
return inner.getAccess();
}
@Override
public boolean isPrioritized(IAEFluidStack input) {
return inner.isPrioritized(input);
}
@Override
public boolean canAccept(IAEFluidStack input) {
return inner.canAccept(ItemFluidDrop.newAeStack(input));
}
@Override
public int getPriority() {
return inner.getPriority();
}
@Override
public int getSlot() {
return inner.getSlot();
}
@Override
public boolean validForPass(int i) {
return inner.validForPass(i);
}
@Override
public boolean isAutoCraftingInventory() {
return inner.isAutoCraftingInventory();
}
}
@@ -0,0 +1,27 @@
package com.glodblock.github.inventory;
import net.minecraft.item.ItemStack;
import com.glodblock.github.common.item.ItemFluidPacket;
import com.glodblock.github.util.Util;
import appeng.items.contents.CellConfig;
public class FluidCellConfig extends CellConfig {
public FluidCellConfig(ItemStack is) {
super(is);
}
@Override
public void setInventorySlotContents(int slot, ItemStack newItemStack) {
if (newItemStack != null && !(newItemStack.getItem() instanceof ItemFluidPacket)) {
ItemStack fluidPacket = ItemFluidPacket.newDisplayStack(Util.getFluidFromItem(newItemStack));
if (fluidPacket != null) {
super.setInventorySlotContents(slot, fluidPacket);
return;
}
}
super.setInventorySlotContents(slot, newItemStack);
}
}
@@ -562,19 +562,6 @@ public enum GuiType {
}
}),
GUI_SUPER_STOCK_REPLENISHER(new TileGuiFactory<>(TileSuperStockReplenisher.class) {
@Override
protected Object createServerGui(EntityPlayer player, TileSuperStockReplenisher inv) {
return new ContainerSuperStockReplenisher(player.inventory, inv);
}
@Override
protected Object createClientGui(EntityPlayer player, TileSuperStockReplenisher inv) {
return new GuiSuperStockReplenisher(player.inventory, inv);
}
}),
WIRELESS_MAGNET_FILTER(new ItemGuiFactory<>(ITerminalHost.class) {
@Override
@@ -586,6 +573,19 @@ public enum GuiType {
protected Object createClientGui(EntityPlayer player, ITerminalHost inv) {
return new GuiMagnetFilter(player.inventory, inv);
}
}),
GUI_SUPER_STOCK_REPLENISHER(new TileGuiFactory<>(TileSuperStockReplenisher.class) {
@Override
protected Object createServerGui(EntityPlayer player, TileSuperStockReplenisher inv) {
return new ContainerSuperStockReplenisher(player.inventory, inv);
}
@Override
protected Object createClientGui(EntityPlayer player, TileSuperStockReplenisher inv) {
return new GuiSuperStockReplenisher(player.inventory, inv);
}
});
public static final List<GuiType> VALUES = ImmutableList.copyOf(values());
@@ -16,20 +16,25 @@ import com.glodblock.github.util.Util;
import appeng.api.config.Actionable;
import appeng.api.config.PowerMultiplier;
import appeng.api.implementations.items.IAEItemPowerStorage;
import appeng.api.networking.IGrid;
import appeng.api.networking.IGridNode;
import appeng.api.networking.security.PlayerSource;
import appeng.api.networking.storage.IStorageGrid;
import appeng.api.storage.ITerminalPins;
import appeng.api.storage.MEMonitorHandler;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEFluidStack;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IAEStack;
import appeng.api.util.AECableType;
import appeng.items.contents.PinsHandler;
import appeng.items.contents.PinsHolder;
import appeng.items.tools.powered.ToolWirelessTerminal;
import appeng.me.storage.NullInventory;
import appeng.util.Platform;
public abstract class BaseWirelessInventory extends MEMonitorHandler implements IWirelessTerminal, IWirelessExtendCard {
public abstract class BaseWirelessInventory extends MEMonitorHandler
implements IWirelessTerminal, IWirelessExtendCard, ITerminalPins {
protected final ItemStack target;
protected final IAEItemPowerStorage ips;
@@ -42,17 +47,20 @@ public abstract class BaseWirelessInventory extends MEMonitorHandler implements
protected WirelessMagnet.Mode magnetMode = WirelessMagnet.Mode.Off;
protected EntityPlayer player;
protected boolean restock;
private final PinsHolder pinsInv;
@SuppressWarnings("unchecked")
public BaseWirelessInventory(final ItemStack is, final int slot, IGridNode gridNode, EntityPlayer player,
StorageChannel channel) {
super(Objects.requireNonNull(Util.getWirelessInv(is, player, channel)));
this.player = player;
this.ips = (ToolWirelessTerminal) is.getItem();
this.grid = gridNode;
this.target = is;
this.inventorySlot = slot;
this.channel = channel;
this.source = new PlayerSource(player, this);
pinsInv = new PinsHolder(is);
this.readFromNBT();
}
@@ -60,18 +68,20 @@ public abstract class BaseWirelessInventory extends MEMonitorHandler implements
public BaseWirelessInventory(final ItemStack is, final int slot, IGridNode gridNode, EntityPlayer player,
StorageChannel channel, boolean nullInventory) {
super(new NullInventory<>());
this.player = player;
this.ips = (ToolWirelessTerminal) is.getItem();
this.grid = gridNode;
this.target = is;
this.inventorySlot = slot;
this.channel = channel;
this.source = new PlayerSource(player, this);
pinsInv = new PinsHolder(is);
this.readFromNBT();
}
private void readFromNBT() {
NBTTagCompound data = Platform.openNbtData(this.target);
this.setMagnetCardMode(WirelessMagnet.Mode.values()[data.getInteger(modeKey)]);
this.setMagnetCardMode(WirelessMagnet.Mode.getModes()[data.getInteger(modeKey)]);
this.setRestock(data.getBoolean(ItemBaseWirelessTerminal.restockItems));
}
@@ -137,9 +147,8 @@ public abstract class BaseWirelessInventory extends MEMonitorHandler implements
}
public void setMagnetCardNextMode() {
setMagnetCardMode(
WirelessMagnet.Mode.values()[(getMagnetCardMode().ordinal() + 1)
% WirelessMagnet.Mode.values().length]);
final WirelessMagnet.Mode[] MODES = WirelessMagnet.Mode.getModes();
setMagnetCardMode(MODES[(getMagnetCardMode().ordinal() + 1) % MODES.length]);
}
public void setRestock(boolean val) {
@@ -183,4 +192,14 @@ public abstract class BaseWirelessInventory extends MEMonitorHandler implements
data.setBoolean(restockItems, this.restock);
data.setInteger(modeKey, this.getMagnetCardMode().ordinal());
}
@Override
public PinsHandler getPinsHandler(EntityPlayer player) {
return pinsInv.getHandler(player);
}
@Override
public IGrid getGrid() {
return grid != null ? grid.getGrid() : null;
}
}
@@ -2,7 +2,6 @@ package com.glodblock.github.inventory.item;
import static com.glodblock.github.common.Config.magnetRange;
import java.util.Iterator;
import java.util.List;
import net.minecraft.entity.item.EntityItem;
@@ -12,9 +11,12 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.entity.player.PlayerPickupXpEvent;
import com.glodblock.github.common.item.ItemWirelessUltraTerminal;
import appeng.entity.EntityFloatingItem;
import appeng.util.Platform;
public class WirelessMagnet {
@@ -24,9 +26,16 @@ public class WirelessMagnet {
public static String filterConfigKey = "MagnetConfig";
public enum Mode {
Off,
Inv,
ME
ME;
private static final Mode[] MODES = Mode.values();
public static Mode[] getModes() {
return MODES;
}
}
public enum ListMode {
@@ -34,7 +43,7 @@ public class WirelessMagnet {
BlackList
}
public static List<?> getEntitiesInRange(Class<?> entityType, World world, int x, int y, int z, int distance) {
private static <T> List<T> getEntitiesInRange(Class<T> entityType, World world, int x, int y, int z, int distance) {
return world.getEntitiesWithinAABB(
entityType,
AxisAlignedBB.getBoundingBox(
@@ -46,75 +55,87 @@ public class WirelessMagnet {
z + distance));
}
@SuppressWarnings("unchecked")
public static boolean isConfigured(ItemStack wirelessTerm) {
NBTTagCompound data = Platform.openNbtData(wirelessTerm);
return data.hasKey(modeKey);
}
public static void doMagnet(ItemStack wirelessTerm, World world, EntityPlayer player) {
if (wirelessTerm == null || player == null || player.isSneaking() || !isConfigured(wirelessTerm)) return;
Iterator<?> iterator = getEntitiesInRange(
// This method uses the same algorithm as the magnet from draconic evolution
// if changes are ever made, they should be made on both
public static void doMagnet(ItemStack wirelessTerm, EntityPlayer player) {
if (player.ticksExisted % 5 != 0 || player.isSneaking() || !isConfigured(wirelessTerm)) return;
World world = player.worldObj;
final List<EntityItem> items = getEntitiesInRange(
EntityItem.class,
world,
(int) player.posX,
(int) player.posY,
(int) player.posZ,
magnetRange).iterator();
magnetRange);
final boolean skipPlayerCheck = world.playerEntities.size() < 2;
boolean playSound = false;
// account for the server/client desync
double playerEyesPos = player.posY
+ (world.isRemote ? player.getEyeHeight() - player.getDefaultEyeHeight() : player.getEyeHeight());
while (iterator.hasNext()) {
EntityItem itemToGet = (EntityItem) iterator.next();
EntityPlayer closestPlayer = world.getClosestPlayerToEntity(itemToGet, magnetRange);
if (closestPlayer != null && closestPlayer == player) {
NBTTagCompound itemNBT = new NBTTagCompound();
itemToGet.writeEntityToNBT(itemNBT);
if (itemToGet.func_145800_j() == null
|| !itemToGet.func_145800_j().equals(player.getCommandSenderName()))
itemToGet.delayBeforeCanPickup = 0;
if (itemToGet.delayBeforeCanPickup <= 0) {
itemNBT.setBoolean("attractable", true);
itemToGet.readEntityFromNBT(itemNBT);
}
if (itemNBT.getBoolean("attractable")) {
itemToGet.motionX = itemToGet.motionY = itemToGet.motionZ = 0;
itemToGet.setPosition(
player.posX - 0.2 + (world.rand.nextDouble() * 0.4),
player.posY - 0.6,
player.posZ - 0.2 + (world.rand.nextDouble() * 0.4));
}
for (EntityItem itemToGet : items) {
if (itemToGet.getEntityItem() == null || itemToGet instanceof EntityFloatingItem) {
continue;
}
if (!skipPlayerCheck) {
EntityPlayer closestPlayer = world.getClosestPlayerToEntity(itemToGet, magnetRange);
if (closestPlayer == null || closestPlayer != player) continue;
}
if (itemToGet.delayBeforeCanPickup > 0) {
itemToGet.delayBeforeCanPickup = 0;
}
playSound = true;
itemToGet.motionX = 0;
itemToGet.motionY = 0;
itemToGet.motionZ = 0;
itemToGet.setPosition(
player.posX - 0.2 + (world.rand.nextDouble() * 0.4),
playerEyesPos - 0.62,
player.posZ - 0.2 + (world.rand.nextDouble() * 0.4));
}
// xp
iterator = getEntitiesInRange(
EntityXPOrb.class,
world,
(int) player.posX,
(int) player.posY,
(int) player.posZ,
magnetRange).iterator();
while (iterator.hasNext()) {
EntityXPOrb xpToGet = (EntityXPOrb) iterator.next();
EntityPlayer closestPlayer = world.getClosestPlayerToEntity(xpToGet, magnetRange);
if (playSound) {
world.playSoundAtEntity(
player,
"random.orb",
0.1F,
0.5F * ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 2F));
}
if (!xpToGet.isDead && !xpToGet.isInvisible() && closestPlayer != null && closestPlayer == player) {
int xpAmount = xpToGet.xpValue;
xpToGet.xpValue = 0;
player.xpCooldown = 0;
player.addExperience(xpAmount);
xpToGet.setDead();
xpToGet.setInvisible(true);
world.playSoundAtEntity(
player,
"random.orb",
0.08F,
0.5F * ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.8F));
if (!world.isRemote) {
// xp
final List<EntityXPOrb> xpOrbs = getEntitiesInRange(
EntityXPOrb.class,
world,
(int) player.posX,
(int) player.posY,
(int) player.posZ,
magnetRange);
for (EntityXPOrb xpToGet : xpOrbs) {
if (xpToGet.field_70532_c == 0 && xpToGet.isEntityAlive()) {
if (!skipPlayerCheck) {
EntityPlayer closestPlayer = world.getClosestPlayerToEntity(xpToGet, magnetRange);
if (closestPlayer == null || closestPlayer != player) continue;
}
if (MinecraftForge.EVENT_BUS.post(new PlayerPickupXpEvent(player, xpToGet))) continue;
world.playSoundAtEntity(
player,
"random.orb",
0.1F,
0.5F * ((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.8F));
player.onItemPickup(xpToGet, 1);
player.addExperience(xpToGet.xpValue);
xpToGet.setDead();
}
}
}
}
@@ -123,7 +144,7 @@ public class WirelessMagnet {
if (is != null && is.getItem() instanceof ItemWirelessUltraTerminal) {
NBTTagCompound data = Platform.openNbtData(is);
if (data.hasKey(modeKey)) {
return Mode.values()[data.getInteger(modeKey)];
return Mode.getModes()[data.getInteger(modeKey)];
}
setMode(is, Mode.Off);
}
@@ -13,7 +13,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import com.glodblock.github.inventory.ItemBiggerAppEngInventory;
@@ -210,19 +209,11 @@ public class WirelessMagnetCardFilterInventory extends BaseWirelessInventory imp
return null;
}
public boolean doInject(IAEItemStack is, EntityItem itemToGet, World world) {
public boolean doInject(IAEItemStack is, EntityItem itemToGet) {
IAEItemStack ais = (IAEItemStack) injectItems(is);
if (ais != null) {
player.onItemPickup(itemToGet, ais.getItemStack().stackSize);
player.inventory.addItemStackToInventory(ais.getItemStack());
world.playSoundAtEntity(
player,
"random.pop",
0.15F,
((world.rand.nextFloat() - world.rand.nextFloat()) * 0.7F + 1.0F) * 2.0F);
return false;
}
return true;
if (ais == null) return true;
itemToGet.getEntityItem().stackSize = (int) ais.getStackSize();
return false;
}
public boolean isItemFiltered(ItemStack inputItemStack) {
@@ -1,5 +1,6 @@
package com.glodblock.github.nei;
import java.util.ArrayList;
import java.util.regex.Pattern;
import net.minecraft.item.ItemStack;
@@ -10,9 +11,15 @@ import com.glodblock.github.common.storage.IFluidCellInventoryHandler;
import com.glodblock.github.common.storage.IStorageFluidCell;
import appeng.api.AEApi;
import appeng.api.implementations.items.IStorageCell;
import appeng.api.storage.ICellInventory;
import appeng.api.storage.IMEInventoryHandler;
import appeng.api.storage.StorageChannel;
import appeng.api.storage.data.IAEFluidStack;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IItemList;
import appeng.me.storage.CellInventoryHandler;
import appeng.util.IterationCounter;
import codechicken.nei.SearchField;
import codechicken.nei.SearchTokenParser;
import codechicken.nei.api.ItemFilter;
@@ -56,7 +63,10 @@ public class NEISearchFilter implements SearchTokenParser.ISearchParserProvider
if (inventory instanceof final IFluidCellInventoryHandler handler) {
final IFluidCellInventory cellInventory = handler.getCellInv();
if (cellInventory != null) {
for (IAEFluidStack fluid : cellInventory.getContents()) {
final ArrayList<IAEFluidStack> out = new ArrayList<>();
handler.getPartitionInv().forEach(out::add);
out.addAll(cellInventory.getContents());
for (IAEFluidStack fluid : out) {
boolean result = pattern.matcher(fluid.getFluidStack().getLocalizedName().toLowerCase())
.find();
if (result) return true;
@@ -65,6 +75,25 @@ public class NEISearchFilter implements SearchTokenParser.ISearchParserProvider
}
}
}
if (itemStack.getItem() instanceof IStorageCell) {
final IMEInventoryHandler<?> inventory = AEApi.instance().registries().cell()
.getCellInventory(itemStack, null, StorageChannel.ITEMS);
if (inventory instanceof final CellInventoryHandler handler) {
final ICellInventory cellInventory = handler.getCellInv();
if (cellInventory != null) {
final IItemList<IAEItemStack> out = AEApi.instance().storage().createItemFilterList();
for (IAEItemStack item : handler.getPartitionList().getItems())
out.add(item);
cellInventory.getAvailableItems(out, IterationCounter.fetchNewId());
for ( IAEItemStack item : out) {
boolean result = pattern.matcher(item.getItemStack().getDisplayName().toLowerCase())
.find();
if (result) return true;
}
}
}
}
return false;
}
@@ -43,7 +43,7 @@ public class CPacketInventoryAction implements IMessage {
public CPacketInventoryAction() {}
public CPacketInventoryAction(final InventoryAction action, final int slot, final int id) {
public CPacketInventoryAction(final InventoryAction action, final int slot, final long id) {
this.action = action;
this.slot = slot;
this.id = id;
@@ -51,7 +51,7 @@ public class CPacketInventoryAction implements IMessage {
this.isEmpty = true;
}
public CPacketInventoryAction(final InventoryAction action, final int slot, final int id, IAEItemStack stack) {
public CPacketInventoryAction(final InventoryAction action, final int slot, final long id, IAEItemStack stack) {
this.action = action;
this.slot = slot;
this.id = id;
@@ -123,6 +123,9 @@ public class CPacketInventoryAction implements IMessage {
if (baseContainer.getTargetStack() != null) {
cca.getCraftingItem().putStack(baseContainer.getTargetStack().getItemStack());
cca.setItemToCraft(baseContainer.getTargetStack());
if (message.id > 0) {
cca.setInitialCraftAmount(message.id);
}
}
cca.detectAndSendChanges();
}
@@ -67,7 +67,7 @@ public class CPacketValueConfig implements IMessage {
player.addChatMessage(
new ChatComponentText(
StatCollector.translateToLocal(
!Util.isRestock(wirelessTerm)
Util.isRestock(wirelessTerm)
? NameConst.TT_ULTRA_TERMINAL_RESTOCK_ON
: NameConst.TT_ULTRA_TERMINAL_RESTOCK_OFF)));
} else {
@@ -95,7 +95,6 @@ public class SPacketPatternItemRenamer implements IMessage {
Slot slot = player.openContainer.getSlot(message.valueIndex);
if (slot != null && slot.getHasStack()) {
ItemStack nextStack = slot.getStack().copy();
nextStack.setRepairCost(2);
nextStack.setStackDisplayName(message.name);
slot.putStack(nextStack);
}
@@ -70,10 +70,7 @@ public class CommonProxy {
.getFilter(wirelessTerm, result.getLeft(), gridNode, player);
if (inv.isPassFilter(stack)) {
if (inv.doInject(
AEApi.instance().storage().createItemStack(stack),
itemEntity,
world)) {
if (inv.doInject(AEApi.instance().storage().createItemStack(stack), itemEntity)) {
itemEntity.setDead();
e.setCanceled(true);
}
@@ -94,7 +91,7 @@ public class CommonProxy {
public void init(FMLInitializationEvent event) {
this.registerMovables();
FMLCommonHandler.instance().bus().register(SPacketMEUpdateBuffer.class);
FMLCommonHandler.instance().bus().register(new SPacketMEUpdateBuffer());
if (ModAndClassUtil.ThE) {
AspectUtil.init();
}
@@ -8,11 +8,16 @@ import net.minecraftforge.fluids.IFluidHandler;
import appeng.api.implementations.IUpgradeableHost;
import appeng.api.networking.IGrid;
import appeng.api.networking.crafting.ICraftingCPU;
import appeng.api.networking.crafting.ICraftingJob;
import appeng.api.networking.security.BaseActionSource;
import appeng.api.networking.security.MachineSource;
import appeng.api.storage.IMEInventory;
import appeng.api.storage.data.IAEItemStack;
import appeng.container.implementations.ContainerCraftConfirm;
import appeng.container.implementations.ContainerUpgradeable;
import appeng.container.implementations.CraftingCPURecord;
import appeng.crafting.MECraftingInventory;
import appeng.helpers.DualityInterface;
import appeng.me.cluster.implementations.CraftingCPUCluster;
import appeng.me.helpers.AENetworkProxy;
@@ -27,12 +32,19 @@ public class Ae2Reflect {
private static final Field fInventory_containerUpgrade;
private static final Field fAEPass_internal;
private static final Field fAEInv_partitionList;
private static final Field fCPU_cpu;
private static final Field fCPU_myName;
private static final Field fCPU_processors;
private static final Field fCPU_size;
private static final Field fCPU_inventory;
private static final Field fCPU_machineSrc;
private static final Field fContainerUpgradeable_upgradeable;
private static final Field fDualInterface_gridProxy;
private static final Field fCraftConfirm_result;
private static final Method mItemSlot_setExtractable;
private static final Method mCPU_getGrid;
private static final Method mCPU_postChange;
private static final Method mCPU_markDirty;
private static final Method mP2PLiquids_getTarget;
private static final Method mCraftConfirm_getGrid;
@@ -41,11 +53,22 @@ public class Ae2Reflect {
fInventory_containerUpgrade = reflectField(ContainerUpgradeable.class, "upgradeable");
fAEPass_internal = reflectField(MEPassThrough.class, "internal");
fAEInv_partitionList = reflectField(MEInventoryHandler.class, "myPartitionList");
fCPU_cpu = Ae2Reflect.reflectField(CraftingCPURecord.class, "cpu");
fCPU_myName = Ae2Reflect.reflectField(CraftingCPURecord.class, "myName");
fCPU_processors = Ae2Reflect.reflectField(CraftingCPURecord.class, "processors");
fCPU_size = Ae2Reflect.reflectField(CraftingCPURecord.class, "size");
fCPU_inventory = Ae2Reflect.reflectField(CraftingCPUCluster.class, "inventory");
fCPU_machineSrc = Ae2Reflect.reflectField(CraftingCPUCluster.class, "machineSrc");
fContainerUpgradeable_upgradeable = Ae2Reflect.reflectField(ContainerUpgradeable.class, "upgradeable");
mItemSlot_setExtractable = reflectMethod(ItemSlot.class, "setExtractable", boolean.class);
fDualInterface_gridProxy = reflectField(DualityInterface.class, "gridProxy");
mCPU_getGrid = reflectMethod(CraftingCPUCluster.class, "getGrid");
mCPU_postChange = reflectMethod(
CraftingCPUCluster.class,
"postChange",
IAEItemStack.class,
BaseActionSource.class);
mCPU_markDirty = reflectMethod(CraftingCPUCluster.class, "markDirty");
mP2PLiquids_getTarget = reflectMethod(PartP2PLiquids.class, "getTarget");
fCraftConfirm_result = reflectField(ContainerCraftConfirm.class, "result");
mCraftConfirm_getGrid = reflectMethod(ContainerCraftConfirm.class, "getGrid");
@@ -109,10 +132,22 @@ public class Ae2Reflect {
}
}
public static ICraftingCPU getCPU(CraftingCPURecord cpu) {
return Ae2Reflect.readField(cpu, fCPU_cpu);
}
public static String getName(CraftingCPURecord cpu) {
return Ae2Reflect.readField(cpu, fCPU_myName);
}
public static int getProcessors(CraftingCPURecord cpu) {
return Ae2Reflect.readField(cpu, fCPU_processors);
}
public static long getSize(CraftingCPURecord cpu) {
return Ae2Reflect.readField(cpu, fCPU_size);
}
public static IUpgradeableHost getUpgradeList(ContainerUpgradeable container) {
return Ae2Reflect.readField(container, fInventory_containerUpgrade);
}
@@ -137,6 +172,18 @@ public class Ae2Reflect {
return Ae2Reflect.readField(ccc, fCraftConfirm_result);
}
public static MECraftingInventory getCPUInventory(CraftingCPUCluster cpu) {
return Ae2Reflect.readField(cpu, fCPU_inventory);
}
public static void setCPUInventory(CraftingCPUCluster cpu, MECraftingInventory value) {
Ae2Reflect.writeField(cpu, fCPU_inventory, value);
}
public static MachineSource getCPUSource(CraftingCPUCluster cpu) {
return Ae2Reflect.readField(cpu, fCPU_machineSrc);
}
public static IUpgradeableHost getUpgradeableHost(ContainerUpgradeable owner) {
return Ae2Reflect.readField(owner, fContainerUpgradeable_upgradeable);
}
@@ -145,6 +192,22 @@ public class Ae2Reflect {
return Ae2Reflect.readField(owner, fDualInterface_gridProxy);
}
public static void postCPUChange(CraftingCPUCluster cpu, IAEItemStack stack, MachineSource src) {
try {
mCPU_postChange.invoke(cpu, stack, src);
} catch (Exception e) {
throw new IllegalStateException("Failed to invoke method: " + mCPU_postChange, e);
}
}
public static void markCPUDirty(CraftingCPUCluster cpu) {
try {
mCPU_markDirty.invoke(cpu);
} catch (Exception e) {
throw new IllegalStateException("Failed to invoke method: " + mCPU_markDirty, e);
}
}
public static IFluidHandler getP2PLiquidTarget(PartP2PLiquids p2p) {
try {
return (IFluidHandler) mP2PLiquids_getTarget.invoke(p2p);
@@ -1,8 +1,5 @@
package com.glodblock.github.util;
import static appeng.util.Platform.readStackNBT;
import static appeng.util.Platform.stackConvert;
import java.util.Arrays;
import java.util.Objects;
@@ -17,9 +14,7 @@ import net.minecraftforge.common.util.Constants;
import appeng.api.networking.crafting.ICraftingPatternDetails;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IAEStack;
import appeng.helpers.PatternHelper;
import appeng.util.Platform;
import appeng.util.item.AEItemStack;
public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<FluidPatternDetails> {
@@ -27,7 +22,6 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
private final ItemStack patternStack;
private IAEItemStack patternStackAe;
private IAEItemStack[] inputs = null, inputsCond = null, outputs = null, outputsCond = null;
private IAEStack<?>[] aeInputs = null, aeInputsCond = null, aeOutputs = null, aeOutputsCond = null;
private int priority = 0;
private int combine = 0;
private int beSubstitute = 0;
@@ -89,42 +83,18 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
return checkInitialized(inputs);
}
@Override
public IAEStack<?>[] getAEInputs() {
return checkInitialized(aeInputs);
}
@Override
public IAEItemStack[] getCondensedInputs() {
return checkInitialized(inputsCond);
}
@Override
public IAEStack<?>[] getCondensedAEInputs() {
return checkInitialized(aeInputsCond);
}
public boolean setInputs(IAEStack<?>[] inputs) {
IAEStack<?>[] condensed = condenseAEStacks(inputs);
public boolean setInputs(IAEItemStack[] inputs) {
IAEItemStack[] condensed = condenseStacks(inputs);
if (condensed.length == 0) {
return false;
}
this.aeInputs = inputs;
this.aeInputsCond = condensed;
IAEItemStack[] legacy = new IAEItemStack[inputs.length];
for (int i = 0; i < inputs.length; i++) {
if (inputs[i] != null) {
if (inputs[i].isItem()) {
legacy[i] = (IAEItemStack) inputs[i];
} else {
legacy[i] = stackConvert(inputs[i]);
}
}
}
this.inputs = legacy;
this.inputsCond = condenseStacks(legacy);
this.inputs = inputs;
this.inputsCond = condensed;
return true;
}
@@ -133,42 +103,18 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
return checkInitialized(outputs);
}
@Override
public IAEStack<?>[] getAEOutputs() {
return checkInitialized(aeOutputs);
}
@Override
public IAEItemStack[] getCondensedOutputs() {
return checkInitialized(outputsCond);
}
@Override
public IAEStack<?>[] getCondensedAEOutputs() {
return checkInitialized(aeOutputsCond);
}
public boolean setOutputs(IAEStack<?>[] outputs) {
IAEStack<?>[] condensed = condenseAEStacks(outputs);
public boolean setOutputs(IAEItemStack[] outputs) {
IAEItemStack[] condensed = condenseStacks(outputs);
if (condensed.length == 0) {
return false;
}
this.aeOutputs = Arrays.stream(outputs).filter(Objects::nonNull).toArray(IAEStack<?>[]::new);
this.aeOutputsCond = condensed;
IAEItemStack[] legacy = new IAEItemStack[outputs.length];
for (int i = 0; i < outputs.length; i++) {
if (outputs[i] != null) {
if (outputs[i].isItem()) {
legacy[i] = (IAEItemStack) outputs[i];
} else {
legacy[i] = stackConvert(outputs[i]);
}
}
}
this.outputs = legacy;
this.outputsCond = condenseStacks(legacy);
this.outputs = Arrays.stream(outputs).filter(Objects::nonNull).toArray(IAEItemStack[]::new);
this.outputsCond = condensed;
return true;
}
@@ -176,20 +122,11 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
return PatternHelper.convertToCondensedList(stacks);
}
private static IAEStack<?>[] condenseAEStacks(IAEStack<?>[] stacks) {
return PatternHelper.convertToCondensedAEList(stacks);
}
@Override
public ItemStack getOutput(InventoryCrafting craftingInv, World world) {
throw new IllegalStateException("Not a crafting recipe!");
}
@Override
public boolean isValidItemForSlot(int slotIndex, IAEStack<?> stack, World world) {
throw new IllegalStateException("Not a crafting recipe!");
}
@Override
public boolean isValidItemForSlot(int slotIndex, ItemStack itemStack, World world) {
throw new IllegalStateException("Not a crafting recipe!");
@@ -234,12 +171,12 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
return patternStack;
}
public static NBTTagList writeStackArray(IAEStack<?>[] stacks) {
public static NBTTagList writeStackArray(IAEItemStack[] stacks) {
NBTTagList listTag = new NBTTagList();
for (IAEStack<?> stack : stacks) {
for (IAEItemStack stack : stacks) {
// see note at top of class
NBTTagCompound stackTag = new NBTTagCompound();
Platform.writeStackNBT(stack, stackTag);
if (stack != null) stack.writeToNBT(stackTag);
listTag.appendTag(stackTag);
}
return listTag;
@@ -259,11 +196,11 @@ public class FluidPatternDetails implements ICraftingPatternDetails, Comparable<
&& setOutputs(readStackArray(tag.getTagList("out", Constants.NBT.TAG_COMPOUND)));
}
public static IAEStack<?>[] readStackArray(NBTTagList listTag) {
public static IAEItemStack[] readStackArray(NBTTagList listTag) {
// see note at top of class
IAEStack<?>[] stacks = new IAEStack<?>[listTag.tagCount()];
IAEItemStack[] stacks = new IAEItemStack[listTag.tagCount()];
for (int i = 0; i < stacks.length; i++) {
stacks[i] = readStackNBT(listTag.getCompoundTagAt(i), true);
stacks[i] = AEItemStack.loadItemStackFromNBT(listTag.getCompoundTagAt(i));
}
return stacks;
}
@@ -9,7 +9,6 @@ import appeng.core.AEConfig;
import appeng.core.localization.ButtonToolTips;
import appeng.core.localization.GuiText;
import cpw.mods.fml.common.Loader;
import gregtech.api.enums.Mods;
public final class ModAndClassUtil {
@@ -150,6 +149,6 @@ public final class ModAndClassUtil {
if (Loader.isModLoaded("Waila")) WAILA = true;
if (Loader.isModLoaded("Avaritia")) AVARITIA = true;
if (Loader.isModLoaded("hodgepodge")) HODGEPODGE = true;
if (Loader.isModLoaded(Mods.Names.NEW_HORIZONS_CORE_MOD)) NEW_HORIZONS_CORE_MOD = true;
if (Loader.isModLoaded("dreamcraft")) NEW_HORIZONS_CORE_MOD = true;
}
}
@@ -93,6 +93,10 @@ public class NameConst {
public static final String TT_LEVEL_MAINTAINER_EXPORT_DESC = TT_LEVEL_MAINTAINER + "export_desc";
public static final String TT_LEVEL_MAINTAINER_ERROR = TT_LEVEL_MAINTAINER + "error";
public static final String TT_LEVEL_MAINTAINER_ERROR_DESC = TT_LEVEL_MAINTAINER + "error_desc";
public static final String TT_LEVEL_MAINTAINER_NOT_FOUND = TT_LEVEL_MAINTAINER + "not_found";
public static final String TT_LEVEL_MAINTAINER_NOT_FOUND_DESC = TT_LEVEL_MAINTAINER + "not_found_desc";
public static final String TT_LEVEL_MAINTAINER_CANT_CRAFT = TT_LEVEL_MAINTAINER + "cant_craft";
public static final String TT_LEVEL_MAINTAINER_CANT_CRAFT_DESC = TT_LEVEL_MAINTAINER + "cant_craft_desc";
public static final String TT_CELL_CONTENTS = TT_KEY + "cell_contents";
public static final String TT_CELL_EMPTY = TT_KEY + "cell_empty";
public static final String TT_CELL_PORTABLE = TT_KEY + "cell_portable";
@@ -27,20 +27,21 @@ public final class RenderUtil {
if (icon == null) {
return;
}
Tessellator.instance.startDrawingQuads();
Tessellator.instance.setNormal(nx, ny, nz);
final Tessellator tess = Tessellator.instance;
tess.startDrawingQuads();
tess.setNormal(nx, ny, nz);
if (nz > 0.0F) {
Tessellator.instance.addVertexWithUV(xStart, yStart, z, icon.getMinU(), icon.getMinV());
Tessellator.instance.addVertexWithUV(xEnd, yStart, z, icon.getMaxU(), icon.getMinV());
Tessellator.instance.addVertexWithUV(xEnd, yEnd, z, icon.getMaxU(), icon.getMaxV());
Tessellator.instance.addVertexWithUV(xStart, yEnd, z, icon.getMinU(), icon.getMaxV());
tess.addVertexWithUV(xStart, yStart, z, icon.getMinU(), icon.getMinV());
tess.addVertexWithUV(xEnd, yStart, z, icon.getMaxU(), icon.getMinV());
tess.addVertexWithUV(xEnd, yEnd, z, icon.getMaxU(), icon.getMaxV());
tess.addVertexWithUV(xStart, yEnd, z, icon.getMinU(), icon.getMaxV());
} else {
Tessellator.instance.addVertexWithUV(xStart, yEnd, z, icon.getMinU(), icon.getMaxV());
Tessellator.instance.addVertexWithUV(xEnd, yEnd, z, icon.getMaxU(), icon.getMaxV());
Tessellator.instance.addVertexWithUV(xEnd, yStart, z, icon.getMaxU(), icon.getMinV());
Tessellator.instance.addVertexWithUV(xStart, yStart, z, icon.getMinU(), icon.getMinV());
tess.addVertexWithUV(xStart, yEnd, z, icon.getMinU(), icon.getMaxV());
tess.addVertexWithUV(xEnd, yEnd, z, icon.getMaxU(), icon.getMaxV());
tess.addVertexWithUV(xEnd, yStart, z, icon.getMaxU(), icon.getMinV());
tess.addVertexWithUV(xStart, yStart, z, icon.getMinU(), icon.getMinV());
}
Tessellator.instance.draw();
tess.draw();
}
public static void renderFluidIntoGui(Gui gui, int x, int y, int width, int height,
@@ -0,0 +1,241 @@
item.fluid_drop.name=Tropfen %s
item.fluid_encoded_pattern.name=Kodierte ME-Flüssigkeitsschablone
item.part_fluid_terminal.name=ME-Flüssigkeitskonsole
item.part_fluid_pattern_terminal.name=ME-Flüssigkeitsschablonenkonsole
item.part_fluid_pattern_terminal_ex.name=ME-Flüssigkeitsverarbeitungsschablonenkonsole
item.part_fluid_interface.name=ME-Dualschnittstelle
item.part_fluid_p2p_interface.name=P2P-Tunnel - ME-Dualschnittstelle
item.part_fluid_import.name=ME-Flüssigkeits-Importbus
item.part_fluid_export.name=ME-Flüssigkeits-Exportbus
item.part_fluid_storage_bus.name=ME-Flüssigkeitsspeicherbus
item.part_fluid_level_emitter.name=ME-Flüssigkeitsfüllstandsemitter
item.part_fluid_storage_monitor.name=ME-Flüssigkeitsspeicherkonsole
item.part_fluid_conversion_monitor.name=ME-Flüssigkeitsumwandlungskonsole
item.part_level_terminal.name=ME-Füllstandkonsole
item.portable_fluid_cell.name=Tragbare Flüssigkeitszelle
item.wireless_fluid_terminal.name=Flüssigkeits-Handkonsole
item.wireless_level_terminal.name=Füllstands-Handkonsole
item.wireless_fluid_pattern_terminal.name=Flüssigkeitsschablonen-Handkonsole
item.wireless_interface_terminal.name=Schnittstellen-Handkonsole
item.wireless_ultra_terminal.name=Universelle Handkonsole
item.wireless_ultra_terminal.WIRELESS_CRAFTING_TERMINAL.name=Universelle Handkonsole - Fertigung
item.wireless_ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL.name=Universelle Handkonsole - Schablonen
item.wireless_ultra_terminal.WIRELESS_FLUID_TERMINAL.name=Universelle Handkonsole - Flüssigkeiten
item.wireless_ultra_terminal.WIRELESS_LEVEL_TERMINAL.name=Universelle Handkonsole - Füllstände
item.wireless_ultra_terminal.WIRELESS_ESSENTIA_TERMINAL.name=Universelle Handkonsole - Essentia
item.wireless_ultra_terminal.WIRELESS_INTERFACE_TERMINAL.name=Universelle Handkonsole - Schnittstelle
item.wireless_ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL_EX.name=Universelle Handkonsole - Fertigungsschablone
item.fluid_packet.name=Flüssigkeitspaket
item.quantum_bridge_card.name=Quantenbrücken-Karte
item.energy_card.name=Energiekarte
item.creative_fluid_storage.name=Kreative ME-Flüssigkeitsspeicherzelle
item.fluid_storage.1.name=%s1k%s ME-Flüssigkeitsspeicherzelle
item.fluid_storage.4.name=%s4k%s ME-Flüssigkeitsspeicherzelle
item.fluid_storage.16.name=%s16k%s ME-Flüssigkeitsspeicherzelle
item.fluid_storage.64.name=%s64k%s ME-Flüssigkeitsspeicherzelle
item.fluid_storage.256.name=%s256k%s ME-Flüssigkeitsspeicherzelle
item.fluid_storage.1024.name=%s1024k%s ME-Flüssigkeitsspeicherzelle
item.fluid_storage.4096.name=%s4096k%s ME-Flüssigkeitsspeicherzelle
item.fluid_storage.16384.name=%s16384k%s ME-Flüssigkeitsspeicherzelle
item.multi_fluid_storage.1.name=%s1k%s ME-Mehrfach-Flüssigkeitsspeicherzelle
item.multi_fluid_storage.4.name=%s4k%s ME-Mehrfach-Flüssigkeitsspeicherzelle
item.multi_fluid_storage.16.name=%s16k%s ME-Mehrfach-Flüssigkeitsspeicherzelle
item.multi_fluid_storage.64.name=%s64k%s ME-Mehrfach-Flüssigkeitsspeicherzelle
item.multi_fluid_storage.256.name=%s256k%s ME-Mehrfach-Flüssigkeitsspeicherzelle
item.multi_fluid_storage.1024.name=%s1024k%s ME-Mehrfach-Flüssigkeitsspeicherzelle
item.multi_fluid_storage.4096.name=%s4096k%s ME-Mehrfach-Flüssigkeitsspeicherzelle
item.multi_fluid_storage.16384.name=%s16384k%s ME-Mehrfach-Flüssigkeitsspeicherzelle
item.fluid_storage.quantum.name=ME-Flüssigkeits-Quantenspeicherzelle
item.fluid_storage.singularity.name=ME-Flüssigkeits-Digitalsingularitätsspeicherzelle
item.fluid_storage.void.name=Void ME-Flüssigkeitsspeicherzelle
item.fluid_storage.Universe.name=Künstliches Universum-ME-Flüssigkeitsspeicherzelle
item.fluid_storage.infinity.water.name=Unendliche ME-Flüssigkeits-Wasserspeicherzelle
item.fluid_part.name=ME-Flüssigkeitsspeicherkomponente
item.fluid_part.0.name=%s1k%s ME-Flüssigkeitsspeicherkomponente
item.fluid_part.1.name=%s4k%s ME-Flüssigkeitsspeicherkomponente
item.fluid_part.2.name=%s16k%s ME-Flüssigkeitsspeicherkomponente
item.fluid_part.3.name=%s64k%s ME-Flüssigkeitsspeicherkomponente
item.fluid_part.4.name=%s256k%s ME-Flüssigkeitsspeicherkomponente
item.fluid_part.5.name=%s1024k%s ME-Flüssigkeitsspeicherkomponente
item.fluid_part.6.name=%s4096k%s ME-Flüssigkeitsspeicherkomponente
item.fluid_part.7.name=%s16384k%s ME-Flüssigkeitsspeicherkomponente
item.fluid_storage_housing.name=ME-Speichergehäuse
item.fluid_storage_housing.0.name=ME-Flüssigkeitsspeichergehäuse
item.fluid_storage_housing.1.name=Verbessertes ME-Flüssigkeitsspeichergehäuse
item.fluid_storage_housing.2.name=ME-Mehrfach-Flüssigkeitsspeichergehäuse
item.fluid_storage_housing.3.name=Verbessertes ME-Mehrfach-Flüssigkeitsspeichergehäuse
tile.fluid_discretizer.name=Flüssigkeitsdiskretisierer
tile.fluid_pattern_encoder.name=Flüssigkeits-Schablonenkodierer
tile.fluid_packet_decoder.name=ME-Flüssigkeitspaketdekodierer
tile.fluid_interface.name=ME-Dualschnittstelle
tile.ingredient_buffer.name=Eduktpuffer
tile.large_ingredient_buffer.name=Großer Eduktpuffer
tile.oc_pattern_editor.name=OC-Schabloneneditor
tile.level_maintainer.name=ME-Pegelhalter
tile.fluid_buffer.name=ME-Flüssigkeitspuffer
tile.walrus.name=Walross
tile.super_stock_replenisher.name=Super-Vorratsauffüller
tile.fluid_auto_filler.name=ME-Flüssigkeits-Füllautomat
tile.certus_quartz_tank.name=Certusquarztank - %s
tile.certus_quartz_tank_empty.name=Certusquarztank
ae2fc.waila.speed=Geschwindigkeit
ae2fc.waila.enable=An
ae2fc.waila.disable=Aus
ae2fc.tooltip.shift_for_more=§r> §3Shift§r halten für mehr Information
ae2fc.tooltip.ctrl_for_more=§r> §3Strg§r halten für mehr Information
ae2fc.tooltip.fluid_packet_decoder.desc=Der Flüssigkeitsdekodierer kann Flüssigkeitspakete dekodieren. Er muss mit einem ME-System und einem Ort um die Flüssigkeit einzuleiten verbunden sein, sonst funktioniert er nicht.
ae2fc.tooltip.discretizer.desc=Wenn der Flüssigkeitsdiskretisierer an dein ME-System angeschlossen ist, stellt er den Flüssigkeitsvorrat in Lagerzellen (und Lagerbussen) in Tropfen dar. Sie sind das "Item-Äquivalent" zu Flüssigkeiten. Es ist nur eine andere Darstellung für Flüssigkeit, er konvertiert nichts.
ae2fc.tooltip.fluid_buffer.desc=Das ist Highspeed-Flüssigkeitsübertragung
ae2fc.tooltip.walrus.desc=GTNH ist wie Arbeiten
ae2fc.tooltip.fluid_auto_filler=Erstellt automatisch eine Flüssigkeitsbefüllschablone im jeweiligen Container.
ae2fc.tooltip.level_maintainer.Who_Am_I=Wer bin ich?
ae2fc.tooltip.level_maintainer.title=§6Anfragestatus§r
ae2fc.tooltip.level_maintainer.desc=Hält automatisch Items und Flüssigkeiten auf Vorrat, indem es neue Fertigungsaufträge aufgibt. Muss mit einem ME-Netzwerk verbunden sein.
ae2fc.tooltip.level_maintainer.current=Aktuell:
ae2fc.tooltip.level_maintainer.none=Keine Anfrage konfiguriert.
ae2fc.tooltip.level_maintainer.idle=§aNichts zu tun§r
ae2fc.tooltip.level_maintainer.idle_desc=Der Requester ist im Leerlauf wenn der angefragt Vorrat erreicht oder keine Rechenleistung verfügbar ist.
ae2fc.tooltip.level_maintainer.link=§eFertigung§r
ae2fc.tooltip.level_maintainer.link_desc=Das System erstellt die notwendigen Items oder Flüssigkeiten.
ae2fc.tooltip.level_maintainer.export=§5Export§r
ae2fc.tooltip.level_maintainer.export_desc=Der Requester versucht, die Produkte in das System zu exportieren. Wenn der Requester diesen Status für eine längere Zeit hat, ist kein Platz für den Export.
ae2fc.tooltip.level_maintainer.error=§4Fehler§r
ae2fc.tooltip.level_maintainer.error_desc=Der Requester will einen Fertigungsauftrag erstellen aber hat einen internen Fehler.
ae2fc.tooltip.level_maintainer.not_found=§4Nicht Gefunden§r
ae2fc.tooltip.level_maintainer.not_found_desc=Der Requester versucht einen Fertigungsauftrag zu erstellen, findet aber keine Fertigungsschablone.
ae2fc.tooltip.level_maintainer.cant_craft=§4Fertigung nicht möglich§r
ae2fc.tooltip.level_maintainer.cant_craft_desc=Der Requester versucht einen Fertigungsauftrag aufzugeben, aber der Fertigungsmanager kann den Auftrag nicht verarbeiten. (Nicht genug Baumaterialien, Nicht genug Arbeitsspeicher, Rekursion).
ae2fc.tooltip.level_maintainer.batch_size=§6Größe des Fertigungsauftrags§r
ae2fc.tooltip.level_maintainer.batch_size.hint=Wenn Fertigungsaufträge aufgegeben werden, wird der Requester diese Stückzahl anfragen. Größere Stückzahl führt zu schnellerem Wiederauffüllen, braucht aber mehr Fertigungsspeicher.
ae2fc.tooltip.level_maintainer.request_size=§6Soll-Lagerstand§r
ae2fc.tooltip.level_maintainer.request_size.hint=Wieviele Items auf Lager gehalten werden sollen bis der Requester mehr anfragt.
ae2fc.tooltip.ultra_terminal.WIRELESS_CRAFTING_TERMINAL=Modus: Fertigungskonsole
ae2fc.tooltip.ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL=Modus: Schablonenkonsole
ae2fc.tooltip.ultra_terminal.WIRELESS_FLUID_TERMINAL=Modus: Flüssigkeitskonsole
ae2fc.tooltip.ultra_terminal.WIRELESS_LEVEL_TERMINAL=Modus: Füllstandkonsole
ae2fc.tooltip.ultra_terminal.WIRELESS_ESSENTIA_TERMINAL=Modus: Essentiakonsole
ae2fc.tooltip.ultra_terminal.WIRELESS_INTERFACE_TERMINAL=Modus: Schnittstellenkonsole
ae2fc.tooltip.ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL_EX=Modus: Fertigungsschablonenkonsole
ae2fc.tooltip.ultra_terminal=Rechtsklick + Schleichen, um Modus zu wechseln.
ae2fc.tooltip.ultra_terminal.tips=Tool-Tipps:
ae2fc.tooltip.ultra_terminal.tips.desc=1.Du kannst es in einen Schmuckslot packen, und einen Hotkey zum Öffnen benutzen.\n2.Schnittstellenmodus: Halte §3Shift§7 Schnittstellen-Umbenenn-Knopf.\n3.In der Fertigungsplan-Ansicht\nhalte §3Shift§7 und klicke den "Abbrechen"-Knopf, und die Fehlenden Items\nwerden als NEI-Lesezeichen eingefügt.
ae2fc.tooltip.ultra_terminal.restock.on=Wiederauffüllen an
ae2fc.tooltip.ultra_terminal.restock.off=Wiederauffüllen aus
ae2fc.tooltip.infinity_fluid=§aUnendlich§r
ae2fc.tooltip.fluid_storage.void=Wo nichts alles ist, und alles nichts
ae2fc.tooltip.quantum_bridge_card.desc=Erlaubt es Handkonsolen, sich für unendliche Reichweite mit einer Quantenbrücke zu verbinden
ae2fc.tooltip.energy_card.desc=Unendlich Energie für die Handkonsole
ae2fc.tooltip.cell_contents=Enthält Flüssigkeit:
ae2fc.tooltip.cell_empty=Zelle leer
ae2fc.tooltip.cell_portable=Rechtsklick um Ansicht zu öffnen. Funktioniert wie ein Rucksack, aber du musst sie erst aufladen.
ae2fc.tooltip.fluid_terminal=Also brauchen wir kein EC2 mehr?
ae2fc.tooltip.level_terminal=Äääh...
ae2fc.tooltip.invalid_fluid=Unzulüssige Flüssigkeit!
ae2fc.tooltip.encode_pattern=Schablone kodieren
ae2fc.tooltip.fluid_packet=Benutz einen Flüssigkeitspaketdekodierer\n um hieraus wieder Flüssigkeit zu machen.
ae2fc.tooltip.empty=Leer
ae2fc.tooltip.dump_tank=Tank ausleeren
ae2fc.tooltip.switch_fluid_interface=ME-Dualkonsolenansicht umschalten
ae2fc.tooltip.not_combine=Items vereinigen
ae2fc.tooltip.not_combine.hint=Aus
ae2fc.tooltip.combine=Items vereinigen
ae2fc.tooltip.combine.hint=An
ae2fc.tooltip.fluid_terminal_w=Flüssigkeitskonsole
ae2fc.tooltip.craft_terminal_w=Fertigungskonsole
ae2fc.tooltip.pattern_terminal_w=Schablonenkonsole
ae2fc.tooltip.essentia_terminal_w=Essentiakonsole
ae2fc.tooltip.interface_terminal_w=Schnittstellenkonsole
ae2fc.tooltip.level_terminal_w=Füllstand-Konsole
ae2fc.tooltip.pattern_terminal_ex_w=Verarbeitungsschablonenkonsole
ae2fc.tooltip.wireless.installed=Installierte Karte:
ae2fc.tooltip.not_prio=Flüssigkeiten dürfen zuerst platziert werden
ae2fc.tooltip.not_prio.hint=Aus
ae2fc.tooltip.prio=Flüssigkeiten dürfen zuerst platziert werden
ae2fc.tooltip.prio.hint=An
ae2fc.tooltip.submit=Speichern
ae2fc.tooltip.enable=An
ae2fc.tooltip.disable=Aus
ae2fc.tooltip.edit=Editieren
ae2fc.tooltip.view=Ansehen
ae2fc.tooltip.fill_pattern=Automatisches Füllen von leerer Schablone
ae2fc.tooltip.not_fill_pattern=Automatisches Füllen von leerer Schablone
ae2fc.tooltip.fill_pattern.hint=An
ae2fc.tooltip.not_fill_pattern.hint=Aus
ae2fc.tooltip.open_configuration=Konfiguration öffnen
ae2fc.tooltip.block_highlight=Block hervorheben
ae2fc.tooltip.magnet_card.off=Magnetkarte
ae2fc.tooltip.magnet_card.off.hint=Aus
ae2fc.tooltip.magnet_card.inv=Magnetkarte
ae2fc.tooltip.magnet_card.inv.hint=Ins Inventar aufnehmen
ae2fc.tooltip.magnet_card.me=Magnetkarte
ae2fc.tooltip.magnet_card.me.hint=Ins ME aufnehmen
ae2fc.tooltip.magnet_card.filter=Magnetfilter
ae2fc.tooltip.magnet_card.oreDictFilter=Oredictionary-Filter
ae2fc.tooltip.restock.on=Wiederauffüllen
ae2fc.tooltip.restock.on.hint=An
ae2fc.tooltip.restock.off=Wiederauffüllen
ae2fc.tooltip.restock.off.hint=Aus
ae2fc.gui.part_fluid_pattern_terminal=Flüssigkeitsschablonenkonsole
ae2fc.gui.part_fluid_pattern_terminal_ex=Flüssigkeitsverarbeitungsschablonenkonsole
ae2fc.gui.part_level_terminal=Füllstand-Konsole
ae2fc.gui.fluid_pattern_encoder=Flüssigkeitsschablonenkodierer
ae2fc.gui.fluid_packet_decoder=ME-Flüssigkeitspaketdekodierer
ae2fc.gui.ingredient_buffer=Eduktpuffer
ae2fc.gui.large_ingredient_buffer=Großer Eduktpuffer
ae2fc.gui.fluid_interface=ME-Dualschnittstelle
ae2fc.gui.level_maintainer=ME-Pegelhalter
ae2fc.gui.fluid_interface.0=U
ae2fc.gui.fluid_interface.1=H
ae2fc.gui.fluid_interface.2=N
ae2fc.gui.fluid_interface.3=S
ae2fc.gui.fluid_interface.4=W
ae2fc.gui.fluid_interface.5=O
ae2fc.gui.oc_pattern_editor=OC-Schabloneneditor
ae2fc.gui.button.set=Setzen
ae2fc.gui.part_fluid_level_emitter=ME-Flüssigkeitsfüllstandsemitter
ae2fc.gui.part_fluid_import=ME-Flüssigkeits-Importbus
ae2fc.gui.part_fluid_export=ME-Flüssigkeits-Exportbus
ae2fc.gui.part_fluid_terminal=ME-Flüssigkeitskonsole
ae2fc.gui.part_fluid_storage_bus=ME-Flüssigkeitsspeicherbus
ae2fc.gui.fluid_auto_filler=ME-Flüssigkeits-Füllautomat
ae2fc.gui.magnet=Magnetfilter
ae2fc.gui.magnet.nbt=NBT-Daten ignorieren
ae2fc.gui.magnet.meta=Metadaten ignorieren
ae2fc.gui.magnet.ore=Ore Dictionary benutzen
ae2fc.gui.magnet.whitelist=Whitelist
ae2fc.gui.magnet.blacklist=Blacklist
ae2fc.gui.color.StateNone=00000000
ae2fc.gui.color.StateIdle=FF55FF55
ae2fc.gui.color.StateCraft=FFFFFF55
ae2fc.gui.color.StateExport=FFAA00AA
ae2fc.gui.color.StateError=FFFF5555
error.unknown=Unbekannt
ae2fc.key.OpenTerminal=Handkonsole öffnen
ae2fc.key.Restock=Wiederauffüllen
itemGroup.ae2fc=Flüssigkeitsfertigung für AE2
item.ec2placeholder.oc.upgrade.name=[EC2 PLACEHOLDER] ME-Upgrade
item.ec2placeholder.part.base.name=[EC2 PLACEHOLDER] ME-Flüssigkeitsbus
item.ec2placeholder.pattern.fluid.name=[EC2 PLACEHOLDER] ME-Flüssigkeitsschablone
item.ec2placeholder.storage.casing.name=[EC2 PLACEHOLDER] Speichergehäuse
item.ec2placeholder.storage.component.name=[EC2 PLACEHOLDER] ME-Speicherkomponente
item.ec2placeholder.storage.fluid.name=[EC2 PLACEHOLDER] ME-Flüssigkeitsspeicher
item.ec2placeholder.storage.physical.advanced.quantum.name=[EC2 PLACEHOLDER] ME-Quantenspeicher
item.ec2placeholder.storage.physical.advanced.singularity.name=[EC2 PLACEHOLDER] ME-Digitale Singularität
item.ec2placeholder.storage.physical.name=[EC2 PLACEHOLDER] ME-Speicher
item.ec2placeholder.storage.physical.void.name=[EC2 PLACEHOLDER] Void-ME-Speicher
item.ec2placeholder.terminal.fluid.wireless.name=[EC2 PLACEHOLDER] Flüssigkeits-Handkonsole
item.ec2placeholder.terminal.universal.wireless.name=[EC2 PLACEHOLDER] Universelle Handkonsole
@@ -97,13 +97,17 @@ ae2fc.tooltip.level_maintainer.desc=Automatically keeps items and fluids in stoc
ae2fc.tooltip.level_maintainer.current=Currently:
ae2fc.tooltip.level_maintainer.none=No request configured.
ae2fc.tooltip.level_maintainer.idle=§aIdling§r
ae2fc.tooltip.level_maintainer.idle_desc=The Requester is idling when the requested amount is already reached, there is no crafting pattern for this item or fluid or if there are not enough ingredients to request more crafts.
ae2fc.tooltip.level_maintainer.idle_desc=The Requester is idling when the requested amount is already reached or if no available CPU.
ae2fc.tooltip.level_maintainer.link=§eCrafting§r
ae2fc.tooltip.level_maintainer.link_desc=The system is currently crafting the requested item or fluid.
ae2fc.tooltip.level_maintainer.export=§5Exporting§r
ae2fc.tooltip.level_maintainer.export_desc=The Requester is trying to export the crafting results to the system. If the Requester has this status for a long time, there is no available space for the export.
ae2fc.tooltip.level_maintainer.error=§4Errored§r
ae2fc.tooltip.level_maintainer.error_desc=The Requester is trying to schedule a crafting job but is failing. Possible reasons include a missing recipe or insufficient resources.
ae2fc.tooltip.level_maintainer.error_desc=The Requester is trying to schedule a crafting job but is failing due to internal error.
ae2fc.tooltip.level_maintainer.not_found=§4Not Found§r
ae2fc.tooltip.level_maintainer.not_found_desc=The Requester is trying to schedule a crafting job but can't find a crafting pattern.
ae2fc.tooltip.level_maintainer.cant_craft=§4Can't Craft§r
ae2fc.tooltip.level_maintainer.cant_craft_desc=The Requester is trying to schedule a crafting job but the crafting manager cannot process the job. (not enough ingredients, CPU doesn't have enough memory, recursion).
ae2fc.tooltip.level_maintainer.batch_size=§6Crafting Batch Size§r
ae2fc.tooltip.level_maintainer.batch_size.hint=When craft requests are emitted, the Requester will use the batch size for the request. Using larger batches will increase the speed of stocking up items but will require more crafting storage.
ae2fc.tooltip.level_maintainer.request_size=§6Amount to Maintain§r
+90 -25
View File
@@ -1,23 +1,27 @@
item.fluid_drop.name=Капля (%s)
item.fluid_encoded_pattern.name=Кодированный шаблон
item.fluid_encoded_pattern.name=Закодированный шаблон
item.part_fluid_terminal.name=МЭ жидкостный терминал
item.part_fluid_pattern_terminal.name=МЭ жидкостный терминал шаблонов
item.part_fluid_pattern_terminal_ex.name=МЭ жидкостный терминал шаблонов обработки
item.part_fluid_interface.name=МЭ двойной интерфейс
item.part_fluid_p2p_interface.name=Туннель точка-точка - МЭ двойной интерфейс
item.part_fluid_p2p_interface.name=P2P туннель - МЭ двойной интерфейс
item.part_fluid_import.name=МЭ жидкостная шина импорта
item.part_fluid_export.name=МЭ жидкостная шина экспорта
item.part_fluid_storage_bus.name=МЭ жидкостная шина хранения
item.part_fluid_level_emitter.name=МЭ жидкостный излучатель уровня
item.part_fluid_storage_monitor.name=МЭ жидкостный монитор хранения
item.part_fluid_conversion_monitor.name=МЭ жидкостный монитор преобразования
item.part_level_terminal.name=МЭ Терминал уровня
item.portable_fluid_cell.name=Переносная жидкостная ячейка
item.wireless_fluid_terminal.name=Беспроводной жидкостный терминал
item.wireless_level_terminal.name=Беспроводной терминал уровня
item.wireless_fluid_pattern_terminal.name=Беспроводной жидкостный терминал шаблонов
item.wireless_interface_terminal.name=Беспроводной терминал интерфейсов
item.wireless_ultra_terminal.name=Беспроводной универсальный терминал
item.wireless_ultra_terminal.WIRELESS_CRAFTING_TERMINAL.name=Беспроводной универсальный терминал - Создание
item.wireless_ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL.name=Беспроводной универсальный терминал - Шаблон
item.wireless_ultra_terminal.WIRELESS_FLUID_TERMINAL.name=Беспроводной универсальный терминал - Жидкость
item.wireless_ultra_terminal.WIRELESS_LEVEL_TERMINAL.name=Беспроводной универсальный терминал - Уровень
item.wireless_ultra_terminal.WIRELESS_ESSENTIA_TERMINAL.name=Беспроводной универсальный терминал - Эссенция
item.wireless_ultra_terminal.WIRELESS_INTERFACE_TERMINAL.name=Беспроводной универсальный терминал - Интерфейс
item.wireless_ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL_EX.name=Беспроводной универсальный терминал - Шаблон обработки
@@ -42,8 +46,11 @@ item.multi_fluid_storage.1024.name=%s1024К%s МЭ мульти-жидкостн
item.multi_fluid_storage.4096.name=%s4096К%s МЭ мульти-жидкостная ячейка хранения
item.multi_fluid_storage.16384.name=%s16384К%s МЭ мульти-жидкостная ячейка хранения
item.fluid_storage.quantum.name=МЭ жидкостная квантовая ячейка хранения
item.fluid_storage.singularity.name=МЭ жидкостная цифровая сингулярность
item.fluid_storage.infinity.water.name=ME жидкостная ячейка хранения бесконечной воды
item.fluid_storage.singularity.name=МЭ жидкостная сингулярная ячейка хранения
item.fluid_storage.void.name=МЭ пустотная жидкостная ячейка
item.fluid_storage.Universe.name=МЭ жидкостная ячейка хранения искусственной вселенной
item.fluid_storage.infinity.water.name=МЭ жидкостная ячейка хранения бесконечной воды
item.fluid_part.name=МЭ жидкостный компонент хранения
item.fluid_part.0.name=%s1К%s МЭ жидкостный компонент хранения
item.fluid_part.1.name=%s4К%s МЭ жидкостный компонент хранения
item.fluid_part.2.name=%s16К%s МЭ жидкостный компонент хранения
@@ -52,10 +59,11 @@ item.fluid_part.4.name=%s256К%s МЭ жидкостный компонент х
item.fluid_part.5.name=%s1024К%s МЭ жидкостный компонент хранения
item.fluid_part.6.name=%s4096К%s МЭ жидкостный компонент хранения
item.fluid_part.7.name=%s16384К%s МЭ жидкостный компонент хранения
item.fluid_storage_housing.0.name=МЭ жидкостный корпус ячейки хранения
item.fluid_storage_housing.1.name=МЭ продвинутый жидкостный корпус ячейки хранения
item.fluid_storage_housing.2.name=МЭ мульти-жидкостный корпус ячейки хранения
item.fluid_storage_housing.3.name=МЭ продвинутый мульти-жидкостный корпус ячейки хранения
item.fluid_storage_housing.name=МЭ корпус ячейки хранения
item.fluid_storage_housing.0.name=МЭ корпус жидкостной ячейки хранения
item.fluid_storage_housing.1.name=МЭ улучшенный корпус жидкостной ячейки хранения
item.fluid_storage_housing.2.name=МЭ корпус мульти-жидкостной ячейки хранения
item.fluid_storage_housing.3.name=МЭ улучшенный корпус мульти-жидкостной ячейки хранения
tile.fluid_discretizer.name=Дискретизатор жидкости
tile.fluid_pattern_encoder.name=Кодировщик жидкостных шаблонов
@@ -67,13 +75,14 @@ tile.oc_pattern_editor.name=OC редактор шаблонов
tile.level_maintainer.name=МЭ поддерживатель уровня
tile.fluid_buffer.name=МЭ жидкостный буфер
tile.walrus.name=Морж
tile.super_stock_replenisher.name=Супер-пополнитель запасов
tile.fluid_auto_filler.name=МЭ жидкостный авто-заполнитель
tile.certus_quartz_tank.name=Резервуар из истинного кварца - %s
tile.certus_quartz_tank_empty.name=Резервуар из истинного кварца
ae2fc.waila.speed=Скорость
ae2fc.waila.enable=Включено
ae2fc.waila.disable=Выключено
ae2fc.waila.disable=Отключено
ae2fc.tooltip.shift_for_more=§r> Удерживайте §3Shift§r для подробностей
ae2fc.tooltip.ctrl_for_more=§r> Удерживайте §3Ctrl§r для подробностей
@@ -85,28 +94,38 @@ ae2fc.tooltip.fluid_auto_filler=Автоматически создаёт шаб
ae2fc.tooltip.level_maintainer.Who_Am_I=Кто я?
ae2fc.tooltip.level_maintainer.title=§6Статус запроса§r
ae2fc.tooltip.level_maintainer.desc=Автоматически поддерживает заданное количество предметов и жидкостей в хранилище, запрашивая новые при необходимости. Должен быть подключен к МЭ сети.
ae2fc.tooltip.level_maintainer.current=Текущее состояние:
ae2fc.tooltip.level_maintainer.current=Текущее состояние:
ae2fc.tooltip.level_maintainer.none=Запрос не настроен.
ae2fc.tooltip.level_maintainer.idle=§aБездействие§r
ae2fc.tooltip.level_maintainer.idle_desc=Запрашиватель бездействует, когда запрошенное количество уже достигнуто, нет шаблона создания этого предмета или жидкости или если недостаточно ингредиентов, чтобы запросить больше.
ae2fc.tooltip.level_maintainer.idle_desc=Поддерживатель бездействует, когда запрошенное количество уже достигнуто или если нет доступного ЦП.
ae2fc.tooltip.level_maintainer.link=§eСоздание§r
ae2fc.tooltip.level_maintainer.link_desc=В данный момент система создаёт запрашиваемый предмет или жидкость.
ae2fc.tooltip.level_maintainer.export=§5Экспорт§r
ae2fc.tooltip.level_maintainer.export_desc=Запрашиватель пытается поместить результаты создания в систему. Если запрашиватель находится в этом состоянии длительное время, значит в системе недостаточно свободного места для экспорта.
ae2fc.tooltip.level_maintainer.export_desc=Поддерживатель пытается поместить результаты создания в систему. Если Поддерживатель находится в этом состоянии длительное время, значит в системе недостаточно свободного места для экспорта.
ae2fc.tooltip.level_maintainer.error=§4Ошибка§r
ae2fc.tooltip.level_maintainer.error_desc=Поддерживатель пытается запланировать работу по созданию, но ему это не удается из-за внутренней ошибки.
ae2fc.tooltip.level_maintainer.not_found=§4Не найдено§r
ae2fc.tooltip.level_maintainer.not_found_desc=Поддерживатель пытается запланировать задание на создание, но не может найти шаблон создание.
ae2fc.tooltip.level_maintainer.cant_craft=§4Невозможно создать§r
ae2fc.tooltip.level_maintainer.cant_craft_desc=Поддерживатель пытается запланировать задание на создание, но менеджер создание не может его обработать (не хватает ингредиентов, у процессора недостаточно памяти, рекурсия).
ae2fc.tooltip.level_maintainer.batch_size=§6Размер партии создания§r
ae2fc.tooltip.level_maintainer.batch_size.hint=Запрашиватель будет использовать указанный размер партии при появлении запроса на создание. Использование больших значений увеличит скорость пополнения предметов, но потребует увеличение количества хранилищ создания.
ae2fc.tooltip.level_maintainer.batch_size.hint=Поддерживатель будет использовать указанный размер партии при появлении запроса на создание. Использование больших значений увеличит скорость пополнения предметов, но потребует увеличение количества хранилищ создания.
ae2fc.tooltip.level_maintainer.request_size=§6Количество для поддержания§r
ae2fc.tooltip.level_maintainer.request_size.hint=Счетчик определяет, сколько предметов должно находится в хранилище, прежде чем запрашиватель отправит запрос на создание.
ae2fc.tooltip.level_maintainer.request_size.hint=Счетчик определяет, сколько предметов должно находится в хранилище, прежде чем Поддерживатель отправит запрос на создание.
ae2fc.tooltip.ultra_terminal.WIRELESS_CRAFTING_TERMINAL=Режим: Терминал создания
ae2fc.tooltip.ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL=Режим: Терминал шаблонов
ae2fc.tooltip.ultra_terminal.WIRELESS_FLUID_TERMINAL=Режим: Жидкостный терминал
ae2fc.tooltip.ultra_terminal.WIRELESS_LEVEL_TERMINAL=Режим: Терминал уровня
ae2fc.tooltip.ultra_terminal.WIRELESS_ESSENTIA_TERMINAL=Режим: Терминал эссенции
ae2fc.tooltip.ultra_terminal.WIRELESS_INTERFACE_TERMINAL=Режим: Терминал интерфейсов
ae2fc.tooltip.ultra_terminal.WIRELESS_FLUID_PATTERN_TERMINAL_EX=Режим: Терминал шаблонов обработки
ae2fc.tooltip.ultra_terminal=ПКМ+Shift, чтобы изменить режим.
ae2fc.tooltip.ultra_terminal=Shift+ПКМ, чтобы изменить режим.
ae2fc.tooltip.ultra_terminal.tips=Подсказки:
ae2fc.tooltip.ultra_terminal.tips.desc=1. Вы можете поместить его в слот Baubles и открыть с помощью привязанной клавиши.\n2. Режим интерфейсов. Удерживайте §3Shift§7 для переключения между кнопками подсветки и переименовывания интерфейсов.\n3. Экран "План создания".\nУдерживая §3Shift§7 нажмите кнопку "Отмена", чтобы автоматически добавить все недостающие ингредиенты в панель закладок NEI.
ae2fc.tooltip.ultra_terminal.restock.on=Автопополнение запасов активировать
ae2fc.tooltip.ultra_terminal.restock.off=Автопополнение запасов деактивировать
ae2fc.tooltip.infinity_fluid=§aБесконечная/ый§r
ae2fc.tooltip.fluid_storage.void=Где ничто есть всё, а всё есть ничто
ae2fc.tooltip.quantum_bridge_card.desc=Позволяет беспроводным терминалам подключаться к квантовому мосту, обеспечивая неограниченный радиус действия
ae2fc.tooltip.energy_card.desc=Бесконечная энергия для беспроводного терминала
@@ -115,6 +134,7 @@ ae2fc.tooltip.cell_contents=Содержит жидкость:
ae2fc.tooltip.cell_empty=Ячейка пуста
ae2fc.tooltip.cell_portable=Нажмите ПКМ для открытия её интерфейса. Работает как рюкзак, но её необходимо зарядить перед использованием.
ae2fc.tooltip.fluid_terminal=Эмм, нам больше не нужен EC2?
ae2fc.tooltip.level_terminal=Эмм...
ae2fc.tooltip.invalid_fluid=Неверная жидкость!
ae2fc.tooltip.encode_pattern=Закодировать шаблон
ae2fc.tooltip.fluid_packet=Используйте декодер жидкостных пакетов,\nчтобы преобразовать это обратно в жидкость.
@@ -122,7 +142,7 @@ ae2fc.tooltip.empty=Пусто
ae2fc.tooltip.dump_tank=Слить содержимое резервуара
ae2fc.tooltip.switch_fluid_interface=Переключить GUI МЭ двойного интерфейса
ae2fc.tooltip.not_combine=Объединять одинаковые предметы
ae2fc.tooltip.not_combine.hint=Выключено
ae2fc.tooltip.not_combine.hint=Отключено
ae2fc.tooltip.combine=Объединять одинаковые предметы
ae2fc.tooltip.combine.hint=Включено
ae2fc.tooltip.fluid_terminal_w=Жидкостный терминал
@@ -130,24 +150,42 @@ ae2fc.tooltip.craft_terminal_w=Терминал создания
ae2fc.tooltip.pattern_terminal_w=Терминал шаблонов
ae2fc.tooltip.essentia_terminal_w=Терминал эссенции
ae2fc.tooltip.interface_terminal_w=Терминал интерфейсов
ae2fc.tooltip.level_terminal_w=Терминал уровня
ae2fc.tooltip.pattern_terminal_ex_w=Терминал шаблонов обработки
ae2fc.tooltip.wireless.installed=Установленные карты:
ae2fc.tooltip.not_prio=Помещать жидкость первой
ae2fc.tooltip.not_prio.hint=Включено
ae2fc.tooltip.not_prio.hint=Отключено
ae2fc.tooltip.prio=Помещать жидкость первой
ae2fc.tooltip.prio.hint=Выключено
ae2fc.tooltip.prio.hint=Включено
ae2fc.tooltip.submit=Подтвердить
ae2fc.tooltip.enable=Включено
ae2fc.tooltip.disable=Выключено
ae2fc.tooltip.edit=Редактировать
ae2fc.tooltip.fill_pattern=Разрешить авто-заполнение пустых шаблонов
ae2fc.tooltip.not_fill_pattern=Разрешить авто-заполнение пустых шаблонов
ae2fc.tooltip.disable=Отключено
ae2fc.tooltip.edit=Изменить
ae2fc.tooltip.view=Вид
ae2fc.tooltip.fill_pattern=Разрешить автопополнение пустыми шаблонами
ae2fc.tooltip.not_fill_pattern=Разрешить автопополнение пустыми шаблонами
ae2fc.tooltip.fill_pattern.hint=Включено
ae2fc.tooltip.not_fill_pattern.hint=Выключено
ae2fc.tooltip.not_fill_pattern.hint=Отключено
ae2fc.tooltip.open_configuration=Открыть настройки
ae2fc.tooltip.block_highlight=Подсветить блок
ae2fc.tooltip.magnet_card.off=Магнитная карта
ae2fc.tooltip.magnet_card.off.hint=Откл.
ae2fc.tooltip.magnet_card.inv=Магнитная карта
ae2fc.tooltip.magnet_card.inv.hint=Подбирать в инвентарь
ae2fc.tooltip.magnet_card.me=Магнитная карта
ae2fc.tooltip.magnet_card.me.hint=Подбирать в МЭ
ae2fc.tooltip.magnet_card.filter=Фильтр магнита
ae2fc.tooltip.magnet_card.oreDictFilter=Фильтрация по словарю руд
ae2fc.tooltip.restock.on=Автопополнение запасов
ae2fc.tooltip.restock.on.hint=Включить
ae2fc.tooltip.restock.off=Автопополнение запасов
ae2fc.tooltip.restock.off.hint=Отключить
ae2fc.gui.part_fluid_pattern_terminal=Жидкостный терминал шаблонов
ae2fc.gui.part_fluid_pattern_terminal_ex=Жидкостный терминал шаблонов обработки
ae2fc.gui.part_level_terminal=Терминал уровня
ae2fc.gui.fluid_pattern_encoder=Кодировщик жидкостных шаблонов
ae2fc.gui.fluid_packet_decoder=МЭ декодер жидкостных пакетов
ae2fc.gui.ingredient_buffer=Буфер ингредиентов
@@ -162,15 +200,42 @@ ae2fc.gui.fluid_interface.4=Зап
ae2fc.gui.fluid_interface.5=Вос
ae2fc.gui.oc_pattern_editor=OC редактор шаблонов
ae2fc.gui.button.set=Задать
ae2fc.gui.part_fluid_level_emitter=МЭ излучатель уровня
ae2fc.gui.part_fluid_level_emitter=МЭ жидкостный излучатель уровня
ae2fc.gui.part_fluid_import=МЭ жидкостная шина импорта
ae2fc.gui.part_fluid_export=МЭ жидкостная шина экспорта
ae2fc.gui.part_fluid_terminal=МЭ жидкостный терминал
ae2fc.gui.part_fluid_storage_bus=МЭ жидкостная шина хранения
ae2fc.gui.fluid_auto_filler=МЭ жидкостный авто-заполнитель
ae2fc.gui.magnet=Фильтр магнита
ae2fc.gui.magnet.nbt=Игнорировать NBT
ae2fc.gui.magnet.meta=Игнорировать метаданные
ae2fc.gui.magnet.ore=Использовать словарь руд
ae2fc.gui.magnet.whitelist=Белый список
ae2fc.gui.magnet.blacklist=Чёрный список
ae2fc.gui.color.StateNone=00000000
ae2fc.gui.color.StateIdle=FF55FF55
ae2fc.gui.color.StateCraft=FFFFFF55
ae2fc.gui.color.StateExport=FFAA00AA
ae2fc.gui.color.StateError=FFFF5555
error.unknown=Неизвестно
key.OpenTerminal=Открыть беспроводной универсальный терминал
ae2fc.key.OpenTerminal=Открыть беспроводной универсальный терминал
ae2fc.key.Restock=Автопополнение запасов
itemGroup.ae2fc=Fluid Craft For AE2
item.ec2placeholder.oc.upgrade.name=[EC2 ЗАПОЛНИТЕЛЬ] МЭ улучшение
item.ec2placeholder.part.base.name=[EC2 ЗАПОЛНИТЕЛЬ] МЭ жидкостная шина
item.ec2placeholder.pattern.fluid.name=[EC2 ЗАПОЛНИТЕЛЬ] МЭ жидкостной шаблон
item.ec2placeholder.storage.casing.name=[EC2 ЗАПОЛНИТЕЛЬ] Ячейка хранения
item.ec2placeholder.storage.component.name=[EC2 ЗАПОЛНИТЕЛЬ] МЭ компонент хранения
item.ec2placeholder.storage.fluid.name=[EC2 ЗАПОЛНИТЕЛЬ] МЭ жидкостная ячейка хранения
item.ec2placeholder.storage.physical.advanced.quantum.name=[EC2 ЗАПОЛНИТЕЛЬ] МЭ квантовая ячейка хранения
item.ec2placeholder.storage.physical.advanced.singularity.name=[EC2 ЗАПОЛНИТЕЛЬ] МЭ сингулярная ячейка хранения
item.ec2placeholder.storage.physical.name=[EC2 ЗАПОЛНИТЕЛЬ] МЭ ячейка хранения
item.ec2placeholder.storage.physical.void.name=[EC2 ЗАПОЛНИТЕЛЬ] МЭ пустотная ячейка хранения
item.ec2placeholder.terminal.fluid.wireless.name=[EC2 ЗАПОЛНИТЕЛЬ] Беспроводной жидкостный терминал
item.ec2placeholder.terminal.universal.wireless.name=[EC2 ЗАПОЛНИТЕЛЬ] Беспроводной универсальный терминал
Binary file not shown.

Before

Width:  |  Height:  |  Size: 494 B

After

Width:  |  Height:  |  Size: 581 B