Ops, now it's fixed.

This commit is contained in:
filoghost 2014-08-11 21:33:57 +02:00
parent 0b47982927
commit 9ba424e749
5 changed files with 5 additions and 5 deletions

View File

@ -45,7 +45,7 @@ public class EntityCustomItem extends EntityItem implements CustomItem, BasicEnt
public ItemStack getItemStack() {
// Dirty method to check if the icon is being picked up
StackTraceElement[] stacktrace = Thread.currentThread().getStackTrace();
if (stacktrace.length >= 2 && stacktrace[1].getClassName().contains("EntityInsentient")) {
if (stacktrace.length > 2 && stacktrace[2].getClassName().contains("EntityInsentient")) {
return null; // Try to pickup this, dear entity ignoring the pickupDelay!
}

View File

@ -45,7 +45,7 @@ public class EntityCustomItem extends EntityItem implements CustomItem, BasicEnt
public ItemStack getItemStack() {
// Dirty method to check if the icon is being picked up
StackTraceElement[] stacktrace = Thread.currentThread().getStackTrace();
if (stacktrace.length >= 2 && stacktrace[1].getClassName().contains("EntityInsentient")) {
if (stacktrace.length > 2 && stacktrace[2].getClassName().contains("EntityInsentient")) {
return null; // Try to pickup this, dear entity ignoring the pickupDelay!
}

View File

@ -45,7 +45,7 @@ public class EntityCustomItem extends EntityItem implements CustomItem, BasicEnt
public ItemStack getItemStack() {
// Dirty method to check if the icon is being picked up
StackTraceElement[] stacktrace = Thread.currentThread().getStackTrace();
if (stacktrace.length >= 2 && stacktrace[1].getClassName().contains("EntityInsentient")) {
if (stacktrace.length > 2 && stacktrace[2].getClassName().contains("EntityInsentient")) {
return null; // Try to pickup this, dear entity ignoring the pickupDelay!
}

View File

@ -44,7 +44,7 @@ public class EntityCustomItem extends EntityItem implements CustomItem, BasicEnt
public ItemStack getItemStack() {
// Dirty method to check if the icon is being picked up
StackTraceElement[] stacktrace = Thread.currentThread().getStackTrace();
if (stacktrace.length >= 2 && stacktrace[1].getClassName().contains("EntityInsentient")) {
if (stacktrace.length > 2 && stacktrace[2].getClassName().contains("EntityInsentient")) {
return null; // Try to pickup this, dear entity ignoring the pickupDelay!
}

View File

@ -45,7 +45,7 @@ public class EntityCustomItem extends EntityItem implements CustomItem, BasicEnt
public ItemStack getItemStack() {
// Dirty method to check if the icon is being picked up
StackTraceElement[] stacktrace = Thread.currentThread().getStackTrace();
if (stacktrace.length >= 2 && stacktrace[1].getClassName().contains("EntityInsentient")) {
if (stacktrace.length > 2 && stacktrace[2].getClassName().contains("EntityInsentient")) {
return null; // Try to pickup this, dear entity ignoring the pickupDelay!
}