summaryrefslogtreecommitdiffstats
path: root/src/Generating/FinishGen.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* fixed compile error in jenkins and more warningsx12xx12x2022-01-141-2/+2
|
* Fixed Compiler Warningsx12xx12x2022-01-141-1/+1
|
* Item frame maps (#5258)KingCol132021-07-091-1/+1
| | | | | | | + Send map data when item frame spawns. + Add some casts to placate compiler warnings. * size_t for array access. * Mark chunk dirty when rotation or item in item frame is changed.
* Chest, weather, crash, and miscellaneous fixes (#5215)Tiger Wang2021-04-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Alpha-sort cChestEntity * Chests: use SendUpdateBlockEntity * Pathfinder: fix out of range Y * 1.13: correct weather packet ID * Chests: fix neighbour scanner + Add OnAddToWorld and overload to scan neighbours there, instead of in the constructor/OnUse. This fixes hoppers accessing newly loaded double chests and seeing a null m_Neighbour, thus thinking its a single chest. * Fix typo in cross coords computation. * Simplify hopper logic. * Block entities: ASSERT that type is correct If you match the block type first before calling DoWithBlockEntity, the corresponding block entity must either be empty or correspond to the block type. * Chunk: fix some forgotten PendingSendBE cleanup + Add cleanup in SetAllData, WriteBlockArea - Remove RemoveBlockEntity (used once), HasBlockEntity (not used) * Replace MakeIndex with MakeIndexNoCheck * Remove extraneous MarkDirty in hopper & chests
* Fixing grass not generating below trees (#5199)12xx122021-04-231-0/+26
| | | * moves the y-Position below the tree on grass generation
* Fixed generator for the Mega Taiga biome (#5129)12xx122021-04-121-3/+109
| | | * Fixed generator for small foliage.
* Fix finisher generating invalid pumpkinTiger Wang2021-04-011-1/+1
| | | | | | Result was black spot in the ground because the meta exceeded 3 and the client didn't render anything. Been here since the beginning? http://github.com/cuberite/cuberite/blob/fbabf9ee8c7f0940e6f7d01e0362849bf4f6396b/source/FinishGen.cpp#L159
* zlib -> libdeflate (#5085)Tiger Wang2021-01-111-3/+1
| | | | | | + Use libdeflate + Use std::byte * Fix passing temporary to string_view + Emulate make_unique_for_overwrite
* Comment and code style fixTiger Wang2020-12-211-1/+1
| | | | | + Add static keyword - Don't capture everything in lambda
* Fix flower and foliage generation (#4723)mBornand2020-11-141-68/+155
| | | | | | | | | | | | | | | | | | | * fix flower generation - remove wrong mushroom and flower generation + add "tiny" mushrooms in Mushrooms biomes + add "tiny" mushrooms in Mega Taiga and variants + add tulip generation for plains biomes * Turn numbers into constants - Remove duplication of grass generation - Remove fern in inappropriate biomes * added roofed forest flowers to ini file * fixed crash with biMesaPlateuM + Use empty() + Emplace directly + Avoid a string copy in BiomeName + Alias BiomeIndex to avoid multiple casts Co-authored-by: 12xx12 <12xx12100@gmail.com> Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* Adding Silverfish Spawning Blocks (#4946)12xx122020-10-111-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * added breaking, spawning, animation * checkstyle * added undocumented API symbols * added changes suggested by @peterbell10 * added natural ore like generation * fixed spawning two silverfishes * fixed clang * fixed clang try 2 * updated comment unified offset * final clang fix * added spawning for more silverfishes if one was damaged * fixed spawning on one hit kill * fixed spawning on one hit kill fixed spawning by potion damage * fixed clang * fixed broken build * fixed broken build * I should read the error message properly fixed build now? * added small changes suggested by @peterbell10 Co-authored-by: 12xx12 <12xx12100@gmail.com>
* Minor typo fixesTiger Wang2020-08-211-16/+18
| | | | * Also DeMorgan'd Emerald ore condition
* Add enhanced Gold generation in Mesa-Type Biomes (#4821)12xx122020-08-121-0/+21
| | | | | | | | | * added enhanced gold generation in mesa-type-biomes * fixed typo in comment * added enhanced gold generation in mesa biomes - fixed small checkstyle errors Co-authored-by: 12xx12 <12xx12100@gmail.com>
* Update FinishGen.cpp12xx122020-08-101-1/+0
|
* small issues addressed in #4817 fixed because was merged to fast12xx122020-08-101-9/+1
|
* Adding Emeralds to generation (#4817)12xx122020-08-091-1/+29
| | | | | | | | | | | | | * Adding Emeralds to generation * fixed crash * fixed documentation and changed function name to match others * forgot to change the name in the doc * removed debug output - sorry build servers Co-authored-by: 12xx12 <12xx12100@gmail.com>
* Enable some more clang-tidy linter checks (#4738)peterbell102020-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Avoid inefficient AString -> c_str() -> AString round trip * Avoid redundant string init expressions * Avoid unnecessary return, continue, etc. * Add .clang-format to help with clang-tidy fix-its * Avoid unnecessary passing by value * Avoid unnecessary local copying * Avoid copying in range-for loops * Avoid over-complicated boolean expressions * Some violations missed by my local clang-tidy * Allow unnecessary continue statements * Add brackets * Another expression missed locally * Move BindingsProcessor call into clang-tidy.sh and add space * Fix pushd not found error * Different grouping of CheckBlockInteractionRate
* Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D2020-04-031-0/+1
| | | | | | | | | The BlockID.h file was removed from Globals.h and renamed to BlockType.h (main change) The BlockInfo.h file was removed from Globals.h (main change) The ENUM_BLOCK_ID and ENUM_ITEM_ID enum names were replaced with ENUM_BLOCK_TYPE and ENUM_ITEM_TYPE (cosmetics) The various enums, such as eDimension, eDamageType and eExplosionSource were moved from BlockType.h to Defines.h, together with the helper functions for converting between them and strings (StringToDimension et al.) (minor) Many inline functions were moved from headers to their respective cpp files, so that BlockType.h could be included only into the cpp file, rather than the header. That broke our tests a bit, since they pick bits and pieces out of the main code and provide stubs for the rest; they had to be re-stubbed and re-verified. eMonsterType values are no longer tied to E_ITEM_SPAWN_EGG_META_* values
* Separated chunk generator from world / plugin interfaces.Mattes D2019-09-061-1/+0
| | | | The generator now only takes care of servicing synchronous "GetChunk(X, Y)" and "GetBiomes(X, Y)" requests.
* Add a formatting function for Vector3 (#4282)peterbell102018-09-241-2/+2
| | | | | | | | | | * Vector3: Add custom fmt compatible formatter. * cLuaState: Add fmt version of ApiParamError * Use vector formatting in manual bindings * Always log vectors with FLOG
* Generate cacti and sugarcane with different heights (#4137)Cocosushi62018-05-031-25/+80
| | | | | When generating foliage, create cacti with height in the interval [1; MaxCactusHeight] and sugarcane with height in [1; MaxSugarcaneHeight] (with MaxCactusHeight and MaxSugarcaneHeight declared in world.ini) Fixes #4135
* Removed duplicate code (#4198)Bond-0092018-04-111-80/+7
| | | Should also fix dogs not despawning
* Wolves only spawn in taiga biomes (#4197)Bond-0092018-03-201-2/+1
| | | Ref: https://minecraft.gamepedia.com/Wolf#Spawning
* cFinishGenPreSimulator: Preserve sand meta (#4025)peterbell102017-09-181-9/+7
| | | Fixes #1516.
* Fix switch warnings (#4013)peterbell102017-09-141-2/+4
| | | | | | | | | | | | | | | * Fix switch warnings * Fix a variety of -Wswitch and -Wswitch-enum warnings * Remove unneeded -Wno-error flags * Reorganise some eMonsterType switches * Alpha sort eMonsterType cases in WriteMobMetadata and in cNBTChunkSerializer::AddMonsterEntity * List all mob types in protocol 1.12 and NBTChunkSerializer * cStructGenTrees::GetNumTrees: remove switch default * cWSSAnvil::LoadOldMinecartFromNBT: Log unhandled minecart type
* Changed entity ownership model to use smart pointersTiger Wang2017-08-071-2/+2
|
* Remove double includes part 2 (#3890)peterbell102017-08-031-1/+0
|
* BigFlower fixes (#3826)peterbell102017-07-071-2/+2
| | | | | | | * BigFlowers fixes * Correct upper part meta * Documented parameters to DoesIgnoreBuildCollision
* Generated tall flowers have flower type meta in both blockspeterbell102017-06-191-2/+2
|
* Finishers now update the heightmap for tall flowers. (#3545)Jacob2017-02-241-0/+7
|
* Use cChunkDef::Height for Y coord comparison where applicable.Moritz Borcherding2016-09-271-2/+2
|
* Implemented OverworldClumpFlowersNiLSPACE2016-08-141-0/+204
|
* Bulk clearing of whitespaceLogicParrot2016-02-051-4/+4
|
* Fixed opposite condition in OreNests finisher.Mattes D2015-12-091-2/+2
|
* Normalized OrePockets generator config names.Mattes D2015-11-271-2/+2
| | | | All INI values use AllInitialCapsStyle, no underscores.
* OrePockets finisher is now configurable.Mattes D2015-11-251-19/+105
|
* Added OrePockets and DirtPockets finish gens.Mattes D2015-11-251-0/+367
|
* Fixed tall grass trying to be placed in cold biomes.Samuel Barney2015-07-151-1/+7
|
* Fixed minor cast warningtycho2015-05-301-1/+1
|
* Fix FreeBSD/clang errors caused by -Werrorlinnemannr2015-05-301-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With FreeBSD/clang, -Werror combined with the configured warning flags yields some fatal errors, specifically related to signed conversion, 64 to 32 bit conversion, and tautological compares. CONTRIBUTORS Add myself to the contributor list src/Generating/FinishGen.cpp In cFinishGenPassiveMobs::GetRandomMob(), change the type of RandMob from size_t to the difference_type of the ListOfSpawnables iterator MobIter. Using size_t triggers a 64 bit to 32 bit conversion if the difference_type of the iterator class is 64 bit Also explicitly cast the noise expression to unsigned long so we don't get a signed conversion warning from the modulo against ListOfSpawnables.size() src/OSSupport/StackTrace.cpp FreeBSD 10 and above includes a non glibc implementation of benchmark() for which size_t, not int, is the return type. To account for this and prevent a signed conversion warning, abstract the type for numItems with a macro btsize src/StringUtils.h In StringToInteger(), correct a tautological compare warning for unsigned types with the template. If T is unsigned, comparing std::numeric_limits<T>::min() to the unsigned result is always false. That control can enter this branch in an evaluated template with an unsigned type T may also permit a signed number to be parsed and erroneously stripped of its signedness at runtime. To guard against this and avoid the warning in the case that the number parsed from the string is non-positive, return false and don't try to parse if T is unsigned and control enters the non-positive branch
* Merge branch 'master' into PreventNewWarningstycho2015-05-241-1/+1
|\
| * Wolves don't spawn in rivers.Alexander Harkness2015-05-241-1/+1
| |
| * Cows and rabbits no longer spawn over water.Alexander Harkness2015-05-231-1/+1
| | | | | | | | Fixes #2080
* | Made -Weverything an error.tycho2015-05-241-7/+7
| |
* | Merge branch 'master' into PreventNewWarningstycho2015-05-191-0/+1
|\|
| * Fix the health of animalsLukas Pioch2015-05-181-0/+1
| |
* | Fixed a lot of warningstycho2015-05-191-8/+8
|/
* More style checking.Mattes D2015-05-091-1/+1
| | | | Spaces around some operators are checked.
* Fixed styleSTRWarrior2015-04-191-2/+2
|
* Added GlowStone finisherSTRWarrior2015-04-191-1/+113
|
* Correct world height validations.Tommy Santerre2015-03-201-1/+1
| | | | | Unify the way we test block above the current one (Height - 1 instead of a_RelY + 1). Allow generation of world of flat height = 255
* Replaced IntNoiseXX with IntNoiseXXIntSTRWarrior2015-03-011-2/+2
|
* Made the minimum vine level configurableSTRWarrior2015-02-281-1/+1
|
* Implemented a vines finisher that creates vines in jungle biomesSTRWarrior2015-02-281-0/+94
|
* Ice finisher uses GetSnowStartHeight instead of specific biomesSTRWarrior2015-02-251-26/+19
|
* Snow finisher uses GetSnowStartHeight instead of specific biomesSTRWarrior2015-02-251-22/+14
|
* Fixed error message in cFinishGenPassiveMobsSTRWarrior2014-12-071-1/+1
| | | | It would send an error message when trying to spawn mobs in a desert
* FinishGenPassiveMobs: Cosmetic changes.Mattes D2014-12-051-23/+22
|
* formatting and default spawn percentagep-mcgowan2014-12-051-1/+2
|
* Merge branch 'master' of github.com:p-mcgowan/MCServer into animalTerrainFinisherp-mcgowan2014-12-051-13/+28
|\ | | | | | | update
| * conflict resolutionp-mcgowan2014-12-041-12/+12
| |\
| | * clearing CheckBasicStyle.lua messagesp-mcgowan2014-12-031-13/+13
| | |
| * | reformat for lua and CIp-mcgowan2014-12-021-5/+8
| | |
| * | formatting and commenting fixesp-mcgowan2014-12-021-4/+4
| | |
| * | cacti no longer spawn outside of desert variantsp-mcgowan2014-12-011-1/+13
| |/
* | reformatp-mcgowan2014-12-051-9/+5
| |
* | restructure, with logic this timep-mcgowan2014-12-051-5/+13
| |
* | restructured random animals, added check for desert (update as per wiki)p-mcgowan2014-12-051-19/+17
| |
* | handle non-vanilla dimensionsp-mcgowan2014-12-051-2/+2
| |
* | handle non-vanilla dimensionsp-mcgowan2014-12-051-2/+3
| |
* | formatting fixesp-mcgowan2014-12-051-4/+11
| |
* | format blocks and randomizingp-mcgowan2014-12-041-8/+9
| |
* | awful comment fixing, randomizer fixp-mcgowan2014-12-041-11/+24
| |
* | class description and doxy-commentingp-mcgowan2014-12-031-3/+3
| |
* | typos and oversights for lua and CIp-mcgowan2014-12-021-1/+5
| |
* | indentation, repeatable random, small correctionsp-mcgowan2014-12-021-98/+93
| |
* | fix comments after replacing spaces with tabsp-mcgowan2014-12-021-4/+4
| |
* | animal terrain finisherp-mcgowan2014-12-021-175/+175
| |
* | animal terrain finisherp-mcgowan2014-12-021-0/+212
|/
* Simplefied SoulsandRimsSTRWarrior2014-12-011-36/+6
| | | | Replaced two for loops with a single if
* Added better soulsand rimsSTRWarrior2014-12-011-0/+82
| | | | As a finisher called SoulsandRims
* Hopefully fixed random build failsSTRWarrior2014-11-301-1/+1
|
* Merge remote-tracking branch 'origin/master' into GeneratorShapeRefactorMattes D2014-11-201-1/+0
|\
| * Moved all Noise-related files into a separate folder.Mattes D2014-11-181-1/+0
| |
* | Snow generator: Fixed failure at top of the world.Mattes D2014-11-151-1/+1
|/
* TallGrassGenerator: Fixed crash when too highSTRWarrior2014-11-101-0/+5
|
* Another switch.Alexander Harkness2014-10-271-0/+5
|
* Fix missing biomes in enum.Alexander Harkness2014-10-271-0/+5
|
* Merged IniFile into main MCS sources.Mattes D2014-10-231-1/+1
|
* Added first test to show the object can be createdTycho2014-09-171-0/+1
|
* Removed an old and outdated comment.STRWarrior2014-08-101-2/+0
|
* PreSimulator: Added configurations.STRWarrior2014-07-301-4/+18
| | | | You can now choose if it should pregenerate something or not
* Merge pull request #1061 from mc-server/portalsMattes D2014-07-291-0/+9
|\ | | | | Portals and others
| * Merge branch 'master' into portalsTiger Wang2014-07-291-44/+53
| |\ | | | | | | | | | | | | Conflicts: src/World.h
| * \ Merge remote-tracking branch 'origin/master' into portalsTiger Wang2014-07-221-4/+63
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/Chunk.cpp src/Entities/Player.cpp src/Root.cpp src/World.cpp
| * \ \ Merge branch 'master' into portalsTiger Wang2014-07-181-15/+15
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/Blocks/WorldInterface.h src/ClientHandle.cpp src/ClientHandle.h src/Entities/Player.cpp src/Entities/Player.h src/Generating/FinishGen.cpp src/Protocol/Protocol.h src/Protocol/Protocol125.cpp src/Protocol/Protocol125.h src/Protocol/Protocol16x.cpp src/Protocol/Protocol16x.h src/Protocol/Protocol17x.cpp src/Protocol/Protocol17x.h src/Protocol/ProtocolRecognizer.cpp src/Protocol/ProtocolRecognizer.h src/Root.h src/World.cpp
| * | | | Fixed a NetherFinisher bugTiger Wang2014-06-041-0/+9
| | | | |
* | | | | Fixed comment above cFinishGenSingleTopBlockSTRWarrior2014-07-291-1/+1
| | | | |
* | | | | Renamed cFinishGenSingleBiomeSingleTopBlock to cFinishGenSingleTopBlockSTRWarrior2014-07-281-8/+13
| |_|_|/ |/| | | | | | | | | | | Now accepts a vector of biomes and a vector of allowed blocks.
* | | | NetherClumpGenerator: Fixed generating stuff on halfslabs and fencesSTRWarrior2014-07-271-1/+1
| | | |
* | | | NetherClumpFoliage: Fixed assertSTRWarrior2014-07-271-8/+39
| | | |
* | | | Tweaks to NetherClumpFoliageSTRWarrior2014-07-251-34/+6
| | | | | | | | | | | | | | | | Simplefied the way NetherClupFoliage creates the X and Z coordinate.
* | | | Speed up the NetherClumpFoliage finisher.STRWarrior2014-07-251-8/+9
| | | | | | | | | | | | | | | | Using IntNoiseXX instead of CubicNoiseXX.
* | | | Fixed possible crash in the NetherClumpFoliage finisher.STRWarrior2014-07-231-0/+5
| |_|/ |/| |
* | | Merged branch 'origin/Foliage'.madmaxoft2014-07-211-0/+59
|\ \ \
| * | | Fixed a missing enter.STRWarrior2014-07-211-0/+1
| | | |
| * | | Removed y for-loop.STRWarrior2014-07-211-27/+27
| | | | | | | | | | | | | | | | Only the top block now gets long grass.
| * | | Changed CubicNoiseXX to IntNoiseXXSTRWarrior2014-07-201-27/+36
| | | | | | | | | | | | | | | | Added some comments
| * | | Renamed cFinishGenFoliage to cFinishGenTallGrassSTRWarrior2014-07-201-8/+26
| | | | | | | | | | | | | | | | | | | | Better grass density Added double tall grass.
| * | | Fixed warningsSTRWarrior2014-07-201-2/+1
| | | |
| * | | First attempt for a new foliage finisherSTRWarrior2014-07-201-0/+32
| |/ /
* | / Style: Normalized to no spaces before closing parenthesis.madmaxoft2014-07-211-4/+4
| |/ |/|
* | Fixed spaces before commas.madmaxoft2014-07-181-2/+2
| |
* | Basic style fixes.madmaxoft2014-07-171-2/+2
| |
* | Normalized comments.madmaxoft2014-07-171-11/+11
|/ | | | | This was mostly done automatically and then visually inspected for obvious errors. All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
* g_BlockXXX => cBlockInfo::XXXandrew2014-03-011-3/+3
|
* Merged branch 'NetherFinish'.madmaxoft2014-01-181-0/+120
|\
| * Fixed errors.STRWarrior2014-01-181-1/+1
| |
| * Renamed cFinishGenNetherSprinkleFoliage to cFinishGenNetherClumpFoliage. Fixed typo'sSTRWarrior2014-01-181-6/+6
| |
| * Some tweaks.STRWarrior2014-01-181-5/+18
| | | | | | | | | | Everything generates more often. Fire can only spawn on ForeverBurning blocks.
| * Fixed bug where only brown mushrooms would spawn.STRWarrior2014-01-181-3/+3
| |
| * It now actualy works.STRWarrior2014-01-181-20/+42
| |
| * First attempt at creating a clumb version NetherFinisher.STRWarrior2014-01-171-22/+62
| |
| * Added cFinishGenNetherSprinkleFoliage.STRWarrior2014-01-101-0/+45
| |
* | Decoupled cChunkGenerator from cWorld and cRoot.madmaxoft2014-01-101-2/+2
|/ | | | Now the chunk generator can be used by other projects without depending on the two hugest structures in MCS.
* Fixed a few MSVC warnings.madmaxoft2014-01-071-1/+1
|
* Fixed compiler warning when iterating over a fixed array of items (ARRAYCOUNT).madmaxoft2013-12-201-3/+3
|
* Moved source to srcAlexander Harkness2013-11-241-0/+664