Fix out of bounds error on top layer due to material grabber
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user