Skip to content

Commit

Permalink
- 尝试修复 MixinTileRuneAltar 的一些问题 x2。
Browse files Browse the repository at this point in the history
  • Loading branch information
KasumiNova committed Nov 15, 2024
1 parent 981bf16 commit d02e12f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import github.kasuminova.stellarcore.common.config.StellarCoreConfig;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
Expand All @@ -27,6 +28,9 @@ public abstract class MixinTileRuneAltar extends TileSimpleInventory {
@Shadow(remap = false)
RecipeRuneAltar currentRecipe;

@Shadow
List<ItemStack> lastRecipe;

@Unique
private boolean stellar_core$shouldGetEntities = true;

Expand All @@ -36,7 +40,7 @@ private void injectUpdateRecipe(final CallbackInfo ci) {
return;
}

if (this.currentRecipe == null && isEmpty()) {
if ((this.lastRecipe == null || this.lastRecipe.isEmpty()) && this.currentRecipe == null && isEmpty()) {
ci.cancel();
}
}
Expand Down

0 comments on commit d02e12f

Please sign in to comment.