Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
358c238e17 | ||
|
|
e16be431c3 | ||
|
|
df71dd52b2 | ||
|
|
c7ec5b0c8b | ||
|
|
ec682b28c3 | ||
|
|
ff129e46d9 | ||
|
|
e670a0c3c0 | ||
|
|
b23c816d69 | ||
|
|
6e8dd013bd | ||
|
|
5e4cf83fff | ||
|
|
47300b8980 | ||
|
|
3c6a5d8933 | ||
|
|
c05448f8b3 | ||
|
|
31746024ee | ||
|
|
1706b5a8da | ||
|
|
d89808dc0b | ||
|
|
e7effee580 | ||
|
|
869613ae31 | ||
|
|
6bec3e7e3a | ||
|
|
c251372e95 | ||
|
|
5315b79c70 | ||
|
|
23d2142084 | ||
|
|
049156e63e | ||
|
|
3d445d7988 | ||
|
|
79648a17b5 | ||
|
|
965d3d9db6 | ||
|
|
8d7bde168d |
No files matched your search
@@ -28,6 +28,7 @@ whitelist.json
|
||||
*.iws
|
||||
src/main/resources/mixins.*([!.]).json
|
||||
*.bat
|
||||
*.sh
|
||||
*.DS_Store
|
||||
!gradlew.bat
|
||||
.factorypath
|
||||
|
||||
@@ -34,21 +34,21 @@
|
||||
* 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.8.102-GTNH:dev')
|
||||
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-983-GTNH:dev')
|
||||
api('com.github.GTNewHorizons:waila:1.19.30:dev')
|
||||
api("com.github.GTNewHorizons:GTNHLib:0.11.15:dev")
|
||||
api('com.github.GTNewHorizons:NotEnoughItems:2.8.160-GTNH:dev')
|
||||
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-1078-GTNH:dev')
|
||||
api('com.github.GTNewHorizons:waila:1.19.34:dev')
|
||||
api("com.github.GTNewHorizons:GTNHLib:0.11.52:dev")
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.21-GTNH:dev')
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.60:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.25-GTNH:dev')
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.64:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.35:dev') { transitive = false }
|
||||
compileOnly('com.github.GTNewHorizons:ForestryMC:4.11.26:dev')
|
||||
compileOnly('com.github.GTNewHorizons:EnderIO:2.10.31:dev')
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.45-GTNH:dev') { transitive = false }
|
||||
compileOnly('com.github.GTNewHorizons:ForestryMC:4.11.39:dev')
|
||||
compileOnly('com.github.GTNewHorizons:EnderIO:2.10.49:dev')
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.64-GTNH:dev') { transitive = false }
|
||||
|
||||
compileOnly("org.jetbrains:annotations:26.1.0")
|
||||
|
||||
runtimeOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.4.2:dev")
|
||||
runtimeOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.4.6:dev")
|
||||
runtimeOnlyNonPublishable("com.github.GTNewHorizons:WirelessCraftingTerminal:1.12.16:dev") {
|
||||
exclude group: 'com.github.GTNewHorizons', module: 'Applied-Energistics-2-Unofficial'
|
||||
}
|
||||
|
||||
@@ -186,6 +186,11 @@ modrinthRelations =
|
||||
# Leave this empty if you don't want to publish on CurseForge.
|
||||
curseForgeProjectId =
|
||||
|
||||
# Comma-separated supported CurseForge environments: client, server (case-insensitive).
|
||||
# Use client or server for mods that only support one environment. Defaults to client,server.
|
||||
# These tags describe where the mod can run, not whether installation is required on both sides.
|
||||
curseForgeEnvironments = client,server
|
||||
|
||||
# The project's relations on CurseForge. You can use this to refer to other projects on CurseForge.
|
||||
# Syntax: type1:name1;type2:name2;...
|
||||
# Where type can be one of [requiredDependency, embeddedLibrary, optionalDependency, tool, incompatible],
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#This file is generated by updateDaemonJvm
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/c2dd35c9d0aaf0ba6ad0791320f99dfc/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/e5810bd7fd1f8a586644409d395a7e55/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/cf726b4a1c84b50457225f9bba6d7650/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/fa1e318c287360478e3c83a9a3ef1007/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/7b3c4877c0749019e6805bb61e421497/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d76df094a9cbbabd3b08251f9e61444a/redirect
|
||||
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/539ea72837c6244075f8ee037babc29e/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/876dbbf00bf4ef6190f7da074cee903a/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/539ea72837c6244075f8ee037babc29e/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/876dbbf00bf4ef6190f7da074cee903a/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/9064f22734b42ac03e85df04b632e167/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/4d0277c49991306ac78048580fe34bcf/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/539ea72837c6244075f8ee037babc29e/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/876dbbf00bf4ef6190f7da074cee903a/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/a9fa3b809e484a1e1ac4308a5dda661a/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/aa99913fa6d767d899ffc96082da01ca/redirect
|
||||
toolchainVersion=25
|
||||
@@ -1,7 +1,9 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.4.0-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-9.7.1-bin.zip
|
||||
networkTimeout=10000
|
||||
retries=0
|
||||
retryBackOffMs=500
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
# gradlew start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
@@ -29,7 +29,7 @@
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
# ksh gradlew
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
@@ -57,7 +57,7 @@
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/b631911858264c0b6e4d6603d677ff5218766cee/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
|
||||
@@ -19,12 +19,12 @@
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem gradlew startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
@rem Set local scope for the variables, and ensure extensions are enabled
|
||||
setlocal EnableExtensions
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@@ -51,7 +51,7 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
@@ -65,29 +65,18 @@ echo. 1>&2
|
||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
||||
echo location of your Java installation. 1>&2
|
||||
|
||||
goto fail
|
||||
"%COMSPEC%" /c exit 1
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
|
||||
@rem Execute gradlew
|
||||
@rem endlocal doesn't take effect until after the line is parsed and variables are expanded
|
||||
@rem which allows us to clear the local environment before executing the java command
|
||||
endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
:exitWithErrorLevel
|
||||
@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts
|
||||
"%COMSPEC%" /c exit %ERRORLEVEL%
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 8.6 KiB |
@@ -17,7 +17,7 @@ pluginManagement {
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.26'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.34'
|
||||
}
|
||||
|
||||
|
||||
@@ -10,8 +10,10 @@ import com.glodblock.github.loader.ChannelLoader;
|
||||
import com.glodblock.github.loader.ItemAndBlockHolder;
|
||||
import com.glodblock.github.loader.RecipeLoader;
|
||||
import com.glodblock.github.proxy.CommonProxy;
|
||||
import com.glodblock.github.util.FluidCellHandler;
|
||||
import com.glodblock.github.util.ModAndClassUtil;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
@@ -60,7 +62,7 @@ public class FluidCraft {
|
||||
@Mod.EventHandler
|
||||
public static void postInit(FMLPostInitializationEvent event) {
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(FluidCraft.INSTANCE, new InventoryHandler());
|
||||
|
||||
AEApi.instance().registries().cell().addCellHandler(new FluidCellHandler());
|
||||
ItemAndBlockHolder.loadSetting();
|
||||
|
||||
if (!Config.removeRecipe) {
|
||||
|
||||
@@ -215,7 +215,7 @@ public class UltraTerminalButtons implements ICustomButtonDataObject {
|
||||
public void readData(NBTTagCompound tag) {
|
||||
this.reStock = tag.getBoolean(restockItems);
|
||||
this.magnetMode = WirelessMagnet.Mode.values()[tag.getInteger(modeKey)];
|
||||
this.terminalMode = UltraTerminalModes.values()[tag.getInteger(MODE)];
|
||||
this.terminalMode = UltraTerminalModes.VALUES[tag.getInteger(MODE)];
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -229,7 +229,7 @@ public class UltraTerminalButtons implements ICustomButtonDataObject {
|
||||
public void readByte(ByteBuf buf) {
|
||||
this.reStock = buf.readBoolean();
|
||||
this.magnetMode = WirelessMagnet.Mode.values()[buf.readInt()];
|
||||
this.terminalMode = UltraTerminalModes.values()[buf.readInt()];
|
||||
this.terminalMode = UltraTerminalModes.VALUES[buf.readInt()];
|
||||
ItemWirelessUltraTerminal.setMode(this.terminal, this.terminalMode);
|
||||
|
||||
toggleMagnetButtonsVisibility();
|
||||
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.client.gui.container.ContainerFluidAutoFiller;
|
||||
import com.glodblock.github.common.tile.TileFluidAutoFiller;
|
||||
import com.glodblock.github.util.FCGuiColors;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
@@ -31,7 +32,12 @@ public class GuiFluidAutoFiller extends AEBaseGui {
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
fontRendererObj.drawString(getGuiDisplayName(I18n.format(NameConst.GUI_FLUID_AUTO_FILLER)), 8, 6, 0x404040);
|
||||
fontRendererObj.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, 0x404040);
|
||||
fontRendererObj.drawString(
|
||||
getGuiDisplayName(I18n.format(NameConst.GUI_FLUID_AUTO_FILLER)),
|
||||
8,
|
||||
6,
|
||||
FCGuiColors.guiTextColorGray.getColor());
|
||||
fontRendererObj
|
||||
.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, FCGuiColors.guiTextColorGray.getColor());
|
||||
}
|
||||
}
|
||||
@@ -10,14 +10,15 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.client.gui.container.ContainerFluidInterface;
|
||||
import com.glodblock.github.common.parts.PartFluidInterface;
|
||||
import com.glodblock.github.inventory.IAEFluidTank;
|
||||
import com.glodblock.github.inventory.IDualHost;
|
||||
import com.glodblock.github.inventory.gui.MouseRegionManager;
|
||||
import com.glodblock.github.inventory.gui.TankMouseHandler;
|
||||
import com.glodblock.github.util.FCGuiColors;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
import com.glodblock.github.util.RenderUtil;
|
||||
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.client.gui.GuiSub;
|
||||
import appeng.core.localization.GuiText;
|
||||
@@ -51,15 +52,24 @@ public class GuiFluidInterface extends GuiSub {
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
fontRendererObj.drawString(getGuiDisplayName(I18n.format(NameConst.GUI_FLUID_INTERFACE)), 8, 6, 0x404040);
|
||||
fontRendererObj.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, 0x404040);
|
||||
fontRendererObj.drawString(
|
||||
getGuiDisplayName(I18n.format(NameConst.GUI_FLUID_INTERFACE)),
|
||||
8,
|
||||
6,
|
||||
FCGuiColors.guiTextColorGray.getColor());
|
||||
fontRendererObj
|
||||
.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, FCGuiColors.guiTextColorGray.getColor());
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
|
||||
IAEFluidTank fluidInv = cont.getTile().getInternalFluid();
|
||||
mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
|
||||
for (int i = 0; i < 6; i++) {
|
||||
if (!isPart()) {
|
||||
fontRendererObj.drawString(dirName(i), TANK_X + i * TANK_X_OFF + 5, 22, 0x404040);
|
||||
fontRendererObj.drawString(
|
||||
dirName(i),
|
||||
TANK_X + i * TANK_X_OFF + 5,
|
||||
22,
|
||||
FCGuiColors.guiTextColorGray.getColor());
|
||||
}
|
||||
RenderUtil.renderFluidIntoGui(
|
||||
this,
|
||||
@@ -93,6 +103,6 @@ public class GuiFluidInterface extends GuiSub {
|
||||
}
|
||||
|
||||
private boolean isPart() {
|
||||
return this.cont.getTile() instanceof PartFluidInterface;
|
||||
return this.cont.getTile() instanceof IPart;
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.client.gui.container.ContainerFluidPacketDecoder;
|
||||
import com.glodblock.github.common.tile.TileFluidPacketDecoder;
|
||||
import com.glodblock.github.util.FCGuiColors;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
@@ -28,7 +29,12 @@ public class GuiFluidPacketDecoder extends AEBaseGui {
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
fontRendererObj.drawString(getGuiDisplayName(I18n.format(NameConst.GUI_FLUID_PACKET_DECODER)), 8, 6, 0x404040);
|
||||
fontRendererObj.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, 0x404040);
|
||||
fontRendererObj.drawString(
|
||||
getGuiDisplayName(I18n.format(NameConst.GUI_FLUID_PACKET_DECODER)),
|
||||
8,
|
||||
6,
|
||||
FCGuiColors.guiTextColorGray.getColor());
|
||||
fontRendererObj
|
||||
.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, FCGuiColors.guiTextColorGray.getColor());
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,7 @@ import com.glodblock.github.common.tile.TileFluidPatternEncoder;
|
||||
import com.glodblock.github.inventory.gui.MouseRegionManager;
|
||||
import com.glodblock.github.inventory.slot.ISlotFluid;
|
||||
import com.glodblock.github.inventory.slot.SlotSingleItem;
|
||||
import com.glodblock.github.util.FCGuiColors;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
@@ -73,8 +74,13 @@ public class GuiFluidPatternEncoder extends AEBaseGui {
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
fontRendererObj.drawString(getGuiDisplayName(I18n.format(NameConst.GUI_FLUID_PATTERN_ENCODER)), 8, 6, 0x404040);
|
||||
fontRendererObj.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, 0x404040);
|
||||
fontRendererObj.drawString(
|
||||
getGuiDisplayName(I18n.format(NameConst.GUI_FLUID_PATTERN_ENCODER)),
|
||||
8,
|
||||
6,
|
||||
FCGuiColors.guiTextColorGray.getColor());
|
||||
fontRendererObj
|
||||
.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, FCGuiColors.guiTextColorGray.getColor());
|
||||
mouseRegions.render(mouseX, mouseY);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.glodblock.github.inventory.IAEFluidTank;
|
||||
import com.glodblock.github.inventory.gui.ButtonMouseHandler;
|
||||
import com.glodblock.github.inventory.gui.MouseRegionManager;
|
||||
import com.glodblock.github.inventory.gui.TankMouseHandler;
|
||||
import com.glodblock.github.util.FCGuiColors;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
import com.glodblock.github.util.RenderUtil;
|
||||
|
||||
@@ -66,8 +67,13 @@ public class GuiIngredientBuffer extends AEBaseGui {
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
fontRendererObj.drawString(getGuiDisplayName(I18n.format(NameConst.GUI_INGREDIENT_BUFFER)), 8, 6, 0x404040);
|
||||
fontRendererObj.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, 0x404040);
|
||||
fontRendererObj.drawString(
|
||||
getGuiDisplayName(I18n.format(NameConst.GUI_INGREDIENT_BUFFER)),
|
||||
8,
|
||||
6,
|
||||
FCGuiColors.guiTextColorGray.getColor());
|
||||
fontRendererObj
|
||||
.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, FCGuiColors.guiTextColorGray.getColor());
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
|
||||
IAEFluidTank fluidInv = cont.getTile().getInternalFluid();
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.glodblock.github.inventory.IAEFluidTank;
|
||||
import com.glodblock.github.inventory.gui.ButtonMouseHandler;
|
||||
import com.glodblock.github.inventory.gui.MouseRegionManager;
|
||||
import com.glodblock.github.inventory.gui.TankMouseHandler;
|
||||
import com.glodblock.github.util.FCGuiColors;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
import com.glodblock.github.util.RenderUtil;
|
||||
|
||||
@@ -66,9 +67,13 @@ public class GuiLargeIngredientBuffer extends AEBaseGui {
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
fontRendererObj.drawString(
|
||||
getGuiDisplayName(I18n.format(NameConst.GUI_LARGE_INGREDIENT_BUFFER)),
|
||||
8,
|
||||
6,
|
||||
FCGuiColors.guiTextColorGray.getColor());
|
||||
fontRendererObj
|
||||
.drawString(getGuiDisplayName(I18n.format(NameConst.GUI_LARGE_INGREDIENT_BUFFER)), 8, 6, 0x404040);
|
||||
fontRendererObj.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, 0x404040);
|
||||
.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, FCGuiColors.guiTextColorGray.getColor());
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
|
||||
IAEFluidTank fluidInv = cont.getTile().getInternalFluid();
|
||||
|
||||
@@ -29,6 +29,8 @@ import appeng.api.storage.data.IAEStackType;
|
||||
import appeng.client.gui.GuiSub;
|
||||
import appeng.client.gui.slots.VirtualMEPhantomSlot;
|
||||
import appeng.client.gui.widgets.GuiTabButton;
|
||||
import appeng.client.gui.widgets.GuiToggleButton;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.util.calculators.ArithHelper;
|
||||
import appeng.util.calculators.Calculator;
|
||||
|
||||
@@ -40,6 +42,7 @@ public class GuiLevelMaintainer extends GuiSub {
|
||||
private final MouseRegionManager mouseRegions = new MouseRegionManager(this);
|
||||
private Widget focusedWidget;
|
||||
private final FontRenderer render;
|
||||
private GuiToggleButton liteMode;
|
||||
|
||||
public GuiLevelMaintainer(InventoryPlayer ipl, TileLevelMaintainer tile) {
|
||||
super(new ContainerLevelMaintainer(ipl, tile));
|
||||
@@ -88,6 +91,15 @@ public class GuiLevelMaintainer extends GuiSub {
|
||||
this.buttonList,
|
||||
this.cont);
|
||||
}
|
||||
this.buttonList.add(
|
||||
this.liteMode = new GuiToggleButton(
|
||||
guiLeft - 18,
|
||||
guiTop + 2,
|
||||
178,
|
||||
194,
|
||||
GuiText.CraftingModeLite.getLocal(),
|
||||
NameConst.TT_LEVEL_MAINTAINER_LITE_CRAFT_DESC));
|
||||
this.liteMode.setState(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -124,7 +136,11 @@ public class GuiLevelMaintainer extends GuiSub {
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
fontRendererObj.drawString(getGuiDisplayName(NameConst.i18n(NameConst.GUI_LEVEL_MAINTAINER)), 8, 6, 0x404040);
|
||||
fontRendererObj.drawString(
|
||||
getGuiDisplayName(NameConst.i18n(NameConst.GUI_LEVEL_MAINTAINER)),
|
||||
8,
|
||||
6,
|
||||
FCGuiColors.guiTextColorGray.getColor());
|
||||
mouseRegions.render(mouseX, mouseY);
|
||||
}
|
||||
|
||||
@@ -209,6 +225,14 @@ public class GuiLevelMaintainer extends GuiSub {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (btn == this.liteMode) {
|
||||
if (isShiftKeyDown()) {
|
||||
FluidCraft.proxy.netHandler.sendToServer(new CPacketLevelMaintainer(Action.ClearLiteMode));
|
||||
} else {
|
||||
FluidCraft.proxy.netHandler.sendToServer(new CPacketLevelMaintainer(Action.ToggleLiteMode));
|
||||
}
|
||||
return;
|
||||
}
|
||||
super.actionPerformed(btn);
|
||||
}
|
||||
|
||||
@@ -227,6 +251,10 @@ public class GuiLevelMaintainer extends GuiSub {
|
||||
component[index].setState(state);
|
||||
}
|
||||
|
||||
public void updateComponent(boolean isLiteMode) {
|
||||
this.liteMode.setState(isLiteMode);
|
||||
}
|
||||
|
||||
private static boolean acceptType(VirtualMEPhantomSlot slot, IAEStackType<?> type, int mouseButton) {
|
||||
return true;
|
||||
}
|
||||
@@ -466,10 +494,10 @@ public class GuiLevelMaintainer extends GuiSub {
|
||||
final double result = Calculator.conversion(this.textField.getText());
|
||||
if (Double.isNaN(result) || result < 0) {
|
||||
this.amount = null;
|
||||
this.textField.setTextColor(0xFF0000);
|
||||
this.textField.setTextColor(FCGuiColors.guiLevelMaintainerError.getColor());
|
||||
} else {
|
||||
this.amount = (long) ArithHelper.round(result, 0);
|
||||
this.textField.setTextColor(0xFFFFFF);
|
||||
this.textField.setTextColor(FCGuiColors.guiTextColorGray.getColor());
|
||||
}
|
||||
|
||||
IAEStack<?> stack = component[this.componentIndex].getStack();
|
||||
|
||||
@@ -91,6 +91,7 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
private GuiImgButton terminalStyleBox;
|
||||
|
||||
private ItemStack tooltipStack;
|
||||
private List<String> buttonTooltip;
|
||||
private boolean online;
|
||||
private int viewHeight;
|
||||
|
||||
@@ -105,7 +106,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
private static final float ITEM_STACK_Z = 100.0f;
|
||||
private static final float ITEM_STACK_OVERLAY_Z = 200.0f;
|
||||
private static final float SLOT_HOVER_Z = 310.0f;
|
||||
private static final float TOOLTIP_Z = 410.0f;
|
||||
private static final float STEP_Z = 10.0f;
|
||||
private static final float MAGIC_RENDER_ITEM_Z = 50.0f;
|
||||
|
||||
@@ -130,7 +130,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
masterList.markDirty();
|
||||
}
|
||||
};
|
||||
searchFieldNames.setFocused(true);
|
||||
extraOptionsText.add(ButtonToolTips.HighlightInterface.getLocal());
|
||||
online = true;
|
||||
}
|
||||
@@ -175,6 +174,7 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
|
||||
searchFieldNames.x = guiLeft + Math.max(32, offsetX) + 99;
|
||||
searchFieldNames.y = guiTop + 38;
|
||||
searchFieldNames.setFocused(true);
|
||||
|
||||
terminalStyleBox.xPosition = guiLeft - 18;
|
||||
terminalStyleBox.yPosition = guiTop + 8;
|
||||
@@ -260,6 +260,11 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
|
||||
handleTooltip(mouseX, mouseY, searchFieldOutputs);
|
||||
handleTooltip(mouseX, mouseY, searchFieldNames);
|
||||
|
||||
// Drawn after the viewport so the items do not cover it
|
||||
if (buttonTooltip != null) {
|
||||
drawHoveringText(buttonTooltip, mouseX, mouseY, fontRendererObj);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -344,6 +349,7 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(offsetX + VIEW_LEFT, offsetY + HEADER_HEIGHT, 0);
|
||||
tooltipStack = null;
|
||||
buttonTooltip = null;
|
||||
drawViewport(mouseX - offsetX - VIEW_LEFT, mouseY - offsetY - HEADER_HEIGHT - 1);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPopAttrib();
|
||||
@@ -508,9 +514,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
toRender.drawButton(mc, relMouseX, relMouseY);
|
||||
if (toRender.getMouseIn()
|
||||
&& relMouseY >= Math.max(LevelTerminalSection.TITLE_HEIGHT, entry.highlightButton.yPosition)) {
|
||||
// draw a tooltip
|
||||
GL11.glTranslatef(0f, 0f, TOOLTIP_Z);
|
||||
GL11.glDisable(GL11.GL_SCISSOR_TEST);
|
||||
List<String> tooltip = new ArrayList<>();
|
||||
tooltip.add(toRender.getMessage());
|
||||
if (entry.isInPlayerDimension()) {
|
||||
@@ -520,9 +523,7 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
tooltip.add(
|
||||
StatCollector.translateToLocal(NameConst.TT_KEY + "level_terminal.hint_other_dimension"));
|
||||
}
|
||||
drawHoveringText(tooltip, relMouseX, relMouseY);
|
||||
GL11.glTranslatef(0f, 0f, -TOOLTIP_Z);
|
||||
GL11.glEnable(GL11.GL_SCISSOR_TEST);
|
||||
buttonTooltip = tooltip;
|
||||
}
|
||||
} else {
|
||||
entry.highlightButton.yPosition = -1;
|
||||
@@ -587,7 +588,7 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
drawRect(0, 0, 16, 16, FCGuiColors.itemSlotOverlayUnpowered.getColor());
|
||||
}
|
||||
} else {
|
||||
tooltipStack = Platform.stackConvert(aes).getItemStack();
|
||||
tooltipStack = aes.getItemStackForNEI();
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
} else if (entry.filteredRecipes[slotIdx]) {
|
||||
@@ -600,7 +601,12 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
// overlay highlight
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glTranslatef(0.0f, 0.0f, SLOT_HOVER_Z);
|
||||
drawRect(colLeft, viewY + 1 + rowYTop, -2 + colRight, viewY - 1 + rowYBot, 0x77FFFFFF);
|
||||
drawRect(
|
||||
colLeft,
|
||||
viewY + 1 + rowYTop,
|
||||
-2 + colRight,
|
||||
viewY - 1 + rowYBot,
|
||||
FCGuiColors.guiLevelTerminalOverlayHighlight.getColor());
|
||||
GL11.glTranslatef(0.0f, 0.0f, -SLOT_HOVER_Z);
|
||||
}
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
@@ -658,102 +664,6 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawHoveringText(List<String> textLines, int x, int y, FontRenderer font) {
|
||||
if (!textLines.isEmpty()) {
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
int maxStrWidth = 0;
|
||||
|
||||
// is this more efficient than doing 1 pass, then doing a translate before drawing the text?
|
||||
for (String s : (List<String>) textLines) {
|
||||
int width = font.getStringWidth(s);
|
||||
|
||||
if (width > maxStrWidth) {
|
||||
maxStrWidth = width;
|
||||
}
|
||||
}
|
||||
|
||||
// top left corner
|
||||
int curX = x + 12;
|
||||
int curY = y - 12;
|
||||
int totalHeight = 8;
|
||||
|
||||
if (textLines.size() > 1) {
|
||||
totalHeight += 2 + (textLines.size() - 1) * 10;
|
||||
}
|
||||
|
||||
/* String is too long? Display on the left side */
|
||||
if (curX + maxStrWidth > width) {
|
||||
curX -= 28 + maxStrWidth;
|
||||
}
|
||||
|
||||
/* String is too tall? move it up */
|
||||
if (curY + totalHeight + 6 > height) {
|
||||
curY = height - totalHeight - 6;
|
||||
}
|
||||
|
||||
int borderColor = -267386864;
|
||||
// drawing the border...
|
||||
drawGradientRect(curX - 3, curY - 4, curX + maxStrWidth + 3, curY - 3, borderColor, borderColor);
|
||||
drawGradientRect(
|
||||
curX - 3,
|
||||
curY + totalHeight + 3,
|
||||
curX + maxStrWidth + 3,
|
||||
curY + totalHeight + 4,
|
||||
borderColor,
|
||||
borderColor);
|
||||
drawGradientRect(
|
||||
curX - 3,
|
||||
curY - 3,
|
||||
curX + maxStrWidth + 3,
|
||||
curY + totalHeight + 3,
|
||||
borderColor,
|
||||
borderColor);
|
||||
drawGradientRect(curX - 4, curY - 3, curX - 3, curY + totalHeight + 3, borderColor, borderColor);
|
||||
drawGradientRect(
|
||||
curX + maxStrWidth + 3,
|
||||
curY - 3,
|
||||
curX + maxStrWidth + 4,
|
||||
curY + totalHeight + 3,
|
||||
borderColor,
|
||||
borderColor);
|
||||
int color1 = 1347420415;
|
||||
int color2 = (color1 & 16711422) >> 1 | color1 & -16777216;
|
||||
drawGradientRect(curX - 3, curY - 3 + 1, curX - 3 + 1, curY + totalHeight + 3 - 1, color1, color2);
|
||||
drawGradientRect(
|
||||
curX + maxStrWidth + 2,
|
||||
curY - 3 + 1,
|
||||
curX + maxStrWidth + 3,
|
||||
curY + totalHeight + 3 - 1,
|
||||
color1,
|
||||
color2);
|
||||
drawGradientRect(curX - 3, curY - 3, curX + maxStrWidth + 3, curY - 3 + 1, color1, color1);
|
||||
drawGradientRect(
|
||||
curX - 3,
|
||||
curY + totalHeight + 2,
|
||||
curX + maxStrWidth + 3,
|
||||
curY + totalHeight + 3,
|
||||
color2,
|
||||
color2);
|
||||
|
||||
for (int i = 0; i < textLines.size(); ++i) {
|
||||
String line = (String) textLines.get(i);
|
||||
font.drawStringWithShadow(line, curX, curY, -1);
|
||||
|
||||
if (i == 0) {
|
||||
// gap between name and lore text
|
||||
curY += 2;
|
||||
}
|
||||
|
||||
curY += 10;
|
||||
}
|
||||
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(final char character, final int key) {
|
||||
if (!checkHotbarKeys(key)) {
|
||||
@@ -859,18 +769,13 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
}
|
||||
}
|
||||
|
||||
private boolean itemStackMatchesSearchTerm(final ItemStack itemStack, final String searchTerm) {
|
||||
if (itemStack == null) {
|
||||
private boolean stackMatchesSearchTerm(final IAEStack<?> stack, final String searchTerm) {
|
||||
if (stack == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final String displayName = Platform.getItemDisplayName(itemStack).toLowerCase();
|
||||
|
||||
if (displayName.contains(searchTerm)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
final String displayName = stack.getDisplayName();
|
||||
return displayName != null && displayName.toLowerCase().contains(searchTerm);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1108,9 +1013,7 @@ public class GuiLevelTerminal extends FCBaseMEGui implements IDropToFillTextFiel
|
||||
continue;
|
||||
}
|
||||
|
||||
if (itemStackMatchesSearchTerm(
|
||||
Platform.stackConvert(entry.infoList[i].stack).getItemStack(),
|
||||
output)) {
|
||||
if (stackMatchesSearchTerm(entry.infoList[i].stack, output)) {
|
||||
shouldAdd = true;
|
||||
entry.filteredRecipes[i] = false;
|
||||
} else {
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.client.gui.container.ContainerMagnetFilter;
|
||||
import com.glodblock.github.inventory.item.WirelessMagnet;
|
||||
import com.glodblock.github.network.CPacketFluidPatternTermBtns;
|
||||
import com.glodblock.github.util.FCGuiColors;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
|
||||
import appeng.api.config.ActionItems;
|
||||
@@ -136,14 +137,32 @@ public class GuiMagnetFilter extends GuiSub {
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
this.fontRendererObj.drawString(NameConst.i18n(NameConst.GUI_MAGNET_CARD), 8, 6, 0x404040);
|
||||
this.fontRendererObj.drawString(NameConst.i18n(NameConst.GUI_MAGNET_CARD_NBT), 61, 22, 0x404040);
|
||||
this.fontRendererObj.drawString(NameConst.i18n(NameConst.GUI_MAGNET_CARD_META), 61, 34, 0x404040);
|
||||
this.fontRendererObj.drawString(NameConst.i18n(NameConst.GUI_MAGNET_CARD_ORE), 61, 46, 0x404040);
|
||||
this.fontRendererObj
|
||||
.drawString(NameConst.i18n(NameConst.GUI_MAGNET_CARD), 8, 6, FCGuiColors.guiTextColorGray.getColor());
|
||||
this.fontRendererObj.drawString(
|
||||
NameConst.i18n(NameConst.GUI_MAGNET_CARD_NBT),
|
||||
61,
|
||||
22,
|
||||
FCGuiColors.guiTextColorGray.getColor());
|
||||
this.fontRendererObj.drawString(
|
||||
NameConst.i18n(NameConst.GUI_MAGNET_CARD_META),
|
||||
61,
|
||||
34,
|
||||
FCGuiColors.guiTextColorGray.getColor());
|
||||
this.fontRendererObj.drawString(
|
||||
NameConst.i18n(NameConst.GUI_MAGNET_CARD_ORE),
|
||||
61,
|
||||
46,
|
||||
FCGuiColors.guiTextColorGray.getColor());
|
||||
this.components[0].setVar(this.cont.nbt);
|
||||
this.components[1].setVar(this.cont.meta);
|
||||
this.components[2].setVar(this.cont.ore);
|
||||
this.components[3].setVar(this.cont.oreDict);
|
||||
// the synced value arrives after initGui, so re-apply it while the field is not being edited
|
||||
if (!oreDict.isFocused() && this.cont.oreDictFilter != null
|
||||
&& !this.cont.oreDictFilter.equals(oreDict.getText())) {
|
||||
oreDict.setText(this.cont.oreDictFilter, true);
|
||||
}
|
||||
for (Component c : components) {
|
||||
c.draw();
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import net.minecraft.util.ResourceLocation;
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.client.gui.container.ContainerOCPatternEditor;
|
||||
import com.glodblock.github.common.tile.TileOCPatternEditor;
|
||||
import com.glodblock.github.util.FCGuiColors;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
|
||||
import appeng.client.gui.AEBaseGui;
|
||||
@@ -29,7 +30,12 @@ public class GuiOCPatternEditor extends AEBaseGui {
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
fontRendererObj.drawString(getGuiDisplayName(I18n.format(NameConst.GUI_OC_PATTERN_EDITOR)), 8, 6, 0x404040);
|
||||
fontRendererObj.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, 0x404040);
|
||||
fontRendererObj.drawString(
|
||||
getGuiDisplayName(I18n.format(NameConst.GUI_OC_PATTERN_EDITOR)),
|
||||
8,
|
||||
6,
|
||||
FCGuiColors.guiTextColorGray.getColor());
|
||||
fontRendererObj
|
||||
.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, FCGuiColors.guiTextColorGray.getColor());
|
||||
}
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import org.lwjgl.opengl.GL11;
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.client.gui.container.ContainerSuperStockReplenisher;
|
||||
import com.glodblock.github.common.tile.TileSuperStockReplenisher;
|
||||
import com.glodblock.github.util.FCGuiColors;
|
||||
|
||||
import appeng.api.storage.StorageName;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
@@ -129,7 +130,8 @@ public class GuiSuperStockReplenisher extends AEBaseGui {
|
||||
|
||||
@Override
|
||||
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
|
||||
fontRendererObj.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, 0x404040);
|
||||
fontRendererObj
|
||||
.drawString(GuiText.inventory.getLocal(), 8, ySize - 94, FCGuiColors.guiTextColorGray.getColor());
|
||||
this.drawVirtualSlots();
|
||||
}
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ public class ContainerLevelMaintainer extends ContainerSubGui implements IVirtua
|
||||
(EntityPlayerMP) this.getInventoryPlayer().player);
|
||||
}
|
||||
FluidCraft.proxy.netHandler.sendTo(
|
||||
new SPacketLevelMaintainerGuiUpdate(this.tile.requests, !this.isFirstUpdate),
|
||||
new SPacketLevelMaintainerGuiUpdate(this.tile.requests, !this.isFirstUpdate, this.tile.isLiteMode()),
|
||||
(EntityPlayerMP) this.getInventoryPlayer().player);
|
||||
this.isFirstUpdate = false;
|
||||
this.updateCount = 0;
|
||||
@@ -126,7 +126,7 @@ public class ContainerLevelMaintainer extends ContainerSubGui implements IVirtua
|
||||
NetworkHandler.instance
|
||||
.sendTo(new PacketVirtualSlot(StorageName.NONE, slotStacks), (EntityPlayerMP) player);
|
||||
FluidCraft.proxy.netHandler.sendTo(
|
||||
new SPacketLevelMaintainerGuiUpdate(this.tile.requests, false),
|
||||
new SPacketLevelMaintainerGuiUpdate(this.tile.requests, false, this.tile.isLiteMode()),
|
||||
(EntityPlayerMP) player);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,10 +24,12 @@ public class ContainerLevelWireless extends ContainerLevelTerminal {
|
||||
@Override
|
||||
public PrimaryGui createPrimaryGui() {
|
||||
ContainerOpenContext context = getOpenContext();
|
||||
return new FluidPrimaryGui(
|
||||
PrimaryGui primaryGui = new FluidPrimaryGui(
|
||||
GuiType.WIRELESS_LEVEL_TERMINAL,
|
||||
ItemAndBlockHolder.WIRELESS_LEVEL_TERM.stack(),
|
||||
context.getTile(),
|
||||
context.getSide());
|
||||
primaryGui.setSlotIndex(getTargetSlotIndex());
|
||||
return primaryGui;
|
||||
}
|
||||
}
|
||||
@@ -42,6 +42,12 @@ public class ItemPacketRender implements IItemRenderer {
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
final boolean entity = type.equals(ItemRenderType.ENTITY);
|
||||
if (entity) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotated(90.0D, 0.0D, 1.0D, 0.0D);
|
||||
GL11.glTranslated(-0.5D, -0.6D, 0.0D);
|
||||
}
|
||||
|
||||
FluidStack fluid = ItemFluidPacket.getFluidStack(item);
|
||||
int RGB = fluid == null ? 0xFFFFFF : fluid.getFluid().getColor(fluid);
|
||||
@@ -65,6 +71,9 @@ public class ItemPacketRender implements IItemRenderer {
|
||||
0.0625F);
|
||||
}
|
||||
|
||||
if (entity) {
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.glodblock.github.client.textures.FCPartsTexture;
|
||||
import com.glodblock.github.common.block.BlockFluidInterface;
|
||||
import com.glodblock.github.common.tile.TileFluidInterface;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.render.BlockRenderInfo;
|
||||
import appeng.tile.misc.TileInterface;
|
||||
@@ -25,15 +26,18 @@ public class RenderBlockFluidInterface extends BaseBlockRender<BlockFluidInterfa
|
||||
final TileInterface ti = block.getTileEntity(world, x, y, z);
|
||||
final BlockRenderInfo info = block.getRendererInstance();
|
||||
|
||||
if (ti != null && ti.getForward() != ForgeDirection.UNKNOWN) {
|
||||
final IIcon side = FCPartsTexture.BlockFluidInterfaceAlternate_Arrow.getIcon();
|
||||
info.setTemporaryRenderIcons(
|
||||
FCPartsTexture.BlockInterfaceAlternate.getIcon(),
|
||||
block.getIcon(0, 0),
|
||||
side,
|
||||
side,
|
||||
side,
|
||||
side);
|
||||
if (ti != null) {
|
||||
final AEColor color = ti.getProxy().getColor();
|
||||
if (ti.getForward() != ForgeDirection.UNKNOWN) {
|
||||
final IIcon face = color == AEColor.Transparent ? block.getIcon(0, 0)
|
||||
: block.getColoredTexture(0, color);
|
||||
final IIcon alternate = color == AEColor.Transparent ? FCPartsTexture.BlockInterfaceAlternate.getIcon()
|
||||
: block.getColoredTexture(1, color);
|
||||
final IIcon side = color == AEColor.Transparent
|
||||
? FCPartsTexture.BlockFluidInterfaceAlternate_Arrow.getIcon()
|
||||
: block.getColoredTexture(2, color);
|
||||
info.setTemporaryRenderIcons(alternate, face, side, side, side, side);
|
||||
}
|
||||
}
|
||||
|
||||
final boolean fz = super.renderInWorld(block, world, x, y, z, renderer);
|
||||
|
||||
@@ -27,7 +27,10 @@ public enum FCPartsTexture {
|
||||
PartFluidFormationPlane("fluid_formation_plane"),
|
||||
PartFluidAnnihilationPlane("fluid_annihilation_plane"),
|
||||
PartFluidFormationPlaneOn("fluid_formation_plane_on"),
|
||||
PartFluidAnnihilationPlaneOn("fluid_annihilation_plane_on");
|
||||
PartFluidAnnihilationPlaneOn("fluid_annihilation_plane_on"),
|
||||
BlockMEChestFluid_Bright("fluid_terminal_light"),
|
||||
BlockMEChestFluid_Dark("fluid_terminal_dark"),
|
||||
BlockMEChestFluid_Medium("fluid_terminal_medium");
|
||||
|
||||
private final String name;
|
||||
public net.minecraft.util.IIcon IIcon;
|
||||
|
||||
@@ -4,7 +4,10 @@ import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@@ -13,6 +16,7 @@ import com.glodblock.github.common.tabs.FluidCraftingTabs;
|
||||
import com.glodblock.github.common.tile.TileFluidInterface;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.api.util.IOrientable;
|
||||
import appeng.block.AEBaseItemBlock;
|
||||
import appeng.core.features.AEFeature;
|
||||
@@ -25,6 +29,12 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockFluidInterface extends FCBaseBlock {
|
||||
|
||||
private static final String[] COLORED_TEXTURES = { "fluid_interface", "fluid_interface_a",
|
||||
"fluid_interface_arrow" };
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[][] coloredTextures;
|
||||
|
||||
public BlockFluidInterface() {
|
||||
super(Material.iron, NameConst.BLOCK_FLUID_INTERFACE);
|
||||
setFullBlock(true);
|
||||
@@ -39,6 +49,38 @@ public class BlockFluidInterface extends FCBaseBlock {
|
||||
return new RenderBlockFluidInterface();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(final IIconRegister iconRegistry) {
|
||||
super.registerBlockIcons(iconRegistry);
|
||||
this.coloredTextures = new IIcon[COLORED_TEXTURES.length][AEColor.VALUES.length];
|
||||
|
||||
for (final AEColor color : AEColor.VALID_COLORS) {
|
||||
for (int id = 0; id < COLORED_TEXTURES.length; id++) {
|
||||
this.coloredTextures[id][color.ordinal()] = iconRegistry
|
||||
.registerIcon("ae2fc:interface/" + COLORED_TEXTURES[id] + "_" + color.name());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getColoredTexture(final int id, final AEColor color) {
|
||||
return this.coloredTextures[id][color.ordinal()];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(final IBlockAccess world, final int x, final int y, final int z, final int side) {
|
||||
final TileInterface tile = this.getTileEntity(world, x, y, z);
|
||||
if (tile != null && tile.getForward() == ForgeDirection.UNKNOWN) {
|
||||
final AEColor color = tile.getProxy().getColor();
|
||||
if (color != AEColor.Transparent) {
|
||||
return this.getColoredTexture(0, color);
|
||||
}
|
||||
}
|
||||
return super.getIcon(world, x, y, z, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated(final World world, final int x, final int y, final int z, final EntityPlayer player,
|
||||
final int facing, final float hitX, final float hitY, final float hitZ) {
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.glodblock.github.common.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
@@ -12,11 +15,17 @@ import com.glodblock.github.inventory.gui.GuiType;
|
||||
import com.glodblock.github.util.BlockPos;
|
||||
import com.glodblock.github.util.NameConst;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.block.AEBaseItemBlock;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockSuperStockReplenisher extends FCBaseBlock {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] coloredTextures;
|
||||
|
||||
public BlockSuperStockReplenisher() {
|
||||
super(Material.web, NameConst.BLOCK_SUPER_STOCK_REPLENISHER);
|
||||
setTileEntity(TileSuperStockReplenisher.class);
|
||||
@@ -25,6 +34,28 @@ public class BlockSuperStockReplenisher extends FCBaseBlock {
|
||||
this.lightOpacity = 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(final IIconRegister iconRegistry) {
|
||||
super.registerBlockIcons(iconRegistry);
|
||||
this.coloredTextures = new IIcon[AEColor.VALUES.length];
|
||||
|
||||
for (final AEColor color : AEColor.VALID_COLORS) {
|
||||
this.coloredTextures[color.ordinal()] = iconRegistry
|
||||
.registerIcon(this.getTextureName().replace(":", ":replenisher/") + "_" + color.name());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(final IBlockAccess world, final int x, final int y, final int z, final int side) {
|
||||
final TileSuperStockReplenisher tile = this.getTileEntity(world, x, y, z);
|
||||
if (tile != null && tile.getColor() != AEColor.Transparent) {
|
||||
return this.coloredTextures[tile.getColor().ordinal()];
|
||||
}
|
||||
return super.getIcon(world, x, y, z, side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated(World world, int x, int y, int z, EntityPlayer player, int facing, float hitX,
|
||||
float hitY, float hitZ) {
|
||||
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.glodblock.github.FluidCraft;
|
||||
import com.glodblock.github.common.item.BaseItemBlockContainer;
|
||||
import com.glodblock.github.common.tabs.FluidCraftingTabs;
|
||||
import com.glodblock.github.common.tile.TileWalrus;
|
||||
@@ -30,6 +31,8 @@ public class BlockWalrus extends BaseBlockContainer {
|
||||
setHardness(2.0F);
|
||||
setResistance(10.0F);
|
||||
setBlockName(NameConst.BLOCK_WALRUS);
|
||||
// only used for hit/break particles, the block itself is rendered by RenderBlockWalrus
|
||||
setBlockTextureName(FluidCraft.MODID + ":" + NameConst.BLOCK_WALRUS + "_particle");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -2,7 +2,12 @@ package com.glodblock.github.common.item;
|
||||
|
||||
import static appeng.util.item.AEFluidStackType.FLUID_STACK_TYPE;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@@ -10,8 +15,17 @@ import com.glodblock.github.common.storage.CellType;
|
||||
import com.glodblock.github.loader.ItemAndBlockHolder;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.storage.IMEInventoryHandler;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEStackType;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.items.AEBaseCell;
|
||||
import appeng.me.storage.FluidCellInventoryHandler;
|
||||
import appeng.util.IterationCounter;
|
||||
import appeng.util.ReadableNumberConverter;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public abstract class FCBaseItemCell extends AEBaseCell {
|
||||
|
||||
@@ -31,6 +45,38 @@ public abstract class FCBaseItemCell extends AEBaseCell {
|
||||
return FLUID_STACK_TYPE;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addCheckedInformation(final ItemStack stack, final EntityPlayer player, final List<String> lines,
|
||||
final boolean displayMoreInfo) {
|
||||
super.addCheckedInformation(stack, player, lines, displayMoreInfo);
|
||||
|
||||
final IMEInventoryHandler<?> inventory = AEApi.instance().registries().cell()
|
||||
.getCellInventory(stack, null, getStackType());
|
||||
if (!(inventory instanceof FluidCellInventoryHandler handler) || handler.getCellInv().getTotalItemTypes() != 1
|
||||
|| handler.getCellInv().getStoredItemTypes() == 0)
|
||||
return;
|
||||
|
||||
final IAEFluidStack content = handler
|
||||
.getAvailableItems(FLUID_STACK_TYPE.createPrimitiveList(), IterationCounter.fetchNewId())
|
||||
.getFirstItem();
|
||||
final String oldLine = GuiText.Contains.getLocal() + ": " + content.getDisplayName();
|
||||
final int oldLineIndex = lines.lastIndexOf(oldLine);
|
||||
if (oldLineIndex >= 0) {
|
||||
if (!GuiScreen.isCtrlKeyDown()) {
|
||||
lines.set(oldLineIndex, EnumChatFormatting.GRAY + GuiText.HoldCtrlForContents.getLocal());
|
||||
return;
|
||||
}
|
||||
final String unit = FLUID_STACK_TYPE.getDisplayUnit();
|
||||
lines.set(
|
||||
oldLineIndex,
|
||||
" " + content.getDisplayName()
|
||||
+ " x"
|
||||
+ ReadableNumberConverter.INSTANCE.toWideReadableForm(content.getStackSize())
|
||||
+ (unit.isEmpty() ? "" : " " + unit));
|
||||
}
|
||||
}
|
||||
|
||||
public FCBaseItemCell(Optional subName) {
|
||||
super(subName);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public class ItemBaseWirelessTerminal extends ToolWirelessTerminal implements II
|
||||
Item item = is.getItem();
|
||||
if (item instanceof ItemWirelessUltraTerminal) {
|
||||
if (!is.hasTagCompound()) is.setTagCompound(new NBTTagCompound());
|
||||
return UltraTerminalModes.values()[is.getTagCompound().getInteger(MODE)];
|
||||
return UltraTerminalModes.VALUES[is.getTagCompound().getInteger(MODE)];
|
||||
} else if (item instanceof ItemWirelessPatternTerminal) {
|
||||
return UltraTerminalModes.PATTERN;
|
||||
} else if (item instanceof ItemWirelessInterfaceTerminal) {
|
||||
|
||||
@@ -194,7 +194,7 @@ public class ItemWirelessUltraTerminal extends ItemBaseWirelessTerminal
|
||||
public IGuiItemObject getGuiObject(ItemStack is, World world, EntityPlayer p, int x, int y, int z) {
|
||||
final IWirelessTermHandler wh = AEApi.instance().registries().wireless().getWirelessTerminalHandler(is);
|
||||
if (wh == null) return null;
|
||||
return switch (y != Integer.MIN_VALUE ? UltraTerminalModes.values()[y] : getMode(is)) {
|
||||
return switch (y != Integer.MIN_VALUE ? UltraTerminalModes.VALUES[y] : getMode(is)) {
|
||||
case CRAFTING -> new WirelessCraftingTerminalGuiObject(wh, is, p, world, x, y, z);
|
||||
case PATTERN, PATTERN_EX -> new WirelessPatternTerminalGuiObject(wh, is, p, world, x, y, z);
|
||||
case INTERFACE -> new WirelessInterfaceTerminalGuiObject(wh, is, x);
|
||||
|
||||
@@ -69,7 +69,9 @@ public class PartFluidFormationPlane extends PartBaseFormationPlane implements I
|
||||
|
||||
@Override
|
||||
protected void updateHandler() {
|
||||
this.onNeighborChanged();
|
||||
if (this.getProxy().isReady()) {
|
||||
this.onNeighborChanged();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean doWork() {
|
||||
|
||||
@@ -27,9 +27,12 @@ import com.glodblock.github.loader.ItemAndBlockHolder;
|
||||
import com.glodblock.github.util.DualHostSettings;
|
||||
import com.glodblock.github.util.DualityFluidInterface;
|
||||
import com.glodblock.github.util.Util;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.crafting.ICraftingLink;
|
||||
import appeng.api.networking.events.MENetworkChannelsChanged;
|
||||
import appeng.api.networking.events.MENetworkEventSubscribe;
|
||||
import appeng.api.networking.events.MENetworkPowerStatusChange;
|
||||
@@ -37,6 +40,7 @@ import appeng.api.networking.ticking.TickRateModulation;
|
||||
import appeng.api.networking.ticking.TickingRequest;
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.storage.data.IAEStackType;
|
||||
import appeng.helpers.ICustomButtonDataObject;
|
||||
import appeng.helpers.ICustomButtonProvider;
|
||||
@@ -149,6 +153,7 @@ public class PartFluidInterface extends PartInterface implements IDualHost, ICus
|
||||
config.readFromNBT(data, "ConfigInv");
|
||||
fluidDuality.loadConfigFromPacket(this.config);
|
||||
getInternalFluid().readFromNBT(data, "FluidInv");
|
||||
fluidDuality.readCraftingTrackerFromNBT(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -156,6 +161,7 @@ public class PartFluidInterface extends PartInterface implements IDualHost, ICus
|
||||
super.writeToNBT(data);
|
||||
config.writeToNBT(data, "ConfigInv");
|
||||
getInternalFluid().writeToNBT(data, "FluidInv");
|
||||
fluidDuality.writeCraftingTrackerToNBT(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -177,6 +183,26 @@ public class PartFluidInterface extends PartInterface implements IDualHost, ICus
|
||||
return getInterfaceDuality().getInstalledUpgrades(u);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmutableSet<ICraftingLink> getRequestedJobs() {
|
||||
return ImmutableSet.<ICraftingLink>builder().addAll(super.getRequestedJobs())
|
||||
.addAll(fluidDuality.getRequestedJobs()).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEStack<?> injectCraftedItems(final ICraftingLink link, final IAEStack<?> items, final Actionable mode) {
|
||||
if (items instanceof IAEFluidStack) {
|
||||
return fluidDuality.injectCraftedItems(link, items, mode);
|
||||
}
|
||||
return super.injectCraftedItems(link, items, mode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void jobStateChange(final ICraftingLink link) {
|
||||
super.jobStateChange(link);
|
||||
fluidDuality.jobStateChange(link);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
|
||||
return fluidDuality.fill(from, resource, doFill);
|
||||
|
||||
@@ -28,13 +28,17 @@ import com.glodblock.github.loader.ItemAndBlockHolder;
|
||||
import com.glodblock.github.util.DualHostSettings;
|
||||
import com.glodblock.github.util.DualityFluidInterface;
|
||||
import com.glodblock.github.util.Util;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.implementations.items.IMemoryCard;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.crafting.ICraftingLink;
|
||||
import appeng.api.networking.ticking.TickRateModulation;
|
||||
import appeng.api.networking.ticking.TickingRequest;
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.storage.data.IAEStackType;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.helpers.DualityInterface;
|
||||
@@ -118,6 +122,23 @@ public class PartFluidP2PInterface extends PartP2PInterface implements IDualHost
|
||||
return output;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(final NBTTagCompound data) {
|
||||
super.readFromNBT(data);
|
||||
config.readFromNBT(data, "ConfigInv");
|
||||
dualityFluid.loadConfigFromPacket(this.config);
|
||||
dualityFluid.getInternalFluid().readFromNBT(data, "FluidInv");
|
||||
dualityFluid.readCraftingTrackerFromNBT(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(final NBTTagCompound data) {
|
||||
super.writeToNBT(data);
|
||||
config.writeToNBT(data, "ConfigInv");
|
||||
dualityFluid.getInternalFluid().writeToNBT(data, "FluidInv");
|
||||
dualityFluid.writeCraftingTrackerToNBT(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TickingRequest getTickingRequest(IGridNode node) {
|
||||
TickingRequest item = duality.getTickingRequest(node);
|
||||
@@ -140,6 +161,26 @@ public class PartFluidP2PInterface extends PartP2PInterface implements IDualHost
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmutableSet<ICraftingLink> getRequestedJobs() {
|
||||
return ImmutableSet.<ICraftingLink>builder().addAll(super.getRequestedJobs())
|
||||
.addAll(dualityFluid.getRequestedJobs()).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEStack<?> injectCraftedItems(final ICraftingLink link, final IAEStack<?> items, final Actionable mode) {
|
||||
if (items instanceof IAEFluidStack) {
|
||||
return dualityFluid.injectCraftedItems(link, items, mode);
|
||||
}
|
||||
return super.injectCraftedItems(link, items, mode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void jobStateChange(final ICraftingLink link) {
|
||||
super.jobStateChange(link);
|
||||
dualityFluid.jobStateChange(link);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
|
||||
return dualityFluid.fill(from, resource, doFill);
|
||||
|
||||
@@ -19,6 +19,8 @@ public enum CellType {
|
||||
Cell4096kPart(6, AEFeature.StorageCells),
|
||||
Cell16384kPart(7, AEFeature.StorageCells);
|
||||
|
||||
public static final CellType[] VALUES = values();
|
||||
|
||||
private final EnumSet<AEFeature> features;
|
||||
private int damageValue;
|
||||
private Item itemInstance;
|
||||
@@ -53,7 +55,7 @@ public enum CellType {
|
||||
}
|
||||
|
||||
public static EnumChatFormatting getTypeColor(int type) {
|
||||
return getTypeColor(CellType.values()[type % CellType.values().length]);
|
||||
return getTypeColor(CellType.VALUES[type % CellType.VALUES.length]);
|
||||
}
|
||||
|
||||
public static EnumChatFormatting getTypeColor(CellType type) {
|
||||
|
||||
@@ -28,11 +28,14 @@ import com.glodblock.github.loader.ItemAndBlockHolder;
|
||||
import com.glodblock.github.util.DualHostSettings;
|
||||
import com.glodblock.github.util.DualityFluidInterface;
|
||||
import com.glodblock.github.util.Util;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.SidelessMode;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.crafting.ICraftingLink;
|
||||
import appeng.api.networking.events.MENetworkChannelsChanged;
|
||||
import appeng.api.networking.events.MENetworkEventSubscribe;
|
||||
import appeng.api.networking.events.MENetworkPowerStatusChange;
|
||||
@@ -40,6 +43,7 @@ import appeng.api.networking.ticking.TickRateModulation;
|
||||
import appeng.api.networking.ticking.TickingRequest;
|
||||
import appeng.api.storage.IMEMonitor;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.storage.data.IAEStackType;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.helpers.ICustomButtonDataObject;
|
||||
@@ -180,12 +184,14 @@ public class TileFluidInterface extends TileInterface implements IDualHost, ICus
|
||||
config.readFromNBT(data, "ConfigInv");
|
||||
fluidDuality.loadConfigFromPacket(this.config);
|
||||
getInternalFluid().readFromNBT(data, "FluidInv");
|
||||
fluidDuality.readCraftingTrackerFromNBT(data);
|
||||
}
|
||||
|
||||
@TileEvent(TileEventType.WORLD_NBT_WRITE)
|
||||
public NBTTagCompound writeToNBTEvent(NBTTagCompound data) {
|
||||
config.writeToNBT(data, "ConfigInv");
|
||||
getInternalFluid().writeToNBT(data, "FluidInv");
|
||||
fluidDuality.writeCraftingTrackerToNBT(data);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -216,6 +222,26 @@ public class TileFluidInterface extends TileInterface implements IDualHost, ICus
|
||||
return getInterfaceDuality().getInstalledUpgrades(u);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImmutableSet<ICraftingLink> getRequestedJobs() {
|
||||
return ImmutableSet.<ICraftingLink>builder().addAll(super.getRequestedJobs())
|
||||
.addAll(fluidDuality.getRequestedJobs()).build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEStack<?> injectCraftedItems(final ICraftingLink link, final IAEStack<?> items, final Actionable mode) {
|
||||
if (items instanceof IAEFluidStack) {
|
||||
return fluidDuality.injectCraftedItems(link, items, mode);
|
||||
}
|
||||
return super.injectCraftedItems(link, items, mode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void jobStateChange(final ICraftingLink link) {
|
||||
super.jobStateChange(link);
|
||||
fluidDuality.jobStateChange(link);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(ForgeDirection from, FluidStack resource, boolean doFill) {
|
||||
return fluidDuality.fill(from, resource, doFill);
|
||||
|
||||
@@ -22,6 +22,8 @@ import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.CraftingAllow;
|
||||
import appeng.api.config.CraftingMode;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
import appeng.api.features.ILevelViewable;
|
||||
import appeng.api.features.LevelItemInfo;
|
||||
@@ -50,6 +52,8 @@ import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.core.AELog;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.me.cache.CraftingGridCache;
|
||||
import appeng.me.cluster.implementations.CraftingCPUCluster;
|
||||
import appeng.tile.TileEvent;
|
||||
import appeng.tile.events.TileEventType;
|
||||
import appeng.tile.grid.AENetworkTile;
|
||||
@@ -72,12 +76,15 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
public static final String NBT_ENABLE = "enable";
|
||||
public static final String NBT_STATE = "state";
|
||||
public static final String NBT_LINK = "link";
|
||||
public static final String NBT_LITE_MODE = "lite_mode";
|
||||
|
||||
public final RequestInfo[] requests = new RequestInfo[REQ_COUNT];
|
||||
private final LevelMaintainerInventory inventory = new LevelMaintainerInventory(requests);
|
||||
private int firstRequest = 0;
|
||||
private final BaseActionSource source;
|
||||
private boolean isPowered = false;
|
||||
private boolean isLiteModeOverridden = false;
|
||||
private boolean isLiteMode = false;
|
||||
|
||||
public TileLevelMaintainer() {
|
||||
getProxy().setIdlePowerUsage(1D);
|
||||
@@ -164,6 +171,7 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
}
|
||||
try {
|
||||
final ICraftingGrid craftingGrid = getProxy().getCrafting();
|
||||
final CraftingGridCache craftingGridCache = (CraftingGridCache) craftingGrid;
|
||||
final IGrid grid = getProxy().getGrid();
|
||||
|
||||
// Check there are available crafting CPUs before doing any work.
|
||||
@@ -171,7 +179,7 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
// crafting tasks that cannot be successfully submitted.
|
||||
boolean allBusy = true;
|
||||
for (final ICraftingCPU cpu : craftingGrid.getCpus()) {
|
||||
if (!cpu.isBusy()) {
|
||||
if (canAcceptMachineJob(cpu)) {
|
||||
allBusy = false;
|
||||
break;
|
||||
}
|
||||
@@ -184,7 +192,7 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
IAEStack<?> itemToBegin = null;
|
||||
int itemToBeginIdx = -1;
|
||||
|
||||
for (int j = 0; j < REQ_COUNT; ++j) {
|
||||
req: for (int j = 0; j < REQ_COUNT; ++j) {
|
||||
int i = (firstRequest + j) % REQ_COUNT;
|
||||
if (requests[i] == null) continue;
|
||||
|
||||
@@ -197,41 +205,54 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!this.isDone(i)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
IAEStack<?> craftItem = requests[i].stack.copy();
|
||||
craftItem.setStackSize(batchSize);
|
||||
|
||||
final boolean isCraftable = isCraftable(craftingGrid, craftItem);
|
||||
|
||||
if (this.requests[i].state != LevelState.Idle) {
|
||||
this.updateState(i, LevelState.Idle);
|
||||
}
|
||||
if (this.requests[i].link != null) {
|
||||
this.updateLink(i, null);
|
||||
}
|
||||
if (!isCraftable) {
|
||||
updateState(i, LevelState.NotFound);
|
||||
}
|
||||
|
||||
// A free CPU is required before it is worth looking at the stock:
|
||||
if (allBusy || !isCraftable) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Single hash lookup on the emitable mediums, so it is cheaper
|
||||
// than reading the stock and can run first.
|
||||
if (craftingGrid.canEmitFor(craftItem)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
IMEMonitor monitor = getProxy().getStorage().getMEMonitor(craftItem.getStackType());
|
||||
if (monitor == null) continue;
|
||||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
IAEStack<?> stackInStorage = monitor.getStorageList().findPrecise(craftItem);
|
||||
|
||||
long stackSize = stackInStorage == null ? 0 : stackInStorage.getStackSize();
|
||||
|
||||
boolean isDone = this.isDone(i);
|
||||
boolean isCraftable = stackInStorage != null && stackInStorage.isCraftable();
|
||||
boolean shouldCraft = isCraftable && stackSize < quantity;
|
||||
|
||||
if (isDone) {
|
||||
if (this.requests[i].state != LevelState.Idle) {
|
||||
this.updateState(i, LevelState.Idle);
|
||||
}
|
||||
if (this.requests[i].link != null) {
|
||||
this.updateLink(i, null);
|
||||
}
|
||||
if (!isCraftable) {
|
||||
updateState(i, LevelState.NotFound);
|
||||
}
|
||||
}
|
||||
|
||||
if (allBusy || !isDone || !shouldCraft) {
|
||||
if (stackSize >= quantity) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (craftingGrid.canEmitFor(stackInStorage)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (craftingGrid.isRequesting(stackInStorage)) {
|
||||
continue;
|
||||
// Walking every CPU to see whether the item is already being
|
||||
// made is comparatively expensive
|
||||
for (ICraftingCPU cpu : craftingGrid.getCpus()) {
|
||||
IAEStack<?> output = cpu.getFinalMultiOutput();
|
||||
if (output != null && output.isSameType(craftItem)) {
|
||||
continue req;
|
||||
}
|
||||
}
|
||||
|
||||
// do crafting
|
||||
@@ -273,9 +294,14 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
}
|
||||
} else if (itemToBegin != null) {
|
||||
// No jobs to submit, start calculating some item.
|
||||
|
||||
requests[itemToBeginIdx].job = craftingGrid
|
||||
.beginCraftingJob(this.worldObj, grid, source, itemToBegin, null);
|
||||
requests[itemToBeginIdx].job = craftingGridCache.beginCraftingJob(
|
||||
this.worldObj,
|
||||
grid,
|
||||
source,
|
||||
itemToBegin,
|
||||
CraftingMode.STANDARD,
|
||||
isLiteMode(),
|
||||
null);
|
||||
this.updateState(itemToBeginIdx, LevelState.Craft);
|
||||
|
||||
// Try the next item next time.
|
||||
@@ -292,6 +318,21 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
return TickRateModulation.SAME;
|
||||
}
|
||||
|
||||
private static boolean isCraftable(final ICraftingGrid craftingGrid, final IAEStack<?> stack) {
|
||||
if (stack == null) return false;
|
||||
return craftingGrid.canEmitFor(stack) || craftingGrid.getCraftingMultiPatterns().containsKey(stack);
|
||||
}
|
||||
|
||||
private static boolean canAcceptMachineJob(final ICraftingCPU cpu) {
|
||||
if (cpu.isBusy()) {
|
||||
return false;
|
||||
}
|
||||
if (!(cpu instanceof CraftingCPUCluster cluster)) {
|
||||
return true;
|
||||
}
|
||||
return cluster.isActive() && cluster.getCraftingAllowMode() != CraftingAllow.ONLY_PLAYER;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveChanges() {
|
||||
super.saveChanges();
|
||||
@@ -369,6 +410,35 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
this.saveChanges();
|
||||
}
|
||||
|
||||
private boolean getLiteModeDefault() {
|
||||
try {
|
||||
final ICraftingGrid craftingGrid = getProxy().getCrafting();
|
||||
if (craftingGrid instanceof CraftingGridCache cache) {
|
||||
return cache.getLiteCraftingDefault();
|
||||
}
|
||||
} catch (GridAccessException ignored) {}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isLiteMode() {
|
||||
return this.isLiteModeOverridden ? this.isLiteMode : getLiteModeDefault();
|
||||
}
|
||||
|
||||
public void setLiteMode(boolean liteMode) {
|
||||
this.isLiteModeOverridden = true;
|
||||
this.isLiteMode = liteMode;
|
||||
this.saveChanges();
|
||||
}
|
||||
|
||||
public void toggleLiteMode() {
|
||||
this.setLiteMode(!this.isLiteMode());
|
||||
}
|
||||
|
||||
public void clearLiteMode() {
|
||||
this.isLiteModeOverridden = false;
|
||||
this.saveChanges();
|
||||
}
|
||||
|
||||
private void updateLink(int idx, @Nullable ICraftingLink link) {
|
||||
if (requests[idx] == null) return;
|
||||
requests[idx].link = link;
|
||||
@@ -416,6 +486,9 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
}
|
||||
}
|
||||
data.setTag(NBT_REQUESTS, tagList);
|
||||
if (this.isLiteModeOverridden) {
|
||||
data.setBoolean(NBT_LITE_MODE, this.isLiteMode);
|
||||
}
|
||||
}
|
||||
|
||||
@TileEvent(TileEventType.WORLD_NBT_READ)
|
||||
@@ -499,6 +572,10 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
this.requests[i].quantity = quantyties[i];
|
||||
}
|
||||
}
|
||||
if (data.hasKey(NBT_LITE_MODE)) {
|
||||
this.isLiteModeOverridden = true;
|
||||
this.isLiteMode = data.getBoolean(NBT_LITE_MODE);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove old format NBT data from ItemStack
|
||||
@@ -541,6 +618,12 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
}
|
||||
}
|
||||
}
|
||||
if (compound.hasKey(NBT_LITE_MODE)) {
|
||||
this.isLiteModeOverridden = true;
|
||||
this.isLiteMode = compound.getBoolean(NBT_LITE_MODE);
|
||||
} else {
|
||||
this.isLiteModeOverridden = false;
|
||||
}
|
||||
this.saveChanges();
|
||||
}
|
||||
|
||||
@@ -557,6 +640,9 @@ public class TileLevelMaintainer extends AENetworkTile
|
||||
}
|
||||
}
|
||||
compound.setTag(NBT_REQUESTS, tagList);
|
||||
if (isLiteModeOverridden) {
|
||||
compound.setBoolean(NBT_LITE_MODE, isLiteMode);
|
||||
}
|
||||
return compound;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,10 +5,12 @@ import java.util.stream.IntStream;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
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 net.minecraftforge.common.util.Constants;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
@@ -28,6 +30,7 @@ import appeng.api.config.Actionable;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
import appeng.api.implementations.IPowerChannelState;
|
||||
import appeng.api.implementations.items.IStorageCell;
|
||||
import appeng.api.implementations.tiles.IColorableTile;
|
||||
import appeng.api.networking.GridFlags;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.events.MENetworkBootingStatusChange;
|
||||
@@ -45,6 +48,7 @@ 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.api.util.AEColor;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.core.AELog;
|
||||
@@ -63,7 +67,7 @@ import appeng.util.item.AEItemStack;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
public class TileSuperStockReplenisher extends AENetworkInvTile implements IAEFluidInventory, IFluidHandler,
|
||||
IPowerChannelState, IGridTickable, ITerminalHost, IIAEStackInventory {
|
||||
IPowerChannelState, IGridTickable, ITerminalHost, IIAEStackInventory, IColorableTile {
|
||||
|
||||
private final AppEngInternalInventory cell = new AppEngInternalInventory(this, 1);
|
||||
private final BiggerAppEngInventory invItems = new BiggerAppEngInventory(this, 63);
|
||||
@@ -87,6 +91,7 @@ public class TileSuperStockReplenisher extends AENetworkInvTile implements IAEFl
|
||||
};
|
||||
private final BaseActionSource source;
|
||||
private boolean isPowered;
|
||||
private AEColor paintedColor = AEColor.Transparent;
|
||||
private long totalBytes;
|
||||
private long storedFluidCount;
|
||||
private long storedItemCount;
|
||||
@@ -601,17 +606,26 @@ public class TileSuperStockReplenisher extends AENetworkInvTile implements IAEFl
|
||||
@TileEvent(TileEventType.NETWORK_READ)
|
||||
public boolean readFromStream_TileSuperStockReplenisher(final ByteBuf data) {
|
||||
final boolean oldPower = isPowered;
|
||||
final AEColor oldPaintedColor = this.paintedColor;
|
||||
isPowered = data.readBoolean();
|
||||
return isPowered != oldPower;
|
||||
this.paintedColor = AEColor.fromOrdinal(data.readByte());
|
||||
this.getProxy().setColor(this.paintedColor);
|
||||
return isPowered != oldPower || this.paintedColor != oldPaintedColor;
|
||||
}
|
||||
|
||||
@TileEvent(TileEventType.NETWORK_WRITE)
|
||||
public void writeToStream_TileSuperStockReplenisher(final ByteBuf data) {
|
||||
data.writeBoolean(isActive());
|
||||
data.writeByte(this.paintedColor.ordinal());
|
||||
}
|
||||
|
||||
@TileEvent(TileEventType.WORLD_NBT_READ)
|
||||
public void readFromNBTEvent(NBTTagCompound data) {
|
||||
final int color = data.hasKey("paintedColor", Constants.NBT.TAG_BYTE) ? data.getByte("paintedColor")
|
||||
: AEColor.Transparent.ordinal();
|
||||
this.paintedColor = color >= 0 && color < AEColor.VALUES.length ? AEColor.fromOrdinal(color)
|
||||
: AEColor.Transparent;
|
||||
this.getProxy().setColor(this.paintedColor);
|
||||
invItems.readFromNBT(data, "ItemInv");
|
||||
invFluids.readFromNBT(data, "FluidInv");
|
||||
configItems.readFromNBT(data, "configItems");
|
||||
@@ -626,6 +640,7 @@ public class TileSuperStockReplenisher extends AENetworkInvTile implements IAEFl
|
||||
|
||||
@TileEvent(TileEventType.WORLD_NBT_WRITE)
|
||||
public NBTTagCompound writeToNBTEvent(NBTTagCompound data) {
|
||||
data.setByte("paintedColor", (byte) this.paintedColor.ordinal());
|
||||
invItems.writeToNBT(data, "ItemInv");
|
||||
invFluids.writeToNBT(data, "FluidInv");
|
||||
configItems.writeToNBT(data, "configItems");
|
||||
@@ -638,6 +653,27 @@ public class TileSuperStockReplenisher extends AENetworkInvTile implements IAEFl
|
||||
return data;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AEColor getColor() {
|
||||
return this.paintedColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean recolourBlock(final ForgeDirection side, final AEColor newPaintedColor, final EntityPlayer who) {
|
||||
if (this.paintedColor == newPaintedColor) {
|
||||
return false;
|
||||
}
|
||||
this.paintedColor = newPaintedColor;
|
||||
this.getProxy().setColor(this.paintedColor);
|
||||
final IGridNode node = this.getGridNode(side);
|
||||
if (node != null) {
|
||||
node.updateState();
|
||||
}
|
||||
this.markDirty();
|
||||
this.markForUpdate();
|
||||
return true;
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void stateChange(final MENetworkPowerStatusChange p) {
|
||||
this.updatePowerState();
|
||||
|
||||
@@ -29,7 +29,9 @@ public class WirelessMagnet {
|
||||
|
||||
Off,
|
||||
Inv,
|
||||
ME
|
||||
ME;
|
||||
|
||||
public static final Mode[] VALUES = values();
|
||||
}
|
||||
|
||||
public enum ListMode {
|
||||
@@ -138,7 +140,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.VALUES[data.getInteger(modeKey)];
|
||||
}
|
||||
setMode(is, Mode.Off);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@ public class CPacketLevelMaintainer implements IMessage {
|
||||
Batch,
|
||||
Enable,
|
||||
Disable,
|
||||
ToggleLiteMode,
|
||||
ClearLiteMode,
|
||||
}
|
||||
|
||||
private Action action;
|
||||
@@ -25,6 +27,12 @@ public class CPacketLevelMaintainer implements IMessage {
|
||||
@SuppressWarnings("unused")
|
||||
public CPacketLevelMaintainer() {}
|
||||
|
||||
public CPacketLevelMaintainer(Action action) {
|
||||
this.action = action;
|
||||
this.slotIndex = -1;
|
||||
this.size = 0;
|
||||
}
|
||||
|
||||
public CPacketLevelMaintainer(Action action, int slotIndex) {
|
||||
this.action = action;
|
||||
this.slotIndex = slotIndex;
|
||||
@@ -62,6 +70,8 @@ public class CPacketLevelMaintainer implements IMessage {
|
||||
case Batch -> clm.getTile().updateBatchSize(message.slotIndex, message.size);
|
||||
case Enable -> clm.getTile().updateStatus(message.slotIndex, false);
|
||||
case Disable -> clm.getTile().updateStatus(message.slotIndex, true);
|
||||
case ToggleLiteMode -> clm.getTile().toggleLiteMode();
|
||||
case ClearLiteMode -> clm.getTile().clearLiteMode();
|
||||
}
|
||||
clm.updateGui();
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import appeng.container.ContainerOpenContext;
|
||||
import appeng.container.PrimaryGui;
|
||||
import appeng.container.interfaces.IContainerSubGui;
|
||||
import appeng.helpers.ICustomButtonProvider;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessageHandler;
|
||||
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
|
||||
@@ -54,7 +55,7 @@ public class CPacketSwitchGuis implements IMessage {
|
||||
@Override
|
||||
public void fromBytes(ByteBuf byteBuf) {
|
||||
final int ord = byteBuf.readInt();
|
||||
mode = ord != -1 ? UltraTerminalModes.values()[ord] : null;
|
||||
mode = ord != -1 ? UltraTerminalModes.VALUES[ord] : null;
|
||||
switchTerminal = byteBuf.readBoolean();
|
||||
}
|
||||
|
||||
@@ -75,7 +76,7 @@ public class CPacketSwitchGuis implements IMessage {
|
||||
// switch terminal
|
||||
|
||||
if (message.switchTerminal) {
|
||||
ImmutablePair<Integer, ItemStack> temp = Util.getUltraWirelessTerm(player);
|
||||
ImmutablePair<Integer, ItemStack> temp = getTerminalToSwitch(player, cont);
|
||||
if (temp != null && temp.getRight().getItem() instanceof ItemWirelessUltraTerminal iwut) {
|
||||
if (message.mode != null && cont instanceof AEBaseContainer abc) {
|
||||
abc.setSwitchAbleGuiNext(message.mode.ordinal());
|
||||
@@ -118,6 +119,21 @@ public class CPacketSwitchGuis implements IMessage {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static ImmutablePair<Integer, ItemStack> getTerminalToSwitch(EntityPlayerMP player, Container cont) {
|
||||
if (cont instanceof AEBaseContainer aeBaseContainer) {
|
||||
final int slot = aeBaseContainer.getTargetSlotIndex();
|
||||
if (slot == Integer.MIN_VALUE) return null;
|
||||
|
||||
final ItemStack terminal = Platform.getItemFromPlayerInventoryBySlotIndex(player, slot);
|
||||
return terminal != null && terminal.getItem() instanceof ItemWirelessUltraTerminal
|
||||
? new ImmutablePair<>(slot, terminal)
|
||||
: null;
|
||||
}
|
||||
|
||||
// Global terminal hotkeys have no open item GUI from which to obtain an exact slot.
|
||||
return Util.getUltraWirelessTerm(player);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,13 +18,15 @@ public class SPacketLevelMaintainerGuiUpdate implements IMessage {
|
||||
|
||||
private Info[] infoList;
|
||||
private boolean onlyState;
|
||||
private boolean isLiteMode;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public SPacketLevelMaintainerGuiUpdate() {}
|
||||
|
||||
public SPacketLevelMaintainerGuiUpdate(RequestInfo[] requests, boolean onlyState) {
|
||||
public SPacketLevelMaintainerGuiUpdate(RequestInfo[] requests, boolean onlyState, boolean isLiteMode) {
|
||||
this.infoList = new Info[REQ_COUNT];
|
||||
this.onlyState = onlyState;
|
||||
this.isLiteMode = isLiteMode;
|
||||
|
||||
for (int i = 0; i < REQ_COUNT; i++) {
|
||||
if (requests[i] == null) {
|
||||
@@ -43,6 +45,7 @@ public class SPacketLevelMaintainerGuiUpdate implements IMessage {
|
||||
public void fromBytes(ByteBuf buf) {
|
||||
this.infoList = new Info[REQ_COUNT];
|
||||
this.onlyState = buf.readBoolean();
|
||||
this.isLiteMode = buf.readBoolean();
|
||||
|
||||
for (int i = 0; i < REQ_COUNT; i++) {
|
||||
if (buf.readBoolean()) {
|
||||
@@ -64,6 +67,7 @@ public class SPacketLevelMaintainerGuiUpdate implements IMessage {
|
||||
@Override
|
||||
public void toBytes(ByteBuf buf) {
|
||||
buf.writeBoolean(this.onlyState);
|
||||
buf.writeBoolean(this.isLiteMode);
|
||||
for (Info info : this.infoList) {
|
||||
buf.writeBoolean(info != null);
|
||||
if (info == null) continue;
|
||||
@@ -114,6 +118,8 @@ public class SPacketLevelMaintainerGuiUpdate implements IMessage {
|
||||
gui.updateComponent(i, info.quantity, info.batchSize, info.enable, info.state);
|
||||
}
|
||||
}
|
||||
|
||||
gui.updateComponent(message.isLiteMode);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -6,7 +6,6 @@ import static appeng.util.item.AEItemStackType.ITEM_STACK_TYPE;
|
||||
import java.util.IdentityHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -26,12 +25,14 @@ import com.glodblock.github.common.item.ItemFluidPacket;
|
||||
import com.glodblock.github.inventory.AEFluidInventory;
|
||||
import com.glodblock.github.inventory.IAEFluidInventory;
|
||||
import com.glodblock.github.inventory.IAEFluidTank;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import appeng.api.config.Actionable;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.implementations.IUpgradeableHost;
|
||||
import appeng.api.networking.GridFlags;
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.crafting.ICraftingLink;
|
||||
import appeng.api.networking.events.MENetworkChannelsChanged;
|
||||
import appeng.api.networking.events.MENetworkPowerStatusChange;
|
||||
import appeng.api.networking.security.BaseActionSource;
|
||||
@@ -46,10 +47,12 @@ import appeng.api.storage.IStorageMonitorable;
|
||||
import appeng.api.storage.data.AEStackTypeRegistry;
|
||||
import appeng.api.storage.data.IAEFluidStack;
|
||||
import appeng.api.storage.data.IAEItemStack;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.storage.data.IAEStackType;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.core.settings.TickRates;
|
||||
import appeng.helpers.IInterfaceHost;
|
||||
import appeng.helpers.MultiCraftingTracker;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.me.helpers.AENetworkProxy;
|
||||
import appeng.me.storage.MEMonitorIFluidHandler;
|
||||
@@ -75,6 +78,7 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable
|
||||
private final IAEFluidStack[] requireWork;
|
||||
private int isWorking = -1;
|
||||
private final Map<IAEStackType<?>, MEMonitorPassThrough<?>> monitorMap;
|
||||
private final MultiCraftingTracker craftingTracker;
|
||||
|
||||
public DualityFluidInterface(final AENetworkProxy networkProxy, final IInterfaceHost ih) {
|
||||
this.gridProxy = networkProxy;
|
||||
@@ -94,6 +98,8 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable
|
||||
for (int i = 0; i < 6; ++i) {
|
||||
this.requireWork[i] = null;
|
||||
}
|
||||
|
||||
this.craftingTracker = new MultiCraftingTracker(this.iHost, NUMBER_OF_TANKS);
|
||||
}
|
||||
|
||||
public IAEFluidStack getStandardFluid(IAEFluidStack fluid) {
|
||||
@@ -147,6 +153,18 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable
|
||||
this.readConfig();
|
||||
}
|
||||
|
||||
public void writeCraftingTrackerToNBT(NBTTagCompound data) {
|
||||
final NBTTagCompound tracker = new NBTTagCompound();
|
||||
this.craftingTracker.writeToNBT(tracker);
|
||||
data.setTag("fluidCraftingLinks", tracker);
|
||||
}
|
||||
|
||||
public void readCraftingTrackerFromNBT(NBTTagCompound data) {
|
||||
if (data.hasKey("fluidCraftingLinks")) {
|
||||
this.craftingTracker.readFromNBT(data.getCompoundTag("fluidCraftingLinks"));
|
||||
}
|
||||
}
|
||||
|
||||
public void writeConfigToNBT(NBTTagCompound data, String name) {
|
||||
this.config.writeToNBT(data, name);
|
||||
}
|
||||
@@ -173,6 +191,8 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable
|
||||
}
|
||||
|
||||
private IMEMonitor<IAEFluidStack> getFluidGrid() {
|
||||
if (!this.gridProxy.isActive()) return null;
|
||||
|
||||
try {
|
||||
return gridProxy.getGrid().<IStorageGrid>getCache(IStorageGrid.class).getFluidInventory();
|
||||
} catch (GridAccessException e) {
|
||||
@@ -182,7 +202,7 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable
|
||||
|
||||
@Override
|
||||
public int getInstalledUpgrades(Upgrades u) {
|
||||
return 0;
|
||||
return this.iHost.getInstalledUpgrades(u);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -326,9 +346,11 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable
|
||||
}
|
||||
IAEFluidStack toStore;
|
||||
if (work.getStackSize() > 0L) {
|
||||
if ((long) this.tanks.fill(slot, work.getFluidStack(), false) != work.getStackSize()) {
|
||||
if (this.craftingTracker.isBusy(slot)) {
|
||||
changed = this.handleCrafting(slot, work);
|
||||
} else if ((long) this.tanks.fill(slot, work.getFluidStack(), false) != work.getStackSize()) {
|
||||
changed = true;
|
||||
} else if (Objects.requireNonNull(getFluidGrid()).getStorageList().findPrecise(work) != null) {
|
||||
} else {
|
||||
toStore = dest.extractItems(work, Actionable.MODULATE, this.mySource);
|
||||
if (toStore != null) {
|
||||
changed = true;
|
||||
@@ -336,6 +358,8 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable
|
||||
if ((long) filled != toStore.getStackSize()) {
|
||||
throw new IllegalStateException("bad attempt at managing tanks. ( fill )");
|
||||
}
|
||||
} else {
|
||||
changed = this.handleCrafting(slot, work);
|
||||
}
|
||||
}
|
||||
} else if (work.getStackSize() < 0L) {
|
||||
@@ -365,6 +389,57 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable
|
||||
return changed;
|
||||
}
|
||||
|
||||
private boolean handleCrafting(final int slot, final IAEFluidStack fluidStack) {
|
||||
try {
|
||||
if (this.getInstalledUpgrades(Upgrades.CRAFTING) > 0 && fluidStack != null) {
|
||||
return this.craftingTracker.handleCrafting(
|
||||
slot,
|
||||
fluidStack.getStackSize(),
|
||||
(IAEStack<?>) fluidStack,
|
||||
this.iHost.getTileEntity().getWorldObj(),
|
||||
this.gridProxy.getGrid(),
|
||||
this.gridProxy.getCrafting(),
|
||||
this.mySource);
|
||||
}
|
||||
} catch (final GridAccessException e) {
|
||||
// :P
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public ImmutableSet<ICraftingLink> getRequestedJobs() {
|
||||
return this.craftingTracker.getRequestedJobs();
|
||||
}
|
||||
|
||||
public IAEStack<?> injectCraftedItems(final ICraftingLink link, final IAEStack<?> acquired, final Actionable mode) {
|
||||
final int slot = this.craftingTracker.getSlot(link);
|
||||
|
||||
if (acquired instanceof IAEFluidStack afs && slot >= 0 && slot < NUMBER_OF_TANKS) {
|
||||
if (mode == Actionable.SIMULATE) {
|
||||
final int filled = this.tanks.fill(slot, afs.getFluidStack(), false);
|
||||
return filled >= afs.getFluidStack().amount ? null
|
||||
: AEFluidStack.create(drainRemainder(afs.getFluidStack(), filled));
|
||||
} else {
|
||||
final int filled = this.tanks.fill(slot, afs.getFluidStack(), true);
|
||||
this.updatePlan(slot);
|
||||
return filled >= afs.getFluidStack().amount ? null
|
||||
: AEFluidStack.create(drainRemainder(afs.getFluidStack(), filled));
|
||||
}
|
||||
}
|
||||
|
||||
return acquired;
|
||||
}
|
||||
|
||||
private static FluidStack drainRemainder(final FluidStack original, final int accepted) {
|
||||
final FluidStack remainder = original.copy();
|
||||
remainder.amount -= accepted;
|
||||
return remainder;
|
||||
}
|
||||
|
||||
public void jobStateChange(final ICraftingLink link) {
|
||||
this.craftingTracker.jobStateChange(link);
|
||||
}
|
||||
|
||||
private void updatePlan(int slot) {
|
||||
IAEFluidStack req = this.config.getFluidInSlot(slot);
|
||||
IAEFluidStack stored = this.tanks.getFluidInSlot(slot);
|
||||
|
||||
@@ -8,13 +8,17 @@ public class FCGuiColors {
|
||||
|
||||
public static final ColorResource
|
||||
// spotless:off
|
||||
guiTextColorGray = color.rgb("guiTextColorGray", "0x404040"),
|
||||
guiTextColorGray = color.rgb("guiTextColorGray", "0x404040"),
|
||||
guiTextColorWhite = color.rgb("guiTextColorWhite", "0xFFFFFF"),
|
||||
guiLevelMaintainerError = color.rgb("guiLevelMaintainerError", "0xFF0000"),
|
||||
|
||||
stateNone = color.argb("stateNone", "0x00000000"),
|
||||
stateIdle = color.argb("stateIdle", "0xFF55FF55"),
|
||||
stateCraft = color.argb("stateCraft", "0xFFFFFF55"),
|
||||
stateExport = color.argb("stateExport", "0xFFAA00AA"),
|
||||
stateError = color.argb("stateError", "0xFFFF5555"),
|
||||
itemSlotOverlayUnpowered = color.argb("itemSlotOverlayUnpowered", "0x66111111");
|
||||
|
||||
stateNone = color.argb("stateNone", "0x00000000"),
|
||||
stateIdle = color.argb("stateIdle", "0xFF55FF55"),
|
||||
stateCraft = color.argb("stateCraft", "0xFFFFFF55"),
|
||||
stateExport = color.argb("stateExport", "0xFFAA00AA"),
|
||||
stateError = color.argb("stateError", "0xFFFF5555"),
|
||||
itemSlotOverlayUnpowered = color.argb("itemSlotOverlayUnpowered", "0x66111111"),
|
||||
guiLevelTerminalOverlayHighlight = color.argb("guiLevelTerminalOverlayHighlight", "0x77FFFFFF");
|
||||
// spotless:on
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package com.glodblock.github.util;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import com.glodblock.github.client.textures.FCPartsTexture;
|
||||
import com.glodblock.github.common.item.FCBaseItemCell;
|
||||
|
||||
import appeng.api.implementations.items.IStorageCell;
|
||||
import appeng.api.implementations.tiles.IChestOrDrive;
|
||||
import appeng.api.storage.ICellHandler;
|
||||
import appeng.api.storage.ICellInventoryHandler;
|
||||
import appeng.api.storage.IMEInventory;
|
||||
import appeng.api.storage.IMEInventoryHandler;
|
||||
import appeng.api.storage.ISaveProvider;
|
||||
import appeng.api.storage.StorageChannel;
|
||||
import appeng.api.storage.data.IAEStackType;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.me.storage.CellInventory;
|
||||
import appeng.me.storage.FluidCellInventoryHandler;
|
||||
import appeng.util.Platform;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class FluidCellHandler implements ICellHandler {
|
||||
|
||||
@Override
|
||||
public boolean isCell(final ItemStack is) {
|
||||
/*
|
||||
* FCBaseItemCell covers Basic, Multi, and Extreme fluid storage
|
||||
*/
|
||||
return is != null && is.getItem() instanceof FCBaseItemCell;
|
||||
}
|
||||
|
||||
/**
|
||||
* ME Chest icon
|
||||
*/
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getTopTexture_Dark() {
|
||||
return FCPartsTexture.BlockMEChestFluid_Dark.getIcon();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getTopTexture_Light() {
|
||||
return FCPartsTexture.BlockMEChestFluid_Bright.getIcon();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getTopTexture_Medium() {
|
||||
return FCPartsTexture.BlockMEChestFluid_Medium.getIcon();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openChestGui(final EntityPlayer player, final IChestOrDrive chest, final ICellHandler cellHandler,
|
||||
@SuppressWarnings("rawtypes") final IMEInventoryHandler inv, final ItemStack itemStack,
|
||||
final StorageChannel channel) {
|
||||
Platform.openGUI(player, (TileEntity) chest, chest.getUp(), GuiBridge.GUI_ME);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getStatusForCell(ItemStack is, IMEInventory handler) {
|
||||
if (handler instanceof FluidCellInventoryHandler ci) {
|
||||
return ci.getStatusForCell();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public double cellIdleDrain(final ItemStack is, @SuppressWarnings("rawtypes") final IMEInventory handler) {
|
||||
return ((ICellInventoryHandler) handler).getCellInv().getIdleDrain();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IMEInventoryHandler getCellInventory(ItemStack fluidCell, ISaveProvider saveProvider, IAEStackType<?> type) {
|
||||
if (fluidCell != null && fluidCell.getItem() instanceof IStorageCell cell && cell.getStackType() == type) {
|
||||
return CellInventory.getCell(fluidCell, saveProvider, type);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -87,6 +87,7 @@ public class NameConst {
|
||||
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_LEVEL_MAINTAINER_LITE_CRAFT_DESC = TT_LEVEL_MAINTAINER + "lite_craft_desc";
|
||||
public static final String TT_CELL_PORTABLE = TT_KEY + "cell_portable";
|
||||
public static final String TT_WIRELESS = TT_KEY + "wireless.";
|
||||
public static final String TT_WIRELESS_INSTALLED = TT_WIRELESS + "installed";
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
package com.glodblock.github.util;
|
||||
|
||||
public enum UltraTerminalModes {
|
||||
|
||||
CRAFTING,
|
||||
PATTERN,
|
||||
PATTERN_EX,
|
||||
INTERFACE,
|
||||
LEVEL
|
||||
LEVEL;
|
||||
|
||||
public static final UltraTerminalModes[] VALUES = values();
|
||||
}
|
||||
@@ -160,11 +160,12 @@ public final class Util {
|
||||
}
|
||||
|
||||
public static ImmutablePair<Integer, ItemStack> getUltraWirelessTerm(EntityPlayer player) {
|
||||
int invSize = player.inventory.getSizeInventory();
|
||||
final ImmutablePair<Integer, ItemStack> baublesTerminal = getBaublesUltraWirelessTerm(player);
|
||||
return baublesTerminal != null ? baublesTerminal : getInventoryUltraWirelessTerm(player);
|
||||
}
|
||||
|
||||
if (invSize <= 0) {
|
||||
return null;
|
||||
}
|
||||
private static ImmutablePair<Integer, ItemStack> getInventoryUltraWirelessTerm(EntityPlayer player) {
|
||||
final int invSize = player.inventory.getSizeInventory();
|
||||
for (int i = 0; i < invSize; ++i) {
|
||||
ItemStack is = player.inventory.getStackInSlot(i);
|
||||
if (is != null && is.getItem() instanceof ItemWirelessUltraTerminal) {
|
||||
@@ -172,10 +173,14 @@ public final class Util {
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static ImmutablePair<Integer, ItemStack> getBaublesUltraWirelessTerm(EntityPlayer player) {
|
||||
if (ModAndClassUtil.BAUBLES) {
|
||||
IInventory handler = BaublesApi.getBaubles(player);
|
||||
final IInventory handler = BaublesApi.getBaubles(player);
|
||||
if (handler != null) {
|
||||
invSize = handler.getSizeInventory();
|
||||
final int invSize = handler.getSizeInventory();
|
||||
for (int i = 0; i < invSize; ++i) {
|
||||
ItemStack is = handler.getStackInSlot(i);
|
||||
if (is != null && is.getItem() instanceof ItemWirelessUltraTerminal) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
item.fluid_drop.name=drop of %s
|
||||
item.fluid_encoded_pattern.name=Encoded Pattern
|
||||
item.fluid_encoded_pattern.name=Fluid Processing Pattern
|
||||
item.part_fluid_interface.name=ME Dual Interface
|
||||
item.part_fluid_p2p_interface.name=P2P Tunnel - ME Dual Interface
|
||||
item.part_fluid_import.name=ME Fluid Import Bus
|
||||
@@ -99,6 +99,7 @@ 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.lite_craft_desc=Toggle lite crafting mode. Shift-click to clear override and restore network defaults.
|
||||
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
|
||||
|
||||
|
After Width: | Height: | Size: 95 B |
|
After Width: | Height: | Size: 119 B |
|
After Width: | Height: | Size: 115 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 126 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 126 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 126 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 122 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 123 B |
|
After Width: | Height: | Size: 132 B |
|
After Width: | Height: | Size: 132 B |
|
After Width: | Height: | Size: 132 B |
|
After Width: | Height: | Size: 132 B |
|
After Width: | Height: | Size: 132 B |
|
After Width: | Height: | Size: 132 B |
|
After Width: | Height: | Size: 132 B |
|
After Width: | Height: | Size: 133 B |
|
After Width: | Height: | Size: 132 B |
|
After Width: | Height: | Size: 132 B |
|
After Width: | Height: | Size: 132 B |
|
After Width: | Height: | Size: 132 B |
|
After Width: | Height: | Size: 132 B |