package com.hypixel.hytale.builtin.hytalegenerator.materialproviders; import javax.annotation.Nonnull; import javax.annotation.Nullable; public class UpwardDepthMaterialProvider extends MaterialProvider { @Nonnull private final MaterialProvider materialProvider; private final int depth; public UpwardDepthMaterialProvider(@Nonnull MaterialProvider materialProvider, int depth) { this.materialProvider = materialProvider; this.depth = depth; } @Nullable @Override public V getVoxelTypeAt(@Nonnull MaterialProvider.Context context) { return this.depth != context.depthIntoCeiling ? null : this.materialProvider.getVoxelTypeAt(context); } }