mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
Do not spawn fire for visual lightning (#11845)
This commit is contained in:
@@ -48,7 +48,12 @@
|
|||||||
List<Entity> entities = this.level()
|
List<Entity> entities = this.level()
|
||||||
.getEntities(
|
.getEntities(
|
||||||
this,
|
this,
|
||||||
@@ -172,22 +_,30 @@
|
@@ -168,26 +_,34 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
private void spawnFire(int extraIgnitions) {
|
||||||
|
- if (!this.visualOnly && this.level() instanceof ServerLevel serverLevel && serverLevel.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) {
|
||||||
|
+ if (!this.visualOnly && !this.isEffect && this.level() instanceof ServerLevel serverLevel && serverLevel.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) { // Paper - prevent any fire if only effect
|
||||||
BlockPos blockPos = this.blockPosition();
|
BlockPos blockPos = this.blockPosition();
|
||||||
BlockState state = BaseFireBlock.getState(this.level(), blockPos);
|
BlockState state = BaseFireBlock.getState(this.level(), blockPos);
|
||||||
if (this.level().getBlockState(blockPos).isAir() && state.canSurvive(this.level(), blockPos)) {
|
if (this.level().getBlockState(blockPos).isAir() && state.canSurvive(this.level(), blockPos)) {
|
||||||
|
Reference in New Issue
Block a user