mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
add snowball to despawn rate config
This commit is contained in:
@@ -47,7 +47,7 @@ Purpur API maven dependency:
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.pl3x.purpur</groupId>
|
<groupId>net.pl3x.purpur</groupId>
|
||||||
<artifactId>purpur-api</artifactId>
|
<artifactId>purpur-api</artifactId>
|
||||||
<version>1.16.2-R0.1-SNAPSHOT</version>
|
<version>1.16.3-R0.1-SNAPSHOT</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -160,6 +160,22 @@ index 92efb29534..f884e4cf7a 100644
|
|||||||
+ protected int getPurpurDespawnRate() {
|
+ protected int getPurpurDespawnRate() {
|
||||||
+ return this.world.purpurConfig.smallFireballDespawnRate;
|
+ return this.world.purpurConfig.smallFireballDespawnRate;
|
||||||
+ }
|
+ }
|
||||||
|
+ // Purpur end
|
||||||
|
}
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/EntitySnowball.java b/src/main/java/net/minecraft/server/EntitySnowball.java
|
||||||
|
index e44249f59b..592846759f 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntitySnowball.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntitySnowball.java
|
||||||
|
@@ -37,4 +37,11 @@ public class EntitySnowball extends EntityProjectileThrowable {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ // Purpur start
|
||||||
|
+ @Override
|
||||||
|
+ protected int getPurpurDespawnRate() {
|
||||||
|
+ return this.world.purpurConfig.snowballDespawnRate;
|
||||||
|
+ }
|
||||||
+ // Purpur end
|
+ // Purpur end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
|
diff --git a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
|
||||||
@@ -237,10 +253,10 @@ index 9a17eb6066..ab0809992c 100644
|
|||||||
private boolean h() {
|
private boolean h() {
|
||||||
Entity entity = this.getShooter();
|
Entity entity = this.getShooter();
|
||||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
index 423593ae66..fa322b1742 100644
|
index 423593ae66..bd58350796 100644
|
||||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||||
@@ -145,6 +145,31 @@ public class PurpurWorldConfig {
|
@@ -145,6 +145,33 @@ public class PurpurWorldConfig {
|
||||||
idleTimeoutUpdateTabList = getBoolean("gameplay-mechanics.player.idle-timeout.update-tab-list", idleTimeoutUpdateTabList);
|
idleTimeoutUpdateTabList = getBoolean("gameplay-mechanics.player.idle-timeout.update-tab-list", idleTimeoutUpdateTabList);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -254,6 +270,7 @@ index 423593ae66..fa322b1742 100644
|
|||||||
+ public int fishingHookDespawnRate = -1;
|
+ public int fishingHookDespawnRate = -1;
|
||||||
+ public int potionDespawnRate = -1;
|
+ public int potionDespawnRate = -1;
|
||||||
+ public int shulkerBulletDespawnRate = -1;
|
+ public int shulkerBulletDespawnRate = -1;
|
||||||
|
+ public int snowballDespawnRate = -1;
|
||||||
+ public int expBottleDespawnRate = -1;
|
+ public int expBottleDespawnRate = -1;
|
||||||
+ private void projectileDespawnRateSettings() {
|
+ private void projectileDespawnRateSettings() {
|
||||||
+ witherSkullDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.wither_skull", witherSkullDespawnRate);
|
+ witherSkullDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.wither_skull", witherSkullDespawnRate);
|
||||||
@@ -266,6 +283,7 @@ index 423593ae66..fa322b1742 100644
|
|||||||
+ fishingHookDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.fishing_bobber", fishingHookDespawnRate);
|
+ fishingHookDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.fishing_bobber", fishingHookDespawnRate);
|
||||||
+ potionDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.potion", potionDespawnRate);
|
+ potionDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.potion", potionDespawnRate);
|
||||||
+ shulkerBulletDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.shulker_bullet", shulkerBulletDespawnRate);
|
+ shulkerBulletDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.shulker_bullet", shulkerBulletDespawnRate);
|
||||||
|
+ snowballDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.snowball", snowballDespawnRate);
|
||||||
+ expBottleDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.experience_bottle", expBottleDespawnRate);
|
+ expBottleDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.experience_bottle", expBottleDespawnRate);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
|
|||||||
Reference in New Issue
Block a user