package net.minecraft.world.level.block;

import net.minecraft.world.level.block.state.StateHolder;
import java.util.stream.Collector;
import net.minecraft.Util;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.core.Vec3i;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.GameRules;
import java.util.Random;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.item.BlockPlaceContext;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape;
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.LevelReader;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.block.state.properties.Property;
import net.minecraft.world.level.block.state.BlockState;
import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
import net.minecraft.world.level.block.state.BlockBehaviour;
import it.unimi.dsi.fastutil.objects.Object2IntMap;
import net.minecraft.core.Direction;
import java.util.Map;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
import net.minecraft.world.level.block.state.properties.IntegerProperty;

public class FireBlock extends BaseFireBlock {
    public static final IntegerProperty AGE;
    public static final BooleanProperty NORTH;
    public static final BooleanProperty EAST;
    public static final BooleanProperty SOUTH;
    public static final BooleanProperty WEST;
    public static final BooleanProperty UP;
    private static final Map<Direction, BooleanProperty> PROPERTY_BY_DIRECTION;
    private final Object2IntMap<Block> flameOdds;
    private final Object2IntMap<Block> burnOdds;
    
    public FireBlock(final Properties c) {
        super(c, 1.0f);
        this.flameOdds = (Object2IntMap<Block>)new Object2IntOpenHashMap();
        this.burnOdds = (Object2IntMap<Block>)new Object2IntOpenHashMap();
        this.registerDefaultState((((((((StateHolder<O, BlockState>)this.stateDefinition.any()).setValue((Property<Comparable>)FireBlock.AGE, 0)).setValue((Property<Comparable>)FireBlock.NORTH, false)).setValue((Property<Comparable>)FireBlock.EAST, false)).setValue((Property<Comparable>)FireBlock.SOUTH, false)).setValue((Property<Comparable>)FireBlock.WEST, false)).<Comparable, Boolean>setValue((Property<Comparable>)FireBlock.UP, false));
    }
    
    @Override
    public BlockState updateShape(final BlockState cfj1, final Direction fz, final BlockState cfj3, final LevelAccessor bqc, final BlockPos fu5, final BlockPos fu6) {
        if (this.canSurvive(cfj1, bqc, fu5)) {
            return this.getStateWithAge(bqc, fu5, cfj1.<Integer>getValue((Property<Integer>)FireBlock.AGE));
        }
        return Blocks.AIR.defaultBlockState();
    }
    
    @Override
    public VoxelShape getShape(final BlockState cfj, final BlockGetter bpg, final BlockPos fu, final CollisionContext der) {
        VoxelShape dfg6 = Shapes.empty();
        if (cfj.<Boolean>getValue((Property<Boolean>)FireBlock.UP)) {
            dfg6 = FireBlock.UP_AABB;
        }
        if (cfj.<Boolean>getValue((Property<Boolean>)FireBlock.WEST)) {
            dfg6 = Shapes.or(dfg6, FireBlock.WEST_AABB);
        }
        if (cfj.<Boolean>getValue((Property<Boolean>)FireBlock.EAST)) {
            dfg6 = Shapes.or(dfg6, FireBlock.EAST_AABB);
        }
        if (cfj.<Boolean>getValue((Property<Boolean>)FireBlock.NORTH)) {
            dfg6 = Shapes.or(dfg6, FireBlock.NORTH_AABB);
        }
        if (cfj.<Boolean>getValue((Property<Boolean>)FireBlock.SOUTH)) {
            dfg6 = Shapes.or(dfg6, FireBlock.SOUTH_AABB);
        }
        if (dfg6 == Shapes.empty()) {
            return FireBlock.DOWN_AABB;
        }
        return dfg6;
    }
    
    @Override
    public BlockState getStateForPlacement(final BlockPlaceContext bin) {
        return this.getStateForPlacement(bin.getLevel(), bin.getClickedPos());
    }
    
    protected BlockState getStateForPlacement(final BlockGetter bpg, final BlockPos fu) {
        final BlockPos fu2 = fu.below();
        final BlockState cfj5 = bpg.getBlockState(fu2);
        if (this.canBurn(cfj5) || cfj5.isFaceSturdy(bpg, fu2, Direction.UP)) {
            return this.defaultBlockState();
        }
        BlockState cfj6 = this.defaultBlockState();
        for (final Direction fz10 : Direction.values()) {
            final BooleanProperty cga11 = FireBlock.PROPERTY_BY_DIRECTION.get(fz10);
            if (cga11 != null) {
                cfj6 = ((StateHolder<O, BlockState>)cfj6).<Comparable, Boolean>setValue((Property<Comparable>)cga11, this.canBurn(bpg.getBlockState(fu.relative(fz10))));
            }
        }
        return cfj6;
    }
    
    @Override
    public boolean canSurvive(final BlockState cfj, final LevelReader bqd, final BlockPos fu) {
        final BlockPos fu2 = fu.below();
        return bqd.getBlockState(fu2).isFaceSturdy(bqd, fu2, Direction.UP) || this.isValidFireLocation(bqd, fu);
    }
    
    @Override
    public void tick(BlockState cfj, final ServerLevel zd, final BlockPos fu, final Random random) {
        zd.getBlockTicks().scheduleTick(fu, this, getFireTickDelay(zd.random));
        if (!zd.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) {
            return;
        }
        if (!cfj.canSurvive(zd, fu)) {
            zd.removeBlock(fu, false);
        }
        final BlockState cfj2 = zd.getBlockState(fu.below());
        final boolean boolean7 = cfj2.is(zd.dimensionType().infiniburn());
        final int integer8 = cfj.<Integer>getValue((Property<Integer>)FireBlock.AGE);
        if (!boolean7 && zd.isRaining() && this.isNearRain(zd, fu) && random.nextFloat() < 0.2f + integer8 * 0.03f) {
            zd.removeBlock(fu, false);
            return;
        }
        final int integer9 = Math.min(15, integer8 + random.nextInt(3) / 2);
        if (integer8 != integer9) {
            cfj = ((StateHolder<O, BlockState>)cfj).<Comparable, Integer>setValue((Property<Comparable>)FireBlock.AGE, integer9);
            zd.setBlock(fu, cfj, 4);
        }
        if (!boolean7) {
            if (!this.isValidFireLocation(zd, fu)) {
                final BlockPos fu2 = fu.below();
                if (!zd.getBlockState(fu2).isFaceSturdy(zd, fu2, Direction.UP) || integer8 > 3) {
                    zd.removeBlock(fu, false);
                }
                return;
            }
            if (integer8 == 15 && random.nextInt(4) == 0 && !this.canBurn(zd.getBlockState(fu.below()))) {
                zd.removeBlock(fu, false);
                return;
            }
        }
        final boolean boolean8 = zd.isHumidAt(fu);
        final int integer10 = boolean8 ? -50 : 0;
        this.checkBurnOut(zd, fu.east(), 300 + integer10, random, integer8);
        this.checkBurnOut(zd, fu.west(), 300 + integer10, random, integer8);
        this.checkBurnOut(zd, fu.below(), 250 + integer10, random, integer8);
        this.checkBurnOut(zd, fu.above(), 250 + integer10, random, integer8);
        this.checkBurnOut(zd, fu.north(), 300 + integer10, random, integer8);
        this.checkBurnOut(zd, fu.south(), 300 + integer10, random, integer8);
        final BlockPos.MutableBlockPos a12 = new BlockPos.MutableBlockPos();
        for (int integer11 = -1; integer11 <= 1; ++integer11) {
            for (int integer12 = -1; integer12 <= 1; ++integer12) {
                for (int integer13 = -1; integer13 <= 4; ++integer13) {
                    if (integer11 != 0 || integer13 != 0 || integer12 != 0) {
                        int integer14 = 100;
                        if (integer13 > 1) {
                            integer14 += (integer13 - 1) * 100;
                        }
                        a12.setWithOffset(fu, integer11, integer13, integer12);
                        final int integer15 = this.getFireOdds(zd, a12);
                        if (integer15 > 0) {
                            int integer16 = (integer15 + 40 + zd.getDifficulty().getId() * 7) / (integer8 + 30);
                            if (boolean8) {
                                integer16 /= 2;
                            }
                            if (integer16 > 0 && random.nextInt(integer14) <= integer16) {
                                if (!zd.isRaining() || !this.isNearRain(zd, a12)) {
                                    final int integer17 = Math.min(15, integer8 + random.nextInt(5) / 4);
                                    zd.setBlock(a12, this.getStateWithAge(zd, a12, integer17), 3);
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    
    protected boolean isNearRain(final Level bqb, final BlockPos fu) {
        return bqb.isRainingAt(fu) || bqb.isRainingAt(fu.west()) || bqb.isRainingAt(fu.east()) || bqb.isRainingAt(fu.north()) || bqb.isRainingAt(fu.south());
    }
    
    private int getBurnOdd(final BlockState cfj) {
        if (cfj.<Comparable>hasProperty((Property<Comparable>)BlockStateProperties.WATERLOGGED) && cfj.<Boolean>getValue((Property<Boolean>)BlockStateProperties.WATERLOGGED)) {
            return 0;
        }
        return this.burnOdds.getInt(cfj.getBlock());
    }
    
    private int getFlameOdds(final BlockState cfj) {
        if (cfj.<Comparable>hasProperty((Property<Comparable>)BlockStateProperties.WATERLOGGED) && cfj.<Boolean>getValue((Property<Boolean>)BlockStateProperties.WATERLOGGED)) {
            return 0;
        }
        return this.flameOdds.getInt(cfj.getBlock());
    }
    
    private void checkBurnOut(final Level bqb, final BlockPos fu, final int integer3, final Random random, final int integer5) {
        final int integer6 = this.getBurnOdd(bqb.getBlockState(fu));
        if (random.nextInt(integer3) < integer6) {
            final BlockState cfj8 = bqb.getBlockState(fu);
            if (random.nextInt(integer5 + 10) < 5 && !bqb.isRainingAt(fu)) {
                final int integer7 = Math.min(integer5 + random.nextInt(5) / 4, 15);
                bqb.setBlock(fu, this.getStateWithAge(bqb, fu, integer7), 3);
            }
            else {
                bqb.removeBlock(fu, false);
            }
            final Block bvr9 = cfj8.getBlock();
            if (bvr9 instanceof TntBlock) {
                final TntBlock tntBlock = (TntBlock)bvr9;
                TntBlock.explode(bqb, fu);
            }
        }
    }
    
    private BlockState getStateWithAge(final LevelAccessor bqc, final BlockPos fu, final int integer) {
        final BlockState cfj5 = BaseFireBlock.getState(bqc, fu);
        if (cfj5.is(Blocks.FIRE)) {
            return ((StateHolder<O, BlockState>)cfj5).<Comparable, Integer>setValue((Property<Comparable>)FireBlock.AGE, integer);
        }
        return cfj5;
    }
    
    private boolean isValidFireLocation(final BlockGetter bpg, final BlockPos fu) {
        for (final Direction fz7 : Direction.values()) {
            if (this.canBurn(bpg.getBlockState(fu.relative(fz7)))) {
                return true;
            }
        }
        return false;
    }
    
    private int getFireOdds(final LevelReader bqd, final BlockPos fu) {
        if (!bqd.isEmptyBlock(fu)) {
            return 0;
        }
        int integer4 = 0;
        for (final Direction fz8 : Direction.values()) {
            final BlockState cfj9 = bqd.getBlockState(fu.relative(fz8));
            integer4 = Math.max(this.getFlameOdds(cfj9), integer4);
        }
        return integer4;
    }
    
    @Override
    protected boolean canBurn(final BlockState cfj) {
        return this.getFlameOdds(cfj) > 0;
    }
    
    @Override
    public void onPlace(final BlockState cfj1, final Level bqb, final BlockPos fu, final BlockState cfj4, final boolean boolean5) {
        super.onPlace(cfj1, bqb, fu, cfj4, boolean5);
        bqb.getBlockTicks().scheduleTick(fu, this, getFireTickDelay(bqb.random));
    }
    
    private static int getFireTickDelay(final Random random) {
        return 30 + random.nextInt(10);
    }
    
    @Override
    protected void createBlockStateDefinition(final StateDefinition.Builder<Block, BlockState> a) {
        a.add(FireBlock.AGE, FireBlock.NORTH, FireBlock.EAST, FireBlock.SOUTH, FireBlock.WEST, FireBlock.UP);
    }
    
    private void setFlammable(final Block bvr, final int integer2, final int integer3) {
        this.flameOdds.put(bvr, integer2);
        this.burnOdds.put(bvr, integer3);
    }
    
    public static void bootStrap() {
        final FireBlock bxv1 = (FireBlock)Blocks.FIRE;
        bxv1.setFlammable(Blocks.OAK_PLANKS, 5, 20);
        bxv1.setFlammable(Blocks.SPRUCE_PLANKS, 5, 20);
        bxv1.setFlammable(Blocks.BIRCH_PLANKS, 5, 20);
        bxv1.setFlammable(Blocks.JUNGLE_PLANKS, 5, 20);
        bxv1.setFlammable(Blocks.ACACIA_PLANKS, 5, 20);
        bxv1.setFlammable(Blocks.DARK_OAK_PLANKS, 5, 20);
        bxv1.setFlammable(Blocks.OAK_SLAB, 5, 20);
        bxv1.setFlammable(Blocks.SPRUCE_SLAB, 5, 20);
        bxv1.setFlammable(Blocks.BIRCH_SLAB, 5, 20);
        bxv1.setFlammable(Blocks.JUNGLE_SLAB, 5, 20);
        bxv1.setFlammable(Blocks.ACACIA_SLAB, 5, 20);
        bxv1.setFlammable(Blocks.DARK_OAK_SLAB, 5, 20);
        bxv1.setFlammable(Blocks.OAK_FENCE_GATE, 5, 20);
        bxv1.setFlammable(Blocks.SPRUCE_FENCE_GATE, 5, 20);
        bxv1.setFlammable(Blocks.BIRCH_FENCE_GATE, 5, 20);
        bxv1.setFlammable(Blocks.JUNGLE_FENCE_GATE, 5, 20);
        bxv1.setFlammable(Blocks.DARK_OAK_FENCE_GATE, 5, 20);
        bxv1.setFlammable(Blocks.ACACIA_FENCE_GATE, 5, 20);
        bxv1.setFlammable(Blocks.OAK_FENCE, 5, 20);
        bxv1.setFlammable(Blocks.SPRUCE_FENCE, 5, 20);
        bxv1.setFlammable(Blocks.BIRCH_FENCE, 5, 20);
        bxv1.setFlammable(Blocks.JUNGLE_FENCE, 5, 20);
        bxv1.setFlammable(Blocks.DARK_OAK_FENCE, 5, 20);
        bxv1.setFlammable(Blocks.ACACIA_FENCE, 5, 20);
        bxv1.setFlammable(Blocks.OAK_STAIRS, 5, 20);
        bxv1.setFlammable(Blocks.BIRCH_STAIRS, 5, 20);
        bxv1.setFlammable(Blocks.SPRUCE_STAIRS, 5, 20);
        bxv1.setFlammable(Blocks.JUNGLE_STAIRS, 5, 20);
        bxv1.setFlammable(Blocks.ACACIA_STAIRS, 5, 20);
        bxv1.setFlammable(Blocks.DARK_OAK_STAIRS, 5, 20);
        bxv1.setFlammable(Blocks.OAK_LOG, 5, 5);
        bxv1.setFlammable(Blocks.SPRUCE_LOG, 5, 5);
        bxv1.setFlammable(Blocks.BIRCH_LOG, 5, 5);
        bxv1.setFlammable(Blocks.JUNGLE_LOG, 5, 5);
        bxv1.setFlammable(Blocks.ACACIA_LOG, 5, 5);
        bxv1.setFlammable(Blocks.DARK_OAK_LOG, 5, 5);
        bxv1.setFlammable(Blocks.STRIPPED_OAK_LOG, 5, 5);
        bxv1.setFlammable(Blocks.STRIPPED_SPRUCE_LOG, 5, 5);
        bxv1.setFlammable(Blocks.STRIPPED_BIRCH_LOG, 5, 5);
        bxv1.setFlammable(Blocks.STRIPPED_JUNGLE_LOG, 5, 5);
        bxv1.setFlammable(Blocks.STRIPPED_ACACIA_LOG, 5, 5);
        bxv1.setFlammable(Blocks.STRIPPED_DARK_OAK_LOG, 5, 5);
        bxv1.setFlammable(Blocks.STRIPPED_OAK_WOOD, 5, 5);
        bxv1.setFlammable(Blocks.STRIPPED_SPRUCE_WOOD, 5, 5);
        bxv1.setFlammable(Blocks.STRIPPED_BIRCH_WOOD, 5, 5);
        bxv1.setFlammable(Blocks.STRIPPED_JUNGLE_WOOD, 5, 5);
        bxv1.setFlammable(Blocks.STRIPPED_ACACIA_WOOD, 5, 5);
        bxv1.setFlammable(Blocks.STRIPPED_DARK_OAK_WOOD, 5, 5);
        bxv1.setFlammable(Blocks.OAK_WOOD, 5, 5);
        bxv1.setFlammable(Blocks.SPRUCE_WOOD, 5, 5);
        bxv1.setFlammable(Blocks.BIRCH_WOOD, 5, 5);
        bxv1.setFlammable(Blocks.JUNGLE_WOOD, 5, 5);
        bxv1.setFlammable(Blocks.ACACIA_WOOD, 5, 5);
        bxv1.setFlammable(Blocks.DARK_OAK_WOOD, 5, 5);
        bxv1.setFlammable(Blocks.OAK_LEAVES, 30, 60);
        bxv1.setFlammable(Blocks.SPRUCE_LEAVES, 30, 60);
        bxv1.setFlammable(Blocks.BIRCH_LEAVES, 30, 60);
        bxv1.setFlammable(Blocks.JUNGLE_LEAVES, 30, 60);
        bxv1.setFlammable(Blocks.ACACIA_LEAVES, 30, 60);
        bxv1.setFlammable(Blocks.DARK_OAK_LEAVES, 30, 60);
        bxv1.setFlammable(Blocks.BOOKSHELF, 30, 20);
        bxv1.setFlammable(Blocks.TNT, 15, 100);
        bxv1.setFlammable(Blocks.GRASS, 60, 100);
        bxv1.setFlammable(Blocks.FERN, 60, 100);
        bxv1.setFlammable(Blocks.DEAD_BUSH, 60, 100);
        bxv1.setFlammable(Blocks.SUNFLOWER, 60, 100);
        bxv1.setFlammable(Blocks.LILAC, 60, 100);
        bxv1.setFlammable(Blocks.ROSE_BUSH, 60, 100);
        bxv1.setFlammable(Blocks.PEONY, 60, 100);
        bxv1.setFlammable(Blocks.TALL_GRASS, 60, 100);
        bxv1.setFlammable(Blocks.LARGE_FERN, 60, 100);
        bxv1.setFlammable(Blocks.DANDELION, 60, 100);
        bxv1.setFlammable(Blocks.POPPY, 60, 100);
        bxv1.setFlammable(Blocks.BLUE_ORCHID, 60, 100);
        bxv1.setFlammable(Blocks.ALLIUM, 60, 100);
        bxv1.setFlammable(Blocks.AZURE_BLUET, 60, 100);
        bxv1.setFlammable(Blocks.RED_TULIP, 60, 100);
        bxv1.setFlammable(Blocks.ORANGE_TULIP, 60, 100);
        bxv1.setFlammable(Blocks.WHITE_TULIP, 60, 100);
        bxv1.setFlammable(Blocks.PINK_TULIP, 60, 100);
        bxv1.setFlammable(Blocks.OXEYE_DAISY, 60, 100);
        bxv1.setFlammable(Blocks.CORNFLOWER, 60, 100);
        bxv1.setFlammable(Blocks.LILY_OF_THE_VALLEY, 60, 100);
        bxv1.setFlammable(Blocks.WITHER_ROSE, 60, 100);
        bxv1.setFlammable(Blocks.WHITE_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.ORANGE_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.MAGENTA_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.LIGHT_BLUE_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.YELLOW_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.LIME_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.PINK_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.GRAY_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.LIGHT_GRAY_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.CYAN_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.PURPLE_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.BLUE_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.BROWN_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.GREEN_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.RED_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.BLACK_WOOL, 30, 60);
        bxv1.setFlammable(Blocks.VINE, 15, 100);
        bxv1.setFlammable(Blocks.COAL_BLOCK, 5, 5);
        bxv1.setFlammable(Blocks.HAY_BLOCK, 60, 20);
        bxv1.setFlammable(Blocks.TARGET, 15, 20);
        bxv1.setFlammable(Blocks.WHITE_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.ORANGE_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.MAGENTA_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.LIGHT_BLUE_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.YELLOW_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.LIME_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.PINK_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.GRAY_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.LIGHT_GRAY_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.CYAN_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.PURPLE_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.BLUE_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.BROWN_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.GREEN_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.RED_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.BLACK_CARPET, 60, 20);
        bxv1.setFlammable(Blocks.DRIED_KELP_BLOCK, 30, 60);
        bxv1.setFlammable(Blocks.BAMBOO, 60, 60);
        bxv1.setFlammable(Blocks.SCAFFOLDING, 60, 60);
        bxv1.setFlammable(Blocks.LECTERN, 30, 20);
        bxv1.setFlammable(Blocks.COMPOSTER, 5, 20);
        bxv1.setFlammable(Blocks.SWEET_BERRY_BUSH, 60, 100);
        bxv1.setFlammable(Blocks.BEEHIVE, 5, 20);
        bxv1.setFlammable(Blocks.BEE_NEST, 30, 20);
    }
    
    static {
        AGE = BlockStateProperties.AGE_15;
        NORTH = PipeBlock.NORTH;
        EAST = PipeBlock.EAST;
        SOUTH = PipeBlock.SOUTH;
        WEST = PipeBlock.WEST;
        UP = PipeBlock.UP;
        PROPERTY_BY_DIRECTION = PipeBlock.PROPERTY_BY_DIRECTION.entrySet().stream().filter(entry -> entry.getKey() != Direction.DOWN).collect(Util.<Direction, BooleanProperty>toMap());
    }
}
