mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Fixed Shake Mob not dropping the correct Wool
Bug introduced by my previous commit
This commit is contained in:
parent
20aa312173
commit
ec997bd2b6
@ -4,6 +4,7 @@ import java.util.HashMap;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
|
import org.bukkit.DyeColor;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.entity.LivingEntity;
|
import org.bukkit.entity.LivingEntity;
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
@ -62,9 +63,12 @@ public final class ShakeMob {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Find a cleaner way to do this, maybe by using Sheep.getColor().getWoolData() (available since 1.4.7-R0.1)
|
||||||
|
Wool wool = (Wool) drop.getData();
|
||||||
|
|
||||||
|
wool.setColor(sheep.getColor());
|
||||||
|
drop.setDurability(wool.getData());
|
||||||
sheep.setSheared(true);
|
sheep.setSheared(true);
|
||||||
drop.setAmount(Misc.getRandom().nextInt(6) + 1);
|
|
||||||
((Wool) drop.getData()).setColor(sheep.getColor());
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -152,7 +156,7 @@ public final class ShakeMob {
|
|||||||
possibleDrops.put(new ItemStack(Material.GOLD_NUGGET), 50);
|
possibleDrops.put(new ItemStack(Material.GOLD_NUGGET), 50);
|
||||||
break;
|
break;
|
||||||
case SHEEP:
|
case SHEEP:
|
||||||
possibleDrops.put(new ItemStack(Material.WOOL), 100);
|
possibleDrops.put(new ItemStack(Material.WOOL, Misc.getRandom().nextInt(6) + 1), 100);
|
||||||
break;
|
break;
|
||||||
case SKELETON:
|
case SKELETON:
|
||||||
possibleDrops.put(new ItemStack(Material.SKULL_ITEM), 2);
|
possibleDrops.put(new ItemStack(Material.SKULL_ITEM), 2);
|
||||||
@ -167,7 +171,7 @@ public final class ShakeMob {
|
|||||||
possibleDrops.put(new ItemStack(Material.SNOW_BALL, Misc.getRandom().nextInt(4) + 1), 97);
|
possibleDrops.put(new ItemStack(Material.SNOW_BALL, Misc.getRandom().nextInt(4) + 1), 97);
|
||||||
break;
|
break;
|
||||||
case SQUID:
|
case SQUID:
|
||||||
possibleDrops.put(new ItemStack(Material.INK_SACK, (byte) 0x0), 100);
|
possibleDrops.put(new ItemStack(Material.INK_SACK, DyeColor.BLACK.getDyeData()), 100);
|
||||||
break;
|
break;
|
||||||
case WITCH:
|
case WITCH:
|
||||||
possibleDrops.put(new Potion(PotionType.INSTANT_HEAL).toItemStack(1), 1);
|
possibleDrops.put(new Potion(PotionType.INSTANT_HEAL).toItemStack(1), 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user