Package net.minecraft.world.attribute
Class EnvironmentAttributeSystem
java.lang.Object
net.minecraft.world.attribute.EnvironmentAttributeSystem
- All Implemented Interfaces:
EnvironmentAttributeReader
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Map<EnvironmentAttribute<?>, EnvironmentAttributeSystem.ValueSampler<?>> Fields inherited from interface net.minecraft.world.attribute.EnvironmentAttributeReader
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionEnvironmentAttributeSystem(Map<EnvironmentAttribute<?>, List<EnvironmentAttributeLayer<?>>> attributes) -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddBiomeLayer(EnvironmentAttributeSystem.Builder builder, HolderLookup<Biome> biome, BiomeManager biomeManager) private static <Value> voidaddBiomeLayerForAttribute(EnvironmentAttributeSystem.Builder builder, EnvironmentAttribute<Value> attribute, BiomeManager biomeManager) (package private) static voidaddDefaultLayers(EnvironmentAttributeSystem.Builder builder, Level level) private static voidaddDimensionLayer(EnvironmentAttributeSystem.Builder builder, DimensionType dimension) private <Value> EnvironmentAttributeSystem.ValueSampler<Value> bakeLayerSampler(EnvironmentAttribute<Value> attribute, List<? extends EnvironmentAttributeLayer<?>> layers) builder()(package private) <Value> ValuegetConstantBaseValue(EnvironmentAttribute<Value> attribute) <Value> ValuegetDimensionValue(EnvironmentAttribute<Value> p_457805_) <Value> ValuegetValue(EnvironmentAttribute<Value> p_458091_, Vec3 p_458226_, @Nullable SpatialAttributeInterpolator p_458292_) private <Value> @Nullable EnvironmentAttributeSystem.ValueSampler<Value> getValueSampler(EnvironmentAttribute<Value> attribute) void(package private) booleanisAffectedByPosition(EnvironmentAttribute<?> attribute) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.attribute.EnvironmentAttributeReader
getValue, getValue
-
Field Details
-
attributeSamplers
private final Map<EnvironmentAttribute<?>,EnvironmentAttributeSystem.ValueSampler<?>> attributeSamplers
-
-
Constructor Details
-
EnvironmentAttributeSystem
EnvironmentAttributeSystem(Map<EnvironmentAttribute<?>, List<EnvironmentAttributeLayer<?>>> attributes)
-
-
Method Details
-
bakeLayerSampler
private <Value> EnvironmentAttributeSystem.ValueSampler<Value> bakeLayerSampler(EnvironmentAttribute<Value> attribute, List<? extends EnvironmentAttributeLayer<?>> layers) -
builder
-
addDefaultLayers
-
addDimensionLayer
private static void addDimensionLayer(EnvironmentAttributeSystem.Builder builder, DimensionType dimension) -
addBiomeLayer
private static void addBiomeLayer(EnvironmentAttributeSystem.Builder builder, HolderLookup<Biome> biome, 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> p_458091_, Vec3 p_458226_, @Nullable SpatialAttributeInterpolator p_458292_) - Specified by:
getValuein interfaceEnvironmentAttributeReader
-
getConstantBaseValue
-
isAffectedByPosition
-