Home Commands Examples Getting Started With Scripts Global Keywords
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

Percentaged

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.util.random.Percentaged;

Description

Used to represent data with an attached percentage (think an ItemStack with a 50% chance of being outputted).

Implements

Percentaged<T> implements the following interfaces:

CommandStringDisplayable

Members

Getter
script.zs
// Percentaged<T>.data as T
myPercentaged.data

Return Type: T

data() as T
script.zs
// Percentaged<T>.data() as T;
myPercentaged.data();

Return Type: T

Getter
script.zs
// Percentaged<T>.percentage as double
myPercentaged.percentage

Return Type: double

percentage() as double
script.zs
// Percentaged<T>.percentage() as double;
myPercentaged.percentage();

Return Type: double