src/main/java/dev/rlnt/energymeter/meter/MeterTile.java
public void updateCache(Direction direction) {
        if (level == null || level.isClientSide) return;

        IO_SETTING setting = sideConfig.get(direction);
        if (setting == IO_SETTING.IN) {
            hasValidInput = getInputFromCache(direction);
        } else if (setting == IO_SETTING.OUT) {
            getOutputFromCache(direction);
        }
        if (!sideConfig.hasInput()) {
            hasValidInput = false;
            inputCache = null;
        }
    }
/**
     * Updates the cached input and output values depending on the {@link Direction}.
     * This ensures that the current status is always up-to-date.
     *
     * @param direction the {@link Direction} to update the cache for
     */
Updates the cached input and output values depending on the  Direction.
This ensures that the current status is always up-to-date.

@param direction the  Direction to update the cache for
Updates the cached input and output values depending on the Direction . This ensures that the current status is always up - to - date . @param direction the Direction to update the cache for
public void updateCache(Direction direction) {
        if (level == null || level.isClientSide) return;
        IO_SETTING setting = sideConfig.get(direction);
        if (setting == IO_SETTING.IN) {
            hasValidInput = getInputFromCache(direction);
        } else if (setting == IO_SETTING.OUT) {
            getOutputFromCache(direction);
        }
        if (!sideConfig.hasInput()) {
            hasValidInput = false;
            inputCache = null;
        }
    }
public void updateCache ( Direction direction ) { if ( level == null || level . isClientSide ) return ; IO_SETTING setting = sideConfig . get ( direction ) ; if ( setting == IO_SETTING . IN ) { hasValidInput = getInputFromCache ( direction ) ; } else if ( setting == IO_SETTING . OUT ) { getOutputFromCache ( direction ) ; } if ( ! sideConfig . hasInput ( ) ) { hasValidInput = false ; inputCache = null ; } }
Updates the cached input and output values depending on the {@link Direction}.
Updates the cached input and output values depending on the { @link Direction } .