summaryrefslogtreecommitdiffstats
path: root/src/BlockEntities/ChestEntity.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add player statistics to API (#5193)nshah252021-05-031-2/+2
| | | | | | * Fixed issue #5166 Co-authored-by: 12xx12 <44411062+12xx12@users.noreply.github.com> Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
* Chest, weather, crash, and miscellaneous fixes (#5215)Tiger Wang2021-04-301-134/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* Repaired Hoppers Treating Chests as two entities (#5202)npresley05062021-04-231-0/+9
| | | | | | | | | | | | | | | * Repaired Hoppers Treating Chests as two entities * Style changes * style fixes * Fixed style issues, also condensed logic in MoveItemsFromChest * Used m_Neighbour, fixed styling * GetNeighbour not ReturnNeighbour Co-authored-by: npresley <npresley@umich.edu>
* Unify DoWithBlockEntity (#5168)Tiger Wang2021-03-281-10/+11
| | | | | | + 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
* Properly deprecate more XYZ parameter'd functions (#5147)Tiger Wang2021-03-151-1/+1
| | | * Fixes #5144
* Fix potential destruction crashes (#5095)Tiger Wang2021-01-021-17/+16
| | | | | | | | | | * 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
* Add more statistic tracking (#4837)12xx122020-09-051-0/+9
| | | | | | | | + Added possible 1.8 stats + Added stat tracking for 1.8.2 + Added stat tracking for 1.9 + Added the breed cow achievement Co-authored-by: 12xx12 <12xx12100@gmail.com>
* Remove redundant DoWithChunkAt in chestsTiger Wang2020-08-281-6/+3
|
* Remove unused variables in ChestEntity/BlockEntityWithItemsTiger Wang2020-08-211-2/+0
|
* Remove the redstone solid block handlerTiger Wang2020-08-081-4/+1
| | | | | | | - Remove cSolidBlockHandler * Functionality now integrated into simulator dispatcher * Fix door double open/close issues, arisen due to the top/bottom halves getting different power + Small migration to block states for redstone wire
* Always use relative coordinates in AddBlockTiger Wang2020-08-021-0/+39
| | | | | + Pass block, use relatives * Fixes everything immediately converting abs back to rel and getting block, when these data were already available
* Using Super.Mattes D2020-04-161-2/+2
|
* 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
* Refactored more of Entities and BlockEntities to use Vector3. (#4403)Mattes D2019-09-291-14/+12
|
* CheckBasicStyle: Check number of empty lines between functions (#4267)peterbell102018-07-261-0/+1
| | | | Add check for number of empty lines between functions and fix the corresponding failures
* Prefer static_cast to reinterpret_cast (#4223)peterbell102018-05-021-1/+1
| | | | | | | * Change reinterpret_cast -> static_cast wherever possible * Remove more unnecessary `const_cast`s. reinterpret_casts should be avoided for the same reason as c-style casts - they don't do any type-checking. reinterpret_cast was mainly being used for down-casting in inheritance hierarchies but static_cast works just as well while also making sure that there is actually an inheritance relationship there.
* Replace ItemCallbacks with lambdas (#3993)peterbell102017-09-111-22/+6
|
* Revert "Replace ItemCallbacks with lambdas (#3948)"LogicParrot2017-09-021-6/+22
| | | | This reverts commit 496c337cdfa593654018c171f6a74c28272265b5.
* Replace ItemCallbacks with lambdas (#3948)peterbell102017-09-011-22/+6
|
* Sitting cats block enderchests from opening (#3906)Bond-0092017-08-171-23/+3
|
* Added basic ocelot behavior (#3829)Bond-0092017-07-121-2/+29
|
* BlockEntities: Support cloning self.Mattes D2017-06-161-2/+17
|
* Fixes problems with windows:Lukas Pioch2017-06-051-1/+1
| | | | | - Changed cPlayer:OpenWindow to accept a ref, tolua adds a nil check - Close open lua window in destructor, to avoid dangling pointers
* Fixed double chests (#3741)peterbell102017-06-031-4/+11
| | | | | Normal and trapped chests next to each other don't open a double chest window. Slot changes in the secondary chest are broadcast. Placing a chest in +x of another updates the original chest's metadata.
* Double chest window fix (#3735)peterbell102017-05-281-49/+116
|
* Fixed invisible chests (#3722)Pablo Beltrán2017-05-211-4/+3
| | | Fixes #3479, #3403, #3696
* Reduced unnecessary block updatesLogicParrot2016-04-221-1/+1
|
* allow use failures to propagate from the entity/block to the playerGargaj2015-12-131-1/+2
|
* (Ender) Chests are obstructed by opaque blocks.Nounours Heureux2015-07-071-10/+6
|
* Correct world height validations.Tommy Santerre2015-03-201-2/+2
| | | | | Unify the way we test block above the current one (Height - 1 instead of a_RelY + 1). Allow generation of world of flat height = 255
* Own classes for all windows.Howaner2014-12-131-1/+1
|
* En masse NULL -> nullptr replaceTiger Wang2014-10-231-3/+3
|
* Removed WSSCompactTiger Wang2014-09-301-42/+0
|
* Merge remote-tracking branch 'origin/master' into chestcartsTiger Wang2014-09-271-1/+0
|\ | | | | | | | | Conflicts: src/Entities/Minecart.cpp
| * Removed more unessicary includesTycho2014-09-261-1/+0
| |
* | Implemented Chest MinecartsTiger Wang2014-09-131-1/+0
|/
* Fixed spaces before commas.madmaxoft2014-07-181-2/+2
|
* Basic style fixes.madmaxoft2014-07-171-1/+1
|
* cChestEntity: Renamed a member to avoid confusion.madmaxoft2014-07-121-1/+1
|
* Implemented trapped chests & othersTiger Wang2014-07-071-3/+4
| | | | | | | + Added trapped chests * Fixed a bunch of bugs in the redstone simulator concerning wires and repeaters * Other potential bugfixes
* Chests don't open if obstructedTiger Wang2014-06-221-0/+13
| | | | * Fixes FS383
* Fixed VC2008 compilation, normalized include paths.madmaxoft2013-11-271-1/+1
|
* Fixed the remaining derpsAlexander Harkness2013-11-271-1/+1
|
* Further attempts to fix compileTiger Wang2013-11-251-1/+1
|
* Attempt to fix compilationTiger Wang2013-11-241-1/+1
|
* Moved source to srcAlexander Harkness2013-11-241-0/+172