mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2024-12-24 01:37:35 +01:00
Removed debug code, fix items disappearing in 1_7_R4 and 1_8_R1 (if they
did).
This commit is contained in:
parent
3c76b112ca
commit
0ef657c051
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user