mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-05-22 02:35:26 +00:00
49 lines
1.2 KiB
C++
49 lines
1.2 KiB
C++
#include "stdafx.h"
|
|
#include "TheEndBiome.h"
|
|
#include "TheEndBiomeDecorator.h"
|
|
#include "net.minecraft.world.entity.monster.h"
|
|
#include "net.minecraft.world.level.tile.h"
|
|
#include "..\Minecraft.Client\Minecraft.h"
|
|
|
|
TheEndBiome::TheEndBiome(int id) : Biome(id)
|
|
{
|
|
enemies.clear();
|
|
friendlies.clear();
|
|
friendlies_chicken.clear(); // 4J added
|
|
friendlies_wolf.clear(); // 4J added
|
|
waterFriendlies.clear();
|
|
ambientFriendlies.clear();
|
|
|
|
enemies.push_back(new MobSpawnerData(eTYPE_ENDERMAN, 10, 4, 4));
|
|
topMaterial = static_cast<BYTE>(Tile::dirt_Id);
|
|
material = static_cast<BYTE>(Tile::dirt_Id);
|
|
|
|
decorator = new TheEndBiomeDecorator(this);
|
|
}
|
|
|
|
Vec3 *TheEndBiome::getFogColor(float td, float a) const
|
|
{
|
|
int fogColor = Minecraft::GetInstance()->getColourTable()->getColor( eMinecraftColour_End_Fog_Colour ); //0xa080a0;
|
|
float br = Mth::cos(td * PI * 2) * 2 + 0.5f;
|
|
if (br < 0.0f) br = 0.0f;
|
|
if (br > 1.0f) br = 1.0f;
|
|
|
|
float r = ((fogColor >> 16) & 0xff) / 255.0f;
|
|
float g = ((fogColor >> 8) & 0xff) / 255.0f;
|
|
float b = ((fogColor) & 0xff) / 255.0f;
|
|
r *= br * 0.0f + 0.15f;
|
|
g *= br * 0.0f + 0.15f;
|
|
b *= br * 0.0f + 0.15f;
|
|
|
|
return Vec3::newTemp(r, g, b);
|
|
}
|
|
|
|
bool TheEndBiome::isNatural()
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bool TheEndBiome::isFoggy()
|
|
{
|
|
return true;
|
|
} |