Files
neoLegacy/Minecraft.World/LevelData.h
T
Tranqlmao 9abd52985e TU53 + Bug Fixes (Many)
Patch Notes:
Blocks
+ Colored shulker boxes
+ Concrete powder
+ Concrete
+ Glazed terracotta
Items
+ Shulker shell
+ Iron nugget
UI Changes
+ Added Custom Controls to Keyboard & Mouse, as well as Controller
+ Added Custom SuperFlat
+ Added Edit Server Menu
+ Added Firework Crafting
Feature Changes
+ Host Options
+ Added Pick Block
+ Added off-hand slot for maps and arrows.
Bug Fixes & changes
+ TU47: Banner hitbox wrong (and inventory model fixed)
+ TU47/48: Ice not melting properly
+ TU48: Dead bushes not dropping sticks
+ TU48: Guardians and polar bears not dropping cooked fish when on fire
+ TU48: Bonus chest missing saplings and seeds
+ TU48: Frosted ice obtainable
+ TU48: Hoppers not collecting items
+ TU48: Wither skeletons spawning in 2-high gaps
+ TU48: End crystals exploding with “TNT Explodes” off
+ TU48: Tamed ocelots staying hostile
+ TU48: Signs not placing on tall grass
+ TU51: Skeleton hitbox wrong
+ TU53: Fall damage in shallow water
+ TU53: Squids not spawning in man-made pools
+ Elytra has been improved to be more accurate to the source material
+ Removed Spectral Arrow from crafting
+ Fixed several broken item descriptions
+ You can no longer cook Pufferfish or Clownfish
+ Fixed scaling issue with paperdoll and chat
+ Iron and gold armor can now be smelted into nuggets.
+ More items can now be used as fuel in a furnace.
+ Using a firework rocket while gliding with elytra will now give the player a boost.
+ Changed the color of dyes, wool, carpets, and banners.
+ Reordered all colored blocks and items in the Creative inventory. Banners now have the same order of colors as all other colored blocks and items.
+ Fishing rods can now hook on entities without causing knockback or pseudo-damage.
+ Fixed banner crafting
+ Fixed Map colors for certain blocks
+ Fixed Path block height
+ Fixed String block issues
+ Fixed Item frame culling.
+ Fixed Tutorial world NBT/Block State issues
+ Fixed World Slider
+ Fixed Enderman AI
+ Fixed Player animation bug
+ HUD Flash text changes
+ Generation accuracy changes
+ Many other small accuracy changes and fixes
2026-11-24 13:44:06 -05:00

174 lines
4.9 KiB
C++

#pragma once
using namespace std;
#include "GameRules.h"
class Player;
class CompoundTag;
class LevelSettings;
class LevelType;
class GameType;
class LevelData
{
friend class DerivedLevelData;
private:
int64_t seed;
LevelType *m_pGenerator;// = LevelType.normal;
wstring generatorOptions;
int xSpawn;
int ySpawn;
int zSpawn;
int64_t gameTime;
int64_t dayTime;
int64_t lastPlayed;
int64_t sizeOnDisk;
// CompoundTag *loadedPlayerTag; // 4J removed
int dimension;
wstring levelName;
int version;
bool raining;
int rainTime;
bool thundering;
int thunderTime;
GameType *gameType;
bool generateMapFeatures;
bool hardcore;
bool m_modernEnd;
bool m_endDragonKilled;
bool m_endPreviouslyKilled;
bool m_endGatewaySpawned;
int m_endGatewayCount;
bool allowCommands;
bool initialized;
bool newSeaLevel; // 4J added
bool hasBeenInCreative; // 4J added
bool spawnBonusChest; // 4J added
int m_xzSize; // 4J Added
#ifdef _LARGE_WORLDS
int m_xzSizeOld; // 4J MGH Added, for expanding worlds
int m_hellScaleOld;
bool m_classicEdgeMoat;
bool m_smallEdgeMoat;
bool m_mediumEdgeMoat;
#endif
int m_hellScale; // 4J Added
// 4J added
int xStronghold;
int yStronghold;
int zStronghold;
bool bStronghold;
int xStrongholdEndPortal;
int zStrongholdEndPortal;
bool bStrongholdEndPortal;
GameRules gameRules;
protected:
LevelData();
public:
LevelData(CompoundTag *tag);
LevelData(LevelSettings *levelSettings, const wstring& levelName);
LevelData(LevelData *copy);
CompoundTag *createTag();
CompoundTag *createTag(vector<shared_ptr<Player> > *players);
enum
{
DIMENSION_NETHER=-1,
DIMENSION_OVERWORLD=0,
DIMENSION_END=1
};
protected:
virtual void setTagData(CompoundTag *tag); // 4J - removed CompoundTag *playerTag
public:
virtual int64_t getSeed();
virtual int getXSpawn();
virtual int getYSpawn();
virtual int getZSpawn();
virtual int getXStronghold();
virtual int getZStronghold();
virtual int getXStrongholdEndPortal();
virtual int getZStrongholdEndPortal();
virtual int64_t getGameTime();
virtual int64_t getDayTime();
virtual int64_t getSizeOnDisk();
virtual CompoundTag *getLoadedPlayerTag();
//int getDimension(); // 4J Removed TU 9 as it's never accurate
virtual void setSeed(int64_t seed);
virtual void setXSpawn(int xSpawn);
virtual void setYSpawn(int ySpawn);
virtual void setZSpawn(int zSpawn);
virtual void setHasStronghold();
virtual bool getHasStronghold();
virtual void setXStronghold(int xStronghold);
virtual void setZStronghold(int zStronghold);
virtual void setHasStrongholdEndPortal();
virtual bool getHasStrongholdEndPortal();
virtual void setXStrongholdEndPortal(int xStrongholdEndPortal);
virtual void setZStrongholdEndPortal(int zStrongholdEndPortal);
virtual void setGameTime(int64_t time);
virtual void setDayTime(int64_t time);
virtual void setSizeOnDisk(int64_t sizeOnDisk);
virtual void setLoadedPlayerTag(CompoundTag *loadedPlayerTag);
//void setDimension(int dimension); // 4J Removed TU 9 as it's never used
virtual void setSpawn(int xSpawn, int ySpawn, int zSpawn);
virtual wstring getLevelName();
virtual void setLevelName(const wstring& levelName);
virtual int getVersion();
virtual void setVersion(int version);
virtual int64_t getLastPlayed();
virtual bool isThundering();
virtual void setThundering(bool thundering);
virtual int getThunderTime();
virtual void setThunderTime(int thunderTime);
virtual bool isRaining();
virtual void setRaining(bool raining);
virtual int getRainTime();
virtual void setRainTime(int rainTime);
virtual GameType *getGameType();
virtual bool isGenerateMapFeatures();
virtual bool getSpawnBonusChest();
virtual void setGameType(GameType *gameType);
virtual bool useNewSeaLevel();
virtual bool getHasBeenInCreative(); // 4J Added
virtual void setHasBeenInCreative(bool value); // 4J Added
virtual LevelType *getGenerator();
virtual void setGenerator(LevelType *generator);
virtual wstring getGeneratorOptions();
virtual void setGeneratorOptions(const wstring &options);
virtual bool isHardcore();
virtual void setHardcore(bool hardcore);
virtual bool isModernEnd();
virtual void setModernEnd(bool modernEnd);
virtual bool isEndDragonKilled();
virtual void setEndDragonKilled(bool killed);
virtual bool isEndPreviouslyKilled();
virtual void setEndPreviouslyKilled(bool killed);
virtual bool isEndGatewaySpawned();
virtual void setEndGatewaySpawned(bool spawned);
virtual int getEndGatewayCount();
virtual void setEndGatewayCount(int count);
virtual bool getAllowCommands();
virtual void setAllowCommands(bool allowCommands);
virtual bool isInitialized();
virtual void setInitialized(bool initialized);
virtual GameRules *getGameRules();
virtual int getXZSize(); // 4J Added
#ifdef _LARGE_WORLDS
virtual int getXZSizeOld(); // 4J Added
virtual void getMoatFlags(bool* bClassicEdgeMoat, bool* bSmallEdgeMoat, bool* bMediumEdgeMoat); //4J MGH - added
virtual int getXZHellSizeOld(); // 4J Added
#endif
virtual int getHellScale(); // 4J Addded
};