Class RewardItem
java.lang.Object
org.cyclops.cyclopscore.infobook.pageelement.RewardItem
- All Implemented Interfaces:
 IReward
An item reward.
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleancanObtain(net.minecraft.world.entity.player.Player player) If the given player in its current state is able to obtain this reward.createButton(IInfoBook infoBook) voiddrawElementInner(ScreenInfoBook gui, net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height, int page, int mx, int my, AdvancedButton button) Draw the reward.intintgetWidth()voidobtain(net.minecraft.world.entity.player.Player player) The logic for obtaining this reward. 
- 
Field Details
- 
SLOT_SIZE
protected static final int SLOT_SIZE- See Also:
 
 
 - 
 - 
Constructor Details
- 
RewardItem
public RewardItem(net.minecraft.world.item.ItemStack itemStack)  
 - 
 - 
Method Details
- 
canObtain
public boolean canObtain(net.minecraft.world.entity.player.Player player) Description copied from interface:IRewardIf the given player in its current state is able to obtain this reward. - 
obtain
public void obtain(net.minecraft.world.entity.player.Player player) Description copied from interface:IRewardThe logic for obtaining this reward. Will only be called server-side. - 
getWidth
public int getWidth() - 
getHeight
public int getHeight() - 
createButton
- Specified by:
 createButtonin interfaceIReward- Parameters:
 infoBook- The infobook instance.- Returns:
 - Factory for a button for this reward.
 
 - 
drawElementInner
public void drawElementInner(ScreenInfoBook gui, net.minecraft.client.gui.GuiGraphics guiGraphics, int x, int y, int width, int height, int page, int mx, int my, AdvancedButton button) Description copied from interface:IRewardDraw the reward.- Specified by:
 drawElementInnerin interfaceIReward- Parameters:
 gui- The gui.guiGraphics- The gui graphics object.x- Start X.y- Start Y.width- Max width.height- Max height.page- Current page.mx- Mouse X.my- Mouse Y.button- The button of this reward.
 
 -