summaryrefslogtreecommitdiffstats
path: root/src/ChunkMap.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Removed all Printf-family functions from StringUtils.Mattes D2023-05-161-1/+1
| | | | | Replaced them with fmt::format calls, including changes to the format strings. Also changed the format strings to use FMT_STRING, so that the format is checked compile-time against the arguments. Also fixed code-style violations already present in the code.
* Chunk: Optimise idle tickingTiger Wang2022-11-031-1/+4
| | | | * Instead of chunks ticking player objects, and the player object in turn ticking its client handle, let the world tick the client handles. This means we no longer need to maintain a special-case for chunks that shouldn't be ticking, but still need to process players. Partially reverts to the state before 054a89dd.
* Valid Height is now checked by vector.x12xx12x2022-04-201-1/+1
|
* Improved farmer AI & Fixed entity loading functions (#5351)Persson-dev2021-12-291-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Allow villagers to pickup items * Add farmer villager harvesting * Use of auto keyword * Using for loop to check adjacent crops * Show particules when farmer harvest * Fix area comment * Move constants to header file * Removing unnecessary semicolon * Initialization of CropBlockType variable * Apply 12xx12 suggestion * Fixing area constant size * Refactor bounding box calculation, use vectors. * Add Api documentation * Update lua docs * Rework farmer ai * Fixing lua docs notes * Add missing capitalisation * Add villagers inventory save * Fixing loading entities from disk inconsistencies * Add farmer harvest animation * Fix beetroots grow state Co-authored-by: Alexander Harkness <me@bearbin.net>
* Move item placement into item handlers (#5184)Tiger Wang2021-05-051-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | * Move item placement into item handlers + Add appropriate CanBeAt checks in cPlayer::PlaceBlocks, into which all placement handlers call. * Partly addresses #5157 * Fixes #4878 * Fixes #2919 * Fixes #4629 * Fixes #4239 * Fixes #4849 Co-authored-by: changyong guo <guo1487@163.com> Co-authored-by: Xotheus <shady3300@outlook.com> Co-authored-by: Krist Pregracke <krist@tiger-scm.com> * Review fixes * Update APIDesc.lua * Rename Co-authored-by: changyong guo <guo1487@163.com> Co-authored-by: Xotheus <shady3300@outlook.com> Co-authored-by: Krist Pregracke <krist@tiger-scm.com>
* Fix chunk block changes being sent out of order (#5169)Tiger Wang2021-03-281-0/+8
| | | | * Flush out all pending, buffered changes at the end of each tick, after every chunk is ticked. This makes every block update client-side in unison, instead of unlucky ones only being sent 1 tick later. * Re-add buffer for outgoing network data; IOCP async WSASend has higher overhead than expected... Fixes regression introduced in 054a89dd9
* Unify DoWithBlockEntity (#5168)Tiger Wang2021-03-281-369/+7
| | | | | | + DoWith calls now broadcast the block entity and mark the chunk dirty + Add block entity change queue to synchronise BE updates with block updates * Fixed a few incorrect assertions about BE type - Remove manual overloads
* Prepare ChunkData for BlockState storage (#5105)Tiger Wang2021-03-051-40/+6
| | | | | | | | | | | | | | | | | | | | | | | * Rename ChunkData Creatable test * Add missing Y-check in RedstoneWireHandler * Remove ChunkDef.h dependency in Scoreboard * Prepare ChunkData for BlockState storage + Split chunk block, meta, block & sky light storage + Load the height map from disk - Reduce duplicated code in ChunkData - Remove saving MCSBiomes, there aren't any - Remove the allocation pool, ref #4315, #3864 * fixed build * fixed test * fixed the debug compile Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com>
* Clarify cClientHandle, cPlayer ownership semanticsTiger Wang2021-01-121-11/+6
| | | | | | | | + A cPlayer, once created, has a strong pointer to the cClientHandle. The player ticks the clienthandle. If he finds the handle destroyed, he destroys himself in turn. Nothing else can kill the player. * The client handle has a pointer to the player. Once a player is created, the client handle never outlasts the player, nor does it manage the player's lifetime. The pointer is always safe to use after FinishAuthenticate, which is also the point where cProtocol is put into the Game state that allows player manipulation. + Entities are once again never lost by constructing a chunk when they try to move into one that doesn't exist. * Fixed a forgotten Super invocation in cPlayer::OnRemoveFromWorld. * Fix SaveToDisk usage in destructor by only saving things cPlayer owns, instead of accessing cWorld.
* Convert most calls to blocking GetHeight/GetBiomeAt to direct chunk accessesTiger Wang2021-01-111-4/+58
| | | | * Hopefully fixes #5094
* zlib -> libdeflate (#5085)Tiger Wang2021-01-111-3/+0
| | | | | | + Use libdeflate + Use std::byte * Fix passing temporary to string_view + Emulate make_unique_for_overwrite
* Make SetAllData's MarkDirty() the chunk's responsibilityTiger Wang2020-12-261-6/+0
|
* Replace custom ChunkCoordinate with cChunkCoordsTiger Wang2020-12-221-5/+5
|
* unique_ptr<cChunkMap> to plain memberTiger Wang2020-12-221-11/+23
|
* Chunk: use FAST_FLOOR_DIVTiger Wang2020-12-211-3/+2
|
* Added new flowers on bonemeal use (#5011)12xx122020-11-021-1/+1
| | | | | | | + Added new biome-dependent flower placement * Update planter algorithm Co-authored-by: 12xx12 <12xx12100@gmail.com> Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* Do not call into things we don't own in destructorsTiger Wang2020-09-251-1/+8
| | | | | - Remove improper accesses in cChunk destructor * Fixes #4894
* Use tracing for explosions (#4845)Tiger Wang2020-09-121-197/+0
| | | | | | | | | | | | | | | | | | | | | | | | * TNT: Implement tracing algorithm + Add intensity tracing * Fix iterating over all players to SendExplosion, even those not in range * Implemented TNT entity interaction * Fixed misaligned destruction tracing * Finalise TNT algorithm - Remove BlockArea and just use chunks Using SetBlock makes it so that we can update everything properly, and does appear to be faster. * BlockInfo learns about explosion attentuation * Rename Explodinator parameters * TNT: pull block destruction into common function Co-authored-by: Alexander Harkness <me@bearbin.net>
* Rename AddEntityIfNotPresent to AddPlayerTiger Wang2020-09-031-13/+4
| | | | | + Always make a chunk for the player to go into * Fixes #4847
* Entities can fail to add into a chunkTiger Wang2020-08-291-0/+10
| | | | - MoveEntityToNewChunk, AddEntity can fail. Ensure we handle these cases correctly
* Clean up pickup collection to use ForEachEntityInBoxTiger Wang2020-08-281-16/+22
|
* Clean up GenerateChunk/TouchChunkTiger Wang2020-08-281-78/+2
| | | | | | - Remove TouchChunk - Remove unused bool return value in GenerateChunk - Remove ShouldGenerateIfLoadFailed
* ChunkMap: do not wantonly make empty chunksTiger Wang2020-08-281-198/+127
| | | | | | - Removed calls that constructed an empty chunk, found it was invalid, and did nothing with said chunk Partially addresses #2324
* Remove unneeded MarkDirty, SendToClients parameters of SetMetaTiger Wang2020-08-281-2/+2
| | | | | | | | Partially reverts #3129, whose addition of these parameters was superseded by #3149 that fixed generated leaves' metas. References: https://github.com/cuberite/cuberite/pull/4417#discussion_r334950513 e0bcd754009f16480437b2c1fa5e7fbedab31496
* Remove level of indirection in cChunk storageTiger Wang2020-08-211-53/+33
| | | | - No more unique_ptr storage
* OnBroken/OnPlaced are for entity actionsTiger Wang2020-08-041-58/+0
| | | | | | * Call OnPlaced/OnBroken in PlaceBlock/DigBlock - Remove unused Placing/Breaking handlers * Have the blockhandler's Check handle neighbour updating, instead of QueueTickBlockNeighbors
* Remove unused block tick related cChunk functionsTiger Wang2020-08-021-17/+0
|
* Always use relative coordinates in AddBlockTiger Wang2020-08-021-3/+2
| | | | | + Pass block, use relatives * Fixes everything immediately converting abs back to rel and getting block, when these data were already available
* Add WakeUp/AddBlock distinctionTiger Wang2020-08-021-1/+1
| | | | | | * WakeUp is for singular changes (block breaking for example). The simulator should check blocks around the position and discover other affected blocks as it sees fit * AddBlock is for when you know a whole area is to be updated; chunk loading, or area wakeups for example + Prepares for correct handling of destroyed blocks after removal of SolidBlockHandler in the redstone simulator
* Replaced cpp14::make_unique<> with std::make_unique<>.Mattes D2020-08-011-3/+3
|
* Use relative vectors in cChunk::DoWithTiger Wang2020-07-251-15/+15
|
* Add cEntity::GetBoundingBox, and use where appropriate. (#4711)Alexander Harkness2020-05-031-3/+2
| | | * Add cEntity::GetBoundingBox, and use where appropriate.
* More Vector3 in cBlockHandler (#4644)Mattes D2020-04-171-10/+10
| | | | | * cBlockHandler.OnUpdate uses Vector3 params. Also slightly changed how block ticking works.
* New hotfix to prevent calling OnBroken (#4600)Alexander Harkness2020-04-031-6/+1
| | | | | | | | | * Fix stack overflow in breaking ice. Stupid fix, but it does work and is used in other places too... * Replace hotfix for pistons with better one * Fix comments in BlockBed handler
* Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)Mattes D2020-04-031-0/+1
| | | | | | | | | 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
* Fix explosion knockback issues and tweak knockback strength (#4590)peterbell102020-04-021-13/+9
|
* Lock hopper when powered by redstone (#4347)Bond-0092020-03-271-0/+18
| | | | | | | | | * Lock hopper when powered by redstone * Add to manual bindings * Add hopper API documentation Co-authored-by: Mat <mail@mathias.is>
* Merge #4552Alexander Harkness2020-03-271-1/+8
| | | | | | | | | | | | | | | | | | | | | | commit 28654b1f42a98c0f9910e333a9c8074fe30aff24 Author: Alexander Harkness <me@bearbin.net> Date: Fri Mar 27 11:58:34 2020 +0000 Remove whitespace commit f1492e174b51e168bf4fb150c2d7b7096c393057 Author: Odin <SirRobo@users.noreply.github.com> Date: Fri Mar 27 04:30:32 2020 +1100 Add issue comment commit b64166d68a327e8a9bf80720ff6e9c6af93921b5 Author: Odin <SirRobo@users.noreply.github.com> Date: Fri Mar 27 03:42:35 2020 +1100 Don't run OnBroken with pistons Stops piston duplication bug and doesn't break water and lava simulation
* TNT position fixes (#4519)Mat2020-03-221-1/+1
| | | | | | | | | | | | | | | | | | | * TNT position fixes * Don't add offset to explosion spawn coords * Don't make other entities push TNT * Correct initial TNT speed * Fix typo * Improvements * Revert unwanted change * Style fixes * Update format
* Fix invalid explosion damage (#4529)Mat2020-03-221-1/+1
|
* Improvements to knockback (#4504)Mat2020-03-191-1/+1
| | | | | * Improvements to knockback * SetSpeed for explosions * Improve code consistency
* Moved growing from cWorld / cChunk to cBlockHandler descendants.Mattes D2019-10-281-130/+75
|
* Refactored block-to-pickup conversion. (#4417)Mattes D2019-10-161-143/+58
|
* Fixed MSVC warnings (#4400)Mattes D2019-09-271-1/+1
|
* NBTChunkSerializer: Cleaned up interface.Mattes D2019-09-241-2/+8
| | | | | | Removed dependency on cChunkDataCallback. Moved all the serializing code into a worker class. Changed the serialization into a single-call action.
* Separated chunk generator from world / plugin interfaces.Mattes D2019-09-061-7/+7
| | | | The generator now only takes care of servicing synchronous "GetChunk(X, Y)" and "GetBiomes(X, Y)" requests.
* Limit the size of cListAllocationPool's free listpeterbell102019-02-201-1/+1
|
* CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell102018-07-261-2/+7
| | | | Add check for number of empty lines between functions and fix the corresponding failures
* Broadcast refactor (#4264)peterbell102018-07-241-459/+10
| | | | | | | | | | | | | | | | | | | | | | | * Move Broadcast functions from cChunkMap to cBroadcaster - Remove cBroadcastInterface in favour of cBroadcaster. - cChunk: Remove broadcast functions. * resurect broadcast interface * Absorb cBroadcaster into cWorld. Removes the need for forwarding the function calls. * Improve const-correctness * Use Int8 instead of char + Comment `ForClients` functions * Improve comments * Broadcaster: Rename ForClients functions
* Optimise chunk set (#4260)peterbell102018-07-231-4/+2
| | | | | | | | | | | | | | | | | Closes #1244 Initially I was just going to add the cChunkData to cSetChunkData but profiling revealed that the copying wasn't even the biggest slowdown. Much more time was being spent in cChunk::CreateBlockEntities and cChunk::WakeUpSimulators than was in memcpy so I've made those significantly faster as well. Optimisations performed: * cSetChunkData now stores blocks in a cChunkData object * cChunkData objects can now perform moves even if they are using different pools * cChunk::CreateBlockEntities now iterates in the correct order and only over present chunk sections * Similarly for cChunk::WakeUpSimulators * cSetChunkData::CalculateHeightMap now shortcuts to the highest present chunk section before checking blocks directly
* Rewrite explosion knock back (#4251)changyong guo2018-07-231-4/+15
| | | | | | | 1. Base knockback on an entity's bounding box intersection with the explosion 2. Armor blast protection reduces knockback 3. Don't apply knockback to players flying in creative mode Fixes #4139
* Fix explosion interaction with block entities. (#4052)peterbell102017-09-271-0/+13
| | | | | | * WriteBlockArea: Fix erasing of block entities. * cChunkMap::DoExplosionAt destroys block entities
* BroadcastBlockBreakAnimation and BroadcastBlockEntity use vectors (#4038)Bond-0092017-09-251-11/+8
|
* Changed BroadcastSoundEffect, SendSoundEffect, and CastThunderbolt parameters to vectors (#3959)Lane Kolbly2017-09-191-10/+10
| | | | | | | | | | | | | | | | | | * Made BroadcastSoundEffect take vector parameters. * Added docs for new vectored methods * Removed old code * Fixed lua warnings * Made old BroadcastSoundEffect not an override. * m_Block to m_BlockPos, used Vector3d constructor where prettier. * a_Block to a_BlockPos * Changed thunderbolt a_Block to a_BlockPos
* Replace ItemCallbacks with lambdas (#3993)peterbell102017-09-111-85/+42
|
* Changed some int parameters to vector parameters (#3937)Bond-0092017-09-071-1/+1
|
* Revert "Replace ItemCallbacks with lambdas (#3948)"LogicParrot2017-09-021-43/+86
| | | | This reverts commit 496c337cdfa593654018c171f6a74c28272265b5.
* Replace ItemCallbacks with lambdas (#3948)peterbell102017-09-011-86/+43
|
* Fully implemented leashes (#3798)Pablo Beltrán2017-08-211-0/+29
|
* Merge pull request #3489 from cuberite/EntityOwnershipTiger Wang2017-08-181-11/+12
|\ | | | | * Changed entity ownership model to use smart pointers
| * Changed entity ownership model to use smart pointersTiger Wang2017-08-071-11/+12
| |
* | Changed int parameters to vector parameters in cCuboid and simulators (#3874)Lane Kolbly2017-08-171-12/+10
|/
* Removed double includes (#3885)Lukas Pioch2017-08-021-1/+0
|
* cWorld::SendBlockTo take player by refpeterbell102017-08-011-2/+2
|
* Simulators: Added area-based wakeup.Mattes D2017-07-161-47/+4
|
* Added bed entity (#3823)Lukas Pioch2017-07-071-0/+18
| | | | | | | | | | * Added bed entity * Export cBedEntity to lua * Set color of bed through item damage value * Added bed entity to APIDoc * NBT: Added loading and saving * Crafting recipes for the colored beds
* FastRandom rewrite (#3754)peterbell102017-06-131-5/+6
|
* Fixed bindings for cBlockArea:Read and Write. (#3568)Mattes D2017-02-051-2/+2
| | | The original bindings accepted nil as the World param, causing a crash.
* DeadlockDetect now lists some tracked CS's stats.Mattes D2017-01-181-0/+19
|
* Initial support for the 1.11 protocol.Mattes D2016-12-161-2/+2
|
* Spectators added (#2852)bibo382016-10-121-0/+9
|
* cChunk::SetAlwaysTicked implies cChunk::stay (#3361)LogicParrot2016-10-091-1/+1
|
* Configurable dirty unused chunk cap to avoid RAM overuse (#3359)LogicParrot2016-09-031-2/+19
| | | Configurable dirty unused chunk cap to avoid RAM overuse
* Simplified cChunkMap chunk storage (#2565)Tiger Wang2016-08-031-584/+224
|
* Updated API documentation.Mattes D2016-07-181-2/+2
|
* Makes tall grass and large flowers bonemealableQUSpilPrgm2016-06-031-0/+18
| | | | Adds the bonemeal particle effect to some more places
* Update Dispensers and let them act more like in VanillaQUSpilPrgm2016-06-031-6/+9
| | | | | | | | - Added code to make bonemeal, potions, minecarts, XP bottles and boats work inside dispensers - Dispensers are now able to place TNT if the block is transparent but not air - Added return value that indicates the success of pumpkin, melon, sugarcane and cactus growing functions - Changed return value of "GrowRipePlant" so that it actually indicates if the block was able to grow - Fixed "GrowSugarcane" and "GrowCactus" in "GrowRipePlant" so that it only grows them a single block
* 1.9 / 1.9.2 / 1.9.3 / 1.9.4 protocol support (#3135)Pokechu222016-05-141-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Semistable update to 15w31a I'm going through snapshots in a sequential order since it should make things easier, and since protocol version history is written. * Update to 15w34b protocol Also, fix an issue with the Entity Equipment packet from the past version. Clients are able to connect and do stuff! * Partially update to 15w35e Chunk data doesn't work, but the client joins. I'm waiting to do chunk data because chunk data has an incomplete format until 15w36d. * Add '/blk' debug command This command lets one see what block they are looking at, and makes figuring out what's supposed to be where in a highly broken chunk possible. * Fix CRLF normalization in CheckBasicStyle.lua Normally, this doesn't cause an issue, but when running from cygwin, it detects the CR as whitespace and creates thousands of violations for every single line. Lua, when run on windows, will normalize automatically, but when run via cygwin, it won't. The bug was simply that gsub was returning a replaced version, but not changing the parameter, so the replaced version was ignored. * Update to 15w40b This includes chunk serialization. Fully functional chunk serialization for 1.9. I'm not completely happy with the chunk serialization as-is (correct use of palettes would be great), but cuberite also doesn't skip sending empty chunks so this performance optimization should probably come later. The creation of a full buffer is suboptimal, but it's the easiest way to implement this code. * Write long-by-long rather than creating a buffer This is a bit faster and should be equivalent. However, the code still doesn't look too good. * Update to 15w41a protocol This includes the new set passengers packet, which works off of the ridden entity, not the rider. That means, among other things, that information about the previously ridden vehicle is needed when detaching. So a new method with that info was added. * Update to 15w45a * 15w51b protocol * Update to 1.9.0 protocol Closes #3067. There are still a few things that need to be worked out (picking up items, effects, particles, and most importantly inventory), but in general this should work. I'll make a few more changes tomorrow to get the rest of the protocol set up, along with 1.9.1/1.9.2 (which did make a few changes). Chunks, however, _are_ working, along with most other parts of the game (placing/breaking blocks). * Fix item pickup packet not working That was a silly mistake, but at least it was an easy one. * 1.9.2 protocol support * Fix version info found in server list ping Thus, the client reports that it can connect rather than saying that the server is out of date. This required creating separate classes for 1.9.1 and 1.9.2, unfortunately. * Fix build errors generated by clang These didn't happen in MSVC. * Add protocol19x.cpp and protocol19x.h to CMakeLists * Ignore warnings in protocol19x that are ignored in protocol18x * Document BLOCK_FACE and DIG_STATUS constants * Fix BLOCK_FACE links and add separate section for DIG_STATUS * Fix bat animation and object spawning The causes of both of these are explained in #3135, but the gist is that both were typos. * Implement Use Item packet This means that buckets, bows, fishing rods, and several other similar items now work when not looking at a block. * Handle DIG_STATUS_SWAP_ITEM_IN_HAND * Add support for spawn eggs and potions The items are transformed from the 1.9 version to the 1.8 version when reading and transformed back when sending. * Remove spammy potion debug logging * Fix wolf collar color metadata The wrong type was being used, causing several clientside issues (including the screen going black). * Fix 1.9 chunk sending in the nether The nether and the end don't send skylight. * Fix clang build errors * Fix water bottles becoming mundane potions This happened because the can become splash potion bit got set incorrectly. Water bottles and mundane potions are only differentiated by the fact that water bottles have a metadata of 0, so setting that bit made it a mundane potion. Also add missing break statements to the read item NBT switch, which would otherwise break items with custom names and also cause incorrect "Unimplemented NBT data when parsing!" logging. * Copy Protocol18x as Protocol19x Aditionally, method and class names have been swapped to clean up other diffs. This commit is only added to make the following diffs more readable; it doesn't make any other changes (beyond class names). * Make thrown potions use the correct appearence This was caused by potions now using metadata. * Add missing api doc for cSplashPotionEntity::GetItem * Fix compile error in SplashPotionEntity.cpp * Fix fix of cSplashPotionEntity API doc * Temporarilly disable fall damage particles These were causing issues in 1.9 due to the changed effect ID. * Properly send a kick packet when connecting with an invalid version This means that the client no longer waits on the server screen with no indication whatsoever. However, right now the server list ping isn't implemented for unknown versions, so it'll only load "Old" on the ping. I also added a GetVarIntSize method to cByteBuffer. This helps clean up part of the code here (and I think it could clean up other parts), but it may make sense for it to be moved elsewhere (or declared in a different way). * Handle server list pings from unrecognized versions This isn't the cleanest way of writing it (it feels odd to use ProtocolRecognizer to send packets, and the addition of m_InPingForUnrecognizedVersion feels like the wrong technique), but it works and I can't think of a better way (apart from creating a full separate protocol class to handle only the ping... which would be worse). * Use cPacketizer for the disconnect packet This also should fix clang build errors. * Add 1.9.3 / 1.9.4 support * Fix incorrect indentation in APIDesc
* Fix Crash on stopping the server (#3176)LogicParrot2016-05-011-0/+13
|
* ChunkLayers now stored in std::mapLogicParrot2016-04-241-59/+58
|
* Revert "ChunkLayers now stored in std::map"LogicParrot2016-04-241-51/+59
|
* ChunkLayers now stored in std::mapLogicParrot2016-04-231-59/+51
|
* Reduced unnecessary block updatesLogicParrot2016-04-221-20/+1
|
* Updated cChunk::SetMeta, fixed grass growth, reduced markDirty/setMeta usageLogicParrot2016-04-161-2/+2
|
* Improved player freeze codeLogicParrot2016-04-051-2/+3
|
* Entities are never lostLogicParrot2016-03-301-10/+4
|
* Fixed removing entities from parent chunksLogicParrot2016-02-221-1/+1
|
* Bulk clearing of whitespaceLogicParrot2016-02-051-48/+48
|
* Updated old forum linksMathias2016-01-311-1/+1
|
* Fixed Clang warnings.Mattes D2016-01-061-9/+9
|
* Reorganised the redstone simulatorTiger Wang2015-12-181-115/+8
| | | | | | -> Many thanks to @worktycho for the idea, and @Haxi52 for the implementation plan! * Uses classes and inheritance now * Speed should be improved
* allow use failures to propagate from the entity/block to the playerGargaj2015-12-131-3/+3
|
* Add enum for Sound and Particle EffectsDave Tucker2015-11-241-1/+1
| | | | | | Fixes #2603 Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
* Changed static_cast to FloorCJulian Laubstein2015-11-231-1/+1
|
* Adjusted height validation using cChunkDef::IsValidHeight()Julian Laubstein2015-11-231-1/+1
|
* Implemented brewingLukas Pioch2015-11-031-0/+33
|
* Fixed a race condition between chunk loader and generator.Mattes D2015-10-041-18/+18
| | | | | | 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.
* Maked it compileable for clang-3.7Lukas Pioch2015-09-251-2/+2
|
* Add new "ForEach" function: ForEachLoadedChunk.tycho2015-09-241-0/+28
|
* Some warning fixesJulian Laubstein2015-08-181-1/+1
|
* Unified the doxy-comment format.Mattes D2015-07-311-1/+0
|
* Silenced and fixed many warning messages across multiple files.Samuel Barney2015-07-291-19/+19
|
* Reinstate "Chunk queue collapsing"Tiger Wang2015-06-101-16/+0
| | | | | This reinstates commit f36acb683594daff5af3971dcbe3c3a171628b78 and reverts commit adfbc42c021e1bcfcb355933c0fd784306ce0e18.
* Revert "Chunk queue collapsing"worktycho2015-06-071-0/+16
|
* Moved Chunk Broadcasts over to the regular queuetycho2015-06-051-16/+0
|
* Made cLightingThread own its callbackstycho2015-05-301-2/+2
|
* CheckBasicStyle: checks spaces around * and &.Mattes D2015-05-091-9/+9
|
* Added support for additional data in the ParticleEffect Packettycho2015-05-071-0/+22
| | | | Also started refactoring how broadcasts are handled
* Fix explosions trying to write to unread blockareaTiger Wang2015-04-261-3/+5
|
* Hotfixed some chunk presence issues when generating.Mattes D2015-04-211-0/+2
|
* Changed cEntity::m_UniqueID to UInt32.Mattes D2015-03-211-7/+7
|
* Handle client 'leave bed' requestTiger Wang2015-02-081-4/+1
| | | | * Fixes #1728
* Initial convertion of a_Dt to std::chronoTycho2015-01-111-2/+2
| | | | also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
* Refactored all player block placing to go through hooks.Mattes D2014-12-241-36/+67
| | | | Fixes #1618.
* NULL -> nullptrTiger Wang2014-12-171-1/+1
|
* Added a cWorld:PrepareChunk function.Mattes D2014-12-101-0/+97
| | | | | It prepares the chunk - loads or generates it and lights it. The spawn prepare process uses this function.
* Fixed missing CS lock in cChunkMap::WakeUpSimulatorsInArea().Mattes D2014-10-311-0/+1
|
* En masse NULL -> nullptr replaceTiger Wang2014-10-231-139/+139
|
* Functions in cPluginManager get references instead of pointers.Mattes D2014-10-151-6/+8
|
* Added barriers correctlyMasy982014-09-271-0/+1
|
* Removed more unessicary includesTycho2014-09-261-1/+1
|
* Merge branch 'master' into 1.8-ProtocolHowaner2014-09-131-3/+3
|\ | | | | | | | | Conflicts: src/Items/ItemHoe.h
| * Fixed farmland issues.Howaner2014-09-121-3/+3
| |
* | 1.8: Added ParticleEffect packet.Howaner2014-09-111-2/+2
|/
* WorldStorage no longer queues chunks into generator.Mattes D2014-09-051-2/+2
|
* Rewritten chunk status to specify whether the chunk is in queue.Mattes D2014-09-051-51/+24
| | | | This fixes #1370.
* Fixed compilation after chunk Y removal.madmaxoft2014-09-041-1/+1
|
* Merge remote-tracking branch 'origin/master' into EntitiesInBoxmadmaxoft2014-09-041-129/+129
|\
| * Merge pull request #1351 from LO1ZB/remove-a_RelYMattes D2014-09-031-129/+129
| |\ | | | | | | remove y-coord from chunks
| | * remove y-coord from chunksLO1ZB2014-08-281-129/+129
| | |
* | | Added cWorld::ForEachEntityInBox()madmaxoft2014-09-031-0/+32
|/ /
* | Fixed style.madmaxoft2014-08-301-2/+3
| |
* | Improved explosion damageTiger Wang2014-08-291-45/+22
|/
* Exported the beacon.Howaner2014-07-301-0/+18
|
* Added beacon.Howaner2014-07-301-0/+1
|
* Added a queue for setting chunk data.madmaxoft2014-07-241-16/+9
| | | | Fixes #1196.
* Style: Normalized to no spaces before closing parenthesis.madmaxoft2014-07-211-36/+36
|
* Fixed clamping issuesarchshift2014-07-191-4/+1
|
* Fixed spaces before commas.madmaxoft2014-07-181-2/+2
|
* Merge branch 'master' of https://github.com/mc-server/MCServermadmaxoft2014-07-171-1/+3
|\
| * Fixed crash with entities in unloaded chunksTiger Wang2014-07-171-1/+3
| | | | | | | | * Fixes #1190
* | Fixed spaces around single-line comments.madmaxoft2014-07-171-11/+12
| | | | | | | | There should be at least two spaces in front and one space after //-style comments.
* | Fixed basic whitespace problems.madmaxoft2014-07-171-3/+3
|/ | | | Indenting by spaces and alignment by spaces, as well as trailing whitespace on non-empty lines.
* Merge pull request #1183 from Howaner/SoundsTiger Wang2014-07-171-2/+2
|\ | | | | Reset meta to zero when the blocks explode
| * Derp.Howaner2014-07-151-2/+2
| |
| * Reset meta to zero when the block explode.Howaner2014-07-141-4/+4
| |
* | Merge pull request #1172 from mc-server/coverity_fixesMattes D2014-07-131-1/+1
|\ \ | | | | | | Coverity fixes
| * | Added parenthasiesworktycho2014-07-131-1/+1
| | |
| * | Add Null check to SendBlockToworktycho2014-06-261-1/+1
| | | | | | | | | Fixes CID 43611
* | | Fixed MSVC warnings in SoundEffect functions.madmaxoft2014-07-131-1/+1
| |/ |/|
* | Merge branch 'master' into SoundsHowaner2014-07-131-2/+2
|\ \
| * | Fixed wrong types. (BLOCKTYPE -> NIBBLETYPE)Howaner2014-07-131-2/+2
| | |
* | | Changed BroadcastSoundEffect function to take floating pos.Howaner2014-07-131-3/+3
|/ /
* | Merge pull request #1154 from mc-server/trappedchestsTiger Wang2014-07-131-1/+20
|\ \ | | | | | | Implemented trapped chests & others
| * | Implemented trapped chests & othersTiger Wang2014-07-071-1/+20
| | | | | | | | | | | | | | | | | | | | | + Added trapped chests * Fixed a bunch of bugs in the redstone simulator concerning wires and repeaters * Other potential bugfixes
* | | Implemented support for forced chunk ticking.madmaxoft2014-07-101-2/+18
|/ / | | | | | | Fixes #1160.
* / Added generic entity-collecting.Mattes D2014-06-271-3/+3
|/ | | | | Now any cEntity can be collected, not only cPickups. This should help PR #1098.
* Merge branch 'master' of github.com:mc-server/MCServerTycho2014-06-161-4/+16
|
* Fixed a race condition when adding a player to a world.madmaxoft2014-06-101-0/+24
|
* Merge remote-tracking branch 'origin/pistonfixes'Tiger Wang2014-06-021-2/+2
|\ | | | | | | | | Conflicts: src/Chunk.cpp
| * Hopefully fixed piston duplication issuesTiger Wang2014-05-251-2/+2
| | | | | | | | | | * Fixes #879 * Fixes #714
* | Merge branch 'master' into chunksparsing/structsTycho2014-05-101-2/+0
|\| | | | | | | | | Conflicts: src/Chunk.h
| * Merge branch 'master' into redstoneimprovementsTiger Wang2014-05-041-1/+4
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/ClientHandle.cpp src/Entities/FallingBlock.cpp src/Mobs/AggressiveMonster.cpp src/Simulator/IncrementalRedstoneSimulator.cpp
| * | Redstone simulator now directly accesses cChunkTiger Wang2014-04-271-2/+0
| | | | | | | | | | | | | | | | | | * Redstone simulator performance improvements * Added return values to some functions * Minor fixes
* | | Merge branch 'master' into chunksparsing/structsTycho2014-05-011-5/+6
|\ \ \ | | |/ | |/|
| * | Fixed player spawning #953.madmaxoft2014-04-271-1/+4
| |/
| * Removed unused assignments.archshift2014-04-261-4/+2
| |
* | Merge branch 'master' into chunksparsing/structsTycho2014-04-271-29/+37
|\| | | | | | | | | | | Conflicts: src/Chunk.cpp src/Chunk.h
| * Did some static analysis, fixed some bugs and optimized a lot of codejfhumann2014-04-181-20/+20
| |
| * Fixed chunkstays not being removed on auto-delete.madmaxoft2014-04-121-9/+17
| | | | | | | | Fixes #837.
* | Implemented Chunk Sparsing with segmentsTycho2014-04-261-10/+6
|/
* ENUMified shrapnel levelTiger Wang2014-03-201-2/+2
|
* Merge branch 'master' into awesometntTiger Wang2014-03-181-55/+59
|\ | | | | | | | | Conflicts: src/ChunkMap.cpp
| * Fixed chunkmap tree block replacing.madmaxoft2014-03-181-8/+2
| |
| * Fixed double to float conversions.madmaxoft2014-03-161-45/+46
| |
| * Add new leaves to all classes.Howaner2014-03-161-0/+7
| |
* | Added levels of shrapnelTiger Wang2014-03-181-3/+7
| |
* | Merge branch 'master' into awesometntTiger Wang2014-03-101-2/+20
|\|
| * Add Lua Bindings for FlowerPotEntity.h and add documentation.Howaner2014-03-071-2/+2
| |
| * Add Flower PotsHowaner2014-03-071-0/+18
| |
* | Shrapnel now configurableTiger Wang2014-03-101-1/+1
| |
* | Added extra awesomeness to TNTTiger Wang2014-03-051-11/+20
|/ | | | | | | + TNT now has a chance of flinging FallingBlock entities around * Improved TNT damage * Improved TNT spawning visuals * Possible fix for 'SetSwimState failure' messages in debug
* Fixed a possible crash in cWorld::WakeUpSimulatorsInArea().madmaxoft2014-02-241-0/+4
| | | | The Y coords weren't checked.
* Merge pull request #697 from Howaner/SkullMattes D2014-02-191-0/+18
|\ | | | | Add Skulls/Heads to MCServer
| * Rename SkullEntity to MobHeadEntityHowaner2014-02-191-2/+2
| |
| * Add Heads completelyHowaner2014-02-181-0/+18
| |
* | Added cWorld:SetAreaBiome() API function.madmaxoft2014-02-181-2/+59
|/ | | | Fixes #675.
* Rewritten Lua ChunkStay API into a single function, cWorld:ChunkStay().madmaxoft2014-02-101-2/+11
| | | | This fixes problems with indeterminate class object lifespan (Lua-GC) and forgetting to disable it or keep it until ready.
* Merge remote-tracking branch 'origin/master' into ChunkStaymadmaxoft2014-02-091-1/+1
|\
| * Merge branch 'master' into playerimprovementsTiger Wang2014-02-091-1/+1
| |\ | | | | | | | | | | | | Conflicts: MCServer/Plugins/APIDump/APIDesc.lua
| * | Fixed explosions bugTiger Wang2014-02-051-1/+1
| | | | | | | | | | | | * Fixed bug where explosions would sometimes never be sent
| * | Fixed a bunch of MSVS warningsTiger Wang2014-02-051-1/+1
| | | | | | | | | | | | | | | * Possibly also fixed some bugs with pathfinding and TNT, though unlikely
* | | Initial ChunkStay code.madmaxoft2014-02-081-113/+72
| |/ |/|
* | Greatly improved TNT propulsion chancesTiger Wang2014-02-031-1/+1
|/
* Merge pull request #623 from mc-server/tntMattes D2014-02-031-36/+121
|\ | | | | TNT improvements
| * Inversed conditionTiger Wang2014-02-031-25/+28
| |
| * Uncommented pickup spawner codeTiger Wang2014-02-021-3/+7
| |
| * TNT improvementsTiger Wang2014-02-021-37/+115
| | | | | | | | | | | | + Added entity damage + Added entity propulsion * Fixed #67 and fixed #230
* | Changed pointers to referencesTycho2014-02-011-3/+3
| |
* | Changed signitures of Several BLockHandler MethodsTycho2014-02-011-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Changed the signitures of the following to use interfaces: GetPlacementBlockTypeMeta OnPlaced OnPlacedByPlayer OnDestroyed OnNeighbourChanged NeighbourChanged OnUse CanBeAt Check
* | Refactored cBlockHandler::OnUse and dependentsTycho2014-01-261-2/+57
|/
* Basic command block implementationandrew2014-01-181-0/+17
|
* More MSVC warning fixes.madmaxoft2014-01-071-1/+1
|
* Fixed compiler warning.STRWarrior2013-12-221-1/+1
|
* Implented BroadcastParticleEffectSTRWarrior2013-12-221-0/+19
|
* Fixed compiler warning when iterating over a fixed array of items (ARRAYCOUNT).madmaxoft2013-12-201-12/+12
|
* This adds the cWorld::BroadcastEntityEffect and cWorld::BroadcastRemoveEntityEffect functions.STRWarrior2013-12-151-0/+33
|
* Implemented note block playing and fixed wireTiger Wang2013-12-141-0/+17
| | | | Game of Thrones music in Minecraft, here I come!
* Merge branch 'master' of https://github.com/mc-server/MCServer into fixesnfeaturesTiger Wang2013-12-081-1/+1
|\ | | | | | | | | | | | | Conflicts: src/Bindings/Bindings.cpp src/Bindings/Bindings.h src/Blocks/BlockHandler.cpp
| * Moved bindings-related to a Bindings subfolder.madmaxoft2013-12-081-1/+1
| | | | | | | | Ref.: #407
* | Renamed animation functionTiger Wang2013-12-071-3/+3
| | | | | | | | | | Renamed BroadcastPlayerAnimation to BroadcastEntityAnimation. Not just players can have animations, you know.
* | Fixed duplication glitch with QueueSetBlockTiger Wang2013-12-061-2/+2
|/ | | | | | | If a coordinate was queued, and then the block there was broken, it would reappear: double items! Also now just sets meta if previous and current blocktypes matched.
* Changed cBlockHandler->OnUpdate() to use cChunk directly.madmaxoft2013-11-301-1/+18
|
* Fixed a bug with TNT waking simulatorsTiger Wang2013-11-281-2/+2
|
* Improved TNT pickup randomisationTiger Wang2013-11-281-1/+1
|
* Made TNT pickups spawning chance 25%Tiger Wang2013-11-271-2/+2
|
* Fixed VC2008 compilation, normalized include paths.madmaxoft2013-11-271-1/+1
|
* Fixed the remaining derpsAlexander Harkness2013-11-271-2/+2
|
* Attempt to fix compilationTiger Wang2013-11-241-2/+2
|
* Merge remote-tracking branch 'origin/master' into foldermove2Alexander Harkness2013-11-241-0/+33
| | | | | Conflicts: GNUmakefile
* Moved source to srcAlexander Harkness2013-11-241-0/+2668