Commit Graph

416 Commits

Author SHA1 Message Date
dordsor21
f2ee2248e0
Consistenty use javax annotations. (#1197)
- Unfortunately jetbrains annotations seem to be exposed transitively via core somewhere, but with the correct IDE settings, annotations can be defaulted to javax
 - Cleaning up of import order in #1195
 - Must be merged before #1195

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-07-24 15:52:08 +02:00
dordsor21
0be8746c11
Add more directionals
- Fixes #1122
 - Levers and buttons can be flipped/rotated vertically
2021-07-23 20:15:22 +01:00
NotMyFault
50ab8ad5c7
Feature/propagate diff and object cleanup (#1190)
* Feature/main/propagate diff annotations (#1187)

* 25% done

* More work

* More work

* 50%

* More work

* 75%

* 100% & cleanup

* Update adapters

* Squish squash, applesauce

commit 275ba9bd84
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Jul 17 01:10:20 2021 +0200

    Update dependency com.comphenix.protocol:ProtocolLib to v4.7.0 (#1173)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 9fd8984804
Author: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Date:   Sat Jul 17 01:09:29 2021 +0200

    Update dependency org.checkerframework:checker-qual to v3.16.0 (#1184)

    Co-authored-by: Renovate Bot <bot@renovateapp.com>

commit 861fb45e5c
Author: dordsor21 <dordsor21@gmail.com>
Date:   Fri Jul 16 19:07:02 2021 +0100

    Fix #1075

commit 420c45a29a
Author: dordsor21 <dordsor21@gmail.com>
Date:   Fri Jul 16 18:48:21 2021 +0100

    Entity removal should be on the main thread as we're just passing through rather than doing chunk operations
     - Fixes #1164
     - Not working: butcher/remove history

commit 4d4db7dcd0
Author: SirYwell <hannesgreule@outlook.de>
Date:   Fri Jul 16 17:52:44 2021 +0200

    Make sure leaves category is loaded for heightmaps (fixes #1176)

commit c98f6e4f37
Author: dordsor21 <dordsor21@gmail.com>
Date:   Fri Jul 16 10:44:52 2021 +0100

    Do not allow generation commands to generate outside selection

commit 2485f5eccc
Author: dordsor21 <dordsor21@gmail.com>
Date:   Fri Jul 16 10:43:15 2021 +0100

    EditSession needs to override some Extent methods to ensure block changes are correctly set through the various extents
    Fixes #1152

commit d9418ec8ae
Author: dordsor21 <dordsor21@gmail.com>
Date:   Fri Jul 16 09:52:44 2021 +0100

    Undo part of 41073bb1a0
    Fixes #1178

* Update Upstream

fb1fb84 Fixed typo and grammar

* We don't support custom heights yet

* Casing inconsistency

* Address a few comments

* Address comments

* Don't refactor to AP classpath

* Document annotation style

* Refactoring & shade cleanup

* Address a few comments

* More work

* Resolve comments not being resolved yet

* Feature/main/propagate diff annotations (#1187) (#1194)

* Remove beta package, fix history packages, move classes out of object package

* Resolve comments not being resolved yet

* Remove beta package, fix history packages, move classes out of object package

Co-authored-by: NotMyFault <mc.cache@web.de>

* brushes should be under brush

* More refactoring
 - Filters/processors should be in the same place and are related to extents
 - Transforms are in `extent.transform` in upstream

* Move history classes under history

* Update adapters

Co-authored-by: dordsor21 <dordsor21@gmail.com>
2021-07-23 17:48:51 +02:00
dordsor21
1e49f59001
Much better hinge handling 2021-07-21 20:00:39 +01:00
dordsor21
5f8addbb5b
Fix #1185
TODO: fix door hinge placement on rotate/flip sometimes
2021-07-20 20:49:13 +01:00
dordsor21
ca1744aa97
Likely fix for rotation issue
fixes #996
2021-07-19 20:33:50 +01:00
NotMyFault
a183425642
Update Upstream
40ded93 Fix loading legacy invalid blocks
2021-07-06 13:13:54 +02:00
NotMyFault
35b1202951
Mitigate logger spam introduced in 256d7c4e5d
Touches #1122, #1166
2021-07-04 00:43:57 +02:00
NotMyFault
876d84aec0
Fix typo 2021-07-01 22:49:10 +02:00
dordsor21
aa3ae63682
Feature/1.17 (#1120)
* start v6

* Update classes to v6 method signatures

* change rootVersion to signify p2v6 compat

* Use 16 as toolchain version but target 11 for build output

* add minimessage as api

* Require v6 and don't attempt to "setup" hook from FAWE

* Address comments

* *address /all/ comments

* FAWE classes should only act as a delegate

* Uppercase logger

* Settings for v6-hook have moved to P2-v6, remove unneeded if statements

* Rename classes to Delegate

* add whenDone task to setCuboids

* Remove bad spaces

* Fix plot swap

* Initial work on 1.17 support

* Remove data versions from the Bukkit adapters (#1507)

* Remove data versions from the Bukkit adapters

* Don't allow saving schematics without an adapter in place on Bukkit.

* Removed confusing line

(cherry picked from commit 2056218b4a8644836b1d127105dfa289e9cdbc1c)

* More progress

* Fix chunk sending

* Repackage from com.boydti to com.fastasyncworldedit.<module> (#1119)

* Preliminary work on repackaging

* Rename build artifacts matching our pattern

* Finish up repackaging

* Fix a few field accesses and old imports

* Dirty fix for chunks container ChunkSections outside of 0-15

* Correctly read from NibbleArrays for lighting

* Fix getSections and BlockMaterial for 1.17

* Fix writing blocks to the world.
 - The issue isn't the presence of a "-1" chunk, it's the constructor for ChunkSection requiring the layer (0 to 15) rather than the y chord

* Fix more field accesses

* More work towards 1.17

* Update Upstream

a57f66f Fix watchdog, add negative y support. (1782)

* Add azalea tree to `/tool tree`

* Don't define toolchain twice

* Repackage GriefDefender

* Relocate under new namespace

* Bye bye ecma left overs

* Add 1.17 to issue templates and instructions

* Move to adventure-nbt (#918)

* Initial work for adventure-nbt

* Some more FAWE specific stuff

* Fix erroneous deprecation check

* Workflow change

* Continued merging all adventure NBT related changes

* Continued merging all adventure NBT related changes

* Made a constructor public again

This needs to be public for BlockTransformExtent.java

* Finished converting all NBT data to adventure.

* Make this compile

* Fix conflicts

Co-authored-by: Matt <4009945+MattBDev@users.noreply.github.com>

* Update adapters to 1.17

* Change build prefix to 1.17

* Move more nms classes to adapters

* Move left over nms classes

* Move Spigot 1.17 class

* Remove unneeded adapter loader code
The loader will find the appropriate class now itself

* Update adapters

* Update adapters

* Lazy fix tests

* Update adapters

* Update Upstream

43da91a Remove method reflection for getMinHeight in BukkitWorld. (1796)

* Relocate adventure-nbt under proper namespace

* Add LazyCompoundTag as a non-version-specific class to be used by adapters

* Better integration between old NBT and Adventure NBT - begin fixing the issues seen recently

* Correctly NBT conversion method

* LazyCompoundTags should actually be overriding and correctly returning a CompoundBinaryTag.

* Update worldedit-adapters
Fixes #1141

* Remove unnecessary massive lag machine

* Refactor apply to applyBlock in subclasses

* applyBlock should be overriden by all subclasses.
Default apply to applyBlock

* Closes #1130 Closes #1132

* Squashed commit of the following:

commit a9bfa1a07c77083c844a0c3ba62f4bd94bed107c
Author: NotMyFault <mc.cache@web.de>
Date:   Sun Jun 27 21:53:21 2021 +0200

    [ci skip] Update gradle wrapper validation

commit aa7471f95317d28a16f62e4b200de8d0fea2fa95
Author: Matthew Miller <mnmiller1@me.com>
Date:   Sat Oct 10 15:49:13 2020 +1000

    Add ^x,y,z relative offset support to the offset parser (#1545)

    * Add ^x,y,z relative offset support to the offset parser

    * Wrap in a try-catch

    (cherry picked from commit 28bdf7ff9254bbc85bb4f5f792b303943a3930a8)

* Add `fawe.error.schematic.not.found` translation key

* Update Upstream

728a152 Skip notify if chunk section doesn't exist (1794)

* Fixed #1157

* Add a null check to prevent NPE in nbt code

* Update adapters

* Update Upstream

fbb047a Optimize legacy schematic loading (1808)

* Hurr durr I don't want to update Java

* Update Upstream

0790e6e Fix CLI Mess (1811)

* Fixes #1160

* Expose minimessage transitively thru PlotSquared

Touches #32

* [ci skip] Remove unneeded maven repository

* Steal tab completion from PlotSquared for P2 related commands

* Don't error on startup when building locally

Co-Authored-By: goldfishapp <8278196+goldfishapp@users.noreply.github.com>

* [ci skip] Update gh actions to Java 16

* Update textures to grab 1.17 jar

Co-authored-by: NotMyFault <mc.cache@web.de>
Co-authored-by: SirYwell <hannesgreule@outlook.de>
Co-authored-by: Matthew Miller <mnmiller1@me.com>
Co-authored-by: Matt <4009945+MattBDev@users.noreply.github.com>
Co-authored-by: goldfishapp <8278196+goldfishapp@users.noreply.github.com>
2021-07-01 22:16:25 +02:00
dordsor21
256d7c4e5d
Temporary fix for #1122 2021-06-14 06:34:05 +01:00
dordsor21
b796106dd7
Add directionals for chests and slabs "type" block state
Fixes #987
2021-06-11 15:25:52 +01:00
dordsor21
da264b52e1
Fix #1116 2021-06-11 15:05:52 +01:00
dordsor21
1cd2d8d121
Send before history is acttually safer at the moment
- avoids deadlocks
2021-06-08 14:15:43 +01:00
Hannes Greule
53681ccc59
Feature/unsafe over reflections (#1082)
* Use Unsafe to replace Lock

* Start cleaning up everything that has to do with CleanableThreadLocal

* Make cancellation work

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-05-28 18:47:46 -04:00
NotMyFault
106f9aed79
Address requested changes
- 4534154894 (r50694638)
- 4c1d0bc9a6 (r50694886)
2021-05-23 23:24:18 +02:00
MattBDev
4c1d0bc9a6 Removed redundant null checks and fixed a potential file separator issue 2021-05-11 20:01:11 -04:00
NotMyFault
00d689a238
Clarify why mcedit is discontinued 2021-05-08 14:55:25 +02:00
NotMyFault
6e8cc06637
Address a few deprecations 2021-04-06 18:30:29 +02:00
NotMyFault
5e534ff9e2
Finalize Captions
Follow up to a9d1202ce1
2021-04-05 19:54:49 +02:00
NotMyFault
a9d1202ce1 Finish up transition to captions 2021-04-05 19:52:13 +02:00
NotMyFault
b96cea75b8
Update Upstream
609c7b8 Scrapped Logging Framework 4 Java

Closes #997
Closes #998
Closes #999
Closes #1000
Closes #1001
Closes #1002
2021-03-29 15:29:16 +02:00
Hannes Greule
d974164204
Switch from PropertyKey enum to class (#971)
* Switch from PropertyKey enum to class

* Fix generic toArray
2021-03-14 19:38:11 +00:00
NotMyFault
5acd1d7b95
Improve note about loading invalid schematics via FSR and SSR 2021-03-08 16:34:16 +01:00
dordsor21
798b4cdd4e
Fix #806 2021-01-15 20:16:46 +00:00
dordsor21
3136fb460b
Revert "actually delegate in AbstractDelegateExtent"
This reverts commit 761d05ac19.
2021-01-14 14:39:50 +00:00
dordsor21
761d05ac19
actually delegate in AbstractDelegateExtent
fixes #843
2021-01-14 14:38:37 +00:00
dordsor21
b4d7562b87
Looks like automagical relighting (#838)
Fixes #686
2021-01-11 19:29:16 +00:00
dordsor21
74a2f02003
put MCEdit before sponge and query by file extension.
Massively reduces loading time a few addon plugins that are literally only trying to get the format of a schematic
2021-01-11 16:02:50 +00:00
dordsor21
fa8660c7a9
More verbosely check for "scaled" in AffineTransform and override all required methods in BlockTransformExtent
- fixes #462
2021-01-11 14:21:56 +00:00
dordsor21
31542ed4fa
Add 3D biomes to clipboards properly
- Also fix disk clipboard's size check, allowing for larger clipboards but with disabled biomes
2021-01-09 16:40:41 +00:00
dordsor21
7afddcc411
Fix more NBT mutability issues 2021-01-06 18:00:40 +00:00
dordsor21
91de441403
No need to check WorldEdit schematics for bad entities 2021-01-05 17:21:35 +00:00
dordsor21
916c080310
5000th commit: Fix //download 2021-01-04 19:10:10 +00:00
Alexander Söderberg
3f0b9a2a92
Reorder BuildInClipboardFormat and document changed JNBT classes (#807)
* Get rid of FastSchematicReader/Writer and document changed JNBT classes

This commit includes changes from upstream to the schematic classes
(`com.sk89q.worldedit.extent.clipboard.io`). It also documents the JNBT
classes, specifying what has been changed in FAWE. This was done in preparation
for the upcoming move to adventure-nbt.

The PlotSquared schematic handler classes will now use SpongeSchematicReader/Writer rather than FastSchematicReader/Writer.

This is yet untested and the entire branch is a W.I.P.

* Fix JNBT mutability misuse in FAWE

FAWE previously had mutable compound and list tags. The previous commit changed that, and this commit will fix misuse of the tag API.

I've tried to identify the places where mutability was assumed, but I might have missed something. This needs quite extensive testing.

This is yet another change which increases upstream compatibility in FAWE.

* Fix FAWE_Spigot_<..>#getEntity

* Fix JNBT usage in the AsyncBlockState code

* Readd FastSchematicReader/Writer and add a new schematic format (`FAST`)

* Update dead repository

* Implement missing AsyncChunk#getTileEntities

* handle entities properly and add "brokenentity" format

* Fix fast schematic reader
lazily reading means it's read in order of appearance in the inputstream so we need to read schematic version first (skip past everything) and then reset the stream

* Fix p2 FAWE

* Go back to fast schematics in P2/CompressedSchematicTag (#819)

* Fix compile

Co-authored-by: N0tMyFaultOG <mc.cache@web.de>
Co-authored-by: Alexander Söderberg <Sauilitired@users.noreply.github.com>
Co-authored-by: dordsor21 <dordsor21@gmail.com>
Co-authored-by: Aurora <aurora@relanet.eu>
2021-01-04 19:18:23 +01:00
dordsor21
fbfe3221d7
Fix fast schematic reader/writer
- Have both sponge and fast r/w available but default to "fast"
 - Correctly "offset" entities in the schematic, and add a legacy mode for loading old FAWE schematics with entities required.
 - Lazily reading means it's read in order of appearance in the inputstream so we need to read schematic version first (skip past everything) and then reset the stream. Fixes #740
 - Add an FAWEVersion to the metadata
 - Correctly actually return a BlockArrayClipboard when required. Fixes #454
2021-01-01 15:01:35 +00:00
dordsor21
6676d77aaa
Stop writing corrupt tile entities to schematics
also make some stuff definitely immutable.
2020-12-13 21:06:36 +00:00
dordsor21
ae39f7bba3
use full chunks for distr and account for __RESERVED__ blocks
fixes #759
2020-12-11 16:13:09 +00:00
N0tMyFaultOG
197389bd32 Improve requireTag exception messages
e15d7993ada7b26784471bdb0e9550228724d900

Co-Authored-By: Octavia Togami <2093023+octylFractal@users.noreply.github.com>
2020-11-13 22:09:36 +01:00
dordsor21
c6ef1bc1de
Full support for 3D biomes (#714)
* Full support for 3D biomes
Since we're only supporting 1.15+ there's no need to try anything other than compatibility

* this is not part of the PR

* Clipboards should still always be y 0 for biomes
(this "bug" has existed for ages)
2020-10-22 22:18:16 +01:00
Aurora
3c6280b11e
Re-Implement //regen (#598)
* start reimplementing regen command

* start reimplementing regen command

* Formatting and logic tweaks.

Regen will now throw exceptions but they are not caught yet.
ConversionSessions will now be closed when no longer being used instead of left open.

* fix //regen crashing server

* added //regen support for 1.16.1 and 1.15.2

* cleanup

* Update the issue template

* improve performance of regen by a factor of 40, approx 1.2 millon blocks/second

* Update the issue template

* Update the issue template & add a config (#640)

* Update the issue template

* Add a config.yml to the issue template

* improve performance of regen by a factor of 40, approx 1.2 millon blocks/second

* Fix entity rotation (#642)

* fix entity rotation
fixes #577 
Co-authored-by: wea_ondara <wea_ondara@alpenblock.net>

* Fix toggle permission (#644)

* Fixes #529
* fix superperms perm toggling

Co-authored-by: @weaondara <wea_ondara@alpenblock.net>

* Fix #647

* Squash errors and debug to aid fixing #652 properly

* cleanup imports

* cleanup imports 2

* cleanup imports 3

* cleanup imports 4

* add patch by @SirYwell

* aysnc world gen with features and stuff and some minor issues

* optimizations, full chunkstatus, block populators

* optimizations, cleanup

* optimizations

* fix feature regeneration, fix temp folder deletion

* cleanup

* make chunk gen multithreaded

* fix precomputation of chunk lists for RegionLimitedWorldAccess again

* added regenerator abstraction, fix aioobe while running through chunk stati

* remove override for getChunkAt in freshnmsworld

* don't use concurrent chunk gen if custom chunk generators do not support it

* distinct between generator types

* improve regen speed for overworlds

* mix

* Add message that regen might take a while

* use a shared map for FastAreaLazy, cleanup imports

* use custom concurrency levels for chunk stati and process accordingly

* implement new regen in 1.15.2 and 1.16.1 as well

Conflicts:
	worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/FAWE_Spigot_v1_15_R2.java
	worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/FAWE_Spigot_v1_16_R1.java

* woops

* further abstraction, finalized regen impl

* Formatting

* Fix some typos, remove debug

* replace wildcard imports

* cleanup debug

* braces

* serr -> logger

* move regen impls to seperate classes

* fix world init for 1.16.1

* fix world init for 1.15.2

* fix world init for 1.15.2 #2

* use original world name for regeneration

* Update Regen_v1_15_R2.java

* Update worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/FAWE_Spigot_v1_15_R2.java

Co-authored-by: Matt <4009945+MattBDev@users.noreply.github.com>

* Update worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/FAWE_Spigot_v1_15_R2.java

Co-authored-by: Matt <4009945+MattBDev@users.noreply.github.com>

* Update worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/adapter/impl/FAWE_Spigot_v1_16_R1.java

Co-authored-by: Matt <4009945+MattBDev@users.noreply.github.com>

* improve documentation, use parallel task count for fawe settings

* fix compile

Co-authored-by: wea_ondara <wea_ondara@alpenblock.net>
Co-authored-by: MattBDev <4009945+MattBDev@users.noreply.github.com>
Co-authored-by: dordsor21 <dordsor21@gmail.com>
2020-10-10 11:57:12 +02:00
N0tMyFaultOG
67cc5fb984 Merge branch 'logging' into main 2020-10-09 10:03:13 +02:00
weaondara
a64a1ab09e
Fix schem loading of sponge schems with dataversion == 1 (#690)
* fix sponge schem loading with schem version 1
2020-10-07 21:11:57 +02:00
MattBDev
f5a42c63a7 Better logger support 2020-10-06 14:44:33 -04:00
Matt
96dcb95b7c
Javadoc and Formatting fixes. (#619)
Javadoc and Formatting fixes.

Also, extremely minor code changes which have been tested.
This commit is only part one of two commits that aim to fix problems with formatting in our project. In part two I will modify the Google Java Style Guide (since it closely matches our code style) for our project so there is guidance on how to format and document. 

* Updated PlotSquared URL
* Removed plugin acronyms
* Fixed a typo
* Fixed grammar
* Use modern block id's
* Update YouTube video URL
2020-10-05 13:41:41 -04:00
dordsor21
40717c23c4
If extent is world when pasting clipboard, cretae editsession
fixes #583
2020-10-01 15:02:34 +01:00
dordsor21
82bcc0e9a5
Allow "post processing" of chunks (#658)
* begin allowing "post processing" of chunks
 - restores legacy capability to continue saving edits in the background after sending the chunks
 - speeds up the edit clientside
 - nail in the coffin of the terrible and staticly coded coreedit
 - We should totally make IronGolem work so Core* is no longer used by anyone

* begin allowing background history saving

* Handle post processors in queues properly

* Use futures for postprocessing so we're not waiting for them needlessly

* better use of closed boolean

* Reword
2020-09-28 11:13:02 +01:00
dordsor21
68deed1469
schematics are just fun 2020-09-26 21:56:38 +01:00
dordsor21
1766c62278
Attempt to recover from incorrectly-extensioned schematic reads (#660)
* Attempt to recover from incorrectly-extensioned schematic reads
 - Should help avoid #605 (I'm assuming this is the issue)
 - Possible issues with the InputStream being closed/pre-read or so? Thoughts:?

* more verbose checking in the first place
2020-09-25 15:15:00 +01:00
dordsor21
855389c785
Allow parallelisation of masks (#636)
* Allow parallelisation of masks
Increasing performance improvement with increased masking complexity and edit size.

* Address comments
 - Rename Mask#clone to Mask#copy
 - Rename Mask2D#copy to Mask2D#copy2D
 - Correct formatting

* cx -> centerX

* Make various operations relying on a single SingleThreadQueueExtent instance (mainly brushes) thread safe
2020-09-25 15:00:42 +01:00