Fix out of bounds error on top layer due to material grabber

This commit is contained in:
ForestOfLight
2025-04-21 12:25:53 -07:00
Unverified
parent ae66edefba
commit 23dcdcca37
8 changed files with 3 additions and 2 deletions
@@ -114,7 +114,7 @@ export class StructureInstance {
if (!this.options.isEnabled)
throw new InstanceNotPlacedError(`[Construct] Instance '${this.options.instanceName}' is not placed.`);
if (this.hasLayerSelected())
return this.getLayerBlocks(this.getLayer());
return this.getLayerBlocks(this.getLayer() - 1);
return this.getAllBlocks();
}