mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 08:28:35 +00:00
refactor: Address .editorconfig
violations
This commit is contained in:
@ -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
|
||||
|
@ -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",
|
||||
|
@ -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 {
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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.
|
||||
|
Reference in New Issue
Block a user