Rename some A's

This commit is contained in:
KennyTV 2020-06-27 16:56:57 +02:00
parent 3a48e54e52
commit 7a25645ed5
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
4 changed files with 8 additions and 8 deletions

View File

@ -18,7 +18,7 @@ import java.util.regex.Pattern;
public class ChatRewriter {
private static final Pattern URL = Pattern.compile("^(?:(https?)://)?([-\\w_.]{2,}\\.[a-z]{2,4})(/\\S*)?$");
private static final BaseComponent[] A = new BaseComponent[0];
private static final BaseComponent[] EMPTY_COMPONENTS = new BaseComponent[0];
private static final ComponentRewriter COMPONENT_REWRITER = new ComponentRewriter() {
@Override
protected void handleTranslate(JsonObject object, String translate) {
@ -128,7 +128,7 @@ public class ChatRewriter {
component.setText(builder.toString());
components.add(component);
final String serializedComponents = ComponentSerializer.toString(components.toArray(A));
final String serializedComponents = ComponentSerializer.toString(components.toArray(EMPTY_COMPONENTS));
return GsonUtil.getJsonParser().parse(serializedComponents);
}

View File

@ -29,7 +29,7 @@ import java.util.Map;
import java.util.Map.Entry;
public class ConnectionData {
private static final BlockChangeRecord[] A = new BlockChangeRecord[0];
private static final BlockChangeRecord[] EMPTY_RECORDS = new BlockChangeRecord[0];
public static BlockConnectionProvider blockConnectionProvider;
static Int2ObjectMap<String> idToKey = new Int2ObjectOpenHashMap<>(8582, 1F);
static Map<String, Integer> keyToId = new HashMap<>(8582, 1F);
@ -121,7 +121,7 @@ public class ConnectionData {
PacketWrapper wrapper = new PacketWrapper(0x0F, null, user);
wrapper.write(Type.INT, chunkX + chunkDeltaX);
wrapper.write(Type.INT, chunkZ + chunkDeltaZ);
wrapper.write(Type.BLOCK_CHANGE_RECORD_ARRAY, updates.toArray(A));
wrapper.write(Type.BLOCK_CHANGE_RECORD_ARRAY, updates.toArray(EMPTY_RECORDS));
try {
wrapper.send(Protocol1_13To1_12_2.class, true, true);
} catch (Exception e) {

View File

@ -17,7 +17,7 @@ import java.util.Arrays;
import java.util.List;
public class Chunk1_15Type extends PartialType<Chunk, ClientWorld> {
private static final CompoundTag[] A = new CompoundTag[0];
private static final CompoundTag[] EMPTY_COMPOUNDS = new CompoundTag[0];
public Chunk1_15Type(ClientWorld param) {
super(param, Chunk.class);
@ -98,7 +98,7 @@ public class Chunk1_15Type extends PartialType<Chunk, ClientWorld> {
}
// Write Block Entities
Type.NBT_ARRAY.write(output, chunk.getBlockEntities().toArray(A));
Type.NBT_ARRAY.write(output, chunk.getBlockEntities().toArray(EMPTY_COMPOUNDS));
}
@Override

View File

@ -17,7 +17,7 @@ import java.util.Arrays;
import java.util.List;
public class Chunk1_16Type extends PartialType<Chunk, ClientWorld> {
private static final CompoundTag[] A = new CompoundTag[0];
private static final CompoundTag[] EMPTY_COMPOUNDS = new CompoundTag[0];
public Chunk1_16Type(ClientWorld param) {
super(param, Chunk.class);
@ -100,7 +100,7 @@ public class Chunk1_16Type extends PartialType<Chunk, ClientWorld> {
}
// Write Block Entities
Type.NBT_ARRAY.write(output, chunk.getBlockEntities().toArray(A));
Type.NBT_ARRAY.write(output, chunk.getBlockEntities().toArray(EMPTY_COMPOUNDS));
}
@Override