@@ -1,11 +1,13 @@
|
||||
--- a/net/minecraft/world/damagesource/DamageSource.java
|
||||
+++ b/net/minecraft/world/damagesource/DamageSource.java
|
||||
@@ -49,6 +49,18 @@
|
||||
private boolean isFall;
|
||||
private boolean noAggro;
|
||||
public final String msgId;
|
||||
@@ -20,6 +20,38 @@
|
||||
private final Entity directEntity;
|
||||
@Nullable
|
||||
private final Vec3D damageSourcePosition;
|
||||
+ // CraftBukkit start
|
||||
+ private boolean sweep;
|
||||
+ private boolean melting;
|
||||
+ private boolean poison;
|
||||
+
|
||||
+ public boolean isSweep() {
|
||||
+ return sweep;
|
||||
@@ -15,7 +17,25 @@
|
||||
+ this.sweep = true;
|
||||
+ return this;
|
||||
+ }
|
||||
+
|
||||
+ 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;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
public static DamageSource fallingBlock(Entity entity) {
|
||||
return (new EntityDamageSource("fallingBlock", entity)).damageHelmet();
|
||||
public String toString() {
|
||||
return "DamageSource (" + this.type().msgId() + ")";
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
--- a/net/minecraft/world/damagesource/DamageSources.java
|
||||
+++ b/net/minecraft/world/damagesource/DamageSources.java
|
||||
@@ -39,9 +39,15 @@
|
||||
private final DamageSource sweetBerryBush;
|
||||
private final DamageSource freeze;
|
||||
private final DamageSource stalagmite;
|
||||
+ // CraftBukkit start
|
||||
+ public final DamageSource melting;
|
||||
+ public final DamageSource poison;
|
||||
|
||||
public DamageSources(IRegistryCustom iregistrycustom) {
|
||||
this.damageTypes = iregistrycustom.registryOrThrow(Registries.DAMAGE_TYPE);
|
||||
+ this.melting = this.source(DamageTypes.ON_FIRE).melting();
|
||||
+ this.poison = this.source(DamageTypes.MAGIC).poison();
|
||||
+ // CraftBukkit end
|
||||
this.inFire = this.source(DamageTypes.IN_FIRE);
|
||||
this.lightningBolt = this.source(DamageTypes.LIGHTNING_BOLT);
|
||||
this.onFire = this.source(DamageTypes.ON_FIRE);
|
||||
@@ -1,13 +0,0 @@
|
||||
--- a/net/minecraft/world/damagesource/EntityDamageSourceIndirect.java
|
||||
+++ b/net/minecraft/world/damagesource/EntityDamageSourceIndirect.java
|
||||
@@ -53,4 +53,10 @@
|
||||
return IChatBaseComponent.translatable(s, entityliving.getDisplayName(), ichatbasecomponent);
|
||||
}
|
||||
}
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
+ public Entity getProximateDamageSource() {
|
||||
+ return super.getEntity();
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
Reference in New Issue
Block a user