mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 12:27:59 +01:00
Update PaperSpigot to 1.8.4
This commit is contained in:
parent
80d0e8ffa7
commit
b7ec28b5d2
@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- <artifactId>spigot-api</artifactId>
|
||||
+ <groupId>org.github.paperspigot</groupId>
|
||||
+ <artifactId>paperspigot-api</artifactId>
|
||||
<version>1.8.3-R0.1-SNAPSHOT</version>
|
||||
<version>1.8.4-R0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
- <name>Spigot-API</name>
|
||||
|
@ -8,8 +8,8 @@ diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/m
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ import java.util.Set;
|
||||
import java.util.UUID;
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.generator.ChunkGenerator;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
+// PaperSpigot start
|
||||
@ -19,27 +19,27 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+// PaperSpigot end
|
||||
+
|
||||
// CraftBukkit start
|
||||
import com.google.common.collect.Maps;
|
||||
import java.util.Map;
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
blockposition = new BlockPosition(blockposition.getX(), 0, blockposition.getZ());
|
||||
}
|
||||
|
||||
+ // PaperSpigot start - Configurable async light updates
|
||||
+ // PaperSpigot start - configurable async light updates
|
||||
if (!this.isValidLocation(blockposition)) {
|
||||
return enumskyblock.c;
|
||||
- } else if (!this.isLoaded(blockposition)) {
|
||||
+ }
|
||||
+
|
||||
+ Chunk chunk = this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+ if (chunk == null) {
|
||||
+ if (chunk != null) {
|
||||
return enumskyblock.c;
|
||||
} else {
|
||||
- Chunk chunk = this.getChunkAtWorldCoords(blockposition);
|
||||
-
|
||||
+ // PaperSpigot end
|
||||
return chunk.getBrightness(enumskyblock, blockposition);
|
||||
}
|
||||
+ // PaperSpigot end
|
||||
}
|
||||
|
||||
public void a(EnumSkyBlock enumskyblock, BlockPosition blockposition, int i) {
|
||||
@ -59,8 +59,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
private int a(BlockPosition blockposition, EnumSkyBlock enumskyblock) {
|
||||
- if (enumskyblock == EnumSkyBlock.SKY && this.i(blockposition)) {
|
||||
+ Chunk chunk = this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4); // PaperSpigot - Configurable async light updates
|
||||
+ // PaperSpigot start - Configurable async light updates
|
||||
+ Chunk chunk = this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+ if (chunk == null || (enumskyblock == EnumSkyBlock.SKY && chunk.d(blockposition))) {
|
||||
+ // PaperSpigot end
|
||||
return 15;
|
||||
} else {
|
||||
- Block block = this.getType(blockposition).getBlock();
|
||||
@ -139,7 +141,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public boolean c(final EnumSkyBlock enumskyblock, final BlockPosition blockposition) {
|
||||
+ Callable<Boolean> callable = new Callable<Boolean>() {
|
||||
+ @Override
|
||||
+ public Boolean call() {
|
||||
+ public Boolean call() throws Exception {
|
||||
+ // CraftBukkit start - Use neighbor cache instead of looking up
|
||||
+ Chunk chunk = World.this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
|
||||
+ if (chunk == null || !chunk.areNeighborsLoaded(1) /*!this.areChunksLoaded(blockposition, 17, false)*/) {
|
||||
|
@ -17,7 +17,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ <groupId>org.github.paperspigot</groupId>
|
||||
+ <artifactId>paperspigot</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.8.3-R0.1-SNAPSHOT</version>
|
||||
<version>1.8.4-R0.1-SNAPSHOT</version>
|
||||
- <name>Spigot</name>
|
||||
- <url>http://www.spigotmc.org</url>
|
||||
+ <name>PaperSpigot</name>
|
||||
|
@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jedediah Smith <jedediah@silencegreys.com>
|
||||
Date: Sat, 7 Mar 2015 22:52:21 -0600
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Mon, 18 May 2015 17:52:45 -0500
|
||||
Subject: [PATCH] Player affects spawning API
|
||||
|
||||
|
||||
@ -50,8 +50,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
while (iterator.hasNext()) {
|
||||
EntityHuman entityhuman = (EntityHuman) iterator.next();
|
||||
|
||||
- if (!entityhuman.v()) {
|
||||
+ if (!entityhuman.v() || !entityhuman.affectsSpawning) { // PaperSpigot
|
||||
- if (!entityhuman.isSpectator()) {
|
||||
+ if (!entityhuman.isSpectator() || !entityhuman.affectsSpawning) { // PaperSpigot) {
|
||||
int l = MathHelper.floor(entityhuman.locX / 16.0D);
|
||||
|
||||
j = MathHelper.floor(entityhuman.locZ / 16.0D);
|
||||
@ -68,11 +68,54 @@ diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/m
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
@@ -0,0 +0,0 @@ package net.minecraft.server;
|
||||
|
||||
return k >= -short0 && k <= short0 && l >= -short0 && l <= short0 && this.keepSpawnInMemory; // CraftBukkit - Added 'this.keepSpawnInMemory'
|
||||
}
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.Lists;
|
||||
-import com.google.common.collect.Sets;
|
||||
-import java.util.ArrayList;
|
||||
-import java.util.Calendar;
|
||||
-import java.util.Collection;
|
||||
-import java.util.Iterator;
|
||||
-import java.util.List;
|
||||
-import java.util.Random;
|
||||
-import java.util.Set;
|
||||
-import java.util.UUID;
|
||||
-import java.util.concurrent.Callable;
|
||||
-
|
||||
-// CraftBukkit start
|
||||
import com.google.common.collect.Maps;
|
||||
-import java.util.Map;
|
||||
-
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.block.BlockState;
|
||||
-import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||
-import org.bukkit.craftbukkit.util.LongHashSet;
|
||||
-import org.bukkit.craftbukkit.SpigotTimings; // Spigot
|
||||
-import org.bukkit.generator.ChunkGenerator;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
+import org.bukkit.craftbukkit.SpigotTimings;
|
||||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
+import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||
import org.bukkit.event.block.BlockCanBuildEvent;
|
||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||
-import org.bukkit.event.weather.WeatherChangeEvent;
|
||||
-import org.bukkit.event.weather.ThunderChangeEvent;
|
||||
+import org.bukkit.generator.ChunkGenerator;
|
||||
+
|
||||
+import java.util.*;
|
||||
+import java.util.concurrent.Callable;
|
||||
+
|
||||
+// CraftBukkit start
|
||||
// CraftBukkit end
|
||||
|
||||
public abstract class World implements IBlockAccess {
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
return false;
|
||||
}
|
||||
|
||||
+ // PaperSpigot start - Modified methods for affects spawning
|
||||
+ public EntityHuman findNearbyPlayerWhoAffectsSpawning(Entity entity, double d0) {
|
||||
+ return this.findNearbyPlayerWhoAffectsSpawning(entity.locX, entity.locY, entity.locZ, d0);
|
||||
@ -118,11 +161,23 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ return false;
|
||||
+ }
|
||||
}
|
||||
+ // PaperSpigot end
|
||||
+
|
||||
public EntityHuman a(String s) {
|
||||
for (int i = 0; i < this.players.size(); ++i) {
|
||||
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@ import io.netty.buffer.Unpooled;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
+import java.lang.Override;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.SocketAddress;
|
||||
import java.util.ArrayList;
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
packet.components = components;
|
||||
getHandle().playerConnection.sendPacket(packet);
|
||||
|
@ -1,6 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Sat, 7 Mar 2015 19:44:29 -0600
|
||||
Date: Mon, 18 May 2015 17:32:46 -0500
|
||||
Subject: [PATCH] mc-dev imports
|
||||
|
||||
|
||||
@ -917,6 +917,4 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
1.9.4.msysgit.2
|
||||
|
||||
--
|
Loading…
Reference in New Issue
Block a user