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();
}
+2 -1
View File
@@ -36,7 +36,8 @@ export const resetToBlockStates = {
cluster_count: 0,
respawn_anchor_charge: 0,
turtle_egg_count: 0,
cluster_count: 0
cluster_count: 0,
end_portal_eye_bit: false
};
export const blockIdToItemStackMap = {