summaryrefslogtreecommitdiffstats
path: root/source/Chunk.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Moved source to srcAlexander Harkness2013-11-241-2732/+0
|
* Added cSignEntity into API, added cChunkDesc:GetBlockEntity().madmaxoft2013-11-141-86/+5
| | | | This fixes both #228 and #347.
* Bundled fixes [SEE DESC]Tiger Wang2013-11-121-3/+10
| | | | | | | | * BoundingBox now returns FACE_NONE + Arrows can be picked up * Arrows dug up resume physics simulations * Added sound effects for bows, lava to stone, and arrows * Fixed SoundParticleEffect on <1.7 protocols
* Last of the nitpicker note fixes. Added some inline commenting.Samuel Barney2013-10-301-0/+1
|
* Update to allow the light map to remain the same, but allow alteration of sky light values based on time.Samuel Barney2013-10-291-2/+11
|
* Merge branch 'master' of https://github.com/SamJBarney/MCServer into MobSpawningSamuel Barney2013-10-281-0/+23
|\
| * Added cChunk::UnboundedRelGetBlockLights().madmaxoft2013-10-271-0/+23
| | | | | | | | This queries both BlockLight and SkyLight for the specified block.
* | Got spiders and other mobs respecting night and day for spawningSamuel Barney2013-10-281-1/+2
| |
* | Made mob spawning code use the chunk so that it could use varying sizes of areas for different mobs.Samuel Barney2013-10-281-32/+20
| |
* | Moving spawning position to the center of the block.Samuel Barney2013-10-261-1/+3
| |
* | Using provided UnboundedRelGetBlockBlockLight and UnboundedRelGetBlockSkyLight.Samuel Barney2013-10-241-5/+3
| |
* | Merge branch 'master' of https://github.com/SamJBarney/MCServer into MobSpawningSamuel Barney2013-10-241-250/+109
|\|
| * Implemented UnboundedRel BlockLight and SkyLight.madmaxoft2013-10-221-250/+109
| | | | | | | | Also unified the various UnboundedRel operations to use the same underlying structure.
* | Removed my hackish Light functionsSamuel Barney2013-10-241-96/+0
| |
* | Invalid light value is now 127Samuel Barney2013-10-231-5/+5
| |
* | Added two new unbounded del functions to deal with looking up the lighting.Samuel Barney2013-10-211-11/+100
| |
* | Swapped which block is checked for light first.Samuel Barney2013-10-211-4/+4
| |
* | Current Mob Spawning code.Samuel Barney2013-10-211-7/+22
|/
* replacing dynamic_cast by c-style castmgueydan2013-09-091-11/+4
|
* replacing C-style cast by dynamic_castmgueydan2013-09-081-1/+1
|
* Replacing chunCk by chunkmgueydan2013-09-081-1/+1
|
* replacing asserts by ASSERTsmgueydan2013-09-081-3/+3
|
* renaming the cChunk::getRandomBlock method + removing a buggy working logmgueydan2013-09-081-2/+2
|
* Adding glue to call everything done in last commits - now the mobs are spawningmgueydan2013-09-081-0/+61
|
* Disabeling current mob spawning and tickmgueydan2013-09-081-2/+6
|
* Adding an Empty shell that would launch mob spawner - not called yetmgueydan2013-09-081-0/+37
|
* Adding mob census (sorry this is a big commit as work was done before git integration i couldn't split it more)mgueydan2013-09-071-0/+39
|
* Fixed the extreme strain on the world tick thread.madmaxoft2013-08-191-0/+5
| | | | Block changes were sent even with empty changesets, causing a lot of lost CPU cycles.
* Moved entities into the Entities subfolder.madmaxoft2013-08-191-2/+2
|
* cChunk::SetBlock() now uses cChunk::FastSetBlock() for the common code path.madmaxoft2013-08-191-69/+11
|
* Removed an unused CriticalSection from cChunk.madmaxoft2013-08-191-19/+5
| | | | Fixes #109
* Implemented cWorld:QueueSetBlock(), as requested for delayed blocksetting.madmaxoft2013-08-181-0/+36
| | | | Untested yet, so might not work.
* Removed SetServerBlock griefing.madmaxoft2013-08-181-55/+0
|
* Properly fixed piston non-animationTiger Wang2013-08-181-0/+55
| | | | Fixes #57
* Improved function names for protocol packet sending; alpha-sorted the function listsmadmaxoft@gmail.com2013-07-071-58/+58
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1659 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Unified the way mobs are spawned (egg vs natural). Fixed deadlocks in mob moving. Fixed mob destroying code.madmaxoft@gmail.com2013-06-251-1/+1
| | | | | | Should fix FS #400 and partially fix FS #381 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1626 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Furnaces light up visually when they're cookingmadmaxoft@gmail.com2013-06-201-2/+5
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1612 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added hopper entity, it can suck items out of chests, dispensers, droppers and other hopppers above it.madmaxoft@gmail.com2013-06-131-11/+25
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1587 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added cWorld::SetSignLines(), re-exported to Lua manually to avoid ghost return valuesmadmaxoft@gmail.com2013-06-121-1/+3
| | | | | | FS #364 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1582 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Removed cLadder, cSign, cStairs, cTorch and cVine classes, moved their functionality into the appropriate BlockHandlers / ItemHandlersmadmaxoft@gmail.com2013-06-041-2/+0
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1555 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Implemented proper player crouching.madmaxoft@gmail.com2013-06-041-2/+2
| | | | | | Fixes FS #365 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1553 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Moved BlockEntities to a separate foldermadmaxoft@gmail.com2013-05-281-7/+7
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1527 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Block entities now receive the cChunk param in their Tick() functionmadmaxoft@gmail.com2013-05-281-1/+1
| | | | | | They can safely access that chunk and any of its neighbors during ticking. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1526 0a769ca7-a7f5-676a-18bf-c427514a06d6
* cChunk: Added the GetRelNeighborChunkAdjustCoords() functionmadmaxoft@gmail.com2013-05-281-0/+66
| | | | | | Not only does it return the proper neighbor chunk, but also it adjusts the relative coords to be in that returned chunk. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1523 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Chunk / ChunkMap: Added support for unbounded querying blocktype-only or blockmeta-onlymadmaxoft@gmail.com2013-05-281-1/+103
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1522 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Implemented droppersmadmaxoft@gmail.com2013-05-261-0/+123
| | | | | | Added a common ancestor class "DropSpenser" that has the common code for dropper and dispenser and is Lua-accessible, too. The Debuggers plugin now triggers both droppers and dispensers when rclking them with a redstone torch. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1514 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed entity chunking.madmaxoft@gmail.com2013-05-191-1/+3
| | | | | | Sand simulator was off, sand in negative coords wouldn't fall properly git-svn-id: http://mc-server.googlecode.com/svn/trunk@1489 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Removed pickup loggingmadmaxoft@gmail.com2013-05-171-0/+4
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1487 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added logging to pickup collection when a player is near and when collecting.madmaxoft@gmail.com2013-05-131-0/+9
| | | | | | This should help fix the inactive pickups bug, http://forum.mc-server.org/showthread.php?tid=434&pid=8019#pid8019 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1480 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed player teleporting too far away ("Entity lost")madmaxoft@gmail.com2013-05-061-3/+7
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1452 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed most of client slowdowns caused by sending too many block changes (bad condition in FastSetBlock)madmaxoft@gmail.com2013-04-281-1/+1
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1431 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed a few possible crashes with out-of-bounds Y coordsmadmaxoft@gmail.com2013-04-271-0/+12
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1413 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()madmaxoft@gmail.com2013-04-131-18/+124
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1385 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed chunk possibly writing to uninitialized memorymadmaxoft@gmail.com2013-04-091-0/+12
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1376 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Mineshafts: Added random loot to generated chests and fixed chest directionmadmaxoft@gmail.com2013-04-061-2/+8
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1365 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added a debugging log for melon-growing to catch FS #349madmaxoft@gmail.com2013-04-031-0/+5
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1355 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Proper fix for FS #347. Also unification of ticking block entities.madmaxoft@gmail.com2013-04-011-26/+9
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1348 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed block update queueing and water meta change not propagated to clients.madmaxoft@gmail.com2013-03-221-17/+57
| | | | | | Fixes FS #333. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1297 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added support for the packet #28 (0x1C): ENTITY_VELOCITYkeyboard.osh@gmail.com2013-03-181-0/+16
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1283 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Huge performance boost in blockhandlers, they have direct access to chunk data when blockchecking.madmaxoft@gmail.com2013-03-151-12/+24
| | | | | | Also fixed vines' placement. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1278 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Small performance improvements in fluid simulator.madmaxoft@gmail.com2013-03-141-26/+33
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1276 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fix for the Vaporize fluid simulator when loading chunks.madmaxoft@gmail.com2013-03-141-0/+3
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1271 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Pickups are now being saved into Anvil.madmaxoft@gmail.com2013-03-091-0/+6
| | | | | | Also changed cEntity rotation datatype to double git-svn-id: http://mc-server.googlecode.com/svn/trunk@1262 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Player can sit in minecarts (but not move them yet)madmaxoft@gmail.com2013-03-031-3/+15
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1249 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Simulators are woken up upon chunk loadmadmaxoft@gmail.com2013-03-031-0/+39
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1248 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Floody fluid simulator has been converted to use direct chunk accessmadmaxoft@gmail.com2013-03-021-0/+5
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1236 0a769ca7-a7f5-676a-18bf-c427514a06d6
* New fire simulator, fully rewritten to the new scheme of things, directly accessing chunk data.madmaxoft@gmail.com2013-03-011-13/+16
| | | | | | http://forum.mc-server.org/showthread.php?tid=617&pid=6626#pid6626 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1233 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed previous commit.madmaxoft@gmail.com2013-02-281-1/+1
| | | | | | I'm too sleepy and shouldn't be let around the sources :P git-svn-id: http://mc-server.googlecode.com/svn/trunk@1230 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed a bug in cChunk::QueueTickBlockNeighbors() that caused the tick thread to overload easilymadmaxoft@gmail.com2013-02-281-3/+1
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1229 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Simulators now have direct access to the cChunk object in the WakeUp() callmadmaxoft@gmail.com2013-02-281-63/+103
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1227 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added new hooks: OnChunkAvailable(), OnChunkUnloaded() and OnChunkUnloading(). Modified OnChunkGenerated() signature.madmaxoft@gmail.com2013-02-051-0/+2
| | | | | | http://forum.mc-server.org/showthread.php?tid=464&pid=6312#pid6312 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1193 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Dispensers can dispense items and liquids nowluksor111@gmail.com2012-12-261-1/+63
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1105 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added more constants into eEntityType; made them a compulsory parameter to the constructor, so that all entities have proper type.madmaxoft@gmail.com2012-12-211-6/+6
| | | | | | Also added a few utility functions to cEntity for distinguishing the types (IsPlayer(), IsPickup() etc.) git-svn-id: http://mc-server.googlecode.com/svn/trunk@1092 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added dispensers (they can't dispense items yet)luksor111@gmail.com2012-12-191-0/+15
| | | | | | | | Fixed crash when digging snow Moved BlockPlace hook check, so Core plugin will no longer block item usage Player chat messages are now visible in the console git-svn-id: http://mc-server.googlecode.com/svn/trunk@1081 0a769ca7-a7f5-676a-18bf-c427514a06d6
* cChunk now tracks its neighbors as direct pointers; used in UnboundedRelGetBlock et al.madmaxoft@gmail.com2012-12-141-2/+118
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1073 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Removed an unused obsolete function chain - cWorld::GetChunkBlockData()madmaxoft@gmail.com2012-11-111-12/+0
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1036 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed FS #268 - if a block entity breaking is disallowed by a plugin, the entire blockentity is sent back to the clientmadmaxoft@gmail.com2012-11-111-6/+12
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1031 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Made DeepSnow remove flowers and mushrooms while snowing.luksor111@gmail.com2012-10-221-0/+12
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1001 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Top blocks are now snowed over, either normally, or in deep snow (patch contributed by funmaker, Luksor and Sebi)madmaxoft@gmail.com2012-10-211-0/+84
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@1000 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added jukeboxes (patch contributed by Luksor)madmaxoft@gmail.com2012-10-211-0/+31
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@994 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Made cWorld's block query functions more orthogonal, added GetBlockInfo() returning all info on a block.madmaxoft@gmail.com2012-10-201-0/+13
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@986 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Removed unused [Physics].Water section from settings.ini.madmaxoft@gmail.com2012-10-191-10/+0
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@982 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed DelayedFluidSimulator.madmaxoft@gmail.com2012-10-151-1/+1
| | | | | | Floody fluid simulator is now woken up properly across chunk borders. git-svn-id: http://mc-server.googlecode.com/svn/trunk@966 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Floody fluid simulator now dries up correctly, too.madmaxoft@gmail.com2012-10-141-16/+72
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@964 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Preparation for multiple fluid simulators.madmaxoft@gmail.com2012-10-131-2/+0
| | | | | | | | | Moved all simulators into a subfolder. Replaced cWaterSimulator and cLavaSimulator with a generic cFluidSimulator. Moved original fluid simulation into cClassicFluidSimulator. Fluid simulator parameters (MaxHeight, Falloff) are read from the world.ini file (can have nether-like lava with lower falloff) git-svn-id: http://mc-server.googlecode.com/svn/trunk@956 0a769ca7-a7f5-676a-18bf-c427514a06d6
* All blockticking is now done in cBlockHandlersmadmaxoft@gmail.com2012-10-071-95/+5
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@942 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Completely removed the old (buggy) redstone simulator.madmaxoft@gmail.com2012-10-061-1/+0
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@937 0a769ca7-a7f5-676a-18bf-c427514a06d6
* BlockArea writing support (BlockTypes with BlockMeta only)madmaxoft@gmail.com2012-10-061-0/+53
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@933 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Fixed saplings not growing into treesmadmaxoft@gmail.com2012-10-031-3/+3
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@924 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Moved blockticking into blockhandler classes.madmaxoft@gmail.com2012-10-031-31/+1
| | | | | | Also slightly refactored the variable / argument names (BlockID is deprecated, use BlockType instead) git-svn-id: http://mc-server.googlecode.com/svn/trunk@921 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Slight refactoring of BlockHandlers - dropping unneeded virtual functionsmadmaxoft@gmail.com2012-10-011-6/+3
| | | | | | ( http://forum.mc-server.org/showthread.php?tid=434&pid=4734#pid4734 ) git-svn-id: http://mc-server.googlecode.com/svn/trunk@917 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Beds can be slept in now (it doesn't change the time though)faketruth2012-09-291-0/+12
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@911 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Unified folder name-casingmadmaxoft@gmail.com2012-09-291-1/+1
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@902 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Added the block dig animation packet (patch contributed by l0udPL)madmaxoft@gmail.com2012-09-251-0/+16
| | | | git-svn-id: http://mc-server.googlecode.com/svn/trunk@892 0a769ca7-a7f5-676a-18bf-c427514a06d6
* Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com2012-09-241-0/+1852
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6