public class ReachDistanceHandler extends BaseArmorUpgradeHandler<IArmorExtensionData>
| Modifier and Type | Field and Description |
|---|---|
static net.minecraft.entity.ai.attributes.AttributeModifier |
REACH_DIST_BOOST |
UPGRADE_PREFIX| Constructor and Description |
|---|
ReachDistanceHandler() |
| Modifier and Type | Method and Description |
|---|---|
net.minecraft.inventory.EquipmentSlotType |
getEquipmentSlot()
Get the armor slot that this upgrade handler is attached to.
|
net.minecraft.util.ResourceLocation |
getID()
Get a unique ID for this upgrade handler.
|
float |
getIdleAirUsage(ICommonArmorHandler armorHandler)
Returns the usage in mL/tick when this upgrade handler is enabled.
|
EnumUpgrade[] |
getRequiredUpgrades()
Return the upgrades that are required to be in the armor piece to enable this module.
|
void |
onToggle(ICommonArmorHandler commonArmorHandler,
boolean newState)
Called when an upgrade is toggle on/off by the player
|
void |
tick(ICommonArmorHandler commonArmorHandler,
boolean enabled)
Called every tick for a player when this upgrade is installed in their armor
|
getIndex, setIndexclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitextensionData, getMaxInstallableUpgrades, getMinimumPressure, getStringKey, getTranslationKey, onDataFieldUpdated, onInit, onShutdownpublic static final net.minecraft.entity.ai.attributes.AttributeModifier REACH_DIST_BOOST
public net.minecraft.util.ResourceLocation getID()
IArmorUpgradeHandlerpublic EnumUpgrade[] getRequiredUpgrades()
IArmorUpgradeHandlerpublic float getIdleAirUsage(ICommonArmorHandler armorHandler)
IArmorUpgradeHandlerarmorHandler - the armor handler object (can be used to get upgrades, etc.)public net.minecraft.inventory.EquipmentSlotType getEquipmentSlot()
IArmorUpgradeHandlerpublic void tick(ICommonArmorHandler commonArmorHandler, boolean enabled)
IArmorUpgradeHandlercommonArmorHandler - the armor handler objectenabled - true if the upgrade is currently enabled, false otherwisepublic void onToggle(ICommonArmorHandler commonArmorHandler, boolean newState)
IArmorUpgradeHandlercommonArmorHandler - the armor handler objectnewState - the new state of the upgrade