Update CB
This commit is contained in:
parent
c3e11e87ea
commit
b1c6af4d1a
@ -0,0 +1,68 @@
|
||||
From 3b4526267e3bd53d9e70578ec1c7a8cd13038e73 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Fri, 27 Nov 2015 22:26:34 +1300
|
||||
Subject: [PATCH] Server freezing, fix fake yaw/pitch
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 7165579..4f366da 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -5,6 +5,7 @@ import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.Callable;
|
||||
+import com.google.common.primitives.Doubles;
|
||||
|
||||
// CraftBukkit start
|
||||
import org.bukkit.Bukkit;
|
||||
@@ -153,6 +154,12 @@ public abstract class Entity implements ICommandListener {
|
||||
public void setFakeHead(boolean fakeHead)
|
||||
{
|
||||
_fakeHead = fakeHead;
|
||||
+
|
||||
+ if (!isFakeHead())
|
||||
+ {
|
||||
+ this.fakeYaw = yaw;
|
||||
+ this.fakePitch = pitch;
|
||||
+ }
|
||||
}
|
||||
|
||||
public boolean isSilent()
|
||||
@@ -1024,9 +1031,18 @@ public abstract class Entity implements ICommandListener {
|
||||
this.lastX = this.locX = d0;
|
||||
this.lastY = this.locY = d1;
|
||||
this.lastZ = this.locZ = d2;
|
||||
- this.lastYaw = this.yaw = fakeYaw = f;
|
||||
- this.lastPitch = this.pitch = fakePitch = f1;
|
||||
+ this.lastYaw = this.yaw = f;
|
||||
+ this.lastPitch = this.pitch = f1;
|
||||
+
|
||||
+ if (!isFakeHead())
|
||||
+ {
|
||||
+ this.fakeYaw = yaw;
|
||||
+ this.fakePitch = pitch;
|
||||
+ }
|
||||
|
||||
+ if (!Doubles.isFinite(locX) || !Doubles.isFinite(locY) || !Doubles.isFinite(locZ))
|
||||
+ Thread.dumpStack();
|
||||
+
|
||||
if (this instanceof EntityLiving)
|
||||
((EntityLiving) this).aK = f;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 5edef3e..d3b1586 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -208,7 +208,7 @@ public class PlayerConnection implements PacketListenerPlayIn, IUpdatePlayerList
|
||||
|
||||
public void a(PacketPlayInFlying packetplayinflying) {
|
||||
PlayerConnectionUtils.ensureMainThread(packetplayinflying, this, this.player.u());
|
||||
- if (this.b(packetplayinflying)) {
|
||||
+ if (this.b(packetplayinflying) || !Doubles.isFinite(player.locX) || !Doubles.isFinite(player.locY) || !Doubles.isFinite(player.locZ)) {
|
||||
this.disconnect("Invalid move packet received");
|
||||
} else {
|
||||
WorldServer worldserver = this.minecraftServer.getWorldServer(this.player.dimension);
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
@ -0,0 +1,47 @@
|
||||
From 2522a926e6cc670f4f10657ea5494b5ffe81eb37 Mon Sep 17 00:00:00 2001
|
||||
From: libraryaddict <libraryaddict115@yahoo.co.nz>
|
||||
Date: Tue, 12 Jan 2016 19:56:07 +1300
|
||||
Subject: [PATCH] Sound and vehicle fixes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 4f366da..fc9cce0 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1628,11 +1628,13 @@ public abstract class Entity implements ICommandListener {
|
||||
EntityDismountEvent exitEvent1 = null;
|
||||
if (this.vehicle != null) {
|
||||
if ((this.bukkitEntity instanceof LivingEntity) && (entity.getBukkitEntity() instanceof Vehicle))
|
||||
+ {
|
||||
exitEvent = new VehicleExitEvent((Vehicle) this.vehicle.getBukkitEntity(), (LivingEntity) this.bukkitEntity);
|
||||
- pluginManager.callEvent(exitEvent);
|
||||
+ pluginManager.callEvent(exitEvent);
|
||||
|
||||
- if (exitEvent.isCancelled() || this.vehicle != originalVehicle || (this.vehicle != null && this.vehicle.passenger != originalPassenger)) {
|
||||
- return;
|
||||
+ if (exitEvent.isCancelled() || this.vehicle != originalVehicle || (this.vehicle != null && this.vehicle.passenger != originalPassenger)) {
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
|
||||
exitEvent1 = new EntityDismountEvent(this.vehicle.getBukkitEntity(), this.bukkitEntity);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
index 0cc8f9b..dd07600 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
@@ -14,9 +14,9 @@ public class CraftSound {
|
||||
set(AMBIENCE_RAIN, "ambient.weather.rain");
|
||||
set(AMBIENCE_THUNDER, "ambient.weather.thunder");
|
||||
// Damage
|
||||
- set(HURT_FLESH, "game.neutral.hurt");
|
||||
- set(FALL_BIG, "game.neutral.hurt.fall.big");
|
||||
- set(FALL_SMALL, "game.neutral.hurt.fall.small");
|
||||
+ set(HURT_FLESH, "game.player.hurt");
|
||||
+ set(FALL_BIG, "game.player.hurt.fall.big");
|
||||
+ set(FALL_SMALL, "game.player.hurt.fall.small");
|
||||
// Dig Sounds
|
||||
set(DIG_WOOL, "dig.cloth");
|
||||
set(DIG_GRASS, "dig.grass");
|
||||
--
|
||||
1.9.5.msysgit.0
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user