Getting this running again ow

This commit is contained in:
Liriosha 2026-03-14 00:11:29 -04:00
parent 69c9a478e3
commit 345fe194f0
No known key found for this signature in database
GPG key ID: 1A9AA2EFDA5F83E9
3 changed files with 15 additions and 16 deletions

View file

@ -1,9 +1,9 @@
#include "../Platform/stdafx.h"
#include "../Headers/net.minecraft.locale.h"
#include "../Items/ItemInstance.h"
#include "../Platform/stdafx.h"
#include "Achievements.h"
#include "../Util/DescFormatter.h"
#include "Achievement.h"
#include "Achievements.h"
/**
* @brief Performs internal initialization for the achievement.

View file

@ -99,13 +99,12 @@ void FixedBiomeSource::getTemperatureBlock(doubleArray& temperatures, int x,
*/
void FixedBiomeSource::getDownfallBlock(floatArray& downfalls, int x, int z,
int w, int h) const {
if (!downfalls.data || downfalls.length < w * h) {
if (downfalls.data) delete[] downfalls.data;
if (downfalls.data == NULL || downfalls.length < w * h) {
if (downfalls.data != NULL) delete[] downfalls.data;
downfalls = floatArray(w * h);
}
Arrays::fill(downfalls, 0, w * h, downfall);
}
/**
* @brief Returns a floatArray filled with downfall values.
*/
@ -124,7 +123,7 @@ float FixedBiomeSource::getDownfall(int x, int z) const { return downfall; }
/**
* @brief Fills a double array with downfall values.
*/
void FixedBiomeSource::getDownfallBlock(doubleArray downfalls, int x, int z,
void FixedBiomeSource::getDownfallBlock(doubleArray& downfalls, int x, int z,
int w, int h) {
if (!downfalls.data || downfalls.length < w * h) {
if (downfalls.data) delete[] downfalls.data;

View file

@ -1,16 +1,16 @@
#pragma once
#include <vector>
#include "BiomeSource.h"
class FixedBiomeSource : public BiomeSource {
private:
private:
Biome* biome;
float temperature, downfall;
public:
public:
using BiomeSource::getTemperature;
FixedBiomeSource(Biome* fixed, float temperature, float downfall);
virtual Biome* getBiome(ChunkPos* cp);
virtual Biome* getBiome(int x, int z);
virtual float getTemperature(int x, int z);
@ -23,23 +23,23 @@ public:
int h) const;
virtual floatArray getDownfallBlock(int x, int z, int w, int h) const;
virtual float getDownfall(int x, int z) const;
virtual void getDownfallBlock(doubleArray downfalls, int x, int z, int w,
virtual void getDownfallBlock(doubleArray& downfalls, int x, int z, int w,
int h);
virtual void getBiomeBlock(BiomeArray& biomes, int x, int z, int w, int h,
bool useCache) const;
virtual void getBiomeIndexBlock(byteArray& biomeIndices, int x, int z,
int w, int h, bool useCache) const;
// 4J-PB added in from beyond 1.8.2
virtual BiomeArray getRawBiomeBlock(int x, int z, int w, int h) const;
virtual void getRawBiomeBlock(BiomeArray& biomes, int x, int z, int w,
int h) const;
////////////////////////////////////
virtual TilePos* findBiome(int x, int z, int r, Biome* toFind,
Random* random);
virtual TilePos* findBiome(int x, int z, int r, std::vector<Biome*> allowed,
virtual TilePos* findBiome(int x, int z, int r,
const std::vector<Biome*>& allowed,
Random* random);
virtual bool containsOnly(int x, int z, int r, Biome* allowed);
virtual bool containsOnly(int x, int z, int r, std::vector<Biome*> allowed);
virtual bool containsOnly(
int x, int z, int r,
const std::vector<Biome*>& allowed);
};