mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 23:26:45 +01:00
Use new Bukkit DyeColor data.
This commit is contained in:
parent
84994c2b2f
commit
85fb12a4ec
@ -5,6 +5,7 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.enchantments.Enchantment;
|
||||
@ -404,7 +405,7 @@ public class Fishing {
|
||||
|
||||
case SQUID:
|
||||
ItemStack item = new ItemStack(Material.INK_SACK, 1, (short) 0);
|
||||
item.setData(new MaterialData(Material.INK_SACK, (byte) 0x0));
|
||||
item.setData(new MaterialData(Material.INK_SACK, DyeColor.BLACK.getDyeData()));
|
||||
|
||||
Misc.dropItem(location, item);
|
||||
break;
|
||||
|
@ -3,6 +3,7 @@ package com.gmail.nossr50.skills.gathering;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.CropState;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
@ -268,7 +269,7 @@ public class Herbalism {
|
||||
}
|
||||
else {
|
||||
if (mat == Material.COCOA) {
|
||||
is = new ItemStack(Material.INK_SACK, 1, (short) 3);
|
||||
is = new ItemStack(Material.INK_SACK, 1, DyeColor.BROWN.getDyeData());
|
||||
}
|
||||
else if (mat == Material.CARROT) {
|
||||
is = new ItemStack(Material.CARROT_ITEM, 1, (short) 0);
|
||||
@ -421,7 +422,7 @@ public class Herbalism {
|
||||
break;
|
||||
case COCOA:
|
||||
// Broken: Requires an update to bukkit to enable seaching for variable-sized ItemStacks.
|
||||
hasSeeds = inventory.contains(new ItemStack(Material.INK_SACK, 1, (short) 3), 1);
|
||||
hasSeeds = inventory.contains(new ItemStack(Material.INK_SACK, 1, DyeColor.BROWN.getDyeData()), 1);
|
||||
break;
|
||||
case CARROT:
|
||||
hasSeeds = inventory.contains(Material.CARROT_ITEM);
|
||||
@ -455,8 +456,8 @@ public class Herbalism {
|
||||
inventory.removeItem(new ItemStack(Material.SEEDS));
|
||||
break;
|
||||
case COCOA:
|
||||
Misc.dropItem(location, new ItemStack(Material.INK_SACK, 3, (short) 3));
|
||||
inventory.removeItem(new ItemStack(Material.INK_SACK, 1, (short) 3));
|
||||
Misc.dropItem(location, new ItemStack(Material.INK_SACK, 3, DyeColor.BROWN.getDyeData()));
|
||||
inventory.removeItem(new ItemStack(Material.INK_SACK, 1, DyeColor.BROWN.getDyeData()));
|
||||
break;
|
||||
case CARROT:
|
||||
Misc.dropItem(location, new ItemStack(Material.CARROT_ITEM));
|
||||
|
@ -3,6 +3,7 @@ package com.gmail.nossr50.skills.mining;
|
||||
import java.util.Random;
|
||||
|
||||
import org.bukkit.CoalType;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.block.Block;
|
||||
@ -331,7 +332,7 @@ public class Mining {
|
||||
|
||||
case LAPIS_ORE:
|
||||
if (config.getLapisDoubleDropsEnabled()) {
|
||||
item = (new MaterialData(Material.INK_SACK, (byte) 0x4)).toItemStack(1);
|
||||
item = (new MaterialData(Material.INK_SACK, DyeColor.BLUE.getDyeData())).toItemStack(1);
|
||||
|
||||
Misc.dropItems(location, item, 4);
|
||||
Misc.randomDropItems(location, item, 50, 4);
|
||||
|
Loading…
Reference in New Issue
Block a user