本文整理匯總了Python中vehicle.Vehicle.getBlockWithData方法的典型用法代碼示例。如果您正苦於以下問題:Python Vehicle.getBlockWithData方法的具體用法?Python Vehicle.getBlockWithData怎麽用?Python Vehicle.getBlockWithData使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類vehicle.Vehicle
的用法示例。
在下文中一共展示了Vehicle.getBlockWithData方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: len
# 需要導入模塊: from vehicle import Vehicle [as 別名]
# 或者: from vehicle.Vehicle import getBlockWithData [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])