459 lines
23 KiB
Java
459 lines
23 KiB
Java
package net.minecraft.world.level.block;
|
|
|
|
import net.minecraft.world.level.block.state.AbstractStateHolder;
|
|
import java.util.stream.Collector;
|
|
import net.minecraft.Util;
|
|
import net.minecraft.world.level.block.state.StateDefinition;
|
|
import net.minecraft.core.particles.ParticleOptions;
|
|
import net.minecraft.core.particles.ParticleTypes;
|
|
import net.minecraft.sounds.SoundSource;
|
|
import net.minecraft.sounds.SoundEvents;
|
|
import net.minecraft.world.level.dimension.DimensionType;
|
|
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.dimension.end.TheEndDimension;
|
|
import net.minecraft.world.level.GameRules;
|
|
import java.util.Random;
|
|
import net.minecraft.server.level.ServerLevel;
|
|
import javax.annotation.Nullable;
|
|
import net.minecraft.world.item.BlockPlaceContext;
|
|
import net.minecraft.world.level.LevelReader;
|
|
import net.minecraft.world.level.LevelAccessor;
|
|
import net.minecraft.world.phys.shapes.Shapes;
|
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
|
import net.minecraft.world.phys.shapes.CollisionContext;
|
|
import net.minecraft.core.BlockPos;
|
|
import net.minecraft.world.level.BlockGetter;
|
|
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 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 Block {
|
|
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;
|
|
|
|
protected FireBlock(final Properties c) {
|
|
super(c);
|
|
this.flameOdds = (Object2IntMap<Block>)new Object2IntOpenHashMap();
|
|
this.burnOdds = (Object2IntMap<Block>)new Object2IntOpenHashMap();
|
|
this.registerDefaultState((((((((AbstractStateHolder<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 VoxelShape getShape(final BlockState byg, final BlockGetter bjd, final BlockPos fk, final CollisionContext cvn) {
|
|
return Shapes.empty();
|
|
}
|
|
|
|
@Override
|
|
public BlockState updateShape(final BlockState byg1, final Direction fp, final BlockState byg3, final LevelAccessor bju, final BlockPos fk5, final BlockPos fk6) {
|
|
if (this.canSurvive(byg1, bju, fk5)) {
|
|
return ((AbstractStateHolder<O, BlockState>)this.getStateForPlacement(bju, fk5)).<Comparable, Comparable>setValue((Property<Comparable>)FireBlock.AGE, (Comparable)byg1.<V>getValue((Property<V>)FireBlock.AGE));
|
|
}
|
|
return Blocks.AIR.defaultBlockState();
|
|
}
|
|
|
|
@Nullable
|
|
@Override
|
|
public BlockState getStateForPlacement(final BlockPlaceContext bcn) {
|
|
return this.getStateForPlacement(bcn.getLevel(), bcn.getClickedPos());
|
|
}
|
|
|
|
public BlockState getStateForPlacement(final BlockGetter bjd, final BlockPos fk) {
|
|
final BlockPos fk2 = fk.below();
|
|
final BlockState byg5 = bjd.getBlockState(fk2);
|
|
if (this.canBurn(byg5) || byg5.isFaceSturdy(bjd, fk2, Direction.UP)) {
|
|
return this.defaultBlockState();
|
|
}
|
|
BlockState byg6 = this.defaultBlockState();
|
|
for (final Direction fp10 : Direction.values()) {
|
|
final BooleanProperty byy11 = FireBlock.PROPERTY_BY_DIRECTION.get(fp10);
|
|
if (byy11 != null) {
|
|
byg6 = ((AbstractStateHolder<O, BlockState>)byg6).<Comparable, Boolean>setValue((Property<Comparable>)byy11, this.canBurn(bjd.getBlockState(fk.relative(fp10))));
|
|
}
|
|
}
|
|
return byg6;
|
|
}
|
|
|
|
@Override
|
|
public boolean canSurvive(final BlockState byg, final LevelReader bjw, final BlockPos fk) {
|
|
final BlockPos fk2 = fk.below();
|
|
return bjw.getBlockState(fk2).isFaceSturdy(bjw, fk2, Direction.UP) || this.isValidFireLocation(bjw, fk);
|
|
}
|
|
|
|
@Override
|
|
public int getTickDelay(final LevelReader bjw) {
|
|
return 30;
|
|
}
|
|
|
|
@Override
|
|
public void tick(BlockState byg, final ServerLevel xd, final BlockPos fk, final Random random) {
|
|
if (!xd.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) {
|
|
return;
|
|
}
|
|
if (!byg.canSurvive(xd, fk)) {
|
|
xd.removeBlock(fk, false);
|
|
}
|
|
final Block bpe6 = xd.getBlockState(fk.below()).getBlock();
|
|
final boolean boolean7 = (xd.dimension instanceof TheEndDimension && bpe6 == Blocks.BEDROCK) || bpe6 == Blocks.NETHERRACK || bpe6 == Blocks.MAGMA_BLOCK;
|
|
final int integer8 = byg.<Integer>getValue((Property<Integer>)FireBlock.AGE);
|
|
if (!boolean7 && xd.isRaining() && this.isNearRain(xd, fk) && random.nextFloat() < 0.2f + integer8 * 0.03f) {
|
|
xd.removeBlock(fk, false);
|
|
return;
|
|
}
|
|
final int integer9 = Math.min(15, integer8 + random.nextInt(3) / 2);
|
|
if (integer8 != integer9) {
|
|
byg = ((AbstractStateHolder<O, BlockState>)byg).<Comparable, Integer>setValue((Property<Comparable>)FireBlock.AGE, integer9);
|
|
xd.setBlock(fk, byg, 4);
|
|
}
|
|
if (!boolean7) {
|
|
xd.getBlockTicks().scheduleTick(fk, this, this.getTickDelay(xd) + random.nextInt(10));
|
|
if (!this.isValidFireLocation(xd, fk)) {
|
|
final BlockPos fk2 = fk.below();
|
|
if (!xd.getBlockState(fk2).isFaceSturdy(xd, fk2, Direction.UP) || integer8 > 3) {
|
|
xd.removeBlock(fk, false);
|
|
}
|
|
return;
|
|
}
|
|
if (integer8 == 15 && random.nextInt(4) == 0 && !this.canBurn(xd.getBlockState(fk.below()))) {
|
|
xd.removeBlock(fk, false);
|
|
return;
|
|
}
|
|
}
|
|
final boolean boolean8 = xd.isHumidAt(fk);
|
|
final int integer10 = boolean8 ? -50 : 0;
|
|
this.checkBurnOut(xd, fk.east(), 300 + integer10, random, integer8);
|
|
this.checkBurnOut(xd, fk.west(), 300 + integer10, random, integer8);
|
|
this.checkBurnOut(xd, fk.below(), 250 + integer10, random, integer8);
|
|
this.checkBurnOut(xd, fk.above(), 250 + integer10, random, integer8);
|
|
this.checkBurnOut(xd, fk.north(), 300 + integer10, random, integer8);
|
|
this.checkBurnOut(xd, fk.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.set(fk).move(integer11, integer13, integer12);
|
|
final int integer15 = this.getFireOdds(xd, a12);
|
|
if (integer15 > 0) {
|
|
int integer16 = (integer15 + 40 + xd.getDifficulty().getId() * 7) / (integer8 + 30);
|
|
if (boolean8) {
|
|
integer16 /= 2;
|
|
}
|
|
if (integer16 > 0 && random.nextInt(integer14) <= integer16) {
|
|
if (!xd.isRaining() || !this.isNearRain(xd, a12)) {
|
|
final int integer17 = Math.min(15, integer8 + random.nextInt(5) / 4);
|
|
xd.setBlock(a12, ((AbstractStateHolder<O, BlockState>)this.getStateForPlacement(xd, a12)).<Comparable, Integer>setValue((Property<Comparable>)FireBlock.AGE, integer17), 3);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
protected boolean isNearRain(final Level bjt, final BlockPos fk) {
|
|
return bjt.isRainingAt(fk) || bjt.isRainingAt(fk.west()) || bjt.isRainingAt(fk.east()) || bjt.isRainingAt(fk.north()) || bjt.isRainingAt(fk.south());
|
|
}
|
|
|
|
private int getBurnOdd(final BlockState byg) {
|
|
if (byg.<Comparable>hasProperty((Property<Comparable>)BlockStateProperties.WATERLOGGED) && byg.<Boolean>getValue((Property<Boolean>)BlockStateProperties.WATERLOGGED)) {
|
|
return 0;
|
|
}
|
|
return this.burnOdds.getInt(byg.getBlock());
|
|
}
|
|
|
|
private int getFlameOdds(final BlockState byg) {
|
|
if (byg.<Comparable>hasProperty((Property<Comparable>)BlockStateProperties.WATERLOGGED) && byg.<Boolean>getValue((Property<Boolean>)BlockStateProperties.WATERLOGGED)) {
|
|
return 0;
|
|
}
|
|
return this.flameOdds.getInt(byg.getBlock());
|
|
}
|
|
|
|
private void checkBurnOut(final Level bjt, final BlockPos fk, final int integer3, final Random random, final int integer5) {
|
|
final int integer6 = this.getBurnOdd(bjt.getBlockState(fk));
|
|
if (random.nextInt(integer3) < integer6) {
|
|
final BlockState byg8 = bjt.getBlockState(fk);
|
|
if (random.nextInt(integer5 + 10) < 5 && !bjt.isRainingAt(fk)) {
|
|
final int integer7 = Math.min(integer5 + random.nextInt(5) / 4, 15);
|
|
bjt.setBlock(fk, ((AbstractStateHolder<O, BlockState>)this.getStateForPlacement(bjt, fk)).<Comparable, Integer>setValue((Property<Comparable>)FireBlock.AGE, integer7), 3);
|
|
}
|
|
else {
|
|
bjt.removeBlock(fk, false);
|
|
}
|
|
final Block bpe9 = byg8.getBlock();
|
|
if (bpe9 instanceof TntBlock) {
|
|
final TntBlock tntBlock = (TntBlock)bpe9;
|
|
TntBlock.explode(bjt, fk);
|
|
}
|
|
}
|
|
}
|
|
|
|
private boolean isValidFireLocation(final BlockGetter bjd, final BlockPos fk) {
|
|
for (final Direction fp7 : Direction.values()) {
|
|
if (this.canBurn(bjd.getBlockState(fk.relative(fp7)))) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
private int getFireOdds(final LevelReader bjw, final BlockPos fk) {
|
|
if (!bjw.isEmptyBlock(fk)) {
|
|
return 0;
|
|
}
|
|
int integer4 = 0;
|
|
for (final Direction fp8 : Direction.values()) {
|
|
final BlockState byg9 = bjw.getBlockState(fk.relative(fp8));
|
|
integer4 = Math.max(this.getFlameOdds(byg9), integer4);
|
|
}
|
|
return integer4;
|
|
}
|
|
|
|
public boolean canBurn(final BlockState byg) {
|
|
return this.getFlameOdds(byg) > 0;
|
|
}
|
|
|
|
@Override
|
|
public void onPlace(final BlockState byg1, final Level bjt, final BlockPos fk, final BlockState byg4, final boolean boolean5) {
|
|
if (byg4.getBlock() == byg1.getBlock()) {
|
|
return;
|
|
}
|
|
if ((bjt.dimension.getType() == DimensionType.OVERWORLD || bjt.dimension.getType() == DimensionType.NETHER) && ((NetherPortalBlock)Blocks.NETHER_PORTAL).trySpawnPortal(bjt, fk)) {
|
|
return;
|
|
}
|
|
if (!byg1.canSurvive(bjt, fk)) {
|
|
bjt.removeBlock(fk, false);
|
|
return;
|
|
}
|
|
bjt.getBlockTicks().scheduleTick(fk, this, this.getTickDelay(bjt) + bjt.random.nextInt(10));
|
|
}
|
|
|
|
@Override
|
|
public void animateTick(final BlockState byg, final Level bjt, final BlockPos fk, final Random random) {
|
|
if (random.nextInt(24) == 0) {
|
|
bjt.playLocalSound(fk.getX() + 0.5f, fk.getY() + 0.5f, fk.getZ() + 0.5f, SoundEvents.FIRE_AMBIENT, SoundSource.BLOCKS, 1.0f + random.nextFloat(), random.nextFloat() * 0.7f + 0.3f, false);
|
|
}
|
|
final BlockPos fk2 = fk.below();
|
|
final BlockState byg2 = bjt.getBlockState(fk2);
|
|
if (this.canBurn(byg2) || byg2.isFaceSturdy(bjt, fk2, Direction.UP)) {
|
|
for (int integer8 = 0; integer8 < 3; ++integer8) {
|
|
final double double9 = fk.getX() + random.nextDouble();
|
|
final double double10 = fk.getY() + random.nextDouble() * 0.5 + 0.5;
|
|
final double double11 = fk.getZ() + random.nextDouble();
|
|
bjt.addParticle(ParticleTypes.LARGE_SMOKE, double9, double10, double11, 0.0, 0.0, 0.0);
|
|
}
|
|
}
|
|
else {
|
|
if (this.canBurn(bjt.getBlockState(fk.west()))) {
|
|
for (int integer8 = 0; integer8 < 2; ++integer8) {
|
|
final double double9 = fk.getX() + random.nextDouble() * 0.10000000149011612;
|
|
final double double10 = fk.getY() + random.nextDouble();
|
|
final double double11 = fk.getZ() + random.nextDouble();
|
|
bjt.addParticle(ParticleTypes.LARGE_SMOKE, double9, double10, double11, 0.0, 0.0, 0.0);
|
|
}
|
|
}
|
|
if (this.canBurn(bjt.getBlockState(fk.east()))) {
|
|
for (int integer8 = 0; integer8 < 2; ++integer8) {
|
|
final double double9 = fk.getX() + 1 - random.nextDouble() * 0.10000000149011612;
|
|
final double double10 = fk.getY() + random.nextDouble();
|
|
final double double11 = fk.getZ() + random.nextDouble();
|
|
bjt.addParticle(ParticleTypes.LARGE_SMOKE, double9, double10, double11, 0.0, 0.0, 0.0);
|
|
}
|
|
}
|
|
if (this.canBurn(bjt.getBlockState(fk.north()))) {
|
|
for (int integer8 = 0; integer8 < 2; ++integer8) {
|
|
final double double9 = fk.getX() + random.nextDouble();
|
|
final double double10 = fk.getY() + random.nextDouble();
|
|
final double double11 = fk.getZ() + random.nextDouble() * 0.10000000149011612;
|
|
bjt.addParticle(ParticleTypes.LARGE_SMOKE, double9, double10, double11, 0.0, 0.0, 0.0);
|
|
}
|
|
}
|
|
if (this.canBurn(bjt.getBlockState(fk.south()))) {
|
|
for (int integer8 = 0; integer8 < 2; ++integer8) {
|
|
final double double9 = fk.getX() + random.nextDouble();
|
|
final double double10 = fk.getY() + random.nextDouble();
|
|
final double double11 = fk.getZ() + 1 - random.nextDouble() * 0.10000000149011612;
|
|
bjt.addParticle(ParticleTypes.LARGE_SMOKE, double9, double10, double11, 0.0, 0.0, 0.0);
|
|
}
|
|
}
|
|
if (this.canBurn(bjt.getBlockState(fk.above()))) {
|
|
for (int integer8 = 0; integer8 < 2; ++integer8) {
|
|
final double double9 = fk.getX() + random.nextDouble();
|
|
final double double10 = fk.getY() + 1 - random.nextDouble() * 0.10000000149011612;
|
|
final double double11 = fk.getZ() + random.nextDouble();
|
|
bjt.addParticle(ParticleTypes.LARGE_SMOKE, double9, double10, double11, 0.0, 0.0, 0.0);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@Override
|
|
protected void createBlockStateDefinition(final StateDefinition.Builder<Block, BlockState> a) {
|
|
a.add(FireBlock.AGE, FireBlock.NORTH, FireBlock.EAST, FireBlock.SOUTH, FireBlock.WEST, FireBlock.UP);
|
|
}
|
|
|
|
public void setFlammable(final Block bpe, final int integer2, final int integer3) {
|
|
this.flameOdds.put(bpe, integer2);
|
|
this.burnOdds.put(bpe, integer3);
|
|
}
|
|
|
|
public static void bootStrap() {
|
|
final FireBlock brg1 = (FireBlock)Blocks.FIRE;
|
|
brg1.setFlammable(Blocks.OAK_PLANKS, 5, 20);
|
|
brg1.setFlammable(Blocks.SPRUCE_PLANKS, 5, 20);
|
|
brg1.setFlammable(Blocks.BIRCH_PLANKS, 5, 20);
|
|
brg1.setFlammable(Blocks.JUNGLE_PLANKS, 5, 20);
|
|
brg1.setFlammable(Blocks.ACACIA_PLANKS, 5, 20);
|
|
brg1.setFlammable(Blocks.DARK_OAK_PLANKS, 5, 20);
|
|
brg1.setFlammable(Blocks.OAK_SLAB, 5, 20);
|
|
brg1.setFlammable(Blocks.SPRUCE_SLAB, 5, 20);
|
|
brg1.setFlammable(Blocks.BIRCH_SLAB, 5, 20);
|
|
brg1.setFlammable(Blocks.JUNGLE_SLAB, 5, 20);
|
|
brg1.setFlammable(Blocks.ACACIA_SLAB, 5, 20);
|
|
brg1.setFlammable(Blocks.DARK_OAK_SLAB, 5, 20);
|
|
brg1.setFlammable(Blocks.OAK_FENCE_GATE, 5, 20);
|
|
brg1.setFlammable(Blocks.SPRUCE_FENCE_GATE, 5, 20);
|
|
brg1.setFlammable(Blocks.BIRCH_FENCE_GATE, 5, 20);
|
|
brg1.setFlammable(Blocks.JUNGLE_FENCE_GATE, 5, 20);
|
|
brg1.setFlammable(Blocks.DARK_OAK_FENCE_GATE, 5, 20);
|
|
brg1.setFlammable(Blocks.ACACIA_FENCE_GATE, 5, 20);
|
|
brg1.setFlammable(Blocks.OAK_FENCE, 5, 20);
|
|
brg1.setFlammable(Blocks.SPRUCE_FENCE, 5, 20);
|
|
brg1.setFlammable(Blocks.BIRCH_FENCE, 5, 20);
|
|
brg1.setFlammable(Blocks.JUNGLE_FENCE, 5, 20);
|
|
brg1.setFlammable(Blocks.DARK_OAK_FENCE, 5, 20);
|
|
brg1.setFlammable(Blocks.ACACIA_FENCE, 5, 20);
|
|
brg1.setFlammable(Blocks.OAK_STAIRS, 5, 20);
|
|
brg1.setFlammable(Blocks.BIRCH_STAIRS, 5, 20);
|
|
brg1.setFlammable(Blocks.SPRUCE_STAIRS, 5, 20);
|
|
brg1.setFlammable(Blocks.JUNGLE_STAIRS, 5, 20);
|
|
brg1.setFlammable(Blocks.ACACIA_STAIRS, 5, 20);
|
|
brg1.setFlammable(Blocks.DARK_OAK_STAIRS, 5, 20);
|
|
brg1.setFlammable(Blocks.OAK_LOG, 5, 5);
|
|
brg1.setFlammable(Blocks.SPRUCE_LOG, 5, 5);
|
|
brg1.setFlammable(Blocks.BIRCH_LOG, 5, 5);
|
|
brg1.setFlammable(Blocks.JUNGLE_LOG, 5, 5);
|
|
brg1.setFlammable(Blocks.ACACIA_LOG, 5, 5);
|
|
brg1.setFlammable(Blocks.DARK_OAK_LOG, 5, 5);
|
|
brg1.setFlammable(Blocks.STRIPPED_OAK_LOG, 5, 5);
|
|
brg1.setFlammable(Blocks.STRIPPED_SPRUCE_LOG, 5, 5);
|
|
brg1.setFlammable(Blocks.STRIPPED_BIRCH_LOG, 5, 5);
|
|
brg1.setFlammable(Blocks.STRIPPED_JUNGLE_LOG, 5, 5);
|
|
brg1.setFlammable(Blocks.STRIPPED_ACACIA_LOG, 5, 5);
|
|
brg1.setFlammable(Blocks.STRIPPED_DARK_OAK_LOG, 5, 5);
|
|
brg1.setFlammable(Blocks.STRIPPED_OAK_WOOD, 5, 5);
|
|
brg1.setFlammable(Blocks.STRIPPED_SPRUCE_WOOD, 5, 5);
|
|
brg1.setFlammable(Blocks.STRIPPED_BIRCH_WOOD, 5, 5);
|
|
brg1.setFlammable(Blocks.STRIPPED_JUNGLE_WOOD, 5, 5);
|
|
brg1.setFlammable(Blocks.STRIPPED_ACACIA_WOOD, 5, 5);
|
|
brg1.setFlammable(Blocks.STRIPPED_DARK_OAK_WOOD, 5, 5);
|
|
brg1.setFlammable(Blocks.OAK_WOOD, 5, 5);
|
|
brg1.setFlammable(Blocks.SPRUCE_WOOD, 5, 5);
|
|
brg1.setFlammable(Blocks.BIRCH_WOOD, 5, 5);
|
|
brg1.setFlammable(Blocks.JUNGLE_WOOD, 5, 5);
|
|
brg1.setFlammable(Blocks.ACACIA_WOOD, 5, 5);
|
|
brg1.setFlammable(Blocks.DARK_OAK_WOOD, 5, 5);
|
|
brg1.setFlammable(Blocks.OAK_LEAVES, 30, 60);
|
|
brg1.setFlammable(Blocks.SPRUCE_LEAVES, 30, 60);
|
|
brg1.setFlammable(Blocks.BIRCH_LEAVES, 30, 60);
|
|
brg1.setFlammable(Blocks.JUNGLE_LEAVES, 30, 60);
|
|
brg1.setFlammable(Blocks.ACACIA_LEAVES, 30, 60);
|
|
brg1.setFlammable(Blocks.DARK_OAK_LEAVES, 30, 60);
|
|
brg1.setFlammable(Blocks.BOOKSHELF, 30, 20);
|
|
brg1.setFlammable(Blocks.TNT, 15, 100);
|
|
brg1.setFlammable(Blocks.GRASS, 60, 100);
|
|
brg1.setFlammable(Blocks.FERN, 60, 100);
|
|
brg1.setFlammable(Blocks.DEAD_BUSH, 60, 100);
|
|
brg1.setFlammable(Blocks.SUNFLOWER, 60, 100);
|
|
brg1.setFlammable(Blocks.LILAC, 60, 100);
|
|
brg1.setFlammable(Blocks.ROSE_BUSH, 60, 100);
|
|
brg1.setFlammable(Blocks.PEONY, 60, 100);
|
|
brg1.setFlammable(Blocks.TALL_GRASS, 60, 100);
|
|
brg1.setFlammable(Blocks.LARGE_FERN, 60, 100);
|
|
brg1.setFlammable(Blocks.DANDELION, 60, 100);
|
|
brg1.setFlammable(Blocks.POPPY, 60, 100);
|
|
brg1.setFlammable(Blocks.BLUE_ORCHID, 60, 100);
|
|
brg1.setFlammable(Blocks.ALLIUM, 60, 100);
|
|
brg1.setFlammable(Blocks.AZURE_BLUET, 60, 100);
|
|
brg1.setFlammable(Blocks.RED_TULIP, 60, 100);
|
|
brg1.setFlammable(Blocks.ORANGE_TULIP, 60, 100);
|
|
brg1.setFlammable(Blocks.WHITE_TULIP, 60, 100);
|
|
brg1.setFlammable(Blocks.PINK_TULIP, 60, 100);
|
|
brg1.setFlammable(Blocks.OXEYE_DAISY, 60, 100);
|
|
brg1.setFlammable(Blocks.CORNFLOWER, 60, 100);
|
|
brg1.setFlammable(Blocks.LILY_OF_THE_VALLEY, 60, 100);
|
|
brg1.setFlammable(Blocks.WITHER_ROSE, 60, 100);
|
|
brg1.setFlammable(Blocks.WHITE_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.ORANGE_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.MAGENTA_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.LIGHT_BLUE_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.YELLOW_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.LIME_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.PINK_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.GRAY_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.LIGHT_GRAY_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.CYAN_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.PURPLE_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.BLUE_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.BROWN_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.GREEN_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.RED_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.BLACK_WOOL, 30, 60);
|
|
brg1.setFlammable(Blocks.VINE, 15, 100);
|
|
brg1.setFlammable(Blocks.COAL_BLOCK, 5, 5);
|
|
brg1.setFlammable(Blocks.HAY_BLOCK, 60, 20);
|
|
brg1.setFlammable(Blocks.WHITE_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.ORANGE_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.MAGENTA_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.LIGHT_BLUE_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.YELLOW_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.LIME_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.PINK_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.GRAY_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.LIGHT_GRAY_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.CYAN_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.PURPLE_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.BLUE_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.BROWN_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.GREEN_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.RED_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.BLACK_CARPET, 60, 20);
|
|
brg1.setFlammable(Blocks.DRIED_KELP_BLOCK, 30, 60);
|
|
brg1.setFlammable(Blocks.BAMBOO, 60, 60);
|
|
brg1.setFlammable(Blocks.SCAFFOLDING, 60, 60);
|
|
brg1.setFlammable(Blocks.LECTERN, 30, 20);
|
|
brg1.setFlammable(Blocks.COMPOSTER, 5, 20);
|
|
brg1.setFlammable(Blocks.SWEET_BERRY_BUSH, 60, 100);
|
|
brg1.setFlammable(Blocks.BEEHIVE, 5, 20);
|
|
brg1.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());
|
|
}
|
|
}
|