Skip to content
Permalink
Browse files

Merge master

  • Loading branch information
octylFractal committed Mar 23, 2020
2 parents 05db204 + 20d630c commit 1c6b1b38481839fdb7d0f437132531067cde8812
Showing with 7,124 additions and 45,480 deletions.
  1. +25 −0 .github/ISSUE_TEMPLATE/bug_report.md
  2. +5 −0 .github/ISSUE_TEMPLATE/config.yml
  3. +20 −0 .github/ISSUE_TEMPLATE/feature_request.md
  4. +33 −0 CHANGELOG.txt
  5. +26 −0 LICENSE.txt
  6. +39 −1 build.gradle.kts
  7. +6 −1 buildSrc/build.gradle.kts
  8. +18 −1 buildSrc/src/main/kotlin/PlatformConfig.kt
  9. +1 −0 buildSrc/src/main/kotlin/Versions.kt
  10. +3 −3 config/checkstyle/checkstyle.xml
  11. +5 −1 config/checkstyle/import-control.xml
  12. +4 −4 contrib/craftscripts/draw.js
  13. +3 −3 gradle.properties
  14. +7 −11 worldedit-bukkit/build.gradle.kts
  15. +31 −1 worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitAdapter.java
  16. +4 −0 worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitBlockCommandSender.java
  17. +4 −0 worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitCommandSender.java
  18. +14 −2 worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitPlayer.java
  19. +15 −1 worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitServerInterface.java
  20. +28 −48 worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
  21. +5 −7 worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/WorldEditPlugin.java
  22. +28 −5 worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/BukkitImplAdapter.java
  23. +0 −1 worldedit-bukkit/src/main/resources/defaults/config.yml
  24. +1 −0 worldedit-bukkit/src/main/resources/plugin.yml
  25. BIN worldedit-bukkit/src/main/resources/worldedit-adapters.jar
  26. +8 −0 worldedit-cli/src/main/java/com/sk89q/worldedit/cli/CLIPlatform.java
  27. +7 −4 worldedit-cli/src/main/java/com/sk89q/worldedit/cli/schematic/ClipboardWorld.java
  28. +1 −0 worldedit-cli/src/main/resources/com/sk89q/worldedit/cli/data/2225.json
  29. +1 −0 worldedit-cli/src/main/resources/com/sk89q/worldedit/cli/data/2230.json
  30. +0 −1 worldedit-cli/src/main/resources/defaults/worldedit.properties
  31. +13 −3 worldedit-core/build.gradle.kts
  32. +4 −3 worldedit-core/src/main/antlr/com/sk89q/worldedit/antlr/Expression.g4
  33. +2 −1 worldedit-core/src/main/java/com/sk89q/minecraft/util/commands/package-info.java
  34. +34 −13 worldedit-core/src/main/java/com/sk89q/worldedit/EditSession.java
  35. +34 −0 worldedit-core/src/main/java/com/sk89q/worldedit/LocalConfiguration.java
  36. +82 −17 worldedit-core/src/main/java/com/sk89q/worldedit/LocalSession.java
  37. +2 −16 worldedit-core/src/main/java/com/sk89q/worldedit/WorldEdit.java
  38. +81 −0 worldedit-core/src/main/java/com/sk89q/worldedit/WorldEditManifest.java
  39. +9 −9 worldedit-core/src/main/java/com/sk89q/worldedit/command/ExpandCommands.java
  40. +55 −14 worldedit-core/src/main/java/com/sk89q/worldedit/command/GeneralCommands.java
  41. +1 −1 worldedit-core/src/main/java/com/sk89q/worldedit/command/HistoryCommands.java
  42. +203 −0 worldedit-core/src/main/java/com/sk89q/worldedit/command/LegacySnapshotCommands.java
  43. +136 −0 worldedit-core/src/main/java/com/sk89q/worldedit/command/LegacySnapshotUtilCommands.java
  44. +8 −5 worldedit-core/src/main/java/com/sk89q/worldedit/command/RegionCommands.java
  45. +9 −2 worldedit-core/src/main/java/com/sk89q/worldedit/command/SchematicCommands.java
  46. +172 −101 worldedit-core/src/main/java/com/sk89q/worldedit/command/SnapshotCommands.java
  47. +36 −51 worldedit-core/src/main/java/com/sk89q/worldedit/command/SnapshotUtilCommands.java
  48. +1 −1 worldedit-core/src/main/java/com/sk89q/worldedit/command/ToolCommands.java
  49. +3 −1 worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/AbstractDirectionConverter.java
  50. +0 −87 worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/EditSessionHolder.java
  51. +7 −0 worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/EnumConverter.java
  52. +75 −0 worldedit-core/src/main/java/com/sk89q/worldedit/command/argument/SideEffectConverter.java
  53. +12 −7 worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/QueryTool.java
  54. +1 −1 worldedit-core/src/main/java/com/sk89q/worldedit/extension/factory/parser/DefaultBlockParser.java
  55. +6 −0 worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Actor.java
  56. +3 −1 worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Capability.java
  57. +4 −0 worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/Platform.java
  58. +2 −2 worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformCommandManager.java
  59. +6 −0 worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlatformManager.java
  60. +5 −0 worldedit-core/src/main/java/com/sk89q/worldedit/extension/platform/PlayerProxy.java
  61. +30 −6 worldedit-core/src/main/java/com/sk89q/worldedit/extent/AbstractBufferingExtent.java
  62. +5 −6 worldedit-core/src/main/java/com/sk89q/worldedit/extent/buffer/ExtentBuffer.java
  63. +1 −1 worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/io/MCEditSchematicReader.java
  64. +4 −8 worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/ChunkBatchingExtent.java
  65. +11 −10 worldedit-core/src/main/java/com/sk89q/worldedit/extent/reorder/MultiStageReorder.java
  66. +29 −54 ...core/src/main/java/com/sk89q/worldedit/extent/world/{FastModeExtent.java → SideEffectExtent.java}
  67. +2 −2 worldedit-core/src/main/java/com/sk89q/worldedit/function/operation/SetBlockMap.java
  68. +44 −12 worldedit-core/src/main/java/com/sk89q/worldedit/internal/block/BlockStateIdAccess.java
  69. +29 −0 worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/CompiledExpression.java
  70. +0 −625 worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/EvaluatingVisitor.java
  71. +0 −2 worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/EvaluationException.java
  72. +61 −0 worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/ExecutionData.java
  73. +14 −94 worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/Expression.java
  74. +19 −18 worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/ExpressionHelper.java
  75. +2 −4 worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/ExpressionValidator.java
  76. +71 −30 worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/Functions.java
  77. +6 −3 worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/{ → invoke}/BreakException.java
  78. +688 −0 worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/invoke/CompilingVisitor.java
  79. +34 −0 worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/invoke/ExecNode.java
  80. +80 −0 worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/invoke/ExpressionCompiler.java
  81. +394 −0 worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/invoke/ExpressionHandles.java
  82. +39 −0 worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/invoke/ReturnException.java
  83. +51 −0 worldedit-core/src/main/java/com/sk89q/worldedit/internal/util/BiomeMath.java
  84. +3 −3 worldedit-core/src/main/java/com/sk89q/worldedit/regions/shape/WorldEditExpressionEnvironment.java
  85. +7 −3 worldedit-core/src/main/java/com/sk89q/worldedit/util/PropertiesConfiguration.java
  86. +68 −0 worldedit-core/src/main/java/com/sk89q/worldedit/util/SideEffect.java
  87. +94 −0 worldedit-core/src/main/java/com/sk89q/worldedit/util/SideEffectSet.java
  88. +2 −3 worldedit-core/src/main/java/com/sk89q/worldedit/util/YAMLConfiguration.java
  89. +72 −57 worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/BlockMap.java
  90. +38 −33 ...core/src/main/java/com/sk89q/worldedit/util/collection/{SubBlockMap.java → Int2BaseBlockMap.java}
  91. +1 −1 worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/LocatedBlockList.java
  92. +83 −0 worldedit-core/src/main/java/com/sk89q/worldedit/util/collection/MoreStreams.java
  93. +88 −0 worldedit-core/src/main/java/com/sk89q/worldedit/util/formatting/component/SideEffectBox.java
  94. +32 −0 worldedit-core/src/main/java/com/sk89q/worldedit/util/function/IORunnable.java
  95. +21 −0 worldedit-core/src/main/java/com/sk89q/worldedit/util/io/Closer.java
  96. +40 −0 worldedit-core/src/main/java/com/sk89q/worldedit/util/io/file/ArchiveNioSupport.java
  97. +99 −0 worldedit-core/src/main/java/com/sk89q/worldedit/util/io/file/ArchiveNioSupports.java
  98. +68 −0 worldedit-core/src/main/java/com/sk89q/worldedit/util/io/file/MorePaths.java
  99. +59 −0 worldedit-core/src/main/java/com/sk89q/worldedit/util/io/file/TrueVfsArchiveNioSupport.java
  100. +53 −0 worldedit-core/src/main/java/com/sk89q/worldedit/util/io/file/ZipArchiveNioSupport.java
  101. +110 −0 worldedit-core/src/main/java/com/sk89q/worldedit/util/time/FileNameDateTimeParser.java
  102. +52 −0 worldedit-core/src/main/java/com/sk89q/worldedit/util/time/ModificationDateTimeParser.java
  103. +45 −0 worldedit-core/src/main/java/com/sk89q/worldedit/util/time/SnapshotDateTimeParser.java
  104. +10 −6 worldedit-core/src/main/java/com/sk89q/worldedit/util/translation/TranslationManager.java
  105. +2 −1 worldedit-core/src/main/java/com/sk89q/worldedit/world/AbstractWorld.java
  106. +8 −3 worldedit-core/src/main/java/com/sk89q/worldedit/world/NullWorld.java
  107. +40 −3 worldedit-core/src/main/java/com/sk89q/worldedit/world/World.java
  108. +8 −1 worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockCategories.java
  109. +20 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockState.java
  110. +21 −6 worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockType.java
  111. +4 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/block/BlockTypes.java
  112. +12 −14 worldedit-core/src/main/java/com/sk89q/worldedit/world/chunk/AnvilChunk.java
  113. +2 −4 worldedit-core/src/main/java/com/sk89q/worldedit/world/chunk/OldChunk.java
  114. +1 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/entity/EntityTypes.java
  115. +3 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/item/ItemCategories.java
  116. +15 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/item/ItemType.java
  117. +7 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/item/ItemTypes.java
  118. +3 −1 worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledBlockData.java
  119. +20 −1 worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledItemData.java
  120. +12 −2 worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/BundledItemRegistry.java
  121. +36 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/ItemMaterial.java
  122. +8 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/ItemRegistry.java
  123. +2 −2 worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/LegacyMapper.java
  124. +34 −97 worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/PassthroughBlockMaterial.java
  125. +45 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/PassthroughItemMaterial.java
  126. +41 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/registry/SimpleItemMaterial.java
  127. +62 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/experimental/Snapshot.java
  128. +35 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/experimental/SnapshotComparator.java
  129. +81 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/experimental/SnapshotDatabase.java
  130. +90 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/experimental/SnapshotInfo.java
  131. +202 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/experimental/SnapshotRestore.java
  132. +300 −0 .../src/main/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FileSystemSnapshotDatabase.java
  133. +166 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FolderSnapshot.java
  134. +30 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/snapshot/experimental/package-info.java
  135. +1 −54 worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ChunkStore.java
  136. +117 −0 worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/ChunkStoreHelper.java
  137. +3 −14 worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/LegacyChunkStore.java
  138. +6 −16 worldedit-core/src/main/java/com/sk89q/worldedit/world/storage/McRegionChunkStore.java
  139. +1 −16,902 worldedit-core/src/main/resources/com/sk89q/worldedit/world/registry/blocks.114.json
  140. +1 −0 worldedit-core/src/main/resources/com/sk89q/worldedit/world/registry/blocks.115.json
  141. +1 −14,952 worldedit-core/src/main/resources/com/sk89q/worldedit/world/registry/blocks.json
  142. +1 −6,141 worldedit-core/src/main/resources/com/sk89q/worldedit/world/registry/items.114.json
  143. +1 −0 worldedit-core/src/main/resources/com/sk89q/worldedit/world/registry/items.115.json
  144. +1 −3,162 worldedit-core/src/main/resources/com/sk89q/worldedit/world/registry/items.json
  145. +1 −2,332 worldedit-core/src/main/resources/com/sk89q/worldedit/world/registry/legacy.json
  146. +26 −2 worldedit-core/src/main/resources/lang/strings.json
  147. +10 −0 worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/BaseExpressionTest.java
  148. +289 −33 worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/ExpressionTest.java
  149. +48 −0 worldedit-core/src/test/java/com/sk89q/worldedit/internal/expression/ExpressionTestCase.java
  150. +1 −1 worldedit-core/src/test/java/com/sk89q/worldedit/util/collection/BlockMapTest.java
  151. +69 −0 worldedit-core/src/test/java/com/sk89q/worldedit/util/io/file/MorePathsTest.java
  152. +131 −0 worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/EntryMaker.java
  153. +86 −0 worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FSSDContext.java
  154. +299 −0 worldedit-core/src/test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FSSDTestType.java
  155. +195 −0 .../test/java/com/sk89q/worldedit/world/snapshot/experimental/fs/FileSystemSnapshotDatabaseTest.java
  156. BIN worldedit-core/src/test/resources/world_region.mca.gzip
  157. +8 −13 worldedit-fabric/build.gradle.kts
  158. +5 −5 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/FabricAdapter.java
  159. +78 −78 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/FabricDataFixer.java
  160. +1 −1 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/FabricEntity.java
  161. +14 −1 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/FabricPlatform.java
  162. +1 −1 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/FabricPlayer.java
  163. +114 −84 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/FabricWorld.java
  164. +7 −4 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/FabricWorldEdit.java
  165. +42 −0 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/MutableBiomeArray.java
  166. +8 −8 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/NBTConverter.java
  167. +1 −1 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/PropertyAdapter.java
  168. +39 −0 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/mixin/MixinBiomeArray.java
  169. +5 −5 worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/mixin/MixinMinecraftServer.java
  170. +0 −1 worldedit-fabric/src/main/resources/defaults/worldedit.properties
  171. +1 −0 worldedit-fabric/src/main/resources/worldedit.mixins.json
  172. +22 −15 worldedit-forge/build.gradle.kts
  173. +8 −8 worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeDataFixer.java
  174. +1 −1 worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeEntity.java
  175. +14 −0 worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgePlatform.java
  176. +1 −1 worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgePlayer.java
  177. +111 −70 worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorld.java
  178. +7 −7 worldedit-forge/src/main/java/com/sk89q/worldedit/forge/NBTConverter.java
  179. +3 −3 worldedit-forge/src/main/java/com/sk89q/worldedit/forge/TileEntityUtils.java
  180. +1 −0 worldedit-forge/src/main/resources/META-INF/accesstransformer.cfg
  181. +7 −1 worldedit-forge/src/main/resources/META-INF/mods.toml
  182. +0 −1 worldedit-forge/src/main/resources/defaults/worldedit.properties
  183. +4 −9 worldedit-sponge/build.gradle.kts
  184. +9 −0 worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongePlatform.java
  185. +5 −3 worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/SpongeWorldEdit.java
  186. +2 −3 worldedit-sponge/src/main/java/com/sk89q/worldedit/sponge/config/ConfigurateConfiguration.java
@@ -0,0 +1,25 @@
---
name: Bug report
about: Report a way in which WorldEdit is not working as intended
title: ''
labels: type:bug
assignees: ''

---

**Describe the bug**
<!-- A clear and concise description of what the bug is. -->

**To Reproduce**
<!-- Steps to reproduce the behavior: -->
1. ...
2. ...

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

**Screenshots**
<!-- If applicable, add screenshots to help explain your problem. -->

**Additional context**
<!-- Add any other context about the problem here. -->
@@ -0,0 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: EngineHub Discord
url: https://discord.gg/EngineHub
about: Please ask and answer questions here.
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for WorldEdit
title: ''
labels: type:feature-request
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->

**Describe the solution you'd like**
<!-- A clear and concise description of what you want to happen. -->

**Describe alternatives you've considered**
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

**Additional context**
<!-- Add any other context or screenshots about the feature request here. -->
@@ -1,3 +1,36 @@
7.1.0
- Improve the expression parser by compiling expressions for performance
- Made ItemMaterial accessible via the API
- Added CommandSender adapters to the BukkitAdapter class
- Added legacy data values to the info tool, and expressions
- Improve messages when running the wrong WorldEdit version for the MC version
- Fixed an issue where other plugins could send bad data to clients using the WorldEdit API
- Significant memory optimisations. Many operations will now require less RAM.
- Added WorldEdit-CLI, a tool to run headless WorldEdit from the commandline (see https://matthewmiller.dev/blog/introducing-worldeditcli/)
- Allowed most WorldEdit commands to be run from the console
- Added //world, to override the world in which WorldEdit is operating (useful for console)
- Added support for WorldEdit in CommandBlocks (on Spigot/Paper). Double slash commands require using /worldedit:/set due to a Minecraft bug.
- Fixed the inbuilt pastebin service
- Added 1.15 support
- Re-add the /tool command, and deprecate old top-level tool commands
- Add /brush none as a shortcut to unbind the brush
- Add //watchdog, to make WorldEdit keep the server running during edits.
- Remove FabricAPI requirement of WorldEdit-Fabric
- Fixed //stack with diagonals
- Rewrite the expression parser with ANTLR for a grammar and easier changes in the future
- Fixed pumpkin patches having decaying leaves
- Fixed /lrbuild not obeying history
- Added -n flag to //paste to select without pasting
- Fixed flipping of chests and stairs
- Improve performance of some API methods on Bukkit by bypassing the Bukkit API
- Fixed legacy import of some blocks Mojang renamed
- Added convex polyhedron support to //line
- Fixed /worldedit: commands on Bukkit
- Added support for translations
- Fixed //regen on 1.14+
- Add a experimental new snapshot API / handling, more consistent for various file types. Test it out by switching on `snapshots.experimental`/`snapshots-experimental` in your config file. This will become the default in WE 8.
- Fixed setting navwand and selwand to none via command not persisting

7.0.1
- Fix source masks using EdiSession instead of clipboard
- Fix bug with spaces in suggestions
@@ -857,3 +857,29 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

----------------------------
text and text-extras License
----------------------------

MIT License

Copyright (c) 2017-2020 KyoriPowered

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -1,5 +1,10 @@
import org.ajoberstar.grgit.Grgit

plugins {
id("org.enginehub.codecov")
jacoco
}

logger.lifecycle("""
*******************************************
You are building WorldEdit!
@@ -14,15 +19,48 @@ logger.lifecycle("""
*******************************************
""")

applyCommonConfiguration()
applyRootArtifactoryConfig()

val totalReport = tasks.register<JacocoReport>("jacocoTotalReport") {
for (proj in subprojects) {
proj.apply(plugin = "jacoco")
proj.plugins.withId("java") {
executionData(
fileTree(proj.buildDir.absolutePath).include("**/jacoco/*.exec")
)
sourceSets(proj.the<JavaPluginConvention>().sourceSets["main"])
reports {
xml.isEnabled = true
xml.destination = rootProject.buildDir.resolve("reports/jacoco/report.xml")
html.isEnabled = true
}
dependsOn(proj.tasks.named("test"))
}
}
}
afterEvaluate {
totalReport.configure {
classDirectories.setFrom(classDirectories.files.map {
fileTree(it).apply {
exclude("**/*AutoValue_*")
exclude("**/*Registration.*")
}
})
}
}

codecov {
reportTask.set(totalReport)
}

if (!project.hasProperty("gitCommitHash")) {
apply(plugin = "org.ajoberstar.grgit")
ext["gitCommitHash"] = try {
(ext["grgit"] as Grgit?)?.head()?.abbreviatedId
} catch (e: Exception) {
logger.warn("Error getting commit hash", e)

"no_git_id"
"no.git.id"
}
}
@@ -20,6 +20,10 @@ repositories {
name = "sponge"
url = uri("https://repo.spongepowered.org/maven")
}
maven {
name = "EngineHub Repository"
url = uri("https://maven.enginehub.org/repo/")
}
}

configurations.all {
@@ -50,8 +54,9 @@ dependencies {
implementation("net.ltgt.apt-idea:net.ltgt.apt-idea.gradle.plugin:0.21")
implementation("org.jfrog.buildinfo:build-info-extractor-gradle:4.9.7")
implementation("gradle.plugin.org.spongepowered:spongegradle:0.9.0")
implementation("net.minecraftforge.gradle:ForgeGradle:3.0.143")
implementation("net.minecraftforge.gradle:ForgeGradle:3.0.159")
implementation("net.fabricmc:fabric-loom:$loomVersion")
implementation("net.fabricmc:sponge-mixin:$mixinVersion")
implementation("gradle.plugin.com.mendhak.gradlecrowdin:plugin:0.1.0")
implementation("org.enginehub.gradle:gradle-codecov-plugin:0.1.0")
}
@@ -28,7 +28,7 @@ fun Project.applyPlatformAndCoreConfiguration() {
apply(plugin = "com.jfrog.artifactory")
apply(plugin = "net.minecrell.licenser")

ext["internalVersion"] = "$version;${rootProject.ext["gitCommitHash"]}"
ext["internalVersion"] = "$version+${rootProject.ext["gitCommitHash"]}"

configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
@@ -114,3 +114,20 @@ fun Project.applyShadowConfiguration() {
minimize()
}
}

private val CLASSPATH = listOf("truezip", "truevfs", "js")
.map { "$it.jar" }
.flatMap { listOf(it, "WorldEdit/$it") }
.joinToString(separator = " ")

fun Project.addJarManifest(includeClasspath: Boolean = false) {
tasks.named<Jar>("jar") {
val attributes = mutableMapOf(
"WorldEdit-Version" to project(":worldedit-core").version
)
if (includeClasspath) {
attributes["Class-Path"] = CLASSPATH
}
manifest.attributes(attributes)
}
}
@@ -7,6 +7,7 @@ object Versions {
const val AUTO_VALUE = "1.6.5"
const val JUNIT = "5.5.0"
const val MOCKITO = "3.0.0"
const val LOGBACK = "1.2.3"
}

// Properties that need a project reference to resolve:
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
"http://checkstyle.sourceforge.net/dtds/configuration_1_3.dtd">
<module name="Checker">
<!-- Tabs are strictly banned -->
<module name="FileTabCharacter"/>
@@ -17,7 +17,7 @@
It is a bit draconian, so update as necessary!
-->
<module name="ImportControl">
<property name="file" value="${basedir}/config/checkstyle/import-control.xml"/>
<property name="file" value="${config_loc}/import-control.xml"/>
</module>

<!-- Code -->
@@ -66,6 +66,6 @@
</module>
<!-- Validate that command annotations are formatted correctly -->
<module name="RegexpMultiline">
<property name="format" value="^( +)@(Arg|Switch|Command)\(.*?\n\1 {5,}"/>
<property name="format" value="^( +)@(Arg|Switch|Command)\(.*?\r?\n\1 {5,}"/>
</module>
</module>
@@ -1,6 +1,6 @@
<!DOCTYPE import-control PUBLIC
"-//Puppy Crawl//DTD Import Control 1.1//EN"
"http://www.puppycrawl.com/dtds/import_control_1_1.dtd">
"http://checkstyle.sourceforge.net/dtds/import_control_1_1.dtd">

<import-control pkg="com.sk89q">
<allow pkg="java"/>
@@ -42,6 +42,10 @@
<allow pkg="com.google.auto"/>
<allow pkg="it.unimi.dsi.fastutil"/>

<subpackage name="util.io.file">
<allow pkg="net.java.truevfs"/>
</subpackage>

<subpackage name="internal.expression">
<allow pkg="org.antlr.v4"/>
</subpackage>
@@ -133,12 +133,12 @@ context.checkArgs(1, 3, "<image> <orientation> <palette>");

var f = context.getSafeOpenFile("drawings", argv[1], "png", ["png", "jpg", "jpeg", "bmp"]);
var sess = context.remember();
var upright = argv[2] === "v";
var upright = argv[2] == "v";
var colors = clothColors;
if(argv[3] === "opt") {
if(argv[3] == "opt") {
colors = clothColorsOpt;
player.print("Using optimized palette");
} else if(argv[3] === "optHD") {
} else if(argv[3] == "optHD") {
colors = clothColorsOptHD;
player.print("Using optimized HD palette");
}
@@ -165,4 +165,4 @@ if (!f.exists()) {
}
}
}
}
}
@@ -1,7 +1,7 @@
group=com.sk89q.worldedit
version=7.1.0-SNAPSHOT
version=7.2.0-SNAPSHOT

org.gradle.jvmargs=-Xmx1G

loom.version=0.2.5-20190906.190953-30
mixin.version=0.7.11.38
loom.version=0.2.6-20200124.104118-60
mixin.version=0.8+build.17
@@ -29,28 +29,24 @@ dependencies {
"implementation"("io.papermc:paperlib:1.0.2")
"compileOnly"("com.sk89q:dummypermscompat:1.10")
"implementation"("org.apache.logging.log4j:log4j-slf4j-impl:2.8.1")
"implementation"("org.bstats:bstats-bukkit:1.5")
"implementation"("org.bstats:bstats-bukkit:1.7")
"testCompile"("org.mockito:mockito-core:1.9.0-rc1")
}

tasks.named<Copy>("processResources") {
filesMatching("plugin.yml") {
expand("internalVersion" to project.ext["internalVersion"])
}
from(zipTree("src/main/resources/worldedit-adapters.jar").matching {
exclude("META-INF/")
})
// exclude adapters entirely from this JAR, they should only be in the shadow JAR
exclude("**/worldedit-adapters.jar")
}

tasks.named<Jar>("jar") {
manifest {
attributes("Class-Path" to "truezip.jar WorldEdit/truezip.jar js.jar WorldEdit/js.jar",
"WorldEdit-Version" to project.version)
}
}
addJarManifest(includeClasspath = true)

tasks.named<ShadowJar>("shadowJar") {
from(zipTree("src/main/resources/worldedit-adapters.jar").matching {
exclude("META-INF/")
})
dependencies {
relocate("org.slf4j", "com.sk89q.worldedit.slf4j")
relocate("org.apache.logging.slf4j", "com.sk89q.worldedit.log4jbridge")
@@ -60,7 +56,7 @@ tasks.named<ShadowJar>("shadowJar") {
include(dependency("org.apache.logging.log4j:log4j-slf4j-impl"))
include(dependency("org.antlr:antlr4-runtime"))
relocate("org.bstats", "com.sk89q.worldedit.bukkit.bstats") {
include(dependency("org.bstats:bstats-bukkit:1.5"))
include(dependency("org.bstats:bstats-bukkit:1.7"))
}
relocate("io.papermc.lib", "com.sk89q.worldedit.bukkit.paperlib") {
include(dependency("io.papermc:paperlib:1.0.2"))

0 comments on commit 1c6b1b3

Please sign in to comment.
You can’t perform that action at this time.