NOT FINISHED!!! Current Progress on 1.13-pre7 update
This work is 100% unfinished. I am pushing it up so that we as a team can work on this update. Do not try to use this branch. You will fail.
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Configurable mob spawner tick rate
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 70b02f020..f431000d1 100644
|
||||
index 0130e5860..47f391243 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
@@ -19,13 +19,13 @@ index 70b02f020..f431000d1 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
index 0149726ea..a5261d70b 100644
|
||||
index e9650d962..61472a0eb 100644
|
||||
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
@@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract {
|
||||
public int maxNearbyEntities = 6; // CraftBukkit private -> public
|
||||
public int requiredPlayerRange = 16; // CraftBukkit private -> public
|
||||
public int spawnRange = 4; // CraftBukkit private -> public
|
||||
public int maxNearbyEntities = 6;
|
||||
public int requiredPlayerRange = 16;
|
||||
public int spawnRange = 4;
|
||||
+ private int tickDelay = 0; // Paper
|
||||
|
||||
public MobSpawnerAbstract() {}
|
||||
@@ -39,18 +39,18 @@ index 0149726ea..a5261d70b 100644
|
||||
+ tickDelay = this.a().paperConfig.mobSpawnerTickRate;
|
||||
+ // Paper end
|
||||
if (!this.h()) {
|
||||
this.e = this.d;
|
||||
this.f = this.e;
|
||||
} else {
|
||||
@@ -0,0 +0,0 @@ public abstract class MobSpawnerAbstract {
|
||||
this.a().addParticle(EnumParticle.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
this.a().addParticle(EnumParticle.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]);
|
||||
this.a().addParticle(Particles.M, d0, d1, d2, 0.0D, 0.0D, 0.0D);
|
||||
this.a().addParticle(Particles.y, d0, d1, d2, 0.0D, 0.0D, 0.0D);
|
||||
if (this.spawnDelay > 0) {
|
||||
- --this.spawnDelay;
|
||||
+ this.spawnDelay -= tickDelay; // Paper
|
||||
}
|
||||
|
||||
this.e = this.d;
|
||||
this.d = (this.d + (double) (1000.0F / ((float) this.spawnDelay + 200.0F))) % 360.0D;
|
||||
this.f = this.e;
|
||||
this.e = (this.e + (double) (1000.0F / ((float) this.spawnDelay + 200.0F))) % 360.0D;
|
||||
} else {
|
||||
- if (this.spawnDelay == -1) {
|
||||
+ if (this.spawnDelay < -tickDelay) { // Paper
|
||||
|
||||
Reference in New Issue
Block a user