Commit Graph

197 Commits

Author SHA1 Message Date
dordsor21
f1d4104480
Bunch of changes to help masks 2020-07-02 22:09:12 +01:00
dordsor21
18c9da372c
GetBlocks should default to air not reserved 2020-07-02 18:16:15 +01:00
dordsor21
6be429cc96
Lighting:
- bring fixes to 1.16
- Fix for all lighting where it only set sky lighting if not present, even if it was trying to set block lighting (unlikely to have caused issues as block lighting seems always to be present, but wrong nonetheless)
2020-07-01 12:55:58 +01:00
dordsor21
3b19738ea0
Merge branch '1.15' into 1.16
# Conflicts:
#	worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/mc1_16_1/BukkitGetBlocks_1_16_1.java
#	worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/AsyncWorld.java
#	worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/wrapper/state/AsyncDataContainer.java
2020-07-01 12:47:04 +01:00
dordsor21
3f3c49c0a8
Looks like working block setting and removal 2020-07-01 12:41:20 +01:00
dordsor21
f84958957c
Fix various lighting issues
fixes #496
possibly fixes #497
2020-06-30 13:44:26 +01:00
Octavia Togami
b59b95c282 Cherry-pick WNA, minor changes. 1.16 VERY WIP
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
2020-06-29 22:05:41 -04:00
IronApollo
f2bc8d86fc Work towards 1.16 compatibility
This commit will allow the branch to build properly but the plugin will not function properly due to the lack of a proper adapter implementation. Proceeding will require the implementation of the SideEffects system from upstream (865c3a24d2 (diff-8fd33296e427c87d0296ad7f3ccc050a)).
2020-06-26 19:08:45 -04:00
MattBDev
aab10adb79 Fixed all but one remaining API changes in 1.16.1
No testing has been performed yet.
2020-06-25 20:57:06 -04:00
MattBDev
b7debce4d4 1.16.1 Prep work 2020-06-25 20:29:09 -04:00
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
9f6e0ebd5c Minor changes to NMS logic 2020-06-12 21:45:48 -04:00
dordsor21
75153d8da8 Fix getLightOpacity 2020-05-27 17:25:03 +01: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
Aurora
1f898cd0d1 Negate "hasCollision" for isTranslucent() also for 1.15.0 and 1.14 2020-05-25 19:00:16 +01:00
Aurora
d9240c5626 Negate "hasCollision" for isTranslucent() 2020-05-25 19:00:16 +01:00
dordsor21
a6514f8a78 Ultimately the Striped locks will have no affect, even if kinda cool. 2020-05-20 07:58:14 +01:00
dordsor21
fd3604beba replace synchronisation with Striped access semaphore locks 2020-05-18 16:52:33 +01:00
dordsor21
31cc5e0b60 Synchronise on the nmsWorld so we're not attempting to load two chunks at the same time.
Possibly fixes #471
2020-05-18 16:04:10 +01:00
dordsor21
5be11c541b Put the synchronisation higher up the food chain 2020-05-14 22:32:32 +01:00
dordsor21
3a7c23be45 Fix #443
Temp as it's performance-degrading, but works well enough for now
2020-05-14 22:10:09 +01:00
dordsor21
35169230ad Sort of fix biome getting
It seems to want to put random blocks where the biome isn't
2020-05-14 16:27:24 +01:00
dordsor21
5225099ec0 Fix biome setting in 1.15 2020-05-14 16:17:29 +01:00
dordsor21
be58cd42ac Add option to disable ticking existing blocks when not fastmode 2020-05-11 16:09:31 +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
0dee452e1a Don't attempt to set field on null ChunkSection 2020-05-09 17:42:40 +01:00
dordsor21
b1f1c0f4f0 Possible fix for #331
- Should ensure the server doesn't tick the chunksection while we're editing it
- Basically using the old issue with FAWE breaking block ticking by setting this to zero :)
2020-05-09 16:23:38 +01:00
dordsor21
56c720914e Settings.IMP is terrible. Don't initialise it thousands of times. 2020-05-08 18:17:47 +01:00
dordsor21
c757b01803 By default only allow existing blocks to tick.
- 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)
2020-05-08 16:16:08 +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
dordsor21
0ca81e9d67
Fix FAWE killing chunk ticks. Also allow ticking for set blocks. (#439)
* Fix FAWE killing chunk ticks. Also allow ticking for set blocks.

* Reduce for-loop to being one loop in createPalette

* set the value in the set array and break so we don't continue onwards in the set's ordinal switch statement
2020-05-03 17:50:09 +01:00
MattBDev
5fb18259d5 Merge remote-tracking branch 'origin/1.15' into 1.15 2020-04-30 16:27:08 -04:00
MattBDev
ef3642d521 Small spring cleaning
I changed really small bits and pieces of code. If you have questions just comment and I'll answer them.
2020-04-30 16:26:52 -04:00
dordsor21
9869cf09c6 Apply fda7d00747 to other versions so numpties that use old versions for no reason stop complaining too 2020-04-30 15:14:59 +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
MattBDev
600a1a5daa Implement previously unsupported methods in DelegateLock 2020-04-29 11:29:02 -04:00
Alexander Söderberg
c478dbd249
Backport changes 2020-04-21 23:58:14 +02:00
Alexander Söderberg
8a19c4c38c
Don't mark the chunk as dirty. 2020-04-21 15:40:53 +02:00
Alexander Söderberg
2c85ff1673
Properly remove tile entities in BukkitGetBlocks_1_15_2 2020-04-21 15:23:23 +02:00
IronApollo
16df4abd18 Reflection field name changes
Old ones were outdated. Brush visualization is still WIP and can result in client being kicked from the server for bad packets.
2020-04-01 00:20:25 -04:00
MattBDev
6e1cb4cfbc Remove more useless messages 2020-03-31 19:39:37 -04:00
dordsor21
a6a4400317 Port fixed for #389 from 1.15.2 adapter to other adapters. 2020-03-31 10:26:23 +01:00
MattBDev
a49a09a042 Added clarification for debugging message because of people thinking it is an error. 2020-03-20 20:04:31 -04:00
MattBDev
1df5853f33 Remove unnecessary reflection 2020-03-17 22:27:41 -04:00
MattBDev
14d2c9a5c3 Update BlockStateIdAccess and added a debug message 2020-03-10 17:22:53 -04:00
MattBDev
c52db75976 Delete unused file 2020-02-25 18:26:04 -05:00
Spottedleaf
f6675160f1 Also target 1.15 & 1.14 adapters 2020-02-22 20:11:23 -08:00
Spottedleaf
0d18b15393 Workaround for replacing PlayerChunkMap#visibleChunks field
I run a fork of paper which replaces the visibleChunks and updatingChunks
field for gc performance reasons - visibleChunks is updated via
cloning updatingChunks, and at high chunk counts this causes gc issues
due to the humongous allocation. Unfortunately the only solution is to
not clone the map - which is why the field is removed.

Instead of BukkitAdapter#getPlayerChunk using the visibleChunks field,
it now uses a MethodHandle for PlayerChunkMap#getVisibleChunk. This method is
present on spigot & paper (only protected on spigot - which is why reflection is required),
and I preserve the same thread-safety it provides in my fork - so this solution
will not break compatibility with craftbukkit, spigot, and paper.
2020-02-22 07:07:40 -08:00
MattBDev
62cb04b8ca Remove CFI redirect and other minor changes. 2020-02-21 14:56:21 -05:00
MattBDev
0047f20d5d Minor code quality changes
Changed Lock to subclass ReentrantLock since that is the only subclass DelegateLock should be using. The lock should also never be null so I added an annotation in the constructor.
I also removed some code and replaced it with PaperLib code to just clean up things a little bit.
2020-02-07 14:33:51 -05:00
IronApollo
4f3db6f3da Attempted fix for #329
Removing this code seemed to fix the issue while not breaking general editing abilities. Needs testing to determine any unintended side effects!
2020-02-01 20:28:48 -05:00
IronApollo
83bb3966ca Update adapter to 1.15.2
Adapter updated to 1.15.2, mostly a clone of 1.15 / 1.15.1's adapter. I encountered no issues from this, but the field names for our reflections may need to be double-checked for accuracy in this Minecraft version.
2020-02-01 20:11:02 -05:00
MattBDev
020c674c01 Revert migration of FaweCache to Kotlin 2020-01-29 15:01:38 -05:00
MattBDev
7d4acbdcac Remove some reflection from QueueHandler 2020-01-29 14:33:41 -05:00
MattBDev
cb6359f010 Removed 1.13.2 support. 2020-01-27 18:54:31 -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
f3e0109be2 A lot of small changes 2020-01-03 15:38:30 -05:00
KennyTV
8569359d8f Fix Java 12+ compatibility 2019-12-21 21:21:25 +01:00
Jesse Boyd
39faa740a2
Fix some adapter issues
regen 1.13, tile get npe, null block type values
2019-12-21 09:45:59 +00:00
Jesse Boyd
c2cc4f5aeb
Fix craftbook 2019-12-20 05:54:03 +00:00
NotMyFault
f37bc9417c Merge branch 'merge' into 1.15 2019-12-19 19:05:27 +01:00
Jesse Boyd
6a49b71cf2
Fix compile 2019-12-19 16:19:46 +00:00
Jesse Boyd
6ddeb2ebf5
Various minor
refactor some region dependencies
swithc masking extent to a filter (so it can be parallelized)
Some unfinished refactoring of the filters
remove piston messages from strings.json
2019-12-16 09:07:51 +00:00
MattBDev
ee94bc2ddb More work to get 1.15 working 2019-12-11 17:47:34 -05:00
MattBDev
a137d719cb Remove 1.13 and 1.14 code 2019-12-11 17:47:14 -05:00
NotMyFault
68144232ba More 1.15 wip No.2 2019-12-11 17:06:05 +01:00
NotMyFault
5358c51011 1.15 (wip)
Adapters and nms needs updating still, alongside some other fixes and changes, but I'm too tired for that now
2019-12-11 02:11:52 +01:00
Jesse Boyd
a36778794b
fix paste tile npe 2019-11-29 02:56:07 +00:00
Jesse Boyd
913ada31fb
Fix lighting 1.14 2019-11-24 02:26:52 +00:00
Jesse Boyd
1f19b92b0b
1.13? 2019-11-24 00:57:29 +00:00
Jesse Boyd
50c9a2c2d2
Fxi regen (again) 2019-11-23 18:41:05 +00:00
Jesse Boyd
1844d4dba7
Various major
Add regen
Add //history [find|restore|rollback|summary|clear]
 - history commands are interactable
 - inspect brush info is interactable
Commands are now logged to a searchable database
Fix some cases of id/ordinal mismatch
2019-11-23 04:31:48 +00:00
Jesse Boyd
144ea2ef34
Lazy tags + get / set tiles
Lazy tags means tiles/ents are not translated into the nms NBTBase until it is needed. Should be faster in cases where getFullBlock is called, but nbt is not always needed.
Commands like Copy and Paste, where the input/output are both nms worlds, can entirely bypass WorldEdit translating to and from the WorldEdit JNBT classes.
2019-11-20 03:40:52 +00:00
Jesse Boyd
1b07846746
some adapter refactoring 2019-11-19 04:40:40 +00:00
Jesse Boyd
0087a0d6ab
Various minor
fix undo null sections
fix cancel for certain parallel jobs
optimize schem paste
2019-11-17 22:47:56 +00:00
Jesse Boyd
329df8d33b
various minor
Increase target size
remove unnecessary brush sync
send chunk on biome change
2019-11-17 20:29:25 +00:00
Jesse Boyd
3f92f12e89
synchronize char blocks 2019-11-17 20:02:33 +00:00
Jesse Boyd
e661652c12
Fix setting blocks in null sections 2019-11-17 19:30:28 +00:00
Jesse Boyd
69c225c00f
Fix //vis 2019-11-17 17:22:21 +00:00
Jesse Boyd
601890fe64
Fix biome sending 2019-11-14 19:21:28 +00:00
MattBDev
a23a4e5496 misc changes. 2019-11-11 16:02:28 -05:00
Jesse Boyd
d61dac5aa5
Fix CFI generation 2019-11-08 22:30:39 +00:00
Jesse Boyd
faa63b0c35
CFI changeset 2019-11-08 05:27:04 +00:00
Jesse Boyd
82f5c4ebed
Fix compile 2019-11-07 10:28:17 +00:00
Jesse Boyd
1e16095cba
Fix palette / region iteration 2019-11-04 07:47:31 +00:00
Jesse Boyd
930dfb7f7c
Various minor
thread local cleans on close
remove unnecessary loop on set
remove unnecessary get on set
clean CFI cache on generate
2019-11-03 16:59:11 +00:00
Jesse Boyd
32d837414b
static blocktype initialization
instead of using hacky reflection
2019-11-02 20:35:51 +01:00
Jesse Boyd
f8e1654a4e
Update BukkitGetBlocks_1_14.java 2019-11-02 18:37:17 +01:00
Jesse Boyd
df9e9e510a
Limit processing 2019-11-02 12:13:42 +01:00
Jesse Boyd
0c1fdcc498
remove broken debug 2019-11-01 22:56:07 +01:00
Jesse Boyd
9cf02fe654
WIP Anvil API 2019-10-31 21:04:02 +01:00
Jesse Boyd
c383fab2c2
cfi packet listener 2019-10-30 12:58:21 +01:00
Jesse Boyd
72951cdf23
Various
fake chunk packet
aliases
cfi wip
2019-10-30 12:26:52 +01:00
Jesse Boyd
8356004ec9
chunk sending / cfi 2019-10-26 14:21:49 +01:00
Jesse Boyd
938dde68b2
Don't force load
didn't realize this loads the chunk, I just need to delay unloading until the operation is complete
2019-10-23 16:44:36 +01:00