Commit Graph
100 Commits
Author SHA1 Message Date
dordsor21 b066ca8349 only relight blocks that have light 2021-01-13 17:10:08 +00:00
dordsor21 b1e8c6c3ba Synchronizing on accessing a lock is pointless. 2021-01-13 17:09:44 +00:00
dordsor21 f69b1bfb21 properly load nms chunk for lighting operations 2021-01-13 17:09:18 +00:00
dordsor21andGitHub 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 ddb41a9669 With "queueing" enabled, FAWE may start attempting to place chunks before the operation is finished.
This is unnacceptable for recursive operations, thus the queue should be disable in these cases
Fixes #842
2021-01-11 15:06:55 +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 5903178c53 Fix rotate/flip applying in the wrong order
- pretty cheat fix, but it reverts to legacy FAWE behaviour
2021-01-11 13:18:24 +00:00
dordsor21 ae6a1f1be4 Correct rounding bevhaviour for Vector3 -> BlockVector3
- fixes #512
2021-01-10 20:49:38 +00:00
dordsor21 0b727d9760 Fix for OPs when "not in a region" 2021-01-10 18:51:07 +00:00
dordsor21 831c6f6854 fix NPE with null sourcemask on move 2021-01-10 17:36:41 +00:00
dordsor21 846443291f allowed regions can be null 2021-01-10 17:14:40 +00:00
dordsor21 febf5b0175 Slight change to wna caching
- We don't want to flush if we're setting from the main thread, as that's going to be another plugin doing it
 - It's better to have a concurrent error thrown than use a concurrent set, so concurrency issues can actually be fixed rather than handled unsafely
 - Only send chunk packets up to once a tick (it really doesn't use any memory to cache IntPairs).
2021-01-10 17:11:55 +00:00
dordsor21 278e9d5991 Set source masks that include the editsession's allowed regions to ForwardExtentCopies
Fixes #710
2021-01-10 14:59:21 +00:00
dordsor21 edc7e9028b disableQueue stops buffering, switch to enableQueue to buffer when "//move"ing
fixes #738
2021-01-10 13:22:47 +00:00
dordsor21 bd079421a3 fix wna/loading on non-paper servers 2021-01-10 12:37:41 +00:00
dordsor21 aab9958932 Fixes #221
If WE wants to add it as well, it's up to them. I asked but wiz was hostile about it.
2021-01-09 21:52:50 +00:00
dordsor21 6bc3dd2293 Fix wna when used internally 2021-01-09 21:27:55 +00:00
dordsor21 6f0180447f Don't ParallelQueueExtent if the editsession is created on the main thread. 2021-01-09 17:48:57 +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 3accbb84dd Don't talk about CP 2021-01-08 14:38:41 +00:00
dordsor21 febcf5f76f display potentially unsafe extent message in console if no Actor 2021-01-08 14:28:09 +00:00
dordsor21 6b3fe20c61 revert to upstream slf4j so it's present in IDE 2021-01-08 14:24:58 +00:00
dordsor21 9d2c631035 **BaseBlocks are immutable 2021-01-06 21:13:32 +00:00
dordsor21 8f74186e14 *BaseBlocks are immutable 2021-01-06 18:15:59 +00:00
dordsor21 7afddcc411 Fix more NBT mutability issues 2021-01-06 18:00:40 +00:00
dordsor21 e40e86df5f Add some more __internal__ <-> air logi
Fixes #831
2021-01-06 16:40:28 +00:00
dordsor21 336b90be15 Also fix CPUOptimizedClipboard 2021-01-06 13:39:25 +00:00
dordsor21 280ade9994 fix NBT in memory optimized clipboard 2021-01-06 13:29:52 +00:00
dordsor21 91de441403 No need to check WorldEdit schematics for bad entities 2021-01-05 17:21:35 +00:00
dordsor21 6db588a19f Don't allow FAWE to "deadlock" itself when post-processing history by switching to the primary ForkJoinPool
- With enough chunks waiting to write to history, it's possible to fill the secondary fork pool up with locked threads, and thus prevent any threads from actually writing their history.
2021-01-05 16:42:53 +00:00
dordsor21 89cc2f9d9f Large memory use reduction when PostProcessing history 2021-01-05 15:03:47 +00:00
dordsor21 7c174ee6b3 Return to static "sections" in CharBlocks.
- Synchronise (lock) outside the static object
 - Reduces object creation
2021-01-05 13:51:26 +00:00
dordsor21 bfd04e4155 Revert "~1/3 faster history writing with small caching"
This reverts commit 836b7a9750.
2021-01-05 00:50:26 +00:00
dordsor21 836b7a9750 ~1/3 faster history writing with small caching 2021-01-04 21:25:29 +00:00
dordsor21 916c080310 5000th commit: Fix //download 2021-01-04 19:10:10 +00:00
dordsor21 efcca5b66f it's better not to bother with tickets to avoid tickets not being removed all the time 2021-01-01 19:49:11 +00:00
dordsor21 580cb4a91e add chunk tickets and don't force sync sending chunk packets 2021-01-01 18:04:30 +00:00
dordsor21 39b0da2b99 we do want to synchronise across the chunk when loading sections 2021-01-01 17:19:14 +00:00
dordsor21 42346b429b Don't synchronise across the entire edit for a single ChunkSection load (speed boost) 2021-01-01 16:48:17 +00:00
dordsor21 606cfa5cbc we don't need to "update" when copying sections 2021-01-01 16:07:57 +00: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 82f640d132 fix loading Fawe.properties 2020-12-31 17:45:07 +00:00
dordsor21 59c227b49a actually fix AsyncBlock 2020-12-31 15:32:00 +00:00
dordsor21 935130aa0e Fix AsyncBlock 2020-12-31 15:22:29 +00:00
dordsor21 df48b7e81d stop bottling clipboard sizes for no reason 2020-12-31 15:01:54 +00:00
dordsor21 6e49427b26 fix WNA 2020-12-27 21:03:09 +00:00
dordsor21 3c5041ddb7 Fix uploading/download P2 schematics with /plot save|load 2020-12-24 15:47:02 +00:00
dordsor21 b60d9ef6d5 Fix #787 2020-12-23 17:26:26 +00:00
dordsor21 7444c643a1 Switch to IncendoPaster "library" 2020-12-19 16:18:57 +00:00
dordsor21 e08fda0ac2 cache the correct number of blocks for FAWE
fixes #747
2020-12-17 22:06:32 +00:00
dordsor21 e8f0c0e6ea allow count to access "full" chunks if counting air 2020-12-17 22:05:32 +00:00
dordsor21 884ec322b8 Ensure chunk sections are reloaded for every edit/chunk read
Add an option for force-reloading the cached chunk sections when a layer is updated
2020-12-17 22:04:49 +00:00
dordsor21 d379b0af9b fix //image ane image brush
fixes #208 and fixes #698
2020-12-17 20:19:54 +00:00
dordsor21 94a14b03b6 fix brush size 0/1 2020-12-17 15:26:17 +00:00
dordsor21 236e3c3f6f correctly set changes to editsession for line/spline
fixes #696
2020-12-17 15:02:49 +00:00
dordsor21 b57c472b86 Save the get blocks to the set chunk after history is written when post-processing 2020-12-17 14:09:54 +00:00
dordsor21 f347e0f5f5 update some utility commands
fixes #557
2020-12-16 19:23:41 +00:00
dordsor21 d5005a04e3 Return air if attempt to retrieve block from outside range
Fixes #682
2020-12-16 19:08:00 +00:00
dordsor21 aeccce24a9 fix #550 2020-12-16 17:38:15 +00:00
dordsor21 61fd8c0de5 Update generate tree to match upstream 2020-12-16 17:20:33 +00:00
dordsor21 3a3bf7382d Update block NBT to include the coordinates when saving to history
fixes #708 and fixes #655
2020-12-16 16:59:16 +00:00
dordsor21 e4709eb6dc idk why I did &3
half fixes #769
2020-12-16 12:34:54 +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 26e3e56988 Don't allow blocks as brushes
fixes #748
2020-12-11 17:02:54 +00:00
dordsor21 ae39f7bba3 use full chunks for distr and account for __RESERVED__ blocks
fixes #759
2020-12-11 16:13:09 +00:00
dordsor21 56cf49c167 Send chunks if they're in the paper no-tick-distance
Fixes #766 and #677
2020-12-11 15:36:42 +00:00
dordsor21 3717351d61 //setbiome should be 3D as well 2020-12-11 12:55:49 +00:00
dordsor21 ff7c972ea6 Don't try to be clever with bitwise
Fixes #769
2020-12-11 12:55:38 +00:00
dordsor21 be44e1449c remove mutability in clipboards (particularly clipboard pattern)
fixes #776
2020-12-11 11:34:56 +00:00
dordsor21andGitHub 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
dordsor21andGitHub 5508b415c9 Allow nullable BukkitPlayers for whatever reason WorldGuard needs them for I guess? (#706) 2020-10-14 19:56:16 +01:00
dordsor21andMattBDev 0021aeb40a Several fixes to actual, probable and possible synchronocity issues (#691)
* Several fixes to actual, probable and possible synchronocity issues
 - Ensure that all edits are queued onto the same AsyncNotifyQueue by actually delegating to the parent player in PlayerProxy
 - Ensure that the order editsessions are being remembered on the LocalSession is being respected by using a fair ReentrentLock
 - Ensure a chunk cannot be called when an update is being called

* Don't add locks to GetBlocks
2020-10-08 21:50:42 -04:00
dordsor21andMattBDev cf0ff72524 Correctly queue edits
Synchronising on the LocalSession ends up being dangerous as it's a craftbukkit thread, leading to blocking issues if something goes wrong in an edit, made worse by the fact craftbukkit threads like to interfere with each other sometimes, and also cause OOMs and hanging when there are too many of them.
2020-10-08 21:50:41 -04:00
dordsor21andMattBDev d5d09ba586 Remove deep synchronisation that is a very plausible cause of circular locking.
This may be a fix for #685
2020-10-08 21:50:32 -04:00
0c9f00b6ba Update worldedit-core/src/main/java/com/sk89q/worldedit/regions/EllipsoidRegion.java
Co-authored-by: NotMyFault <[email protected]>
2020-10-08 21:15:48 +01:00
dordsor21andGitHub 5b97c0abcd Several fixes to actual, probable and possible synchronocity issues (#691)
* Several fixes to actual, probable and possible synchronocity issues
 - Ensure that all edits are queued onto the same AsyncNotifyQueue by actually delegating to the parent player in PlayerProxy
 - Ensure that the order editsessions are being remembered on the LocalSession is being respected by using a fair ReentrentLock
 - Ensure a chunk cannot be called when an update is being called

* Don't add locks to GetBlocks
2020-10-08 21:15:05 +01:00
dordsor21 2c27b9c02a Correctly queue edits
Synchronising on the LocalSession ends up being dangerous as it's a craftbukkit thread, leading to blocking issues if something goes wrong in an edit, made worse by the fact craftbukkit threads like to interfere with each other sometimes, and also cause OOMs and hanging when there are too many of them.
2020-10-08 10:53:57 +01:00
dordsor21 70c40ae077 Merge branch 'main' of github.com:IntellectualSites/FastAsyncWorldEdit into main 2020-10-07 15:53:09 +01:00
dordsor21 def986710f Remove deep synchronisation that is a very plausible cause of circular locking.
This may be a fix for #685
2020-10-07 15:52:48 +01:00
dordsor21andGitHub b06d943f7c There's no need to duplicate everything when copying the intersection masks, as the Set and array should be the same. (#680)
* There's no need to duplicate everything when copying the intersection masks, as the Set and array should be the same.

* do the same for Union mask
2020-10-04 19:49:45 +02:00
dordsor21 fc606ff5ff use concurrent hashmap for thread processor cache 2020-10-04 18:34:15 +01:00
dordsor21 1f02287caa trim get where chunk SET is remembered from a previous session 2020-10-03 15:53:49 +01:00
dordsor21 88e64a0632 Simplify further as using ConcurrentHashMap 2020-10-01 17:08:29 +01:00
dordsor21 197e08a937 use ConcurrentHashMap 2020-10-01 16:48:02 +01:00
dordsor21 40717c23c4 If extent is world when pasting clipboard, cretae editsession
fixes #583
2020-10-01 15:02:34 +01:00
dordsor21 987ab7d2b6 reduce the amount of synchronisation/locks being used unneecessarily and add nullcheck 2020-10-01 14:33:34 +01:00
dordsor21 318eca364d We ought to always clear (close) the clipboard on logout
Fixes #672
2020-09-30 10:56:07 +01:00
dordsor21 13cfd638d6 Fix incorrtect field references 2020-09-29 10:11:29 +01:00
dordsor21 6332b8c965 This ought to be false by default for now 2020-09-28 11:18:16 +01:00
dordsor21andGitHub 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 bd4a3a3efd Fix inconsistency with legacy regarding loading schematics from URL 2020-09-26 22:20:47 +01:00
dordsor21 68deed1469 schematics are just fun 2020-09-26 21:56:38 +01:00
dordsor21andGitHub 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
dordsor21andGitHub 65747bf8f8 accessing clipboards should not be synchronized to LocalSession (#653)
* accessing clipboards should not be synchronized to LocalSession
I believe this may be the issue causing thread locks when wrapping new players. If we're attempting to run a synchronised method within the LocalSesison when initialising it, it may go wrong..?

* nullcheck within synchronisation
2020-09-25 15:02:09 +01:00
dordsor21andGitHub 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
dordsor21 5e67c1b658 Squash errors and debug to aid fixing #652 properly 2020-09-22 11:34:45 +01:00
dordsor21 3b660756f6 Fix #647 2020-09-21 17:10:33 +01:00
dordsor21 845c32bd18 Fix #639
looks like we too speedy
2020-09-19 20:46:46 +01:00
dordsor21 be0e33746c Ensure the block actually can be waterlogged when checking for waterlogged status.
Fixes #632
Fixed #633
2020-09-19 16:54:42 +01:00