net.minecraft.world.damagesource
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
--- a/net/minecraft/world/damagesource/DamageSources.java
|
||||
+++ b/net/minecraft/world/damagesource/DamageSources.java
|
||||
@@ -42,9 +_,15 @@
|
||||
private final DamageSource stalagmite;
|
||||
private final DamageSource outsideBorder;
|
||||
private final DamageSource genericKill;
|
||||
+ // CraftBukkit start
|
||||
+ private final DamageSource melting;
|
||||
+ private final DamageSource poison;
|
||||
|
||||
public DamageSources(RegistryAccess registry) {
|
||||
this.damageTypes = registry.lookupOrThrow(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.campfire = this.source(DamageTypes.CAMPFIRE);
|
||||
this.lightningBolt = this.source(DamageTypes.LIGHTNING_BOLT);
|
||||
@@ -84,6 +_,16 @@
|
||||
return new DamageSource(this.damageTypes.getOrThrow(damageTypeKey), causingEntity, directEntity);
|
||||
}
|
||||
|
||||
+ // CraftBukkit start
|
||||
+ public DamageSource melting() {
|
||||
+ return this.melting;
|
||||
+ }
|
||||
+
|
||||
+ public DamageSource poison() {
|
||||
+ return this.poison;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
public DamageSource inFire() {
|
||||
return this.inFire;
|
||||
}
|
||||
@@ -261,7 +_,13 @@
|
||||
}
|
||||
|
||||
public DamageSource badRespawnPointExplosion(Vec3 position) {
|
||||
- return new DamageSource(this.damageTypes.getOrThrow(DamageTypes.BAD_RESPAWN_POINT), position);
|
||||
+ // CraftBukkit start
|
||||
+ return this.badRespawnPointExplosion(position, null);
|
||||
+ }
|
||||
+
|
||||
+ public DamageSource badRespawnPointExplosion(Vec3 vec3d, org.bukkit.block.BlockState blockState) {
|
||||
+ return new DamageSource(this.damageTypes.getOrThrow(DamageTypes.BAD_RESPAWN_POINT), vec3d).directBlockState(blockState);
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
public DamageSource outOfBorder() {
|
||||
Reference in New Issue
Block a user