aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower/net/minecraft/world/damagesource/DamageSources.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower/net/minecraft/world/damagesource/DamageSources.java.patch')
-rw-r--r--patch-remap/mache-spigotflower/net/minecraft/world/damagesource/DamageSources.java.patch139
1 files changed, 139 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower/net/minecraft/world/damagesource/DamageSources.java.patch b/patch-remap/mache-spigotflower/net/minecraft/world/damagesource/DamageSources.java.patch
new file mode 100644
index 0000000000..083f16ce4a
--- /dev/null
+++ b/patch-remap/mache-spigotflower/net/minecraft/world/damagesource/DamageSources.java.patch
@@ -0,0 +1,139 @@
+--- a/net/minecraft/world/damagesource/DamageSources.java
++++ b/net/minecraft/world/damagesource/DamageSources.java
+@@ -41,9 +41,15 @@
+ private final DamageSource stalagmite;
+ private final DamageSource outsideBorder;
+ private final DamageSource genericKill;
++ // CraftBukkit start
++ public final DamageSource melting;
++ public final DamageSource poison;
+
+- public DamageSources(RegistryAccess registryaccess) {
+- this.damageTypes = registryaccess.registryOrThrow(Registries.DAMAGE_TYPE);
++ public DamageSources(RegistryAccess registry) {
++ this.damageTypes = registry.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);
+@@ -69,16 +75,16 @@
+ this.genericKill = this.source(DamageTypes.GENERIC_KILL);
+ }
+
+- private DamageSource source(ResourceKey<DamageType> resourcekey) {
+- return new DamageSource(this.damageTypes.getHolderOrThrow(resourcekey));
++ private DamageSource source(ResourceKey<DamageType> damageTypeKey) {
++ return new DamageSource(this.damageTypes.getHolderOrThrow(damageTypeKey));
+ }
+
+- private DamageSource source(ResourceKey<DamageType> resourcekey, @Nullable Entity entity) {
+- return new DamageSource(this.damageTypes.getHolderOrThrow(resourcekey), entity);
++ private DamageSource source(ResourceKey<DamageType> damageTypeKey, @Nullable Entity entity) {
++ return new DamageSource(this.damageTypes.getHolderOrThrow(damageTypeKey), entity);
+ }
+
+- private DamageSource source(ResourceKey<DamageType> resourcekey, @Nullable Entity entity, @Nullable Entity entity1) {
+- return new DamageSource(this.damageTypes.getHolderOrThrow(resourcekey), entity, entity1);
++ private DamageSource source(ResourceKey<DamageType> damageTypeKey, @Nullable Entity causingEntity, @Nullable Entity directEntity) {
++ return new DamageSource(this.damageTypes.getHolderOrThrow(damageTypeKey), causingEntity, directEntity);
+ }
+
+ public DamageSource inFire() {
+@@ -177,52 +183,52 @@
+ return this.source(DamageTypes.FALLING_STALACTITE, entity);
+ }
+
+- public DamageSource sting(LivingEntity livingentity) {
+- return this.source(DamageTypes.STING, livingentity);
++ public DamageSource sting(LivingEntity entity) {
++ return this.source(DamageTypes.STING, entity);
+ }
+
+- public DamageSource mobAttack(LivingEntity livingentity) {
+- return this.source(DamageTypes.MOB_ATTACK, livingentity);
++ public DamageSource mobAttack(LivingEntity mob) {
++ return this.source(DamageTypes.MOB_ATTACK, mob);
+ }
+
+- public DamageSource noAggroMobAttack(LivingEntity livingentity) {
+- return this.source(DamageTypes.MOB_ATTACK_NO_AGGRO, livingentity);
++ public DamageSource noAggroMobAttack(LivingEntity mob) {
++ return this.source(DamageTypes.MOB_ATTACK_NO_AGGRO, mob);
+ }
+
+ public DamageSource playerAttack(Player player) {
+ return this.source(DamageTypes.PLAYER_ATTACK, player);
+ }
+
+- public DamageSource arrow(AbstractArrow abstractarrow, @Nullable Entity entity) {
+- return this.source(DamageTypes.ARROW, abstractarrow, entity);
++ public DamageSource arrow(AbstractArrow arrow, @Nullable Entity shooter) {
++ return this.source(DamageTypes.ARROW, arrow, shooter);
+ }
+
+- public DamageSource trident(Entity entity, @Nullable Entity entity1) {
+- return this.source(DamageTypes.TRIDENT, entity, entity1);
++ public DamageSource trident(Entity trident, @Nullable Entity thrower) {
++ return this.source(DamageTypes.TRIDENT, trident, thrower);
+ }
+
+- public DamageSource mobProjectile(Entity entity, @Nullable LivingEntity livingentity) {
+- return this.source(DamageTypes.MOB_PROJECTILE, entity, livingentity);
++ public DamageSource mobProjectile(Entity projectile, @Nullable LivingEntity thrower) {
++ return this.source(DamageTypes.MOB_PROJECTILE, projectile, thrower);
+ }
+
+- public DamageSource fireworks(FireworkRocketEntity fireworkrocketentity, @Nullable Entity entity) {
+- return this.source(DamageTypes.FIREWORKS, fireworkrocketentity, entity);
++ public DamageSource fireworks(FireworkRocketEntity firework, @Nullable Entity shooter) {
++ return this.source(DamageTypes.FIREWORKS, firework, shooter);
+ }
+
+- public DamageSource fireball(Fireball fireball, @Nullable Entity entity) {
+- return entity == null ? this.source(DamageTypes.UNATTRIBUTED_FIREBALL, fireball) : this.source(DamageTypes.FIREBALL, fireball, entity);
++ public DamageSource fireball(Fireball fireball, @Nullable Entity thrower) {
++ return thrower == null ? this.source(DamageTypes.UNATTRIBUTED_FIREBALL, fireball) : this.source(DamageTypes.FIREBALL, fireball, thrower);
+ }
+
+- public DamageSource witherSkull(WitherSkull witherskull, Entity entity) {
+- return this.source(DamageTypes.WITHER_SKULL, witherskull, entity);
++ public DamageSource witherSkull(WitherSkull witherSkull, Entity shooter) {
++ return this.source(DamageTypes.WITHER_SKULL, witherSkull, shooter);
+ }
+
+- public DamageSource thrown(Entity entity, @Nullable Entity entity1) {
+- return this.source(DamageTypes.THROWN, entity, entity1);
++ public DamageSource thrown(Entity causingEntity, @Nullable Entity directEntity) {
++ return this.source(DamageTypes.THROWN, causingEntity, directEntity);
+ }
+
+- public DamageSource indirectMagic(Entity entity, @Nullable Entity entity1) {
+- return this.source(DamageTypes.INDIRECT_MAGIC, entity, entity1);
++ public DamageSource indirectMagic(Entity causingEntity, @Nullable Entity directEntity) {
++ return this.source(DamageTypes.INDIRECT_MAGIC, causingEntity, directEntity);
+ }
+
+ public DamageSource thorns(Entity entity) {
+@@ -233,16 +239,16 @@
+ return explosion != null ? this.explosion(explosion.getDirectSourceEntity(), explosion.getIndirectSourceEntity()) : this.explosion((Entity) null, (Entity) null);
+ }
+
+- public DamageSource explosion(@Nullable Entity entity, @Nullable Entity entity1) {
+- return this.source(entity1 != null && entity != null ? DamageTypes.PLAYER_EXPLOSION : DamageTypes.EXPLOSION, entity, entity1);
++ public DamageSource explosion(@Nullable Entity causingEntity, @Nullable Entity directEntity) {
++ return this.source(directEntity != null && causingEntity != null ? DamageTypes.PLAYER_EXPLOSION : DamageTypes.EXPLOSION, causingEntity, directEntity);
+ }
+
+ public DamageSource sonicBoom(Entity entity) {
+ return this.source(DamageTypes.SONIC_BOOM, entity);
+ }
+
+- public DamageSource badRespawnPointExplosion(Vec3 vec3) {
+- return new DamageSource(this.damageTypes.getHolderOrThrow(DamageTypes.BAD_RESPAWN_POINT), vec3);
++ public DamageSource badRespawnPointExplosion(Vec3 position) {
++ return new DamageSource(this.damageTypes.getHolderOrThrow(DamageTypes.BAD_RESPAWN_POINT), position);
+ }
+
+ public DamageSource outOfBorder() {