Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void populateStructureData() {
- super.populateStructureData();
- int pieceIndex = 0;
- StructurePiece mainBody = new StructurePiece(pieceIndex++, (IStructureUser)job, 0, 0, 0);
- //body
- for (int x = 2; x > -4; x--) {
- for (int z = 1; z > -1; z--) {
- for (int y = 0; y < 2; y++) {
- mainBody.nodes.add(new StructureNode(mainBody, x, y, z));
- }
- }
- }
- int armLength = 4;
- int pincherLength = 3;
- StructurePiece armRight = new StructurePiece(pieceIndex++, mainBody, 0, 0, -2);
- for (int i = 0; i < armLength; i++) armRight.nodes.add(new StructureNode(armRight, i, 0, 0));
- mainBody.addChildPiece(armRight);
- StructurePiece armRight2 = new StructurePiece(pieceIndex++, armRight, armLength, 0, 0);
- for (int i = 0; i < armLength; i++) armRight2.nodes.add(new StructureNode(armRight2, i, 0, 0));
- armRight.addChildPiece(armRight2);
- StructurePiece armRightClaw = new StructurePiece(pieceIndex++, armRight2, armLength, 0, 0);
- for (int i = 0; i < pincherLength; i++) armRightClaw.nodes.add(new StructureNode(armRight, 0, 0, i-1)); //-1z to 1z
- armRight2.addChildPiece(armRightClaw);
- StructurePiece armRightClawPinchRight = new StructurePiece(pieceIndex++, armRightClaw, 0, 0, -1);
- for (int i = 0; i < pincherLength; i++) armRightClawPinchRight.nodes.add(new StructureNode(armRight, i, 0, 0)); //-1z to 1z
- armRightClaw.addChildPiece(armRightClawPinchRight);
- StructurePiece armRightClawPinchLeft = new StructurePiece(pieceIndex++, armRightClaw, 0, 0, 1);
- for (int i = 0; i < pincherLength; i++) armRightClawPinchLeft.nodes.add(new StructureNode(armRight, i, 0, 0)); //-1z to 1z
- armRightClaw.addChildPiece(armRightClawPinchLeft);
- body = mainBody;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement