Updated patch
This commit is contained in:
parent
0284fed2a9
commit
2062ca7efc
@ -0,0 +1,60 @@
|
||||
From 48550b9915d18d2d4a528c4028c8fa35a97a036c Mon Sep 17 00:00:00 2001
|
||||
From: git <libraryaddict115@yahoo.co.nz>
|
||||
Date: Tue, 1 Mar 2016 09:29:32 +1300
|
||||
Subject: [PATCH] Update to 1.9, fix blocking
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 2f52ea2..c2ce92f 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1745,6 +1745,14 @@ public abstract class Entity implements ICommandListener {
|
||||
}
|
||||
|
||||
public void f(boolean flag) {
|
||||
+ if (this instanceof EntityPlayer)
|
||||
+ {
|
||||
+ EntityPlayer player = (EntityPlayer) this;
|
||||
+
|
||||
+ if (player.playerConnection.networkManager.getVersion() != 47 && player.bS() && player.getHeldItem().getItem().e(player.getHeldItem()) == EnumAnimation.BLOCK)
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
this.b(4, flag);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index 743df69..998ea69 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -124,8 +124,13 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
|
||||
}
|
||||
|
||||
+ public ItemStack getHeldItem()
|
||||
+ {
|
||||
+ return this.g;
|
||||
+ }
|
||||
+
|
||||
public boolean isBlocking() {
|
||||
- return this.bS() && this.g.getItem().e(this.g) == EnumAnimation.BLOCK;
|
||||
+ return ((EntityPlayer) this).playerConnection.networkManager.getVersion() == 47 && this.bS() && this.g.getItem().e(this.g) == EnumAnimation.BLOCK;
|
||||
}
|
||||
|
||||
public void t_() {
|
||||
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
index 21dbf3b..0d8aff4 100644
|
||||
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
@@ -25,7 +25,7 @@ public class HandshakeListener implements PacketHandshakingInListener {
|
||||
|
||||
int version = packethandshakinginsetprotocol.b();
|
||||
//System.out.print(version);
|
||||
- boolean supported = version == 47 || version >= 104;
|
||||
+ boolean supported = version == 47 || version == 107;
|
||||
|
||||
if (supported)
|
||||
{
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
Loading…
Reference in New Issue
Block a user