-
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wip: Continue port to Minecraft 1.21.2
- Loading branch information
1 parent
fa33d40
commit 20992da
Showing
3 changed files
with
21 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 6 additions & 3 deletions
9
common/src/main/java/net/blay09/mods/cookingforblockheads/menu/slot/SlotOvenFuel.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,22 @@ | ||
package net.blay09.mods.cookingforblockheads.menu.slot; | ||
|
||
import net.blay09.mods.cookingforblockheads.block.entity.OvenBlockEntity; | ||
import net.blay09.mods.cookingforblockheads.menu.OvenMenu; | ||
import net.minecraft.world.Container; | ||
import net.minecraft.world.inventory.Slot; | ||
import net.minecraft.world.item.ItemStack; | ||
|
||
public class SlotOvenFuel extends Slot { | ||
|
||
public SlotOvenFuel(Container container, int i, int x, int y) { | ||
private final OvenMenu menu; | ||
|
||
public SlotOvenFuel(OvenMenu menu, Container container, int i, int x, int y) { | ||
super(container, i, x, y); | ||
this.menu = menu; | ||
} | ||
|
||
@Override | ||
public boolean mayPlace(ItemStack itemStack) { | ||
return OvenBlockEntity.isItemFuel(itemStack); | ||
return menu.isFuel(itemStack); | ||
} | ||
|
||
} |