1
0
Fork 0
Commit Graph

31 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
12xx12 243083e01a
Adding basic Banner functionality (#4806)
+ Added item and block for banners

Co-authored-by: 12xx12 <12xx12100@gmail.com>
Co-authored-by: Tiger Wang <ziwei.tiger@outlook.com>
2021-03-15 02:47:55 +00:00
Tiger Wang 16aeb84cd3
Fix potential destruction crashes (#5095)
* 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
2021-01-02 13:50:34 +00:00
Tiger Wang c53a0ba5f6 Unify block entity pickup conversion
- Removed normal BlockHandler knowledge of block entities during conversion
+ Added cBlockEntity::ConvertToPickups that handles it
2020-09-25 09:07:01 +00:00
12xx12 f8de67aace Added end portal and enchanting table block entities 2020-09-20 01:40:20 +01:00
Mattes D 46398f4671 Replaced cpp14::make_unique<> with std::make_unique<>. 2020-08-01 20:04:31 +01:00
Lukas Pioch 9680408c16
Block entity for beacon was not created (#4618) 2020-04-04 19:34:00 +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
peterbell10 307e7aaff5 Fix switch warnings (#4013)
* Fix switch warnings
  * Fix a variety of -Wswitch and -Wswitch-enum warnings
  * Remove unneeded -Wno-error flags

* Reorganise some eMonsterType switches
  * Alpha sort eMonsterType cases in WriteMobMetadata
    and in cNBTChunkSerializer::AddMonsterEntity
  * List all mob types in protocol 1.12 and NBTChunkSerializer

* cStructGenTrees::GetNumTrees: remove switch default

* cWSSAnvil::LoadOldMinecartFromNBT: Log unhandled minecart type
2017-09-14 09:48:57 +01:00
Lukas Pioch 885d828712 Added bed entity (#3823)
* 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
2017-07-07 09:31:45 +02:00
Mattes D fe42538349 cBlockArea supports block entities. (#3795) 2017-06-24 11:58:06 +02:00
Mattes D 0dd1cd750b BlockEntities: Support cloning self. 2017-06-16 14:11:28 +02:00
Lukas Pioch 9749c3aac9 Implemented brewing 2015-11-03 18:00:55 +01:00
Howaner bcbd73f7d8 MobSpawner fixes. 2014-12-01 14:58:13 +01:00
Howaner 42120e2ea5 Merge branch 'master' into MobSpawner
Conflicts:
	MCServer/Plugins/Core
2014-11-18 14:56:32 +01:00
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Howaner 718eb227ab Implemented mob spawner. 2014-09-19 23:00:54 +02:00
madmaxoft 9ab0f259c7 Fixed alignment. 2014-07-12 23:25:59 +02:00
Tiger Wang e71e432633 Suggestions and bug fix
* Fixed hoppers pushing/pulling to/from (trapped)chests that do not form
a double-chest with the chest type directly connected to said hopper;
thank you, @madmaxoft
2014-07-12 22:06:25 +01:00
Tiger Wang 6a33fa84ae Suggestions 2014-07-11 12:43:24 +01:00
Tiger Wang 164ffe50ad Made things consistent 2014-07-08 12:34:39 +01:00
Tiger Wang 9e44b0aae1 Implemented trapped chests & others
+ Added trapped chests
* Fixed a bunch of bugs in the redstone simulator concerning wires and
repeaters
* Other potential bugfixes
2014-07-06 23:50:22 +01:00
STRWarrior 875c2557c3 Implemented the skeleton code for the beacon.
There is no handling for the GUI. It can now check how big the pyramid is under the beacon.
2014-04-12 00:01:15 +02:00
Howaner 787a71929c Add Flower Pots 2014-03-07 01:30:34 +01:00
Howaner d63ce62f3b Rename SkullEntity to MobHeadEntity 2014-02-19 14:45:09 +01:00
Howaner 52c41f8869 Add Heads completely 2014-02-18 21:40:02 +01:00
Howaner 777041806f Add Skulls/Heads 2014-02-17 20:14:08 +01:00
andrew 9a9b51a513 Basic command block implementation 2014-01-18 15:16:47 +02:00
Tiger Wang 347e80bdd8 Added basic ender chests
Note that they just mirror chests now, so no per player inventory.
2013-12-07 00:18:58 +00:00
Alexander Harkness 675b4aa878 Moved source to src 2013-11-24 14:19:41 +00:00