adjust gold drops

This commit is contained in:
Shaun Bennett 2015-11-27 01:24:03 -05:00
parent e211fe182d
commit 94090c9434
1 changed files with 7 additions and 6 deletions

View File

@ -235,14 +235,14 @@ public class GoldManager extends MiniPlugin
public void dropGold(Location location, int amount, double velMult)
{
int count = amount / 700;
int extraGold = amount % 700;
int count = amount / 1000;
int extraGold = amount % 1000;
for (int i = 0; i < count; i++)
{
double x = Math.random() * 2 * Math.PI;
Vector velocity = new Vector(Math.sin(x), 0, Math.cos(x));
dropGold(location, 1000, velocity, velMult);
dropGold(location, 1000, velocity, velMult, "" + i);
}
// Drop Extra
@ -250,16 +250,17 @@ public class GoldManager extends MiniPlugin
{
double x = Math.random() * 2 * Math.PI;
Vector velocity = new Vector(Math.sin(x), 0, Math.cos(x));
dropGold(location, extraGold, velocity, velMult);
dropGold(location, extraGold, velocity, velMult, "extra");
}
}
private void dropGold(Location location, int amount, Vector velocity, double velMult)
private void dropGold(Location location, int amount, Vector velocity, double velMult, String name)
{
Item item = location.getWorld().dropItem(location, new ItemStack(Material.GOLD_NUGGET));
item.setCustomName(name);
item.setPickupDelay(40);
item.setMetadata(META_STRING, new FixedMetadataValue(getPlugin(), amount));
_itemSet.add(item);
// Velocity