editGrid
Call Signature
Section titled “Call Signature”editGrid<
Values,Dimensions,Owner>(writer,entity,field):GridEditor<Values,Dimensions>
entity’s grid field, to edit: each set, fill and copyFrom is
checked against the grid’s type and size and recorded, so the send
carries one cell as one operation, and a collider built from the grid
follows it on both ends. The writer is as editTrait’s. A refused
writer, outside development, gets an editor that writes nowhere.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Values extends GridArray |
Dimensions extends 1 | 2 | 3 |
Owner extends UnstreamedTrait |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
SetupWriter | EntityAuthority | SystemStep |
entity |
Entity |
field |
GridField<Values, Dimensions, Owner> |
Returns
Section titled “Returns”GridEditor<Values, Dimensions>
Example
Section titled “Example”editGrid(step, chunk, ChunkTrait.fields.blocks).set(3, 9, 2, Block.Stone);Call Signature
Section titled “Call Signature”editGrid<
Values,Dimensions,Owner>(writer,entity,field):GridEditor<Values,Dimensions>
entity’s grid field, to edit: each set, fill and copyFrom is
checked against the grid’s type and size and recorded, so the send
carries one cell as one operation, and a collider built from the grid
follows it on both ends. The writer is as editTrait’s. A refused
writer, outside development, gets an editor that writes nowhere.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Values extends GridArray |
Dimensions extends 1 | 2 | 3 |
Owner extends LocalTrait |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
ViewWriter |
entity |
Entity |
field |
GridField<Values, Dimensions, Owner> |
Returns
Section titled “Returns”GridEditor<Values, Dimensions>
Example
Section titled “Example”editGrid(step, chunk, ChunkTrait.fields.blocks).set(3, 9, 2, Block.Stone);Call Signature
Section titled “Call Signature”editGrid<
Values,Dimensions,Owner>(writer,entity,field):GridEditor<Values,Dimensions>
entity’s grid field, to edit: each set, fill and copyFrom is
checked against the grid’s type and size and recorded, so the send
carries one cell as one operation, and a collider built from the grid
follows it on both ends. The writer is as editTrait’s. A refused
writer, outside development, gets an editor that writes nowhere.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
Values extends GridArray |
Dimensions extends 1 | 2 | 3 |
Owner extends Trait |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
writer |
SetupWriter | EntityAuthority |
entity |
Entity |
field |
GridField<Values, Dimensions, Owner> |
Returns
Section titled “Returns”GridEditor<Values, Dimensions>
Example
Section titled “Example”editGrid(step, chunk, ChunkTrait.fields.blocks).set(3, 9, 2, Block.Stone);