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.
This commit is contained in:
Lane Kolbly
2017-07-28 17:59:21 +01:00
committed by Tiger Wang
parent eb4432bb62
commit 5402b214b3
17 changed files with 300 additions and 3 deletions
+10
View File
@@ -3059,6 +3059,16 @@ local Hash = cCryptoHash.sha1HexString("DataToHash")
},
Notes = "Schedules the entity to be destroyed; if ShouldBroadcast is not present or set to true, broadcasts the DestroyEntity packet",
},
DoesPreventBlockPlacement =
{
Returns =
{
{
Type = "boolean",
},
},
Notes = "Returns true if this entity doesn't allow blocks to be placed intersecting the entity.",
},
GetAirLevel =
{
Returns =