Skip to content

Commit d02e12f

Browse files
committed
- 尝试修复 MixinTileRuneAltar 的一些问题 x2。
1 parent 981bf16 commit d02e12f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/github/kasuminova/stellarcore/mixin/botania/MixinTileRuneAltar.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

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

31+
@Shadow
32+
List<ItemStack> lastRecipe;
33+
3034
@Unique
3135
private boolean stellar_core$shouldGetEntities = true;
3236

@@ -36,7 +40,7 @@ private void injectUpdateRecipe(final CallbackInfo ci) {
3640
return;
3741
}
3842

39-
if (this.currentRecipe == null && isEmpty()) {
43+
if ((this.lastRecipe == null || this.lastRecipe.isEmpty()) && this.currentRecipe == null && isEmpty()) {
4044
ci.cancel();
4145
}
4246
}

0 commit comments

Comments
 (0)