本文整理汇总了Java中org.bukkit.Rotation.CLOCKWISE属性的典型用法代码示例。如果您正苦于以下问题:Java Rotation.CLOCKWISE属性的具体用法?Java Rotation.CLOCKWISE怎么用?Java Rotation.CLOCKWISE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.bukkit.Rotation
的用法示例。
在下文中一共展示了Rotation.CLOCKWISE属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: toBukkitRotation
Rotation toBukkitRotation(int value) {
// Translate NMS rotation integer to Bukkit API
switch (value) {
case 0:
return Rotation.NONE;
case 1:
return Rotation.CLOCKWISE_45;
case 2:
return Rotation.CLOCKWISE;
case 3:
return Rotation.CLOCKWISE_135;
case 4:
return Rotation.FLIPPED;
case 5:
return Rotation.FLIPPED_45;
case 6:
return Rotation.COUNTER_CLOCKWISE;
case 7:
return Rotation.COUNTER_CLOCKWISE_45;
default:
throw new AssertionError("Unknown rotation " + value + " for " + getHandle());
}
}
示例2: toBukkitRotation
Rotation toBukkitRotation(int value) {
// Translate NMS rotation integer to Bukkit API
switch (value) {
case 0:
return Rotation.NONE;
case 1:
return Rotation.CLOCKWISE;
case 2:
return Rotation.FLIPPED;
case 3:
return Rotation.COUNTER_CLOCKWISE;
default:
throw new AssertionError("Unknown rotation " + value + " for " + getHandle());
}
}
示例3: getRotation
public Rotation getRotation() {
if (getHandle().getItemRotation() == 0) {
return Rotation.NONE;
} else if (getHandle().getItemRotation() == 1) {
return Rotation.CLOCKWISE;
} else if (getHandle().getItemRotation() == 2) {
return Rotation.FLIPPED;
} else {
return Rotation.COUNTER_CLOCKWISE;
}
}
示例4: toBukkitRotation
Rotation toBukkitRotation(int value) {
// Translate NMS rotation integer to Bukkit API
switch (value) {
case 0:
return Rotation.NONE;
case 1:
return Rotation.CLOCKWISE;
case 2:
return Rotation.FLIPPED;
case 3:
return Rotation.COUNTER_CLOCKWISE;
default:
throw new AssertionError("Unknown rotation " + getHandle().j() + " for " + getHandle());
}
}
示例5: toBukkitRotation
Rotation toBukkitRotation(int value) {
// Translate NMS rotation integer to Bukkit API
switch (value) {
case 0:
return Rotation.NONE;
case 1:
return Rotation.CLOCKWISE;
case 2:
return Rotation.FLIPPED;
case 3:
return Rotation.COUNTER_CLOCKWISE;
default:
throw new AssertionError("Unknown rotation " + getHandle().func_82333_j() + " for " + getHandle());
}
}
示例6: getRotation
@Override
public Rotation getRotation() {
// TODO: Implement
return Rotation.CLOCKWISE;
}