Revert "Remove getCubes patch as under some circumstances it can loop around itself forever. For anyone wishing to reimplement this patch, the rationale behind it is quite simple, get all cubes within each chunk at the same time."

This reverts commit 5261962003.

By: md_5 <git@md-5.net>
This commit is contained in:
Spigot
2013-12-22 10:03:57 +11:00
parent 7de62a057d
commit 7d692a40aa
74 changed files with 68 additions and 7044 deletions

View File

@@ -1,27 +0,0 @@
From c12b6f2d2cb6e070537ab39f6cffd1d842b74a2c Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Fri, 28 Jun 2013 19:52:54 +1000
Subject: [PATCH] Disallow Interaction With Self
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 31be464..6e54ad1 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1047,6 +1047,13 @@ public class PlayerConnection implements PacketPlayInListener {
if (this.player.dead) return; // CraftBukkit
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
Entity entity = packetplayinuseentity.a((World) worldserver);
+ // Spigot Start
+ if ( entity == player )
+ {
+ disconnect( "Cannot interact with self!" );
+ return;
+ }
+ // Spigot End
this.player.w();
if (entity != null) {
--
1.8.3.2