3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-05 02:50:05 +01:00

fix: Ensure BaseBlock is not returned when a BlockState is wanted in BlockTransformExtent (#2161

- NBT will be handled appropriately at another point
 - Fixes #2085
Dieser Commit ist enthalten in:
Jordan 2023-04-13 17:34:16 +01:00 committet von GitHub
Ursprung e4158ac084
Commit 5cd9616507
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -555,10 +555,11 @@ public class BlockTransformExtent extends ResettableExtent {
int transformedId = transformState(state, transform);
BlockState transformed = BlockState.getFromInternalId(transformedId);
if (block.hasNbtData()) {
boolean baseBlock = block instanceof BaseBlock;
if (baseBlock && block.hasNbtData()) {
return (B) transformBaseBlockNBT(transformed, block.getNbtData(), transform);
}
return (B) (block instanceof BaseBlock ? transformed.toBaseBlock() : transformed);
return (B) (baseBlock? transformed.toBaseBlock() : transformed);
//FAWE end
}