| 1 | package net.minecraft.world.level.block;
|
| 2 |
|
| 3 | import it.unimi.dsi.fastutil.objects.Object2IntMap;
|
| 4 | import it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap;
|
| 5 | import java.util.Map;
|
| 6 | import java.util.Map.Entry;
|
| 7 | import java.util.function.Function;
|
| 8 | import net.minecraft.core.BlockPos;
|
| 9 | import net.minecraft.core.Direction;
|
| 10 | import net.minecraft.server.level.ServerLevel;
|
| 11 | import net.minecraft.util.RandomSource;
|
| 12 | import net.minecraft.util.Util;
|
| 13 | import net.minecraft.world.attribute.EnvironmentAttributes;
|
| 14 | import net.minecraft.world.item.context.BlockPlaceContext;
|
| 15 | import net.minecraft.world.level.BlockGetter;
|
| 16 | import net.minecraft.world.level.Level;
|
| 17 | import net.minecraft.world.level.LevelReader;
|
| 18 | import net.minecraft.world.level.ScheduledTickAccess;
|
| 19 | import net.minecraft.world.level.block.state.BlockBehaviour;
|
| 20 | import net.minecraft.world.level.block.state.BlockState;
|
| 21 | import net.minecraft.world.level.block.state.StateDefinition;
|
| 22 | import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
| 23 | import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
| 24 | import net.minecraft.world.level.block.state.properties.IntegerProperty;
|
| 25 | import net.minecraft.world.phys.shapes.CollisionContext;
|
| 26 | import net.minecraft.world.phys.shapes.Shapes;
|
| 27 | import net.minecraft.world.phys.shapes.VoxelShape;
|
| 28 |
|
| 29 | public class FireBlock extends BaseFireBlock {
|
| 30 | public static final int MAX_AGE = 15;
|
| 31 | public static final IntegerProperty AGE = BlockStateProperties.AGE_15;
|
| 32 | public static final BooleanProperty NORTH = PipeBlock.NORTH;
|
| 33 | public static final BooleanProperty EAST = PipeBlock.EAST;
|
| 34 | public static final BooleanProperty SOUTH = PipeBlock.SOUTH;
|
| 35 | public static final BooleanProperty WEST = PipeBlock.WEST;
|
| 36 | public static final BooleanProperty UP = PipeBlock.UP;
|
| 37 | public static final Map<Direction, BooleanProperty> PROPERTY_BY_DIRECTION = PipeBlock.PROPERTY_BY_DIRECTION
|
| 38 | .entrySet()
|
| 39 | .stream()
|
| 40 | .filter(e -> e.getKey() != Direction.DOWN)
|
| 41 | .collect(Util.toMap());
|
| 42 | private final Function<BlockState, VoxelShape> shapes;
|
| 43 | private static final int IGNITE_INSTANT = 60;
|
| 44 | private static final int IGNITE_EASY = 30;
|
| 45 | private static final int IGNITE_MEDIUM = 15;
|
| 46 | private static final int IGNITE_HARD = 5;
|
| 47 | private static final int BURN_INSTANT = 100;
|
| 48 | private static final int BURN_EASY = 60;
|
| 49 | private static final int BURN_MEDIUM = 20;
|
| 50 | private static final int BURN_HARD = 5;
|
| 51 | private final Object2IntMap<Block> igniteOdds = new Object2IntOpenHashMap<>();
|
| 52 | private final Object2IntMap<Block> burnOdds = new Object2IntOpenHashMap<>();
|
| 53 |
|
| 54 | public FireBlock(final BlockBehaviour.Properties properties) {
|
| 55 | super(properties, 1.0F);
|
| 56 | this.registerDefaultState(
|
| 57 | this.stateDefinition.any().setValue(AGE, 0).setValue(NORTH, false).setValue(EAST, false).setValue(SOUTH, false).setValue(WEST, false).setValue(UP, false)
|
| 58 | );
|
| 59 | this.shapes = this.makeShapes();
|
| 60 | }
|
| 61 |
|
| 62 | private Function<BlockState, VoxelShape> makeShapes() {
|
| 63 | Map<Direction, VoxelShape> shapes = Shapes.rotateAll(Block.boxZ(16.0, 0.0, 1.0));
|
| 64 | return this.getShapeForEachState(state -> {
|
| 65 | VoxelShape shape = Shapes.empty();
|
| 66 |
|
| 67 | for (Entry<Direction, BooleanProperty> entry : PROPERTY_BY_DIRECTION.entrySet()) {
|
| 68 | if (state.getValue(entry.getValue())) {
|
| 69 | shape = Shapes.or(shape, shapes.get(entry.getKey()));
|
| 70 | }
|
| 71 | }
|
| 72 |
|
| 73 | return shape.isEmpty() ? SHAPE : shape;
|
| 74 | }, AGE);
|
| 75 | }
|
| 76 |
|
| 77 | @Override
|
| 78 | protected BlockState updateShape(
|
| 79 | final BlockState state,
|
| 80 | final LevelReader level,
|
| 81 | final ScheduledTickAccess ticks,
|
| 82 | final BlockPos pos,
|
| 83 | final Direction directionToNeighbour,
|
| 84 | final BlockPos neighbourPos,
|
| 85 | final BlockState neighbourState,
|
| 86 | final RandomSource random
|
| 87 | ) {
|
| 88 | return this.canSurvive(state, level, pos) ? this.getStateWithAge(level, pos, state.getValue(AGE)) : Blocks.AIR.defaultBlockState();
|
| 89 | }
|
| 90 |
|
| 91 | @Override
|
| 92 | protected VoxelShape getShape(final BlockState state, final BlockGetter level, final BlockPos pos, final CollisionContext context) {
|
| 93 | return this.shapes.apply(state);
|
| 94 | }
|
| 95 |
|
| 96 | @Override
|
| 97 | public BlockState getStateForPlacement(final BlockPlaceContext context) {
|
| 98 | return this.getStateForPlacement(context.getLevel(), context.getClickedPos());
|
| 99 | }
|
| 100 |
|
| 101 | protected BlockState getStateForPlacement(final BlockGetter level, final BlockPos pos) {
|
| 102 | BlockPos below = pos.below();
|
| 103 | BlockState belowState = level.getBlockState(below);
|
| 104 | if (!this.canBurn(belowState) && !belowState.isFaceSturdy(level, below, Direction.UP)) {
|
| 105 | BlockState result = this.defaultBlockState();
|
| 106 |
|
| 107 | for (Direction direction : Direction.values()) {
|
| 108 | BooleanProperty property = PROPERTY_BY_DIRECTION.get(direction);
|
| 109 | if (property != null) {
|
| 110 | result = result.setValue(property, this.canBurn(level.getBlockState(pos.relative(direction))));
|
| 111 | }
|
| 112 | }
|
| 113 |
|
| 114 | return result;
|
| 115 | } else {
|
| 116 | return this.defaultBlockState();
|
| 117 | }
|
| 118 | }
|
| 119 |
|
| 120 | @Override
|
| 121 | protected boolean canSurvive(final BlockState state, final LevelReader level, final BlockPos pos) {
|
| 122 | BlockPos below = pos.below();
|
| 123 | return level.getBlockState(below).isFaceSturdy(level, below, Direction.UP) || this.isValidFireLocation(level, pos);
|
| 124 | }
|
| 125 |
|
| 126 | @Override
|
| 127 | protected void tick(BlockState state, final ServerLevel level, final BlockPos pos, final RandomSource random) {
|
| 128 | level.scheduleTick(pos, this, getFireTickDelay(level.getRandom()));
|
| 129 | if (level.canSpreadFireAround(pos)) {
|
| 130 | if (!state.canSurvive(level, pos)) {
|
| 131 | level.removeBlock(pos, false);
|
| 132 | }
|
| 133 |
|
| 134 | BlockState belowState = level.getBlockState(pos.below());
|
| 135 | boolean infiniBurn = belowState.is(level.dimensionType().infiniburn());
|
| 136 | int age = state.getValue(AGE);
|
| 137 | if (!infiniBurn && level.isRaining() && this.isNearRain(level, pos) && random.nextFloat() < 0.2F + age * 0.03F) {
|
| 138 | level.removeBlock(pos, false);
|
| 139 | } else {
|
| 140 | int newAge = Math.min(15, age + random.nextInt(3) / 2);
|
| 141 | if (age != newAge) {
|
| 142 | state = state.setValue(AGE, newAge);
|
| 143 | level.setBlock(pos, state, 260);
|
| 144 | }
|
| 145 |
|
| 146 | if (!infiniBurn) {
|
| 147 | if (!this.isValidFireLocation(level, pos)) {
|
| 148 | BlockPos below = pos.below();
|
| 149 | if (!level.getBlockState(below).isFaceSturdy(level, below, Direction.UP) || age > 3) {
|
| 150 | level.removeBlock(pos, false);
|
| 151 | }
|
| 152 |
|
| 153 | return;
|
| 154 | }
|
| 155 |
|
| 156 | if (age == 15 && random.nextInt(4) == 0 && !this.canBurn(level.getBlockState(pos.below()))) {
|
| 157 | level.removeBlock(pos, false);
|
| 158 | return;
|
| 159 | }
|
| 160 | }
|
| 161 |
|
| 162 | boolean increasedBurnout = level.environmentAttributes().getValue(EnvironmentAttributes.INCREASED_FIRE_BURNOUT, pos);
|
| 163 | int extra = increasedBurnout ? -50 : 0;
|
| 164 | this.checkBurnOut(level, pos.east(), 300 + extra, random, age);
|
| 165 | this.checkBurnOut(level, pos.west(), 300 + extra, random, age);
|
| 166 | this.checkBurnOut(level, pos.below(), 250 + extra, random, age);
|
| 167 | this.checkBurnOut(level, pos.above(), 250 + extra, random, age);
|
| 168 | this.checkBurnOut(level, pos.north(), 300 + extra, random, age);
|
| 169 | this.checkBurnOut(level, pos.south(), 300 + extra, random, age);
|
| 170 | BlockPos.MutableBlockPos testPos = new BlockPos.MutableBlockPos();
|
| 171 |
|
| 172 | for (int xx = -1; xx <= 1; xx++) {
|
| 173 | for (int zz = -1; zz <= 1; zz++) {
|
| 174 | for (int yy = -1; yy <= 4; yy++) {
|
| 175 | if (xx != 0 || yy != 0 || zz != 0) {
|
| 176 | int rate = 100;
|
| 177 | if (yy > 1) {
|
| 178 | rate += (yy - 1) * 100;
|
| 179 | }
|
| 180 |
|
| 181 | testPos.setWithOffset(pos, xx, yy, zz);
|
| 182 | int igniteOdds = this.getIgniteOdds(level, testPos);
|
| 183 | if (igniteOdds > 0) {
|
| 184 | int odds = (igniteOdds + 40 + level.getDifficulty().getId() * 7) / (age + 30);
|
| 185 | if (increasedBurnout) {
|
| 186 | odds /= 2;
|
| 187 | }
|
| 188 |
|
| 189 | if (odds > 0 && random.nextInt(rate) <= odds && (!level.isRaining() || !this.isNearRain(level, testPos))) {
|
| 190 | int spreadAge = Math.min(15, age + random.nextInt(5) / 4);
|
| 191 | level.setBlockAndUpdate(testPos, this.getStateWithAge(level, testPos, spreadAge));
|
| 192 | }
|
| 193 | }
|
| 194 | }
|
| 195 | }
|
| 196 | }
|
| 197 | }
|
| 198 | }
|
| 199 | }
|
| 200 | }
|
| 201 |
|
| 202 | protected boolean isNearRain(final Level level, final BlockPos testPos) {
|
| 203 | return level.isRainingAt(testPos)
|
| 204 | || level.isRainingAt(testPos.west())
|
| 205 | || level.isRainingAt(testPos.east())
|
| 206 | || level.isRainingAt(testPos.north())
|
| 207 | || level.isRainingAt(testPos.south());
|
| 208 | }
|
| 209 |
|
| 210 | private int getBurnOdds(final BlockState state) {
|
| 211 | return state.hasProperty(BlockStateProperties.WATERLOGGED) && state.getValue(BlockStateProperties.WATERLOGGED) ? 0 : this.burnOdds.getInt(state.getBlock());
|
| 212 | }
|
| 213 |
|
| 214 | private int getIgniteOdds(final BlockState state) {
|
| 215 | return state.hasProperty(BlockStateProperties.WATERLOGGED) && state.getValue(BlockStateProperties.WATERLOGGED) ? 0 : this.igniteOdds.getInt(state.getBlock());
|
| 216 | }
|
| 217 |
|
| 218 | private void checkBurnOut(final Level level, final BlockPos pos, final int chance, final RandomSource random, final int age) {
|
| 219 | int odds = this.getBurnOdds(level.getBlockState(pos));
|
| 220 | if (random.nextInt(chance) < odds) {
|
| 221 | BlockState oldState = level.getBlockState(pos);
|
| 222 | if (random.nextInt(age + 10) < 5 && !level.isRainingAt(pos)) {
|
| 223 | int newAge = Math.min(age + random.nextInt(5) / 4, 15);
|
| 224 | level.setBlockAndUpdate(pos, this.getStateWithAge(level, pos, newAge));
|
| 225 | } else {
|
| 226 | level.removeBlock(pos, false);
|
| 227 | }
|
| 228 |
|
| 229 | Block block = oldState.getBlock();
|
| 230 | if (block instanceof TntBlock) {
|
| 231 | TntBlock.prime(level, pos);
|
| 232 | }
|
| 233 | }
|
| 234 | }
|
| 235 |
|
| 236 | private BlockState getStateWithAge(final LevelReader level, final BlockPos pos, final int age) {
|
| 237 | BlockState stateForPlacement = getState(level, pos);
|
| 238 | return stateForPlacement.is(Blocks.FIRE) ? stateForPlacement.setValue(AGE, age) : stateForPlacement;
|
| 239 | }
|
| 240 |
|
| 241 | private boolean isValidFireLocation(final BlockGetter level, final BlockPos pos) {
|
| 242 | for (Direction direction : Direction.values()) {
|
| 243 | if (this.canBurn(level.getBlockState(pos.relative(direction)))) {
|
| 244 | return true;
|
| 245 | }
|
| 246 | }
|
| 247 |
|
| 248 | return false;
|
| 249 | }
|
| 250 |
|
| 251 | private int getIgniteOdds(final LevelReader level, final BlockPos pos) {
|
| 252 | if (!level.isEmptyBlock(pos)) {
|
| 253 | return 0;
|
| 254 | }
|
| 255 |
|
| 256 | int odds = 0;
|
| 257 |
|
| 258 | for (Direction direction : Direction.values()) {
|
| 259 | BlockState blockState = level.getBlockState(pos.relative(direction));
|
| 260 | odds = Math.max(this.getIgniteOdds(blockState), odds);
|
| 261 | }
|
| 262 |
|
| 263 | return odds;
|
| 264 | }
|
| 265 |
|
| 266 | @Override
|
| 267 | protected boolean canBurn(final BlockState state) {
|
| 268 | return this.getIgniteOdds(state) > 0;
|
| 269 | }
|
| 270 |
|
| 271 | @Override
|
| 272 | protected void onPlace(final BlockState state, final Level level, final BlockPos pos, final BlockState oldState, final boolean movedByPiston) {
|
| 273 | super.onPlace(state, level, pos, oldState, movedByPiston);
|
| 274 | level.scheduleTick(pos, this, getFireTickDelay(level.getRandom()));
|
| 275 | }
|
| 276 |
|
| 277 | private static int getFireTickDelay(final RandomSource random) {
|
| 278 | return 30 + random.nextInt(10);
|
| 279 | }
|
| 280 |
|
| 281 | @Override
|
| 282 | protected void createBlockStateDefinition(final StateDefinition.Builder<Block, BlockState> builder) {
|
| 283 | builder.add(AGE, NORTH, EAST, SOUTH, WEST, UP);
|
| 284 | }
|
| 285 |
|
| 286 | private void setFlammable(final Block block, final int igniteOdds, final int burnOdds) {
|
| 287 | this.igniteOdds.put(block, igniteOdds);
|
| 288 | this.burnOdds.put(block, burnOdds);
|
| 289 | }
|
| 290 |
|
| 291 | public static void bootStrap() {
|
| 292 | FireBlock fire = (FireBlock)Blocks.FIRE;
|
| 293 | fire.setFlammable(Blocks.OAK_PLANKS, 5, 20);
|
| 294 | fire.setFlammable(Blocks.SPRUCE_PLANKS, 5, 20);
|
| 295 | fire.setFlammable(Blocks.BIRCH_PLANKS, 5, 20);
|
| 296 | fire.setFlammable(Blocks.JUNGLE_PLANKS, 5, 20);
|
| 297 | fire.setFlammable(Blocks.ACACIA_PLANKS, 5, 20);
|
| 298 | fire.setFlammable(Blocks.CHERRY_PLANKS, 5, 20);
|
| 299 | fire.setFlammable(Blocks.DARK_OAK_PLANKS, 5, 20);
|
| 300 | fire.setFlammable(Blocks.PALE_OAK_PLANKS, 5, 20);
|
| 301 | fire.setFlammable(Blocks.POPLAR_PLANKS, 5, 20);
|
| 302 | fire.setFlammable(Blocks.MANGROVE_PLANKS, 5, 20);
|
| 303 | fire.setFlammable(Blocks.BAMBOO_PLANKS, 5, 20);
|
| 304 | fire.setFlammable(Blocks.BAMBOO_MOSAIC, 5, 20);
|
| 305 | fire.setFlammable(Blocks.OAK_SLAB, 5, 20);
|
| 306 | fire.setFlammable(Blocks.SPRUCE_SLAB, 5, 20);
|
| 307 | fire.setFlammable(Blocks.BIRCH_SLAB, 5, 20);
|
| 308 | fire.setFlammable(Blocks.JUNGLE_SLAB, 5, 20);
|
| 309 | fire.setFlammable(Blocks.ACACIA_SLAB, 5, 20);
|
| 310 | fire.setFlammable(Blocks.CHERRY_SLAB, 5, 20);
|
| 311 | fire.setFlammable(Blocks.DARK_OAK_SLAB, 5, 20);
|
| 312 | fire.setFlammable(Blocks.PALE_OAK_SLAB, 5, 20);
|
| 313 | fire.setFlammable(Blocks.POPLAR_SLAB, 5, 20);
|
| 314 | fire.setFlammable(Blocks.MANGROVE_SLAB, 5, 20);
|
| 315 | fire.setFlammable(Blocks.BAMBOO_SLAB, 5, 20);
|
| 316 | fire.setFlammable(Blocks.BAMBOO_MOSAIC_SLAB, 5, 20);
|
| 317 | fire.setFlammable(Blocks.OAK_FENCE_GATE, 5, 20);
|
| 318 | fire.setFlammable(Blocks.SPRUCE_FENCE_GATE, 5, 20);
|
| 319 | fire.setFlammable(Blocks.BIRCH_FENCE_GATE, 5, 20);
|
| 320 | fire.setFlammable(Blocks.JUNGLE_FENCE_GATE, 5, 20);
|
| 321 | fire.setFlammable(Blocks.ACACIA_FENCE_GATE, 5, 20);
|
| 322 | fire.setFlammable(Blocks.CHERRY_FENCE_GATE, 5, 20);
|
| 323 | fire.setFlammable(Blocks.DARK_OAK_FENCE_GATE, 5, 20);
|
| 324 | fire.setFlammable(Blocks.PALE_OAK_FENCE_GATE, 5, 20);
|
| 325 | fire.setFlammable(Blocks.POPLAR_FENCE_GATE, 5, 20);
|
| 326 | fire.setFlammable(Blocks.MANGROVE_FENCE_GATE, 5, 20);
|
| 327 | fire.setFlammable(Blocks.BAMBOO_FENCE_GATE, 5, 20);
|
| 328 | fire.setFlammable(Blocks.OAK_FENCE, 5, 20);
|
| 329 | fire.setFlammable(Blocks.SPRUCE_FENCE, 5, 20);
|
| 330 | fire.setFlammable(Blocks.BIRCH_FENCE, 5, 20);
|
| 331 | fire.setFlammable(Blocks.JUNGLE_FENCE, 5, 20);
|
| 332 | fire.setFlammable(Blocks.ACACIA_FENCE, 5, 20);
|
| 333 | fire.setFlammable(Blocks.CHERRY_FENCE, 5, 20);
|
| 334 | fire.setFlammable(Blocks.DARK_OAK_FENCE, 5, 20);
|
| 335 | fire.setFlammable(Blocks.PALE_OAK_FENCE, 5, 20);
|
| 336 | fire.setFlammable(Blocks.POPLAR_FENCE, 5, 20);
|
| 337 | fire.setFlammable(Blocks.MANGROVE_FENCE, 5, 20);
|
| 338 | fire.setFlammable(Blocks.BAMBOO_FENCE, 5, 20);
|
| 339 | fire.setFlammable(Blocks.OAK_STAIRS, 5, 20);
|
| 340 | fire.setFlammable(Blocks.BIRCH_STAIRS, 5, 20);
|
| 341 | fire.setFlammable(Blocks.SPRUCE_STAIRS, 5, 20);
|
| 342 | fire.setFlammable(Blocks.JUNGLE_STAIRS, 5, 20);
|
| 343 | fire.setFlammable(Blocks.ACACIA_STAIRS, 5, 20);
|
| 344 | fire.setFlammable(Blocks.CHERRY_STAIRS, 5, 20);
|
| 345 | fire.setFlammable(Blocks.DARK_OAK_STAIRS, 5, 20);
|
| 346 | fire.setFlammable(Blocks.PALE_OAK_STAIRS, 5, 20);
|
| 347 | fire.setFlammable(Blocks.POPLAR_STAIRS, 5, 20);
|
| 348 | fire.setFlammable(Blocks.MANGROVE_STAIRS, 5, 20);
|
| 349 | fire.setFlammable(Blocks.BAMBOO_STAIRS, 5, 20);
|
| 350 | fire.setFlammable(Blocks.BAMBOO_MOSAIC_STAIRS, 5, 20);
|
| 351 | fire.setFlammable(Blocks.OAK_LOG, 5, 5);
|
| 352 | fire.setFlammable(Blocks.SPRUCE_LOG, 5, 5);
|
| 353 | fire.setFlammable(Blocks.BIRCH_LOG, 5, 5);
|
| 354 | fire.setFlammable(Blocks.JUNGLE_LOG, 5, 5);
|
| 355 | fire.setFlammable(Blocks.ACACIA_LOG, 5, 5);
|
| 356 | fire.setFlammable(Blocks.CHERRY_LOG, 5, 5);
|
| 357 | fire.setFlammable(Blocks.PALE_OAK_LOG, 5, 5);
|
| 358 | fire.setFlammable(Blocks.POPLAR_LOG, 5, 5);
|
| 359 | fire.setFlammable(Blocks.DARK_OAK_LOG, 5, 5);
|
| 360 | fire.setFlammable(Blocks.MANGROVE_LOG, 5, 5);
|
| 361 | fire.setFlammable(Blocks.BAMBOO_BLOCK, 5, 5);
|
| 362 | fire.setFlammable(Blocks.STRIPPED_OAK_LOG, 5, 5);
|
| 363 | fire.setFlammable(Blocks.STRIPPED_SPRUCE_LOG, 5, 5);
|
| 364 | fire.setFlammable(Blocks.STRIPPED_BIRCH_LOG, 5, 5);
|
| 365 | fire.setFlammable(Blocks.STRIPPED_JUNGLE_LOG, 5, 5);
|
| 366 | fire.setFlammable(Blocks.STRIPPED_ACACIA_LOG, 5, 5);
|
| 367 | fire.setFlammable(Blocks.STRIPPED_CHERRY_LOG, 5, 5);
|
| 368 | fire.setFlammable(Blocks.STRIPPED_DARK_OAK_LOG, 5, 5);
|
| 369 | fire.setFlammable(Blocks.STRIPPED_PALE_OAK_LOG, 5, 5);
|
| 370 | fire.setFlammable(Blocks.STRIPPED_POPLAR_LOG, 5, 5);
|
| 371 | fire.setFlammable(Blocks.STRIPPED_MANGROVE_LOG, 5, 5);
|
| 372 | fire.setFlammable(Blocks.STRIPPED_BAMBOO_BLOCK, 5, 5);
|
| 373 | fire.setFlammable(Blocks.STRIPPED_OAK_WOOD, 5, 5);
|
| 374 | fire.setFlammable(Blocks.STRIPPED_SPRUCE_WOOD, 5, 5);
|
| 375 | fire.setFlammable(Blocks.STRIPPED_BIRCH_WOOD, 5, 5);
|
| 376 | fire.setFlammable(Blocks.STRIPPED_JUNGLE_WOOD, 5, 5);
|
| 377 | fire.setFlammable(Blocks.STRIPPED_ACACIA_WOOD, 5, 5);
|
| 378 | fire.setFlammable(Blocks.STRIPPED_CHERRY_WOOD, 5, 5);
|
| 379 | fire.setFlammable(Blocks.STRIPPED_DARK_OAK_WOOD, 5, 5);
|
| 380 | fire.setFlammable(Blocks.STRIPPED_PALE_OAK_WOOD, 5, 5);
|
| 381 | fire.setFlammable(Blocks.STRIPPED_POPLAR_WOOD, 5, 5);
|
| 382 | fire.setFlammable(Blocks.STRIPPED_MANGROVE_WOOD, 5, 5);
|
| 383 | fire.setFlammable(Blocks.OAK_WOOD, 5, 5);
|
| 384 | fire.setFlammable(Blocks.SPRUCE_WOOD, 5, 5);
|
| 385 | fire.setFlammable(Blocks.BIRCH_WOOD, 5, 5);
|
| 386 | fire.setFlammable(Blocks.JUNGLE_WOOD, 5, 5);
|
| 387 | fire.setFlammable(Blocks.ACACIA_WOOD, 5, 5);
|
| 388 | fire.setFlammable(Blocks.CHERRY_WOOD, 5, 5);
|
| 389 | fire.setFlammable(Blocks.PALE_OAK_WOOD, 5, 5);
|
| 390 | fire.setFlammable(Blocks.POPLAR_WOOD, 5, 5);
|
| 391 | fire.setFlammable(Blocks.DARK_OAK_WOOD, 5, 5);
|
| 392 | fire.setFlammable(Blocks.MANGROVE_WOOD, 5, 5);
|
| 393 | fire.setFlammable(Blocks.MANGROVE_ROOTS, 5, 20);
|
| 394 | fire.setFlammable(Blocks.OAK_LEAVES, 30, 60);
|
| 395 | fire.setFlammable(Blocks.SPRUCE_LEAVES, 30, 60);
|
| 396 | fire.setFlammable(Blocks.BIRCH_LEAVES, 30, 60);
|
| 397 | fire.setFlammable(Blocks.JUNGLE_LEAVES, 30, 60);
|
| 398 | fire.setFlammable(Blocks.ACACIA_LEAVES, 30, 60);
|
| 399 | fire.setFlammable(Blocks.CHERRY_LEAVES, 30, 60);
|
| 400 | fire.setFlammable(Blocks.DARK_OAK_LEAVES, 30, 60);
|
| 401 | fire.setFlammable(Blocks.PALE_OAK_LEAVES, 30, 60);
|
| 402 | fire.setFlammable(Blocks.MANGROVE_LEAVES, 30, 60);
|
| 403 | fire.setFlammable(Blocks.RED_POPLAR_LEAVES, 30, 60);
|
| 404 | fire.setFlammable(Blocks.ORANGE_POPLAR_LEAVES, 30, 60);
|
| 405 | fire.setFlammable(Blocks.YELLOW_POPLAR_LEAVES, 30, 60);
|
| 406 | fire.setFlammable(Blocks.BOOKSHELF, 30, 20);
|
| 407 | fire.setFlammable(Blocks.TNT, 15, 100);
|
| 408 | fire.setFlammable(Blocks.SHORT_GRASS, 60, 100);
|
| 409 | fire.setFlammable(Blocks.FERN, 60, 100);
|
| 410 | fire.setFlammable(Blocks.DEAD_BUSH, 60, 100);
|
| 411 | fire.setFlammable(Blocks.SHORT_DRY_GRASS, 60, 100);
|
| 412 | fire.setFlammable(Blocks.TALL_DRY_GRASS, 60, 100);
|
| 413 | fire.setFlammable(Blocks.SUNFLOWER, 60, 100);
|
| 414 | fire.setFlammable(Blocks.LILAC, 60, 100);
|
| 415 | fire.setFlammable(Blocks.ROSE_BUSH, 60, 100);
|
| 416 | fire.setFlammable(Blocks.PEONY, 60, 100);
|
| 417 | fire.setFlammable(Blocks.RED_SHRUB, 60, 100);
|
| 418 | fire.setFlammable(Blocks.TALL_GRASS, 60, 100);
|
| 419 | fire.setFlammable(Blocks.LARGE_FERN, 60, 100);
|
| 420 | fire.setFlammable(Blocks.DANDELION, 60, 100);
|
| 421 | fire.setFlammable(Blocks.GOLDEN_DANDELION, 60, 100);
|
| 422 | fire.setFlammable(Blocks.POPPY, 60, 100);
|
| 423 | fire.setFlammable(Blocks.OPEN_EYEBLOSSOM, 60, 100);
|
| 424 | fire.setFlammable(Blocks.CLOSED_EYEBLOSSOM, 60, 100);
|
| 425 | fire.setFlammable(Blocks.BLUE_ORCHID, 60, 100);
|
| 426 | fire.setFlammable(Blocks.ALLIUM, 60, 100);
|
| 427 | fire.setFlammable(Blocks.AZURE_BLUET, 60, 100);
|
| 428 | fire.setFlammable(Blocks.RED_TULIP, 60, 100);
|
| 429 | fire.setFlammable(Blocks.ORANGE_TULIP, 60, 100);
|
| 430 | fire.setFlammable(Blocks.WHITE_TULIP, 60, 100);
|
| 431 | fire.setFlammable(Blocks.PINK_TULIP, 60, 100);
|
| 432 | fire.setFlammable(Blocks.OXEYE_DAISY, 60, 100);
|
| 433 | fire.setFlammable(Blocks.CORNFLOWER, 60, 100);
|
| 434 | fire.setFlammable(Blocks.LILY_OF_THE_VALLEY, 60, 100);
|
| 435 | fire.setFlammable(Blocks.TORCHFLOWER, 60, 100);
|
| 436 | fire.setFlammable(Blocks.PITCHER_PLANT, 60, 100);
|
| 437 | fire.setFlammable(Blocks.WITHER_ROSE, 60, 100);
|
| 438 | fire.setFlammable(Blocks.PINK_PETALS, 60, 100);
|
| 439 | fire.setFlammable(Blocks.WILDFLOWERS, 60, 100);
|
| 440 | fire.setFlammable(Blocks.LEAF_LITTER, 60, 100);
|
| 441 | fire.setFlammable(Blocks.CACTUS_FLOWER, 60, 100);
|
| 442 | Blocks.WOOL.forEach(block -> fire.setFlammable(block, 30, 60));
|
| 443 | Blocks.WOOL_STAIRS.forEach(block -> fire.setFlammable(block, 30, 60));
|
| 444 | Blocks.WOOL_SLAB.forEach(block -> fire.setFlammable(block, 30, 60));
|
| 445 | fire.setFlammable(Blocks.VINE, 15, 100);
|
| 446 | fire.setFlammable(Blocks.COAL_BLOCK, 5, 5);
|
| 447 | fire.setFlammable(Blocks.HAY_BLOCK, 60, 20);
|
| 448 | fire.setFlammable(Blocks.TARGET, 15, 20);
|
| 449 | Blocks.CARPET.forEach(block -> fire.setFlammable(block, 60, 20));
|
| 450 | fire.setFlammable(Blocks.PALE_MOSS_BLOCK, 5, 100);
|
| 451 | fire.setFlammable(Blocks.PALE_MOSS_CARPET, 5, 100);
|
| 452 | fire.setFlammable(Blocks.PALE_HANGING_MOSS, 5, 100);
|
| 453 | fire.setFlammable(Blocks.DRIED_KELP_BLOCK, 30, 60);
|
| 454 | fire.setFlammable(Blocks.BAMBOO, 60, 60);
|
| 455 | fire.setFlammable(Blocks.SCAFFOLDING, 60, 60);
|
| 456 | fire.setFlammable(Blocks.LECTERN, 30, 20);
|
| 457 | fire.setFlammable(Blocks.COMPOSTER, 5, 20);
|
| 458 | fire.setFlammable(Blocks.SWEET_BERRY_BUSH, 60, 100);
|
| 459 | fire.setFlammable(Blocks.BEEHIVE, 5, 20);
|
| 460 | fire.setFlammable(Blocks.BEE_NEST, 30, 20);
|
| 461 | fire.setFlammable(Blocks.AZALEA_LEAVES, 30, 60);
|
| 462 | fire.setFlammable(Blocks.FLOWERING_AZALEA_LEAVES, 30, 60);
|
| 463 | fire.setFlammable(Blocks.CAVE_VINES, 15, 60);
|
| 464 | fire.setFlammable(Blocks.CAVE_VINES_PLANT, 15, 60);
|
| 465 | fire.setFlammable(Blocks.SPORE_BLOSSOM, 60, 100);
|
| 466 | fire.setFlammable(Blocks.AZALEA, 30, 60);
|
| 467 | fire.setFlammable(Blocks.FLOWERING_AZALEA, 30, 60);
|
| 468 | fire.setFlammable(Blocks.BIG_DRIPLEAF, 60, 100);
|
| 469 | fire.setFlammable(Blocks.BIG_DRIPLEAF_STEM, 60, 100);
|
| 470 | fire.setFlammable(Blocks.SMALL_DRIPLEAF, 60, 100);
|
| 471 | fire.setFlammable(Blocks.HANGING_ROOTS, 30, 60);
|
| 472 | fire.setFlammable(Blocks.GLOW_LICHEN, 15, 100);
|
| 473 | fire.setFlammable(Blocks.FIREFLY_BUSH, 60, 100);
|
| 474 | fire.setFlammable(Blocks.BUSH, 60, 100);
|
| 475 | fire.setFlammable(Blocks.ACACIA_SHELF, 30, 20);
|
| 476 | fire.setFlammable(Blocks.BAMBOO_SHELF, 30, 20);
|
| 477 | fire.setFlammable(Blocks.BIRCH_SHELF, 30, 20);
|
| 478 | fire.setFlammable(Blocks.CHERRY_SHELF, 30, 20);
|
| 479 | fire.setFlammable(Blocks.DARK_OAK_SHELF, 30, 20);
|
| 480 | fire.setFlammable(Blocks.JUNGLE_SHELF, 30, 20);
|
| 481 | fire.setFlammable(Blocks.MANGROVE_SHELF, 30, 20);
|
| 482 | fire.setFlammable(Blocks.POPLAR_SHELF, 30, 20);
|
| 483 | fire.setFlammable(Blocks.OAK_SHELF, 30, 20);
|
| 484 | fire.setFlammable(Blocks.PALE_OAK_SHELF, 30, 20);
|
| 485 | fire.setFlammable(Blocks.SPRUCE_SHELF, 30, 20);
|
| 486 | fire.setFlammable(Blocks.STRAW_BED, 30, 60);
|
| 487 | }
|
| 488 | }
|
| 489 |
|