-
-
Notifications
You must be signed in to change notification settings - Fork 883
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
WorldEdit-Folia #2462
Changes from 10 commits
84c8b39
bb4ab75
43414bc
7f650b5
49bf588
26af7c0
4ae7dc2
12866a7
2b1c6c2
e58eacc
cc41463
09f855c
6f7fd28
8ddbd3a
e520c31
15c3084
ae8f696
b403ea0
525f23a
7194428
6841762
8f4e1e6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the feedback. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I already have a proposed idea. |
||
} | ||
|
||
@Override | ||
|
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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.