summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/BlockEntity.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-04-30Chest, weather, crash, and miscellaneous fixes (#5215)Tiger Wang1-1/+8
* 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-01-02Fix potential destruction crashes (#5095)Tiger Wang1-45/+34
* Fix potential destruction crashes * Fix destructors accessing destroyted objects * Fix cPlayer not destroying windows (Destroyed never called) * Tentatively fixes #4608, fixes #3236, fixes #3262 - Remove cEntity::Destroyed() and replace with cEntity::OnRemoveFromWorld() * Add missing call to OnRemoveFromWorld
2020-10-24Remove BLOCKENTITY_PROTODEFTiger Wang1-39/+1
2020-09-27Fixing Mob spawner behaviour (#4930)12xx121-1/+1
* fixed mob spawner failure (whoopsie in the BlockEntity.GetChunkZ()) Style * fixed spawning behaviour * fixed saving entity type saving * checkstyle * removed debug log * removed short saving * Style Co-authored-by: 12xx12 <12xx12100@gmail.com> Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2020-09-25Deleted BiomeDef.h and ChunkDef.h from Globals.h (#4885)KingCol131-1/+1
* Removed BiomeDef.h * Removed ChunkDef.h from Globals.h * Added to CONTRIBUTORS. * Re-added empty last line to Globals.h * Included stddef and StringUtils in BiomeDef.h * Fixed build tools compiling. It compiles, but at what cost? * Added include to src/Generating/Trees.h * Include added in ChunkGeneratorThread.h * Moved rearranged includes in LineBlockTracer.cpp * Re-arrange headers in ChunkInterface.cpp * Included ChunkDef.h in Path.h * Included ChunkDef.h in NBTChunkSerializer.h * Rearranged included and added required includes to headers. * Removed unnecessary included in StringUtils.h.
2020-09-25BlockEntity: clarify ConvertToPickups behaviourTiger Wang1-1/+1
2020-09-25Unify block entity pickup conversionTiger Wang1-0/+5
- Removed normal BlockHandler knowledge of block entities during conversion + Added cBlockEntity::ConvertToPickups that handles it
2020-07-19Precompile unordered_map/setTiger Wang1-1/+0
+ Add inclusions to Globals.h * Sort Globals.h - Remove sys/stat.h from Globals.h
2020-04-16Using Super.Mattes D1-2/+2
2020-04-03Manage block entity lifetime with unique_ptr (#4080)peterbell101-2/+7
2019-09-29Refactored more of Entities and BlockEntities to use Vector3. (#4403)Mattes D1-32/+34
2017-06-24cBlockArea supports block entities. (#3795)Mattes D1-0/+8
2017-06-16BlockEntities: Support cloning self.Mattes D1-3/+19
2017-04-01Added a nullptr check to cEntity::IsA (#3659)Marvin Kopf1-1/+1
Fixes #3603
2016-02-05Bulk clearing of whitespaceLogicParrot1-16/+16
2015-12-13allow use failures to propagate from the entity/block to the playerGargaj1-2/+3
2015-07-31Unified the doxy-comment format.Mattes D1-9/+8
2015-06-10Reinstate "Chunk queue collapsing"Tiger Wang1-0/+1
This reinstates commit f36acb683594daff5af3971dcbe3c3a171628b78 and reverts commit adfbc42c021e1bcfcb355933c0fd784306ce0e18.
2015-06-07Revert "Chunk queue collapsing"worktycho1-1/+0
2015-06-06ComparatorsTiger Wang1-1/+1
2015-06-05Rewrote ChunkSending queue for significantly improved performancetycho1-0/+1
2015-01-11Initial convertion of a_Dt to std::chronoTycho1-1/+1
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2014-11-18Finished mob spawner implementation.Howaner1-5/+0
2014-10-23En masse NULL -> nullptr replaceTiger Wang1-2/+2
2014-10-20En masse NULL -> nullptr replaceTiger Wang1-2/+2
2014-10-19cLuaState: cBlockEntity descendants are pushed with proper class type.Mattes D1-0/+31
2014-09-30Removed WSSCompactTiger Wang1-2/+0
2014-09-26Removed more unessicary includesTycho1-3/+2
2014-09-17Created MobSpawnerEntity class.Howaner1-1/+1
2014-07-24Removed redundant semicolons and re-added warningarchshift1-2/+2
2014-07-21Style: Normalized to no spaces before closing parenthesis.madmaxoft1-1/+1
2013-12-30Fixed compilation in VC2008.madmaxoft1-2/+1
Also removed an unused inline header file (yuck).
2013-12-22merged in warnings changesTycho Bickerstaff1-1/+5
2013-12-22converted commneted paramater names to the unused macroTycho Bickerstaff1-1/+6
2013-12-21ChunkSender is now warnings cleanTycho Bickerstaff1-1/+1
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-11-20Added cWorld:ForEachBlockEntityInChunk() and cWorld:DoWithBlockEntityAt() functions.madmaxoft1-0/+5
Also exported them to the Lua API.
2013-11-15Removed cBlockEntity:CreateByBlockType() from the Lua API.madmaxoft1-2/+2
Plugins cannot be allowed to create block entities, that would result in memory leaks.
2013-11-14Added cSignEntity into API, added cChunkDesc:GetBlockEntity().madmaxoft1-0/+5
This fixes both #228 and #347.
2013-05-28Moved BlockEntities to a separate foldermadmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1527 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-28Block entities now receive the cChunk param in their Tick() functionmadmaxoft@gmail.com1-4/+12
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
2013-05-26Block entities with storage now correctly mark the chunk as dirty when their contents change.madmaxoft@gmail.com1-0/+3
http://forum.mc-server.org/showthread.php?tid=434&pid=8210#pid8210 git-svn-id: http://mc-server.googlecode.com/svn/trunk@1515 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-05-25cChestEntity and cDispenserEntity now inherit from a common ancestor, cBlockEntityWithItemsmadmaxoft@gmail.com1-11/+8
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1507 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-06Mineshafts: Added random loot to generated chests and fixed chest directionmadmaxoft@gmail.com1-21/+28
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1365 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-01Proper fix for FS #347. Also unification of ticking block entities.madmaxoft@gmail.com1-6/+9
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1348 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-24Monster classes don't use cPackets. Chat messages are sent / broadcast without cPackets. BlockEntities don't use cPackets.madmaxoft@gmail.com1-19/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@783 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-06-14Attempt to bring sanity to newlines across systems.cedeel@gmail.com1-93/+93
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-04-23Anvil storage writing (Basic storage is working, NO entities except for chests are working! Don't use for real servers)madmaxoft@gmail.com1-5/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@475 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-24Reverted the previous commit - it is useless, since entities still depend heavily on cWorldmadmaxoft@gmail.com1-11/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@428 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-23Encapsulated cWorld functions needed in cWorldStorage into an interface, so that cWorldStorage can actually be used outside of MC-Server (such as storage conversion tools and chunk analyzers)madmaxoft@gmail.com1-0/+11
git-svn-id: http://mc-server.googlecode.com/svn/trunk@427 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-10Using references instead of pointers for sending packetsmadmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@394 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-03-05ChunkSender: Chunks are now compressed and sent to clients from a separate threads, proper passive waiting between threads. Not much tested, just appears to work :)madmaxoft@gmail.com1-2/+28
git-svn-id: http://mc-server.googlecode.com/svn/trunk@365 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-16Chunk is now marked as dirty; saving only dirty chunks; rewritten load / save not to use cChunkPtr; set VC2008 project to level4 warnings; block entities are now loaded and saved properlymadmaxoft@gmail.com1-0/+7
git-svn-id: http://mc-server.googlecode.com/svn/trunk@273 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-15Restored chest and furnace functionality as it was (it's basically working but joined chests show single-chest window)madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@263 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-14m_World was never set in cBlockEntity's, now it isfaketruth1-0/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@255 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-13Rewritten most of the code for multithreading; still not 100%, but getting there. If this commit proves to be too problematic, we can always undo it.madmaxoft@gmail.com1-6/+20
git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-11-06Patch with diff file created by Sebi (implemented some stuff like lava physics, drops are deleted when in lava, water is now slower, lava gives actual damage etc.). Pistons now work mostly as they should. They do not yet show the motion animation and do not emit sound. They do extend, push, and retract as they should though. Right now the only way to activate a piston is to light redstone wire adjacent to it with a redstone torch.admin@omencraft.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@67 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-31Prepared some parts of the code for multi world support, I created lots of TODO'sfaketruth1-1/+11
git-svn-id: http://mc-server.googlecode.com/svn/trunk@29 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-10-03MCServer c++ source filesfaketruth1-0/+34
git-svn-id: http://mc-server.googlecode.com/svn/trunk@3 0a769ca7-a7f5-676a-18bf-c427514a06d6