3
0

Implement Bukkit's inventory for modded inventories, fix #257

This commit is contained in:
Sergey Shatunov
2016-02-01 04:54:40 +07:00
parent e3bc245aa4
commit 6c2be10dc9
4 changed files with 165 additions and 27 deletions

View File

@ -1818,7 +1818,7 @@
finally
{
@@ -1135,19 +2442,18 @@
{
if (itemstack.getItem() == Items.written_book && itemstack1.getItem() == Items.writable_book)
{
- itemstack1.setTagInfo("author", new NBTTagString(this.playerEntity.getCommandSenderName()));

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/network/rcon/RConThreadClient.java
+++ ../src-work/minecraft/net/minecraft/network/rcon/RConThreadClient.java
@@ -41,20 +41,21 @@
@@ -41,9 +41,9 @@
public void run()
{
@ -10,24 +10,22 @@
- try
+ while (true)
{
- if (!this.running)
+ if (!this.running || clientSocket == null)
if (!this.running)
{
break;
}
@@ -53,6 +53,12 @@
BufferedInputStream bufferedinputstream = new BufferedInputStream(this.clientSocket.getInputStream());
int i = bufferedinputstream.read(this.buffer, 0, 1460);
-
- if (10 > i)
+
+ if (i < 10)
{
+ this.running = false; // Cauldron
return;
}
@@ -110,26 +111,23 @@
+ if (i < 10)
+ {
+ this.running = false; // Cauldron
+ return;
+ }
+
if (10 <= i)
{
byte b0 = 0;
@@ -110,26 +116,23 @@
}
}
}
@ -57,7 +55,7 @@
}
private void sendResponse(int p_72654_1_, int p_72654_2_, String p_72654_3_) throws IOException
@@ -167,6 +165,7 @@
@@ -167,6 +170,7 @@
private void closeSocket()
{