Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WorldEdit-Folia #2462

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
84c8b39
Folia "compatible" lol
Yomamaeatstoes Dec 13, 2023
bb4ab75
Update README.md
Yomamaeatstoes Dec 14, 2023
43414bc
Update README.md
Yomamaeatstoes Dec 14, 2023
7f650b5
Update README.md
Yomamaeatstoes Dec 14, 2023
49bf588
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Dec 20, 2023
26af7c0
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Dec 25, 2023
4ae7dc2
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Jan 6, 2024
12866a7
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Jan 12, 2024
2b1c6c2
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Jan 26, 2024
e58eacc
Update README.md
Yomamaeatstoes Jan 28, 2024
cc41463
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Feb 5, 2024
09f855c
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Feb 18, 2024
6f7fd28
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Feb 25, 2024
8ddbd3a
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Feb 29, 2024
e520c31
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Mar 8, 2024
15c3084
Merge branch 'master' into master
HSGamer Mar 9, 2024
ae8f696
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Mar 30, 2024
b403ea0
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Mar 30, 2024
525f23a
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Apr 1, 2024
7194428
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Apr 2, 2024
6841762
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Apr 2, 2024
8f4e1e6
Merge branch 'EngineHub:master' into master
Yomamaeatstoes Apr 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,8 @@ YourKit supports open source projects with innovative and intelligent tools for
YourKit is the creator of [YourKit Java Profiler](https://www.yourkit.com/java/profiler/),
[YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/),
and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/).

# Folia Inquisitors
[<img src="https://github.com/Folia-Inquisitors.png" width=80 alt="Folia-Inquisitors">](https://github.com/orgs/Folia-Inquisitors/repositories)
[<img src="https://github.com/TechnicallyCoded.png" width=80 alt="TechnicallyCoded">](https://github.com/TechnicallyCoded)
[<img src="https://github.com/Yomamaeatstoes.png" width=80 alt="Yomamaeatstoes">](https://github.com/Yomamaeatstoes)
Comment on lines +88 to +91
Copy link
Member

@octylFractal octylFractal Jan 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this added? I don't see why we should be specifically calling these groups/people out. Unless you plan to assist in maintaining Folia support, in which case it would be good to mention that here, e.g. "Thanks to <xyz> for maintaining Folia support in WorldEdit". But if you do so, we will assign Folia issues to you.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. I have talked to one of the members in the organization who so far plans on doing a pull request. Once that is done it should be reflected in the readme.

Original file line number Diff line number Diff line change
Expand Up @@ -462,25 +462,9 @@ public com.sk89q.worldedit.world.block.BlockState getBlock(BlockVector3 position
@Override
public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position, B block, SideEffectSet sideEffects) {
clearContainerBlockContents(position);
if (worldNativeAccess != null) {
try {
return worldNativeAccess.setBlock(position, block, sideEffects);
} catch (Exception e) {
if (block instanceof BaseBlock baseBlock && baseBlock.getNbt() != null) {
LOGGER.warn("Tried to set a corrupt tile entity at " + position.toString()
+ ": " + baseBlock.getNbt(), e);
} else {
LOGGER.warn("Failed to set block via adapter, falling back to generic", e);
}
}
}
if (WorldEditPlugin.getInstance().getLocalConfiguration().unsupportedVersionEditing) {
Block bukkitBlock = getWorld().getBlockAt(position.getBlockX(), position.getBlockY(), position.getBlockZ());
bukkitBlock.setBlockData(BukkitAdapter.adapt(block), sideEffects.doesApplyAny());
return true;
} else {
throw new RuntimeException(new UnsupportedVersionEditException());
}
Block bukkitBlock = getWorld().getBlockAt(position.getBlockX(), position.getBlockY(), position.getBlockZ());
bukkitBlock.setBlockData(BukkitAdapter.adapt(block), sideEffects.doesApplyAny());
return true;
Comment on lines +483 to +485
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This completely breaks setting NBT and side-effect support in all Bukkit-based servers. The solution here must not remove the calls to worldNativeAccess.

Copy link
Author

@Yomamaeatstoes Yomamaeatstoes Jan 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already have a proposed idea.

}

@Override
Expand Down
1 change: 1 addition & 0 deletions worldedit-bukkit/src/main/resources/plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ load: STARTUP
api-version: 1.13
softdepend: [Vault]
author: EngineHub
folia-supported: true
website: https://enginehub.org/worldedit