mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00: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
This commit is contained in:
parent
e4158ac084
commit
5cd9616507
@ -555,10 +555,11 @@ public class BlockTransformExtent extends ResettableExtent {
|
|||||||
|
|
||||||
int transformedId = transformState(state, transform);
|
int transformedId = transformState(state, transform);
|
||||||
BlockState transformed = BlockState.getFromInternalId(transformedId);
|
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) transformBaseBlockNBT(transformed, block.getNbtData(), transform);
|
||||||
}
|
}
|
||||||
return (B) (block instanceof BaseBlock ? transformed.toBaseBlock() : transformed);
|
return (B) (baseBlock? transformed.toBaseBlock() : transformed);
|
||||||
//FAWE end
|
//FAWE end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user