From 5a0e29adb3b224be50491b64f766337c91b5654d Mon Sep 17 00:00:00 2001 From: Lovelylavender4 Date: Tue, 23 Jul 2024 19:12:20 +0800 Subject: [PATCH] chore: fixed an inconsistency in the naming style of CoordinateRange's member variables. --- src/mc/world/level/ScatterParams.h | 25 +++++++++++-------- .../biome/components/BiomeDecorationFeature.h | 4 +++ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/src/mc/world/level/ScatterParams.h b/src/mc/world/level/ScatterParams.h index 66f3c5e019..d46577c13f 100644 --- a/src/mc/world/level/ScatterParams.h +++ b/src/mc/world/level/ScatterParams.h @@ -31,23 +31,28 @@ class ScatterParams { struct CoordinateRange { public: enum class Distribution : int { + SingleValued = 0x0, Uniform = 0x1, Gaussian = 0x2, InverseGaussian = 0x3, - JitteredGrid = 0x4, - FixedGrid = 0x5, + FixedGrid = 0x4, + JitteredGrid = 0x5, Triangle = 0x6, }; - ExpressionNode mMin; // this+0x0 - ExpressionNode mMax; // this+0xE8 - int mStepSize; // this+0x1D0 - int mGridOffset; // this+0x1D4 - Distribution mDistribution; // this+0x1D8 struct Extent { - int min; // this+0x0 - int max; // this+0x4 + int mMin; + int mMax; }; - std::optional extent; // this+0x1DC + + public: + ExpressionNode mMinOrSingleValue; // this+0x0 + ExpressionNode mMax; // this+0xE8 + int mGridStepSize; // this+0x1D0 + int mGridOffset; // this+0x1D4 + Distribution mDistribution; // this+0x1D8 + std::optional mFastPathRange; // this+0x1DC + + public: // prevent constructor by default CoordinateRange& operator=(CoordinateRange const&); diff --git a/src/mc/world/level/biome/components/BiomeDecorationFeature.h b/src/mc/world/level/biome/components/BiomeDecorationFeature.h index 4898c0b9f3..1a3f26ce23 100644 --- a/src/mc/world/level/biome/components/BiomeDecorationFeature.h +++ b/src/mc/world/level/biome/components/BiomeDecorationFeature.h @@ -14,6 +14,8 @@ struct BiomeDecorationFeature { zxy = 0x4, zyx = 0x5, }; + +public: ScatterParams::CoordinateRange mX; // this+0x0 ScatterParams::CoordinateRange mY; // this+0x1E8 ScatterParams::CoordinateRange mZ; // this+0x3D0 @@ -25,6 +27,8 @@ struct BiomeDecorationFeature { WeakStorageFeature mFeature; // this+0x798 HashedString mIdentifier; // this+0x7B0 std::string mPlacementPass; // this+0x7E0 + +public: // prevent constructor by default BiomeDecorationFeature& operator=(BiomeDecorationFeature const&); BiomeDecorationFeature();