Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Minecraft.Client/Common/UI/IUIScene_CreativeMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM(Tile::lapisBlock_Id)
ITEM(Tile::diamondBlock_Id)
ITEM(Tile::emeraldBlock_Id)
ITEM(Tile::rubyBlock_Id)
ITEM_AUX(Tile::quartzBlock_Id,QuartzBlockTile::TYPE_DEFAULT)
ITEM(Tile::coalOre_Id)
ITEM(Tile::lapisOre_Id)
Expand All @@ -51,7 +52,9 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM(Tile::ironOre_Id)
ITEM(Tile::goldOre_Id)
ITEM(Tile::emeraldOre_Id)
ITEM(Tile::rubyOre_Id)
ITEM(Tile::netherQuartz_Id)
ITEM(Tile::netherGold_Id)
ITEM(Tile::unbreakable_Id)
ITEM_AUX(Tile::wood_Id,0)
ITEM_AUX(Tile::wood_Id,TreeTile::DARK_TRUNK)
Expand Down Expand Up @@ -84,6 +87,7 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM_AUX(Tile::monsterStoneEgg_Id,StoneMonsterTile::HOST_COBBLE)
ITEM_AUX(Tile::monsterStoneEgg_Id,StoneMonsterTile::HOST_STONEBRICK)
ITEM(Tile::mycel_Id)
ITEM(Tile::alphaGrass_Id)
ITEM(Tile::netherBrick_Id)
ITEM(Tile::endStone_Id)
ITEM_AUX(Tile::quartzBlock_Id,QuartzBlockTile::TYPE_CHISELED)
Expand Down Expand Up @@ -153,7 +157,9 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM_AUX(Tile::leaves_Id, LeafTile::EVERGREEN_LEAF)
ITEM_AUX(Tile::leaves_Id, LeafTile::BIRCH_LEAF)
ITEM_AUX(Tile::leaves_Id, LeafTile::JUNGLE_LEAF)
ITEM_AUX(Tile::leaves_Id, LeafTile::ALPHA_LEAF)
ITEM(Tile::vine)
//ITEM(Tile::glowLichen_Id)
ITEM(Tile::waterLily_Id)
ITEM(Tile::torch_Id)
ITEM_AUX(Tile::tallgrass_Id, TallGrass::DEAD_SHRUB)
Expand All @@ -162,6 +168,8 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM(Tile::deadBush_Id)
ITEM(Tile::flower_Id)
ITEM(Tile::rose_Id)
ITEM(Tile::blueRose_Id)
ITEM(Tile::peony_Id)
ITEM(Tile::mushroom_brown_Id)
ITEM(Tile::mushroom_red_Id)
ITEM(Tile::cactus_Id)
Expand Down Expand Up @@ -396,6 +404,7 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM(Item::apple_Id)
ITEM(Item::apple_gold_Id)
ITEM_AUX(Item::apple_gold_Id,1) // Enchanted
//ITEM(Item::apple_ruby_Id)
ITEM(Item::melon_Id)
ITEM(Item::mushroomStew_Id)
ITEM(Item::bread_Id)
Expand All @@ -407,6 +416,8 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM(Item::porkChop_raw_Id)
ITEM(Item::beef_cooked_Id)
ITEM(Item::beef_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)
Expand Down Expand Up @@ -476,6 +487,12 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM(Item::hoe_diamond_Id)

ITEM(Item::fireball_Id)
ITEM(Item::sword_ruby_Id)
ITEM(Item::shovel_ruby_Id)
ITEM(Item::pickAxe_ruby_Id)
ITEM(Item::hatchet_ruby_Id)
ITEM(Item::hoe_ruby_Id)

ITEM(Item::clock_Id)
ITEM(Item::shears_Id)
ITEM(Item::fishingRod_Id)
Expand Down Expand Up @@ -508,6 +525,7 @@ void IUIScene_CreativeMenu::staticCtor()
ITEM_AUX(Item::coal_Id,1)
ITEM(Item::diamond_Id)
ITEM(Item::emerald_Id)
ITEM(Item::ruby_Id)
ITEM(Item::ironIngot_Id)
ITEM(Item::goldIngot_Id)
ITEM(Item::netherQuartz_Id)
Expand Down
Binary file modified Minecraft.Client/Common/res/TitleUpdate/res/items.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
461 changes: 461 additions & 0 deletions Minecraft.Client/Common/res/TitleUpdate/res/terrain.pdn

Large diffs are not rendered by default.

Binary file modified Minecraft.Client/Common/res/TitleUpdate/res/terrain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Minecraft.Client/Common/res/TitleUpdate/res/terrainMipMapLevel3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 32 additions & 8 deletions Minecraft.Client/PreStitchedTextureMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(10, 3, L"name_tag")
ADD_ICON(10, 4, L"lead")
ADD_ICON(10, 5, L"netherbrick")
//ADD_ICON(10, 6, L"unused")
ADD_ICON(10, 6, L"ruby_sword")
ADD_ICON(10, 7, L"minecart_furnace")
ADD_ICON(10, 8, L"charcoal")
ADD_ICON(10, 9, L"monsterPlacer_overlay")
Expand All @@ -526,8 +526,8 @@ void PreStitchedTextureMap::loadUVs()
//ADD_ICON(11, 2, L"unused")
//ADD_ICON(11, 3, L"unused")
//ADD_ICON(11, 4, L"unused")
//ADD_ICON(11, 5, L"unused")
//ADD_ICON(11, 6, L"unused")
ADD_ICON(11, 5, L"ruby_helmet")
ADD_ICON(11, 6, L"ruby_shovel")
ADD_ICON(11, 7, L"minecart_hopper")
ADD_ICON(11, 8, L"hopper")
ADD_ICON(11, 9, L"nether_star")
Expand All @@ -543,10 +543,10 @@ void PreStitchedTextureMap::loadUVs()
//ADD_ICON(12, 2, L"unused")
//ADD_ICON(12, 3, L"unused")
//ADD_ICON(12, 4, L"unused")
//ADD_ICON(12, 5, L"unused")
//ADD_ICON(12, 6, L"unused")
ADD_ICON(12, 5, L"ruby_chestplate")
ADD_ICON(12, 6, L"ruby_pickaxe")
ADD_ICON(12, 7, L"minecart_tnt")
//ADD_ICON(12, 8, L"unused")
ADD_ICON(12, 8, L"mutton_cooked")
ADD_ICON(12, 9, L"fireworks")
ADD_ICON(12, 10, L"fireworks_charge")
ADD_ICON(12, 11, L"fireworks_charge_overlay")
Expand All @@ -555,13 +555,18 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(12, 14, L"frame")
ADD_ICON(12, 15, L"enchantedBook")

ADD_ICON(13, 5, L"ruby_leggings")
ADD_ICON(13, 6, L"ruby_axe")
ADD_ICON(13, 5, L"mutton_raw")
ADD_ICON(13, 6, L"apple_ruby")

ADD_ICON(14, 0, L"skull_skeleton")
ADD_ICON(14, 1, L"skull_wither")
ADD_ICON(14, 2, L"skull_zombie")
ADD_ICON(14, 3, L"skull_char")
ADD_ICON(14, 4, L"skull_creeper")
//ADD_ICON(14, 5, L"unused")
//ADD_ICON(14, 6, L"unused")
ADD_ICON(14, 5, L"ruby_boots")
ADD_ICON(14, 6, L"ruby_hoe")
ADD_ICON_WITH_NAME(14, 7, L"compassP0", L"compass") // 4J Added
ADD_ICON_WITH_NAME(14, 8, L"compassP1", L"compass") // 4J Added
ADD_ICON_WITH_NAME(14, 9, L"compassP2", L"compass") // 4J Added
Expand Down Expand Up @@ -986,5 +991,24 @@ void PreStitchedTextureMap::loadUVs()
ADD_ICON(19, 13, L"glass_pane_top_silver");
ADD_ICON(19, 14, L"glass_pane_top_white");
ADD_ICON(19, 15, L"glass_pane_top_yellow");

ADD_ICON(20, 0, L"ruby_ore");
ADD_ICON(20, 1, L"ruby_block");
ADD_ICON(20, 2, L"flower_peony");
ADD_ICON(20, 3, L"flower_blue_rose");
ADD_ICON(20, 4, L"gold_ore_netherrack");
ADD_ICON(20, 5, L"glow_lichen");
ADD_ICON(20, 6, L"end_rod");
ADD_ICON(20, 7, L"smooth_tuff");
ADD_ICON(20, 8, L"tuff");
ADD_ICON(20, 9, L"smooth_andesite");
ADD_ICON(20, 10, L"andesite");
ADD_ICON(20, 11, L"smooth_granite");
ADD_ICON(20, 12, L"granite");
ADD_ICON(20, 13, L"alpha_grass_side");
ADD_ICON(20, 14, L"alpha_grass_top");
ADD_ICON(20, 15, L"leaves_alpha");

ADD_ICON(21, 0, L"leaves_alpha_opaque");
}
}
6 changes: 6 additions & 0 deletions Minecraft.World/ArmorItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ const int _ArmorMaterial::chainArray[] = {2, 5, 4, 1};
const int _ArmorMaterial::ironArray[] = {2, 6, 5, 2};
const int _ArmorMaterial::goldArray[] = {2, 5, 3, 1};
const int _ArmorMaterial::diamondArray[] = {3, 8, 6, 3};
const int _ArmorMaterial::rubyArray[] = {3, 8, 6, 3};
const _ArmorMaterial *_ArmorMaterial::CLOTH = new _ArmorMaterial(5, _ArmorMaterial::clothArray, 15);
const _ArmorMaterial *_ArmorMaterial::CHAIN = new _ArmorMaterial(15, _ArmorMaterial::chainArray, 12);
const _ArmorMaterial *_ArmorMaterial::IRON = new _ArmorMaterial(15, _ArmorMaterial::ironArray, 9);
const _ArmorMaterial *_ArmorMaterial::GOLD = new _ArmorMaterial(7, _ArmorMaterial::goldArray, 25);
const _ArmorMaterial *_ArmorMaterial::DIAMOND = new _ArmorMaterial(33, _ArmorMaterial::diamondArray, 10);
const _ArmorMaterial *_ArmorMaterial::RUBY = new _ArmorMaterial(33, _ArmorMaterial::rubyArray, 10);

_ArmorMaterial::ArmorMaterial(int durabilityMultiplier, const int slotProtections[], int enchantmentValue)
{
Expand Down Expand Up @@ -118,6 +120,10 @@ int _ArmorMaterial::getTierItemId() const
{
return Item::diamond_Id;
}
else if (this == RUBY)
{
return Item::ruby_Id;
}
return 0;
}

Expand Down
2 changes: 2 additions & 0 deletions Minecraft.World/ArmorItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,14 @@ class ArmorItem : public Item
static const int ironArray[];
static const int goldArray[];
static const int diamondArray[];
static const int rubyArray[];
public:
static const ArmorMaterial *CLOTH;
static const ArmorMaterial *CHAIN;
static const ArmorMaterial *IRON;
static const ArmorMaterial *GOLD;
static const ArmorMaterial *DIAMOND;
static const ArmorMaterial *RUBY;

private:
int durabilityMultiplier;
Expand Down
9 changes: 8 additions & 1 deletion Minecraft.World/BasicTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,14 @@ bool BasicTree::checkLocation()
int baseMaterial = thisLevel->getTile(origin[0], origin[1] - 1, origin[2]);
if (!((baseMaterial == 2) || (baseMaterial == 3)))
{
return false;
if (baseMaterial == Tile::alphaGrass_Id)
{
return true;
}
else
{
return false;
}
}
int allowedHeight = checkLine(startPosition, endPosition);
// If the set height is good, go with that
Expand Down
83 changes: 74 additions & 9 deletions Minecraft.World/BiomeDecorator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "net.minecraft.world.level.tile.h"
#include "net.minecraft.world.level.levelgen.feature.h"
#include "net.minecraft.world.level.biome.h"
#include "IslandFeature.h"

BiomeDecorator::BiomeDecorator(Biome *biome)
{
Expand Down Expand Up @@ -62,6 +63,12 @@ void BiomeDecorator::_init()
cactusFeature = new CactusFeature();
waterlilyFeature = new WaterlilyFeature();

rubyOreFeature = new OreFeature(Tile::rubyOre_Id, 5);
blueroseFlowerFeature = new FlowerFeature(Tile::blueRose_Id);
peonyFlowerFeature = new FlowerFeature(Tile::peony_Id);
emeraldOreFeature = new OreFeature(Tile::emeraldOre_Id, 3);
islandFeature = new IslandFeature(Tile::alphaGrass_Id);

waterlilyCount = 0;
treeCount = 0;
flowerCount = 2;
Expand All @@ -80,6 +87,16 @@ void BiomeDecorator::_init()

void BiomeDecorator::decorate()
{
PIXBeginNamedEvent(0,"Decorate Islands");
for (int i = 0; i < random->nextInt(5)-1; i++)
{
int x = xo + random->nextInt(16) + 8;
int z = zo + random->nextInt(16) + 8;
islandFeature->place(level, random, x, (level->getTopSolidBlock(x, z)), (z));

}
PIXEndNamedEvent();

PIXBeginNamedEvent(0,"Decorate ores");
decorateOres();
PIXEndNamedEvent();
Expand Down Expand Up @@ -122,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++)
{
Expand All @@ -130,20 +162,39 @@ void BiomeDecorator::decorate()
hugeMushroomFeature->place(level, random, x, level->getHeightmap(x, z), z);
}

for (int i = 0; i < flowerCount; i++)
for (int i = 0; i < flowerCount*2; i++)
{
int x = xo + random->nextInt(16) + 8;
int y = random->nextInt(Level::genDepth);
int z = zo + random->nextInt(16) + 8;
yellowFlowerFeature->place(level, random, x, y, z);
if (random->nextInt(1) == 0)
{
int x = xo + random->nextInt(16) + 8;
int y = random->nextInt(Level::genDepth);
int z = zo + random->nextInt(16) + 8;
yellowFlowerFeature->place(level, random, x, y, z);
}

if (random->nextInt(4) == 0)
if (random->nextInt(2) == 0)
{
int x = xo + random->nextInt(16) + 8;
int y = random->nextInt(Level::genDepth);
int z = zo + random->nextInt(16) + 8;
peonyFlowerFeature->place(level, random, x, y, z);
}

if (random->nextInt(3) == 0)
{
x = xo + random->nextInt(16) + 8;
y = random->nextInt(Level::genDepth);
z = zo + random->nextInt(16) + 8;
int x = xo + random->nextInt(16) + 8;
int y = random->nextInt(Level::genDepth);
int z = zo + random->nextInt(16) + 8;
roseFlowerFeature->place(level, random, x, y, z);
}

if (random->nextInt(4) == 0)
{
int x = xo + random->nextInt(16) + 8;
int y = random->nextInt(Level::genDepth);
int z = zo + random->nextInt(16) + 8;
blueroseFlowerFeature->place(level, random, x, y, z);
}
}

for (int i = 0; i < grassCount; i++)
Expand Down Expand Up @@ -324,5 +375,19 @@ void BiomeDecorator::decorateOres()
decorateDepthSpan(8, redStoneOreFeature, 0, Level::genDepth / 8);
decorateDepthSpan(1, diamondOreFeature, 0, Level::genDepth / 8);
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);
}
6 changes: 6 additions & 0 deletions Minecraft.World/BiomeDecorator.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ class BiomeDecorator
Feature *reedsFeature;
Feature *cactusFeature;
Feature *waterlilyFeature;

Feature *rubyOreFeature;
Feature *emeraldOreFeature;
Feature *blueroseFlowerFeature;
Feature *peonyFlowerFeature;
Feature *islandFeature;

int waterlilyCount;
int treeCount;
Expand Down
4 changes: 2 additions & 2 deletions Minecraft.World/Boat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -323,13 +323,13 @@ void Boat::tick()
if (!level->isClientSide && !removed)
{
remove();
for (int i = 0; i < 3; i++)
for (int i = 0; i < 5; i++)
{
spawnAtLocation(Tile::wood_Id, 1, 0);
}
for (int i = 0; i < 2; i++)
{
spawnAtLocation(Item::stick->id, 1, 0);
//spawnAtLocation(Item::stick->id, 1, 0);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Minecraft.World/Bush.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ bool Bush::mayPlace(Level *level, int x, int y, int z)

bool Bush::mayPlaceOn(int tile)
{
return tile == Tile::grass_Id || tile == Tile::dirt_Id || tile == Tile::farmland_Id;
return tile == Tile::grass_Id || tile == Tile::dirt_Id || tile == Tile::farmland_Id || tile == Tile::alphaGrass_Id;
}

void Bush::neighborChanged(Level *level, int x, int y, int z, int type)
Expand Down
2 changes: 1 addition & 1 deletion Minecraft.World/CaveFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using namespace std;
bool CaveFeature::place(Level *level, Random *random, int x, int y, int z)
{
float dir = random->nextFloat() * PI;
double rd = 8;
double rd = 8 + random->nextDouble() * 8;

double x0 = x + 8 + Mth::sin(dir) * rd;
double x1 = x + 8 - Mth::sin(dir) * rd;
Expand Down
Loading