diff --git a/src/main/java/vazkii/botania/common/block/subtile/functional/SubTileSpectranthemum.java b/src/main/java/vazkii/botania/common/block/subtile/functional/SubTileSpectranthemum.java index 7d739b67a..1dbc3a076 100644 --- a/src/main/java/vazkii/botania/common/block/subtile/functional/SubTileSpectranthemum.java +++ b/src/main/java/vazkii/botania/common/block/subtile/functional/SubTileSpectranthemum.java @@ -24,6 +24,7 @@ import vazkii.botania.api.lexicon.LexiconEntry; import vazkii.botania.api.mana.IManaItem; import vazkii.botania.api.subtile.RadiusDescriptor; import vazkii.botania.api.subtile.SubTileFunctional; +import vazkii.botania.common.core.helper.MathHelper; import vazkii.botania.common.lexicon.LexiconData; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; @@ -36,6 +37,9 @@ public class SubTileSpectranthemum extends SubTileFunctional { private static final int COST = 24; private static final int RANGE = 2; + private static final int BIND_RANGE = 12; + + private static final String TAG_TELEPORTED = "Botania_TPd"; int bindX, bindY = -1, bindZ; @@ -51,7 +55,7 @@ public class SubTileSpectranthemum extends SubTileFunctional { boolean did = false; List items = supertile.getWorldObj().getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(x - RANGE, y - RANGE, z - RANGE, x + RANGE + 1, y + RANGE, z + RANGE + 1)); for(EntityItem item : items) { - if(item.age < 60 || item.isDead) + if(item.age < 60 || item.isDead || item.getEntityData().getBoolean(TAG_TELEPORTED)) continue; ItemStack stack = item.getEntityItem(); @@ -64,6 +68,7 @@ public class SubTileSpectranthemum extends SubTileFunctional { if(mana >= cost) { spawnExplosionParticles(item); item.setPosition(bindX + 0.5, bindY + 1.5, bindZ + 0.5); + item.getEntityData().setBoolean(TAG_TELEPORTED, true); item.motionX = item.motionY = item.motionZ = 0; spawnExplosionParticles(item); if(!supertile.getWorldObj().isRemote) { @@ -129,7 +134,8 @@ public class SubTileSpectranthemum extends SubTileFunctional { @Override public boolean bindTo(EntityPlayer player, ItemStack wand, int x, int y, int z, int side) { boolean bound = super.bindTo(player, wand, x, y, z, side); - if(!bound && (x != bindX || y != bindY || z != bindZ) && (x != supertile.xCoord || y != supertile.yCoord || z != supertile.zCoord)) { + + if(!bound && (x != bindX || y != bindY || z != bindZ) && MathHelper.pointDistanceSpace(x, y, z, supertile.xCoord, supertile.yCoord, supertile.zCoord) <= BIND_RANGE && (x != supertile.xCoord || y != supertile.yCoord || z != supertile.zCoord)) { bindX = x; bindY = y; bindZ = z; diff --git a/src/main/resources/assets/botania/lang/en_US.lang b/src/main/resources/assets/botania/lang/en_US.lang index 3a5ccdd4a..f82f5a438 100644 --- a/src/main/resources/assets/botania/lang/en_US.lang +++ b/src/main/resources/assets/botania/lang/en_US.lang @@ -1785,8 +1785,8 @@ botania.page.vinculotus1=&oTouch this black lotus with your fingers&r. # -- SPECTRANTHEMUM botania.entry.spectranthemum=Spectranthemum -botania.page.spectranthemum0=Transporting items a long distance can be an arduous task. Water channels and &1Daffomills&0 won't cut it forever.
The &1Spectranthemum&0, at the cost of &4Mana&0 wraps the fabric of reality of any dropped items that do not contain &4Mana&0 around it, teleporting them somewhere else in the world. -botania.page.spectranthemum1=In order to specify where the items go, one would use a &1Wand of the Forest&0 in bind mode and bind the flower to a block somewhere, similarly to binding it to a pool.
In order to view what block the flower is bound to rather than the pool it's pulling &4Mana&0, one would sneak while looking at it with a wand. +botania.page.spectranthemum0=Transporting items a long distance can be an arduous task. Water channels and &1Daffomills&0 won't cut it forever. The &1Spectranthemum&0, at the cost of &4Mana&0 wraps the fabric of reality of any dropped items that do not contain &4Mana&0 around it, teleporting them somewhere else in the world. After teleported once, another of these flowers can't be used on the same item. +botania.page.spectranthemum1=In order to specify where the items go, one would use a &1Wand of the Forest&0 in bind mode and bind the flower to a block somewhere, similarly to binding it to a pool. This only works within 12 blocks. In order to view what block the flower is bound to rather than the pool it's pulling &4Mana&0, one would sneak while looking at it with a wand. botania.page.spectranthemum2=This flower is governed by the &4axiom of chunkloading&0, by which it'll not function on chunks not loaded. This topic is not addressed in full extent this lexicon.
&oRecommended Reading: "Chunks and Chicken", "Anchors of the World". botania.page.spectranthemum3=&o(n)spooky(n+2)me&r.