Laser Drill (MineFactory Reloaded)

The Laser Drill is one of the most advanced machines in MineFactory Reloaded. It consumes enormous amounts of energy to artificially create ore blocks.

Unlike all other MFR machines, the Laser Drill does not directly accept energy. It is powered by up to four nearby Laser Drill Prechargers.

Usage
The Laser Drill cannot simply be placed and powered to run. First, it must have a direct view of either Bedrock or the Void. (Nothing can be placed below it, even transparent blocks.) Next, each of its four sides must be unobstructed, and a Laser Drill Precharger should be placed one block away from each side, facing the Laser Drill. If the setup has been done correctly, lasers (beacon beams) will connect the Prechargers to the Drill, and another laser will extend from the bottom of the Drill down to Bedrock (or the Void). The top face of the Laser Drill should have a Chest or other inventory placed on it, as the Drill will automatically push ores out its top face. (If no chest is placed, the ore blocks will be pushed out as item entities.)

Warning: The laser extending below the Laser Drill will set fire to all entities that touch it.

Every tick, all energy stored in all connected Laser Drill Prechargers will be transferred from the Prechargers to the Drill. When the Drill contains sufficient RF, it will consume it to produce 1 work unit. When the Drill reaches 300 work units (by default, configurable), it generates one random ore block and starts again.

The energy per work consumed by a Laser Drill is determined by the altitude of the Drill, using the formula:

energyPerWorkHere = _energyPerWork * (1.2f - 0.4f * Math.min(yCoord - _bedrockLevel, 128f) / 128f)

_energyPerWork is equal to 10,000RF, and _bedrockLevel is equal to the altitude of the nearest block of Bedrock directly below the Drill. If there is no Bedrock below the drill, this value equals 0. The effect of this is that when a Laser Drill is at Bedrock Level, it costs 12,000RF per Work Unit (3,600,000RF per Ore block), and when it is 128 or more blocks above Bedrock, it costs 8,000RF per Work Unit (2,400,000RF per Ore block).