1
0
Fork 0
Commit Graph

143 Commits

Author SHA1 Message Date
Bond-009 8438def87e
Add Zombie Villagers 2020-04-10 00:50:45 +01:00
Mat 60bcc06f43
Implement wither skeletons (#4563) 2020-04-04 13:44:17 +02:00
Mattes D 01b8ed5295
Pulled the BlockID and BlockInfo headers from Globals.h. (#4591)
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
2020-04-03 08:57:01 +02:00
Mattes D 66e73a2d68 NBTChunkSerializer: Cleaned up interface.
Removed dependency on cChunkDataCallback.
Moved all the serializing code into a worker class.
Changed the serialization into a single-call action.
2019-09-24 17:38:59 +02:00
peterbell10 950aeffff8
CheckBasicStyle: Check number of empty lines between functions (#4267)
Add check for number of empty lines between functions and fix the corresponding failures
2018-07-26 22:24:36 +01:00
peterbell10 a4dbb5c582
Prefer static_cast to reinterpret_cast (#4223)
* 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.
2018-05-02 08:50:36 +01:00
Fabian 0dd172b80f Store Health as a float (#4073)
* Fix #4024

* Fix clang error

* Add comment

* Fix behaviour

* Save Health as float

* Changed m_Health to float

* Remove redundant static_cast

* Fix casts
2017-11-22 13:47:52 +00: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
peterbell10 447d929da1 Implement anvil chunk sparsing 2017-08-26 20:56:44 +02:00
peterbell10 f4f2fc7c3d Add cUUID class (#3871) 2017-08-25 13:43:18 +01:00
mathiascode 02775e52c4 Minor changes (#3909) 2017-08-24 11:19:40 +02:00
Pablo Beltrán b18f6637b6 Fully implemented leashes (#3798) 2017-08-21 10:46:41 +02:00
peterbell10 b8dda388e0 Represent cItem::m_Lore as an AStringVector (#3882)
* Replace cItem::m_Lore with AStringVector

* Reword deprecation warning

* Fix lua bindings
2017-08-18 11:29:54 +01:00
peterbell10 759618b035 Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
Bond-009 6a19841121 Added basic ocelot behavior (#3829) 2017-07-12 12:42:02 +02: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
Lukas Pioch 73a3c4e3be Exported boat
- NBT: Added saving / loading of material
- Added the material in the item handler of the boat
- Drop the correct boat if destroyed
- APIDoc: Added desc and functions
2017-05-24 19:02:18 +02:00
Lukas Pioch 41bfb22834 Corrected brewingstand and added support for fuel 2017-05-08 06:30:54 +02:00
Mattes D 0870649994 Fixed TrappedChest saving. (#3423)
Vanilla uses "Chest" in NBT for trapped chests.
2016-11-07 21:16:55 +01:00
Mattes D d2e8643607 Fixed type-casting-related warnings. 2016-08-24 22:26:53 +02:00
LogicParrot ca6ef58b1e Bulk clearing of whitespace 2016-02-05 23:50:18 +02:00
bibo38 657b0ed007 Changed the format of the MobHead data to allow MobHeads working on MInecraft 1.8
The NBT format now carries the texture data and transmit it to the client.
See: http://minecraft.gamepedia.com/Head#Block_entity
Related to #2674
2016-01-11 17:55:32 +01:00
Gargaj d05fdbdee9 Test for correct coordinates when fishing
Fun fact: this was able to actually deadlock the server depending on where you were standing :)
2015-12-10 20:54:55 +01:00
Julian Laubstein 48f84cc3e9 changed mob age from char to int 2015-11-16 14:13:44 +01:00
Lukas Pioch 9749c3aac9 Implemented brewing 2015-11-03 18:00:55 +01:00
Mattes D 82d9ac1e1c Namechange to Cuberite 2015-09-25 10:14:17 +02:00
Samuel Barney 804805d35a Silenced and fixed many warning messages across multiple files. 2015-07-29 09:49:30 -06:00
bibo38 6a27ec2ea0 Added Rabbit Metadata values.
Added the Rabbit Types and the MoreCarrotTicks value. Types are selected randomly on creation.
Fixes #1867
2015-07-17 01:09:06 +02:00
Hallucino 53207d3f18 Support ageable mobs
Move ageable stuff in Monster directly
2015-07-14 22:41:31 +02:00
Tiger Wang 3d398baf35 cPainting saving implemented
Additionally, it now inherits from cHangingEntity.
2015-03-13 23:05:06 +00:00
Tiger Wang e15e30a030 Fixed confusion over Item Frame directions 2015-03-13 22:29:27 +00:00
Masy98 6e8e1c6d8d Added Rabbits 2014-12-20 10:31:34 +01:00
Masy98 c836b52dd1 Added Entity Guardian 2014-12-18 19:30:32 +01:00
Howaner 2478e290f9 Many api fixes, add vanilla names to mob type -> string functions and mob spawner fixes. 2014-11-29 15:20:44 +01:00
Howaner 8b028c5c78 Finished mob spawner implementation. 2014-11-18 15:33:41 +01:00
Howaner 42120e2ea5 Merge branch 'master' into MobSpawner
Conflicts:
	MCServer/Plugins/Core
2014-11-18 14:56:32 +01:00
Alexander Harkness 232343065f Fixed compile (typos). 2014-10-27 22:03:11 +00:00
Alexander Harkness b67eb2169e Another one.# 2014-10-27 20:16:51 +00:00
Tiger Wang a26541a7c3 En masse NULL -> nullptr replace 2014-10-22 20:12:49 -07:00
Mattes D a42fa071bc Properly exported cItemFrame and cHangingEntity to Lua. 2014-10-21 22:02:30 +02:00
Tiger Wang d1814d2d67 Merge remote-tracking branch 'origin/master' into chestcarts
Conflicts:
	src/Entities/Minecart.cpp
2014-09-27 18:40:00 +01:00
Howaner 033d16babb Merge branch 'master' into MobSpawner
Conflicts:
	src/MobSpawner.h
	src/Mobs/Monster.h
2014-09-26 23:56:20 +02:00
worktycho 411c69b420 Merge pull request #1419 from mc-server/redstoneTests
Added test mocking to IncrementalRedstoneSimulator
2014-09-26 16:04:26 +01:00
Howaner 7cdcf0a883 Anvil: Arrow Tile tags are a short in Vanilla 2014-09-25 19:01:44 +02:00
Tycho 9c459cbe50 Merge branch 'master' into redstoneTests
Conflicts:
	src/Mobs/Monster.h
2014-09-25 15:22:08 +01:00
Howaner 32ecb121a3 derp 2014-09-24 15:30:52 +02:00
Howaner 1d588b5195 Don't create two entity lists. 2014-09-24 15:17:20 +02:00
Howaner 65077c314a Merge branch 'master' into WorldLoader 2014-09-24 15:00:49 +02:00
madmaxoft 8d9dfc5d1a Anvil: Wolf collar color is a byte in Vanilla.
Kept the old Int reading for compatibility reasons.
Ref.: #1448
2014-09-23 22:22:38 +02:00
Howaner 366af5067b MCServer world compatiblity with vanilla and mcedit. 2014-09-23 19:16:17 +02:00