mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-13 16:54:08 +00:00
Preventing mysterious Magnet from picking up player's own shot projectiles. Doesn't _really_ fix #96, but it's the best I can do without special-casing to hell and back again. |:
This commit is contained in:
1 parent
af44fb9d89
commit
2503c94b83
1 file changed
+2
-1
@@ -168,7 +168,8 @@ public class ItemMysteriousMagnet extends Item implements IBauble {
|
||||
List<EntityArrow> arrows = world.getEntitiesWithinAABB(EntityArrow.class, bounds);
|
||||
|
||||
for (EntityArrow arrow : arrows) {
|
||||
if (arrow.canBePickedUp == 1 || world.rand.nextFloat() < 0.3f) {
|
||||
if ((arrow.canBePickedUp == 1 || world.rand.nextFloat() < 0.3f)
|
||||
&& arrow.shootingEntity != entity) {
|
||||
EntityItem replacement = new EntityItem(world, arrow.posX, arrow.posY, arrow.posZ,
|
||||
new ItemStack(Items.arrow));
|
||||
world.spawnEntityInWorld(replacement);
|
||||
|
||||
Reference in new issue
Block a user