blob: e8cb697aa3d8062fa736eb1198e17e0baacf0787 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
package org.bukkit.craftbukkit.entity;
import com.google.common.base.Preconditions;
import net.minecraft.server.EntityShulker;
import org.bukkit.DyeColor;
import org.bukkit.craftbukkit.CraftServer;
import org.bukkit.entity.EntityType;
import org.bukkit.entity.Shulker;
public class CraftShulker extends CraftGolem implements Shulker {
public CraftShulker(CraftServer server, EntityShulker entity) {
super(server, entity);
}
@Override
public EntityType getType() {
return EntityType.SHULKER;
}
@Override
public EntityShulker getHandle() {
return (EntityShulker) entity;
}
@Override
public DyeColor getColor() {
return DyeColor.getByWoolData(getHandle().getDataWatcher().get(EntityShulker.bw));
}
@Override
public void setColor(DyeColor color) {
Preconditions.checkArgument(color != null, "color");
getHandle().getDataWatcher().set(EntityShulker.bw, color.getWoolData());
}
}
|