Working on small parts of the spell system

This commit is contained in:
WayofTime 2014-01-31 17:21:03 -05:00
parent e159a6795c
commit 2bb7a5fffb
9 changed files with 339 additions and 10 deletions

View file

@ -9,6 +9,7 @@ import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
public class SpellHelper
@ -43,4 +44,13 @@ public class SpellHelper
{
return d * ((rand.nextFloat() - 0.5D));
}
public static Vec3 getEntityBlockVector(Entity entity)
{
int posX = (int) Math.round(entity.posX - 0.5f);
int posY = (int) entity.posY;
int posZ = (int) Math.round(entity.posZ - 0.5f);
return entity.getLookVec().createVectorHelper(posX, posY, posZ);
}
}