Skip to content

Commit e974b5e

Browse files
OtakeOtake
authored andcommitted
Improve Efficiency
1 parent 096c424 commit e974b5e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/io/github/pseudoresonance/pixy2api/Pixy2CCC.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public int getBlocks(boolean wait, int sigmap, int maxBlocks) {
9393
pixy.sendPacket();
9494
if (pixy.receivePacket() == 0) {
9595
if (pixy.type == CCC_RESPONSE_BLOCKS) {
96-
blocks = new ArrayList<Block>();
96+
blocks.clear();
9797
for (int i = 0; i + 13 < pixy.length; i += 14) {
9898
Block b = new Block(((pixy.buffer[i + 1] & 0xff) << 8) | (pixy.buffer[i] & 0xff),
9999
((pixy.buffer[i + 3] & 0xff) << 8) | (pixy.buffer[i + 2] & 0xff),

0 commit comments

Comments
 (0)