-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added recipe.consumeIngredient(filter) method for when you want to ma…
…ke sure item gets destroyed when normally it wouldn't, like water bucket -> bucket now can be water bucket -> air
- Loading branch information
1 parent
c427dbc
commit c31bcda
Showing
3 changed files
with
22 additions
and
0 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
16 changes: 16 additions & 0 deletions
16
common/src/main/java/dev/latvian/mods/kubejs/recipe/ingredientaction/ConsumeAction.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package dev.latvian.mods.kubejs.recipe.ingredientaction; | ||
|
||
import net.minecraft.world.inventory.CraftingContainer; | ||
import net.minecraft.world.item.ItemStack; | ||
|
||
public class ConsumeAction extends IngredientAction { | ||
@Override | ||
public ItemStack transform(ItemStack old, int index, CraftingContainer container) { | ||
return ItemStack.EMPTY; | ||
} | ||
|
||
@Override | ||
public String getType() { | ||
return "consume"; | ||
} | ||
} |
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