mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-06-12 01:02:54 +00:00
Bug fixes
This commit is contained in:
parent
d73ae8fd5c
commit
1df2fd42dd
|
|
@ -430,8 +430,8 @@ int Biome::getRandomDoublePlantType(Random *random)
|
|||
{
|
||||
|
||||
int type = random->nextInt(10);
|
||||
if (type < 7) return 0;
|
||||
if (type == 7) return 3;
|
||||
if (type == 8) return 4;
|
||||
return 2;
|
||||
if (type < 7) return 1;
|
||||
if (type == 7) return 4;
|
||||
if (type == 8) return 5;
|
||||
return 3;
|
||||
}
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
#include "net.minecraft.world.entity.player.h"
|
||||
#include "net.minecraft.world.h"
|
||||
#include "..\Minecraft.Client\ServerPlayer.h"
|
||||
#include "net.minecraft.world.phys.h"
|
||||
|
||||
const wstring CauldronTile::TEXTURE_INSIDE = L"cauldron_inner";
|
||||
const wstring CauldronTile::TEXTURE_BOTTOM = L"cauldron_bottom";
|
||||
|
|
@ -31,6 +32,27 @@ Icon *CauldronTile::getTexture(int face, int data)
|
|||
return icon;
|
||||
}
|
||||
|
||||
void CauldronTile::entityInside(Level* level, int x, int y, int z, shared_ptr<Entity> entity)
|
||||
{
|
||||
if (level->isClientSide) return;
|
||||
|
||||
int data = level->getData(x, y, z);
|
||||
int fillLevel = getFillLevel(data);
|
||||
|
||||
double waterSurfaceY = ((3 * fillLevel + 6) * 0.0625) + y;
|
||||
|
||||
if (level->isClientSide) return;
|
||||
if (!entity->isOnFire()) return;
|
||||
|
||||
if (fillLevel <= 0) return;
|
||||
|
||||
if (entity->bb->y0 <= waterSurfaceY)
|
||||
{
|
||||
entity->clearFire();
|
||||
level->setData(x, y, z, fillLevel - 1, Tile::UPDATE_CLIENTS);
|
||||
}
|
||||
}
|
||||
|
||||
void CauldronTile::registerIcons(IconRegister *iconRegister)
|
||||
{
|
||||
iconInner = iconRegister->registerIcon(L"cauldron_inner");
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ public:
|
|||
virtual Icon *getTexture(int face, int data);
|
||||
//@Override
|
||||
void registerIcons(IconRegister *iconRegister);
|
||||
void entityInside(Level* level, int x, int y, int z, shared_ptr<Entity> entity);
|
||||
static Icon *getTexture(const wstring &name);
|
||||
virtual void addAABBs(Level *level, int x, int y, int z, AABB *box, AABBList *boxes, shared_ptr<Entity> source);
|
||||
virtual void updateDefaultShape();
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ FurnaceRecipes::FurnaceRecipes()
|
|||
addFurnaceRecipy(Tile::lapisOre_Id, new ItemInstance(Item::dye_powder, 1, DyePowderItem::BLUE), .2f);
|
||||
addFurnaceRecipy(Tile::netherQuartz_Id, new ItemInstance(Item::netherQuartz), .2f);
|
||||
|
||||
addFurnaceRecipy(Tile::tree2Trunk_Id, new ItemInstance(Item::coal, 1, 1), .15f);
|
||||
}
|
||||
|
||||
void FurnaceRecipes::addFurnaceRecipy(int itemId, ItemInstance *result, float value)
|
||||
|
|
|
|||
Loading…
Reference in a new issue