Commit Graph

700 Commits

Author SHA1 Message Date
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
NotMyFault
4af7316118
Remove freebuild regions (#991)
* Remove freebuild regions

* Remove configuration option of freebuild

Co-authored-by: Matt <4009945+MattBDev@users.noreply.github.com>
2021-03-25 08:40:09 +01:00
NotMyFault
51487135bb
Adding a try-catch for some edge scenario Fawe failing to grab Mojang assets 2021-03-22 18:17:46 +01:00
dordsor21
d224d6ea32
Add synchronization to CharBlocks (#963)
similar to ChunkHolder, it represents an internal chunk for which operations should not be accepted by multiple threads at once.

Co-authored-by: NotMyFault <mc.cache@web.de>
2021-03-15 18:33:21 +00: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
dordsor21
7a0dc39eb7
Apply a lot of synchronization to ChunkHolder (#941)
This is basically the main "chunk" class for internal FAWE. Chunk operations should (and are) almost always single-threaded operations, however, under certain circumstances it is possible for the chunk to be "called" (flushed: written to the world and sent to the player) from a separate thread. This would specifically occur from SingleThreadQueueExtent when there are a lot of chunks being loaded in memory by FAWE (where the chunk would then be submitted to a multi-threaded queue). It would therefore be possible for a thread accessing the chunk to attempt to access it in the middle of the call, which can lead to a number of issues, and it is my opinion that the most frequent of these is the NPE seen during lighting operations, where new chunks can be accessed/loaded very quickly, increasing the likelihood for the aforementioned synchronisation issue to occur.

Co-authored-by: Matt <4009945+MattBDev@users.noreply.github.com>
2021-03-03 15:26:00 +01:00
Aurora
e550189cb8
Add more debug output to find a error (#924) 2021-02-19 20:19:19 +01:00
NotMyFault
3df080abe4
Add note if clipboard >= Integer.MAX_VALUE 2021-02-05 13:21:15 +01:00
N0tMyFaultOG
9cfcaa7605
Improve texture util if version is missing
This could defo be done cleaner, but it works for now.
2021-01-21 20:20:09 +01:00
dordsor21
c218743fa8
Fix some coordinate errors
- Fixes WorldGuard weirdness
 - Fixes #860
2021-01-18 15:37:14 +00:00
dordsor21
fa69c79160
lock when editing the chunks cache in SingletThreadQueueExtent
- Long2ObjectLinkedOpenHashMap is not thread-safe and should not be used from multiple threads at once
 - Fixes #851
2021-01-14 15:42:38 +00:00
dordsor21
3034419918
Send before history is safe 2021-01-14 14:48:13 +00:00
dordsor21
05d7558873
Don't print stack trace of FaweExceptions from submitted chunks
Addresses #353
2021-01-13 20:30:22 +00:00
dordsor21
be9866ddb3
Fix a lot of FAWE-freezing properly
- Add a "loadPrivately" method to be used when GetChunks are called to avoid synchronocity issues with super classes being used on different threads
 - Synchronise the call method so we're not attempting to call whilst also loading/updating
2021-01-13 19:02:51 +00:00
dordsor21
e94e3b7b05
Only forcefully submit a chunk if we hold the monitor.
- Properly ensures we don't try to submit chunks that already have a monitor (prevent the FAWE-freezing)
 - We can't detect if "no" threads hold the chunk's monitor, but equally that would also be kinda very bad practice.
2021-01-13 18:18:25 +00:00
dordsor21
97209d5680
better locking of lighting and use correct method for relight without removing first
Fixes #847
2021-01-13 17:24:14 +00:00
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
b4d7562b87
Looks like automagical relighting (#838)
Fixes #686
2021-01-11 19:29:16 +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
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
846443291f
allowed regions can be null 2021-01-10 17:14:40 +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
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
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
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
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
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
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
df48b7e81d
stop bottling clipboard sizes for no reason 2020-12-31 15:01:54 +00:00
dordsor21
7444c643a1
Switch to IncendoPaster "library" 2020-12-19 16:18:57 +00:00
dordsor21
e8f0c0e6ea
allow count to access "full" chunks if counting air 2020-12-17 22:05:32 +00:00