Removed debug code, fix items disappearing in 1_7_R4 and 1_8_R1 (if they

did).
This commit is contained in:
filoghost 2015-04-17 10:18:32 +02:00
parent 3c76b112ca
commit 0ef657c051
3 changed files with 24 additions and 16 deletions

View File

@ -36,13 +36,9 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
@Override
public void h() {
// Checks every 20 ticks.
if (ticksLived % 20 == 0) {
// The item dies without a vehicle.
if (this.vehicle == null) {
die();
}
}
// So it won't get removed.
ticksLived = 0;
if (!lockTick) {
super.h();
@ -101,6 +97,15 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
*/
return true;
}
@Override
public void inactiveTick() {
// Check inactive ticks.
if (!lockTick) {
super.inactiveTick();
}
}
@Override
public void setLockTick(boolean lock) {

View File

@ -37,13 +37,9 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
@Override
public void s_() {
// Checks every 20 ticks.
if (ticksLived % 20 == 0) {
// The item dies without a vehicle.
if (this.vehicle == null) {
die();
}
}
// So it won't get removed.
ticksLived = 0;
if (!lockTick) {
super.s_();
@ -107,6 +103,15 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
*/
return true;
}
@Override
public void inactiveTick() {
// Check inactive ticks.
if (!lockTick) {
super.inactiveTick();
}
}
@Override
public void setLockTick(boolean lock) {

View File

@ -120,8 +120,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
@Override
public void die() {
System.out.println("Hologram Item died:");
Thread.dumpStack();
setLockTick(false);
super.die();
}