Added config options to change the harvest level of the Weight and Bore Lenses and defined said harvest levels properly in the check for what they can break/displace.

This commit is contained in:
Vasco Lavos committed 2015-12-29 22:47:13 +00:00
1 parent 69f6d26de0
commit a9ba227055
4 files changed
+29 -14

No files matched your search

@@ -88,6 +88,8 @@ public final class ConfigHandler {
public static boolean ringOfOdinFireResist = true;
public static boolean enderStuff19Enabled = true;
public static boolean invertMagnetRing = false;
public static int harvestLevelWeight = 2;
public static int harvestLevelBore = 3;
public static int flowerQuantity = 2;
public static int flowerDensity = 2;
@@ -245,6 +247,12 @@ public final class ConfigHandler {
desc = "Set this to true to invert the Ring of Magnetization's controls (from shift to stop to shift to work)";
invertMagnetRing = loadPropBool("magnetRing.invert", desc, invertMagnetRing);
desc = "The harvest level of the Mana Lens: Weight. 3 is diamond level. Defaults to 2 (iron level)";
harvestLevelWeight = loadPropInt("harvestLevel.weightLens", desc, harvestLevelWeight);
desc = "The harvest level of the Mana Lens: Bore. 3 is diamond level. Defaults to 3";
harvestLevelBore = loadPropInt("harvestLevel.boreLens", desc, harvestLevelBore);
desc = "The quantity of Botania flower patches to generate in the world, defaults to 2, the lower the number the less patches generate.";
flowerQuantity = loadPropInt("worldgen.flower.quantity", desc, flowerQuantity);
@@ -37,21 +37,23 @@ public class LensMine extends Lens {
int y = pos.blockY;
int z = pos.blockZ;
Block block = world.getBlock(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
ItemStack composite = ((ItemLens) ModItems.lens).getCompositeLens(stack);
boolean warp = composite != null && composite.getItem() == ModItems.lens && composite.getItemDamage() == ItemLens.WARP;
if(warp && (block == ModBlocks.pistonRelay || block == Blocks.piston || block == Blocks.piston_extension || block == Blocks.piston_head))
return false;
int harvestLevel = ConfigHandler.harvestLevelBore;
TileEntity tile = world.getTileEntity(x, y, z);
int meta = world.getBlockMetadata(x, y, z);
float hardness = block.getBlockHardness(world, x, y, z);
int neededHarvestLevel = block.getHarvestLevel(meta);
int mana = burst.getMana();
ChunkCoordinates coords = burst.getBurstSourceChunkCoordinates();
if((coords.posX != x || coords.posY != y || coords.posZ != z) && !(tile instanceof IManaBlock) && block != null && hardness != -1 && hardness < 50F && (burst.isFake() || mana >= 24)) {
if((coords.posX != x || coords.posY != y || coords.posZ != z) && !(tile instanceof IManaBlock) && neededHarvestLevel <= harvestLevel && hardness != -1 && hardness < 50F && (burst.isFake() || mana >= 24)) {
List<ItemStack> items = new ArrayList();
items.addAll(block.getDrops(world, x, y, z, meta, 0));
@@ -16,6 +16,7 @@ import net.minecraft.entity.projectile.EntityThrowable;
import net.minecraft.item.ItemStack;
import net.minecraft.util.MovingObjectPosition;
import vazkii.botania.api.internal.IManaBurst;
import vazkii.botania.common.core.handler.ConfigHandler;
public class LensWeight extends Lens {
@@ -25,10 +26,14 @@ public class LensWeight extends Lens {
int x = pos.blockX;
int y = pos.blockY;
int z = pos.blockZ;
int harvestLevel = ConfigHandler.harvestLevelWeight;
Block block = entity.worldObj.getBlock(x, y, z);
Block blockBelow = entity.worldObj.getBlock(x, y - 1, z);
int meta = entity.worldObj.getBlockMetadata(x, y, z);
if(blockBelow.isAir(entity.worldObj, x, y - 1, z) && block.getBlockHardness(entity.worldObj, x, y, z) != -1 && entity.worldObj.getTileEntity(x, y, z) == null && block.canSilkHarvest(entity.worldObj, null, x, y, z, meta)) {
int neededHarvestLevel = block.getHarvestLevel(meta);
if(blockBelow.isAir(entity.worldObj, x, y - 1, z) && block.getBlockHardness(entity.worldObj, x, y, z) != -1 && neededHarvestLevel <= harvestLevel && entity.worldObj.getTileEntity(x, y, z) == null && block.canSilkHarvest(entity.worldObj, null, x, y, z, meta)) {
EntityFallingBlock falling = new EntityFallingBlock(entity.worldObj, x + 0.5, y + 0.5, z + 0.5, block, meta);
if(!entity.worldObj.isRemote)
entity.worldObj.spawnEntityInWorld(falling);
@@ -651,7 +651,7 @@ tile.botania:livingwood3.name=Framed Livingwood
tile.botania:livingwood4.name=Pattern Framed Livingwood
tile.botania:livingwood5.name=Glimmering Livingwood
tile.botania:spreader0.name=Mana Spreader
tile.botania:spreader1.name=Redstone Mana Spreader
tile.botania:spreader1.name=Pulse Mana Spreader
tile.botania:spreader2.name=Elven Mana Spreader
tile.botania:spreader3.name=Gaia Mana Spreader
tile.botania:pool0.name=Mana Pool
@@ -2123,7 +2123,7 @@ botania.page.spreader1=Holding a &1Wand of the Forest&0
botania.page.spreader2=The &1Mana Spreader&0 has a small internal buffer of &4Mana&0, which will get filled by nearby &4Generating Flowers&0. This buffer can be viewed by looking at the &1Spreader&0 with a &1Wand of the Forest&0, as demonstrated in the last page.<br>Note that the block needs to be right clicked with a wand to get accurate and adequate values.
botania.page.spreader3=Holding a &1Wand of the Forest&0 displays a beam which shows where the spreader is pointing at. Hovering over it shows the target. The sparkle that's always shown is the point when &4Mana loss&0 starts to happen.<br>If the target of the spreader is a block that can contain &4Mana&0, and isn't full, the spreader will fire a &4Mana Burst&0, which will travel to the target, and pass the &4Mana&0 along to it.
botania.page.spreader4=The spreader only fires one burst at once, it'll only fire another one when the last one hits the target.<br>Furthermore, the bursts also start suffering &4mana loss&0 after a small amount of time. This can be seen in the beam, which becomes a lot thinner when this happens. There is also a small amount of &4mana loss&0 when a beam enters a spreader.
botania.page.spreader11=Applying a &4Redstone Signal&0 to the spreader will have it cease to function. Case better control is required, a &1Redstone Mana Spreader&0 is recommended, as it can fire bursts without a target block and works on redstone pulses.
botania.page.spreader11=Applying a &4Redstone Signal&0 to the spreader will have it cease to function. Case better control is required, a &1Pulse Mana Spreader&0 is recommended, as it can fire bursts without a target block and works on redstone pulses.
botania.page.spreader5=Crafting the &1Mana Spreader&0
botania.page.spreader10=Right clicking the spreader with a piece of &1Wool&0 will sleeve it. Aside from making it look fancier, it'll also muffle the sound when a burst is shot, making it much less obnoxious when there's a large amount of spreaders in one area.<br>Right clicking with an empty hand will remove the sleeve.
@@ -2189,7 +2189,7 @@ botania.page.lens0=In order to upgrade the potential a &1Mana Spreader&0, one ca
botania.page.lens1=The basic lens, it doesn't do anything.
botania.page.lens2=&4Dyeing&0 lenses!
botania.page.lens3=&1Rainbow Lens&0 all the way
botania.page.lens4=But lenses are not only for fancy colors. One can upgrade them with all sorts of materials to create new lens which can do all sorts of effects on the &4Mana Bursts&0.<br>It's to take in mind that, if using a normal &1Mana Spreader&0, there needs to be a &4Mana&0 receiving block at the end for the burst to fire. A &1Redstone Mana Spreader&0 is recommended for some lenses.
botania.page.lens4=But lenses are not only for fancy colors. One can upgrade them with all sorts of materials to create new lens which can do all sorts of effects on the &4Mana Bursts&0.<br>It's to take in mind that, if using a normal &1Mana Spreader&0, there needs to be a &4Mana&0 receiving block at the end for the burst to fire. A &1Pulse Mana Spreader&0 is recommended for some lenses.
botania.page.lens5=Sometimes, though, having a single &1Mana Lens&0 in a spreader just isn't enough sometimes. By combining two lenses with a &1Slimeball&0 in a crafting table, it's possible to unite them into one, and keep the effects of both.<br>The first lens used determines the visuals (texture and color). It's to note that some combinations will not work, nor will two lenses of the same type.
botania.page.lens6=The &1Velocity Lens&0 will drastically increase the speed at which a &4Mana Burst&0 travels, but not only does the beam start to lose its &4Mana&0 a lot faster, it can also carry a bit less.
botania.page.lens7=Velocity Lens
@@ -2243,10 +2243,10 @@ botania.tagline.manaDetector=Detects Mana Bursts and emits Redstone signals
botania.page.manaDetector0=A device like the &1Mana Detector&0 is capable to detect when a &4Mana Burst&0 starts flowing through it (the burst doesn't dissipate on collision with this block) and provide a redstone signal when that is the case.
botania.page.manaDetector1=Crafting the detector
# -- REDSTONE MANA SPREADER
botania.entry.redstoneSpreader=Redstone Mana Spreader
botania.tagline.redstoneSpreader=A spreader that fires on a Redstone signal
botania.page.redstoneSpreader0=By combining a &1Mana Spreader&0 with a piece of &1Redstone&0, it's possible to create a &1Redstone Mana Spreader&0, which fires only when given a &4Redstone signal&0, regardless of having a block in the end to put the mana or not.<br>It's to keep in note that this doesn't let the spreader shoot a burst until the last one dissipates or is absorbed.
# -- PULSE MANA SPREADER
botania.entry.redstoneSpreader=Pulse Mana Spreader
botania.tagline.redstoneSpreader=A spreader that fires on a Redstone pulse
botania.page.redstoneSpreader0=By combining a &1Mana Spreader&0 with a piece of &1Redstone&0, it's possible to create a &1Pulse Mana Spreader&0, which, as the name implies, fires when given a &4Redstone pulse&0, regardless of having a block in the end to put the &4Mana&0 or not.<br>It's to keep in note that this doesn't let the spreader shoot a burst until the last one dissipates or is absorbed.
botania.page.redstoneSpreader1=Just add redstone
# -- MANASTAR
@@ -2258,7 +2258,7 @@ botania.page.manastar1=&rI'm a shooting star leaping through the skies&r.
# -- ELVEN MANA SPREADERS
botania.entry.dreamwoodSpreader=Elven Mana Spreaders
botania.tagline.dreamwoodSpreader=Harder, better, faster, stronger
botania.page.dreamwoodSpreader0=Simply put, &1Dreamwood&0 conducts &4Mana&0 better than &1Livingwood&0. Add in some adjustments like using &1Elementium&0 instead of &1Gold&0 and what you get is a &1Mana Spreader&0 that can conduct more &4Mana&0, faster and for more time without &4Mana loss&0.<br>On the negative side, it can't be turned into a &1Redstone Mana Spreader&0.
botania.page.dreamwoodSpreader0=Simply put, &1Dreamwood&0 conducts &4Mana&0 better than &1Livingwood&0. Add in some adjustments like using &1Elementium&0 instead of &1Gold&0 and what you get is a &1Mana Spreader&0 that can conduct more &4Mana&0, faster and for more time without &4Mana loss&0.<br>On the negative side, it can't be turned into a &1Pulse Mana Spreader&0.
botania.page.dreamwoodSpreader1=Better spreaders, that's it
botania.page.dreamwoodSpreader2=By combining this already powerful spreader with a &1Gaia Spirit&0 and a &1Dragonstone&0 gem, one can create an even more potent variant. The &1Gaia Spreader&0 is within the top percentage of Mana Spreaders, with pretty much upgrades all round.<br>It's to note that these spreaders fire a larger payload at once and thus, might fire less often.
botania.page.dreamwoodSpreader3=ULTRA_SPREADER
@@ -2754,7 +2754,7 @@ botania.page.openCrate2=A super crate box
botania.entry.forestDrum=Drum of the Wild
botania.tagline.forestDrum=Harvest crops and uproot grass with mana bursts
botania.page.forestDrum0=The &1Drum of the Wild&0 is, in layman's terms, the percussion counterpart of the &1Horn of the Wild&0. It serves the exact same purpose as the handheld horn, but is placed in world.<br>To trigger a beat and break nearby foliage, one would fire a &4Mana Burst&0 at the drum.
botania.page.forestDrum1=It's to note that the drum does not store mana, hence, in order to trigger it, a &1Redstone Mana Spreader&0 or a &1Mana Blaster&0 is required.
botania.page.forestDrum1=It's to note that the drum does not store mana, hence, in order to trigger it, a &1Pulse Mana Spreader&0 or a &1Mana Blaster&0 is required.
botania.page.forestDrum2=But if you close your eyes...
# -- ABSTRUSE PLATFORM