mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-06-09 02:22:54 +00:00
Add Packed Ice
This commit is contained in:
parent
32d7734d3e
commit
135108a485
|
|
@ -81,6 +81,7 @@ void IUIScene_CreativeMenu::staticCtor()
|
|||
ITEM(Tile::obsidian_Id)
|
||||
ITEM(Tile::clay)
|
||||
ITEM(Tile::ice_Id)
|
||||
ITEM(Tile::packed_ice_Id)
|
||||
ITEM(Tile::snow_Id)
|
||||
ITEM(Tile::netherRack_Id)
|
||||
ITEM(Tile::soulsand_Id)
|
||||
|
|
|
|||
|
|
@ -1032,6 +1032,7 @@ void PreStitchedTextureMap::loadUVs()
|
|||
ADD_ICON(23, 3, L"door_jungle_upper");
|
||||
ADD_ICON(23, 4, L"door_spruce_upper");
|
||||
|
||||
ADD_ICON(23, 12, L"packed_ice");
|
||||
ADD_ICON(23, 14, L"inverted_daylight_detector");
|
||||
ADD_ICON(23, 15, L"iron_trapdoor");
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ Material *Material::portal = nullptr;
|
|||
Material *Material::cake = nullptr;
|
||||
Material *Material::piston = nullptr;
|
||||
Material *Material::web = nullptr;
|
||||
Material* Material::packedIce = nullptr;
|
||||
|
||||
void Material::staticCtor()
|
||||
{
|
||||
|
|
@ -76,6 +77,7 @@ void Material::staticCtor()
|
|||
// 4J added WebMaterial, Java version just does a local alteration when instantiating the Material for webs to get the same thing
|
||||
Material::web = (new WebMaterial(MaterialColor::cloth))->notAlwaysDestroyable()->destroyOnPush();
|
||||
Material::piston = (new Material(MaterialColor::stone))->notPushable();
|
||||
Material::packedIce = (new Material(MaterialColor::ice))->neverBuildable();
|
||||
}
|
||||
|
||||
Material::Material(MaterialColor *color)
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ public:
|
|||
static Material *cake;
|
||||
static Material *web;
|
||||
static Material *piston;
|
||||
static Material *packedIce;
|
||||
|
||||
static const int PUSH_NORMAL = 0;
|
||||
static const int PUSH_DESTROY = 1;
|
||||
|
|
|
|||
12
Minecraft.World/PackedIceTile.cpp
Normal file
12
Minecraft.World/PackedIceTile.cpp
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#include "stdafx.h"
|
||||
#include "net.minecraft.world.level.h"
|
||||
#include "net.minecraft.world.level.dimension.h"
|
||||
#include "net.minecraft.world.item.enchantment.h"
|
||||
#include "net.minecraft.world.food.h"
|
||||
#include "net.minecraft.stats.h"
|
||||
#include "PackedIceTile.h"
|
||||
|
||||
PackedIceTile::PackedIceTile(int id) : Tile(id, Material::packedIce)
|
||||
{
|
||||
friction = 0.98f;
|
||||
}
|
||||
13
Minecraft.World/PackedIceTile.h
Normal file
13
Minecraft.World/PackedIceTile.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
#include "Tile.h"
|
||||
|
||||
class Random;
|
||||
|
||||
class PackedIceTile : public Tile
|
||||
{
|
||||
public:
|
||||
PackedIceTile(int id);
|
||||
virtual int getResource(int data, Random* random, int playerBonusLevel) { return 0; };
|
||||
virtual int getPistonPushReaction() { return Material::PUSH_NORMAL; };
|
||||
;
|
||||
};
|
||||
|
|
@ -248,6 +248,7 @@ Tile* Tile::red_sandstone = nullptr;
|
|||
Tile* Tile::stairs_red_sandstone = nullptr;
|
||||
|
||||
Tile* Tile::tree2Trunk = nullptr;
|
||||
Tile* Tile::packed_ice = nullptr;
|
||||
|
||||
DWORD Tile::tlsIdxShape = TlsAlloc();
|
||||
|
||||
|
|
@ -475,6 +476,8 @@ void Tile::staticCtor()
|
|||
Tile::clayHardened = (new Tile(172, Material::stone)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_clay, Item::eMaterial_clay)->setDestroyTime(1.25f)->setExplodeable(7)->setSoundType(SOUND_STONE)->setIconName(L"hardened_clay")->setDescriptionId(IDS_TILE_HARDENED_CLAY)->setUseDescriptionId(IDS_DESC_HARDENED_CLAY);
|
||||
Tile::coalBlock = (new Tile(173, Material::stone)) ->setBaseItemTypeAndMaterial(Item::eBaseItemType_block, Item::eMaterial_coal)->setDestroyTime(5.0f)->setExplodeable(10)->setSoundType(SOUND_STONE)->setIconName(L"coal_block")->setDescriptionId(IDS_TILE_COAL)->setUseDescriptionId(IDS_DESC_COAL_BLOCK);
|
||||
|
||||
Tile::packed_ice = (new PackedIceTile(174))->setDestroyTime(0.5f)->setSoundType(SOUND_GLASS)->setIconName(L"packed_ice")->setDescriptionId(IDS_TILE_ICE)->setUseDescriptionId(IDS_DESC_ICE);
|
||||
|
||||
Tile::invertedDaylightDetector = static_cast<DaylightDetectorTile*>((new DaylightDetectorTile(178, true))->setDestroyTime(0.2f)->setSoundType(SOUND_WOOD)->setIconName(L"daylight_detector")->setDescriptionId(IDS_TILE_DAYLIGHT_DETECTOR)->setUseDescriptionId(IDS_DESC_DAYLIGHT_DETECTOR));
|
||||
Tile::red_sandstone = (new RedSandStoneTile(179))->setBaseItemTypeAndMaterial(Item::eBaseItemType_structblock, Item::eMaterial_sand)->setSoundType(Tile::SOUND_STONE)->setDestroyTime(0.8f)->sendTileData()->setIconName(L"red_sandstone")->setDescriptionId(IDS_TILE_SANDSTONE)->setUseDescriptionId(IDS_DESC_SANDSTONE)->sendTileData();
|
||||
Tile::stairs_red_sandstone = (new StairTile(180, Tile::red_sandstone, 0))->setBaseItemTypeAndMaterial(Item::eBaseItemType_stairs, Item::eMaterial_sand)->setIconName(L"stairsRedSandstone")->setDescriptionId(IDS_TILE_STAIRS_SANDSTONE)->sendTileData()->setUseDescriptionId(IDS_DESC_STAIRS);
|
||||
|
|
|
|||
|
|
@ -371,6 +371,7 @@ public:
|
|||
static const int woolCarpet_Id = 171;
|
||||
static const int clayHardened_Id = 172;
|
||||
static const int coalBlock_Id = 173;
|
||||
static const int packed_ice_Id = 174;
|
||||
|
||||
static const int invertedDaylightDetector_Id = 178;
|
||||
static const int red_sandstone_Id = 179;
|
||||
|
|
@ -590,6 +591,7 @@ public:
|
|||
static Tile* red_sandstone;
|
||||
static Tile* stairs_red_sandstone;
|
||||
static Tile* tree2Trunk;
|
||||
static Tile* packed_ice;
|
||||
|
||||
static void staticCtor();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue