mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-15 01:25:13 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9549d9385c | ||
|
|
d44c6bb7c7 |
No files matched your search
+8
-8
@@ -1,14 +1,14 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
api('com.github.GTNewHorizons:EnderCore:0.5.14:dev') {transitive = false}
|
||||
api('com.github.GTNewHorizons:EnderCore:0.5.15:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:ForestryMC:4.11.37:dev')
|
||||
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.8.129-GTNH:dev')
|
||||
api("com.github.GTNewHorizons:GTNHLib:0.11.44:dev")
|
||||
compileOnly('com.github.GTNewHorizons:NotEnoughItems:2.8.130-GTNH:dev')
|
||||
api("com.github.GTNewHorizons:GTNHLib:0.11.45:dev")
|
||||
compileOnly('com.github.GTNewHorizons:BuildCraft:7.1.63:dev')
|
||||
api('curse.maven:cofh-lib-220333:2388748') // https://www.curseforge.com/minecraft/mc-mods/cofh-lib/files/2388748
|
||||
shadowImplementation('cglib:cglib-nodep:3.3.0')
|
||||
api("com.github.GTNewHorizons:TinkersConstruct:1.14.106-GTNH:dev")
|
||||
api("com.github.GTNewHorizons:TinkersConstruct:1.14.107-GTNH:dev")
|
||||
|
||||
devOnlyNonPublishable('com.github.GTNewHorizons:waila:1.19.34:dev') {transitive = false}
|
||||
compileOnly('ganymedes01.etfuturum:Et-Futurum-Requiem:2.6.48-GTNH:dev') {transitive = false}
|
||||
@@ -16,12 +16,12 @@ dependencies {
|
||||
compileOnly("com.github.GTNewHorizons:Backhand:1.8.14:dev") { transitive = false }
|
||||
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-999-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.22-GTNH:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.54.122:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:GT5-Unofficial:5.09.54.129:dev') {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:ModularUI2:2.3.88-1.7.10:dev") {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Railcraft:9.17.31:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:StorageDrawers:2.2.29-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:Chisel:2.17.32-GTNH:dev') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.59-GTNH:api') {transitive = false}
|
||||
compileOnly('com.github.GTNewHorizons:OpenComputers:1.12.61-GTNH:api') {transitive = false}
|
||||
compileOnly('curse.maven:minefactory-reloaded-66672:2366150') // https://www.curseforge.com/minecraft/mc-mods/minefactory-reloaded/files/2366150
|
||||
compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev')
|
||||
compileOnly('curse.maven:ee3-65509:2305023') // https://www.curseforge.com/minecraft/mc-mods/ee3/files/2305023
|
||||
@@ -29,7 +29,7 @@ dependencies {
|
||||
compileOnly(rfg.deobf('curse.maven:mekanism-268560:2475797')) // https://www.curseforge.com/minecraft/mc-mods/mekanism/files/2475797
|
||||
compileOnly(rfg.deobf('maven.modrinth:immibis-microblocks:59.1.2')) // https://modrinth.com/mod/immibis-microblocks/version/59.1.2
|
||||
|
||||
compileOnlyApi('com.github.GTNewHorizons:Angelica:2.2.8:api') {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.7.194:dev")
|
||||
compileOnlyApi('com.github.GTNewHorizons:Angelica:2.2.10:api') {transitive = false}
|
||||
compileOnly("com.github.GTNewHorizons:Hodgepodge:2.7.196:dev")
|
||||
compileOnly('curse.maven:automagy-222153:2285272')
|
||||
}
|
||||
@@ -152,8 +152,9 @@ public class CrusherRecipeManager {
|
||||
if (input == null) {
|
||||
return null;
|
||||
}
|
||||
MachineRecipeInput[] machineInputs = { new MachineRecipeInput(0, input) };
|
||||
for (Recipe recipe : recipes) {
|
||||
if (recipe.isInputForRecipe(new MachineRecipeInput(0, input))) {
|
||||
if (recipe.isInputForRecipe(machineInputs)) {
|
||||
return recipe;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,38 +38,46 @@ public class Recipe implements IRecipe {
|
||||
return false;
|
||||
}
|
||||
|
||||
List<RecipeInput> requiredInputs = new ArrayList<>();
|
||||
for (RecipeInput input : inputs) {
|
||||
if (input.getFluidInput() != null || input.getInput() != null) {
|
||||
requiredInputs.add(input.copy());
|
||||
int[] remaining = new int[inputs.length];
|
||||
for (int i = 0; i < inputs.length; i++) {
|
||||
RecipeInput input = inputs[i];
|
||||
if (input.isFluid()) {
|
||||
remaining[i] = input.getFluidInput().amount;
|
||||
} else if (input.getInput() != null) {
|
||||
remaining[i] = input.getInput().stackSize;
|
||||
}
|
||||
}
|
||||
|
||||
for (MachineRecipeInput input : machineInputs) {
|
||||
if (input != null && (input.fluid != null || input.item != null)) {
|
||||
RecipeInput required = null;
|
||||
for (int i = 0; i < requiredInputs.size() && required == null; i++) {
|
||||
RecipeInput tst = requiredInputs.get(i);
|
||||
if ((tst.isInput(input.item) && tst.getInput().stackSize > 0) || tst.isInput(input.fluid)) {
|
||||
required = tst;
|
||||
}
|
||||
for (MachineRecipeInput machineInput : machineInputs) {
|
||||
if (machineInput == null || (machineInput.item == null && machineInput.fluid == null)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
int matchedInput = -1;
|
||||
for (int i = 0; i < inputs.length; i++) {
|
||||
if (remaining[i] <= 0) {
|
||||
continue;
|
||||
}
|
||||
if (required == null) {
|
||||
return false;
|
||||
}
|
||||
// reduce the required input quantity by the available amount
|
||||
if (input.isFluid()) {
|
||||
required.getFluidInput().amount -= input.fluid.amount;
|
||||
} else {
|
||||
required.getInput().stackSize -= input.item.stackSize;
|
||||
|
||||
RecipeInput required = inputs[i];
|
||||
boolean matches = machineInput.isFluid() ? required.isInput(machineInput.fluid)
|
||||
: required.isInput(machineInput.item);
|
||||
|
||||
if (matches) {
|
||||
matchedInput = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (RecipeInput required : requiredInputs) {
|
||||
if (required.isFluid() && required.getFluidInput().amount > 0) {
|
||||
if (matchedInput < 0) {
|
||||
return false;
|
||||
} else if (!required.isFluid() && required.getInput().stackSize > 0) {
|
||||
}
|
||||
|
||||
remaining[matchedInput] -= machineInput.isFluid() ? machineInput.fluid.amount : machineInput.item.stackSize;
|
||||
}
|
||||
|
||||
for (int amount : remaining) {
|
||||
if (amount > 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user