2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/damagesource/DamageSource.java
|
|
|
|
+++ b/net/minecraft/world/damagesource/DamageSource.java
|
2023-03-14 17:30:00 +01:00
|
|
|
@@ -20,6 +20,38 @@
|
|
|
|
private final Entity directEntity;
|
|
|
|
@Nullable
|
|
|
|
private final Vec3D damageSourcePosition;
|
2016-12-23 12:39:33 +01:00
|
|
|
+ // CraftBukkit start
|
|
|
|
+ private boolean sweep;
|
2023-03-14 17:30:00 +01:00
|
|
|
+ private boolean melting;
|
|
|
|
+ private boolean poison;
|
2016-12-23 12:39:33 +01:00
|
|
|
+
|
|
|
|
+ public boolean isSweep() {
|
|
|
|
+ return sweep;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public DamageSource sweep() {
|
|
|
|
+ this.sweep = true;
|
|
|
|
+ return this;
|
|
|
|
+ }
|
2023-03-14 17:30:00 +01:00
|
|
|
+
|
|
|
|
+ public boolean isMelting() {
|
|
|
|
+ return melting;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public DamageSource melting() {
|
|
|
|
+ this.melting = true;
|
|
|
|
+ return this;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public boolean isPoison() {
|
|
|
|
+ return poison;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public DamageSource poison() {
|
|
|
|
+ this.poison = true;
|
|
|
|
+ return this;
|
|
|
|
+ }
|
2016-12-23 12:39:33 +01:00
|
|
|
+ // CraftBukkit end
|
|
|
|
|
2023-03-14 17:30:00 +01:00
|
|
|
public String toString() {
|
|
|
|
return "DamageSource (" + this.type().msgId() + ")";
|