* Perform part of the move of //fast to //perf (#1377)
This re-adds a deprecated `//fast` and moves the current logic to
`//perf`. Later `//perf` will have its syntax reworked, when Piston
finally supports sub-commands properly!
* Names via Translation (#1268)
* Deprecate BiomeRegistry, etc.
* Update some libraries, e.g. text
* Move to new translation renderer
* Revert "Deprecate BiomeRegistry, etc."
This reverts commit 59a5d6c92aec52739a8dc68ac3d23898af7593dd.
This was not a good idea for potential mod shenanigans.
* Move BiomeData#getName to BiomeRegistry, use i18n
* Use getRichName instead of getName
* Implement getRichName for NullBiomeRegistry
* Add getRichName for blocks
* Relocate net.kyori.minecraft
* Update adapters for getRichBlockName
* Add getRichName for items
* Update adapters for getRichItemName
* Update adapters JAR for merge
(cherry picked from commit cfd26253b6fb59ff6c65a0157a6780be7db4ea5a)
* Follow-up fixes for 92f877679622a27b16b9e5cd61cfec1a6545be33
* Don't send deprecation warning and improve info message
* Fix click command for perf box
(cherry picked from commit 7ee60060c31df2f8b41212b430a0875312189339)
* update R3 adapter§
Co-authored-by: Octavia Togami <octavia.togami@gmail.com>
Co-authored-by: NotMyFault <mc.cache@web.de>
Co-authored-by: Aurora <21148213+aurorasmiles@users.noreply.github.com>
Co-authored-by: Aurora <aurora@relanet.eu>
* 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)
* 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>
* 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
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.
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
* 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
* 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
* 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
* 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
Shrinks the jar size since we no longer must bundle the Kotlin library. The downside is that some classes grew in size compared to their Kotlin versions.
Many contributors didn't care for Kotlin either.
* Begin working on improved lighting to better match 1.14's "new" lighting engine
I guess the "new" lighting engine is somewhat old now lol
Also implement the remove first stuff to fixlight
* And then make it work
* Add a #air mask, the opposite of #existing (#1511)
(cherry picked from commit 84fa2bbbc63de7bece01f41c0d5cb7d85cf129e6)
* Remove unused methods in Mask.java
* Remove `test(Extent, BlockVector3)` from Masks.
This was a poorly planned idea. This should save some memory too.
Authored-by: Matthew Miller <mnmiller1@me.com>
Masks Reimplemented:
- Adjacent (~): Adjacent to a specific number of other blocks.
- Example: ~[oak_log][1][4]
- Extrema (#extrema): Restrict to near specific terrain extrema. The "-o" flag will only overlay existing terrain.
- Example: #extrema[0d][45d][-o]
- ROC Angle (#roc): Restrict to near specific terrain slope rate of change. The "-o" flag will only overlay existing terrain.
- Example: #roc[0d][45d][-o]
- Surface (#surface): Restrict to surfaces (any solid block touching air).
- Example: #surface
- Wall (#wall): Restrict to walls (any block n,e,s,w of air).
- Example: #wall
Other Changes:
- Minor logic change to angle mask's overlay.
- Fixed negating air mask.
- Added overlay flag to angle (/) mask.
* Replace BlockStates reading with new 1.16 logic
* Account for running on older platforms
Splits out the new reading to AnvilChunk16, uses data version to detect
the appropriate version.
* Move data versions to Constants
Also fixes some logic hiccups that become obvious with the new names.
* Fix LegacyMapper DFU handling
* Fix factor indexing
(cherry picked from commit 8c171f0929e8530aab1731d122649adc58c5161f)
Allows cancellation information to be fed back into the ascend/descend
algorithms.
(cherry picked from commit 71e104bcb187a5313e88dda5df79059c8ffbc1fe)
First noticed incident of operations ruining ChunkSections. Do not build and use this unless you're testing.
Rushed some of the changes, gotta sleep. Would be nice to get a review of this one from @mattbdev and @dordsor21
- Very basic implementation of the SideEffects system. Will definitely need fine tuning for it to be functional, but is not considered a priority in my opinion.
- Minor changes to the World interface and World implementations related to the SideEffects system. Shouldn't be the cause of any new bugs but be on the lookout.
- Included debug in BukkitImplLoader.java to assist contributors in understanding what needs to be implemented for the adapter to load properly.
Still very WIP but we're a few steps closer. So far, this is coming along better than I anticipated. Hopefully we can keep the momentum.
First noticed incident of operations ruining ChunkSections. Do not build and use this unless you're testing.
Rushed some of the changes, gotta sleep. Would be nice to get a review of this one from @mattbdev and @dordsor21
- Very basic implementation of the SideEffects system. Will definitely need fine tuning for it to be functional, but is not considered a priority in my opinion.
- Minor changes to the World interface and World implementations related to the SideEffects system. Shouldn't be the cause of any new bugs but be on the lookout.
- Included debug in BukkitImplLoader.java to assist contributors in understanding what needs to be implemented for the adapter to load properly.
Still very WIP but we're a few steps closer. So far, this is coming along better than I anticipated. Hopefully we can keep the momentum.
* 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)
The BlockMap tests got much faster, so there's no need to hide them
behind a flag.
(cherry picked from commit 1e2496af552891e3b43c5703bda8dc4129bbcc5d)
* 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
- Similar to previous commit. If the chunksection was empty, then __reserved__ was parsed to the clipboard, and then not correctly identified as air
- Now assume all __reserved__ is air when writing to clipboards
- 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"
- Revert back to default FAWE behaviour where placed blocks do not tick by default (until a restart, or another edit is done in the same chunksection without changing the block)
* 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.
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.
- You had to specifically use //schem load <schematic>.schematic mcedit to load legacy schematics, now if you're loading .schematic it assumes you're wanting mcedit format
- If you end up attempting to load an mcedit schematic with the sponge reader it now throws an exception.
This is an attempt to fix CPU spikes which do not reduce and continue mounting until the server reaches ~300%-500% usage. This override should allow prompt equality checks for regions based on the world, the minimum point, the maximum point, and area covered by the region.
Issues found regarding this change should be quickly reported so this can be reverted and replaced with another appropriate solution.
This commit fixes the PlotSquared issue where running a PlotSquared command could result in intense lag on the main thread. This was mainly seen with running the /p info command on an extremely large plot.
Since #world can be null, the uniqueness of this hashCode is not the best, but since it's essentially just a collection of BlockVector3's, I don't believe this change will break anything. If it does, please let me know! Feedback on the uniqueness of this is welcomed.
- 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
* Add compatibility handlers for beds and banners
* IntTag#getValue does not return null so do not check that
(cherry picked from commit 53ac21aa8723d71040d580902cfeae551a9cabf6)
- 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...
- 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
This fixes the issue where masks other than SimpleBlock masks (like Offset mask or negate mask) would not work.
The issue was caused by parseFromListInput() who would throw SuggestInputParseException if the input was not a valid block definition.
But as the parser was catching NoMatchException only, this was causing an error and the MaskFactory was broken.
* Use custom radix sort for ordering blocks
* Licenses :P
* Fix ordering, add test for it
* Grant Gradle more memory (thx Fabric)
* Increase (?) / Specify memory for core tests
* Many attempts at fixing OOM
(cherry picked from commit bb013aa89b8457c4649e2546eef0aa94b9fc4020)
* Properly close all files when dealing with archives
* Move file utils to SafeFiles class
* Licenses
(cherry picked from commit a600266d41151eec4f2239cf90e202bb99fa3a8b)
Turns out the FilterBlock's getOrdinal value is from the "get", and does not share the same reference as setOrdinal, whose value is from the "set", would modify.
Because of this, even if #getOrdinal returns 0, we still must update the set with 0 by #setOrdinal.
* Allow expand to be used by console.
Also fix direction converter requiring a player.
* Revert exception.
(cherry picked from commit b4d2db3dee01d6af4f49d6ee1ea015dbd685839c)