MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / extinguishFire

Method extinguishFire

src/main/java/net/minecraft/world/World.java:2273–2287  ·  view source on GitHub ↗

Attempts to extinguish a fire @param player The player putting out the fire @param pos The coordinates of the fire @param side The side from which the player is putting out the fire from

(EntityPlayer player, BlockPos pos, EnumFacing side)

Source from the content-addressed store, hash-verified

2271 * @param side The side from which the player is putting out the fire from
2272 */
2273 public boolean extinguishFire(EntityPlayer player, BlockPos pos, EnumFacing side)
2274 {
2275 pos = pos.offset(side);
2276
2277 if (this.getBlockState(pos).getBlock() == Blocks.fire)
2278 {
2279 this.playAuxSFXAtEntity(player, 1004, pos, 0);
2280 this.setBlockToAir(pos);
2281 return true;
2282 }
2283 else
2284 {
2285 return false;
2286 }
2287 }
2288
2289 /**
2290 * This string is 'All: (number of loaded entities)' Viewable by press ing F3

Callers 2

clickBlockCreativeMethod · 0.80
onBlockClickedMethod · 0.80

Calls 5

getBlockStateMethod · 0.95
playAuxSFXAtEntityMethod · 0.95
setBlockToAirMethod · 0.95
getBlockMethod · 0.65
offsetMethod · 0.45

Tested by

no test coverage detected