summaryrefslogtreecommitdiffstats
path: root/src/Entities/Pickup.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-12-29Improved farmer AI & Fixed entity loading functions (#5351)Persson-dev1-1/+1
* 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>
2020-04-16Using Super.Mattes D1-1/+1
2019-09-29Refactored more of Entities and BlockEntities to use Vector3. (#4403)Mattes D1-4/+5
2018-01-16Exp Orbs and Pickups are destroyed instantly by cacti. (#4136)Alexander Harkness1-0/+2
* Cactus detection code follows pattern set in #3996 * Pickups are now destroyed on cactus contact * Add cactus detection and destruction to Exp Orbs Remove checks for IsExpOrb() in cEntity::Tick() Exp Orbs do not call super::Tick() and so this condition was pointless.
2017-07-28Check for intersection between placed blocks and entities. (#3850)Lane Kolbly1-0/+2
* Check for intersection between placed blocks and entities. + Implemented GetPlacementCollisionBox, to permit custom placement collision boxes for blocks. * Factored block-entity placement checking into another function in cPlayer. - Removed vector min/max functions * Use GetWorld to get the world in DoesPlacingBlocksIntersectEntity. + Added block height checks, allow different cEntity subclasses to decide whether they will prevent block placement.
2017-07-12Changing pickup lifetime and combining semantics, making these adjustable in the lua api. (#3843)Lane Kolbly1-1/+17
2015-01-16Converted cPickupEntity to std::chronoTycho1-3/+3
2015-01-11Initial convertion of a_Dt to std::chronoTycho1-1/+1
also refactored cWorld::m_WorldAge and cWorld::m_TimeOfDay
2014-10-15Functions in cPluginManager get references instead of pointers.Mattes D1-1/+1
2014-10-12convert old style casts to fix warningsSteven Riehl1-7/+3
2014-07-24Removed redundant semicolons and re-added warningarchshift1-1/+1
2014-07-17Fixed tabs used for alignment.madmaxoft1-1/+1
2014-07-17Normalized comments.madmaxoft1-2/+2
This was mostly done automatically and then visually inspected for obvious errors. All //-style comments should have a 2-space separation from the code, and 1 space after the comment sign.
2014-04-12Entities handle chunks properly againTiger Wang1-3/+0
* Entities properly handle chunks * Changed EntityStatus enums to be less shouty
2014-03-15Add health and age load to pickup's.Howaner1-10/+13
2014-02-03Pickup constructor no longer exportedTiger Wang1-3/+4
It didn't do anything without Initialize() exported, anyway, pickups are spawned with cWorld.
2013-11-24Moved source to srcAlexander Harkness1-0/+0
2013-10-24cPickup cleanup.madmaxoft1-1/+1
2013-10-24Fixed cPickup's constructor's parameter naming.madmaxoft1-1/+1
2013-10-24Pickups now have collection delay when vomitedTiger Wang1-1/+6
Implements FS#394.
2013-09-18Fixed pickupsTiger Wang1-1/+1
2013-08-25Moved entity spawning into cEntity::Initialize().madmaxoft1-2/+0
It has been called in every descendant anyway, so it's better this way - reduced duplicate code.
2013-08-19Added cPickup:IsCollected() to the Lua API.madmaxoft1-0/+3
2013-08-19Added cPickup:GetAge() the the Lua API.madmaxoft1-3/+2
2013-08-19Moved entities into the Entities subfolder.madmaxoft1-1/+1
2013-08-08Addeed OnSpawningEntity, OnSpawnedEntity, OnSpawningMonster, OnSpawnedMonster hooks.madmaxoft1-1/+1
As requested in FS 418.
2013-07-07Mobs are assigned MaxHealth from monsters.ini; reading monsters.ini doesn't need settings.ini values anymore.madmaxoft@gmail.com1-2/+0
Fixes FS #409. git-svn-id: http://mc-server.googlecode.com/svn/trunk@1662 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-22Moved physics to the cEntity class from the derivative classes (cMonster, cPickup). Added physics override to cPlayer to disable physics calculations. Fixed bug with pitch calculations on mobs.keyboard.osh@gmail.com1-3/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1400 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-04-13Rewritten entities so that they are owned by individual chunks and ticked within their chunk's Tick()madmaxoft@gmail.com1-2/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1385 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-03-09Pickups are now being saved into Anvil.madmaxoft@gmail.com1-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
2013-02-21Moved the Speed member into cEntity class instead of its descendants.madmaxoft@gmail.com1-5/+2
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1222 0a769ca7-a7f5-676a-18bf-c427514a06d6
2013-01-12Merged branch "branches/hooks" into "trunk".madmaxoft@gmail.com1-4/+4
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1139 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-28cPickup now uses full cItem, instead of a pointermadmaxoft@gmail.com1-6/+6
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1114 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-22MTRand reference is now passed as a Tick() parameter so that it isn't created and destroyed over and over again. All entities will handle physics (empty callback for now)madmaxoft@gmail.com1-3/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1096 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-12-21Reworked the IsA() / GetClass() framework to actually be useful. Added GetParentClass().madmaxoft@gmail.com1-3/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@1090 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-09-24Source files cleanup: The rest of the files renamed.madmaxoft@gmail.com1-1/+1
git-svn-id: http://mc-server.googlecode.com/svn/trunk@887 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-08-29Gotten completely rid of all cPackets. The cProtocol125 class now does all the parsing and writing by itself.madmaxoft@gmail.com1-1/+0
git-svn-id: http://mc-server.googlecode.com/svn/trunk@802 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-5/+16
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-53/+53
git-svn-id: http://mc-server.googlecode.com/svn/trunk@606 0a769ca7-a7f5-676a-18bf-c427514a06d6
2012-02-15No longer using pointers for Vector3(f/d/i) in cEntity's and cTracerfaketruth1-3/+3
git-svn-id: http://mc-server.googlecode.com/svn/trunk@268 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-9/+24
git-svn-id: http://mc-server.googlecode.com/svn/trunk@251 0a769ca7-a7f5-676a-18bf-c427514a06d6
2011-12-24Very alpha water physic for pickups (The swim now)lapayo94@gmail.com1-0/+4
but there are some problems (get stuck on some positions) so someone might look at it because I have no idea how to make it better :D git-svn-id: http://mc-server.googlecode.com/svn/trunk@102 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