1
0
Fork 0
Commit Graph

111 Commits

Author SHA1 Message Date
Mattes D 01b8ed5295
Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)
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
2020-04-03 08:57:01 +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
peterbell10 4727ed2084 Add a formatting function for Vector3 (#4282)
* Vector3: Add custom fmt compatible formatter.

* cLuaState: Add fmt version of ApiParamError

* Use vector formatting in manual bindings

* Always log vectors with FLOG
2018-09-24 21:33:39 +01: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 98d807187b Removed duplicate code (#4198)
Should also fix dogs not despawning
2018-04-11 12:17:30 +01:00
Bond-009 1991a5b0e6 Wolves only spawn in taiga biomes (#4197)
Ref: https://minecraft.gamepedia.com/Wolf#Spawning
2018-03-20 10:44:30 +01:00
peterbell10 b5fa96f4f8 cFinishGenPreSimulator: Preserve sand meta (#4025)
Fixes #1516.
2017-09-18 08:45:32 +01:00
peterbell10 307e7aaff5 Fix switch warnings (#4013)
* 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
2017-09-14 09:48:57 +01:00
Tiger Wang 4ef47aed62 Changed entity ownership model to use smart pointers 2017-08-07 19:24:16 +01:00
peterbell10 759618b035 Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
peterbell10 bbf5bec817 BigFlower fixes (#3826)
* BigFlowers fixes

* Correct upper part meta
* Documented parameters to DoesIgnoreBuildCollision
2017-07-07 16:37:53 +02:00
peterbell10 9201c7be7a Generated tall flowers have flower type meta in both blocks 2017-06-19 20:18:44 +02:00
Jacob f59bd02e0d Finishers now update the heightmap for tall flowers. (#3545) 2017-02-24 09:55:25 +01:00
Moritz Borcherding b268db4caa Use cChunkDef::Height for Y coord comparison where applicable. 2016-09-27 14:32:20 +02: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 b8fe09901b Fixed opposite condition in OreNests finisher. 2015-12-09 08:03:33 +01:00
Mattes D 851ee6a27f Normalized OrePockets generator config names.
All INI values use AllInitialCapsStyle, no underscores.
2015-11-27 12:44:42 +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
Samuel Barney 4235feb7fd Fixed tall grass trying to be placed in cold biomes. 2015-07-15 11:04:09 -06:00
tycho bca13d9187 Fixed minor cast warning 2015-05-30 12:31:05 +01:00
linnemannr ee34e7131a Fix FreeBSD/clang errors caused by -Werror
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
2015-05-30 02:23:57 -06:00
tycho a6ccee5948 Merge branch 'master' into PreventNewWarnings 2015-05-24 17:27:05 +01:00
tycho dae9e5792a Made -Weverything an error. 2015-05-24 12:56:56 +01:00
Alexander Harkness 45012b72e7 Wolves don't spawn in rivers. 2015-05-24 07:28:17 +01:00
Alexander Harkness abf6ac3148 Cows and rabbits no longer spawn over water.
Fixes #2080
2015-05-23 10:38:57 +01:00
tycho 813c95d4b0 Merge branch 'master' into PreventNewWarnings 2015-05-19 19:40:39 +01:00
tycho f2689c4887 Fixed a lot of warnings 2015-05-19 11:50:59 +01:00
Lukas Pioch a75106aea7 Fix the health of animals 2015-05-18 06:36:52 +02:00
Mattes D c13b1931ff More style checking.
Spaces around some operators are checked.
2015-05-09 12:58:54 +02:00
STRWarrior f1558c6015 Fixed style 2015-04-19 19:59:27 +02:00
STRWarrior e7542f676d Added GlowStone finisher 2015-04-19 19:45:18 +02:00
Tommy Santerre 3f6d823aa4 Correct world height validations.
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
2015-03-19 20:32:17 -04:00
STRWarrior 3d3735a378 Replaced IntNoiseXX with IntNoiseXXInt 2015-03-01 20:08:05 +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
STRWarrior ac2c88b451 Ice finisher uses GetSnowStartHeight instead of specific biomes 2015-02-25 19:22:44 +01:00
STRWarrior ba3eaf9223 Snow finisher uses GetSnowStartHeight instead of specific biomes 2015-02-25 19:12:53 +01:00
STRWarrior 95c83abcdb Fixed error message in cFinishGenPassiveMobs
It would send an error message when trying to spawn mobs in a desert
2014-12-07 12:00:36 +01:00
Mattes D c5dc5ac45f FinishGenPassiveMobs: Cosmetic changes. 2014-12-05 22:46:46 +01:00
p-mcgowan b25fcb0972 formatting and default spawn percentage 2014-12-05 11:31:01 -08:00
p-mcgowan a8bbd5efe4 Merge branch 'master' of github.com:p-mcgowan/MCServer into animalTerrainFinisher
update
2014-12-05 11:24:09 -08:00
p-mcgowan 750b4a3eaa reformat 2014-12-05 01:01:10 -08:00
p-mcgowan c655d97c9d restructure, with logic this time 2014-12-05 00:57:40 -08:00
p-mcgowan bd8c1850da restructured random animals, added check for desert (update as per wiki) 2014-12-04 17:20:19 -08:00
p-mcgowan 78f0aebaf4 handle non-vanilla dimensions 2014-12-04 17:01:34 -08:00
p-mcgowan 538991c973 handle non-vanilla dimensions 2014-12-04 16:59:45 -08:00
p-mcgowan 53a33595b7 formatting fixes 2014-12-04 16:44:18 -08:00
p-mcgowan 8557ab18d0 conflict resolution 2014-12-04 13:31:58 -08:00