mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Drop "Use-arrow-despawn-rate-for-all-projectiles.patch"
This commit is contained in:
@@ -6,7 +6,7 @@ Subject: [PATCH] Customizable WitherBoss Health and Healing
|
|||||||
Adds the ability to customize the health of the Wither Boss, as well as the amount that it heals, and how often in the PurpurWorldConfig.
|
Adds the ability to customize the health of the Wither Boss, as well as the amount that it heals, and how often in the PurpurWorldConfig.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
index 1054b492c..2a288d372 100644
|
index 1054b492c2..2a288d3726 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
||||||
@@ -145,6 +145,12 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
@@ -145,6 +145,12 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||||
@@ -53,7 +53,7 @@ index 1054b492c..2a288d372 100644
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
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 6ca2815b0..54319b097 100644
|
index 6ca2815b03..54319b0979 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
|
||||||
@@ -901,10 +901,16 @@ public class PurpurWorldConfig {
|
@@ -901,10 +901,16 @@ public class PurpurWorldConfig {
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
||||||
Date: Mon, 17 Aug 2020 23:26:43 -0500
|
|
||||||
Subject: [PATCH] Use arrow despawn rate for all projectiles
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
|
|
||||||
index b0218959a..1587a5aa7 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
|
||||||
@@ -23,7 +23,7 @@ public abstract class EntityArrow extends IProjectile {
|
|
||||||
protected int c;
|
|
||||||
public EntityArrow.PickupStatus fromPlayer;
|
|
||||||
public int shake;
|
|
||||||
- public int despawnCounter;
|
|
||||||
+ //public int despawnCounter; // Purpur - moved to IProjectile
|
|
||||||
private double damage;
|
|
||||||
public int knockbackStrength;
|
|
||||||
private SoundEffect ak;
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/IProjectile.java b/src/main/java/net/minecraft/server/IProjectile.java
|
|
||||||
index 9a17eb606..9a41428ea 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/IProjectile.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/IProjectile.java
|
|
||||||
@@ -13,6 +13,7 @@ public abstract class IProjectile extends Entity {
|
|
||||||
private UUID shooter;
|
|
||||||
private int c;
|
|
||||||
private boolean d; public boolean leftOwner() { return d; } public void setLeftOwner(boolean leftOwner) { this.d = leftOwner; } // Purpur - OBFHELPER
|
|
||||||
+ public int despawnCounter; // Purpur - moved from EntityArrow
|
|
||||||
|
|
||||||
IProjectile(EntityTypes<? extends IProjectile> entitytypes, World world) {
|
|
||||||
super(entitytypes, world);
|
|
||||||
@@ -79,7 +80,22 @@ public abstract class IProjectile extends Entity {
|
|
||||||
}
|
|
||||||
|
|
||||||
super.tick();
|
|
||||||
+
|
|
||||||
+ // Purpur start
|
|
||||||
+ if (!(this instanceof EntityArrow)) {
|
|
||||||
+ if (ticksLived > 200) this.tickDespawnCounter(); // Paper - tick despawnCounter regardless after 10 seconds
|
|
||||||
+ }
|
|
||||||
+ // Purpur end
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ // Purpur start - copied from EntityArrow
|
|
||||||
+ protected void tickDespawnCounter() {
|
|
||||||
+ ++this.despawnCounter;
|
|
||||||
+ if (this.despawnCounter >= world.spigotConfig.arrowDespawnRate) {
|
|
||||||
+ this.die();
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
+ // Purpur end
|
|
||||||
|
|
||||||
public boolean checkIfLeftOwner() { return this.h(); } // Purpur - OBFHELPER
|
|
||||||
private boolean h() {
|
|
||||||
@@ -29,7 +29,7 @@ index 502cb0ea40..f88c7b5480 100644
|
|||||||
if (SpawnerCreature.a(EntityPositionTypes.Surface.ON_GROUND, iworldreader, blockposition2, EntityTypes.WANDERING_TRADER)) {
|
if (SpawnerCreature.a(EntityPositionTypes.Surface.ON_GROUND, iworldreader, blockposition2, EntityTypes.WANDERING_TRADER)) {
|
||||||
blockposition1 = blockposition2;
|
blockposition1 = blockposition2;
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 77c72ec9fa..b1b376ba86 100644
|
index d13684c3d7..902a7efb03 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -128,7 +128,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
@@ -128,7 +128,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||||
@@ -42,7 +42,7 @@ index 77c72ec9fa..b1b376ba86 100644
|
|||||||
this.generator = gen;
|
this.generator = gen;
|
||||||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index 0a024bb5c6..4f00bbe5ae 100644
|
index bdb485b2cc..6644686908 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -322,7 +322,24 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
@@ -322,7 +322,24 @@ public class WorldServer extends World implements GeneratorAccessSeed {
|
||||||
@@ -72,7 +72,7 @@ index 0a024bb5c6..4f00bbe5ae 100644
|
|||||||
this.worldDataServer = (WorldDataServer) iworlddataserver;
|
this.worldDataServer = (WorldDataServer) iworlddataserver;
|
||||||
worldDataServer.world = this;
|
worldDataServer.world = this;
|
||||||
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 11a5795f51..755a46ee8b 100644
|
index 54319b0979..85ce7dbc8f 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
|
||||||
@@ -7,6 +7,8 @@ import net.minecraft.server.IRegistry;
|
@@ -7,6 +7,8 @@ import net.minecraft.server.IRegistry;
|
||||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Raid cooldown setting
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PersistentRaid.java b/src/main/java/net/minecraft/server/PersistentRaid.java
|
diff --git a/src/main/java/net/minecraft/server/PersistentRaid.java b/src/main/java/net/minecraft/server/PersistentRaid.java
|
||||||
index b46b20cae8..e7aee30555 100644
|
index 2193fecab4..515026198c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PersistentRaid.java
|
--- a/src/main/java/net/minecraft/server/PersistentRaid.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PersistentRaid.java
|
+++ b/src/main/java/net/minecraft/server/PersistentRaid.java
|
||||||
@@ -9,6 +9,7 @@ import javax.annotation.Nullable;
|
@@ -9,6 +9,7 @@ import javax.annotation.Nullable;
|
||||||
@@ -52,7 +52,7 @@ index b46b20cae8..e7aee30555 100644
|
|||||||
if (!this.raids.containsKey(raid.getId())) {
|
if (!this.raids.containsKey(raid.getId())) {
|
||||||
this.raids.put(raid.getId(), raid);
|
this.raids.put(raid.getId(), raid);
|
||||||
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 755a46ee8b..54e460ca8e 100644
|
index 85ce7dbc8f..423593ae66 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
|
||||||
@@ -155,6 +155,7 @@ public class PurpurWorldConfig {
|
@@ -155,6 +155,7 @@ public class PurpurWorldConfig {
|
||||||
Reference in New Issue
Block a user