mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-21 20:52:22 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e5964f67aa | ||
|
|
1f251703aa | ||
|
|
65f1627a97 | ||
|
|
dde6c79f9e |
No files matched your search
+4
-4
@@ -1,12 +1,12 @@
|
|||||||
// Add your dependencies here
|
// Add your dependencies here
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
api('com.github.GTNewHorizons:ForestryMC:4.10.17:dev')
|
api('com.github.GTNewHorizons:ForestryMC:4.11.2:dev')
|
||||||
implementation('com.github.GTNewHorizons:GTNHLib:0.7.0:dev')
|
implementation('com.github.GTNewHorizons:GTNHLib:0.8.25:dev')
|
||||||
|
|
||||||
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.0-GTNH:dev')
|
devOnlyNonPublishable('com.github.GTNewHorizons:NotEnoughItems:2.8.40-GTNH:dev')
|
||||||
|
|
||||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.44:api')
|
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.47:api')
|
||||||
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||||
compileOnly("curse.maven:extrabiomesxl-60041:2273301")
|
compileOnly("curse.maven:extrabiomesxl-60041:2273301")
|
||||||
}
|
}
|
||||||
+9
-1
@@ -96,7 +96,9 @@ usesMixinDebug = false
|
|||||||
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||||
mixinPlugin =
|
mixinPlugin =
|
||||||
|
|
||||||
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
|
# Specify the package that contains all of your Mixins. The package must exist or
|
||||||
|
# the build will fail. If you have a package property defined in your mixins.<modid>.json,
|
||||||
|
# it must match with this or the build will fail.
|
||||||
mixinsPackage =
|
mixinsPackage =
|
||||||
|
|
||||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||||
@@ -172,6 +174,12 @@ curseForgeRelations =
|
|||||||
# projects. New projects should not use this parameter.
|
# projects. New projects should not use this parameter.
|
||||||
customArchiveBaseName = binnie-mods
|
customArchiveBaseName = binnie-mods
|
||||||
|
|
||||||
|
# Optional parameter to customize the default working directory used by the runClient* tasks. Relative to the project directory.
|
||||||
|
# runClientWorkingDirectory = run/client
|
||||||
|
|
||||||
|
# Optional parameter to customize the default working directory used by the runServer* tasks. Relative to the project directory.
|
||||||
|
# runServerWorkingDirectory = run/server
|
||||||
|
|
||||||
# Optional parameter to have the build automatically fail if an illegal version is used.
|
# Optional parameter to have the build automatically fail if an illegal version is used.
|
||||||
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
|
# This can be useful if you e.g. only want to allow versions in the form of '1.1.xxx'.
|
||||||
# The check is ONLY performed if the version is a git tag.
|
# The check is ONLY performed if the version is a git tag.
|
||||||
|
|||||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ case "$( uname )" in #(
|
|||||||
NONSTOP* ) nonstop=true ;;
|
NONSTOP* ) nonstop=true ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH="\\\"\\\""
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
@@ -213,7 +213,7 @@ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
|||||||
set -- \
|
set -- \
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
-classpath "$CLASSPATH" \
|
-classpath "$CLASSPATH" \
|
||||||
org.gradle.wrapper.GradleWrapperMain \
|
-jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \
|
||||||
"$@"
|
"$@"
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
# Stop when "xargs" is not available.
|
||||||
|
|||||||
Vendored
+2
-2
@@ -70,11 +70,11 @@ goto fail
|
|||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
"%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" %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
|
|||||||
+1
-1
@@ -17,5 +17,5 @@ pluginManagement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.43'
|
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.48'
|
||||||
}
|
}
|
||||||
@@ -9,4 +9,11 @@ public interface IProcess extends IErrorStateSource {
|
|||||||
boolean isInProgress();
|
boolean isInProgress();
|
||||||
|
|
||||||
ProcessInfo getInfo();
|
ProcessInfo getInfo();
|
||||||
|
|
||||||
|
/***
|
||||||
|
* Returns true if the current target got worked on at least once.
|
||||||
|
*/
|
||||||
|
default boolean workedOnTarget() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -19,6 +19,10 @@ import forestry.api.genetics.IIndividual;
|
|||||||
|
|
||||||
public class SplicerComponentLogic extends ComponentProcessSetCost implements IProcess {
|
public class SplicerComponentLogic extends ComponentProcessSetCost implements IProcess {
|
||||||
|
|
||||||
|
// Needed to keep stack. If user takes out target slot and it gets automatically refilled, this happens in the same
|
||||||
|
// tick
|
||||||
|
private ItemStack workedOnStack = null;
|
||||||
|
|
||||||
public int nOfGenes;
|
public int nOfGenes;
|
||||||
|
|
||||||
public SplicerComponentLogic(Machine machine) {
|
public SplicerComponentLogic(Machine machine) {
|
||||||
@@ -50,6 +54,11 @@ public class SplicerComponentLogic extends ComponentProcessSetCost implements IP
|
|||||||
public void onInventoryUpdate() {
|
public void onInventoryUpdate() {
|
||||||
super.onInventoryUpdate();
|
super.onInventoryUpdate();
|
||||||
nOfGenes = getGenesToUse();
|
nOfGenes = getGenesToUse();
|
||||||
|
ItemStack newTarget = getUtil().getStack(Splicer.SLOT_TARGET);
|
||||||
|
|
||||||
|
if (newTarget == null || !ItemStack.areItemStacksEqual(workedOnStack, newTarget)) {
|
||||||
|
workedOnStack = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int getGenesToUse() {
|
protected int getGenesToUse() {
|
||||||
@@ -190,5 +199,31 @@ public class SplicerComponentLogic extends ComponentProcessSetCost implements IP
|
|||||||
Splicer.setGene(gene, target, 1);
|
Splicer.setGene(gene, target, 1);
|
||||||
}
|
}
|
||||||
getUtil().damageItem(Splicer.SLOT_SERUM_VIAL, 1);
|
getUtil().damageItem(Splicer.SLOT_SERUM_VIAL, 1);
|
||||||
|
workedOnStack = getUtil().getStack(Splicer.SLOT_TARGET).copy();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean workedOnTarget() {
|
||||||
|
return ItemStack.areItemStacksEqual(workedOnStack, getUtil().getStack(Splicer.SLOT_TARGET));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readFromNBT(NBTTagCompound nbt) {
|
||||||
|
super.readFromNBT(nbt);
|
||||||
|
NBTTagCompound tagWorkedOnStack = (NBTTagCompound) nbt.getTag("workedOnStack");
|
||||||
|
if (tagWorkedOnStack != null) {
|
||||||
|
workedOnStack = ItemStack.loadItemStackFromNBT(tagWorkedOnStack);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToNBT(NBTTagCompound nbt) {
|
||||||
|
super.writeToNBT(nbt);
|
||||||
|
if (workedOnStack != null) {
|
||||||
|
NBTTagCompound tagWorkedOnStack = new NBTTagCompound();
|
||||||
|
workedOnStack.writeToNBT(tagWorkedOnStack);
|
||||||
|
// Need to save, in case inventory is full it might need to get moved out way later.
|
||||||
|
nbt.setTag("workedOnStack", tagWorkedOnStack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,7 @@ package binnie.genetics.machine.splicer;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import binnie.core.craftgui.minecraft.IMachineInformation;
|
import binnie.core.craftgui.minecraft.IMachineInformation;
|
||||||
|
import binnie.core.machines.IMachine;
|
||||||
import binnie.core.machines.Machine;
|
import binnie.core.machines.Machine;
|
||||||
import binnie.core.machines.inventory.ComponentInventorySlots;
|
import binnie.core.machines.inventory.ComponentInventorySlots;
|
||||||
import binnie.core.machines.inventory.ComponentInventoryTransfer;
|
import binnie.core.machines.inventory.ComponentInventoryTransfer;
|
||||||
@@ -79,8 +80,20 @@ public class SplicerPackage extends AdvGeneticMachine.PackageAdvGeneticBase impl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean fufilled(ItemStack stack) {
|
public boolean fufilled(ItemStack stack) {
|
||||||
return stack != null && transfer.getMachine().getMachineUtil().getStack(Splicer.SLOT_SERUM_VIAL) != null
|
if (stack == null) {
|
||||||
&& transfer.getMachine().getInterface(SplicerComponentLogic.class).isValidSerum() != null;
|
return false;
|
||||||
|
}
|
||||||
|
IMachine machine = transfer.getMachine();
|
||||||
|
boolean hasSerum = machine.getMachineUtil().getStack(Splicer.SLOT_SERUM_VIAL) != null;
|
||||||
|
|
||||||
|
if (hasSerum) {
|
||||||
|
// Move item if it can't be processed anymore with current serum.
|
||||||
|
boolean validSerum = machine.getInterface(SplicerComponentLogic.class).isValidSerum() == null;
|
||||||
|
return !validSerum;
|
||||||
|
} else {
|
||||||
|
// Move item if there is no serum and item got processed already
|
||||||
|
return machine.getMachineUtil().getProcess().workedOnTarget();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user