ParlackStudio

Untitled

Sep 18th, 2025
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5.87 KB | Software | 0 0
  1. in English:
  2. Patch Notes – Plugin Adjustments and Implementations - Version 1.1.1
  3.  
  4. ■ Laser
  5.  
  6. Previously, it wasn’t possible to use more than one laser in the same procedure. Now you can add as many blocks as you want to generate lasers and emit particles.
  7.  
  8. ➤ Problem:
  9.  
  10. - Activating lasers on multiple blocks caused the game to crash (ClassCastException).
  11. - The template created multiple @SubscribeEvent listeners (internal classes $1, $4, …) within the same procedure.
  12. - The EventBus attempted to use one handler as if it were another, causing a cast error.
  13.  
  14. ➔ Fix:
  15.  
  16. - Replaced multiple listeners with a single global listener for ServerTickEvent (via addListener, without @SubscribeEvent).
  17. - Each click now generates a task (parlack.laser.task@<dim>:<pos>) processed every tick.
  18. - When time expires or the block changes, the task is removed.
  19. - Added a lock to prevent duplicate lasers from the same origin (parlack.laser.active@…).
  20.  
  21. ----------------------------------------------------------------------------------------------------------------------------------
  22.  
  23. ■ X-Ray
  24.  
  25. Previously, X-Ray only worked for one block. Now it can be enabled for multiple blocks in the same procedure.
  26.  
  27. ➤ Problem:
  28.  
  29. - The procedure always wrote to the same NBT keys (nx_xr_block, nx_xr_radius, nx_xr_color, nx_xr_until).
  30. - The last call of the tick overwrote previous ones → only one highlight appeared.
  31. - In some cases, the game crashed because ARGB color values were saved as negative integers but parsed with parseUnsignedInt.
  32.  
  33. ➔ Fix:
  34.  
  35. - Preserved 100% of the original rendering and flow.
  36. - Added per-tick “slots”: nx_xr_lasttick, nx_xr_count, and arrays nx_xr_block_{i}, nx_xr_radius_{i}, nx_xr_color_{i}, nx_xr_until_{i} (up to 8 per tick).
  37. - The listener reads all slots and renders all blocks; if none exist, it falls back to the old keys (retro-compatible).
  38. - Crash fix: switched to Integer.parseInt (accepts negative ARGB).
  39.  
  40. ----------------------------------------------------------------------------------------------------------------------------------
  41.  
  42. ■ Protective Globe Barrier
  43.  
  44. Now detects when the armor is removed (even one piece) and disables the barrier properly in On player tick update.
  45.  
  46. ➤ Problem:
  47.  
  48. - With “duration = 0(infinite), the procedure stored nx_globe_until = infinite.
  49. - When armor was removed, the block stopped running, but the barrier remained infinite.
  50.  
  51. ➔ Fix:
  52.  
  53. - Kept the original behavior.
  54. - For “duration = 0”, implemented a keep-alive system:
  55. - Each call sets: nx_globe_keepalive = true, nx_globe_last = now, nx_globe_until = now + 5 ticks.
  56. - Listeners end the barrier when:
  57. - Time expires (gameTime >= nx_globe_until), or
  58. - No refresh occurs for ~6 ticks (block stopped → barrier fades automatically).
  59.  
  60. ----------------------------------------------------------------------------------------------------------------------------------
  61.  
  62. ■ Replace Item Inventory
  63.  
  64. Previously caused compilation errors when selecting items from your mod or other mods.
  65.  
  66. ➤ Problem:
  67.  
  68. - Items selected appeared as CUSTOM:ItemName, which isn’t valid Java code.
  69. - The template couldn’t handle both selector-based items and Get item by ID at the same time.
  70. - In some cases, the swap also ran on the client, causing “desync” and items seeming to disappear.
  71.  
  72. ➔ Fix:
  73.  
  74. - Dual support for item origin:
  75. - If CUSTOM:ItemName → convert to ${modid}:item_name (CamelCase → snake_case).
  76. - Otherwise → use the expression as-is (Items.*, MyModItems.*.get(), Get item by ID).
  77. - Execution runs server-side only + broadcastChanges() for proper sync.
  78. - Behavior preserved: swap in the same slot, keeping count, NBT, and damage.
  79.  
  80. ----------------------------------------------------------------------------------------------------------------------------------
  81.  
  82. ■ Remove Block Area
  83.  
  84. ➔ Accidental file duplication fixed. Functionality now restored.
  85.  
  86. ----------------------------------------------------------------------------------------------------------------------------------
  87.  
  88. New Procedures:
  89.  
  90. ➤ Fly Custom
  91.  
  92. - New procedure that allows flying with configurable speed and duration:
  93. - Speed: choose the speed (0 = default).
  94. - Duration: set in ticks. Use 0 for infinite (in On player tick update).
  95.  
  96. Speed scales:
  97.  
  98. 0.5 → 2x faster
  99. 0.25 → 4x
  100. 0.2 → 5x
  101. 0.1 → 10x (very fast)
  102. 0.05 → 20x (extreme)
  103. 0.02 → 50x (almost unplayable)
  104.  
  105. ----------------------------------------------------------------------------------------------------------------------------------
  106.  
  107. ➤ Vein Break
  108.  
  109. ➔ Function:
  110. Breaks all connected blocks of the same type from the origin block, respecting:
  111.  
  112. maximum limit,
  113. reach (Manhattan radius),
  114. diagonals (6 or 26 directions),
  115. whether to drop items or just remove.
  116. Perfect for “chop down entire trees”, ore vein mining, digging clusters, etc.
  117. Common Triggers
  118. A block is broken
  119. Player left/right clicked block
  120. When block destroyed with item…
  121. Parameters
  122. x / y / z: coordinates of the origin block.
  123. max: maximum number of blocks (anti-lag).
  124. radius: Manhattan distance reach.
  125. drops:= drop items, ✖ = just remove.
  126. diagonals:= connect 26 directions, ✖ = only 6.
  127.  
  128. ➔ Recommended Settings:
  129.  
  130. Axe (trees): max 128, radius 68, diagonals ✔, drops ✔.
  131. Pickaxe (ores): max 256512, radius 1016, diagonals ✖, drops ✔.
  132. Shovel (sand/gravel): max 128256, radius 812, diagonals ✖, drops optional.
  133. Shears/Sickle (leaves/plants): max 200+, radius 812, diagonals ✔, drops ✔.
  134.  
  135. ➔ Tips:
  136.  
  137. Always use max + radius.
  138. Disable diagonals for ores (prevents grabbing separate veins).
  139. Use drops ✖ for cleanup routines (worldedit-like, without filling the ground with items).
  140. Combine with a tool damage procedure (e.g., sum blocks broken).
  141.  
  142. ----------------------------------------------------------------------------------------------------------------------------------
Add Comment
Please, Sign In to add comment