refactor: Address .editorconfig violations

This commit is contained in:
NotMyFault
2021-10-18 23:09:21 +02:00
parent 9a33789e41
commit bd9476a175
53 changed files with 1415 additions and 1127 deletions

View File

@ -344,7 +344,10 @@ public class BlockState implements BlockStateHolder<BlockState>, Pattern {
//FAWE end
BlockType type = this.getBlockType();
// Lazily initialize the map
Map<? extends Property<?>, Object> map = Maps.asMap(type.getPropertiesSet(), (Function<Property<?>, Object>) this::getState);
Map<? extends Property<?>, Object> map = Maps.asMap(
type.getPropertiesSet(),
(Function<Property<?>, Object>) this::getState
);
//noinspection RedundantCast - This is required for compilation, etc.
return Collections.unmodifiableMap((Map<Property<?>, Object>) map);
//FAWE end

View File

@ -166,8 +166,8 @@ public interface BlockStateHolder<B extends BlockStateHolder<B>> extends TileEnt
*
* @param compoundTag The NBT Data to apply
* @return The BaseBlock
* This must be overridden by new subclasses. See {@link NonAbstractForCompatibility}
* for details
* This must be overridden by new subclasses. See {@link NonAbstractForCompatibility}
* for details
*/
@NonAbstractForCompatibility(
delegateName = "toBaseBlock",

View File

@ -20,16 +20,13 @@
package com.sk89q.worldedit.world.chunk;
import com.sk89q.worldedit.entity.BaseEntity;
import com.sk89q.worldedit.entity.Entity;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.DataException;
import com.sk89q.worldedit.world.biome.BiomeType;
import com.sk89q.worldedit.world.block.BaseBlock;
import java.util.Collections;
import java.util.List;
import java.util.Map;
/**
* A 16 by 16 block chunk.
@ -46,6 +43,7 @@ public interface Chunk {
BaseBlock getBlock(BlockVector3 position) throws DataException;
//FAWE start - biome and entity restore
/**
* Get a biome.
*
@ -59,6 +57,7 @@ public interface Chunk {
/**
* Get the stored entities.
*
* @return list of stored entities
*/
default List<BaseEntity> getEntities() throws DataException {

View File

@ -149,8 +149,10 @@ public final class LegacyMapper {
// if it's still null, both fixer and default failed
if (state == null) {
LOGGER.error("Unknown block: {}. Neither the DataFixer nor defaulting worked to recognize this block.",
value);
LOGGER.error(
"Unknown block: {}. Neither the DataFixer nor defaulting worked to recognize this block.",
value
);
} else {
// it's not null so one of them succeeded, now use it
blockToStringMap.put(state, id);

View File

@ -28,8 +28,6 @@ import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.regions.Region;
import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.util.nbt.BinaryTag;
import com.sk89q.worldedit.util.nbt.BinaryTagTypes;
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
import com.sk89q.worldedit.util.nbt.ListBinaryTag;
import com.sk89q.worldedit.world.DataException;

View File

@ -87,6 +87,7 @@ public abstract class ChunkStore implements Closeable {
public abstract CompoundTag getChunkTag(BlockVector2 position, World world) throws DataException, IOException;
//FAWE start - biome and entity restore
/**
* Get the tag for the entities stored in a chunk from the entities folder. 1.17+ use only.
* If an error occurs, returns null.