Archiviert
13
0

Rebuild patches

Dieser Commit ist enthalten in:
Zach Brown 2016-03-07 15:54:14 -06:00
Ursprung 7d05145bf4
Commit a05bf5ab9f
6 geänderte Dateien mit 54 neuen und 58 gelöschten Zeilen

Datei anzeigen

@ -1,11 +1,11 @@
From ac2539c743cbcce559a561db94f7afef9d6260d8 Mon Sep 17 00:00:00 2001
From dda17d3cf1838666320af0b6fe3820766fc17fd2 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:02:51 -0600
Subject: [PATCH] Configurable cactus and reed natural growth heights
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index ac7a176..ca0c9f0 100644
index c214c35..66db130 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -71,4 +71,13 @@ public class PaperWorldConfig {
@ -23,7 +23,7 @@ index ac7a176..ca0c9f0 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
index 862075d..b615f18 100644
index c00d874..37b7e54 100644
--- a/src/main/java/net/minecraft/server/BlockCactus.java
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
@@ -28,7 +28,7 @@ public class BlockCactus extends Block {
@ -34,9 +34,9 @@ index 862075d..b615f18 100644
+ if (i < world.paperConfig.cactusMaxHeight) { // Paper - Configurable growth height
int j = ((Integer) iblockdata.get(BlockCactus.AGE)).intValue();
if (j >= (byte) range(3, (world.spigotConfig.cactusModifier / 100 * 15) + 0.5F, 15)) { // Spigot
if (j >= (byte) range(3, ((100 / world.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot
diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
index b8c36a7..1e5e9b8 100644
index fb19f19..6e0fa5f 100644
--- a/src/main/java/net/minecraft/server/BlockReed.java
+++ b/src/main/java/net/minecraft/server/BlockReed.java
@@ -27,7 +27,7 @@ public class BlockReed extends Block {
@ -47,7 +47,7 @@ index b8c36a7..1e5e9b8 100644
+ if (i < world.paperConfig.reedMaxHeight) { // Paper - Configurable growth height
int j = ((Integer) iblockdata.get(BlockReed.AGE)).intValue();
if (j >= (byte) range(3, (world.spigotConfig.caneModifier /100 * 15) + 0.5F, 15)) { // Spigot
if (j >= (byte) range(3, ((100 / world.spigotConfig.caneModifier) * 15) + 0.5F, 15)) { // Spigot
--
2.7.2

Datei anzeigen

@ -1,11 +1,11 @@
From f7cca8a66999ab5b254908f7da834e66e0b6bfa3 Mon Sep 17 00:00:00 2001
From 990076963be48fb550e05ccfa3faf24c35d1565b Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:24:16 -0600
Subject: [PATCH] Allow nerfed mobs to jump
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 7d4bb9f..a45e87c 100644
index 16444b6..9b1204c 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -43,6 +43,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -16,7 +16,7 @@ index 7d4bb9f..a45e87c 100644
public EntityInsentient(World world) {
super(world);
@@ -629,6 +630,12 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -622,6 +623,12 @@ public abstract class EntityInsentient extends EntityLiving {
// Spigot Start
if ( this.fromMobSpawner )
{

Datei anzeigen

@ -1,11 +1,11 @@
From ba115e8f3764ef9162fba23d75154d9d5bb0054e Mon Sep 17 00:00:00 2001
From b61da73d5aac97d17a6decdf32a00beace3db99f Mon Sep 17 00:00:00 2001
From: Suddenly <suddenly@suddenly.coffee>
Date: Tue, 1 Mar 2016 13:51:54 -0600
Subject: [PATCH] Add configurable despawn distances for living entities
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index d5b4756..a662f26 100644
index 7a7547f..375ac89 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -103,4 +103,20 @@ public class PaperWorldConfig {
@ -30,10 +30,10 @@ index d5b4756..a662f26 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index a45e87c..916c913 100644
index 9b1204c..c0215e2 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -608,13 +608,13 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -601,13 +601,13 @@ public abstract class EntityInsentient extends EntityLiving {
double d2 = entityhuman.locZ - this.locZ;
double d3 = d0 * d0 + d1 * d1 + d2 * d2;

Datei anzeigen

@ -1,4 +1,4 @@
From e53ac67fb4cae8794b1e067379af3c17f209e86d Mon Sep 17 00:00:00 2001
From 35e02674a6ff73cbeb7fa49e7048f74baeef5be8 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Tue, 1 Mar 2016 14:47:52 -0600
Subject: [PATCH] Player affects spawning API
@ -17,10 +17,10 @@ index 7b7025f..9534bf9 100644
// CraftBukkit start
public boolean fauxSleeping;
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 863d2c6..bc219b6 100644
index c0215e2..2df5f15 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -600,7 +600,7 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -593,7 +593,7 @@ public abstract class EntityInsentient extends EntityLiving {
if (this.persistent) {
this.ticksFarFromPlayer = 0;
} else {

Datei anzeigen

@ -1,4 +1,4 @@
From 8eea819e93e12e8d9be9dd9b17bb2c0bdca54580 Mon Sep 17 00:00:00 2001
From 9b6ecd5ca11fa76650e3b1a20b2002afdb5478e6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@ -290,7 +290,7 @@ index dd3abb8..a0186ef 100644
import org.bukkit.craftbukkit.util.Waitable;
import org.bukkit.event.server.RemoteServerCommandEvent;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 429749a..b0aef4c 100644
index 768b6e7..2406968 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -24,7 +24,8 @@ import org.bukkit.block.BlockFace;
@ -329,7 +329,7 @@ index 429749a..b0aef4c 100644
public void recalcPosition() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 8d91f7c..a8e8557 100644
index aef9cb7..847dafd 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -23,7 +23,7 @@ import org.bukkit.event.entity.EntityRegainHealthEvent;
@ -341,7 +341,7 @@ index 8d91f7c..a8e8557 100644
public abstract class EntityLiving extends Entity {
@@ -1686,7 +1686,6 @@ public abstract class EntityLiving extends Entity {
@@ -1685,7 +1685,6 @@ public abstract class EntityLiving extends Entity {
}
public void m() {
@ -349,7 +349,7 @@ index 8d91f7c..a8e8557 100644
super.m();
this.cu();
if (!this.world.isClientSide) {
@@ -1759,9 +1758,7 @@ public abstract class EntityLiving extends Entity {
@@ -1758,9 +1757,7 @@ public abstract class EntityLiving extends Entity {
}
}
@ -359,7 +359,7 @@ index 8d91f7c..a8e8557 100644
double d0 = this.locX - this.lastX;
double d1 = this.locZ - this.lastZ;
float f = (float) (d0 * d0 + d1 * d1);
@@ -1830,8 +1827,6 @@ public abstract class EntityLiving extends Entity {
@@ -1829,8 +1826,6 @@ public abstract class EntityLiving extends Entity {
} else {
this.bo = 0;
}
@ -368,7 +368,7 @@ index 8d91f7c..a8e8557 100644
}
protected float h(float f, float f1) {
@@ -1896,7 +1891,6 @@ public abstract class EntityLiving extends Entity {
@@ -1895,7 +1890,6 @@ public abstract class EntityLiving extends Entity {
}
this.world.methodProfiler.a("ai");
@ -376,7 +376,7 @@ index 8d91f7c..a8e8557 100644
if (this.cf()) {
this.bc = false;
this.bd = 0.0F;
@@ -1907,7 +1901,6 @@ public abstract class EntityLiving extends Entity {
@@ -1906,7 +1900,6 @@ public abstract class EntityLiving extends Entity {
this.doTick();
this.world.methodProfiler.b();
}
@ -384,7 +384,7 @@ index 8d91f7c..a8e8557 100644
this.world.methodProfiler.b();
this.world.methodProfiler.a("jump");
@@ -1930,14 +1923,10 @@ public abstract class EntityLiving extends Entity {
@@ -1929,14 +1922,10 @@ public abstract class EntityLiving extends Entity {
this.be *= 0.98F;
this.bf *= 0.9F;
this.r();

Datei anzeigen

@ -1,4 +1,4 @@
From e723a6c4e1cff0a81d30ef7bb0b17ff361b86520 Mon Sep 17 00:00:00 2001
From 339093668968143899beea3510d72e9e13889c80 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 02:46:17 -0600
Subject: [PATCH] Add configurable portal search radius
@ -19,44 +19,40 @@ index 50fc4a0..f42efe7 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
index 7c8df40..22c94d1 100644
index 519d27c..3f35303 100644
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
@@ -107,7 +107,7 @@ public class PortalTravelAgent {
return true;
}
@@ -11,7 +11,7 @@ import java.util.Random;
- public BlockPosition findPortal(double x, double y, double z, int short1) {
+ public BlockPosition findPortal(double x, double y, double z, int searchRadius) { // Paper - short1 -> searchRadius
if (this.world.getWorld().getEnvironment() == org.bukkit.World.Environment.THE_END) {
return this.findEndPortal(this.world.worldProvider.h());
public class PortalTravelAgent {
- private final WorldServer world;
+ protected final WorldServer world; // Paper - private -> protected
private final Random b;
private final LongHashMap<PortalTravelAgent.ChunkCoordinatesPortal> c = new LongHashMap();
private final List<Long> d = Lists.newArrayList();
@@ -92,7 +92,7 @@ public class PortalTravelAgent {
public boolean b(Entity entity, float f) {
// CraftBukkit start - Modularize portal search process and entity teleportation
- BlockPosition found = this.findPortal(entity.locX, entity.locY, entity.locZ, 128);
+ BlockPosition found = this.findPortal(entity.locX, entity.locY, entity.locZ, world.paperConfig.portalSearchRadius); // Paper - Configurable search radius
if (found == null) {
return false;
}
@@ -131,10 +131,10 @@ public class PortalTravelAgent {
} else {
BlockPosition blockposition = new BlockPosition(x, y, z); // CraftBukkit
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java b/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java
index 1d5dce1..7ca2617 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftTravelAgent.java
@@ -11,7 +11,7 @@ public class CraftTravelAgent extends PortalTravelAgent implements TravelAgent {
- for (int l = -128; l <= 128; ++l) {
+ for (int l = -searchRadius; l <= searchRadius; ++l) { // Paper - actually use search radiusfor (int l = -128; l <= 128; ++l) {
BlockPosition blockposition1;
public static TravelAgent DEFAULT = null;
- private int searchRadius = 128;
+ private int searchRadius = world.paperConfig.portalSearchRadius; // Paper - Configurable search radius
private int creationRadius = 16;
private boolean canCreatePortal = true;
- for (int i1 = -128; i1 <= 128; ++i1) {
+ for (int i1 = -searchRadius; i1 <= searchRadius; ++i1) { // Paper - actually use search radius
for (BlockPosition blockposition2 = blockposition.a(l, this.world.Z() - 1 - blockposition.getY(), i1); blockposition2.getY() >= 0; blockposition2 = blockposition1) {
blockposition1 = blockposition2.down();
if (this.world.getType(blockposition2).getBlock() == Blocks.PORTAL) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 66b7e77..1ef9987 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -60,7 +60,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.manager = new PlayerChunkMap(this, spigotConfig.viewDistance); // Spigot
this.worldProvider.a((World) this);
this.chunkProvider = this.n();
- this.portalTravelAgent = new org.bukkit.craftbukkit.CraftTravelAgent(this); // CraftBukkit
+ this.portalTravelAgent = ((org.bukkit.craftbukkit.CraftTravelAgent) new org.bukkit.craftbukkit.CraftTravelAgent(this).setSearchRadius(paperConfig.portalSearchRadius)); // CraftBukkit // Paper - configurable search radius
this.H();
this.I();
this.getWorldBorder().a(minecraftserver.aD());
--
2.7.2