Fabric/Forge Adapter methods for BlockState are inefficient
wizjany opened this issue ยท 1 comments
The adapter.adapt(BlockState)
methods in Fabric/Forge currently re-apply properties each time instead of using internal ID like bukkit does. Properties should be calculated on first use (possibly in a different place - eg in the platform/using registry events/etc.) and then the mappings from WE<->Native should be stored for use in the adapt
method.
https://github.com/EngineHub/WorldEdit/blob/7.2.2/worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/FabricAdapter.java#L201
https://github.com/EngineHub/WorldEdit/blob/7.2.2/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeAdapter.java#L197
Originally posted by @wizjany in #556 (comment)
This was merged in 3c161db