Single spell scope excavation (3x3, 5x3, 5x5 ...) spell tutorial [HC] Minecraft Game

Note:

This spell is only an individual's method, and it does not mean the best way to implement.

Because the current module version is a suspected bug vector floating -point operation problem, this spell can only be used in the negative semi -axis direction of XYZ, and the subsequent module version may be repaired.The author has fixed the problem in github, the next version (0.8.4?) Will no longer exist in this problem

Due to the recursive implementation method, a large -scale excavation cannot be achieved under the default depth configuration of the module; it can be solved by changing the configuration or changing the previous part to a hard code.

The following explanation uses 3x3 mining. The player looks at the above as an example:

Basic thinking

A list of [0, 1, ..., 7, 8] is generated by recursion.

Get the coordinates of the blocks seen by the player

Get the French vector of the surface of the block of the player

Put the method vector of the previous steps as the benchmark vector of the three axes of the XYZ (such as: X -axis standard vector (1, 0, 0)) for fork.0, 0, 0)))

Put the three forks of the previous step in one list and make it different or operate with the list of [(0, 0, 0)] (removing the repeated elements in the two lists). The result of this step is to need to requireTwo axes of offset

For each element (hereinafter referred to as i) generated in the first step, execute:

The floor removal and balance of i separately obtain the offset on the two axes

Take the offset obtained by the two axes that need to be offset.

Add the two results of the coordinates of the player to see the block

Destruction of the box at the previous step

Renderings

pseudocode

Note: This code is a coding of 5x5 mining, you need to change // Editme parts to change to other mining size

Mectering of recursive list:

 {{

Swap

Dupe

Get_list_length

Add_to_list

Dupe

Get_list_length

25 // editme

==

0_TO_NULL (Identity Purification)

{{

Swap

Dupe

EVAL (Hermes' Gambit)

}

Either Null-> Non-Null One (Exclusion Distillation)

{{

POP: Second (BOOKKEEPER's Gambits)

}

A not null? A: B (Disjunction Distillation)

Eval

}

0

CREATE_SINGLE_LIST (Single's Purificationation)

swap

dupe

Eval

Later part:

 Player

sign

raycast (normal)

dupe

(1,0,0)

Cross

swap

dupe

(0,1,0)

Cross

swap

(0,0,1)

Cross

3

list_from_stack (FLOCK's Gambit)

(0,0,0)

CREATE_SINGLE_LIST (Single's Purificationation)

XOR (Exclusionary Distillation) {

Swap

List-> Many (FLOCK's Disintegration)

3

Grab

Dupe

5 // editme

//

Floor (Floor Purification)

Dupe

5 // editme

*

3

Grab

Swap

-

2 // editme

-

4

Grab

*

Swap

2 // editme

-

3

Grab

*

3

Grab

+

+

Break_block

}

4

Grab

list_eval (Thoth's Gambit)