1
0
Fork 0
Commit Graph

32 Commits

Author SHA1 Message Date
Tiger Wang 9b97d63f8f
Chest, weather, crash, and miscellaneous fixes (#5215)
* 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
2021-04-30 13:23:46 +00:00
Tiger Wang 50a94f972d
Fix debug macro situation (#5114)
Use the standard NDEBUG.
2021-01-26 09:41:55 +00:00
peterbell10 aac592f985
Manage block entity lifetime with unique_ptr (#4080) 2020-04-03 23:23:38 +02:00
Mattes D 365cbc6e1c
Refactored more of Entities and BlockEntities to use Vector3. (#4403) 2019-09-29 14:59:24 +02:00
Mattes D 180a43d097 Fixed MSVC warnings (#4400) 2019-09-27 16:51:44 +01:00
Mattes D d8d1e6e1d2 Added a BasicGeneratorTest. 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
peterbell10 950aeffff8
CheckBasicStyle: Check number of empty lines between functions (#4267)
Add check for number of empty lines between functions and fix the corresponding failures
2018-07-26 22:24:36 +01:00
Tiger Wang 4ef47aed62 Changed entity ownership model to use smart pointers 2017-08-07 19:24:16 +01:00
Lukas Pioch 4691bc5a29 Removed double includes (#3885) 2017-08-02 19:57:20 +01: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
Mattes D f0c53dbad4 LuaAPI: Fixed bindings for cChunkDesc:GetBlockTypeMeta 2016-07-18 22:11:38 +02:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
tycho b2fa71a32a Fix comments 2015-05-28 12:54:04 +01:00
tycho f2689c4887 Fixed a lot of warnings 2015-05-19 11:50:59 +01:00
Mattes D 288cbf12cb Merge remote-tracking branch 'origin/master' into GeneratorShapeRefactor 2014-11-20 10:13:10 +01:00
Mattes D 2467d29a4e Moved all Noise-related files into a separate folder. 2014-11-18 12:07:08 +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
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Julian Laubstein 48470c858b Fixed #1550 2014-10-20 19:36:16 +02:00
Tiger Wang 37140ae578 Merge branch 'master' into portals
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
2014-07-18 20:10:51 +01:00
worktycho 132b367316 CopyPaste Error
Fixes CID 70460.
2014-07-13 15:32:44 +01:00
worktycho 64697f0cab Another COpyPaste Error
Fixes CID 70461
2014-07-13 15:29:43 +01:00
worktycho bfc485bfe2 Fix CopyPaste error that ment a_MaxRelX wasdn't checked
Fixes CID 70464
2014-07-13 15:05:54 +01:00
Tiger Wang 7d3d9e92e8 Fixed a NetherFinisher bug 2014-06-04 20:01:05 +01:00
madmaxoft 87e0bd54b4 BlockArea: Switched internal coords to Vector3i. 2014-03-25 21:59:41 +01:00
madmaxoft 2325a1a162 ChunkDesc warns about StructureGen's deprecation. 2014-03-01 20:59:41 +01:00
Tycho 80807eec2c Increased Type safety of Biomes
Changed a number of funcictions from using integers to store biomes to using EMCSBiome
Note that switching from an int to an Enum is a non-breaking chang to the lua bindings
2014-02-03 12:26:17 -08:00
madmaxoft 66427d754b Added cChunkDest::UpdateHeightmap()
This function is necessary for plugins manipulating the generated chunks, they need to update the heightmap before it is passed back to the generator.
2014-01-31 16:01:15 +01:00
madmaxoft 8610d45ef1 Fixed compiler warning when iterating over a fixed array of items (ARRAYCOUNT). 2013-12-20 16:01:34 +01:00
Alexander Harkness c3cd436ec3 Merge remote-tracking branch 'origin/master' into foldermove2
Conflicts:
	GNUmakefile
2013-11-24 14:37:03 +00:00
Alexander Harkness 675b4aa878 Moved source to src 2013-11-24 14:19:41 +00:00