Class EnvironmentAttributeSystem
java.lang.Object
net.minecraft.world.attribute.EnvironmentAttributeSystem
- All Implemented Interfaces:
EnvironmentAttributeReader
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprivate static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<EnvironmentAttribute<?>, EnvironmentAttributeSystem.ValueSampler<?>> Fields inherited from interface EnvironmentAttributeReader
EMPTY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateEnvironmentAttributeSystem(Map<EnvironmentAttribute<?>, List<EnvironmentAttributeLayer<?>>> layersByAttribute) -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddBiomeLayer(EnvironmentAttributeSystem.Builder builder, HolderLookup<Biome> biomes, BiomeManager biomeManager) private static <Value> voidaddBiomeLayerForAttribute(EnvironmentAttributeSystem.Builder builder, EnvironmentAttribute<Value> attribute, BiomeManager biomeManager) private static voidaddDefaultLayers(EnvironmentAttributeSystem.Builder builder, Level level) private static voidaddDimensionLayer(EnvironmentAttributeSystem.Builder builder, DimensionType dimensionType) private <Value> EnvironmentAttributeSystem.ValueSampler<Value> bakeLayerSampler(EnvironmentAttribute<Value> attribute, List<? extends EnvironmentAttributeLayer<?>> untypedLayers) builder()(package private) <Value> ValuegetConstantBaseValue(EnvironmentAttribute<Value> attribute) <Value> ValuegetDimensionValue(EnvironmentAttribute<Value> attribute) <Value> ValuegetValue(EnvironmentAttribute<Value> attribute, Vec3 pos, @Nullable SpatialAttributeInterpolator biomeInterpolator) private <Value> @Nullable EnvironmentAttributeSystem.ValueSampler<Value> getValueSampler(EnvironmentAttribute<Value> attribute) void(package private) booleanisAffectedByPosition(EnvironmentAttribute<?> attribute) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EnvironmentAttributeReader
getValue, getValue
-
Field Details
-
attributeSamplers
private final Map<EnvironmentAttribute<?>, EnvironmentAttributeSystem.ValueSampler<?>> attributeSamplers
-
-
Constructor Details
-
EnvironmentAttributeSystem
private EnvironmentAttributeSystem(Map<EnvironmentAttribute<?>, List<EnvironmentAttributeLayer<?>>> layersByAttribute)
-
-
Method Details
-
bakeLayerSampler
private <Value> EnvironmentAttributeSystem.ValueSampler<Value> bakeLayerSampler(EnvironmentAttribute<Value> attribute, List<? extends EnvironmentAttributeLayer<?>> untypedLayers) -
builder
-
addDefaultLayers
-
addDimensionLayer
private static void addDimensionLayer(EnvironmentAttributeSystem.Builder builder, DimensionType dimensionType) -
addBiomeLayer
private static void addBiomeLayer(EnvironmentAttributeSystem.Builder builder, HolderLookup<Biome> biomes, BiomeManager biomeManager) -
addBiomeLayerForAttribute
private static <Value> void addBiomeLayerForAttribute(EnvironmentAttributeSystem.Builder builder, EnvironmentAttribute<Value> attribute, BiomeManager biomeManager) -
invalidateTickCache
public void invalidateTickCache() -
getValueSampler
private <Value> @Nullable EnvironmentAttributeSystem.ValueSampler<Value> getValueSampler(EnvironmentAttribute<Value> attribute) -
getDimensionValue
- Specified by:
getDimensionValuein interfaceEnvironmentAttributeReader
-
getValue
public <Value> Value getValue(EnvironmentAttribute<Value> attribute, Vec3 pos, @Nullable SpatialAttributeInterpolator biomeInterpolator) - Specified by:
getValuein interfaceEnvironmentAttributeReader
-
getConstantBaseValue
-
isAffectedByPosition
-