HyCodeYourTale
classpublicPriority 3

DownwardDepthMaterialProvider

com.hypixel.hytale.builtin.hytalegenerator.materialproviders.DownwardDepthMaterialProvider

extends MaterialProvider

1

Methods

1

Public Methods

2

Fields

1

Constructors

Constructors

public
DownwardDepthMaterialProvider(MaterialProvider<V> materialProvider, int depth)

Methods

Public Methods (1)

public
V getVoxelTypeAt(MaterialProvider.Context context)
@Nullable@Override

Fields

Private/Package Fields (2)

privateint depth
privateMaterialProvider<V> materialProvider

Inheritance

Parent
Current
Interface
Child

Use mouse wheel to zoom, drag to pan. Click nodes to navigate.

Source Code

package com.hypixel.hytale.builtin.hytalegenerator.materialproviders;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

public class DownwardDepthMaterialProvider<V> extends MaterialProvider<V> {
   @Nonnull
   private final MaterialProvider<V> materialProvider;
   private final int depth;

   public DownwardDepthMaterialProvider(@Nonnull MaterialProvider<V> materialProvider, int depth) {
      this.materialProvider = materialProvider;
      this.depth = depth;
   }

   @Nullable
   @Override
   public V getVoxelTypeAt(@Nonnull MaterialProvider.Context context) {
      return this.depth != context.depthIntoFloor ? null : this.materialProvider.getVoxelTypeAt(context);
   }
}