Package net.mcreator.element.parts.gui
Class Slot
java.lang.Object
net.mcreator.element.parts.gui.GUIComponent
net.mcreator.element.parts.gui.Slot
- All Implemented Interfaces:
Comparable<GUIComponent>
- Direct Known Subclasses:
InputSlot,OutputSlot
-
Nested Class Summary
Nested classes/interfaces inherited from class net.mcreator.element.parts.gui.GUIComponent
GUIComponent.AnchorPoint, GUIComponent.GSONAdapter, GUIComponent.Unknown -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanintFields inherited from class net.mcreator.element.parts.gui.GUIComponent
anchorPoint, locked, uuid, x, y -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intintReturns the priority for when this component should be drawn in the UI, to represent how Minecraft draws components in the game.final intvoidpaintComponent(int cx, int cy, WYSIWYGEditor wysiwygEditor, Graphics2D g) Methods inherited from class net.mcreator.element.parts.gui.GUIComponent
compareTo, equals, getAnchorPoint, getName, getX, getY, gx, gy, hashCode, isSizeKnown, registerCustomComponent, toString
-
Field Details
-
color
-
id
public int id -
disablePickup
-
dropItemsWhenNotBound
public boolean dropItemsWhenNotBound -
onSlotChanged
-
onTakenFromSlot
-
onStackTransfer
-
-
Constructor Details
-
Slot
public Slot(int id, int x, int y, Color color, LogicProcedure disablePickup, boolean dropItemsWhenNotBound, Procedure onSlotChanged, Procedure onTakenFromSlot, Procedure onStackTransfer)
-
-
Method Details
-
getWeight
public int getWeight()Description copied from class:GUIComponentReturns the priority for when this component should be drawn in the UI, to represent how Minecraft draws components in the game.- Specified by:
getWeightin classGUIComponent- Returns:
- The priority of the component (lower means it will be rendered closer to the screen and higher means it will "sink" more behind other components)
-
getWidth
- Specified by:
getWidthin classGUIComponent
-
getHeight
- Specified by:
getHeightin classGUIComponent
-
paintComponent
- Specified by:
paintComponentin classGUIComponent
-