1
0
Fork 0
Commit Graph

97 Commits

Author SHA1 Message Date
12xx12 8d10f1b26a
fixed build (#5181) 2021-04-08 11:52:43 +00:00
12xx12 d78bcac150
Obsidian pillars, end fountain, not Ender dragon spawning (#4993)
* added generator for obsidian pillars and central fountain which then is used for the exit portal

* checkstyle

* checkstyle the second

* fixed clang
removed magic number
added Clamp

* make the pillars configurable

* fixed clang
added warning if there was a unknown value if the tower should have a cage or not

* forgot to cancel on unkwon value

* fixed clang this time maybe

* added new generator to generator test

* fixed test

* added prefab generation for end fountain

* fixed checkstyle and updated the prefab

* added ender dragon spawning
made the fountain positioning dynamic
removed fountain placement functions

* added enderdragon stuff to testing

* pls compile

* added changes suggested by @peterbell10

* fixed clang

* added debug for further research on the ARM build

* ok - it wasn't my tower placement

* checking in setup

* readded the fountain schematic

* removed finisher

* readded generator

* removed generator trigger - kept ini file access

* using cChunkDef function to calculate abs pos of endercrystal

* yes, I know it's unused...

* commented everything in the ComposableGenerator.cpp
 - so only the new class in compiled in but not called at all

* don't compile in the new generator at all
(removed from CMakeLists.txt)

* readded the new generator

* readded the new generator

* removed debug output

* made the towers generate acrocc chunk borders

* fixed bad merge

* fixed clang

* fixed clang

* generate the dragon 20 blocks above terrain

* trying to fixed weird undefined reference

* maybe this fixes the weird behaviour

* takes chunk width as parameter now

* added new comments with info to generated structures
removed ender dragon spawning
removed chunkwidth from parameter

* fixed linker

* maybe fixed linking. tried with gc and clang

* fixed ender crystal

* fixed test

* updated output strings

* fixed build

* fixed up test

* fixed test compile

* fixed test - cant get the tests to show up

* removed the semicolon

* maybe this is the fix?

* at this point i have no idea - in MVSC it works

* removed the ender dragon

Co-authored-by: 12xx12 <12xx12100@gmail.com>
2021-04-08 12:18:18 +02:00
Tiger Wang 5ca3a7c2e7 shared_ptr -> unique_ptr in generators 2021-03-17 23:44:42 +00:00
12xx12 3daf253b7f
Some emplace_back replacements (#5149)
* replace push_back with emplace_back when a new object was created in the function call
2021-03-07 16:31:43 +00:00
Tiger Wang eeb63b8901
zlib -> libdeflate (#5085)
+ Use libdeflate
+ Use std::byte
* Fix passing temporary to string_view
+ Emulate make_unique_for_overwrite
2021-01-11 16:39:43 +00:00
mBornand 58def8f7df
Fix flower and foliage generation (#4723)
* 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>
2020-11-14 12:24:31 +00:00
12xx12 c18fe8aa45
Adding Generator For Single Piece Structures (#4830)
* the beginning of a magnificent work - added basic files and classes without functionality

* fixed checkstyle

* added imports

* moved imports

* - Adding SinglePieceStructureGen
- Adding a cPrefabChestStructure to generate Chests with contents
- Added the options and calls to the ComposableGenerator

* moved Globals to .h file

* removed the chest thingy from the code (for now)

* Update SinglePieceStructureGen.cpp

* readded whitespace

* renamed to SinglePieceStructuresGen for consistency
added new classes to test

* fixed small things (mostly style and cleanup)
removed loottables

* added small changes suggested by madmaxoft

* small change to documentation

* added check for allowed biomes

* check only the biome of the origin position

* fixed error on IsBiomeAllowed

* added new cubesets

* updated structures for with sponging

* updated biome names

* updated metadata to prevent crashing
removed debug output

* updated structures with sponging

* added sponging to deserterWell to make it disappear in sand

* small change in meta

* rename DesertTemple -> DesertPyramid

* minor style changes

Co-authored-by: 12xx12 <12xx12100@gmail.com>
Co-authored-by: Alexander Harkness <me@bearbin.net>
2020-09-17 22:20:50 +00:00
peterbell10 13144a08e4
Enable some more clang-tidy linter checks (#4738)
* 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
2020-05-14 22:15:35 +00:00
Mattes D ad24702b4e ChunkGenerator: Changed to use cChunkCoords. 2019-09-08 20:21:49 +02:00
Mattes D 5f4df3e87d ShapeGen, HeiGen: Changed to use cChunkCoords. 2019-09-08 20:21:49 +02:00
Mattes D e4ac84a6ab BiomeGen: Changed to use cChunkCoords params. 2019-09-08 20:21:49 +02:00
Mattes D 878393a03d Moved the generator defaults to ComposableGenerator. 2019-09-06 16:12:33 +02:00
Mattes D a2ffa432b3 Separated chunk generator from world / plugin interfaces.
The generator now only takes care of servicing synchronous "GetChunk(X, Y)" and "GetBiomes(X, Y)" requests.
2019-09-06 16:12:33 +02:00
Cocosushi6 fbf5cf7aa6 Generate cacti and sugarcane with different heights (#4137)
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
2018-05-03 19:25:08 +01:00
Bond-009 750e2c1944 Dead bushes will generate in mega mega taigas (#3571) 2017-02-15 20:55:32 +01:00
NiLSPACE ab6e8b790c Implemented OverworldClumpFlowers 2016-08-14 13:32:39 +02:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Mattes D f060d9f9b0 PieceStructures generator: Fixed wrong merge conflict resolution.
Also improved reporting messages.
Ref.: http://forum.mc-server.org/showthread.php?tid=2256
2015-12-17 19:33:12 +01:00
Mattes D b8fbba5eb9 Added PieceStructures generator. 2015-12-01 10:35:07 +01:00
Mattes D 326f5e04f7 OrePockets finisher is now configurable. 2015-11-25 15:06:32 +01:00
Mattes D f2a8d5c047 Added OrePockets and DirtPockets finish gens. 2015-11-25 09:22:20 +01:00
Matti Hänninen b20294604c Fix old style casts and implicit conversions 2015-08-12 16:51:38 +03:00
Mattes D 6cd71a1e73 Generate biomes when pregenerating heights through CompositedHeiGen.
Fixes #2283.
2015-06-23 14:45:35 +02:00
Mattes D e06dd8f20e Added basic support for loading village prefabs from files. 2015-06-20 15:37:41 +02:00
tycho f2689c4887 Fixed a lot of warnings 2015-05-19 11:50:59 +01:00
STRWarrior 423bbbdbe1 Fixed typo in NetherForts initialization
The S in NetherForts was missing
2015-04-19 20:53:25 +02:00
STRWarrior e7542f676d Added GlowStone finisher 2015-04-19 19:45:18 +02:00
STRWarrior e63f9bdc1a Replaced cFinishGenPtr with std::make_shared 2015-03-01 20:06:44 +01:00
STRWarrior 0394acfc0c Made the minimum vine level configurable 2015-02-28 22:40:13 +01:00
STRWarrior 19d7ec51a0 Implemented a vines finisher that creates vines in jungle biomes 2015-02-28 22:37:33 +01:00
p-mcgowan 2ea8a36df6 forgot initializer 2014-12-02 15:55:09 -08:00
STRWarrior fa4a85c915 Added better soulsand rims
As a finisher called SoulsandRims
2014-12-01 16:36:48 +01:00
Mattes D 7a3b3aeb3c Gen refactor: Implemented CompositedHeiGen.
This fixes crashes in the Village generator due to the missing generator.
2014-11-13 21:28:50 +01:00
Mattes D 5fb2526e07 Generator: Shape initial refactoring.
The code compiles, but several structure generators are broken, crash on start.
2014-11-12 21:24:26 +01:00
Mattes D 4b95f7c69a Added BiomalNoise3D shape generator. 2014-11-10 17:00:14 +01:00
Mattes D 449d08cb3d Merged IniFile into main MCS sources. 2014-10-23 15:15:10 +02:00
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Mattes D 2ac3a807b7 ComposableGenerator: Removed nullptr initializers. 2014-10-22 22:58:36 +02:00
Mattes D e0cfbc4d85 Generator: Rewritten to use SharedPtrs. 2014-10-19 14:01:59 +02:00
win32re f8c1da4a71 Fixes #1503 - No gravel is being generated 2014-10-04 14:02:40 +02:00
STRWarrior 76e0c592ef Added Granite, Diorite and Andesite to the NaturalPatches generator. 2014-09-28 19:27:08 +02:00
Mattes D e15b8600a6 BiomeMultiCache is not used for simple generators. 2014-09-05 22:08:00 +02:00
Mattes D 60e235362c Fixed style. 2014-09-05 22:07:13 +02:00
DayBr3ak 5a608dc279 adapting format 2014-09-03 02:53:21 +02:00
DayBr3ak d9afe6dd65 adding config file entry #381 2014-09-02 01:19:52 +02:00
DayBr3ak 77409d47eb adding the multicache behavior 2014-09-02 01:13:19 +02:00
Mattes D 62e1c45ca5 DungeonRooms: Added a height probability distribution function. 2014-08-27 13:25:27 +03:00
Mattes D ac4d3a30ed Added initial dungeon rooms finisher. 2014-08-26 15:16:33 +03:00
STRWarrior d95768d01a Bunch of tweaks:
Renamed Quarts to Quartz
Using const_iterator instead of iterator
Used CheckBasicStyle script to find style errors
2014-08-10 22:36:02 +02:00
STRWarrior e529401dbb Added NaturalPatches generator
It generates gravel and dirt.
2014-08-10 11:57:05 +02:00