本文整理汇总了Java中dan200.computercraft.api.turtle.TurtleSide.Left方法的典型用法代码示例。如果您正苦于以下问题:Java TurtleSide.Left方法的具体用法?Java TurtleSide.Left怎么用?Java TurtleSide.Left使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dan200.computercraft.api.turtle.TurtleSide
的用法示例。
在下文中一共展示了TurtleSide.Left方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getIcon
import dan200.computercraft.api.turtle.TurtleSide; //导入方法依赖的package包/类
@Override
public IIcon getIcon(ITurtleAccess turtle, TurtleSide side)
{
if(side==TurtleSide.Left)
return iconLeft;
else
return iconRight;
}
示例2: getModel
import dan200.computercraft.api.turtle.TurtleSide; //导入方法依赖的package包/类
@Override
@SideOnly(Side.CLIENT)
public Pair<IBakedModel, Matrix4f> getModel(ITurtleAccess turtle, TurtleSide side) {
final Minecraft mc = Minecraft.getMinecraft();
final ModelManager modelManager = mc.getRenderItem().getItemModelMesher().getModelManager();
// TODO: actual models
ModelResourceLocation location = new ModelResourceLocation(side == TurtleSide.Left? "computercraft:turtle_crafting_table_left" : "computercraft:turtle_crafting_table_right", "inventory");
return Pair.of(modelManager.getModel(location), null);
}
示例3: canSpawn
import dan200.computercraft.api.turtle.TurtleSide; //导入方法依赖的package包/类
private boolean canSpawn(World world) {
EnumFacing facing = turtle.getDirection();
EnumFacing spawnSide = (side == TurtleSide.Left)? facing.rotateYCCW() : facing.rotateY();
BlockPos spawnPos = turtle.getPosition().offset(spawnSide);
return world.isAirBlock(spawnPos);
}
示例4: PeripheralFurnace
import dan200.computercraft.api.turtle.TurtleSide; //导入方法依赖的package包/类
public PeripheralFurnace(ITurtleAccess access, TurtleSide periphSide) {
turtle = access;
upgradeOnLeft = periphSide == TurtleSide.Left;
inv = turtle.getInventory();
furnace = new TileEntityFurnace();
}