[ci skip] Cleanup events (#10202)
This commit is contained in:
@@ -18,19 +18,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
if (!state.canSurvive(world, pos)) {
|
||||
this.fireExtinguished(world, pos); // CraftBukkit - invalid place location
|
||||
@@ -0,0 +0,0 @@ public class FireBlock extends BaseFireBlock {
|
||||
public void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, UseOnContext itemActionContext) {
|
||||
super.onPlace(iblockdata, world, blockposition, iblockdata1, flag, itemActionContext);
|
||||
// Paper end - ItemActionContext param
|
||||
- world.scheduleTick(blockposition, this, getFireTickDelay(world.random));
|
||||
+ world.scheduleTick(blockposition, this, getFireTickDelay(world)); // Paper - Add fire-tick-delay option
|
||||
public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify, net.minecraft.world.item.context.UseOnContext context) {
|
||||
super.onPlace(state, world, pos, oldState, notify, context);
|
||||
// Paper end - UseOnContext param
|
||||
- world.scheduleTick(pos, (Block) this, FireBlock.getFireTickDelay(world.random));
|
||||
+ world.scheduleTick(pos, (Block) this, FireBlock.getFireTickDelay(world)); // Paper - Add fire-tick-delay option
|
||||
}
|
||||
|
||||
- private static int getFireTickDelay(RandomSource random) {
|
||||
- return 30 + random.nextInt(10);
|
||||
+ // Paper start - Add fire-tick-delay option
|
||||
+ private static int getFireTickDelay(Level world) {
|
||||
+ return world.paperConfig().environment.fireTickDelay + world.random.nextInt(10);
|
||||
+ // Paper end - Add fire-tick-delay option
|
||||
+ private static int getFireTickDelay(Level world) { // Paper - Add fire-tick-delay option
|
||||
+ return world.paperConfig().environment.fireTickDelay + world.random.nextInt(10); // Paper - Add fire-tick-delay option
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user