Package com.prineside.tdi2.events.game
Class MinerMineItem
java.lang.Object
com.prineside.tdi2.events.StoppableEvent
com.prineside.tdi2.events.game.MinerMineItem
- All Implemented Interfaces:
Event
Called each time a miner mines an item, even if the item won't be added (in which case the event
will be cancelled from the beginning)
Listeners can call S.loot.getOrCreateSourceMinedItems() and modify the miner's inventory directly.
(B) Triggered by LootSystem before the item addition
If cancelled, item won't be added to the issued items / shown on the UI etc
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetMiner()
float
float
boolean
boolean
boolean
boolean
reset()
setAddAndShowActualLoot
(boolean addAndShowActualLoot) setAddToEmptyItemSlot
(boolean addToEmptyItemSlot) setCancelled
(boolean cancelled) setCountTowardsInventoryStatistics
(boolean countTowardsInventoryStatistics) setItemStack
(ItemStack itemStack) setQuality
(float quality) setRarity
(RarityType rarity) setRarityQuality
(float rarityQuality) setResourceType
(ResourceType resourceType) setup
(Miner miner, ResourceType resourceType, ItemStack itemStack, float quality, RarityType rarity, float rarityQuality) Methods inherited from class com.prineside.tdi2.events.StoppableEvent
isStopped, stop
-
Constructor Details
-
MinerMineItem
public MinerMineItem()
-
-
Method Details
-
setup
public MinerMineItem setup(Miner miner, ResourceType resourceType, ItemStack itemStack, float quality, RarityType rarity, float rarityQuality) -
reset
-
getMiner
-
setMiner
-
getResourceType
-
setResourceType
-
getItemStack
-
setItemStack
-
getQuality
public float getQuality() -
setQuality
-
getRarity
-
setRarity
-
getRarityQuality
public float getRarityQuality() -
setRarityQuality
-
isCountTowardsInventoryStatistics
public boolean isCountTowardsInventoryStatistics() -
setCountTowardsInventoryStatistics
-
isAddAndShowActualLoot
public boolean isAddAndShowActualLoot() -
setAddAndShowActualLoot
-
isAddToEmptyItemSlot
public boolean isAddToEmptyItemSlot() -
setAddToEmptyItemSlot
-
isCancelled
public boolean isCancelled() -
setCancelled
-