Commit Graph

134 Commits

Author SHA1 Message Date
IronApollo
238c56a3c6 Revert "Revert matt's changes"
This reverts commit bfcc6184ad.
2020-06-13 14:41:36 -04:00
N0tMyFaultOG
bfcc6184ad Revert matt's changes
Let's not break Fawe, thanks
2020-06-13 18:48:57 +02:00
MattBDev
8105088d60 Minor cleanup 2020-06-12 21:45:49 -04:00
Matthew Miller
33adba4a6f Use a long to refer to the volume of a region to prevent overflow (#1350)
* Use a long to refer to the volume of a region, and rename the method to getVolume

* Fixed issues noted in review

* Forgot to floor

* Fixed review notes

* Can use a long here rather than BigDecimal

* Improve javadocs

* style

(cherry picked from commit 328030fd6281e58a4ea1d0cdd0a2e274da90afbe)
2020-06-12 21:45:49 -04:00
MattBDev
9f6e0ebd5c Minor changes to NMS logic 2020-06-12 21:45:48 -04:00
dordsor21
bdc14c10c7
Fix relight and removelight (#475)
* Start work on lighting engine (does not build)

* Implement getLighting

* Setting, flushing light etc works. Getting light should be working..?

* Better queue/chunk handling

* Use correct location for lighting update

* Correct set location, remove debug

* cleanup a little

* Fix fixlight

* Apply to all versions for the numpties

* Remove lighting extent if not using

* Actually bitmask blocks when setting in chunks

* Initialise Maps and Dequeues with inital size

* format

* Documentation maybe
2020-05-27 11:45:08 +01:00
dordsor21
36faf107e6 Allow fastmode to be used in a lot more places
- Option to stop fastmode from bothering to fix existing ticking blocks
2020-05-11 15:36:52 +01:00
dordsor21
ffa25b1d9a Fixes #452
- ChunkSections containing only air are technically null according to NMS Chunks
- Therefore if we're replacing air, we should ignore the result of get.hasSection(layer) by using "full = true" as it returns false if the chunksection is only air
- We also then need to ensure that the masks correctly identify that the block is "air"
2020-05-09 13:39:41 +01:00
dordsor21
56972ee40b
Trim performance (#451)
* Increase performance slightly when trimming.
If the chunk section is all one blocks (common in plotworlds) it'll be a nice little boost.

* Cache whether blocks are ticking or not. Greatly reduces the time required to create a palette

* collapse 5 lines to 2.

* Also apply to 14 and 15 for the numpties

* Cleanup
Actually ignore the exception - remove my debug print.
Remove double semi-colon

* Apparently 1.14/15 matter too still.
2020-05-07 23:00:13 +01:00
IronApollo
8b1a0bbc34 Fix #417
This commit aims to fix existing issues regarding the "0/-1 blocks affected" bug. Introducing the new LinkedFilter class allows us to use multiple filters for single-filter operations, e.g. applying a pattern to blocks while also counting the amount of blocks applied to. SetFilter.java was also removed due to not being used.
2020-05-07 12:29:18 -04:00
dordsor21
508d595b8d Merge branch '1.15' of https://github.com/IntellectualSites/FastAsyncWorldEdit into 1.15 2020-04-29 21:30:28 +01:00
dordsor21
847d22f7d6 This seems to fix #429
- the undo remove or add block removal adding thing.
2020-04-29 21:30:15 +01:00
Pierre Grimaud
f9a40599fb
Fix typos 2020-04-29 19:36:34 +02:00
dordsor21
fda7d00747 A more verbose fix to #329 and similar issues.
- Re-read chunksections the first time they're "loaded" for an operation
 - Reset the chunksection if there are block changes when setting blocks via reflection
 - These are maybe gonna affect performance a bit? Idk. Seems to be alright for me
 - These are maybe gonna make more issues? Yeah maybe, but I couldn't find any
2020-04-29 18:17:21 +01:00
dordsor21
820ae19dc2 Read processors in reverse order.
- EditSessionBuilder always assigns the history processors before the limit extents, meaning the limit did not get properly flushed to history, but because spigot is notified of the changes after the processes have taken place, the correct edit was displayed to the player and placed into the world.
 - This might break other stuff...
2020-04-23 23:46:43 +01:00
dordsor21
330fc39dde Further non-standard selection fixes as per #393
- Fix incorrect usage of initChunk (it's run in the right place now)
 - Fix poorly implemented //sel sphere "improvements"
2020-04-19 19:46:41 +01:00
dordsor21
b52fc46f19 Regarding #393
- Fix CharFilterBlock not being properly created (the chunk X and Z were never set)
 - Replace BlockVector3#divide with bitshift because you can't divide down and then bitshift back up with the correct results for negative values
2020-04-19 13:56:02 +01:00
MattBDev
5cc7a09769 Fixes #366
That issue was actually a NoSuchElementException.
2020-04-02 15:51:55 -04:00
IronApollo
110347214e Update SingleThreadQueueExtent.java 2020-03-31 20:29:03 -04:00
MattBDev
e648b35b95 Small code quality changes 2020-03-24 12:32:36 -04:00
MattBDev
c1fe16b0e9 Generics improvements 2020-03-05 16:43:26 -05:00
MattBDev
50ceb4d715 More cleanup 2020-03-05 16:10:38 -05:00
MattBDev
58eae73040 Grammar fix 2020-03-05 16:10:17 -05:00
MattBDev
915ab43f6e Cleanup unused code. 2020-03-05 16:07:20 -05:00
MattBDev
8eab3d098c Close at least one of the streams in IBlocks.java 2020-03-04 00:52:42 -05:00
IronApollo
12431e7b7a Merge branch '1.15' of https://github.com/IntellectualSites/FastAsyncWorldEdit-1.13 into 1.15 2020-02-26 09:35:47 -05:00
IronApollo
de4cb586eb Fix PlotSquared hook 2020-02-26 09:35:41 -05:00
MattBDev
bfcf24b27b Small quality of code changes 2020-02-23 12:48:22 -05:00
MattBDev
1ed4118319 More upstream changes to clipboard 2020-02-19 13:37:19 -05:00
MattBDev
e0bb1ce853 Revert "More minor cleanup"
This reverts commit 38435d50
2020-02-18 18:06:08 -05:00
MattBDev
38435d50b4 More minor cleanup 2020-02-18 18:00:39 -05:00
MattBDev
728b36cd8c Remove dead code and minor changes to existing code 2020-02-18 13:18:43 -05:00
MattBDev
048974dca5 Introduce Resettable interface 2020-02-16 15:14:34 -05:00
MattBDev
49dbd4b76b Minor changes 2020-02-14 14:29:08 -05:00
MattBDev
86539c1758 Fixed infinite loop causing massive CPU usage 2020-02-13 18:32:26 -05:00
MattBDev
7e7fc89e81 Added debug messages to diagnose a critical CPU usage issue 2020-02-13 18:15:45 -05:00
MattBDev
7236b0a026 Minor code changes 2020-01-29 17:10:59 -05:00
MattBDev
020c674c01 Revert migration of FaweCache to Kotlin 2020-01-29 15:01:38 -05:00
MattBDev
8078cf077a consistency changes 2020-01-26 13:01:16 -05:00
MattBDev
e0f6869573 Revert "More code quality fixes"
This reverts commit 2d6957ce
2020-01-23 14:41:57 -05:00
MattBDev
2d6957ce1c More code quality fixes 2020-01-22 21:15:52 -05:00
MattBDev
88359f0215 More Kotlin 2020-01-21 14:30:13 -05:00
MattBDev
0cad7f229b API improvements 2020-01-15 20:38:46 -05:00
MattBDev
2d5a8ce573 Cleaned up a lot of code and introduced Kotlin to the project 2020-01-14 19:44:09 -05:00
MattBDev
86a55b7bf0 Merge remote-tracking branch 'origin/wip' into 1.15 2020-01-10 19:22:23 -05:00
MattBDev
98d0420c08 Minor tweaks 2020-01-10 13:29:20 -05:00
Jesse Boyd
195c4a7647
wip history changes 2020-01-06 08:36:16 +00:00
Jesse Boyd
c05cdd8faa
Merge branch '1.15' of https://github.com/IntellectualSites/FastAsyncWorldEdit-1.13 into 1.15 2020-01-04 10:12:33 +00:00
Jesse Boyd
88a95221a8
Make masks more stateless 2020-01-04 10:11:13 +00:00
MattBDev
0bf6cfad8d Debug message for arrayoutofbounds 2020-01-03 16:51:23 -05:00