mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-19 11:49:05 +00:00
1 parent
fd17ded261
commit
54ec75fd3d
11 files changed
+872
-571
No files matched your search
@@ -14,17 +14,17 @@ import stanhebben.zenscript.annotations.ZenOperator;
|
||||
import stanhebben.zenscript.annotations.ZenSetter;
|
||||
|
||||
/**
|
||||
* Contains an item stack. An item stack consists of an item definition,
|
||||
* a meta or damage value and NBT data.
|
||||
* Contains an item stack. An item stack consists of an item definition, a meta
|
||||
* or damage value and NBT data.
|
||||
*
|
||||
* Item stacks can be retrieved using its name (or ID, in 1.6.4) with the bracket
|
||||
* syntax. When using the bracket syntax, by default, the item stack will match
|
||||
* any size when used as ingredient. Item stacks can be multiplied with an integer
|
||||
* to create a stack of different size.
|
||||
* Item stacks can be retrieved using its name (or ID, in 1.6.4) with the
|
||||
* bracket syntax. When using the bracket syntax, by default, the item stack
|
||||
* will match any size when used as ingredient. Item stacks can be multiplied
|
||||
* with an integer to create a stack of different size.
|
||||
*
|
||||
* Item stacks are immutable. You can, however, easily create modified stacks using
|
||||
* the helper methods. Adding conditions and transformations will turn the item
|
||||
* stack into an ingredients.
|
||||
* Item stacks are immutable. You can, however, easily create modified stacks
|
||||
* using the helper methods. Adding conditions and transformations will turn the
|
||||
* item stack into an ingredients.
|
||||
*
|
||||
* @author Stan Hebben
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenGetter("definition")
|
||||
public IItemDefinition getDefinition();
|
||||
|
||||
|
||||
/**
|
||||
* Gets the unlocalized item name.
|
||||
*
|
||||
@@ -45,7 +45,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenGetter("name")
|
||||
public String getName();
|
||||
|
||||
|
||||
/**
|
||||
* Gets the display name. By default, it is the localized item name, but
|
||||
* could also be the display name from NBT data, or another item-specific
|
||||
@@ -55,7 +55,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenGetter("displayName")
|
||||
public String getDisplayName();
|
||||
|
||||
|
||||
/**
|
||||
* Sets the display name. Only works if the name is translatable. Does not
|
||||
* override names set by NBT data or using item-specific logic.
|
||||
@@ -64,15 +64,15 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenSetter("displayName")
|
||||
public void setDisplayName(String name);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Gets the max stack size for an item
|
||||
*
|
||||
* @return int max stack size
|
||||
*/
|
||||
@ZenGetter
|
||||
@ZenGetter("maxStackSize")
|
||||
public int getMaxStackSize();
|
||||
|
||||
/**
|
||||
* Sets the ItemStack max stack size.
|
||||
*
|
||||
@@ -80,7 +80,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenSetter("maxStackSize")
|
||||
public void setMaxStackSize(int size);
|
||||
|
||||
|
||||
/**
|
||||
* Gets the item damage. Returns 0 if the item cannot be damaged.
|
||||
*
|
||||
@@ -88,7 +88,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenGetter("damage")
|
||||
public int getDamage();
|
||||
|
||||
|
||||
/**
|
||||
* Gets the maximum item damage. Returns 0 if the item cannot be damaged.
|
||||
*
|
||||
@@ -96,7 +96,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenGetter("maxDamage")
|
||||
public int getMaxDamage();
|
||||
|
||||
|
||||
/**
|
||||
* Gets the item tag. (NBT data) The resulting data is immutable and can
|
||||
* only be changed with updateTag. Returns empty data if there is no data.
|
||||
@@ -106,17 +106,17 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenGetter("tag")
|
||||
public IData getTag();
|
||||
|
||||
|
||||
/**
|
||||
* Gets the liquid contained in this item, if any. If this item stack is not
|
||||
* an item container, it returns null. Only returns the amount of liquid
|
||||
* in a single item and doesn't into account stack size.
|
||||
* an item container, it returns null. Only returns the amount of liquid in
|
||||
* a single item and doesn't into account stack size.
|
||||
*
|
||||
* @return liquid data
|
||||
*/
|
||||
@ZenGetter("liquid")
|
||||
public ILiquidStack getLiquid();
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new item stack with a different stack size.
|
||||
*
|
||||
@@ -126,7 +126,7 @@ public interface IItemStack extends IIngredient {
|
||||
@ZenOperator(OperatorType.MUL)
|
||||
@ZenMethod
|
||||
public IItemStack amount(int amount);
|
||||
|
||||
|
||||
/**
|
||||
* Creates a weighted item stack with the given percentage chance. Does the
|
||||
* same as item.weight(p * 0.01).
|
||||
@@ -136,7 +136,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenOperator(OperatorType.MOD)
|
||||
public WeightedItemStack percent(float p);
|
||||
|
||||
|
||||
/**
|
||||
* Creates a weighted item stack with the given weight.
|
||||
*
|
||||
@@ -145,7 +145,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenMethod
|
||||
public WeightedItemStack weight(float p);
|
||||
|
||||
|
||||
/**
|
||||
* Creates an item stack with the same item and stack size, but accepting
|
||||
* any damage value. Only useful for items used as ingredients.
|
||||
@@ -154,7 +154,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenMethod
|
||||
public IIngredient anyDamage();
|
||||
|
||||
|
||||
/**
|
||||
* Creates an item stack with the specified damage.
|
||||
*
|
||||
@@ -163,7 +163,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenMethod
|
||||
public IItemStack withDamage(int damage);
|
||||
|
||||
|
||||
/**
|
||||
* Creates an item stack with the specified stack size.
|
||||
*
|
||||
@@ -172,7 +172,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenMethod
|
||||
public IItemStack withAmount(int amount);
|
||||
|
||||
|
||||
/**
|
||||
* Creates an item stack with wildcard stack size.
|
||||
*
|
||||
@@ -180,7 +180,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenMethod
|
||||
public IItemStack anyAmount();
|
||||
|
||||
|
||||
/**
|
||||
* Creates an item stack with the given nbt tag. Ignores existing tags.
|
||||
*
|
||||
@@ -189,7 +189,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenMethod
|
||||
public IItemStack withTag(IData tag);
|
||||
|
||||
|
||||
/**
|
||||
* Creates an item stack with updated nbt tag. Updates existing tags.
|
||||
*
|
||||
@@ -198,7 +198,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenMethod
|
||||
public IItemStack updateTag(IData tagUpdate);
|
||||
|
||||
|
||||
/**
|
||||
* Converts this item stack into a block.
|
||||
*
|
||||
@@ -206,7 +206,7 @@ public interface IItemStack extends IIngredient {
|
||||
*/
|
||||
@ZenCaster
|
||||
public IBlock asBlock();
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves all the ores referring to this item. Includes wildcard ore
|
||||
* entries.
|
||||
|
||||
Reference in new issue
Block a user