diff --git a/MODSRC/vazkii/botania/common/item/ItemLens.java b/MODSRC/vazkii/botania/common/item/ItemLens.java index f9344125c..883dec816 100644 --- a/MODSRC/vazkii/botania/common/item/ItemLens.java +++ b/MODSRC/vazkii/botania/common/item/ItemLens.java @@ -20,10 +20,14 @@ import java.util.Map; import net.minecraft.block.Block; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; +import net.minecraft.entity.item.EntityFallingBlock; import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.item.EntityXPOrb; import net.minecraft.entity.passive.EntitySheep; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -51,6 +55,8 @@ import vazkii.botania.common.core.helper.ItemNBTHelper; import vazkii.botania.common.core.helper.MathHelper; import vazkii.botania.common.core.helper.Vector3; import vazkii.botania.common.crafting.recipe.CompositeLensRecipe; +import vazkii.botania.common.entity.EntityManaBurst; +import vazkii.botania.common.entity.EntityPixie; import vazkii.botania.common.lib.LibItemNames; import cpw.mods.fml.common.registry.GameRegistry; @@ -58,7 +64,7 @@ public class ItemLens extends ItemMod implements ILens { private static final int NORMAL = 0, SPEED = 1, POWER = 2, TIME = 3, EFFICIENCY = 4, BOUNCE = 5, GRAVITY = 6, MINE = 7, DAMAGE = 8, PHANTOM = 9, - MAGNET = 10, EXPLOSIVE = 11; + MAGNET = 10, EXPLOSIVE = 11, INFLUENCE = 12; private static final Map> blacklist = new HashMap(); @@ -75,7 +81,7 @@ public class ItemLens extends ItemMod implements ILens { public static IIcon iconGlass; - public static final int SUBTYPES = 12; + public static final int SUBTYPES = 13; IIcon[] ringIcons; public ItemLens() { @@ -345,6 +351,23 @@ public class ItemLens extends ItemMod implements ILens { } } } + break; + } + case INFLUENCE : { + double range = 3.5; + List movables = entity.worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(entity.posX - range, entity.posY - range, entity.posZ - range, entity.posX + range, entity.posY + range, entity.posZ + range)); + movables.addAll(entity.worldObj.getEntitiesWithinAABB(EntityXPOrb.class, AxisAlignedBB.getBoundingBox(entity.posX - range, entity.posY - range, entity.posZ - range, entity.posX + range, entity.posY + range, entity.posZ + range))); + movables.addAll(entity.worldObj.getEntitiesWithinAABB(EntityManaBurst.class, AxisAlignedBB.getBoundingBox(entity.posX - range, entity.posY - range, entity.posZ - range, entity.posX + range, entity.posY + range, entity.posZ + range))); + movables.addAll(entity.worldObj.getEntitiesWithinAABB(EntityArrow.class, AxisAlignedBB.getBoundingBox(entity.posX - range, entity.posY - range, entity.posZ - range, entity.posX + range, entity.posY + range, entity.posZ + range))); + movables.addAll(entity.worldObj.getEntitiesWithinAABB(EntityFallingBlock.class, AxisAlignedBB.getBoundingBox(entity.posX - range, entity.posY - range, entity.posZ - range, entity.posX + range, entity.posY + range, entity.posZ + range))); + + for(Entity movable : movables) { + movable.motionX = entity.motionX; + movable.motionY = entity.motionY; + movable.motionZ = entity.motionZ; + } + + break; } } diff --git a/MODSRC/vazkii/botania/common/lib/LibItemNames.java b/MODSRC/vazkii/botania/common/lib/LibItemNames.java index b591067b0..9f1898f16 100644 --- a/MODSRC/vazkii/botania/common/lib/LibItemNames.java +++ b/MODSRC/vazkii/botania/common/lib/LibItemNames.java @@ -97,7 +97,8 @@ public final class LibItemNames { "lensDamage", "lensPhantom", "lensMagnet", - "lensExplosive" + "lensExplosive", + "lensInfluence" }; public static final String[] MANA_RESOURCE_NAMES = new String[] { diff --git a/resources/assets/botania/lang/en_US.lang b/resources/assets/botania/lang/en_US.lang index 0b62ec810..3d375f3b9 100644 --- a/resources/assets/botania/lang/en_US.lang +++ b/resources/assets/botania/lang/en_US.lang @@ -438,6 +438,8 @@ item.botania:lensMagnet.name=Mana Lens: Magnetizing item.botania:lensMagnet.short=Magnetizing item.botania:lensExplosive.name=Mana Lens: Entropic item.botania:lensExplosive.short=Entropic +item.botania:lensInfluence.name=Mana Lens: Influence +item.botania:lensInfluence.short=Influence item.botania:manaPetal0.name=White Mana Petal item.botania:manaPetal1.name=Orange Mana Petal item.botania:manaPetal2.name=Magenta Mana Petal diff --git a/resources/assets/botania/textures/items/lensInfluence.png b/resources/assets/botania/textures/items/lensInfluence.png new file mode 100644 index 000000000..9fb520a6a Binary files /dev/null and b/resources/assets/botania/textures/items/lensInfluence.png differ