mirror of
https://github.com/celisej567/mcpe.git
synced 2026-01-03 05:49:04 +03:00
* Mac OS X 10.6 & More C++03 Support * Fix SDL2 options.txt loading for C++03 --------- Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
83 lines
1.5 KiB
C++
83 lines
1.5 KiB
C++
/********************************************************************
|
|
Minecraft: Pocket Edition - Decompilation Project
|
|
Copyright (C) 2023 iProgramInCpp
|
|
|
|
The following code is licensed under the BSD 1 clause license.
|
|
SPDX-License-Identifier: BSD-1-Clause
|
|
********************************************************************/
|
|
|
|
#include "common/Utils.hpp"
|
|
|
|
#pragma once
|
|
|
|
class Material
|
|
{
|
|
public:
|
|
Material();
|
|
Material(bool bFlammable);
|
|
virtual ~Material();
|
|
|
|
static void initMaterials();
|
|
static void teardownMaterials();
|
|
|
|
virtual bool isLiquid() const;
|
|
virtual bool letsWaterThrough() const;
|
|
virtual bool isSolid() const;
|
|
virtual bool blocksLight() const;
|
|
virtual bool blocksMotion() const;
|
|
virtual bool isFlammable() const;
|
|
|
|
public:
|
|
static Material
|
|
*air,
|
|
*dirt,
|
|
*wood,
|
|
*stone,
|
|
*metal,
|
|
*water,
|
|
*lava,
|
|
*leaves,
|
|
*plant,
|
|
*sponge,
|
|
*cloth,
|
|
*fire,
|
|
*sand,
|
|
*decoration,
|
|
*glass,
|
|
*explosive,
|
|
*coral,
|
|
*ice,
|
|
*topSnow,
|
|
*snow,
|
|
*cactus,
|
|
*clay,
|
|
*vegetable,
|
|
*portal,
|
|
*cake;
|
|
|
|
public:
|
|
bool m_bFlammable;
|
|
};
|
|
|
|
class GasMaterial : public Material
|
|
{
|
|
bool isSolid() const override;
|
|
bool blocksLight() const override;
|
|
bool blocksMotion() const override;
|
|
};
|
|
|
|
class LiquidMaterial : public Material
|
|
{
|
|
bool isLiquid() const override;
|
|
bool isSolid() const override;
|
|
bool blocksMotion() const override;
|
|
};
|
|
|
|
class DecorationMaterial : public Material
|
|
{
|
|
bool isSolid() const override;
|
|
bool blocksLight() const override;
|
|
bool blocksMotion() const override;
|
|
};
|
|
|