Advertisement
McHauge

Chunk Gen based on Xisumavoid's Script

Apr 6th, 2020
3,841
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;=================================================================
  2. ; AHK Setting
  3. ;=================================================================
  4.  
  5. #NoEnv
  6. SetBatchLines -1
  7. SetTitleMatchMode 2
  8. #SingleInstance off
  9. #Persistent
  10. SetWorkingDir %A_ScriptDir%
  11. SetKeyDelay, 100
  12.  
  13. ;=================================================================
  14. ; Shortcuts
  15. ;=================================================================
  16.  
  17. Hotkey !q, chunkbuilder ; Pressing alt + q will start function
  18. Return
  19.  
  20. ;=================================================================
  21. ; Render Grid Setup:
  22. ;=================================================================
  23. ;                                                                       |
  24. ; 4x4 of rRegion files                          |    One Region File:
  25. ;  = 128x128 Chunks                                 |     = 32x32 Chunks
  26. ;  = 2048x2048 Blocks                               |     = 512x512 Blocks
  27. ; #------##------##------##------#  |    #------#
  28. ; |      ||      ||      ||      |  |    |      |
  29. ; |      ||      ||      ||      |  |    |      |
  30. ; |      ||      ||      ||      |  |    |      |
  31. ; #------##------##------##------#  |    #------#
  32. ; #------##------##------##------#  |
  33. ; |      ||      ||      ||      |  |    With a renderdistande = 8
  34. ; |      ||      ||      ||      |  |  That's a 4x4 grid of player postions
  35. ; |      ||      ||      ||      |  |  To render one region file.
  36. ; #------##------##------##------#  |
  37. ; #------##------##------##------#  |  each tp is: viewdistance x 16 x 2 = X blocks
  38. ; |      ||      ||      ||      |  |  number of jumps/loops is: region grid x 32 = number of chunks / veiw distance = X loops
  39. ; |      ||      ||      ||      |  |
  40. ; |      ||      ||      ||      |  |  Cord 0,0 is always the center in the grid
  41. ; #------##------##------##------#  |  And we always start the render in the lower left corner
  42. ; #------##------##------##------#  |  Eg at -X -Z and work our way towards +X +Z
  43. ; |      ||      ||      ||      |  |
  44. ; |      ||      ||      ||      |  |
  45. ; |      ||      ||      ||      |  |
  46. ; #------##------##------##------#  |
  47.  
  48. ;=================================================================
  49. ; The chunk builder function
  50. ;=================================================================
  51.  
  52. chunkbuilder:
  53. {
  54.     regionGrid  := 8                                                                                                                ; Region file Grid: 4 = 4x4 Grid og Region files = 2048x2048 Blocks
  55.     viewDist        := 8                                                                                                                ; View distance in chunks on the server
  56.     tpDelay         := 1500                                                                                                         ; 10.000 = 10 Sec
  57.  
  58.   tpStart       := Format("{:d}", SubStr((-1) * (regionGrid / 2) * 512, 1)) ; Calc Start Position (lower left corner)
  59.   tpDist            := SubStr(viewDist * 16 * 2, 1)                                                         ; Distance between positions
  60.   totalLoops    := Format("{:d}", SubStr((regionGrid * 32) / viewDist, 1))  ; Calc total number of player spots pr rows
  61.  
  62.     Sleep tpDelay                                                                                                                       ; Insert Delay
  63.     Send t/minecraft:tp @p %tpStart% 192 %tpStart%{Enter}                                       ; Tp to starting posistion
  64.  
  65.     Loop % totalLoops                                                                                                               ; Start Loop for Z-axis
  66.     {
  67.         Loop % totalLoops                                                                                                           ; Start Loop for X-axis
  68.         {
  69.             Sleep tpDelay                                                                                                               ; Insert Delay
  70.             Send t/minecraft:tp @p ~ {space} ~ {space} ~ {space} -90 20{Enter}  ; Rotate 90 deg
  71.             Sleep tpDelay                                                                                                               ; Insert Delay
  72.             Send t/minecraft:tp @p ~ {space} ~ {space} ~ {space} 0 20 {Enter}   ; Rotate 90 deg
  73.             Sleep tpDelay                                                                                                               ; Insert Delay
  74.             Send t/minecraft:tp @p ~ {space} ~ {space} ~ {space} 90 20{Enter}   ; Rotate 90 deg
  75.             Sleep tpDelay                                                                                                               ; Insert Delay
  76.             Send t/minecraft:tp @p ~ {space} ~ {space} ~ {space} 180 20{Enter}  ; Rotate 90 deg
  77.             Sleep tpDelay                                                                                                               ; Insert Delay
  78.             Send t/minecraft:tp @p ~%tpDist% ~ {space} ~ {Enter}                                ; Return to beginnig of the row
  79.         }
  80.         Sleep tpDelay                                                                                                                   ; Insert Delay
  81.         Send t/minecraft:tp @p %tpStart% 192 {space} ~%tpDist%{Enter}                   ; TP one row up
  82.     }
  83. }
  84.  
  85. ;=================================================================
  86. ; Other Buttons
  87. ;=================================================================
  88.  
  89. F8::Pause                                                                   ; Pause Script
  90. F9::Reload                                                                  ; Reload Script
  91. F10::Send t/minecraft:tp @p 0 200 0{Enter}  ; TP back to 0,0
  92.  
  93. Esc:
  94. ExitApp
  95. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement