3d_pattern.txt 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. //Events:
  2. event.load("block_break");
  3. //
  4. random_Blocks_Array = array.new(4);
  5. random_Blocks_Array[0] = material.get("RED_WOOL");
  6. random_Blocks_Array[1] = material.get("BLUE_WOOL");
  7. random_Blocks_Array[2] = material.get("YELLOW_WOOL");
  8. random_Blocks_Array[3] = material.get("GREEN_WOOL");
  9. random_Blocks_Array_Size = array,getSize(random_Blocks_Array);
  10. //Place Pattern
  11. pattern.place();
  12. //wait
  13. @wait
  14. wait();
  15. goto("wait");
  16. //Functions:
  17. //Lines
  18. function line.new(){
  19. Line_Array = array.new(4);
  20. for(a = 0; a < 3; a++){
  21. Liine_Array[a] = math.random(0,2) - 1;
  22. }
  23. Line_Array[3] = 1;
  24. return(Line_Array);
  25. }
  26. function line.set(All_Lines_In_Array){
  27. for(a = 0; a < array.getSize(All_Lines_In_Array); a++){
  28. Line_a = All_Lines_In_Array[a];
  29. key = ;
  30. value = $random_Blocks_Array[math.random(0, $random_Blocks_Array_Size)];
  31. map.add($Pattern_Blocks, key, value);
  32. }
  33. retrun();
  34. }
  35. //Pattern
  36. function pattern.make(){
  37. Rotate_Amount = math.random(0,3);
  38. Mirror_1_Amount = math.random(0,1);
  39. Mirror_2_Amount = math.random(0,1);
  40. for(a = 0; a < Space_Amount; a++){
  41. for(b = 0; b < a * Rotate_Amount; b++){
  42. Space.rotate();
  43. }
  44. for(b = 0; b < a * Mirror_1_Amount; b++){
  45. Space.Mirror_1(Mirror_Axis);
  46. }
  47. for(b = 0; b < a * Mirror_2_Amount; b++){
  48. Space.Mirror_2();
  49. }
  50. }
  51. return();
  52. }
  53. function pattern.place(){
  54. return();
  55. }
  56. //Mirror 1
  57. function Space.Mirror_1(Mirror_Axis){
  58. if(Mirror_Axis = 1){ //x Mirror
  59. for(a = 0; a < x_axis_length; a++){
  60. }
  61. }
  62. if(Mirror_Axis = 2){ //y Mirror
  63. }
  64. if(Mirror_Axis = 3){ //z Mirror
  65. }
  66. return();
  67. }
  68. //Mirror 2
  69. function Space.Mirror_2(){
  70. return();
  71. }
  72. //Rotate
  73. function Space.rotate(){
  74. Space.Mirror_1(Mirror_Axis);
  75. Space.Mirror_2();
  76. return();
  77. }