mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-27 09:53:39 +00:00
Getting this running again ow
This commit is contained in:
parent
69c9a478e3
commit
345fe194f0
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue