SPIGOT-7300, #1180: Add new DamageSource API providing enhanced information about entity damage
By: Doc <nachito94@msn.com>
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
private final DamageSource outsideBorder;
|
||||
private final DamageSource genericKill;
|
||||
+ // CraftBukkit start
|
||||
+ public final DamageSource melting;
|
||||
+ public final DamageSource poison;
|
||||
+ private final DamageSource melting;
|
||||
+ private final DamageSource poison;
|
||||
|
||||
public DamageSources(IRegistryCustom iregistrycustom) {
|
||||
this.damageTypes = iregistrycustom.registryOrThrow(Registries.DAMAGE_TYPE);
|
||||
@@ -16,3 +16,20 @@
|
||||
this.inFire = this.source(DamageTypes.IN_FIRE);
|
||||
this.lightningBolt = this.source(DamageTypes.LIGHTNING_BOLT);
|
||||
this.onFire = this.source(DamageTypes.ON_FIRE);
|
||||
@@ -81,6 +87,16 @@
|
||||
return new DamageSource(this.damageTypes.getHolderOrThrow(resourcekey), entity, entity1);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ public DamageSource melting() {
|
||||
+ return this.melting;
|
||||
+ }
|
||||
+
|
||||
+ public DamageSource poison() {
|
||||
+ return this.poison;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
public DamageSource inFire() {
|
||||
return this.inFire;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user