mirror of
https://github.com/filoghost/HolographicDisplays.git
synced 2025-02-23 07:21:20 +01:00
Fix for PickupHandler API not working (should have no side effects)
This commit is contained in:
parent
3db7b3dbd5
commit
0054bb47c8
@ -39,7 +39,6 @@ import net.minecraft.server.v1_10_R1.NBTTagList;
|
||||
import net.minecraft.server.v1_10_R1.NBTTagString;
|
||||
import net.minecraft.server.v1_10_R1.PacketPlayOutMount;
|
||||
import net.minecraft.server.v1_10_R1.World;
|
||||
import net.minecraft.server.v1_10_R1.AxisAlignedBB;
|
||||
|
||||
public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
|
||||
@ -56,7 +55,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
super.pickupDelay = Integer.MAX_VALUE;
|
||||
this.parentPiece = piece;
|
||||
this.itemPickupManager = itemPickupManager;
|
||||
forceSetBoundingBox(new NullBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -153,15 +151,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(AxisAlignedBB boundingBox) {
|
||||
// Do not change it!
|
||||
}
|
||||
|
||||
public void forceSetBoundingBox(AxisAlignedBB boundingBox) {
|
||||
super.a(boundingBox);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inactiveTick() {
|
||||
// Check inactive ticks.
|
||||
@ -180,6 +169,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
public void die() {
|
||||
// Prevent being killed.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAlive() {
|
||||
// This override prevents items from being picked up by hoppers.
|
||||
// Should have no side effects.
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
|
@ -37,7 +37,6 @@ import net.minecraft.server.v1_11_R1.NBTTagCompound;
|
||||
import net.minecraft.server.v1_11_R1.NBTTagList;
|
||||
import net.minecraft.server.v1_11_R1.NBTTagString;
|
||||
import net.minecraft.server.v1_11_R1.World;
|
||||
import net.minecraft.server.v1_11_R1.AxisAlignedBB;
|
||||
|
||||
public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
|
||||
@ -52,7 +51,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
super.pickupDelay = 32767; // Lock the item pickup delay, also prevents entities from picking up the item
|
||||
this.parentPiece = piece;
|
||||
this.itemPickupManager = itemPickupManager;
|
||||
forceSetBoundingBox(new NullBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -129,15 +127,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(AxisAlignedBB boundingBox) {
|
||||
// Do not change it!
|
||||
}
|
||||
|
||||
public void forceSetBoundingBox(AxisAlignedBB boundingBox) {
|
||||
super.a(boundingBox);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inactiveTick() {
|
||||
// Check inactive ticks.
|
||||
@ -156,6 +145,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
public void die() {
|
||||
// Prevent being killed.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAlive() {
|
||||
// This override prevents items from being picked up by hoppers.
|
||||
// Should have no side effects.
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
|
@ -37,7 +37,6 @@ import net.minecraft.server.v1_12_R1.NBTTagCompound;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagList;
|
||||
import net.minecraft.server.v1_12_R1.NBTTagString;
|
||||
import net.minecraft.server.v1_12_R1.World;
|
||||
import net.minecraft.server.v1_12_R1.AxisAlignedBB;
|
||||
|
||||
public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
|
||||
@ -52,7 +51,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
super.pickupDelay = 32767; // Lock the item pickup delay, also prevents entities from picking up the item
|
||||
this.parentPiece = piece;
|
||||
this.itemPickupManager = itemPickupManager;
|
||||
forceSetBoundingBox(new NullBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -129,15 +127,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(AxisAlignedBB boundingBox) {
|
||||
// Do not change it!
|
||||
}
|
||||
|
||||
public void forceSetBoundingBox(AxisAlignedBB boundingBox) {
|
||||
super.a(boundingBox);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inactiveTick() {
|
||||
// Check inactive ticks.
|
||||
@ -156,6 +145,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
public void die() {
|
||||
// Prevent being killed.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAlive() {
|
||||
// This override prevents items from being picked up by hoppers.
|
||||
// Should have no side effects.
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
|
@ -26,7 +26,6 @@ import com.gmail.filoghost.holographicdisplays.util.ConsoleLogger;
|
||||
import com.gmail.filoghost.holographicdisplays.util.ItemUtils;
|
||||
import com.gmail.filoghost.holographicdisplays.util.reflection.ReflectField;
|
||||
|
||||
import net.minecraft.server.v1_13_R1.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_13_R1.Blocks;
|
||||
import net.minecraft.server.v1_13_R1.DamageSource;
|
||||
import net.minecraft.server.v1_13_R1.Entity;
|
||||
@ -52,7 +51,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
super.pickupDelay = 32767; // Lock the item pickup delay, also prevents entities from picking up the item
|
||||
this.parentPiece = piece;
|
||||
this.itemPickupManager = itemPickupManager;
|
||||
forceSetBoundingBox(new NullBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -129,15 +127,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(AxisAlignedBB boundingBox) {
|
||||
// Do not change it!
|
||||
}
|
||||
|
||||
public void forceSetBoundingBox(AxisAlignedBB boundingBox) {
|
||||
super.a(boundingBox);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inactiveTick() {
|
||||
// Check inactive ticks.
|
||||
@ -156,6 +145,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
public void die() {
|
||||
// Prevent being killed.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAlive() {
|
||||
// This override prevents items from being picked up by hoppers.
|
||||
// Should have no side effects.
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
|
@ -26,7 +26,6 @@ import com.gmail.filoghost.holographicdisplays.util.ConsoleLogger;
|
||||
import com.gmail.filoghost.holographicdisplays.util.ItemUtils;
|
||||
import com.gmail.filoghost.holographicdisplays.util.reflection.ReflectField;
|
||||
|
||||
import net.minecraft.server.v1_13_R2.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_13_R2.Blocks;
|
||||
import net.minecraft.server.v1_13_R2.DamageSource;
|
||||
import net.minecraft.server.v1_13_R2.Entity;
|
||||
@ -52,7 +51,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
super.pickupDelay = 32767; // Lock the item pickup delay, also prevents entities from picking up the item
|
||||
this.parentPiece = piece;
|
||||
this.itemPickupManager = itemPickupManager;
|
||||
forceSetBoundingBox(new NullBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -129,15 +127,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(AxisAlignedBB boundingBox) {
|
||||
// Do not change it!
|
||||
}
|
||||
|
||||
public void forceSetBoundingBox(AxisAlignedBB boundingBox) {
|
||||
super.a(boundingBox);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inactiveTick() {
|
||||
// Check inactive ticks.
|
||||
@ -156,6 +145,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
public void die() {
|
||||
// Prevent being killed.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAlive() {
|
||||
// This override prevents items from being picked up by hoppers.
|
||||
// Should have no side effects.
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
|
@ -26,7 +26,6 @@ import com.gmail.filoghost.holographicdisplays.util.ConsoleLogger;
|
||||
import com.gmail.filoghost.holographicdisplays.util.ItemUtils;
|
||||
import com.gmail.filoghost.holographicdisplays.util.reflection.ReflectField;
|
||||
|
||||
import net.minecraft.server.v1_8_R1.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_8_R1.Blocks;
|
||||
import net.minecraft.server.v1_8_R1.DamageSource;
|
||||
import net.minecraft.server.v1_8_R1.Entity;
|
||||
@ -53,7 +52,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
super.pickupDelay = Integer.MAX_VALUE;
|
||||
this.parentPiece = piece;
|
||||
this.itemPickupManager = itemPickupManager;
|
||||
forceSetBoundingBox(new NullBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -114,15 +112,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(AxisAlignedBB boundingBox) {
|
||||
// Do not change it!
|
||||
}
|
||||
|
||||
public void forceSetBoundingBox(AxisAlignedBB boundingBox) {
|
||||
super.a(boundingBox);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inactiveTick() {
|
||||
// Check inactive ticks.
|
||||
@ -142,6 +131,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
setLockTick(false);
|
||||
super.die();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAlive() {
|
||||
// This override prevents items from being picked up by hoppers.
|
||||
// Should have no side effects.
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
|
@ -26,7 +26,6 @@ import com.gmail.filoghost.holographicdisplays.util.ConsoleLogger;
|
||||
import com.gmail.filoghost.holographicdisplays.util.ItemUtils;
|
||||
import com.gmail.filoghost.holographicdisplays.util.reflection.ReflectField;
|
||||
|
||||
import net.minecraft.server.v1_8_R2.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_8_R2.Blocks;
|
||||
import net.minecraft.server.v1_8_R2.DamageSource;
|
||||
import net.minecraft.server.v1_8_R2.Entity;
|
||||
@ -53,7 +52,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
super.pickupDelay = Integer.MAX_VALUE;
|
||||
this.parentPiece = piece;
|
||||
this.itemPickupManager = itemPickupManager;
|
||||
forceSetBoundingBox(new NullBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -114,15 +112,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(AxisAlignedBB boundingBox) {
|
||||
// Do not change it!
|
||||
}
|
||||
|
||||
public void forceSetBoundingBox(AxisAlignedBB boundingBox) {
|
||||
super.a(boundingBox);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inactiveTick() {
|
||||
// Check inactive ticks.
|
||||
@ -142,6 +131,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
setLockTick(false);
|
||||
super.die();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAlive() {
|
||||
// This override prevents items from being picked up by hoppers.
|
||||
// Should have no side effects.
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
|
@ -26,7 +26,6 @@ import com.gmail.filoghost.holographicdisplays.util.ConsoleLogger;
|
||||
import com.gmail.filoghost.holographicdisplays.util.ItemUtils;
|
||||
import com.gmail.filoghost.holographicdisplays.util.reflection.ReflectField;
|
||||
|
||||
import net.minecraft.server.v1_8_R3.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_8_R3.Blocks;
|
||||
import net.minecraft.server.v1_8_R3.DamageSource;
|
||||
import net.minecraft.server.v1_8_R3.Entity;
|
||||
@ -53,7 +52,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
super.pickupDelay = Integer.MAX_VALUE;
|
||||
this.parentPiece = piece;
|
||||
this.itemPickupManager = itemPickupManager;
|
||||
forceSetBoundingBox(new NullBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -114,15 +112,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(AxisAlignedBB boundingBox) {
|
||||
// Do not change it!
|
||||
}
|
||||
|
||||
public void forceSetBoundingBox(AxisAlignedBB boundingBox) {
|
||||
super.a(boundingBox);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inactiveTick() {
|
||||
// Check inactive ticks.
|
||||
@ -142,6 +131,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
setLockTick(false);
|
||||
super.die();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAlive() {
|
||||
// This override prevents items from being picked up by hoppers.
|
||||
// Should have no side effects.
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
|
@ -27,7 +27,6 @@ import com.gmail.filoghost.holographicdisplays.util.ItemUtils;
|
||||
import com.gmail.filoghost.holographicdisplays.util.Utils;
|
||||
import com.gmail.filoghost.holographicdisplays.util.reflection.ReflectField;
|
||||
|
||||
import net.minecraft.server.v1_9_R1.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_9_R1.Blocks;
|
||||
import net.minecraft.server.v1_9_R1.DamageSource;
|
||||
import net.minecraft.server.v1_9_R1.Entity;
|
||||
@ -56,7 +55,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
super.pickupDelay = Integer.MAX_VALUE;
|
||||
this.parentPiece = piece;
|
||||
this.itemPickupManager = itemPickupManager;
|
||||
forceSetBoundingBox(new NullBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -152,15 +150,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(AxisAlignedBB boundingBox) {
|
||||
// Do not change it!
|
||||
}
|
||||
|
||||
public void forceSetBoundingBox(AxisAlignedBB boundingBox) {
|
||||
super.a(boundingBox);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inactiveTick() {
|
||||
// Check inactive ticks.
|
||||
@ -179,6 +168,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
public void die() {
|
||||
// Prevent being killed.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAlive() {
|
||||
// This override prevents items from being picked up by hoppers.
|
||||
// Should have no side effects.
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
|
@ -27,7 +27,6 @@ import com.gmail.filoghost.holographicdisplays.util.ItemUtils;
|
||||
import com.gmail.filoghost.holographicdisplays.util.Utils;
|
||||
import com.gmail.filoghost.holographicdisplays.util.reflection.ReflectField;
|
||||
|
||||
import net.minecraft.server.v1_9_R2.AxisAlignedBB;
|
||||
import net.minecraft.server.v1_9_R2.Blocks;
|
||||
import net.minecraft.server.v1_9_R2.DamageSource;
|
||||
import net.minecraft.server.v1_9_R2.Entity;
|
||||
@ -56,7 +55,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
super.pickupDelay = Integer.MAX_VALUE;
|
||||
this.parentPiece = piece;
|
||||
this.itemPickupManager = itemPickupManager;
|
||||
forceSetBoundingBox(new NullBoundingBox());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -153,15 +151,6 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void a(AxisAlignedBB boundingBox) {
|
||||
// Do not change it!
|
||||
}
|
||||
|
||||
public void forceSetBoundingBox(AxisAlignedBB boundingBox) {
|
||||
super.a(boundingBox);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void inactiveTick() {
|
||||
// Check inactive ticks.
|
||||
@ -180,6 +169,13 @@ public class EntityNMSItem extends EntityItem implements NMSItem {
|
||||
public void die() {
|
||||
// Prevent being killed.
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAlive() {
|
||||
// This override prevents items from being picked up by hoppers.
|
||||
// Should have no side effects.
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CraftEntity getBukkitEntity() {
|
||||
|
Loading…
Reference in New Issue
Block a user