You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Garkatron edited this page Jul 18, 2024
·
1 revision
CustomDamageTypes Class
This class extends DamageType and defines two static constants for custom damage types related to temperature:
OVERHEATING
Description: Represents damage caused by overheating.
Parameters:
languageKey: "damagetype.overheating"
shouldDamageArmor: false
shouldDisplay: true
iconIndex: 0
FREEZING
Description: Represents damage caused by freezing.
Parameters:
languageKey: "damagetype.freezing"
shouldDamageArmor: false
shouldDisplay: true
iconIndex: 0
Constructor
The class declares a constructor CustomDamageTypes which extends the constructor of DamageType. However, in the provided code snippet, this constructor is not directly used for initializing OVERHEATING and FREEZING. Instead, these constants are initialized directly with their respective parameters.
Usage
These custom damage types (OVERHEATING and FREEZING) can be used in your mod to apply specific effects or behaviors related to temperature damage in the game.
This class is useful for defining and managing custom damage types within your Minecraft mod, allowing you to implement unique gameplay mechanics tied to temperature effects on players or entities.