2023-03-14 17:30:00 +01:00
|
|
|
--- a/net/minecraft/world/damagesource/DamageSources.java
|
|
|
|
+++ b/net/minecraft/world/damagesource/DamageSources.java
|
2024-12-14 14:47:37 +01:00
|
|
|
@@ -42,9 +_,15 @@
|
2023-03-14 17:30:00 +01:00
|
|
|
private final DamageSource stalagmite;
|
2023-06-07 17:30:00 +02:00
|
|
|
private final DamageSource outsideBorder;
|
|
|
|
private final DamageSource genericKill;
|
2023-03-14 17:30:00 +01:00
|
|
|
+ // CraftBukkit start
|
2024-02-10 23:54:25 +01:00
|
|
|
+ private final DamageSource melting;
|
|
|
|
+ private final DamageSource poison;
|
2023-03-14 17:30:00 +01:00
|
|
|
|
2024-12-14 14:47:37 +01:00
|
|
|
public DamageSources(RegistryAccess registry) {
|
|
|
|
this.damageTypes = registry.lookupOrThrow(Registries.DAMAGE_TYPE);
|
2023-03-14 17:30:00 +01:00
|
|
|
+ this.melting = this.source(DamageTypes.ON_FIRE).melting();
|
|
|
|
+ this.poison = this.source(DamageTypes.MAGIC).poison();
|
|
|
|
+ // CraftBukkit end
|
|
|
|
this.inFire = this.source(DamageTypes.IN_FIRE);
|
2024-06-13 17:05:00 +02:00
|
|
|
this.campfire = this.source(DamageTypes.CAMPFIRE);
|
2023-03-14 17:30:00 +01:00
|
|
|
this.lightningBolt = this.source(DamageTypes.LIGHTNING_BOLT);
|
2024-12-14 14:47:37 +01:00
|
|
|
@@ -84,6 +_,16 @@
|
|
|
|
return new DamageSource(this.damageTypes.getOrThrow(damageTypeKey), causingEntity, directEntity);
|
|
|
|
}
|
2024-03-09 23:13:04 +01:00
|
|
|
|
2024-02-10 23:54:25 +01:00
|
|
|
+ // CraftBukkit start
|
|
|
|
+ public DamageSource melting() {
|
|
|
|
+ return this.melting;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public DamageSource poison() {
|
|
|
|
+ return this.poison;
|
2024-12-14 14:47:37 +01:00
|
|
|
+ }
|
2024-02-10 23:54:25 +01:00
|
|
|
+ // CraftBukkit end
|
2024-12-14 14:47:37 +01:00
|
|
|
+
|
2024-02-10 23:54:25 +01:00
|
|
|
public DamageSource inFire() {
|
|
|
|
return this.inFire;
|
2024-05-04 00:15:51 +02:00
|
|
|
}
|
2024-12-14 14:47:37 +01:00
|
|
|
@@ -261,7 +_,13 @@
|
2024-05-04 00:15:51 +02:00
|
|
|
}
|
|
|
|
|
2024-12-11 22:26:55 +01:00
|
|
|
public DamageSource badRespawnPointExplosion(Vec3 position) {
|
|
|
|
- return new DamageSource(this.damageTypes.getOrThrow(DamageTypes.BAD_RESPAWN_POINT), position);
|
|
|
|
+ // CraftBukkit start
|
|
|
|
+ return this.badRespawnPointExplosion(position, null);
|
2024-12-14 14:47:37 +01:00
|
|
|
+ }
|
|
|
|
+
|
2024-12-11 22:26:55 +01:00
|
|
|
+ public DamageSource badRespawnPointExplosion(Vec3 vec3d, org.bukkit.block.BlockState blockState) {
|
2024-10-22 17:15:00 +02:00
|
|
|
+ return new DamageSource(this.damageTypes.getOrThrow(DamageTypes.BAD_RESPAWN_POINT), vec3d).directBlockState(blockState);
|
2024-04-29 12:08:56 +02:00
|
|
|
+ // CraftBukkit end
|
2024-12-11 22:26:55 +01:00
|
|
|
}
|
2024-12-14 14:47:37 +01:00
|
|
|
|
|
|
|
public DamageSource outOfBorder() {
|