Merge branch 'master' into stack-type-api

This commit is contained in:
Kogepan229 committed 2026-01-11 12:39:35 +09:00
commit 762e04c92f
17 files changed
+89 -62

No files matched your search

+10 -10
View File
@@ -34,29 +34,29 @@
* 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.43-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-762-GTNH:dev')
api('com.github.GTNewHorizons:NotEnoughItems:2.8.48-GTNH:dev')
api('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-775-GTNH:dev')
api('curse.maven:cofh-core-69162:2388751')
api('com.github.GTNewHorizons:waila:1.9.15:dev')
api("com.github.GTNewHorizons:GTNHLib:0.8.34:dev")
api("com.github.GTNewHorizons:GTNHLib:0.8.41:dev")
implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.12.11:dev") {
implementation("com.github.GTNewHorizons:WirelessCraftingTerminal:1.12.12:dev") {
exclude group: 'com.github.GTNewHorizons', module: 'Applied-Energistics-2-Unofficial'
}
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.4-GTNH:dev')
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.6-GTNH:dev')
compileOnly('com.github.GTNewHorizons:ExtraCells2:2.5.35:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ForestryMC:4.11.2:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.10.10:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.152:dev') {
compileOnly('com.github.GTNewHorizons:ForestryMC:4.11.4:dev')
compileOnly('com.github.GTNewHorizons:EnderIO:2.10.12:dev')
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.52.179:dev') {
exclude group: 'com.github.GTNewHorizons', module: 'AE2FluidCraft-Rework'
exclude group: 'com.github.GTNewHorizons', module: 'Applied-Energistics-2-Unofficial'
}
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
compileOnly('com.gregoriust.gregtech:gregtech_1.7.10:6.14.23:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.8-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.7.16-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.9-GTNH:dev') { transitive = false }
compileOnly('com.github.GTNewHorizons:ThaumicEnergistics:1.7.18-GTNH:dev') { transitive = false }
runtimeOnlyNonPublishable("com.github.GTNewHorizons:DuraDisplay:1.4.0:dev")
}
+7
View File
@@ -43,6 +43,10 @@ developmentEnvironmentUserName = Developer
# See https://github.com/bsideup/jabel for details on how this works.
enableModernJavaSyntax = true
# If set, ignores the above setting and compiles with the given toolchain. This may cause unexpected issues,
# and should *not* be used in most situations. -1 disables this.
# forceToolchainVersion = -1
# Enables injecting missing generics into the decompiled source code for a better coding experience.
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
enableGenericInjection = true
@@ -209,3 +213,6 @@ curseForgeRelations =
# This is meant to be set in $HOME/.gradle/gradle.properties.
# ideaCheckSpotlessOnBuild = true
# Non-GTNH properties
org.gradle.configuration-cache = true
org.gradle.parallel = true
+12
View File
@@ -0,0 +1,12 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/46949723aaa20c7b64d7ecfed7207034/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/d6690dfd71c4c91e08577437b5b2beb0/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/df211d3c3eefdc408b462041881bc575/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b41931cf1e70bc8e08d7dd19c343ef00/redirect
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/3cd7045fca9a72cd9bc7d14a385e594c/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/552c7bffe0370c66410a51c55985b511/redirect
toolchainVersion=25
Binary file not shown.
+1 -1
View File
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Vendored
+1 -4
View File
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
# Copyright © 2015 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -114,7 +114,6 @@ case "$( uname )" in #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH="\\\"\\\""
# Determine the Java command to use to start the JVM.
@@ -172,7 +171,6 @@ fi
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
@@ -212,7 +210,6 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
"$@"
Vendored
+1 -2
View File
@@ -70,11 +70,10 @@ goto fail
:execute
@rem Setup the command line
set CLASSPATH=
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %*
:end
@rem End local scope for the variables with windows NT shell
+1 -1
View File
@@ -17,7 +17,7 @@ pluginManagement {
}
plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.48'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '2.0.7'
}
@@ -1,10 +1,8 @@
package com.glodblock.github.client.gui;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Slot;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.util.ForgeDirection;
@@ -51,13 +49,6 @@ public class GuiFluidInterface extends GuiSub {
}
}
@Override
public void func_146977_a(final Slot s) {
try {
GuiContainer.class.getDeclaredMethod("func_146977_a_original", Slot.class).invoke(this, s);
} catch (final Exception ignore) {}
}
@Override
public void drawFG(int offsetX, int offsetY, int mouseX, int mouseY) {
fontRendererObj.drawString(getGuiDisplayName(I18n.format(NameConst.GUI_FLUID_INTERFACE)), 8, 6, 0x404040);
@@ -82,7 +82,7 @@ public class GuiLevelMaintainer extends GuiSub {
new GuiFCImgButton(guiLeft + 105 + 47, guiTop + 17 + 19 * i, "SUBMIT", "SUBMIT", false),
new GuiFCImgButton(guiLeft + 9, guiTop + 20 + 19 * i, "ENABLE", "ENABLE", false),
new GuiFCImgButton(guiLeft + 9, guiTop + 20 + 19 * i, "DISABLE", "DISABLE", false),
new FCGuiLineField(fontRendererObj, guiLeft + 47, guiTop + 33 + 19 * i, 125),
new FCGuiLineField(fontRendererObj, guiLeft + 47, guiTop + 33 + 19 * i, 120),
this.buttonList,
this.cont);
}
@@ -34,6 +34,11 @@ public class PartFluidExportBus extends PartBaseExportBus<IAEFluidStack> {
return FCPartsTexture.PartFluidExportBus.getIcon();
}
@Override
protected int getAdaptorFlags() {
return InventoryAdaptor.ALLOW_FLUIDS | InventoryAdaptor.FOR_INSERTS;
}
@Override
public int calculateAmountToSend() {
double amount = 1000D;
@@ -96,38 +96,34 @@ public class PartFluidImportBus extends PartBaseImportBus<IAEFluidStack> {
@Override
protected boolean importStuff(final Object myTarget, final IAEFluidStack whatToImport,
final IMEMonitor<IAEFluidStack> inv, final IEnergySource energy, final FuzzyMode fzMode) {
final IFluidHandler fh = (IFluidHandler) myTarget;
if (myTarget instanceof IFluidHandler fh) {
FluidTankInfo[] tanksInfo = fh.getTankInfo(this.getSide().getOpposite());
if (tanksInfo == null) return true;
FluidTankInfo[] tanksInfo = fh.getTankInfo(this.getSide().getOpposite());
if (tanksInfo == null) return true;
for (FluidTankInfo tankInfo : tanksInfo) {
if (tankInfo.fluid == null) continue;
int maxDrain = this.calculateAmountToSend();
FluidStack fluidStack = new FluidStack(
tankInfo.fluid,
Math.min(tankInfo.fluid.amount, this.itemToSend));
fluidStack = fh.drain(this.getSide().getOpposite(), fluidStack, false);
if (this.filterEnabled() && !this.isInFilter(fluidStack)) continue;
for (FluidTankInfo tankInfo : tanksInfo) {
if (tankInfo.fluid == null) continue;
final AEFluidStack aeFluidStack = AEFluidStack.create(fluidStack);
if (aeFluidStack != null) {
final IAEFluidStack notInserted = inv.injectItems(aeFluidStack, Actionable.MODULATE, this.mySrc);
FluidStack fluidStack = new FluidStack(tankInfo.fluid, Math.min(tankInfo.fluid.amount, maxDrain));
fluidStack = fh.drain(this.getSide().getOpposite(), fluidStack, false);
if (this.filterEnabled() && !this.isInFilter(fluidStack)) continue;
if (notInserted != null && notInserted.getStackSize() > 0) {
if (notInserted.getFluidStack().amount == aeFluidStack.getFluidStack().amount) continue;
aeFluidStack.decStackSize(notInserted.getStackSize());
}
final AEFluidStack aeFluidStack = AEFluidStack.create(fluidStack);
if (aeFluidStack != null) {
final IAEFluidStack notInserted = inv.injectItems(aeFluidStack, Actionable.MODULATE, this.mySrc);
if (notInserted != null && notInserted.getStackSize() > 0) {
aeFluidStack.decStackSize(notInserted.getStackSize());
}
FluidStack drained = fh.drain(this.getSide().getOpposite(), aeFluidStack.getFluidStack(), true);
if (drained.amount > 0) {
fh.drain(this.getSide().getOpposite(), aeFluidStack.getFluidStack(), true);
this.itemToSend -= aeFluidStack.getFluidStack().amount;
this.worked = true;
}
maxDrain -= drained.amount;
if (maxDrain <= 0) break;
}
}
return true;
}
@@ -178,6 +174,11 @@ public class PartFluidImportBus extends PartBaseImportBus<IAEFluidStack> {
}
}
@Override
protected int getAdaptorFlags() {
return InventoryAdaptor.ALLOW_FLUIDS | InventoryAdaptor.FOR_EXTRACTS;
}
@Override
public IAEStackType<IAEFluidStack> getStackType() {
return FLUID_STACK_TYPE;
@@ -73,7 +73,7 @@ public class TileCertusQuartzTank extends TileEntity implements IFluidHandler {
FluidStack drainedFluid = this.tank.drain(amount, doDrain);
int drained = drainedFluid != null ? drainedFluid.amount : 0;
if (drained > 0) {
if (doDrain && drained > 0) {
update();
}
@@ -100,7 +100,7 @@ public class TileCertusQuartzTank extends TileEntity implements IFluidHandler {
@Override
public FluidStack drain(ForgeDirection from, int maxDrain, boolean doDrain) {
return drain(null, maxDrain, true, true);
return drain(null, maxDrain, doDrain, true);
}
public int fill(FluidStack fluid, boolean doFill, boolean findMainTank) {
@@ -131,7 +131,7 @@ public class TileCertusQuartzTank extends TileEntity implements IFluidHandler {
int filled = this.tank.fill(fluid, doFill);
if (filled > 0) {
if (doFill && filled > 0) {
update();
}
@@ -168,6 +168,28 @@ public class CommonProxy {
Upgrades.DISTRIBUTION.registerItem(new ItemStack(ItemAndBlockHolder.CELL4096KM), 1);
Upgrades.DISTRIBUTION.registerItem(new ItemStack(ItemAndBlockHolder.CELL16384KM), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_VOID_CELL), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL1K), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL4K), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL16K), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL64K), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL256K), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL1024K), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL4096K), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL16384K), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.QUANTUM_CELL), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.SINGULARITY_CELL), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL1KM), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL4KM), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL16KM), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL64KM), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL256KM), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL1024KM), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL4096KM), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.CELL16384KM), 1);
Upgrades.INVERTER.registerItem(new ItemStack(ItemAndBlockHolder.ARTIFICIAL_UNIVERSE_CELL), 1);
Upgrades.FAKE_CRAFTING.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_INTERFACE), 1);
Upgrades.FAKE_CRAFTING.registerItem(new ItemStack(ItemAndBlockHolder.INTERFACE), 1);
Upgrades.FAKE_CRAFTING.registerItem(new ItemStack(ItemAndBlockHolder.FLUID_INTERFACE_P2P), 1);
@@ -414,12 +414,9 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable
IAEFluidStack remove;
if (doFill) {
remove = fluidGrid.injectItems(AEFluidStack.create(resource), Actionable.MODULATE, this.mySource);
if (remove == null) {
onStackReturnedToNetwork(resource);
} else {
if (remove == null) {} else {
FluidStack copy = resource.copy();
copy.amount -= (int) remove.getStackSize();
onStackReturnedToNetwork(copy);
}
} else {
remove = fluidGrid.injectItems(AEFluidStack.create(resource), Actionable.SIMULATE, this.mySource);
@@ -452,10 +449,6 @@ public class DualityFluidInterface implements IGridTickable, IStorageMonitorable
return this.tanks.getTankInfo(from);
}
private void onStackReturnedToNetwork(FluidStack fluidStack) {
this.iHost.getInterfaceDuality().onStackReturnedToNetwork(ItemFluidDrop.newAeStack(fluidStack));
}
private static class InterfaceInventory extends MEMonitorIFluidHandler {
InterfaceInventory(DualityFluidInterface tileInterface) {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 581 B

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB