This commit is contained in:
Donothan73 2026-03-28 16:58:51 -04:00
parent 6a73583f03
commit 11539eb2bb
5 changed files with 63 additions and 7 deletions

View file

@ -416,8 +416,8 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM(Item::porkChop_raw_Id)
ITEM(Item::beef_cooked_Id)
ITEM(Item::beef_raw_Id)
//ITEM(Item::mutton_cooked_Id)
//ITEM(Item::mutton_raw_Id)
ITEM(Item::mutton_raw_Id)
ITEM(Item::mutton_cooked_Id)
ITEM(Item::chicken_raw_Id)
ITEM(Item::chicken_cooked_Id)
ITEM(Item::rotten_flesh_Id)

View file

@ -88,7 +88,7 @@ void BiomeDecorator::_init()
void BiomeDecorator::decorate()
{
PIXBeginNamedEvent(0,"Decorate Islands");
for (int i = 0; i < random->nextInt(3)-1; i++)
for (int i = 0; i < random->nextInt(5)-1; i++)
{
int x = xo + random->nextInt(16) + 8;
int z = zo + random->nextInt(16) + 8;
@ -139,6 +139,21 @@ void BiomeDecorator::decorate()
}
PIXEndNamedEvent();
for (int i = 0; i < forests; i++)
{
int x = xo + random->nextInt(16) + 8;
int z = zo + random->nextInt(16) + 8;
Feature *tree = biome->getTreeFeature(random);
tree->init(1, 1, 1);
if (!level->isEmptyTile(x, level->getHeightmap(x, z)+105, z))
{
tree->place(level, random, x, level->getHeightmap(x, z)+105, z);
delete tree;
}
}
PIXEndNamedEvent();
PIXBeginNamedEvent(0,"Decorate mushrooms/flowers/grass");
for (int i = 0; i < hugeMushrooms; i++)
{
@ -362,6 +377,16 @@ void BiomeDecorator::decorateOres()
decorateDepthAverage(1, lapisOreFeature, Level::genDepth / 8, Level::genDepth / 8);
decorateDepthSpan(3, emeraldOreFeature, 64, Level::genDepth *8);
decorateDepthSpan(10, gravelOreFeature, 150, 256);
decorateDepthSpan(20, coalOreFeature, 150, 256);
decorateDepthSpan(20, ironOreFeature, 150, 256);
decorateDepthSpan(10, rubyOreFeature, 150, 256);
decorateDepthSpan(20, coalOreFeature, 175, 256);
decorateDepthSpan(20, ironOreFeature, 175, 256);
decorateDepthSpan(10, rubyOreFeature, 175, 256);
decorateDepthSpan(10, rubyOreFeature, 0, Level::genDepth / 6);
level->setInstaTick(false);

View file

@ -3,6 +3,7 @@
#include "net.minecraft.world.level.h"
#include "net.minecraft.world.level.tile.h"
#include "net.minecraft.world.level.biome.h"
#include "TreeFeature.h"
IslandFeature::IslandFeature(int tile)
{
@ -110,10 +111,37 @@ bool IslandFeature::place(Level *level, Random *random, int x, int y, int z)
level->setTileAndData(x + xx, y + yy+99+height, z + zz, Tile::dirt_Id, 0, Tile::UPDATE_CLIENTS);
level->setTileAndData(x + xx, y + yy+98+height, z + zz, Tile::stone_Id, 0, Tile::UPDATE_CLIENTS);
}
}
}
}
for (int xx = 0; xx < 4; xx++)
{
for (int zz = 0; zz < 4; zz++)
{
for (int yy = 0; yy < 6; yy++)
{
if (grid[((xx) * 16 + (zz)) * 8 + (yy)])
{
level->setTileAndData(x + xx, y + yy+101+height, z + zz, Tile::water_Id, 0, Tile::UPDATE_CLIENTS);
level->setTileAndData(x + xx, y + yy+93+height, z + zz, Tile::stone_Id, 0, Tile::UPDATE_CLIENTS);
}
}
}
}
for (int xx = 0; xx < 12; xx++)
{
for (int zz = 0; zz < 12; zz++)
{
for (int yy = 0; yy < 3; yy++)
{
if (grid[((xx) * 16 + (zz)) * 8 + (yy)])
{
if (!level->isEmptyTile(x + xx+1, y + yy+105+height, z + zz+1))
{
level->setTileAndData(x + xx, y + yy+105+height, z + zz, 0, 0, Tile::UPDATE_CLIENTS);
level->setTileAndData(x + xx, y + yy+104+height, z + zz, Tile::water_Id, 0, Tile::UPDATE_CLIENTS);
}
}
}
}

View file

@ -1,6 +1,8 @@
#pragma once
#include "Feature.h"
#include "Material.h"
class Level;
class Random;
class IslandFeature : public Feature
{
@ -9,6 +11,7 @@ private:
public:
IslandFeature (int tile);
virtual bool place(Level *level, Random *random, int x, int y, int z);
};

View file

@ -518,8 +518,8 @@ void Item::staticCtor()
//ArmorItem *Item::chestplate_ruby = static_cast<ArmorItem *>((new ArmorItem(173, ArmorItem::ArmorMaterial::RUBY, 3, ArmorItem::SLOT_TORSO))->setBaseItemTypeAndMaterial(eBaseItemType_chestplate, eMaterial_ruby)->setIconName(L"ruby_chestplate")->setDescriptionId(IDS_ITEM_CHESTPLATE_DIAMOND)->setUseDescriptionId(IDS_DESC_CHESTPLATE_DIAMOND));
//ArmorItem *Item::leggings_ruby = static_cast<ArmorItem *>((new ArmorItem(174, ArmorItem::ArmorMaterial::RUBY, 3, ArmorItem::SLOT_LEGS))->setBaseItemTypeAndMaterial(eBaseItemType_leggings, eMaterial_ruby)->setIconName(L"ruby_leggings")->setDescriptionId(IDS_ITEM_LEGGINGS_DIAMOND)->setUseDescriptionId(IDS_DESC_LEGGINGS_DIAMOND));
//ArmorItem *Item::boots_ruby = static_cast<ArmorItem *>((new ArmorItem(175, ArmorItem::ArmorMaterial::RUBY, 3, ArmorItem::SLOT_FEET))->setBaseItemTypeAndMaterial(eBaseItemType_boots, eMaterial_ruby)->setIconName(L"ruby_boots")->setDescriptionId(IDS_ITEM_BOOTS_DIAMOND)->setUseDescriptionId(IDS_DESC_BOOTS_DIAMOND));
//Item *Item::mutton_raw = (new FoodItem(172, 3, FoodConstants::FOOD_SATURATION_LOW, true)) ->setIconName(L"mutton_Raw")->setDescriptionId(IDS_ITEM_BEEF_RAW)->setUseDescriptionId(IDS_DESC_BEEF_RAW);
//Item *Item::mutton_cooked = (new FoodItem(173, 6, FoodConstants::FOOD_SATURATION_GOOD, true))->setIconName(L"mutton_Cooked")->setDescriptionId(IDS_ITEM_BEEF_COOKED)->setUseDescriptionId(IDS_DESC_BEEF_COOKED);
Item *Item::mutton_raw = (new FoodItem(172, 3, FoodConstants::FOOD_SATURATION_LOW, true)) ->setIconName(L"mutton_Raw")->setDescriptionId(IDS_ITEM_BEEF_RAW)->setUseDescriptionId(IDS_DESC_BEEF_RAW);
Item *Item::mutton_cooked = (new FoodItem(173, 6, FoodConstants::FOOD_SATURATION_GOOD, true))->setIconName(L"mutton_Cooked")->setDescriptionId(IDS_ITEM_BEEF_COOKED)->setUseDescriptionId(IDS_DESC_BEEF_COOKED);
//Item *Item::apple_ruby = ( new GoldenAppleItem(174, 4, FoodConstants::FOOD_SATURATION_SUPERNATURAL, false) )->setCanAlwaysEat()->setEatEffect(MobEffect::regeneration->id, 5, 1, 1.0f)
// ->setBaseItemTypeAndMaterial(eBaseItemType_giltFruit,eMaterial_apple)->setIconName(L"appleRuby")->setDescriptionId(IDS_ITEM_APPLE_GOLD);//->setUseDescriptionId(IDS_DESC_GOLDENAPPLE);