Java Code Examples for org.bukkit.DyeColor#getByWoolData()
The following examples show how to use
org.bukkit.DyeColor#getByWoolData() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EntitySheepPet.java From SonarPet with GNU General Public License v3.0 | 5 votes |
@Override public void setColor(int i) { DyeColor color = DyeColor.getByWoolData((byte) i); if ((byte) i != i || color == null) { throw new IllegalArgumentException("Invalid wool color id: " + i); } getBukkitEntity().setColor(color); }
Example 2
Source File: SheepShop.java From Shopkeepers with GNU General Public License v3.0 | 5 votes |
@Override public void cycleSubType() { byte colorByte = color.getWoolData(); colorByte += 1; color = DyeColor.getByWoolData(colorByte); if (color == null) { color = DyeColor.WHITE; } this.applySubType(); }
Example 3
Source File: CraftSheep.java From Kettle with GNU General Public License v3.0 | 4 votes |
public DyeColor getColor() { return DyeColor.getByWoolData((byte) getHandle().getFleeceColor().getMetadata()); }
Example 4
Source File: CraftWolf.java From Kettle with GNU General Public License v3.0 | 4 votes |
public DyeColor getCollarColor() { return DyeColor.getByWoolData((byte) getHandle().getCollarColor().getMetadata()); }
Example 5
Source File: CraftShulker.java From Kettle with GNU General Public License v3.0 | 4 votes |
@Override public DyeColor getColor() { return DyeColor.getByWoolData(getHandle().getDataManager().get(EntityShulker.COLOR)); }
Example 6
Source File: CraftBed.java From Kettle with GNU General Public License v3.0 | 4 votes |
@Override public void load(TileEntityBed bed) { super.load(bed); color = DyeColor.getByWoolData((byte) bed.getColor().getMetadata()); }
Example 7
Source File: CraftShulkerBox.java From Kettle with GNU General Public License v3.0 | 4 votes |
@Override public DyeColor getColor() { net.minecraft.block.Block block = CraftMagicNumbers.getBlock(this.getType()); return DyeColor.getByWoolData((byte) ((BlockShulkerBox) block).color.getMetadata()); }
Example 8
Source File: StainedClayItemData.java From SonarPet with GNU General Public License v3.0 | 4 votes |
@SuppressWarnings("deprecation") public DyeColor getColor() { return DyeColor.getByWoolData(getRawData()); }
Example 9
Source File: WoolItemData.java From SonarPet with GNU General Public License v3.0 | 4 votes |
@SuppressWarnings("deprecation") public DyeColor getColor() { return DyeColor.getByWoolData(getRawData()); }
Example 10
Source File: CraftSheep.java From Thermos with GNU General Public License v3.0 | 4 votes |
public DyeColor getColor() { return DyeColor.getByWoolData((byte) getHandle().getFleeceColor()); }
Example 11
Source File: CraftWolf.java From Thermos with GNU General Public License v3.0 | 4 votes |
public DyeColor getCollarColor() { return DyeColor.getByWoolData((byte) getHandle().getCollarColor()); }
Example 12
Source File: SheepShop.java From Shopkeepers with GNU General Public License v3.0 | 4 votes |
@Override protected void load(ConfigurationSection config) { super.load(config); this.color = DyeColor.getByWoolData((byte) config.getInt("color")); }
Example 13
Source File: Wool.java From Kettle with GNU General Public License v3.0 | 2 votes |
/** * Gets the current color of this dye * * @return DyeColor of this dye */ public DyeColor getColor() { return DyeColor.getByWoolData(getData()); }