本文整理汇总了Java中org.bukkit.craftbukkit.CraftArt类的典型用法代码示例。如果您正苦于以下问题:Java CraftArt类的具体用法?Java CraftArt怎么用?Java CraftArt使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CraftArt类属于org.bukkit.craftbukkit包,在下文中一共展示了CraftArt类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setArt
import org.bukkit.craftbukkit.CraftArt; //导入依赖的package包/类
public boolean setArt(Art art, boolean force) {
net.minecraft.entity.item.EntityPainting painting = this.getHandle();
net.minecraft.entity.item.EntityPainting.EnumArt oldArt = painting.art;
painting.art = CraftArt.BukkitToNotch(art);
painting.setDirection(painting.hangingDirection);
if (!force && !painting.onValidSurface()) {
// Revert painting since it doesn't fit
painting.art = oldArt;
painting.setDirection(painting.hangingDirection);
return false;
}
this.update();
return true;
}
示例2: setArt
import org.bukkit.craftbukkit.CraftArt; //导入依赖的package包/类
public boolean setArt(Art art, boolean force) {
EntityPainting painting = this.getHandle();
EnumArt oldArt = painting.art;
painting.art = CraftArt.BukkitToNotch(art);
painting.setDirection(painting.direction);
if (!force && !painting.survives()) {
// Revert painting since it doesn't fit
painting.art = oldArt;
painting.setDirection(painting.direction);
return false;
}
this.update();
return true;
}
示例3: testCraftArtToNotch
import org.bukkit.craftbukkit.CraftArt; //导入依赖的package包/类
@Test
public void testCraftArtToNotch() {
Map<EnumArt, Art> cache = new EnumMap(EnumArt.class);
for (Art art : Art.values()) {
EnumArt enumArt = CraftArt.BukkitToNotch(art);
assertNotNull(art.name(), enumArt);
assertThat(art.name(), cache.put(enumArt, art), is(nullValue()));
}
}
示例4: testCraftArtToBukkit
import org.bukkit.craftbukkit.CraftArt; //导入依赖的package包/类
@Test
public void testCraftArtToBukkit() {
Map<Art, EnumArt> cache = new EnumMap(Art.class);
for (EnumArt enumArt : EnumArt.values()) {
Art art = CraftArt.NotchToBukkit(enumArt);
assertNotNull(enumArt.name(), art);
assertThat(enumArt.name(), cache.put(art, enumArt), is(nullValue()));
}
}
示例5: setArt
import org.bukkit.craftbukkit.CraftArt; //导入依赖的package包/类
public boolean setArt(Art art, boolean force) {
net.minecraft.entity.item.EntityPainting painting = this.getHandle();
net.minecraft.util.EnumArt oldArt = painting.field_70522_e;
painting.field_70522_e = CraftArt.BukkitToNotch(art);
painting.func_82328_a(painting.field_82332_a);
if (!force && !painting.func_70518_d()) {
// Revert painting since it doesn't fit
painting.field_70522_e = oldArt;
painting.func_82328_a(painting.field_82332_a);
return false;
}
this.update();
return true;
}
示例6: getArt
import org.bukkit.craftbukkit.CraftArt; //导入依赖的package包/类
public Art getArt() {
net.minecraft.entity.item.EntityPainting.EnumArt art = getHandle().art;
return CraftArt.NotchToBukkit(art);
}
示例7: getArt
import org.bukkit.craftbukkit.CraftArt; //导入依赖的package包/类
public Art getArt() {
EnumArt art = getHandle().art;
return CraftArt.NotchToBukkit(art);
}