mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-07-02 13:57:06 +00:00
Sea Lanterns
Added Prismarine Crystals and Sea Lanterns
This commit is contained in:
parent
881462cd95
commit
36ad1a341e
Binary file not shown.
|
|
@ -75,6 +75,7 @@ void IUIScene_CreativeMenu::staticCtor()
|
|||
ITEM_AUX(Tile::treeTrunk_Id, TreeTile::JUNGLE_TRUNK)
|
||||
ITEM_AUX(Tile::tree2Trunk_Id, TreeTile2::ACACIA_TRUNK)
|
||||
ITEM_AUX(Tile::tree2Trunk_Id, TreeTile2::DARK_TRUNK)
|
||||
ITEM(Tile::seaLantern_Id)
|
||||
ITEM(Tile::gravel_Id)
|
||||
ITEM(Tile::redBrick_Id)
|
||||
ITEM(Tile::mossyCobblestone_Id)
|
||||
|
|
@ -590,6 +591,7 @@ void IUIScene_CreativeMenu::staticCtor()
|
|||
ITEM(Item::feather_Id)
|
||||
ITEM(Item::flint_Id)
|
||||
ITEM(Item::leather_Id)
|
||||
ITEM(Item::prismarine_cystal_Id)
|
||||
ITEM(Item::rabbit_hide_Id)
|
||||
ITEM(Item::gunpowder_Id)
|
||||
ITEM(Item::clay_Id)
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 3 KiB |
|
|
@ -0,0 +1,40 @@
|
|||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
4
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
3
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
2
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
|
|
@ -566,6 +566,7 @@ void PreStitchedTextureMap::loadUVs()
|
|||
ADD_ICON(14, 4, L"skull_creeper")
|
||||
ADD_ICON(14, 5, L"rabbitsFoot")
|
||||
ADD_ICON(14, 6, L"rabbitHide")
|
||||
ADD_ICON(13, 14, L"prismarineCrystal");
|
||||
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
|
||||
|
|
@ -1031,6 +1032,7 @@ void PreStitchedTextureMap::loadUVs()
|
|||
ADD_ICON(23, 2, L"door_dark_upper");
|
||||
ADD_ICON(23, 3, L"door_jungle_upper");
|
||||
ADD_ICON(23, 4, L"door_spruce_upper");
|
||||
ADD_ICON(23, 13, L"sea_lantern");
|
||||
|
||||
ADD_ICON(23, 14, L"inverted_daylight_detector");
|
||||
ADD_ICON(23, 15, L"iron_trapdoor");
|
||||
|
|
@ -1040,5 +1042,6 @@ void PreStitchedTextureMap::loadUVs()
|
|||
ADD_ICON(24, 2, L"door_dark_lower");
|
||||
ADD_ICON(24, 3, L"door_jungle_lower");
|
||||
ADD_ICON(24, 4, L"door_spruce_lower");
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2334,3 +2334,5 @@
|
|||
#define IDS_RICHPRESENCESTATE_BREWING 2328
|
||||
#define IDS_RICHPRESENCESTATE_ANVIL 2329
|
||||
#define IDS_RICHPRESENCESTATE_TRADING 2330
|
||||
#define IDS_TILE_SEA_LANTERN 2331
|
||||
#define IDS_ITEM_PRISMARINE_CRYSTAL 2332
|
||||
|
|
@ -266,6 +266,8 @@ Item* Item::rabbits_foot = nullptr;
|
|||
Item* Item::rabbit_hide = nullptr;
|
||||
Item* Item::armor_stand = nullptr;
|
||||
|
||||
Item* Item::prismarine_crystal = nullptr;
|
||||
|
||||
void Item::staticCtor()
|
||||
{
|
||||
Item::sword_wood = ( new WeaponItem(12, _Tier::WOOD) ) ->setBaseItemTypeAndMaterial(eBaseItemType_sword, eMaterial_wood) ->setIconName(L"swordWood")->setDescriptionId(IDS_ITEM_SWORD_WOOD)->setUseDescriptionId(IDS_DESC_SWORD);
|
||||
|
|
@ -524,6 +526,7 @@ void Item::staticCtor()
|
|||
Item::rabbits_foot = ( new Item(158) ) ->setIconName(L"rabbitsFoot")->setDescriptionId(IDS_ITEM_RABBIT_FOOT)->setUseDescriptionId(IDS_DESC_RABBIT_FOOT);
|
||||
|
||||
Item::armor_stand = (new ArmorStandItem(160)) ->setBaseItemTypeAndMaterial(eBaseItemType_HangingItem,eMaterial_cloth)->setIconName(L"armorStand")->setDescriptionId(IDS_ITEM_ARMOR_STAND)->setUseDescriptionId(IDS_DESC_ARMOR_STAND);
|
||||
Item::prismarine_crystal = (new Item(161))->setIconName(L"prismarineCrystal")->setDescriptionId(IDS_ITEM_PRISMARINE_CRYSTAL)->setUseDescriptionId(IDS_DESC_BRICK);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -432,6 +432,8 @@ public:
|
|||
static Item* rabbits_foot;
|
||||
static Item* armor_stand;
|
||||
|
||||
static Item* prismarine_crystal;
|
||||
|
||||
|
||||
|
||||
static const int shovel_iron_Id = 256;
|
||||
|
|
@ -657,6 +659,8 @@ public:
|
|||
static const int rabbit_hide_Id = 415;
|
||||
static const int armor_stand_Id = 416;
|
||||
|
||||
static const int prismarine_cystal_Id = 417;
|
||||
|
||||
public:
|
||||
const int id;
|
||||
|
||||
|
|
|
|||
30
Minecraft.World/SeaLanternTile.cpp
Normal file
30
Minecraft.World/SeaLanternTile.cpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include "stdafx.h"
|
||||
#include "SeaLanternTile.h"
|
||||
|
||||
SeaLanternTile::SeaLanternTile(int id, Material* material) : Tile(id, material)
|
||||
{
|
||||
}
|
||||
int SeaLanternTile::getResourceCountForLootBonus(int bonusLevel, Random* random)
|
||||
{
|
||||
return Mth::clamp(getResourceCount(random) + random->nextInt(bonusLevel + 1), 1, 4);
|
||||
}
|
||||
|
||||
int SeaLanternTile::getResourceCount(Random* random)
|
||||
{
|
||||
return 2 + random->nextInt(3);
|
||||
}
|
||||
|
||||
int SeaLanternTile::getResource(int data, Random* random, int playerBonusLevel)
|
||||
{
|
||||
return Item::prismarine_crystal->id;
|
||||
}
|
||||
|
||||
void SeaLanternTile::registerIcons(IconRegister* iconRegister)
|
||||
{
|
||||
icon = iconRegister->registerIcon(L"sea_lantern");
|
||||
}
|
||||
|
||||
Icon* SeaLanternTile::getTexture(int face, int data)
|
||||
{
|
||||
return icon;
|
||||
}
|
||||
15
Minecraft.World/SeaLanternTile.h
Normal file
15
Minecraft.World/SeaLanternTile.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#pragma once
|
||||
#include "Tile.h"
|
||||
|
||||
class SeaLanternTile : public Tile
|
||||
{
|
||||
public:
|
||||
SeaLanternTile(int id, Material* material);
|
||||
virtual void registerIcons(IconRegister* iconRegister);
|
||||
virtual Icon* getTexture(int face, int data);
|
||||
virtual int getResourceCountForLootBonus(int bonusLevel, Random* random);
|
||||
virtual int getResourceCount(Random* random);
|
||||
virtual int getResource(int data, Random* random, int playerBonusLevel);
|
||||
private:
|
||||
Icon* icon;
|
||||
};
|
||||
|
|
@ -16,6 +16,8 @@
|
|||
#include "net.minecraft.world.h"
|
||||
#include "net.minecraft.h"
|
||||
#include "Tile.h"
|
||||
#include "SeaLanternTile.h"
|
||||
#include "SeaLanternTile.cpp"
|
||||
|
||||
wstring Tile::TILE_DESCRIPTION_PREFIX = L"Tile.";
|
||||
|
||||
|
|
@ -246,6 +248,7 @@ Tile* Tile::darkGate = nullptr;
|
|||
Tile* Tile::invertedDaylightDetector = nullptr;
|
||||
Tile* Tile::red_sandstone = nullptr;
|
||||
Tile* Tile::stairs_red_sandstone = nullptr;
|
||||
Tile* Tile::seaLantern = nullptr;
|
||||
|
||||
Tile* Tile::tree2Trunk = nullptr;
|
||||
|
||||
|
|
@ -496,6 +499,9 @@ void Tile::staticCtor()
|
|||
Tile::door_jungle = (new DoorTile(195, Material::wood, L"doorJungle"))->setDestroyTime(3.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"door_jungle")->setDescriptionId(IDS_TILE_DOOR_JUNGLE)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
|
||||
Tile::door_acacia = (new DoorTile(196, Material::wood, L"doorAcacia"))->setDestroyTime(3.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"door_acacia")->setDescriptionId(IDS_TILE_DOOR_ACACIA)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
|
||||
Tile::door_dark = (new DoorTile(197, Material::wood, L"doorDark"))->setDestroyTime(3.0f)->setSoundType(Tile::SOUND_WOOD)->setIconName(L"door_dark")->setDescriptionId(IDS_TILE_DOOR_DARK)->setNotCollectStatistics()->sendTileData()->setUseDescriptionId(IDS_DESC_DOOR_WOOD);
|
||||
|
||||
Tile::seaLantern = (new SeaLanternTile(198, Material::glass))->setBaseItemTypeAndMaterial(Item::eBaseItemType_torch, Item::eMaterial_glowstone)->setDestroyTime(0.3f)->setSoundType(Tile::SOUND_GLASS)->setLightEmission(1.0f)->setIconName(L"glowstone")->setDescriptionId(IDS_TILE_SEA_LANTERN)->setUseDescriptionId(IDS_DESC_GLOWSTONE);
|
||||
|
||||
|
||||
// Special cases for certain items since they can have different icons
|
||||
Item::items[wool_Id] = ( new WoolTileItem(Tile::wool_Id- 256) )->setIconName(L"cloth")->setDescriptionId(IDS_TILE_CLOTH)->setUseDescriptionId(IDS_DESC_WOOL);
|
||||
|
|
|
|||
|
|
@ -388,6 +388,7 @@ public:
|
|||
static const int darkFence_Id = 191;
|
||||
static const int acaciaFence_Id = 192;
|
||||
|
||||
static const int seaLantern_Id = 198;
|
||||
|
||||
static Tile *stone;
|
||||
static GrassTile *grass;
|
||||
|
|
@ -590,6 +591,7 @@ public:
|
|||
static Tile* red_sandstone;
|
||||
static Tile* stairs_red_sandstone;
|
||||
static Tile* tree2Trunk;
|
||||
static Tile* seaLantern;
|
||||
|
||||
static void staticCtor();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue