[ci skip] Add more identifying patch comments
This commit is contained in:
@@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
this.powerLightningRod();
|
||||
- LightningBolt.clearCopperOnLightningStrike(this.level(), this.getStrikePosition());
|
||||
+ LightningBolt.clearCopperOnLightningStrike(this.level(), this.getStrikePosition(), this); // Paper - transmit LightningBolt instance to call EntityChangeBlockEvent
|
||||
+ LightningBolt.clearCopperOnLightningStrike(this.level(), this.getStrikePosition(), this); // Paper - Call EntityChangeBlockEvent
|
||||
this.gameEvent(GameEvent.LIGHTNING_STRIKE);
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
}
|
||||
|
||||
- private static void clearCopperOnLightningStrike(Level world, BlockPos pos) {
|
||||
+ private static void clearCopperOnLightningStrike(Level world, BlockPos pos, Entity lightning) { // Paper - transmit LightningBolt instance to call EntityChangeBlockEvent
|
||||
+ private static void clearCopperOnLightningStrike(Level world, BlockPos pos, Entity lightning) { // Paper - Call EntityChangeBlockEvent
|
||||
BlockState iblockdata = world.getBlockState(pos);
|
||||
BlockPos blockposition1;
|
||||
BlockState iblockdata1;
|
||||
@@ -32,12 +32,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
if (iblockdata1.getBlock() instanceof WeatheringCopper) {
|
||||
- world.setBlockAndUpdate(blockposition1, WeatheringCopper.getFirst(world.getBlockState(blockposition1)));
|
||||
+ // Paper start - call EntityChangeBlockEvent
|
||||
+ // Paper start - Call EntityChangeBlockEvent
|
||||
+ BlockState newBlock = WeatheringCopper.getFirst(world.getBlockState(blockposition1));
|
||||
+ if (CraftEventFactory.callEntityChangeBlockEvent(lightning, blockposition1, newBlock)) {
|
||||
+ world.setBlockAndUpdate(blockposition1, newBlock);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Call EntityChangeBlockEvent
|
||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = pos.mutable();
|
||||
int i = world.random.nextInt(3) + 3;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user