Fixed raytrace bug
This commit is contained in:
parent
9e1feca3e8
commit
d29252386a
3 changed files with 9 additions and 3 deletions
|
@ -19,4 +19,4 @@ In order to compile the source code into binary form, you must have a working Mi
|
|||
5. Install it into Minecraft just like any other Forge mod.
|
||||
|
||||
### License
|
||||
"Resonant Induction" is under the Calclavia Mod License (http://calclavia.com/license/cl).
|
||||
"Resonant Induction" is under the Educational Public License (http://calclavia.com/license/rpl).
|
||||
|
|
|
@ -248,7 +248,7 @@ public class Vector3
|
|||
{
|
||||
MovingObjectPosition pickedEntity = null;
|
||||
Vec3 startingPosition = this.toVec3();
|
||||
Vec3 look = target.normalize().toVec3();
|
||||
Vec3 look = target.clone().difference(this).normalize().toVec3();
|
||||
double reachDistance = this.distance(target);
|
||||
Vec3 reachPoint = Vec3.createVectorHelper(startingPosition.xCoord + look.xCoord * reachDistance, startingPosition.yCoord + look.yCoord * reachDistance, startingPosition.zCoord + look.zCoord * reachDistance);
|
||||
|
||||
|
|
|
@ -53,16 +53,22 @@ public class BlockTesla extends BlockBase implements ITileEntityProvider
|
|||
{
|
||||
entityPlayer.inventory.decrStackSize(entityPlayer.inventory.currentItem, 1);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else if (entityPlayer.getCurrentEquippedItem().itemID == Item.redstone.itemID)
|
||||
{
|
||||
tileEntity.toggleEntityAttack();
|
||||
boolean status = tileEntity.toggleEntityAttack();
|
||||
|
||||
if (!entityPlayer.capabilities.isCreativeMode)
|
||||
{
|
||||
entityPlayer.inventory.decrStackSize(entityPlayer.inventory.currentItem, 1);
|
||||
}
|
||||
|
||||
if (!world.isRemote)
|
||||
{
|
||||
entityPlayer.addChatMessage("Toggled entity attack to: " + status);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if (entityPlayer.getCurrentEquippedItem().getItem() instanceof ItemCoordLink)
|
||||
|
|
Loading…
Reference in a new issue