Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 04:20:08 +01:00
SPIGOT-4784: Collar colour API for Cats
Dieser Commit ist enthalten in:
Ursprung
6bb1f087e7
Commit
884028b23b
@ -2,6 +2,8 @@ package org.bukkit.craftbukkit.entity;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.minecraft.server.EntityCat;
|
||||
import net.minecraft.server.EnumColor;
|
||||
import org.bukkit.DyeColor;
|
||||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.entity.Cat;
|
||||
import org.bukkit.entity.EntityType;
|
||||
@ -38,4 +40,14 @@ public class CraftCat extends CraftTameableAnimal implements Cat {
|
||||
|
||||
getHandle().setCatType(type.ordinal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public DyeColor getCollarColor() {
|
||||
return DyeColor.getByWoolData((byte) getHandle().ei().getColorIndex());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setCollarColor(DyeColor color) {
|
||||
getHandle().a(EnumColor.fromColorIndex(color.getWoolData()));
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren