public class DeathComponent implements Component
Component for tracking death state. Attach this component to entities that need to track death data.
java.lang.Object > DeathComponent
Field Summary
deathCause
Field deathCause.
deathMessage
Field deathMessage.
showDeathMenu
Field showDeathMenu.
itemsLostOnDeath
Field itemsLostOnDeath.
itemsAmountLossPercentage
Field itemsAmountLossPercentage.
itemsDurabilityLossPercentage
Field itemsDurabilityLossPercentage.
displayDataOnDeathScreen
Field displayDataOnDeathScreen.
deathInfo
Field deathInfo.
itemsLossMode
Field itemsLossMode.
interactionChain
Field interactionChain.
death
Field death.
Method Detail
getComponentType
DeathComponent>
getComponentType
()
Method getComponentType.
isShowDeathMenu
boolean
isShowDeathMenu
()
Method isShowDeathMenu.
setShowDeathMenu
void
setShowDeathMenu
(final boolean showDeathMenu)
Method setShowDeathMenu.
- Parameters:
final booleanshowDeathMenu
getItemsLostOnDeath
ItemStack[]
getItemsLostOnDeath
()
Method getItemsLostOnDeath.
setItemsLostOnDeath
void
setItemsLostOnDeath
(final List itemsLostOnDeath)
Method setItemsLostOnDeath.
- Parameters:
final ListitemsLostOnDeath
getItemsAmountLossPercentage
double
getItemsAmountLossPercentage
()
Method getItemsAmountLossPercentage.
setItemsAmountLossPercentage
void
setItemsAmountLossPercentage
(final double itemsAmountLossPercentage)
Method setItemsAmountLossPercentage.
- Parameters:
final doubleitemsAmountLossPercentage
getItemsDurabilityLossPercentage
double
getItemsDurabilityLossPercentage
()
Method getItemsDurabilityLossPercentage.
setItemsDurabilityLossPercentage
void
setItemsDurabilityLossPercentage
(final double itemsDurabilityLossPercentage)
Method setItemsDurabilityLossPercentage.
- Parameters:
final doubleitemsDurabilityLossPercentage
displayDataOnDeathScreen
boolean
displayDataOnDeathScreen
()
Method displayDataOnDeathScreen.
setDisplayDataOnDeathScreen
void
setDisplayDataOnDeathScreen
(final boolean displayDataOnDeathScreen)
Method setDisplayDataOnDeathScreen.
- Parameters:
final booleandisplayDataOnDeathScreen
getItemsLossMode
DeathConfig.ItemsLossMode
getItemsLossMode
()
Method getItemsLossMode.
setItemsLossMode
void
setItemsLossMode
(final DeathConfig.ItemsLossMode itemsLossMode)
Method setItemsLossMode.
- Parameters:
final DeathConfig.ItemsLossModeitemsLossMode
setInteractionChain
Method setInteractionChain.
- Parameters:
@Nullable final InteractionChaininteractionChain
tryAddComponent
void
tryAddComponent
(@Nonnull final CommandBuffer commandBuffer, @Nonnull final Ref ref, @Nonnull final Damage damage)
Method tryAddComponent.
- Parameters:
@Nonnull final CommandBuffercommandBuffer@Nonnull final Refref@Nonnull final Damagedamage