Javadoc the base propgation rules interface
/**
* Rules to drive value propagation.
- *
*/
public interface PropagationRules {
/**
+ * TODO: Document when this method is understood
* @param block
* @return The value of provided by the given block
*/
byte getFixedValue(Block block, Vector3i pos);
/**
- * @param newBlock
- * @param oldBlock
- * @param side
- * @return The change in propagation switching from oldBlock to newBlock, on the given side
+ * Compare the how the propagation changes if you replace the block with a different one, on a given side
+ *
+ * @param newBlock The new block
+ * @param oldBlock THe original block
+ * @param side The side to check on
+ * @return How the propagation rules change
*/
PropagationComparison comparePropagation(Block newBlock, Block oldBlock, Side side);
/**
- * @param existingValue
- * @param side
- * @param from the block the value is leaving
- * @return The value propagate in the given direction from an existing value
+ * Get the new value after propgating in a specified manner
+ *
+ * @param existingValue The value to propagate
+ * @param side The side the value is leaving by
+ * @param from The block the value is leaving
+ * @return The new value to set at the block position
*/
byte propagateValue(byte existingValue, Side side, Block from);
/**
- * @return The maximum value
+ * @return The maximum value possible for this data
*/
byte getMaxValue();
/**
- * @param block
- * @param side
+ * Checks if the value can leave a given block, through a specific side
+ *
+ * @param block The block to leave
+ * @param side The side to leave by
* @return Whether the given block can propagated out through side
*/
boolean canSpreadOutOf(Block block, Side side);
/**
- * @param block
- * @param side
- * @return Whether the given block can be propagated into through side
+ * Checks if the value can propagate into a given block, through a specific side
+ *
+ * @param block The block to propagate into
+ * @param side The side to propagate via
+ * @return Whether the given block can be propagated
+ * into through side
*/
boolean canSpreadInto(Block block, Side side);
/**
- * @param chunk
- * @param pos
+ * Get the value of a given position
+ *
+ * @param chunk The chunk the position is in
+ * @param pos The position to get from
* @return The value of the given position of a chunk
*/
byte getValue(LitChunk chunk, Vector3i pos);
+ /**
+ * See {@link #getValue(LitChunk, Vector3i)}
+ *
+ * @param chunk The chunk the position is in
+ * @param x The x position
+ * @param y The y position
+ * @param z THe z position
+ * @return The value at the posiiton int he given chunk
+ */
byte getValue(LitChunk chunk, int x, int y, int z);
/**
* Sets the value for a given chunk position
*
- * @param chunk
- * @param pos
- * @param value
+ * @param chunk The chunk the position is in
+ * @param pos The position to set at
+ * @param value The value to set to
*/
void setValue(LitChunk chunk, Vector3i pos, byte value);
}
