Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow blaze powder as ingredient #196

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,10 @@ private void tryPushItem(@Nonnull BlockMenu blockMenu) {
}

private void handleFurnace(@Nonnull ItemStack stack, @Nonnull FurnaceInventory furnace) {
if (stack.getType().isFuel()
&& (furnace.getFuel() == null || furnace.getFuel().getType() == Material.AIR)
) {
if (stack.getType().isFuel() && (furnace.getFuel() == null || furnace.getFuel().getType() == Material.AIR)) {
furnace.setFuel(stack.clone());
stack.setAmount(0);
} else if (!stack.getType().isFuel()
&& (furnace.getSmelting() == null || furnace.getSmelting().getType() == Material.AIR)
) {
} else if (!stack.getType().isFuel() && (furnace.getSmelting() == null || furnace.getSmelting().getType() == Material.AIR)) {
furnace.setSmelting(stack.clone());
stack.setAmount(0);
}
Expand All @@ -130,6 +126,9 @@ private void handleBrewingStand(@Nonnull ItemStack stack, @Nonnull BrewerInvento
if (brewer.getFuel() == null || brewer.getFuel().getType() == Material.AIR) {
brewer.setFuel(stack.clone());
stack.setAmount(0);
} else if (brewer.getIngredient() == null || brewer.getIngredient().getType() == Material.AIR) {
brewer.setIngredient(stack.clone());
stack.setAmount(0);
}
} else if (stack.getType() == Material.POTION) {
for (int i = 0; i < 3; i++) {
Expand Down