1
0
Commit Graph

638 Commits

Author SHA1 Message Date
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
72d7027861 Merge pull request #3489 from cuberite/EntityOwnership
* Changed entity ownership model to use smart pointers
2017-08-18 11:17:56 +01:00
Lane Kolbly
7bdbfad1bb Changed int parameters to vector parameters in cCuboid and simulators (#3874) 2017-08-17 15:48:38 +02:00
Tiger Wang
4ef47aed62 Changed entity ownership model to use smart pointers 2017-08-07 19:24:16 +01:00
Lukas Pioch
07f25253a2 Removed unneeded includes (#3902) 2017-08-06 20:57:44 +01:00
peterbell10
759618b035 Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
Lukas Pioch
4691bc5a29 Removed double includes (#3885) 2017-08-02 19:57:20 +01:00
peterbell10
a56cfd1f42 Remove smart pointer macros 2017-07-21 14:41:51 +01: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
peterbell10
4dc72fe00b Remove redundant heighmap code 2017-06-14 11:15:44 +02:00
peterbell10
360d8eade0 FastRandom rewrite (#3754) 2017-06-13 21:35:30 +02:00
peterbell10
8a890cf945 Store cChunk::m_BlockEntities in a map (#3717)
* Store block entities in a map from block index
* Cleanup ForEachBlockEntity
* Cleanup DoWithBlockEntityAt
2017-05-22 22:27:55 +02:00
Lukas Pioch
e35ac1bfb9 Clang 5.0 fixes
- Added override keyword
- Removed inherited member variables
2017-05-21 12:19:06 +02:00
Mattes D
187abe3f5e Gen: Moved PiecePool into a separate file.
Also rewritten the PieceGenerator to use std::unique_ptr.
2017-05-04 09:49:30 +02:00
Jacob
f59bd02e0d Finishers now update the heightmap for tall flowers. (#3545) 2017-02-24 09:55:25 +01:00
Bond-009
750e2c1944 Dead bushes will generate in mega mega taigas (#3571) 2017-02-15 20:55:32 +01:00
mathiascode
4311f4a658 Added some blocks and items (#3503) 2017-02-14 11:13:55 +01:00
Mattes D
585571d78c PieceGenerator: Added rotation-aware vertical connectors. 2017-02-13 16:50:35 +01:00
Mattes D
a4955dfda3 Removed asserts about chunk queued.
The assumption is not needed and was invalid under a stress-test.
2017-01-19 16:25:07 +01:00
Mattes D
e28cecb3d1 Moved cPrefab parser self-check to the LoadablePieces test. (#3536) 2017-01-15 11:40:10 +01:00
Mattes D
fb0fc07579 Fixed race conditions and forgotten clear in Lua ref tracking. (#3530)
This fixes occasional crashes on plugin reload.
2017-01-13 10:31:05 +01:00
James Balajan
df5be57c1e Fix floating large trees (#3460) 2016-12-02 10:52:29 +01:00
Mattes D
bb78bd88b5 Fixed villages generating under-water.
The CompoGenBiomal didn't update the heightmap properly.
2016-12-01 17:45:31 +01:00
Mattes D
6b70574da9 Prefabs: Implemented support for ExpandFloorStrategy. 2016-11-24 15:51:53 +01:00
Moritz Borcherding
b268db4caa Use cChunkDef::Height for Y coord comparison where applicable. 2016-09-27 14:32:20 +02:00
Mattes D
d2e8643607 Fixed type-casting-related warnings. 2016-08-24 22:26:53 +02:00
NiLSPACE
ab6e8b790c Implemented OverworldClumpFlowers 2016-08-14 13:32:39 +02:00
Mattes D
8eaa8613da CMake: Remove needless minimum version specifications. 2016-07-18 22:11:42 +02:00
Mattes D
f0c53dbad4 LuaAPI: Fixed bindings for cChunkDesc:GetBlockTypeMeta 2016-07-18 22:11:38 +02:00
Mattes D
36eefbf0f2 SelfTests: Removed the unneeded cSelfTests class. 2016-06-18 13:12:10 +02:00
Mattes D
ce30e3f666 Normalized Vector3 API to use the same capitalization as all else. 2016-06-10 17:59:33 +02:00
LogicParrot
7f5757eccf Reduced unnecessary block updates 2016-04-23 00:30:00 +03:00
Lukas Pioch
5fa9c47f77 Fixed misuse of comma. 2016-03-18 20:20:30 +01:00
Mattes D
4457110579 Made ProtIntGen's max size compile-time-configurable. 2016-02-24 14:57:35 +01:00
Mattes D
1540f8fb5e Fixed includes in IntGen. 2016-02-24 14:57:33 +01:00
LogicParrot
ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
Mathias
89f3dec7ac Updated old forum links 2016-01-31 02:25:03 +02:00
Mattes D
80e1eb37dd Renamed leftover strings to Cuberite / Server, as needed.
Also upgraded the user setting file for MSVC to 2013.
2016-01-01 21:05:09 +01:00
Alexander Harkness
8b851d5048 Added HTTPS links wherever they are supported. 2015-12-19 14:30:32 +00: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
Lukas Pioch
d620dcdd08 Moved variables into scope, removed unused variables and fixed variables 2015-12-17 10:48:36 +01:00
Mattes D
b8fe09901b Fixed opposite condition in OreNests finisher. 2015-12-09 08:03:33 +01:00
Mattes D
2c3d933349 Added more details to the cubeset format documentation. 2015-12-01 10:35:08 +01:00
Mattes D
b8fbba5eb9 Added PieceStructures generator. 2015-12-01 10:35:07 +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
Mattes D
60800655c8 Generator: Fixed missing hitbox assignment.
This had caused village houses to generate too close to each other.
2015-10-05 21:15:08 +02:00
Mattes D
9da404ea2d Fixed a race condition between chunk loader and generator.
When using ChunkWorx to generate multiple chunks, the server would sometimes fail an assert because it would generate a chunk even when it was successfully loaded. This was caused by chunks queued in cWorld's m_SetChunkDataQueue and thus being marked as "InQueue" although they were already loaded.

Solved by adding a new parameter to chunk coord callbacks specifying whether the operation succeeded or failed, and using that instead of the chunk presence flag to decide whether to generate or not.
2015-10-04 14:06:37 +02:00
Theo Tosini
92b1a3440d
Fix clang compile error
Clang would previously fail on debug builds due to the use of an old-style cast.
2015-08-23 23:11:08 -04:00
Matti Hänninen
b20294604c Fix old style casts and implicit conversions 2015-08-12 16:51:38 +03:00
Mattes D
6e4122e551 Unified the doxy-comment format. 2015-07-31 16:49:10 +02:00
Samuel Barney
804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
Samuel Barney
9fde99aca2 Added documentation for GetLargeTreeAdjustment 2015-07-17 15:26:21 -06:00
Julian Laubstein
01f90ef97d Merge pull request #2350 from SamJBarney/PeonySnowFix
Fixed Tall Grass placement
2015-07-15 19:31:41 +02:00
Samuel Barney
4235feb7fd Fixed tall grass trying to be placed in cold biomes. 2015-07-15 11:04:09 -06:00
Julian Laubstein
e92335b669 Merge pull request #2346 from SamJBarney/TreeGrowthUpdate
Sapling Growth Update
2015-07-14 16:36:53 +02:00
Samuel Barney
d017fe5e39 Sapling Growth Update
* Growth has been slowed down
* Saplings do not grow if they do not have enough space to grow
* Saplings do not grow unless the light level is 9 or above
* Dark Oak doesn't grow unless it is in a 2x2

Jungle Trees now will grow into a large tree when 2x2 saplings are used.
2015-07-13 15:24:38 -06:00
Samuel Barney
051787dbc2 Switched from using std::max(std::min()) to using Clamp 2015-07-13 14:17:43 -06:00
Samuel Barney
db3642de89 Fixed misplaced parens 2015-07-09 14:41:14 -06:00
Samuel Barney
aa94a275c6 Fixes compilation failures on MacOSX 10.10
* Replace old c-style casts with c++ casts
* Added `-Wno-error=old-style-cast` to Protocol18x.cpp
2015-07-09 11:15:37 -06:00
Mattes D
bebd4de144 Fixed warnings generated by 64-bit MSVC. 2015-07-07 11:50:06 +02: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
Mattes D
8df31067d4 Externalized cPrefabPiecePool self-test. 2015-06-19 16:15:59 +02:00
Mattes D
ae16689420 PrefabPiecePool: Added loading from cubeset file. 2015-06-18 23:32:43 +02:00
Mattes D
ec4bd42dd8 Updated prefabs from the Gallery server. 2015-06-13 18:14:09 +02:00
Mattes D
d390214929 SelfTests are registered and executed after logging framework init.
Fixes #2228.
2015-06-11 22:20:04 +02:00
Mattes D
48c153bf53 Fixed warnings in MSVC.
It complained about undefined return values or using uninitialized variables.
2015-06-02 12:51:43 +02: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
b2fa71a32a Fix comments 2015-05-28 12:54:04 +01:00
tycho
a6ccee5948 Merge branch 'master' into PreventNewWarnings 2015-05-24 17:27:05 +01:00
tycho
76a3165f09 Fix comments 2015-05-24 14:58:24 +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
Safwat Halaby
042c08d7e3 Merge pull request #2107 from mc-server/cow-waterspawn
Cows no longer spawn over water.
2015-05-23 22:11:34 +03:00
tycho
81c0116cf1 Merge branch 'master' into PreventNewWarnings 2015-05-23 07:33:52 -07:00
Lukas Pioch
e30b2ed487 Fixed missing overrides and added a ignore flag for reserved macro for clang version 3.6 and higher. 2015-05-23 16:28:37 +02:00
tycho
a5624debcb Fix tests 2015-05-23 13:21:02 +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
77f1f58c0a Make -Werror disabling file only
Ad fix a load of warnings
2015-05-19 19:32:10 +01:00
tycho
2bb25b8afa Fixed some more warnings 2015-05-19 15:21:29 +01:00
tycho
03c75943ea More fixed warnings 2015-05-19 13:34:52 +01:00
tycho
fa4fb75e03 Fixed compile and a few more warnings 2015-05-19 12:28:31 +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
846d16315a CheckBasicStyle: checks spaces around * and &. 2015-05-09 12:58:55 +02:00
Mattes D
c13b1931ff More style checking.
Spaces around some operators are checked.
2015-05-09 12:58:54 +02:00
Mattes D
0ff7514351 Merge pull request #1879 from mc-server/DynamicThreshold
Changed Nether composition to change the threshold from a cubic noise
2015-04-21 23:09:27 +02:00
STRWarrior
c5189aaf9c Changed default MaxThreshold value
There is now really a difference between open and dense parts
2015-04-21 16:30:18 +02:00
STRWarrior
cc67a8bde9 Calculate threshold for each column in a chunk instead for the whole chunk 2015-04-21 16:01:27 +02:00
STRWarrior
3b74107bf3 Changed Nether composition to change the threshold from a cubic noise 2015-04-20 18:03:25 +02:00
STRWarrior
423bbbdbe1 Fixed typo in NetherForts initialization
The S in NetherForts was missing
2015-04-19 20:53:25 +02:00
STRWarrior
f17f0fa3bd GlowStone: Changed order of initialization of member variables 2015-04-19 20:08:51 +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