package com.hypixel.hytale.builtin.hytalegenerator.props.filler; import com.hypixel.hytale.builtin.hytalegenerator.props.ScanResult; import com.hypixel.hytale.math.vector.Vector3i; import java.util.List; import javax.annotation.Nonnull; import javax.annotation.Nullable; public class FillerPropScanResult implements ScanResult { private List positions; public FillerPropScanResult(@Nullable List positions) { if (positions != null) { this.positions = positions; } } @Nullable public List getFluidBlocks() { return this.positions; } @Nonnull public static FillerPropScanResult cast(ScanResult scanResult) { if (!(scanResult instanceof FillerPropScanResult)) { throw new IllegalArgumentException("The provided ScanResult isn't compatible with this prop."); } else { return (FillerPropScanResult)scanResult; } } @Override public boolean isNegative() { return this.positions == null || this.positions.isEmpty(); } }