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 @Override
public void h() { public void h() {
// Checks every 20 ticks.
if (ticksLived % 20 == 0) { // So it won't get removed.
// The item dies without a vehicle. ticksLived = 0;
if (this.vehicle == null) {
die();
}
}
if (!lockTick) { if (!lockTick) {
super.h(); super.h();
@ -102,6 +98,15 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
return true; return true;
} }
@Override
public void inactiveTick() {
// Check inactive ticks.
if (!lockTick) {
super.inactiveTick();
}
}
@Override @Override
public void setLockTick(boolean lock) { public void setLockTick(boolean lock) {
lockTick = lock; lockTick = lock;

View File

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

View File

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