Mineplex2018-withcommit/Patches/CraftBukkit-Patches/0009-Controller-look-vegetateHead-Entity-collide-changes.patch

44 lines
1.6 KiB
Diff
Raw Normal View History

2016-02-14 23:58:33 +01:00
From a48503259a76ca5b9fec3bd7ec06e0e5c1d3f8e1 Mon Sep 17 00:00:00 2001
2015-10-30 08:26:13 +01:00
From: libraryaddict <libraryaddict115@yahoo.co.nz>
Date: Fri, 30 Oct 2015 20:02:58 +1300
Subject: [PATCH] Controller look vegetateHead, Entity collide changes
diff --git a/src/main/java/net/minecraft/server/ControllerLook.java b/src/main/java/net/minecraft/server/ControllerLook.java
index 2263d5d..f2d7b1e 100644
--- a/src/main/java/net/minecraft/server/ControllerLook.java
+++ b/src/main/java/net/minecraft/server/ControllerLook.java
@@ -37,9 +37,15 @@ public class ControllerLook
this.d = true;
}
+ public void vegetateHead(boolean vegetate)
+ {
+ _vegeHead = vegetate;
+ }
+
+ private boolean _vegeHead;
+
public void a() {
- if (a.isVegetated())
- return;
+ if (_vegeHead)return;
this.a.pitch = 0.0F;
if (this.d) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index cb9ba53..8660762 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1087,6 +1087,7 @@ public abstract class Entity implements ICommandListener {
int numCollisions = 0; // Spigot
public void collide(Entity entity) {
if (entity.passenger != this && entity.vehicle != this) {
+ if ((!(entity instanceof EntityLiving) || !((EntityLiving) entity).isGhost()) && (!(this instanceof EntityLiving) || !((EntityLiving) this).isGhost()))
if (!entity.noclip && !this.noclip) {
double d0 = entity.locX - this.locX;
double d1 = entity.locZ - this.locZ;
--
2016-02-14 23:58:33 +01:00
2.5.0
2015-10-30 08:26:13 +01:00