From 5402b214b31af60bc96cd4e47e9211715c3e99f5 Mon Sep 17 00:00:00 2001 From: Lane Kolbly Date: Fri, 28 Jul 2017 11:59:21 -0500 Subject: 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. --- Server/Plugins/APIDump/APIDesc.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Server/Plugins') diff --git a/Server/Plugins/APIDump/APIDesc.lua b/Server/Plugins/APIDump/APIDesc.lua index 288466303..134a36d7b 100644 --- a/Server/Plugins/APIDump/APIDesc.lua +++ b/Server/Plugins/APIDump/APIDesc.lua @@ -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 = -- cgit v1.2.3