æç¶ãã«ååãã¤ãã¦ããã¨èªä½é¢æ°ãä½ããããã®ã§ã
ã¯ããã«
ååããã ãã¶éãããã¾ããããåºãããã¯æ·è¨ããã°ã©ã ã¯å½¹ç«ã£ã¦ãã¾ããï¼
ã³ãã³ãå ¥åæã«ã³ãã³ãã©ã¤ã³å¼æ°ãä¸ãããã¨ã§é·ããæå®ã§ããã®ä¾¿å©ã§ãããã
ä»åã¯ãã®ããã°ã©ã ã®å 容ãåæ¤è¨ãã¦ã¿ã¾ãããã
åºãããã¯æ·è¨ããã°ã©ã
ååã®ããã°ã©ã ã®åæ²ã
ãªããªãé·ãããã°ã©ã ã§ããããã£ã¦ãããã¨èªä½ã¯æå¤ã¨ã·ã³ãã«ãªã®ã¯ããã¾ã§ã®ããã°è¨äºãèªãã§ããã¨ãããã¾ãããã
ã§ããããªãã¨ãæãã¾ãããï¼
ããªãã ããåããããªãã¨ãä½åº¦ãç¹°ãè¿ãã¦æ¸ãã¦ãªãï¼ã
以åãç¹°ãè¿ãforæãç´¹ä»ããã¨ãï¼éå»è¨äºï¼ã«ããåãæç¶ããä½åº¦ãæ¸ãã®ã¯é¢åãªã®ã§ã代ããã«foræ使ã£ã¦åæ°æå®ãã¦ç¹°ãè¿ããæ¹æ³ã«ã¤ãã¦èª¬æãã¾ãããforæã使ããã¨ã§åé·ã§ç¡é§ãªè¨è¿°ãæ¸ã£ã¦ãå ¨ä½ããã£ãããã¾ããã
ä»åã¯ãã¾ãå¥ã®ããã£ããæ¸ãæ¹æ³ã説æãã¾ãã
åé·ãªé¨åã§ä½ããã£ã¦ããã®ãä¸è¨ã§èª¬æããã
ã¾ãç¹å¾´çãªã®ã¯ã以ä¸ã®ãããªæç¶ããã³ã¼ãä¸ã«äºååºç¾ãã¦ãããã¨ã§ãã
-- ã¢ã¤ãã ãå ¥ã£ã¦ããã¹ããããé¸æãã for slot=1,16 do local kosuu = turtle.getItemCount( slot ) if (kosuu > 0) then turtle.select( slot ) break end end
è¡çªå·ã§è¨ãã¨ã19ã26è¡ç®ã¨42ã49è¡ç®ã®äºç®æã§ããåãå 容ã2åæ¸ãã¦ããã®ã§ãªãã ãç¡é§ãªæ°ããã¾ããã
ã§ã¯ãã®æç¶ãã¯ä½ããã£ã¦ããã®ã§ããããï¼
ä¸è¨ã§è¦ç´ãããªãã°ããã¢ã¤ãã ãå ¥ã£ã¦ããã¹ããããé¸æãããæç¶ãã§ãããã
ãã®æç¶ãã«æ³¨ç®ãã¦ã¿ã¾ãããã
æç¶ãã«ååãã¤ãã¦ãã
ãã®ãã¢ã¤ãã ãå ¥ã£ã¦ããã¹ããããé¸æãããæç¶ãã§ãããã³ã¼ãå ¨ä½ã§ã¯ãã¢ã¤ãã ãå ¥ã£ã¦ããã¹ããããé¸æãããæç¶ããäºç®æããããã§ããªãã¨ããã®ãã¢ã¤ãã ãå ¥ã£ã¦ããã¹ããããé¸æãããæç¶ããçç¥ãã¦æ¸ãæ¹æ³ãã»ã»ã»ã
ã»ã»ã»é·ããï¼ä¸è¨ãããªããï¼ããã®æç¶ãã«ã¯ãã£ã¨çãååãã¤ããªããã¾ãããã
ãã¨ãã°ã¡ãã£ã¨ã ããã£ãã¤ãã¦è±èªã§ååãã¤ãã¾ããããã
ãselectItemSlotã(âãselect (an) item slotãâãã¢ã¤ãã ã¹ããããé¸æãã)
ã¨ãã©ãã§ãããã
æ°ããé¢æ°ãå®ç¾©ãã
ããã°ã©ã è¨èªã§ã¯ãä½åº¦ã使ã決ã¾ãåã£ãæç¶ãããé¢æ°ï¼ãµãã«ã¼ãã³ã¨å¼ã¶ãã¨ãããï¼ã¨ãã¦å®ç¾©ã§ãã¾ããä¸åº¦é¢æ°ã¨ãã¦å®ç¾©ãã¦ãã¾ãã°ããã®é¢æ°ã¯ä½¿ãæ¾é¡ã¨ãªãã¾ãã
èªåã§æ°ããé¢æ°ãå®ç¾©ããã«ã¯ã以ä¸ã®è¡¨è¨æ¹æ³ã使ãã¾ãã
function é¢æ°å() ãã£ã¦æ¬²ããæç¶ããæ¸ã end
ãã®è¡¨è¨æ¹æ³ã使ã£ã¦ã以ä¸ã®ããã«ãselectItemSlotãé¢æ°ãå®ç¾©ãã¾ãããã
function selectItemSlot() -- ã¢ã¤ãã ãå ¥ã£ã¦ããã¹ããããé¸æãã for slot=1,16 do local kosuu = turtle.getItemCount( slot ) if (kosuu > 0) then turtle.select( slot ) break end end end
ä»åã¯ä¸è¨ã®ããã«ããfunction é¢æ°å()ãããendãã®éã«ããselectItemSlotãã®å ·ä½çãªæç¶ããã³ãããã¾ããã
ãã ãã®ã¾ã¾ã ã¨ãã¤ã³ãã³ãï¼è¡é ã®ç©ºç½ã¹ãã¼ã¹ï¼ãä¸æãã§ä¸æ ¼å¥½ãªã®ã§ã以ä¸ã®ããã«æ´ãã¾ããã
function selectItemSlot() -- ã¢ã¤ãã ãå ¥ã£ã¦ããã¹ããããé¸æãã for slot=1,16 do local kosuu = turtle.getItemCount( slot ) if (kosuu > 0) then turtle.select( slot ) break end end end
以ä¸ã®ããã«ã·ã³ãã«ã«
ãã®ããã«æ°ããé¢æ°ãselectItemSlotããå®ç¾©ã§ããããã§ãã®ã§ããã®æ°é¢æ°ã使ã£ã¦åé·ãªæç¶ããç½®ãæããã¨ãããªæãã«ãªãã¾ãã
-- åºã«ãããã¯ãæ·ãè©°ããªããæå®ããæ©æ°ã ãåã«é²ã for i=1,hosuu do -- ã¢ã¤ãã ãå ¥ã£ã¦ããã¹ããããé¸æãã for slot=1,16 do local kosuu = turtle.getItemCount( slot ) if (kosuu > 0) then turtle.select( slot ) break end end turtle.placeDown() turtle.forward() end
ä¸è¨ã®åé·ãªè¡¨è¨ãã
以ä¸ã®ãããªãé¢æ°ã使ã£ãã·ã³ãã«ãªè¡¨è¨ã¸
-- åºã«ãããã¯ãæ·ãè©°ããªããæå®ããæ©æ°ã ãåã«é²ã for i=1,hosuu do selectItemSlot() turtle.placeDown() turtle.forward() end
ããã§ã®ãã¤ã³ãã¯ãä½ã£ãé¢æ°ãselectItemCountããå®è¡ããããã«ã¯ãæ«å°¾ã«ã()ããã¤ãã¦ãselectItemCount()
ã®ããã«æ¸ããã¨ã§ããã()ããå¿ããã¨å®è¡ã§ããªãã®ã§è¦æ³¨æã
èªä½é¢æ°ãå©ç¨ããå®æçããã°ã©ã
æçµçã«ä»¥ä¸ã®ãããªããã°ã©ã ã«ãªãã¾ãã
ãã®ããã°ã©ã ã«ã¯3ã¤ã®éè¦ãªãã¤ã³ããããã¾ãã
ã¾ãã³ã¡ã³ãã®------- Config ------
ã®ãããªåºåãç·ã«æ³¨ç®ãã¾ãããã
注ç®ãããã¨ã§ãããã°ã©ã å ¨ä½ã®æ§é ã以ä¸ã®ããã«ãªã£ã¦ãããã¨ããããã¾ãã
- Config é¨ï¼ãããã°ã©ã å ¨ä½ã®è¨å®ãã©ã¡ã¼ã¿ã¼ãè¨è¿°ããé¨åãæåãå¤ããããã«æ¸ãæãã¦ãè¯ãã
- Functions é¨ï¼ãå ¨ä½ããã£ããã¨è¡¨è¨ããããã«ãæ°ããé¢æ°ãå®ç¾©ããé¨åã
- Main é¨ï¼ãå®éã«ã³ã³ãã¥ã¼ã¿ãå®è¡ããæç¶ãã表è¨ããé¨åã
ãã®ããã«3é¨æ§æã«ãªã£ã¦ãããã¨ã«æ°ã¥ããã¨ãæåã®ãã¤ã³ãã§ãã
2ã¤ç®ã®ãã¤ã³ãã¨ãã¦ã åãã¦è¦ãããã°ã©ã ãèªã¿è§£ãæã«ã¯ããã®Mainé¨åããå§ãããã¨ãéè¦ã§ãã
Mainé¨åãèªãã§ãããã¡ã«ãè¬ã®ï¼ç¥ããªãï¼é¢æ°ãåºã¦ããããããã¯ããã°ã©ã ä½æè ãä½ã£ãæ°ããé¢æ°ã§ããå¯è½æ§ãããã¾ããFunctioné¨ã«æ»ã£ã¦ãã®é¢æ°ãæ¢ããä½ãããé¢æ°ãªã®ã解æãã¾ãããã
ãªããèªä½é¢æ°ã®ååããselectItemSlotãã®ããã«ãããããããã®ã«ãã¦ããã°ããã¢ã¤ãã ã®ã¹ããããé¸ãã§ãããé¢æ°ãã ã¨ããç¨åº¦æ¨æ¸¬ãã¤ãã¾ãã®ã§ãFunctioné¨ãèªã¾ãªãã¦ãå ¨ä½ã®åããæ´ããããã«ãªãã¾ãã
é¢æ°ã®ååã¯ããã®æåã説æãããããããããã®ã«ãããã¨ãå¿ããã¾ãããã
ã¤ã¾ãããé¢æ°ã®ååã¤ãã¯éè¦ï¼ã
3ã¤ç®ã®ãã¤ã³ãã¨ãã¦ãé¢æ°ã®å®ç¾©ã¯å®éã«ãã®é¢æ°ãå®è¡ãããããåã§è¡ãã¾ããããã¤ã¾ããé¢æ°ãå®ç¾©ããFunctioné¨ã¯ãå®éã«ãããå®è¡ããMainé¨ãããåã«ç½®ããã¨ããã¤ã³ãã§ãã
èªè ã¸ã®å®¿é¡
ãã®ããã°ã©ã ã¯ãä»ã«ãåé·ãªè¨è¿°ãããããããã¾ãã
ãã¨ãã°ã以ä¸ã®ãããªé¢æ°ãFunctioné¨ã§å®ç¾©ãã¦ããã®é¢æ°ã使ã£ã¦ã·ã³ãã«ã«æ¸ãæãã¦ã¿ã¾ãããã
- spreadBlockAndForward() : çä¸ã«ãããã¯ãè¨ç½®ãã¦åã«1æ©é²ãé¢æ°
- goRight() : å³ã«ç§»åããï¼å³ãåãã¦åã«1æ©é²ãï¼é¢æ°
ãã¾ã
ã¹ãããã®ãã®æ²ãããããã ï¼ã¢ãã£åºåã§ã¯ãªãAmazonååã¸ã®ãã ã®ãªã³ã¯ã§ãï¼
- ã¢ã¼ãã£ã¹ã: ã¹ããã,èéæ£å®
- åºç社/ã¡ã¼ã«ã¼: ã¦ããã¼ãµã«J
- çºå£²æ¥: 2002/10/16
- ã¡ãã£ã¢: CD
- è³¼å ¥: 1人 ã¯ãªãã¯: 31å
- ãã®ååãå«ãããã° (113件) ãè¦ã