1
0
Commit Graph

5338 Commits

Author SHA1 Message Date
satoshinm
6bc5031517 Implement Forge protocol handshake support (#3869) 2017-08-27 23:10:20 +02:00
peterbell10
447d929da1 Implement anvil chunk sparsing 2017-08-26 20:56:44 +02:00
mathiascode
3ebcf0fd5c Leashes work in 1.12.1 2017-08-26 20:56:10 +02:00
Alexander Harkness
0140923c35 Fix mobs not burning in daylight when on snow (#3961)
* Fix mobs not burning in daylight when on snow

or other non-transparent partial blocks.

Fixes #3945

* Change from floor to ceil
2017-08-25 16:26:45 +01:00
Bond-009
3c8712d871 Gives all entities the default airlevel on creation (#3942)
* Guardians don't take damage on land
* Squids suffocate on land
2017-08-25 14:44:36 +01:00
mathiascode
4b84288801 Don't assert when placing beds in older versions (#3916) 2017-08-25 14:52:32 +02:00
peterbell10
f4f2fc7c3d Add cUUID class (#3871) 2017-08-25 13:43:18 +01:00
Lane Kolbly
87c89a1727 Bed piston fix (#3956)
* Threaded world interface into ConvertBlockToPickups

* Changed how cBlockPiston::PushBlocks sets the old block to air, so that the block exists for the DropBlock call.

* Removed unused a_Digger argument.

* Removed incorrect comment

* This time actually removed a_Digger references.
2017-08-25 10:56:01 +01:00
Lukas Pioch
b55e5f5ad1 Use ref instead of pointer 2017-08-24 14:36:29 +02:00
mathiascode
02775e52c4 Minor changes (#3909) 2017-08-24 11:19:40 +02:00
Lane Kolbly
92ac45d27e Added check to deactivate existing entity effects when new entity effects are added. 2017-08-24 11:19:01 +02:00
peterbell10
0854ed01a4 Fix use after move in cItemBowHandler::OnItemShoot 2017-08-24 11:17:51 +02:00
Safwat Halaby
c1b1cb87a1 Removed outdated pathfinder comment (#3955) 2017-08-23 22:05:33 +03:00
Lane Kolbly
af6963f40f Added check in cEntity::TickBurning for whether the entity is planning to change worlds. (#3943) 2017-08-22 15:05:13 +01:00
peterbell10
cc2d719c59 Potential spawn prepare fix (#3924) 2017-08-22 14:34:43 +02:00
peterbell10
096cdac80d Implement protocol level chunk sparsing (#3864) 2017-08-21 17:56:53 +01:00
Bond-009
ad3192d696 Award player an achievement when creating a beacon (#3930) 2017-08-21 15:00:49 +01:00
Bond-009
d510c977f6 Snow only generates on blocks with a block light level of 10 or less (#3931) 2017-08-21 15:13:18 +02:00
Bond-009
ce87b73127 Fixed build for older clang versions (#3935) 2017-08-21 10:40:05 +01:00
Bond-009
a262bacc9d Give arthropods slowness IV when hit with bane of arthropods (#3932) 2017-08-21 10:51:26 +02:00
Pablo Beltrán
b18f6637b6 Fully implemented leashes (#3798) 2017-08-21 10:46:41 +02:00
Lane Kolbly
f81e6f6b6d Changed MoveToWorld to ScheduleMoveToWorld in cPlayer::Respawn (#3922)
* Changed MoveToWorld to ScheduleMoveToWorld

- Removed empty line
2017-08-18 11:40:35 +01:00
Tiger Wang
0e10464ac5 Merge pull request #3921 from lkolbly/removeAssert
- Removed incorrect assert in SendRespawn
2017-08-18 11:36:01 +01:00
Tiger Wang
e7a5e29522 Merge pull request #3918 from peterbell10/GetBlockEntity
cChunk: Don't assume GetBlockEntity coords are valid
2017-08-18 11:33:46 +01: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
Lane Kolbly
8f1ddfa6c3 Changed type of FastRandom in monster drop calculation. (#3920)
* Fixed type of FastRandom in monster drop calculation.

* Distribute dropped items into stacks.

* Moved while loop outside if statement.
2017-08-18 11:23:08 +01:00
peterbell10
5e81024f89 cBeaconEntity fix no world crash 2017-08-18 11:22:22 +01:00
Tiger Wang
72d7027861 Merge pull request #3489 from cuberite/EntityOwnership
* Changed entity ownership model to use smart pointers
2017-08-18 11:17:56 +01:00
Bond-009
05045860c2 Sitting cats block enderchests from opening (#3906) 2017-08-17 16:29:43 +02:00
Lane Kolbly
1ec85a2b2c Add cLuaWindow OnClicked Callback (#3901) 2017-08-17 16:27:43 +02:00
Bond-009
238f5bb338 Add support for 1.12.1 (#3908) 2017-08-17 16:25:53 +02:00
Lane Kolbly
7bdbfad1bb Changed int parameters to vector parameters in cCuboid and simulators (#3874) 2017-08-17 15:48:38 +02:00
Lane Kolbly
4dd2af27e0 Added knockback to arrows, fixed knockback enchantment handling (#3900)
* Added knockback for arrows, fixed knockback enchantment handling.
2017-08-13 12:40:23 +01:00
Tiger Wang
fdd4b6e7c4 Merge pull request #3897 from peterbell10/PlaceSound
cBlockInfo: Remove/deprecate place sound
2017-08-13 12:37:37 +01:00
Lane Kolbly
62bc951474 Shortened DoIntervalsIntersect to two comparisons, made inline. (#3883)
* Shortened DoIntervalsIntersect to two comparisons, made inline.

* Applied DeMorgan's

* a_Max1 => a_Max2

* Moved DoIntervalsIntersect definition into header file.

* Moved DoesIntersect into header.

* Unindented line
2017-08-13 12:36:22 +01:00
Lukas Pioch
743a50014a Replaced includes with forward declarations 2017-08-13 12:31:10 +01:00
Lane Kolbly
9cc48ac2a3 Removed incorrect assert in cClientHandle::SendRespawn. 2017-08-11 11:00:21 -05:00
peterbell10
0979cd8f17 cChunk: Don't assume GetBlockEntity coords are valid 2017-08-10 19:06:37 +01:00
Tiger Wang
4ef47aed62 Changed entity ownership model to use smart pointers 2017-08-07 19:24:16 +01:00
peterbell10
9472380494 cBlockInfo: Deprecate place sound 2017-08-07 09:31:36 +01:00
Lukas Pioch
07f25253a2 Removed unneeded includes (#3902) 2017-08-06 20:57:44 +01:00
Dan Čermák
028ed77ca9 Fixed compilation for clang 4.0 & gcc 7.1 2017-08-04 11:17:39 +02:00
peterbell10
79eb4c3aed Implement invisibility effect 2017-08-03 15:34:38 +02:00
peterbell10
759618b035 Remove double includes part 2 (#3890) 2017-08-03 15:34:19 +02:00
Lukas Pioch
0397535fa7 Removed unused forward declarations (#3888) 2017-08-03 15:10:29 +02:00
peterbell10
2ef8a62339 Fix BSD build 2017-08-02 22:51:16 +02:00
Lukas Pioch
4691bc5a29 Removed double includes (#3885) 2017-08-02 19:57:20 +01:00
Lane Kolbly
dc49092ae5 Handle Teleport Confirmation Packet (#3884)
+ Added code to drop incoming client position packets until the most recent teleport was confirmed.
2017-08-02 15:46:29 +01:00
peterbell10
0d0323608d cBlockHandler: take player by ref 2017-08-01 08:21:20 +02:00
peterbell10
8eb5672920 cWorld::SendBlockTo take player by ref 2017-08-01 08:21:20 +02:00
Lane Kolbly
10d42a2452 Consolidated food effects into EatItem, added all fish type FoodInfos. (#3875)
* Consolidated food effects into EatItem, added all fish types.

* Changed type of NumFishInfos to satisfy clang.

* Removed unused call for a_Item in EatItem
2017-07-30 18:53:21 +01:00
peterbell10
8fbb9dbf53 cParsedNBT: Improved error reporting (#3876)
* cParsedNBT: Improved error reporting

* Fix typos
2017-07-30 17:55:19 +01:00
Lane Kolbly
790e15f2e6 Added anvil enchantment handling. (#3857)
+ Added anvil enchantment handling.
2017-07-28 18:00:20 +01:00
Lane Kolbly
5402b214b3 Check for intersection between placed blocks and entities. (#3850)
* 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-28 17:59:21 +01:00
Tiger Wang
eb4432bb62 Tentative fix for player-limit race condition (#3862)
* Attempts to fix #2257

Derived from d233e9843148313c71fbaba96ccff660e47b07b1

* Changed player count type to int

* Clarified certain actions
2017-07-28 17:54:40 +01:00
peterbell10
e0a44fb3bc Handle incomplete packets in cProtocolRecognizer 2017-07-26 11:04:08 +01:00
Lane Kolbly
87af95b67c Updated armor cover calculation. (#3858)
* Updated armor damage calculation.

+ Added lua docs, added casts from float to int.

* Changed verbage in docstring and comment.
2017-07-23 10:46:38 +01:00
Bond-009
6e8ec2fe34 Creepers explode when burned by flint and steel (#3865)
Fixed an issue where creepers didn't explode when they were burned with flint and steel
2017-07-22 22:05:09 +01:00
Mattes D
64561175ab BlockArea: Added the GetBounds function. 2017-07-22 19:57:25 +02:00
Lane Kolbly
6a261e451d Fixed check to see if block entity is in merge source. 2017-07-21 21:10:39 -05:00
Tiger Wang
6e749dacd3 Increment fire block iterator
* Resolves potential deadlock
2017-07-21 14:42:38 +01:00
peterbell10
7c687b77ee Remove comment 2017-07-21 14:41:51 +01:00
peterbell10
502b726a7b Simplify SizeCheck 2017-07-21 14:41:51 +01:00
peterbell10
55a5ffdf5c Remove stricmp macro in favour of NoCaseCompare 2017-07-21 14:41:51 +01:00
peterbell10
5a5297974b Remove alignment macros 2017-07-21 14:41:51 +01:00
peterbell10
a56cfd1f42 Remove smart pointer macros 2017-07-21 14:41:51 +01:00
Mattes D
895987a111 FastRandom: Remove discrepancy between arg and return value type. (#3846) 2017-07-21 12:06:21 +02:00
Bond-009
f9b56dd859 Break the cactus block when it grows next to a block. (#3851) 2017-07-18 15:14:52 +02:00
Lane Kolbly
93e1690253 Made cBlockHandler OnPlacedByPlayer call OnPlaced, made BlockRailHandler use NeighborChanged instead of OnNeighborChanged. 2017-07-18 15:12:55 +02:00
peterbell10
60dfaa0967 Allocate redstone component handlers upfront 2017-07-17 21:40:43 +02:00
Mattes D
167c4bf2e6 Simulators: Added area-based wakeup. 2017-07-16 10:01:19 +02:00
peterbell10
41d016cf5b Handle middle mouse drag (#3847) 2017-07-13 15:43:48 +02:00
Bond-009
6a19841121 Added basic ocelot behavior (#3829) 2017-07-12 12:42:02 +02:00
Lane Kolbly
b61898c30c Lua plugin cColor (#3833) 2017-07-12 12:30:43 +02:00
Lane Kolbly
793acd267f Changing pickup lifetime and combining semantics, making these adjustable in the lua api. (#3843) 2017-07-12 12:13:27 +02:00
Lane Kolbly
647d9082b8 If entity is a player, send relmove packets. 2017-07-12 12:12:56 +02:00
peterbell10
d6ee1caf4c Remove double delete of PrepareChunk lua callback (#3844) 2017-07-12 11:56:01 +02:00
Lukas Pioch
e38a2a1e8c Send player message when clicking on advancements or green book. (#3845) 2017-07-12 10:11:29 +02:00
Lane Kolbly
67e4bbde0c Made cBlockArea:cChunkReader AreaBounds inclusive on both sides. (#3842) 2017-07-10 11:10:06 +02:00
Pablo Beltrán
7adec790e6 Sound effect horse rejects player when taming 2017-07-10 05:47:04 +02:00
Lane Kolbly
a561886bf3 Implemented draggingitem API. 2017-07-10 05:46:04 +02:00
peterbell10
b2634bade0 cItemGrid bounds check (#3837) 2017-07-09 22:54:56 +02:00
peterbell10
bbf5bec817 BigFlower fixes (#3826)
* BigFlowers fixes

* Correct upper part meta
* Documented parameters to DoesIgnoreBuildCollision
2017-07-07 16:37:53 +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
Lane Kolbly
10a3bd9d12 Changed Lua plugins to only execute files ending in .lua (#3831) 2017-07-07 08:42:35 +02:00
peterbell10
d838ef7ba4 cBlockInfo static initialisation (#3832) 2017-07-03 18:34:27 +02:00
Pablo Beltrán
7606448b05 Fixes double right click on entities till off-hand actions gets implemented (#3821) 2017-07-03 09:37:38 +02:00
Bond_009
070cb0d21f You can't use beds when there are hostile mobs nearby 2017-07-02 17:10:57 +02:00
Lane Kolbly
7c7f85117b Added armor durability reduction when player is attacked. 2017-07-02 07:45:49 +02:00
Bond-009
b1628846d9 Fix horse taming (#3820)
* Horses rear when untamed and right-clicked with an item
2017-07-02 07:40:59 +02:00
Bond-009
cf22bc4e60 Players in creative and spectator aren't affected by cacti (#3824) 2017-07-02 07:39:19 +02:00
Bond_009
445abe001a When right-clicking on a passive mob with 'his' spawn egg spawn a baby 2017-07-02 07:38:41 +02:00
Bond-009
a944ac3b06 Endermen take damage from rain 2017-06-30 23:53:23 +02:00
Bond-009
0c0bfe54bb Spider should attack only when the light level is lower than 11 (#3815) 2017-06-30 10:48:06 +02:00
Bond-009
7fd3899796 Added 1.12 blocks (#3760) 2017-06-30 10:46:58 +02:00
peterbell10
33527067ed Update tolua and export EffectID 2017-06-29 18:58:48 +02:00
Mattes D
399ea0bf1d cNetwork bindings: Use ApiParamError and CheckParam(Static)Self. 2017-06-26 10:52:59 +02:00
Mattes D
e05ca49459 Moved ApiParamError into cLuaState. 2017-06-26 10:52:59 +02:00
Mattes D
f6bab71d05 Fixed memory leak in cClientHandle. (#3794) 2017-06-26 09:11:30 +02:00
Lukas Pioch
9c25520b69 Corrected APIDoc for cBlockArea and exported missing functions (#3808) 2017-06-26 09:02:06 +02:00