Merge branch 'virizion_speed_builder' of ssh://dev.mineplex.com:7999/min/mineplex into virizion_speed_builder

This commit is contained in:
Virizion 2016-01-21 20:13:53 -05:00
commit 50c9b33701

View File

@ -8,6 +8,7 @@ import mineplex.core.common.util.NautHashMap;
import mineplex.core.common.util.UtilAlg;
import mineplex.core.common.util.UtilBlock;
import mineplex.core.common.util.UtilEnt;
import mineplex.core.common.util.UtilMath;
import nautilus.game.arcade.game.games.speedbuilder.SpeedBuilder;
import net.minecraft.server.v1_8_R3.BlockPosition;
import net.minecraft.server.v1_8_R3.BlockStairs;
@ -29,6 +30,7 @@ import org.bukkit.inventory.ItemStack;
import org.bukkit.material.Bed;
import org.bukkit.material.Door;
import org.bukkit.material.Stairs;
import org.bukkit.util.Vector;
public class RecreationData
{
@ -246,10 +248,20 @@ public class RecreationData
DroppedItems.put(item, System.currentTimeMillis());
}
CornerA.getWorld().playEffect(getMidpoint(), Effect.STEP_SOUND, Material.LOG.getId());
clearBuildArea(false);
//Velocity to player
for (Item item : DroppedItems.keySet())
{
item.setPickupDelay(0);
double mult = 0.5 + (0.6 * (UtilMath.offset(Player.getLocation(), item.getLocation())/16d));
item.setVelocity(Player.getLocation().toVector().subtract(item.getLocation().toVector()).normalize().add(new Vector(0, 0.4, 0)).multiply(mult));
}
}
public boolean isEmptyBuild(BuildData buildData)