mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +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 "../Headers/net.minecraft.locale.h"
|
||||||
#include "../Items/ItemInstance.h"
|
#include "../Items/ItemInstance.h"
|
||||||
#include "../Platform/stdafx.h"
|
#include "Achievements.h"
|
||||||
#include "../Util/DescFormatter.h"
|
#include "../Util/DescFormatter.h"
|
||||||
#include "Achievement.h"
|
#include "Achievement.h"
|
||||||
#include "Achievements.h"
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Performs internal initialization for the achievement.
|
* @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,
|
void FixedBiomeSource::getDownfallBlock(floatArray& downfalls, int x, int z,
|
||||||
int w, int h) const {
|
int w, int h) const {
|
||||||
if (!downfalls.data || downfalls.length < w * h) {
|
if (downfalls.data == NULL || downfalls.length < w * h) {
|
||||||
if (downfalls.data) delete[] downfalls.data;
|
if (downfalls.data != NULL) delete[] downfalls.data;
|
||||||
downfalls = floatArray(w * h);
|
downfalls = floatArray(w * h);
|
||||||
}
|
}
|
||||||
Arrays::fill(downfalls, 0, w * h, downfall);
|
Arrays::fill(downfalls, 0, w * h, downfall);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns a floatArray filled with downfall values.
|
* @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.
|
* @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) {
|
int w, int h) {
|
||||||
if (!downfalls.data || downfalls.length < w * h) {
|
if (!downfalls.data || downfalls.length < w * h) {
|
||||||
if (downfalls.data) delete[] downfalls.data;
|
if (downfalls.data) delete[] downfalls.data;
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
#include "BiomeSource.h"
|
#include "BiomeSource.h"
|
||||||
|
|
||||||
class FixedBiomeSource : public BiomeSource {
|
class FixedBiomeSource : public BiomeSource {
|
||||||
private:
|
private:
|
||||||
Biome* biome;
|
Biome* biome;
|
||||||
float temperature, downfall;
|
float temperature, downfall;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using BiomeSource::getTemperature;
|
using BiomeSource::getTemperature;
|
||||||
|
|
||||||
FixedBiomeSource(Biome* fixed, float temperature, float downfall);
|
FixedBiomeSource(Biome* fixed, float temperature, float downfall);
|
||||||
|
|
||||||
virtual Biome* getBiome(ChunkPos* cp);
|
virtual Biome* getBiome(ChunkPos* cp);
|
||||||
virtual Biome* getBiome(int x, int z);
|
virtual Biome* getBiome(int x, int z);
|
||||||
virtual float getTemperature(int x, int z);
|
virtual float getTemperature(int x, int z);
|
||||||
|
|
@ -23,23 +23,23 @@ public:
|
||||||
int h) const;
|
int h) const;
|
||||||
virtual floatArray getDownfallBlock(int x, int z, int w, int h) const;
|
virtual floatArray getDownfallBlock(int x, int z, int w, int h) const;
|
||||||
virtual float getDownfall(int x, int z) 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);
|
int h);
|
||||||
virtual void getBiomeBlock(BiomeArray& biomes, int x, int z, int w, int h,
|
virtual void getBiomeBlock(BiomeArray& biomes, int x, int z, int w, int h,
|
||||||
bool useCache) const;
|
bool useCache) const;
|
||||||
virtual void getBiomeIndexBlock(byteArray& biomeIndices, int x, int z,
|
virtual void getBiomeIndexBlock(byteArray& biomeIndices, int x, int z,
|
||||||
int w, int h, bool useCache) const;
|
int w, int h, bool useCache) const;
|
||||||
|
|
||||||
// 4J-PB added in from beyond 1.8.2
|
// 4J-PB added in from beyond 1.8.2
|
||||||
virtual BiomeArray getRawBiomeBlock(int x, int z, int w, int h) const;
|
virtual BiomeArray getRawBiomeBlock(int x, int z, int w, int h) const;
|
||||||
virtual void getRawBiomeBlock(BiomeArray& biomes, int x, int z, int w,
|
virtual void getRawBiomeBlock(BiomeArray& biomes, int x, int z, int w,
|
||||||
int h) const;
|
int h) const;
|
||||||
|
|
||||||
////////////////////////////////////
|
|
||||||
virtual TilePos* findBiome(int x, int z, int r, Biome* toFind,
|
virtual TilePos* findBiome(int x, int z, int r, Biome* toFind,
|
||||||
Random* random);
|
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);
|
Random* random);
|
||||||
virtual bool containsOnly(int x, int z, int r, Biome* allowed);
|
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