Fix arrows and fireworks not having their despawn counters ticked when inactive
By: Thinkofdeath <thethinkofdeath@gmail.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 6232c33ae23c495c7aebf1e6575a39d2132ff76c Mon Sep 17 00:00:00 2001
|
||||
From ab979a085fe27c1d0b799b69288544965117daa3 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 3 Feb 2013 05:10:21 -0500
|
||||
Subject: [PATCH] Entity Activation Range
|
||||
@@ -85,7 +85,7 @@ index 36ed831..7ddca48 100644
|
||||
super(world);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
index 3628774..c2afb17 100644
|
||||
index 3628774..3137bcf 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
@@ -15,7 +15,7 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
@@ -97,6 +97,45 @@ index 3628774..c2afb17 100644
|
||||
public int fromPlayer;
|
||||
public int shake;
|
||||
public Entity shooter;
|
||||
@@ -24,6 +24,18 @@ public class EntityArrow extends Entity implements IProjectile {
|
||||
private double damage = 2.0D;
|
||||
public int knockbackStrength; // CraftBukkit - private -> public
|
||||
|
||||
+ // Spigot Start
|
||||
+ @Override
|
||||
+ public void inactiveTick()
|
||||
+ {
|
||||
+ if ( this.inGround )
|
||||
+ {
|
||||
+ this.at += 19; // Despawn counter. First int after shooter
|
||||
+ }
|
||||
+ super.inactiveTick();
|
||||
+ }
|
||||
+ // Spigot End
|
||||
+
|
||||
public EntityArrow(World world) {
|
||||
super(world);
|
||||
this.j = 10.0D;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||
index a228a2c..0a81006 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||
@@ -5,6 +5,15 @@ public class EntityFireworks extends Entity {
|
||||
private int ticksFlown;
|
||||
public int expectedLifespan; // CraftBukkit - private -> public
|
||||
|
||||
+ // Spigot Start
|
||||
+ @Override
|
||||
+ public void inactiveTick()
|
||||
+ {
|
||||
+ this.ticksFlown += 19;
|
||||
+ super.inactiveTick();
|
||||
+ }
|
||||
+ // Spigot End
|
||||
+
|
||||
public EntityFireworks(World world) {
|
||||
super(world);
|
||||
this.a(0.25F, 0.25F);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index f90e2a3..6c77253 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -477,5 +516,5 @@ index 46249d7..ed2836a 100644
|
||||
+ }
|
||||
}
|
||||
--
|
||||
1.8.3.2
|
||||
1.8.5.2.msysgit.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user