Biome internal mappings (not new biome types) (#1087)

* Biome internal mappings (not new biome types)

Signed-off-by: liach <liach@users.noreply.github.com>

* SpecialEffects -> Effects
unpackRgb

* Better names, I guess

This time mojang teaches us 4-D cartesian plane and hyperbola

Signed-off-by: liach <liach@users.noreply.github.com>

* Bit more stuff

Signed-off-by: liach <liach@users.noreply.github.com>

* penalty -> distance

Signed-off-by: liach <liach@users.noreply.github.com>
This commit is contained in:
liach 2020-02-06 14:02:40 -06:00 committed by GitHub
parent e8a95c0d83
commit fe63d5e738
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 107 additions and 5 deletions

View File

@ -77,6 +77,7 @@ CLASS net/minecraft/class_638 net/minecraft/client/world/ClientWorld
ARG 4 radius
ARG 5 random
ARG 6 spawnBarrierParticles
ARG 7 pos
METHOD method_2944 setScoreboard (Lnet/minecraft/class_269;)V
ARG 1 scoreboard
METHOD method_2945 removeEntity (I)V

View File

@ -50,3 +50,5 @@ CLASS net/minecraft/class_243 net/minecraft/util/math/Vec3d
METHOD method_18806 multiply (Lnet/minecraft/class_243;)Lnet/minecraft/class_243;
ARG 1 mult
METHOD method_22882 negate ()Lnet/minecraft/class_243;
METHOD method_24457 unpackRgb (I)Lnet/minecraft/class_243;
ARG 0 rgb

View File

@ -1,6 +1,8 @@
CLASS net/minecraft/class_1959 net/minecraft/world/biome/Biome
FIELD field_20335 temperatureCache Ljava/lang/ThreadLocal;
FIELD field_21806 skyColor I
FIELD field_22039 effects Lnet/minecraft/class_4763;
FIELD field_22040 noisePoints Ljava/util/List;
FIELD field_9323 BIOMES Ljava/util/Set;
FIELD field_9324 FOLIAGE_NOISE Lnet/minecraft/class_3543;
FIELD field_9325 spawns Ljava/util/Map;
@ -25,6 +27,11 @@ CLASS net/minecraft/class_1959 net/minecraft/world/biome/Biome
METHOD method_21740 getTemperature (Lnet/minecraft/class_2338;)F
ARG 1 blockPos
METHOD method_24218 calculateSkyColor ()I
METHOD method_24374 getNoiseDistance (Lnet/minecraft/class_1959$class_4762;)F
ARG 1 from
METHOD method_24376 getFogColor ()I
METHOD method_24377 getEffects ()Lnet/minecraft/class_4763;
METHOD method_24378 getParticleConfig ()Ljava/util/Optional;
METHOD method_8684 hasStructureFeature (Lnet/minecraft/class_3195;)Z
METHOD method_8685 canSetIce (Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;Z)Z
ARG 1 world
@ -97,6 +104,8 @@ CLASS net/minecraft/class_1959 net/minecraft/world/biome/Biome
METHOD method_8724 hasHighHumidity ()Z
METHOD method_8725 getParent ()Ljava/lang/String;
CLASS class_1960 Settings
FIELD field_22041 noises Ljava/util/List;
FIELD field_22042 specialEffects Lnet/minecraft/class_4763;
FIELD field_9344 depth Ljava/lang/Float;
FIELD field_9345 category Lnet/minecraft/class_1959$class_1961;
FIELD field_9346 precipitation Lnet/minecraft/class_1959$class_1963;
@ -105,14 +114,21 @@ CLASS net/minecraft/class_1959 net/minecraft/world/biome/Biome
FIELD field_9351 downfall Ljava/lang/Float;
FIELD field_9352 parent Ljava/lang/String;
FIELD field_9353 surfaceBuilder Lnet/minecraft/class_3504;
METHOD method_24379 effects (Lnet/minecraft/class_4763;)Lnet/minecraft/class_1959$class_1960;
ARG 1 effects
METHOD method_24380 noises (Ljava/util/List;)Lnet/minecraft/class_1959$class_1960;
ARG 1 noises
METHOD method_8727 downfall (F)Lnet/minecraft/class_1959$class_1960;
ARG 1 downfall
METHOD method_8731 surfaceBuilder (Lnet/minecraft/class_3504;)Lnet/minecraft/class_1959$class_1960;
ARG 1 surfaceBuilder
METHOD method_8735 precipitation (Lnet/minecraft/class_1959$class_1963;)Lnet/minecraft/class_1959$class_1960;
ARG 1 precipitation
METHOD method_8737 configureSurfaceBuilder (Lnet/minecraft/class_3523;Lnet/minecraft/class_3531;)Lnet/minecraft/class_1959$class_1960;
ARG 1 surfaceBuilder
ARG 2 config
METHOD method_8738 category (Lnet/minecraft/class_1959$class_1961;)Lnet/minecraft/class_1959$class_1960;
ARG 1 category
METHOD method_8740 depth (F)Lnet/minecraft/class_1959$class_1960;
ARG 1 depth
METHOD method_8743 scale (F)Lnet/minecraft/class_1959$class_1960;
@ -125,7 +141,6 @@ CLASS net/minecraft/class_1959 net/minecraft/world/biome/Biome
ARG 1 temperature
CLASS class_1961 Category
FIELD field_9359 NAME_MAP Ljava/util/Map;
FIELD field_9360 THEEND Lnet/minecraft/class_1959$class_1961;
FIELD field_9372 name Ljava/lang/String;
METHOD <init> (Ljava/lang/String;ILjava/lang/String;)V
ARG 3 name
@ -138,9 +153,6 @@ CLASS net/minecraft/class_1959 net/minecraft/world/biome/Biome
METHOD method_8750 getName ()Ljava/lang/String;
CLASS class_1963 Precipitation
FIELD field_9381 NAME_MAP Ljava/util/Map;
FIELD field_9382 RAIN Lnet/minecraft/class_1959$class_1963;
FIELD field_9383 SNOW Lnet/minecraft/class_1959$class_1963;
FIELD field_9384 NONE Lnet/minecraft/class_1959$class_1963;
FIELD field_9385 name Ljava/lang/String;
METHOD <init> (Ljava/lang/String;ILjava/lang/String;)V
ARG 3 name
@ -154,3 +166,40 @@ CLASS net/minecraft/class_1959 net/minecraft/world/biome/Biome
ARG 2 weight
ARG 3 minGroupSize
ARG 4 maxGroupSize
CLASS class_4762 MixedNoisePoint
COMMENT Represents a point in a multi-dimensional cartesian plane. Mixed-noise
COMMENT biome generator picks the closest noise point from its selected point
COMMENT and choose the biome associated to that closest point. Another factor,
COMMENT rarity potential, favors larger differences in values instead, contrary
COMMENT to other point values.
FIELD field_22043 temperature F
FIELD field_22044 humidity F
FIELD field_22045 hilliness F
FIELD field_22046 style F
FIELD field_22047 rarityPotential F
COMMENT This value awards another point with value farthest from this one; i.e.
COMMENT unlike other points where closer distance is better, for this value the
COMMENT farther the better. The result of the different values can be
COMMENT approximately modeled by a hyperbola weight=cosh(peak-1) as used by the
COMMENT mixed-noise generator.
METHOD <init> (FFFFF)V
ARG 1 heat
ARG 2 humidity
ARG 3 hilliness
ARG 4 style
ARG 5 rarityPotential
METHOD method_24381 calculateDistanceTo (Lnet/minecraft/class_1959$class_4762;)F
COMMENT Calculates the distance from this noise point to another one. The
COMMENT distance is a squared distance in a multi-dimensional cartesian plane
COMMENT from a mathematical point of view, with a special parameter that
COMMENT reduces the calculated distance.
COMMENT
COMMENT <p>For most fields except rarity potential, smaller difference between
COMMENT two points' fields will lead to smaller distance. For rarity potential,
COMMENT larger differences lead to smaller distance.
COMMENT
COMMENT <p>This distance is used by the mixed-noise biome layer source. The
COMMENT layer source calculates an arbitrary noise point, and selects the
COMMENT biome that offers a closest point to its arbitrary point.
ARG 1 other
COMMENT the other noise point

View File

@ -0,0 +1,28 @@
CLASS net/minecraft/class_4763 net/minecraft/world/biome/BiomeEffects
FIELD field_22067 fogColor I
FIELD field_22068 waterColor I
FIELD field_22069 waterFogColor I
FIELD field_22070 particleConfig Ljava/util/Optional;
METHOD <init> (IIILjava/util/Optional;)V
ARG 1 fogColor
ARG 2 waterColor
ARG 3 waterFogColor
ARG 4 particleConfig
METHOD method_24387 getFogColor ()I
METHOD method_24388 getWaterColor ()I
METHOD method_24389 getWaterFogColor ()I
METHOD method_24390 getParticleConfig ()Ljava/util/Optional;
CLASS class_4764 Builder
FIELD field_22071 fogColor Ljava/util/OptionalInt;
FIELD field_22072 waterColor Ljava/util/OptionalInt;
FIELD field_22073 waterFogColor Ljava/util/OptionalInt;
FIELD field_22074 particleConfig Ljava/util/Optional;
METHOD method_24391 build ()Lnet/minecraft/class_4763;
METHOD method_24392 fogColor (I)Lnet/minecraft/class_4763$class_4764;
ARG 1 fogColor
METHOD method_24393 particleConfig (Lnet/minecraft/class_4761;)Lnet/minecraft/class_4763$class_4764;
ARG 1 particleConfig
METHOD method_24395 waterColor (I)Lnet/minecraft/class_4763$class_4764;
ARG 1 waterColor
METHOD method_24397 waterFogColor (I)Lnet/minecraft/class_4763$class_4764;
ARG 1 waterFogColor

View File

@ -0,0 +1,17 @@
CLASS net/minecraft/class_4761 net/minecraft/world/biome/BiomeParticleConfig
FIELD field_22034 type Lnet/minecraft/class_2400;
FIELD field_22035 chance F
FIELD field_22036 velocityXFactory Ljava/util/function/Function;
FIELD field_22037 velocityYFactory Ljava/util/function/Function;
FIELD field_22038 velocityZFactory Ljava/util/function/Function;
METHOD <init> (Lnet/minecraft/class_2400;FLjava/util/function/Function;Ljava/util/function/Function;Ljava/util/function/Function;)V
ARG 1 type
ARG 2 chance
ARG 3 xFactory
ARG 4 yFactory
ARG 5 zFactory
METHOD method_24369 getParticleType ()Lnet/minecraft/class_2400;
METHOD method_24370 shouldAddParticle (Ljava/util/Random;)Z
METHOD method_24371 generateVelocityX (Ljava/util/Random;)D
METHOD method_24372 generateVelocityY (Ljava/util/Random;)D
METHOD method_24373 generateVelocityZ (Ljava/util/Random;)D

View File

@ -14,7 +14,12 @@ CLASS net/minecraft/class_2869 net/minecraft/world/dimension/Dimension
ARG 1 x
ARG 2 z
ARG 3 checkMobSpawnValidity
METHOD method_12445 getFogColor (IF)Lnet/minecraft/class_243;
METHOD method_12445 modifyFogColor (IF)Lnet/minecraft/class_243;
COMMENT Modify the fog color offered (usually by the biome).
COMMENT
COMMENT <p>The overworld slightly whiteshifts and blueshifts this color; the
COMMENT nether doesn't touch it; the end significantly blackshifts this color.
ARG 1 fogColor
ARG 2 tickDelta
METHOD method_12446 getBackgroundColor (FF)[F
ARG 1 skyAngle