diff --git a/MODSRC/vazkii/botania/common/item/ItemLens.java b/MODSRC/vazkii/botania/common/item/ItemLens.java index 883dec816..e76c3f18e 100644 --- a/MODSRC/vazkii/botania/common/item/ItemLens.java +++ b/MODSRC/vazkii/botania/common/item/ItemLens.java @@ -64,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, INFLUENCE = 12; + MAGNET = 10, EXPLOSIVE = 11, INFLUENCE = 12, WEIGHT = 13; private static final Map> blacklist = new HashMap(); @@ -74,6 +74,10 @@ public class ItemLens extends ItemMod implements ILens { blacklistLenses(PHANTOM, MINE); blacklistLenses(PHANTOM, EXPLOSIVE); blacklistLenses(PHANTOM, BOUNCE); + blacklistLenses(PHANTOM, WEIGHT); + blacklistLenses(EXPLOSIVE, MINE); + blacklistLenses(EXPLOSIVE, WEIGHT); + blacklistLenses(MINE, WEIGHT); } private static final String TAG_COLOR = "color"; @@ -81,7 +85,7 @@ public class ItemLens extends ItemMod implements ILens { public static IIcon iconGlass; - public static final int SUBTYPES = 13; + public static final int SUBTYPES = 14; IIcon[] ringIcons; public ItemLens() { @@ -263,8 +267,20 @@ public class ItemLens extends ItemMod implements ILens { if(!entity.worldObj.isRemote && pos.entityHit == null && !isManaBlock && (pos.blockX != coords.posX || pos.blockY != coords.posY || pos.blockZ != coords.posZ)) entity.worldObj.createExplosion(entity, entity.posX, entity.posY, entity.posZ, burst.getMana() / 50F, true); } else dead = false; + break; + } + case WEIGHT : { + if(!burst.isFake()) { + int x = pos.blockX; + int y = pos.blockY; + int z = pos.blockZ; + if(entity.worldObj.getBlock(x, y - 1, z).isAir(entity.worldObj, x, y - 1, z)) { + EntityFallingBlock falling = new EntityFallingBlock(entity.worldObj, x + 0.5, y + 0.5, z + 0.5, entity.worldObj.getBlock(x, y, z), entity.worldObj.getBlockMetadata(x, y, z)); + if(!entity.worldObj.isRemote) + entity.worldObj.spawnEntityInWorld(falling); + } + } } - break; } ItemStack compositeLens = getCompositeLens(stack); diff --git a/MODSRC/vazkii/botania/common/lib/LibItemNames.java b/MODSRC/vazkii/botania/common/lib/LibItemNames.java index 9f1898f16..6a3fc1ab7 100644 --- a/MODSRC/vazkii/botania/common/lib/LibItemNames.java +++ b/MODSRC/vazkii/botania/common/lib/LibItemNames.java @@ -98,7 +98,8 @@ public final class LibItemNames { "lensPhantom", "lensMagnet", "lensExplosive", - "lensInfluence" + "lensInfluence", + "lensWeight" }; 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 3d375f3b9..b2d196e7d 100644 --- a/resources/assets/botania/lang/en_US.lang +++ b/resources/assets/botania/lang/en_US.lang @@ -440,6 +440,8 @@ 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:lensWeight.name=Mana Lens: Weight +item.botania:lensWeight.short=Weight 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/lensWeight.png b/resources/assets/botania/textures/items/lensWeight.png new file mode 100644 index 000000000..4b3135e6b Binary files /dev/null and b/resources/assets/botania/textures/items/lensWeight.png differ