mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly Paper Changes: d985976 Add config for mobs immune to default effects (#4835) Tuinity Changes: ea43797 Fix portalling from the overworld above y 255
This commit is contained in:
@@ -1,61 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Ben Kerllenevich <me@notom3ga.me>
|
||||
Date: Sun, 21 Mar 2021 15:26:52 -0400
|
||||
Subject: [PATCH] Drowning Settings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 3c0979e7031fb33257b5ec1efcb68882ab96efcd..cc00c159e672f9a1bfb72c3e6b6b94fa6e53045f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2932,7 +2932,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
}
|
||||
|
||||
public int getMaxAirSupply() {
|
||||
- return 300;
|
||||
+ return this.level.purpurConfig.drowningAirTicks; // Purpur
|
||||
}
|
||||
|
||||
public int getAirSupply() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 4dd6b5745ca42a067f00d2fc24056e97b242a5f7..784124b31d273f0eecb2798b6758bb4eda880544 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -425,7 +425,7 @@ public abstract class LivingEntity extends Entity {
|
||||
if (this.isEyeInFluid((Tag) FluidTags.WATER) && !this.level.getBlockState(new BlockPos(this.getX(), this.getEyeY(), this.getZ())).is(Blocks.BUBBLE_COLUMN)) {
|
||||
if (!this.canBreatheUnderwater() && !MobEffectUtil.hasWaterBreathing(this) && !flag1) {
|
||||
this.setAirSupply(this.decreaseAirSupply(this.getAirSupply()));
|
||||
- if (this.getAirSupply() == -20) {
|
||||
+ if (this.getAirSupply() == -this.level.purpurConfig.drowningDamageInterval) { // Purpur
|
||||
this.setAirSupply(0);
|
||||
Vec3 vec3d = this.getDeltaMovement();
|
||||
|
||||
@@ -437,7 +437,7 @@ public abstract class LivingEntity extends Entity {
|
||||
this.level.addParticle(ParticleTypes.BUBBLE, this.getX() + d2, this.getY() + d3, this.getZ() + d4, vec3d.x, vec3d.y, vec3d.z);
|
||||
}
|
||||
|
||||
- this.hurt(DamageSource.DROWN, 2.0F);
|
||||
+ this.hurt(DamageSource.DROWN, (float) this.level.purpurConfig.damageFromDrowning); // Purpur
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 7c796c99076f510533462d46122b41a3b4128945..ab723a14cc1f0db42a4f5d34674e27cee6f5702f 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -120,6 +120,15 @@ public class PurpurWorldConfig {
|
||||
nighttimeTicks = getInt("gameplay-mechanics.daylight-cycle-ticks.nighttime", nighttimeTicks);
|
||||
}
|
||||
|
||||
+ public int drowningAirTicks = 300;
|
||||
+ public int drowningDamageInterval = 20;
|
||||
+ public double damageFromDrowning = 2.0F;
|
||||
+ private void drowningSettings() {
|
||||
+ drowningAirTicks = getInt("gameplay-mechanics.drowning.air-ticks", drowningAirTicks);
|
||||
+ drowningDamageInterval = getInt("gameplay-mechanics.drowning.ticks-per-damage", drowningDamageInterval);
|
||||
+ damageFromDrowning = getDouble("gameplay-mechanics.drowning.damage-from-drowning", damageFromDrowning);
|
||||
+ }
|
||||
+
|
||||
public int elytraDamagePerSecond = 1;
|
||||
public double elytraDamageMultiplyBySpeed = 0;
|
||||
public boolean elytraIgnoreUnbreaking = false;
|
||||
Reference in New Issue
Block a user