本文整理汇总了Python中vehicle.Vehicle.setVehicle方法的典型用法代码示例。如果您正苦于以下问题:Python Vehicle.setVehicle方法的具体用法?Python Vehicle.setVehicle怎么用?Python Vehicle.setVehicle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vehicle.Vehicle
的用法示例。
在下文中一共展示了Vehicle.setVehicle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: len
# 需要导入模块: from vehicle import Vehicle [as 别名]
# 或者: from vehicle.Vehicle import setVehicle [as 别名]
if len(sys.argv) == 8:
corner1 = int(sys.argv[2]),int(sys.argv[3]),int(sys.argv[4])
corner2 = int(sys.argv[5]),int(sys.argv[6]),int(sys.argv[7])
elif len(sys.argv) == 2:
corner1,corner2 = getArea(basePos,0)
elif len(sys.argv) == 3:
if sys.argv[2].startswith('r'):
restore(vehicle,sys.argv[1],basePos)
exit()
corner1,corner2 = getArea(basePos,int(sys.argv[2]))
else:
mc.postToChat("scan vehiclename x1 y1 z1 x2 y2 z2")
mc.postToChat("scan vehiclename depth [then right-click with sword on other corner]")
mc.postToChat("scan vehiclename restore")
mc.postToChat("scan vehiclename [then right-click with sword on other corner]")
mc.postToChat("All coordinates are relative to player")
exit()
mc.postToChat("Scanning region "+str(corner1)+"-"+str(corner2))
dict = {}
for x in range(corner1[0],corner2[0]+1):
for y in range(corner1[1],corner2[1]+1):
for z in range(corner1[2],corner2[2]+1):
block = vehicle.getBlockWithData(basePos.x+x,basePos.y+y,basePos.z+z)
if block.id != AIR.id:
dict[(x,y,z)] = block
mc.postToChat("Scanned "+str(len(dict))+" blocks")
vehicle.setVehicle(dict, rot)
save(vehicle,sys.argv[1])