Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
358c238e17 | ||
|
|
e16be431c3 | ||
|
|
df71dd52b2 | ||
|
|
c7ec5b0c8b | ||
|
|
ec682b28c3 | ||
|
|
ff129e46d9 |
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.121-GTNH:dev')
|
||||
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-1040-GTNH:dev')
|
||||
api('com.github.GTNewHorizons:waila:1.19.31:dev')
|
||||
api("com.github.GTNewHorizons:GTNHLib:0.11.37: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.22-GTNH:dev')
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.63: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.34:dev')
|
||||
compileOnly('com.github.GTNewHorizons:EnderIO:2.10.37:dev')
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.55-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.4: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/97d46b5ff4df0bf61e95652a190a5567/redirect
|
||||
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/9ef54a08e06b0754cee9fc95ed3a3134/redirect
|
||||
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/97d46b5ff4df0bf61e95652a190a5567/redirect
|
||||
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/9ef54a08e06b0754cee9fc95ed3a3134/redirect
|
||||
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/1df82b76031285ef2e6a4f59ffe9299d/redirect
|
||||
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/c7d5be6a02945ac2e045048ee54a7d32/redirect
|
||||
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/97d46b5ff4df0bf61e95652a190a5567/redirect
|
||||
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/9ef54a08e06b0754cee9fc95ed3a3134/redirect
|
||||
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/643f404f769811f5f265fd66f7af5d89/redirect
|
||||
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/38256085a73e137cb4937ea9c4807fec/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.29'
|
||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.34'
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ 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;
|
||||
@@ -19,6 +18,7 @@ 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;
|
||||
@@ -103,6 +103,6 @@ public class GuiFluidInterface extends GuiSub {
|
||||
}
|
||||
|
||||
private boolean isPart() {
|
||||
return this.cont.getTile() instanceof PartFluidInterface;
|
||||
return this.cont.getTile() instanceof IPart;
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -22,6 +22,7 @@ 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;
|
||||
@@ -52,13 +53,13 @@ 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;
|
||||
import appeng.tile.inventory.IAEAppEngInventory;
|
||||
import appeng.tile.inventory.IAEStackInventory;
|
||||
import appeng.tile.inventory.InvOperation;
|
||||
import appeng.util.IterationCounter;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.SettingsFrom;
|
||||
import appeng.util.item.AEItemStack;
|
||||
@@ -178,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;
|
||||
}
|
||||
@@ -191,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;
|
||||
|
||||
@@ -204,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;
|
||||
|
||||
IAEStack<?> stackInStorage = monitor.getAvailableItem(craftItem, IterationCounter.fetchNewId());
|
||||
|
||||
@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
|
||||
@@ -304,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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 126 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 126 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 126 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 125 B |
|
Before Width: | Height: | Size: 182 B After Width: | Height: | Size: 122 B |
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 204 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 197 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 133 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 133 B |
|
Before Width: | Height: | Size: 193 B After Width: | Height: | Size: 132 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 321 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 350 B |
|
After Width: | Height: | Size: 366 B |
|
After Width: | Height: | Size: 1.2 KiB |