Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
reobf committed Feb 22, 2025
1 parent 3b571ae commit 22ba3bc
Show file tree
Hide file tree
Showing 10 changed files with 1,032 additions and 1,049 deletions.
3 changes: 2 additions & 1 deletion src/main/java/reobf/proghatches/ae/BlockAutoFillerMKII.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import java.util.HashMap;
import java.util.List;

import net.bdew.ae2stuff.machines.wireless.TileWireless;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
Expand Down Expand Up @@ -41,7 +42,7 @@ public BlockAutoFillerMKII() {

@Override
public TileEntity createNewTileEntity(World worldIn, int meta) {

return new TileAutoFillerMKII();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public void updateEntity() {
job.times = howmany;
}
last = getProxy().getCrafting()
.submitJob(job, this, null, true, source);
.submitJob(job, this, null, false, source);

}
submitfail = last == null;
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/reobf/proghatches/ae/part2/RequestTunnel.java
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ public void jobStateChange(ICraftingLink link) {
Future<ICraftingJob> job;

// @TileEvent(TileEventType.TICK)
public void update() {
@SuppressWarnings("unchecked")
public void update() {
tick++;
if (getWorldObj().isRemote) return;

Expand Down Expand Up @@ -386,6 +387,7 @@ public void update() {
if (last == null) {
if (job == null) {
if (req != null) {
if(cd>=-100)cd--;//5 charges
if (cd-- <= 0) {
job = getProxy().getCrafting()
.beginCraftingJob(
Expand All @@ -394,12 +396,12 @@ public void update() {
new MachineSource(this),
req,
null);
cd = 40;
cd += 20;
}
}
} else if (job.isDone() && !job.isCancelled()) {
last = getProxy().getCrafting()
.submitJob(job.get(), this, null, true, new MachineSource(this));
.submitJob(job.get(), this, null, false, new MachineSource(this));
job = null;
} else if (job.isCancelled()) {
last = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;

import com.google.common.collect.ImmutableMap;
import com.gtnewhorizons.modularui.api.ModularUITextures;
Expand Down Expand Up @@ -346,12 +347,13 @@ public Optional<TileEntity> getTile() {
return Optional.empty();
}
}

ArrayList<ItemStack> arr;
public List<ItemStack> filterTakable(TileEntity e) {
// if (processingRecipe == false) return new ArrayList<ItemStack>();
if (e == null || (e instanceof IInventory == false)) return new ArrayList<ItemStack>();
IInventory inv = (IInventory) e;

ArrayList<ItemStack> arr = new ArrayList<ItemStack>();
if(arr!=null)return arr;
arr = new ArrayList<ItemStack>();
// boolean b=e instanceof ISidedInventory;

int size = inv.getSizeInventory();
Expand Down Expand Up @@ -622,7 +624,7 @@ public CheckRecipeResult endRecipeProcessing(MTEMultiBlockBase controller) {
using.remove(new DimensionalCoord((TileEntity) this.getBaseMetaTileEntity()));
}
processingRecipe = false;
blocked = false;
blocked = false;arr=null;
removePhantom();
return CheckRecipeResultRegistry.SUCCESSFUL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,11 @@ public List<FluidStack> filterTakable(TileEntity e) {
if (processingRecipe == false) return new ArrayList<FluidStack>();

try {
if (tmp != null) endRecipeProcessing(null);
if (tmp != null) {
return (List<FluidStack>) (Object)tmp;
}

//endRecipeProcessing(null);
// this means this method is called twice during recipe check?
// remove consumed fluid
} catch (Exception ex) {
Expand Down
Loading

0 comments on commit 22ba3bc

Please sign in to comment.