DisplayInfo
Link to displayinfo
Importing the class
Link to importing-the-class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
ZenScript Copyimport crafttweaker.api.advancement.DisplayInfo;
Methods
Link to methods
Name: getBackground
Return Type: ResourceLocation?
ZenScript Copy// DisplayInfo.getBackground() as ResourceLocation?
myDisplayInfo.getBackground();
Name: getDescription
Return Type: Component
ZenScript Copy// DisplayInfo.getDescription() as Component
myDisplayInfo.getDescription();
Name: getFrame
Return Type: FrameType
ZenScript Copy// DisplayInfo.getFrame() as FrameType
myDisplayInfo.getFrame();
Name: getIcon
Return Type: ItemStack
ZenScript Copy// DisplayInfo.getIcon() as ItemStack
myDisplayInfo.getIcon();
Name: getTitle
Return Type: Component
ZenScript Copy// DisplayInfo.getTitle() as Component
myDisplayInfo.getTitle();
Name: getX
Return Type: float
ZenScript Copy// DisplayInfo.getX() as float
myDisplayInfo.getX();
Name: getY
Return Type: float
ZenScript Copy// DisplayInfo.getY() as float
myDisplayInfo.getY();
Name: isHidden
Return Type: boolean
ZenScript Copy// DisplayInfo.isHidden() as boolean
myDisplayInfo.isHidden();
Name: setLocation
ZenScript CopyDisplayInfo.setLocation(x as float, y as float)
Parameter | Type |
---|---|
Parameter x | Type float |
Parameter y | Type float |
Name: shouldAnnounceChat
Return Type: boolean
ZenScript Copy// DisplayInfo.shouldAnnounceChat() as boolean
myDisplayInfo.shouldAnnounceChat();
Name: shouldShowToast
Return Type: boolean
ZenScript Copy// DisplayInfo.shouldShowToast() as boolean
myDisplayInfo.shouldShowToast();
Properties
Link to properties
名称 | Type | Has Getter | Has Setter |
---|---|---|---|
名称 background | Type ResourceLocation? | Has Getter true | Has Setter false |
名称 description | Type Component | Has Getter true | Has Setter false |
名称 frame | Type FrameType | Has Getter true | Has Setter false |
名称 icon | Type ItemStack | Has Getter true | Has Setter false |
名称 isHidden | Type boolean型 | Has Getter true | Has Setter false |
名称 shouldAnnounceChat | Type boolean型 | Has Getter true | Has Setter false |
名称 shouldShowToast | Type boolean型 | Has Getter true | Has Setter false |
名称 title | Type Component | Has Getter true | Has Setter false |
名称 x | Type float | Has Getter true | Has Setter false |
名称 y | Type float | Has Getter true | Has Setter false |