1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
|
--- a/net/minecraft/world/level/block/FireBlock.java
+++ b/net/minecraft/world/level/block/FireBlock.java
@@ -20,7 +20,7 @@
import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.level.LevelReader;
import net.minecraft.world.level.block.state.BlockBehaviour;
-import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.level.block.state.IBlockData;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.BooleanProperty;
@@ -28,6 +28,13 @@
import net.minecraft.world.phys.shapes.CollisionContext;
import net.minecraft.world.phys.shapes.Shapes;
import net.minecraft.world.phys.shapes.VoxelShape;
+// CraftBukkit start
+import org.bukkit.craftbukkit.block.CraftBlockState;
+import org.bukkit.craftbukkit.block.CraftBlockStates;
+import org.bukkit.craftbukkit.event.CraftEventFactory;
+import org.bukkit.event.block.BlockBurnEvent;
+import org.bukkit.event.block.BlockFadeEvent;
+// CraftBukkit end
public class FireBlock extends BaseFireBlock {
@@ -47,7 +54,7 @@
private static final VoxelShape EAST_AABB = Block.box(15.0D, 0.0D, 0.0D, 16.0D, 16.0D, 16.0D);
private static final VoxelShape NORTH_AABB = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 16.0D, 1.0D);
private static final VoxelShape SOUTH_AABB = Block.box(0.0D, 0.0D, 15.0D, 16.0D, 16.0D, 16.0D);
- private final Map<BlockState, VoxelShape> shapesCache;
+ private final Map<IBlockData, VoxelShape> shapesCache;
private static final int IGNITE_INSTANT = 60;
private static final int IGNITE_EASY = 30;
private static final int IGNITE_MEDIUM = 15;
@@ -56,43 +63,42 @@
private static final int BURN_EASY = 60;
private static final int BURN_MEDIUM = 20;
private static final int BURN_HARD = 5;
- private final Object2IntMap<Block> igniteOdds = new Object2IntOpenHashMap();
+ public final Object2IntMap<Block> igniteOdds = new Object2IntOpenHashMap();
private final Object2IntMap<Block> burnOdds = new Object2IntOpenHashMap();
@Override
- @Override
public MapCodec<FireBlock> codec() {
return FireBlock.CODEC;
}
- public FireBlock(BlockBehaviour.Properties blockbehaviour_properties) {
- super(blockbehaviour_properties, 1.0F);
- this.registerDefaultState((BlockState) ((BlockState) ((BlockState) ((BlockState) ((BlockState) ((BlockState) ((BlockState) this.stateDefinition.any()).setValue(FireBlock.AGE, 0)).setValue(FireBlock.NORTH, false)).setValue(FireBlock.EAST, false)).setValue(FireBlock.SOUTH, false)).setValue(FireBlock.WEST, false)).setValue(FireBlock.UP, false));
- this.shapesCache = ImmutableMap.copyOf((Map) this.stateDefinition.getPossibleStates().stream().filter((blockstate) -> {
- return (Integer) blockstate.getValue(FireBlock.AGE) == 0;
+ public FireBlock(BlockBehaviour.Properties properties) {
+ super(properties, 1.0F);
+ this.registerDefaultState((IBlockData) ((IBlockData) ((IBlockData) ((IBlockData) ((IBlockData) ((IBlockData) ((IBlockData) this.stateDefinition.any()).setValue(FireBlock.AGE, 0)).setValue(FireBlock.NORTH, false)).setValue(FireBlock.EAST, false)).setValue(FireBlock.SOUTH, false)).setValue(FireBlock.WEST, false)).setValue(FireBlock.UP, false));
+ this.shapesCache = ImmutableMap.copyOf((Map) this.stateDefinition.getPossibleStates().stream().filter((iblockdata) -> {
+ return (Integer) iblockdata.getValue(FireBlock.AGE) == 0;
}).collect(Collectors.toMap(Function.identity(), FireBlock::calculateShape)));
}
- private static VoxelShape calculateShape(BlockState blockstate) {
+ private static VoxelShape calculateShape(IBlockData state) {
VoxelShape voxelshape = Shapes.empty();
- if ((Boolean) blockstate.getValue(FireBlock.UP)) {
+ if ((Boolean) state.getValue(FireBlock.UP)) {
voxelshape = FireBlock.UP_AABB;
}
- if ((Boolean) blockstate.getValue(FireBlock.NORTH)) {
+ if ((Boolean) state.getValue(FireBlock.NORTH)) {
voxelshape = Shapes.or(voxelshape, FireBlock.NORTH_AABB);
}
- if ((Boolean) blockstate.getValue(FireBlock.SOUTH)) {
+ if ((Boolean) state.getValue(FireBlock.SOUTH)) {
voxelshape = Shapes.or(voxelshape, FireBlock.SOUTH_AABB);
}
- if ((Boolean) blockstate.getValue(FireBlock.EAST)) {
+ if ((Boolean) state.getValue(FireBlock.EAST)) {
voxelshape = Shapes.or(voxelshape, FireBlock.EAST_AABB);
}
- if ((Boolean) blockstate.getValue(FireBlock.WEST)) {
+ if ((Boolean) state.getValue(FireBlock.WEST)) {
voxelshape = Shapes.or(voxelshape, FireBlock.WEST_AABB);
}
@@ -100,105 +106,119 @@
}
@Override
- @Override
- public BlockState updateShape(BlockState blockstate, Direction direction, BlockState blockstate1, LevelAccessor levelaccessor, BlockPos blockpos, BlockPos blockpos1) {
- return this.canSurvive(blockstate, levelaccessor, blockpos) ? this.getStateWithAge(levelaccessor, blockpos, (Integer) blockstate.getValue(FireBlock.AGE)) : Blocks.AIR.defaultBlockState();
+ public IBlockData updateShape(IBlockData state, Direction facing, IBlockData facingState, LevelAccessor level, BlockPos currentPos, BlockPos facingPos) {
+ // CraftBukkit start
+ if (!this.canSurvive(state, level, currentPos)) {
+ // Suppress during worldgen
+ if (!(level instanceof Level)) {
+ return Blocks.AIR.defaultBlockState();
+ }
+ CraftBlockState blockState = CraftBlockStates.getBlockState(level, currentPos);
+ blockState.setData(Blocks.AIR.defaultBlockState());
+
+ BlockFadeEvent event = new BlockFadeEvent(blockState.getBlock(), blockState);
+ ((Level) level).getCraftServer().getPluginManager().callEvent(event);
+
+ if (!event.isCancelled()) {
+ return blockState.getHandle();
+ }
+ }
+ return this.getStateWithAge(level, currentPos, (Integer) state.getValue(FireBlock.AGE));
+ // CraftBukkit end
}
@Override
- @Override
- public VoxelShape getShape(BlockState blockstate, BlockGetter blockgetter, BlockPos blockpos, CollisionContext collisioncontext) {
- return (VoxelShape) this.shapesCache.get(blockstate.setValue(FireBlock.AGE, 0));
+ public VoxelShape getShape(IBlockData state, BlockGetter level, BlockPos pos, CollisionContext context) {
+ return (VoxelShape) this.shapesCache.get(state.setValue(FireBlock.AGE, 0));
}
@Override
- @Override
- public BlockState getStateForPlacement(BlockPlaceContext blockplacecontext) {
- return this.getStateForPlacement(blockplacecontext.getLevel(), blockplacecontext.getClickedPos());
+ public IBlockData getStateForPlacement(BlockPlaceContext context) {
+ return this.getStateForPlacement(context.getLevel(), context.getClickedPos());
}
- protected BlockState getStateForPlacement(BlockGetter blockgetter, BlockPos blockpos) {
- BlockPos blockpos1 = blockpos.below();
- BlockState blockstate = blockgetter.getBlockState(blockpos1);
+ protected IBlockData getStateForPlacement(BlockGetter level, BlockPos pos) {
+ BlockPos blockposition1 = pos.below();
+ IBlockData iblockdata = level.getBlockState(blockposition1);
- if (!this.canBurn(blockstate) && !blockstate.isFaceSturdy(blockgetter, blockpos1, Direction.UP)) {
- BlockState blockstate1 = this.defaultBlockState();
- Direction[] adirection = Direction.values();
- int i = adirection.length;
+ if (!this.canBurn(iblockdata) && !iblockdata.isFaceSturdy(level, blockposition1, Direction.UP)) {
+ IBlockData iblockdata1 = this.defaultBlockState();
+ Direction[] aenumdirection = Direction.values();
+ int i = aenumdirection.length;
for (int j = 0; j < i; ++j) {
- Direction direction = adirection[j];
- BooleanProperty booleanproperty = (BooleanProperty) FireBlock.PROPERTY_BY_DIRECTION.get(direction);
+ Direction enumdirection = aenumdirection[j];
+ BooleanProperty blockstateboolean = (BooleanProperty) FireBlock.PROPERTY_BY_DIRECTION.get(enumdirection);
- if (booleanproperty != null) {
- blockstate1 = (BlockState) blockstate1.setValue(booleanproperty, this.canBurn(blockgetter.getBlockState(blockpos.relative(direction))));
+ if (blockstateboolean != null) {
+ iblockdata1 = (IBlockData) iblockdata1.setValue(blockstateboolean, this.canBurn(level.getBlockState(pos.relative(enumdirection))));
}
}
- return blockstate1;
+ return iblockdata1;
} else {
return this.defaultBlockState();
}
}
@Override
- @Override
- public boolean canSurvive(BlockState blockstate, LevelReader levelreader, BlockPos blockpos) {
- BlockPos blockpos1 = blockpos.below();
+ public boolean canSurvive(IBlockData state, LevelReader level, BlockPos pos) {
+ BlockPos blockposition1 = pos.below();
- return levelreader.getBlockState(blockpos1).isFaceSturdy(levelreader, blockpos1, Direction.UP) || this.isValidFireLocation(levelreader, blockpos);
+ return level.getBlockState(blockposition1).isFaceSturdy(level, blockposition1, Direction.UP) || this.isValidFireLocation(level, pos);
}
@Override
- @Override
- public void tick(BlockState blockstate, ServerLevel serverlevel, BlockPos blockpos, RandomSource randomsource) {
- serverlevel.scheduleTick(blockpos, (Block) this, getFireTickDelay(serverlevel.random));
- if (serverlevel.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) {
- if (!blockstate.canSurvive(serverlevel, blockpos)) {
- serverlevel.removeBlock(blockpos, false);
+ public void tick(IBlockData state, ServerLevel level, BlockPos pos, RandomSource random) {
+ level.scheduleTick(pos, (Block) this, getFireTickDelay(level.random));
+ if (level.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) {
+ if (!state.canSurvive(level, pos)) {
+ fireExtinguished(level, pos); // CraftBukkit - invalid place location
}
- BlockState blockstate1 = serverlevel.getBlockState(blockpos.below());
- boolean flag = blockstate1.is(serverlevel.dimensionType().infiniburn());
- int i = (Integer) blockstate.getValue(FireBlock.AGE);
+ IBlockData iblockdata1 = level.getBlockState(pos.below());
+ boolean flag = iblockdata1.is(level.dimensionType().infiniburn());
+ int i = (Integer) state.getValue(FireBlock.AGE);
- if (!flag && serverlevel.isRaining() && this.isNearRain(serverlevel, blockpos) && randomsource.nextFloat() < 0.2F + (float) i * 0.03F) {
- serverlevel.removeBlock(blockpos, false);
+ if (!flag && level.isRaining() && this.isNearRain(level, pos) && random.nextFloat() < 0.2F + (float) i * 0.03F) {
+ fireExtinguished(level, pos); // CraftBukkit - extinguished by rain
} else {
- int j = Math.min(15, i + randomsource.nextInt(3) / 2);
+ int j = Math.min(15, i + random.nextInt(3) / 2);
if (i != j) {
- blockstate = (BlockState) blockstate.setValue(FireBlock.AGE, j);
- serverlevel.setBlock(blockpos, blockstate, 4);
+ state = (IBlockData) state.setValue(FireBlock.AGE, j);
+ level.setBlock(pos, state, 4);
}
if (!flag) {
- if (!this.isValidFireLocation(serverlevel, blockpos)) {
- BlockPos blockpos1 = blockpos.below();
+ if (!this.isValidFireLocation(level, pos)) {
+ BlockPos blockposition1 = pos.below();
- if (!serverlevel.getBlockState(blockpos1).isFaceSturdy(serverlevel, blockpos1, Direction.UP) || i > 3) {
- serverlevel.removeBlock(blockpos, false);
+ if (!level.getBlockState(blockposition1).isFaceSturdy(level, blockposition1, Direction.UP) || i > 3) {
+ fireExtinguished(level, pos); // CraftBukkit
}
return;
}
- if (i == 15 && randomsource.nextInt(4) == 0 && !this.canBurn(serverlevel.getBlockState(blockpos.below()))) {
- serverlevel.removeBlock(blockpos, false);
+ if (i == 15 && random.nextInt(4) == 0 && !this.canBurn(level.getBlockState(pos.below()))) {
+ fireExtinguished(level, pos); // CraftBukkit
return;
}
}
- boolean flag1 = serverlevel.getBiome(blockpos).is(BiomeTags.INCREASED_FIRE_BURNOUT);
+ boolean flag1 = level.getBiome(pos).is(BiomeTags.INCREASED_FIRE_BURNOUT);
int k = flag1 ? -50 : 0;
- this.checkBurnOut(serverlevel, blockpos.east(), 300 + k, randomsource, i);
- this.checkBurnOut(serverlevel, blockpos.west(), 300 + k, randomsource, i);
- this.checkBurnOut(serverlevel, blockpos.below(), 250 + k, randomsource, i);
- this.checkBurnOut(serverlevel, blockpos.above(), 250 + k, randomsource, i);
- this.checkBurnOut(serverlevel, blockpos.north(), 300 + k, randomsource, i);
- this.checkBurnOut(serverlevel, blockpos.south(), 300 + k, randomsource, i);
- BlockPos.MutableBlockPos blockpos_mutableblockpos = new BlockPos.MutableBlockPos();
+ // CraftBukkit start - add source blockposition to burn calls
+ this.trySpread(level, pos.east(), 300 + k, random, i, pos);
+ this.trySpread(level, pos.west(), 300 + k, random, i, pos);
+ this.trySpread(level, pos.below(), 250 + k, random, i, pos);
+ this.trySpread(level, pos.above(), 250 + k, random, i, pos);
+ this.trySpread(level, pos.north(), 300 + k, random, i, pos);
+ this.trySpread(level, pos.south(), 300 + k, random, i, pos);
+ // CraftBukkit end
+ BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
for (int l = -1; l <= 1; ++l) {
for (int i1 = -1; i1 <= 1; ++i1) {
@@ -210,20 +230,28 @@
k1 += (j1 - 1) * 100;
}
- blockpos_mutableblockpos.setWithOffset(blockpos, l, j1, i1);
- int l1 = this.getIgniteOdds(serverlevel, blockpos_mutableblockpos);
+ blockposition_mutableblockposition.setWithOffset(pos, l, j1, i1);
+ int l1 = this.getIgniteOdds(level, blockposition_mutableblockposition);
if (l1 > 0) {
- int i2 = (l1 + 40 + serverlevel.getDifficulty().getId() * 7) / (i + 30);
+ int i2 = (l1 + 40 + level.getDifficulty().getId() * 7) / (i + 30);
if (flag1) {
i2 /= 2;
}
- if (i2 > 0 && randomsource.nextInt(k1) <= i2 && (!serverlevel.isRaining() || !this.isNearRain(serverlevel, blockpos_mutableblockpos))) {
- int j2 = Math.min(15, i + randomsource.nextInt(5) / 4);
+ if (i2 > 0 && random.nextInt(k1) <= i2 && (!level.isRaining() || !this.isNearRain(level, blockposition_mutableblockposition))) {
+ int j2 = Math.min(15, i + random.nextInt(5) / 4);
- serverlevel.setBlock(blockpos_mutableblockpos, this.getStateWithAge(serverlevel, blockpos_mutableblockpos, j2), 3);
+ // CraftBukkit start - Call to stop spread of fire
+ if (level.getBlockState(blockposition_mutableblockposition).getBlock() != Blocks.FIRE) {
+ if (CraftEventFactory.callBlockIgniteEvent(level, blockposition_mutableblockposition, pos).isCancelled()) {
+ continue;
+ }
+
+ CraftEventFactory.handleBlockSpreadEvent(level, pos, blockposition_mutableblockposition, this.getStateWithAge(level, blockposition_mutableblockposition, j2), 3); // CraftBukkit
+ }
+ // CraftBukkit end
}
}
}
@@ -235,55 +263,71 @@
}
}
- protected boolean isNearRain(Level level, BlockPos blockpos) {
- return level.isRainingAt(blockpos) || level.isRainingAt(blockpos.west()) || level.isRainingAt(blockpos.east()) || level.isRainingAt(blockpos.north()) || level.isRainingAt(blockpos.south());
+ protected boolean isNearRain(Level level, BlockPos pos) {
+ return level.isRainingAt(pos) || level.isRainingAt(pos.west()) || level.isRainingAt(pos.east()) || level.isRainingAt(pos.north()) || level.isRainingAt(pos.south());
}
- private int getBurnOdds(BlockState blockstate) {
- return blockstate.hasProperty(BlockStateProperties.WATERLOGGED) && (Boolean) blockstate.getValue(BlockStateProperties.WATERLOGGED) ? 0 : this.burnOdds.getInt(blockstate.getBlock());
+ private int getBurnOdds(IBlockData state) {
+ return state.hasProperty(BlockStateProperties.WATERLOGGED) && (Boolean) state.getValue(BlockStateProperties.WATERLOGGED) ? 0 : this.burnOdds.getInt(state.getBlock());
}
- private int getIgniteOdds(BlockState blockstate) {
- return blockstate.hasProperty(BlockStateProperties.WATERLOGGED) && (Boolean) blockstate.getValue(BlockStateProperties.WATERLOGGED) ? 0 : this.igniteOdds.getInt(blockstate.getBlock());
+ private int getIgniteOdds(IBlockData state) {
+ return state.hasProperty(BlockStateProperties.WATERLOGGED) && (Boolean) state.getValue(BlockStateProperties.WATERLOGGED) ? 0 : this.igniteOdds.getInt(state.getBlock());
}
- private void checkBurnOut(Level level, BlockPos blockpos, int i, RandomSource randomsource, int j) {
- int k = this.getBurnOdds(level.getBlockState(blockpos));
+ private void trySpread(Level world, BlockPos blockposition, int i, RandomSource randomsource, int j, BlockPos sourceposition) { // CraftBukkit add sourceposition
+ int k = this.getBurnOdds(world.getBlockState(blockposition));
if (randomsource.nextInt(i) < k) {
- BlockState blockstate = level.getBlockState(blockpos);
+ IBlockData iblockdata = world.getBlockState(blockposition);
- if (randomsource.nextInt(j + 10) < 5 && !level.isRainingAt(blockpos)) {
+ // CraftBukkit start
+ org.bukkit.block.Block theBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
+ org.bukkit.block.Block sourceBlock = world.getWorld().getBlockAt(sourceposition.getX(), sourceposition.getY(), sourceposition.getZ());
+
+ BlockBurnEvent event = new BlockBurnEvent(theBlock, sourceBlock);
+ world.getCraftServer().getPluginManager().callEvent(event);
+
+ if (event.isCancelled()) {
+ return;
+ }
+
+ if (iblockdata.getBlock() instanceof TntBlock && !CraftEventFactory.callTNTPrimeEvent(world, blockposition, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.FIRE, null, sourceposition)) {
+ return;
+ }
+ // CraftBukkit end
+
+ if (randomsource.nextInt(j + 10) < 5 && !world.isRainingAt(blockposition)) {
int l = Math.min(j + randomsource.nextInt(5) / 4, 15);
- level.setBlock(blockpos, this.getStateWithAge(level, blockpos, l), 3);
+ world.setBlock(blockposition, this.getStateWithAge(world, blockposition, l), 3);
} else {
- level.removeBlock(blockpos, false);
+ world.removeBlock(blockposition, false);
}
- Block block = blockstate.getBlock();
+ Block block = iblockdata.getBlock();
if (block instanceof TntBlock) {
- TntBlock.explode(level, blockpos);
+ TntBlock.explode(world, blockposition);
}
}
}
- private BlockState getStateWithAge(LevelAccessor levelaccessor, BlockPos blockpos, int i) {
- BlockState blockstate = getState(levelaccessor, blockpos);
+ private IBlockData getStateWithAge(LevelAccessor level, BlockPos pos, int age) {
+ IBlockData iblockdata = getState(level, pos);
- return blockstate.is(Blocks.FIRE) ? (BlockState) blockstate.setValue(FireBlock.AGE, i) : blockstate;
+ return iblockdata.is(Blocks.FIRE) ? (IBlockData) iblockdata.setValue(FireBlock.AGE, age) : iblockdata;
}
- private boolean isValidFireLocation(BlockGetter blockgetter, BlockPos blockpos) {
- Direction[] adirection = Direction.values();
- int i = adirection.length;
+ private boolean isValidFireLocation(BlockGetter level, BlockPos pos) {
+ Direction[] aenumdirection = Direction.values();
+ int i = aenumdirection.length;
for (int j = 0; j < i; ++j) {
- Direction direction = adirection[j];
+ Direction enumdirection = aenumdirection[j];
- if (this.canBurn(blockgetter.getBlockState(blockpos.relative(direction)))) {
+ if (this.canBurn(level.getBlockState(pos.relative(enumdirection)))) {
return true;
}
}
@@ -291,19 +335,19 @@
return false;
}
- private int getIgniteOdds(LevelReader levelreader, BlockPos blockpos) {
- if (!levelreader.isEmptyBlock(blockpos)) {
+ private int getIgniteOdds(LevelReader level, BlockPos pos) {
+ if (!level.isEmptyBlock(pos)) {
return 0;
} else {
int i = 0;
- Direction[] adirection = Direction.values();
- int j = adirection.length;
+ Direction[] aenumdirection = Direction.values();
+ int j = aenumdirection.length;
for (int k = 0; k < j; ++k) {
- Direction direction = adirection[k];
- BlockState blockstate = levelreader.getBlockState(blockpos.relative(direction));
+ Direction enumdirection = aenumdirection[k];
+ IBlockData iblockdata = level.getBlockState(pos.relative(enumdirection));
- i = Math.max(this.getIgniteOdds(blockstate), i);
+ i = Math.max(this.getIgniteOdds(iblockdata), i);
}
return i;
@@ -311,209 +355,206 @@
}
@Override
- @Override
- protected boolean canBurn(BlockState blockstate) {
- return this.getIgniteOdds(blockstate) > 0;
+ protected boolean canBurn(IBlockData state) {
+ return this.getIgniteOdds(state) > 0;
}
@Override
- @Override
- public void onPlace(BlockState blockstate, Level level, BlockPos blockpos, BlockState blockstate1, boolean flag) {
- super.onPlace(blockstate, level, blockpos, blockstate1, flag);
- level.scheduleTick(blockpos, (Block) this, getFireTickDelay(level.random));
+ public void onPlace(IBlockData state, Level level, BlockPos pos, IBlockData oldState, boolean isMoving) {
+ super.onPlace(state, level, pos, oldState, isMoving);
+ level.scheduleTick(pos, (Block) this, getFireTickDelay(level.random));
}
- private static int getFireTickDelay(RandomSource randomsource) {
- return 30 + randomsource.nextInt(10);
+ private static int getFireTickDelay(RandomSource random) {
+ return 30 + random.nextInt(10);
}
@Override
- @Override
- protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> statedefinition_builder) {
- statedefinition_builder.add(FireBlock.AGE, FireBlock.NORTH, FireBlock.EAST, FireBlock.SOUTH, FireBlock.WEST, FireBlock.UP);
+ protected void createBlockStateDefinition(StateDefinition.Builder<Block, IBlockData> builder) {
+ builder.add(FireBlock.AGE, FireBlock.NORTH, FireBlock.EAST, FireBlock.SOUTH, FireBlock.WEST, FireBlock.UP);
}
- public void setFlammable(Block block, int i, int j) {
- this.igniteOdds.put(block, i);
- this.burnOdds.put(block, j);
+ public void setFlammable(Block block, int encouragement, int flammability) {
+ this.igniteOdds.put(block, encouragement);
+ this.burnOdds.put(block, flammability);
}
public static void bootStrap() {
- FireBlock fireblock = (FireBlock) Blocks.FIRE;
+ FireBlock blockfire = (FireBlock) Blocks.FIRE;
- fireblock.setFlammable(Blocks.OAK_PLANKS, 5, 20);
- fireblock.setFlammable(Blocks.SPRUCE_PLANKS, 5, 20);
- fireblock.setFlammable(Blocks.BIRCH_PLANKS, 5, 20);
- fireblock.setFlammable(Blocks.JUNGLE_PLANKS, 5, 20);
- fireblock.setFlammable(Blocks.ACACIA_PLANKS, 5, 20);
- fireblock.setFlammable(Blocks.CHERRY_PLANKS, 5, 20);
- fireblock.setFlammable(Blocks.DARK_OAK_PLANKS, 5, 20);
- fireblock.setFlammable(Blocks.MANGROVE_PLANKS, 5, 20);
- fireblock.setFlammable(Blocks.BAMBOO_PLANKS, 5, 20);
- fireblock.setFlammable(Blocks.BAMBOO_MOSAIC, 5, 20);
- fireblock.setFlammable(Blocks.OAK_SLAB, 5, 20);
- fireblock.setFlammable(Blocks.SPRUCE_SLAB, 5, 20);
- fireblock.setFlammable(Blocks.BIRCH_SLAB, 5, 20);
- fireblock.setFlammable(Blocks.JUNGLE_SLAB, 5, 20);
- fireblock.setFlammable(Blocks.ACACIA_SLAB, 5, 20);
- fireblock.setFlammable(Blocks.CHERRY_SLAB, 5, 20);
- fireblock.setFlammable(Blocks.DARK_OAK_SLAB, 5, 20);
- fireblock.setFlammable(Blocks.MANGROVE_SLAB, 5, 20);
- fireblock.setFlammable(Blocks.BAMBOO_SLAB, 5, 20);
- fireblock.setFlammable(Blocks.BAMBOO_MOSAIC_SLAB, 5, 20);
- fireblock.setFlammable(Blocks.OAK_FENCE_GATE, 5, 20);
- fireblock.setFlammable(Blocks.SPRUCE_FENCE_GATE, 5, 20);
- fireblock.setFlammable(Blocks.BIRCH_FENCE_GATE, 5, 20);
- fireblock.setFlammable(Blocks.JUNGLE_FENCE_GATE, 5, 20);
- fireblock.setFlammable(Blocks.ACACIA_FENCE_GATE, 5, 20);
- fireblock.setFlammable(Blocks.CHERRY_FENCE_GATE, 5, 20);
- fireblock.setFlammable(Blocks.DARK_OAK_FENCE_GATE, 5, 20);
- fireblock.setFlammable(Blocks.MANGROVE_FENCE_GATE, 5, 20);
- fireblock.setFlammable(Blocks.BAMBOO_FENCE_GATE, 5, 20);
- fireblock.setFlammable(Blocks.OAK_FENCE, 5, 20);
- fireblock.setFlammable(Blocks.SPRUCE_FENCE, 5, 20);
- fireblock.setFlammable(Blocks.BIRCH_FENCE, 5, 20);
- fireblock.setFlammable(Blocks.JUNGLE_FENCE, 5, 20);
- fireblock.setFlammable(Blocks.ACACIA_FENCE, 5, 20);
- fireblock.setFlammable(Blocks.CHERRY_FENCE, 5, 20);
- fireblock.setFlammable(Blocks.DARK_OAK_FENCE, 5, 20);
- fireblock.setFlammable(Blocks.MANGROVE_FENCE, 5, 20);
- fireblock.setFlammable(Blocks.BAMBOO_FENCE, 5, 20);
- fireblock.setFlammable(Blocks.OAK_STAIRS, 5, 20);
- fireblock.setFlammable(Blocks.BIRCH_STAIRS, 5, 20);
- fireblock.setFlammable(Blocks.SPRUCE_STAIRS, 5, 20);
- fireblock.setFlammable(Blocks.JUNGLE_STAIRS, 5, 20);
- fireblock.setFlammable(Blocks.ACACIA_STAIRS, 5, 20);
- fireblock.setFlammable(Blocks.CHERRY_STAIRS, 5, 20);
- fireblock.setFlammable(Blocks.DARK_OAK_STAIRS, 5, 20);
- fireblock.setFlammable(Blocks.MANGROVE_STAIRS, 5, 20);
- fireblock.setFlammable(Blocks.BAMBOO_STAIRS, 5, 20);
- fireblock.setFlammable(Blocks.BAMBOO_MOSAIC_STAIRS, 5, 20);
- fireblock.setFlammable(Blocks.OAK_LOG, 5, 5);
- fireblock.setFlammable(Blocks.SPRUCE_LOG, 5, 5);
- fireblock.setFlammable(Blocks.BIRCH_LOG, 5, 5);
- fireblock.setFlammable(Blocks.JUNGLE_LOG, 5, 5);
- fireblock.setFlammable(Blocks.ACACIA_LOG, 5, 5);
- fireblock.setFlammable(Blocks.CHERRY_LOG, 5, 5);
- fireblock.setFlammable(Blocks.DARK_OAK_LOG, 5, 5);
- fireblock.setFlammable(Blocks.MANGROVE_LOG, 5, 5);
- fireblock.setFlammable(Blocks.BAMBOO_BLOCK, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_OAK_LOG, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_SPRUCE_LOG, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_BIRCH_LOG, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_JUNGLE_LOG, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_ACACIA_LOG, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_CHERRY_LOG, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_DARK_OAK_LOG, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_MANGROVE_LOG, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_BAMBOO_BLOCK, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_OAK_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_SPRUCE_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_BIRCH_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_JUNGLE_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_ACACIA_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_CHERRY_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_DARK_OAK_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.STRIPPED_MANGROVE_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.OAK_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.SPRUCE_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.BIRCH_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.JUNGLE_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.ACACIA_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.CHERRY_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.DARK_OAK_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.MANGROVE_WOOD, 5, 5);
- fireblock.setFlammable(Blocks.MANGROVE_ROOTS, 5, 20);
- fireblock.setFlammable(Blocks.OAK_LEAVES, 30, 60);
- fireblock.setFlammable(Blocks.SPRUCE_LEAVES, 30, 60);
- fireblock.setFlammable(Blocks.BIRCH_LEAVES, 30, 60);
- fireblock.setFlammable(Blocks.JUNGLE_LEAVES, 30, 60);
- fireblock.setFlammable(Blocks.ACACIA_LEAVES, 30, 60);
- fireblock.setFlammable(Blocks.CHERRY_LEAVES, 30, 60);
- fireblock.setFlammable(Blocks.DARK_OAK_LEAVES, 30, 60);
- fireblock.setFlammable(Blocks.MANGROVE_LEAVES, 30, 60);
- fireblock.setFlammable(Blocks.BOOKSHELF, 30, 20);
- fireblock.setFlammable(Blocks.TNT, 15, 100);
- fireblock.setFlammable(Blocks.SHORT_GRASS, 60, 100);
- fireblock.setFlammable(Blocks.FERN, 60, 100);
- fireblock.setFlammable(Blocks.DEAD_BUSH, 60, 100);
- fireblock.setFlammable(Blocks.SUNFLOWER, 60, 100);
- fireblock.setFlammable(Blocks.LILAC, 60, 100);
- fireblock.setFlammable(Blocks.ROSE_BUSH, 60, 100);
- fireblock.setFlammable(Blocks.PEONY, 60, 100);
- fireblock.setFlammable(Blocks.TALL_GRASS, 60, 100);
- fireblock.setFlammable(Blocks.LARGE_FERN, 60, 100);
- fireblock.setFlammable(Blocks.DANDELION, 60, 100);
- fireblock.setFlammable(Blocks.POPPY, 60, 100);
- fireblock.setFlammable(Blocks.BLUE_ORCHID, 60, 100);
- fireblock.setFlammable(Blocks.ALLIUM, 60, 100);
- fireblock.setFlammable(Blocks.AZURE_BLUET, 60, 100);
- fireblock.setFlammable(Blocks.RED_TULIP, 60, 100);
- fireblock.setFlammable(Blocks.ORANGE_TULIP, 60, 100);
- fireblock.setFlammable(Blocks.WHITE_TULIP, 60, 100);
- fireblock.setFlammable(Blocks.PINK_TULIP, 60, 100);
- fireblock.setFlammable(Blocks.OXEYE_DAISY, 60, 100);
- fireblock.setFlammable(Blocks.CORNFLOWER, 60, 100);
- fireblock.setFlammable(Blocks.LILY_OF_THE_VALLEY, 60, 100);
- fireblock.setFlammable(Blocks.TORCHFLOWER, 60, 100);
- fireblock.setFlammable(Blocks.PITCHER_PLANT, 60, 100);
- fireblock.setFlammable(Blocks.WITHER_ROSE, 60, 100);
- fireblock.setFlammable(Blocks.PINK_PETALS, 60, 100);
- fireblock.setFlammable(Blocks.WHITE_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.ORANGE_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.MAGENTA_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.LIGHT_BLUE_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.YELLOW_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.LIME_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.PINK_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.GRAY_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.LIGHT_GRAY_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.CYAN_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.PURPLE_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.BLUE_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.BROWN_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.GREEN_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.RED_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.BLACK_WOOL, 30, 60);
- fireblock.setFlammable(Blocks.VINE, 15, 100);
- fireblock.setFlammable(Blocks.COAL_BLOCK, 5, 5);
- fireblock.setFlammable(Blocks.HAY_BLOCK, 60, 20);
- fireblock.setFlammable(Blocks.TARGET, 15, 20);
- fireblock.setFlammable(Blocks.WHITE_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.ORANGE_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.MAGENTA_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.LIGHT_BLUE_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.YELLOW_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.LIME_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.PINK_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.GRAY_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.LIGHT_GRAY_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.CYAN_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.PURPLE_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.BLUE_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.BROWN_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.GREEN_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.RED_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.BLACK_CARPET, 60, 20);
- fireblock.setFlammable(Blocks.DRIED_KELP_BLOCK, 30, 60);
- fireblock.setFlammable(Blocks.BAMBOO, 60, 60);
- fireblock.setFlammable(Blocks.SCAFFOLDING, 60, 60);
- fireblock.setFlammable(Blocks.LECTERN, 30, 20);
- fireblock.setFlammable(Blocks.COMPOSTER, 5, 20);
- fireblock.setFlammable(Blocks.SWEET_BERRY_BUSH, 60, 100);
- fireblock.setFlammable(Blocks.BEEHIVE, 5, 20);
- fireblock.setFlammable(Blocks.BEE_NEST, 30, 20);
- fireblock.setFlammable(Blocks.AZALEA_LEAVES, 30, 60);
- fireblock.setFlammable(Blocks.FLOWERING_AZALEA_LEAVES, 30, 60);
- fireblock.setFlammable(Blocks.CAVE_VINES, 15, 60);
- fireblock.setFlammable(Blocks.CAVE_VINES_PLANT, 15, 60);
- fireblock.setFlammable(Blocks.SPORE_BLOSSOM, 60, 100);
- fireblock.setFlammable(Blocks.AZALEA, 30, 60);
- fireblock.setFlammable(Blocks.FLOWERING_AZALEA, 30, 60);
- fireblock.setFlammable(Blocks.BIG_DRIPLEAF, 60, 100);
- fireblock.setFlammable(Blocks.BIG_DRIPLEAF_STEM, 60, 100);
- fireblock.setFlammable(Blocks.SMALL_DRIPLEAF, 60, 100);
- fireblock.setFlammable(Blocks.HANGING_ROOTS, 30, 60);
- fireblock.setFlammable(Blocks.GLOW_LICHEN, 15, 100);
+ blockfire.setFlammable(Blocks.OAK_PLANKS, 5, 20);
+ blockfire.setFlammable(Blocks.SPRUCE_PLANKS, 5, 20);
+ blockfire.setFlammable(Blocks.BIRCH_PLANKS, 5, 20);
+ blockfire.setFlammable(Blocks.JUNGLE_PLANKS, 5, 20);
+ blockfire.setFlammable(Blocks.ACACIA_PLANKS, 5, 20);
+ blockfire.setFlammable(Blocks.CHERRY_PLANKS, 5, 20);
+ blockfire.setFlammable(Blocks.DARK_OAK_PLANKS, 5, 20);
+ blockfire.setFlammable(Blocks.MANGROVE_PLANKS, 5, 20);
+ blockfire.setFlammable(Blocks.BAMBOO_PLANKS, 5, 20);
+ blockfire.setFlammable(Blocks.BAMBOO_MOSAIC, 5, 20);
+ blockfire.setFlammable(Blocks.OAK_SLAB, 5, 20);
+ blockfire.setFlammable(Blocks.SPRUCE_SLAB, 5, 20);
+ blockfire.setFlammable(Blocks.BIRCH_SLAB, 5, 20);
+ blockfire.setFlammable(Blocks.JUNGLE_SLAB, 5, 20);
+ blockfire.setFlammable(Blocks.ACACIA_SLAB, 5, 20);
+ blockfire.setFlammable(Blocks.CHERRY_SLAB, 5, 20);
+ blockfire.setFlammable(Blocks.DARK_OAK_SLAB, 5, 20);
+ blockfire.setFlammable(Blocks.MANGROVE_SLAB, 5, 20);
+ blockfire.setFlammable(Blocks.BAMBOO_SLAB, 5, 20);
+ blockfire.setFlammable(Blocks.BAMBOO_MOSAIC_SLAB, 5, 20);
+ blockfire.setFlammable(Blocks.OAK_FENCE_GATE, 5, 20);
+ blockfire.setFlammable(Blocks.SPRUCE_FENCE_GATE, 5, 20);
+ blockfire.setFlammable(Blocks.BIRCH_FENCE_GATE, 5, 20);
+ blockfire.setFlammable(Blocks.JUNGLE_FENCE_GATE, 5, 20);
+ blockfire.setFlammable(Blocks.ACACIA_FENCE_GATE, 5, 20);
+ blockfire.setFlammable(Blocks.CHERRY_FENCE_GATE, 5, 20);
+ blockfire.setFlammable(Blocks.DARK_OAK_FENCE_GATE, 5, 20);
+ blockfire.setFlammable(Blocks.MANGROVE_FENCE_GATE, 5, 20);
+ blockfire.setFlammable(Blocks.BAMBOO_FENCE_GATE, 5, 20);
+ blockfire.setFlammable(Blocks.OAK_FENCE, 5, 20);
+ blockfire.setFlammable(Blocks.SPRUCE_FENCE, 5, 20);
+ blockfire.setFlammable(Blocks.BIRCH_FENCE, 5, 20);
+ blockfire.setFlammable(Blocks.JUNGLE_FENCE, 5, 20);
+ blockfire.setFlammable(Blocks.ACACIA_FENCE, 5, 20);
+ blockfire.setFlammable(Blocks.CHERRY_FENCE, 5, 20);
+ blockfire.setFlammable(Blocks.DARK_OAK_FENCE, 5, 20);
+ blockfire.setFlammable(Blocks.MANGROVE_FENCE, 5, 20);
+ blockfire.setFlammable(Blocks.BAMBOO_FENCE, 5, 20);
+ blockfire.setFlammable(Blocks.OAK_STAIRS, 5, 20);
+ blockfire.setFlammable(Blocks.BIRCH_STAIRS, 5, 20);
+ blockfire.setFlammable(Blocks.SPRUCE_STAIRS, 5, 20);
+ blockfire.setFlammable(Blocks.JUNGLE_STAIRS, 5, 20);
+ blockfire.setFlammable(Blocks.ACACIA_STAIRS, 5, 20);
+ blockfire.setFlammable(Blocks.CHERRY_STAIRS, 5, 20);
+ blockfire.setFlammable(Blocks.DARK_OAK_STAIRS, 5, 20);
+ blockfire.setFlammable(Blocks.MANGROVE_STAIRS, 5, 20);
+ blockfire.setFlammable(Blocks.BAMBOO_STAIRS, 5, 20);
+ blockfire.setFlammable(Blocks.BAMBOO_MOSAIC_STAIRS, 5, 20);
+ blockfire.setFlammable(Blocks.OAK_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.SPRUCE_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.BIRCH_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.JUNGLE_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.ACACIA_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.CHERRY_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.DARK_OAK_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.MANGROVE_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.BAMBOO_BLOCK, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_OAK_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_SPRUCE_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_BIRCH_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_JUNGLE_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_ACACIA_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_CHERRY_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_DARK_OAK_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_MANGROVE_LOG, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_BAMBOO_BLOCK, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_OAK_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_SPRUCE_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_BIRCH_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_JUNGLE_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_ACACIA_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_CHERRY_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_DARK_OAK_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.STRIPPED_MANGROVE_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.OAK_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.SPRUCE_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.BIRCH_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.JUNGLE_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.ACACIA_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.CHERRY_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.DARK_OAK_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.MANGROVE_WOOD, 5, 5);
+ blockfire.setFlammable(Blocks.MANGROVE_ROOTS, 5, 20);
+ blockfire.setFlammable(Blocks.OAK_LEAVES, 30, 60);
+ blockfire.setFlammable(Blocks.SPRUCE_LEAVES, 30, 60);
+ blockfire.setFlammable(Blocks.BIRCH_LEAVES, 30, 60);
+ blockfire.setFlammable(Blocks.JUNGLE_LEAVES, 30, 60);
+ blockfire.setFlammable(Blocks.ACACIA_LEAVES, 30, 60);
+ blockfire.setFlammable(Blocks.CHERRY_LEAVES, 30, 60);
+ blockfire.setFlammable(Blocks.DARK_OAK_LEAVES, 30, 60);
+ blockfire.setFlammable(Blocks.MANGROVE_LEAVES, 30, 60);
+ blockfire.setFlammable(Blocks.BOOKSHELF, 30, 20);
+ blockfire.setFlammable(Blocks.TNT, 15, 100);
+ blockfire.setFlammable(Blocks.SHORT_GRASS, 60, 100);
+ blockfire.setFlammable(Blocks.FERN, 60, 100);
+ blockfire.setFlammable(Blocks.DEAD_BUSH, 60, 100);
+ blockfire.setFlammable(Blocks.SUNFLOWER, 60, 100);
+ blockfire.setFlammable(Blocks.LILAC, 60, 100);
+ blockfire.setFlammable(Blocks.ROSE_BUSH, 60, 100);
+ blockfire.setFlammable(Blocks.PEONY, 60, 100);
+ blockfire.setFlammable(Blocks.TALL_GRASS, 60, 100);
+ blockfire.setFlammable(Blocks.LARGE_FERN, 60, 100);
+ blockfire.setFlammable(Blocks.DANDELION, 60, 100);
+ blockfire.setFlammable(Blocks.POPPY, 60, 100);
+ blockfire.setFlammable(Blocks.BLUE_ORCHID, 60, 100);
+ blockfire.setFlammable(Blocks.ALLIUM, 60, 100);
+ blockfire.setFlammable(Blocks.AZURE_BLUET, 60, 100);
+ blockfire.setFlammable(Blocks.RED_TULIP, 60, 100);
+ blockfire.setFlammable(Blocks.ORANGE_TULIP, 60, 100);
+ blockfire.setFlammable(Blocks.WHITE_TULIP, 60, 100);
+ blockfire.setFlammable(Blocks.PINK_TULIP, 60, 100);
+ blockfire.setFlammable(Blocks.OXEYE_DAISY, 60, 100);
+ blockfire.setFlammable(Blocks.CORNFLOWER, 60, 100);
+ blockfire.setFlammable(Blocks.LILY_OF_THE_VALLEY, 60, 100);
+ blockfire.setFlammable(Blocks.TORCHFLOWER, 60, 100);
+ blockfire.setFlammable(Blocks.PITCHER_PLANT, 60, 100);
+ blockfire.setFlammable(Blocks.WITHER_ROSE, 60, 100);
+ blockfire.setFlammable(Blocks.PINK_PETALS, 60, 100);
+ blockfire.setFlammable(Blocks.WHITE_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.ORANGE_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.MAGENTA_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.LIGHT_BLUE_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.YELLOW_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.LIME_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.PINK_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.GRAY_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.LIGHT_GRAY_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.CYAN_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.PURPLE_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.BLUE_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.BROWN_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.GREEN_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.RED_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.BLACK_WOOL, 30, 60);
+ blockfire.setFlammable(Blocks.VINE, 15, 100);
+ blockfire.setFlammable(Blocks.COAL_BLOCK, 5, 5);
+ blockfire.setFlammable(Blocks.HAY_BLOCK, 60, 20);
+ blockfire.setFlammable(Blocks.TARGET, 15, 20);
+ blockfire.setFlammable(Blocks.WHITE_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.ORANGE_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.MAGENTA_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.LIGHT_BLUE_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.YELLOW_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.LIME_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.PINK_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.GRAY_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.LIGHT_GRAY_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.CYAN_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.PURPLE_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.BLUE_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.BROWN_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.GREEN_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.RED_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.BLACK_CARPET, 60, 20);
+ blockfire.setFlammable(Blocks.DRIED_KELP_BLOCK, 30, 60);
+ blockfire.setFlammable(Blocks.BAMBOO, 60, 60);
+ blockfire.setFlammable(Blocks.SCAFFOLDING, 60, 60);
+ blockfire.setFlammable(Blocks.LECTERN, 30, 20);
+ blockfire.setFlammable(Blocks.COMPOSTER, 5, 20);
+ blockfire.setFlammable(Blocks.SWEET_BERRY_BUSH, 60, 100);
+ blockfire.setFlammable(Blocks.BEEHIVE, 5, 20);
+ blockfire.setFlammable(Blocks.BEE_NEST, 30, 20);
+ blockfire.setFlammable(Blocks.AZALEA_LEAVES, 30, 60);
+ blockfire.setFlammable(Blocks.FLOWERING_AZALEA_LEAVES, 30, 60);
+ blockfire.setFlammable(Blocks.CAVE_VINES, 15, 60);
+ blockfire.setFlammable(Blocks.CAVE_VINES_PLANT, 15, 60);
+ blockfire.setFlammable(Blocks.SPORE_BLOSSOM, 60, 100);
+ blockfire.setFlammable(Blocks.AZALEA, 30, 60);
+ blockfire.setFlammable(Blocks.FLOWERING_AZALEA, 30, 60);
+ blockfire.setFlammable(Blocks.BIG_DRIPLEAF, 60, 100);
+ blockfire.setFlammable(Blocks.BIG_DRIPLEAF_STEM, 60, 100);
+ blockfire.setFlammable(Blocks.SMALL_DRIPLEAF, 60, 100);
+ blockfire.setFlammable(Blocks.HANGING_ROOTS, 30, 60);
+ blockfire.setFlammable(Blocks.GLOW_LICHEN, 15, 100);
}
}
|