Commits
Parker Hawke authored and md_5 committed 465c4964722
47 47 | * @return whether entities will be damaged by this block. |
48 48 | */ |
49 49 | boolean canHurtEntities(); |
50 50 | |
51 51 | /** |
52 52 | * Set the HurtEntities state of this block. |
53 53 | * |
54 54 | * @param hurtEntities whether entities will be damaged by this block. |
55 55 | */ |
56 56 | void setHurtEntities(boolean hurtEntities); |
57 + | |
58 + | /** |
59 + | * Get the amount of damage inflicted upon entities multiplied by the distance |
60 + | * that the block had fallen when this falling block lands on them. |
61 + | * |
62 + | * @return the damage per block |
63 + | */ |
64 + | float getDamagePerBlock(); |
65 + | |
66 + | /** |
67 + | * Set the amount of damage inflicted upon entities multiplied by the distance |
68 + | * that the block had fallen when this falling block lands on them. |
69 + | * <p> |
70 + | * If {@code damage} is non-zero, this method will automatically call |
71 + | * {@link #setHurtEntities(boolean) setHurtEntities(true)}. |
72 + | * |
73 + | * @param damage the damage per block to set. Must be >= 0.0 |
74 + | */ |
75 + | void setDamagePerBlock(float damage); |
76 + | |
77 + | /** |
78 + | * Get the maximum amount of damage that can be inflicted upon entities when |
79 + | * this falling block lands on them. |
80 + | * |
81 + | * @return the max damage |
82 + | */ |
83 + | int getMaxDamage(); |
84 + | |
85 + | /** |
86 + | * Set the maximum amount of damage that can be inflicted upon entities when |
87 + | * this falling block lands on them. |
88 + | * <p> |
89 + | * If {@code damage} is non-zero, this method will automatically call |
90 + | * {@link #setHurtEntities(boolean) setHurtEntities(true)}. |
91 + | * |
92 + | * @param damage the max damage to set. Must be >= 0 |
93 + | */ |
94 + | void setMaxDamage(int damage); |
57 95 | } |