BracketHandlers
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.
Description
This class contains the "simple" Bracket handlers from CraftTweaker. However, some Bracket handlers, like for recipeTypes, tags, tagManagers, won't be shown here as they use a different internal structure.Members
Parameters:
tokens: string
Type: string
Return Type:
Attribute
Returns: The found banner pattern
Parameters:
tokens: string
Type: string
- The banner pattern's resource location
Return Type:
BannerPattern
null
if it cannot find the block, ignored invalid variantsReturns: The found BlockState
Parameters:
tokens: string
Type: string
- The block's resource location and variants
Return Type:
BlockState
Returns: The found data component type
Parameters:
tokens: string
Type: string
- The data component type's resource location
Return Type:
DataComponentType<T>
Returns: The found enchantment
Parameters:
tokens: string
Type: string
- The enchantment's registry name
Return Type:
Enchantment
Returns: The found entityType
Parameters:
tokens: string
Type: string
- The entityType's resource location
Return Type:
EntityType<Entity>
Returns: A stack of the liquid with amount == 1mb
Parameters:
tokens: string
Type: string
- The Fluid's resource location
Return Type:
IFluidStack
Returns: The found instrument
Parameters:
tokens: string
Type: string
- The instrument's resource location
Return Type:
Instrument
Returns: The found item
Parameters:
tokens: string
Type: string
- The item's resource location
Return Type:
IItemStack
Returns: The found mobeffect
Parameters:
tokens: string
Type: string
- The mobeffect's resource location
Return Type:
MobEffect
Parameters:
tokens: string
Type: string
Return Type:
Potion
Returns: The found profession
Parameters:
tokens: string
Type: string
- The profession's resource location
Return Type:
VillagerProfession
This will always return IRecipeManager.
There is also a BEP for that but that works differently so it can't be automatically added to the docs here. But the BEP looks the same as the other ones: <recipetype:minecraft:crafting>
Returns: The found recipeManager
Parameters:
tokens: string
Type: string
- The recipeManager's resource location
Return Type:
IRecipeManager<?>
Returns: The found sound event
Parameters:
tokens: string
Type: string
- The sound event's resource location
Return Type:
SoundEvent
ITargetingStrategy
based on its name.Throws an exception if the strategy doesn't exist.
Returns: The found targeting strategy
Parameters:
tokens: string
Type: string
- The strategy's resource location
Return Type:
ITargetingStrategy
Returns: The found trim material
Parameters:
tokens: string
Type: string
- The trim material's resource location
Return Type:
TrimMaterial
Returns: The found trim pattern
Parameters:
tokens: string
Type: string
- The trim pattern's resource location
Return Type:
TrimPattern
Returns: The found profession
Parameters:
tokens: string
Type: string
- The profession's resource location
Return Type:
VillagerType