Skip to content

Commit

Permalink
feat: ok I guess I can make it turn on automatically
Browse files Browse the repository at this point in the history
Technically, I already am limiting the number of clog-checks, so I might as well do this.
  • Loading branch information
bruberu committed Jan 12, 2025
1 parent 1841b5d commit 3c4aab1
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,10 @@ public void update() {
getWorld().playSound(null, getPos(), SoundEvents.ENTITY_GENERIC_BURN, SoundCategory.BLOCKS, 1.0F, 1.0F);
}
}

if (isWorkingEnabled && !this.getWorld().isRemote && (hasItems || this.notifiedItemInputList != null)) {
if (this.getOffsetTimer() % 40 == 0) {
checkClogged();
}

if (!this.getWorld().isRemote && this.getOffsetTimer() % 40 == 0) {
checkClogged();
}
if (!isClogged && isWorkingEnabled && !this.getWorld().isRemote && (hasItems || this.notifiedItemInputList != null)) {
this.hasItems = true;
int startSlot = GTFOUtils.getFirstUnemptyItemSlot(this.importItems, 0);
if (startSlot == -1) {
Expand All @@ -121,8 +119,8 @@ public void checkClogged() {
for (BlockPos pos : BlockPos.getAllInBox(getPos().up(1), getPos().up(8))) {
IBlockState state = getWorld().getBlockState(pos);
if (!state.getBlock().isAir(state, getWorld(), pos)) {
setWorkingEnabled(false);
setClogged(true);
progress = 0;
return;
}
}
Expand Down

0 comments on commit 3c4aab1

Please sign in to comment.