mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-26 14:53:03 +00:00
- transformReplace() now gives the replacement item in the player inventory if it is part of a stack (instead of modifying the whole stack)
- Added noReturn() transformation to avoid any item from being returned. Suppressed programmed vanilla/mod behaviour to, for example, give a bucket back. - Added giveBack() and giveBack(item) transformation to return the item, or a replacement item, back into the inventory instead of the crafting table. Fixes fighting between transformations and default mod/vanilla behavior. - Fixed asterisks in multiline comments breaking script parsing. - Fixed removeShaped function not working properly if no ingredients are given - Fixed addAll for oredict entries in 1.7.10
This commit is contained in:
1 parent
56b8c9355c
commit
25b9589af7
34 files changed
+163
-59
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package minetweaker.api.item;
|
||||
|
||||
import java.util.List;
|
||||
import minetweaker.api.player.IPlayer;
|
||||
import stanhebben.zenscript.annotations.OperatorType;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenGetter;
|
||||
@@ -118,13 +119,14 @@ public interface IIngredient {
|
||||
public boolean contains(IIngredient ingredient);
|
||||
|
||||
/**
|
||||
* Applies transformations, if any, to the given item.
|
||||
* Applies transformations after crafting, if any, to the given item.
|
||||
*
|
||||
* @param item item to transform
|
||||
* @param byPlayer player performing the crafting operation
|
||||
* @return transformed item
|
||||
*/
|
||||
@ZenMethod
|
||||
public IItemStack applyTransform(IItemStack item);
|
||||
public IItemStack applyTransform(IItemStack item, IPlayer byPlayer);
|
||||
|
||||
/**
|
||||
* Checks if this ingredient has (or could have) any transformatiosns.
|
||||
|
||||
Reference in new issue
Block a user