Javadoc and Formatting fixes. (#619)

Javadoc and Formatting fixes.

Also, extremely minor code changes which have been tested.
This commit is only part one of two commits that aim to fix problems with formatting in our project. In part two I will modify the Google Java Style Guide (since it closely matches our code style) for our project so there is guidance on how to format and document. 

* Updated PlotSquared URL
* Removed plugin acronyms
* Fixed a typo
* Fixed grammar
* Use modern block id's
* Update YouTube video URL
This commit is contained in:
Matt
2020-10-05 13:41:41 -04:00
committed by GitHub
parent b06d943f7c
commit 96dcb95b7c
393 changed files with 6537 additions and 4700 deletions

View File

@ -85,14 +85,14 @@ public class AnvilChunk implements Chunk {
}
blocks[y] = NBTUtils.getChildTag(sectionTag.getValue(),
"Blocks", ByteArrayTag.class).getValue();
"Blocks", ByteArrayTag.class).getValue();
data[y] = NBTUtils.getChildTag(sectionTag.getValue(), "Data",
ByteArrayTag.class).getValue();
ByteArrayTag.class).getValue();
// 4096 ID block support
if (sectionTag.getValue().containsKey("Add")) {
blocksAdd[y] = NBTUtils.getChildTag(sectionTag.getValue(),
"Add", ByteArrayTag.class).getValue();
"Add", ByteArrayTag.class).getValue();
}
}
@ -100,16 +100,17 @@ public class AnvilChunk implements Chunk {
for (byte[] block : blocks) {
if (block.length != sectionsize) {
throw new InvalidFormatException(
"Chunk blocks byte array expected " + "to be " + sectionsize + " bytes; found "
+ block.length);
"Chunk blocks byte array expected " + "to be "
+ sectionsize + " bytes; found "
+ block.length);
}
}
for (byte[] aData : data) {
if (aData.length != (sectionsize / 2)) {
throw new InvalidFormatException(
"Chunk block data byte array " + "expected to be " + sectionsize
+ " bytes; found " + aData.length);
throw new InvalidFormatException("Chunk block data byte array "
+ "expected to be " + sectionsize + " bytes; found "
+ aData.length);
}
}
}
@ -178,7 +179,8 @@ public class AnvilChunk implements Chunk {
* Used to load the tile entities.
*/
private void populateTileEntities() throws DataException {
List<Tag> tags = NBTUtils.getChildTag(rootTag.getValue(), "TileEntities", ListTag.class).getValue();
List<Tag> tags = NBTUtils.getChildTag(rootTag.getValue(),
"TileEntities", ListTag.class).getValue();
tileEntities = new HashMap<>();
@ -254,8 +256,7 @@ public class AnvilChunk implements Chunk {
BlockState state = LegacyMapper.getInstance().getBlockFromLegacy(id, data);
if (state == null) {
WorldEdit.logger.warn("Unknown legacy block " + id + ":" + data
+ " found when loading legacy anvil chunk.");
WorldEdit.logger.warn("Unknown legacy block " + id + ":" + data + " found when loading legacy anvil chunk.");
return BlockTypes.AIR.getDefaultState().toBaseBlock();
}
CompoundTag tileEntity = getBlockTileEntity(position);

View File

@ -50,7 +50,7 @@ public class AnvilChunk13 implements Chunk {
private int rootX;
private int rootZ;
private Map<BlockVector3, Map<String,Tag>> tileEntities;
private Map<BlockVector3, Map<String, Tag>> tileEntities;
/**
* Construct the chunk with a compound tag.
@ -163,8 +163,6 @@ public class AnvilChunk13 implements Chunk {
/**
* Used to load the tile entities.
*
* @throws DataException
*/
private void populateTileEntities() throws DataException {
tileEntities = new HashMap<>();