Skip to content

Commit

Permalink
small-patch
Browse files Browse the repository at this point in the history
  • Loading branch information
MegumiKasuga committed Oct 3, 2024
1 parent bb74237 commit 769724f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import net.minecraft.world.item.BlockItem;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.Block;

import javax.annotation.Nonnull;
Expand Down Expand Up @@ -33,7 +34,7 @@ public boolean hasCraftingRemainingItem(ItemStack stack) {
@Override
public ItemStack getCraftingRemainingItem(ItemStack itemStack) {
ItemStack remain = super.getCraftingRemainingItem(itemStack);
if (remain == ItemStack.EMPTY && craftingRemainder.get() != null) {
if ((remain == ItemStack.EMPTY || remain.is(Items.AIR)) && craftingRemainder.get() != null) {
remain = craftingRemainder.get().getDefaultInstance();
}
return remain;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;

import javax.annotation.Nonnull;
import java.util.function.Supplier;
Expand Down Expand Up @@ -31,7 +32,7 @@ public boolean hasCraftingRemainingItem(ItemStack stack) {
@Override
public ItemStack getCraftingRemainingItem(ItemStack itemStack) {
ItemStack remain = super.getCraftingRemainingItem(itemStack);
if (remain == ItemStack.EMPTY && craftingRemainder.get() != null) {
if ((remain == ItemStack.EMPTY || remain.is(Items.AIR)) && craftingRemainder.get() != null) {
remain = craftingRemainder.get().getDefaultInstance();
}
return remain;
Expand Down

0 comments on commit 769724f

Please sign in to comment.