mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 03:47:16 +00:00
Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/11862895039
This commit is contained in:
commit
fb1213e964
31
.github/workflows/team-pr-auto-approve.yml
vendored
31
.github/workflows/team-pr-auto-approve.yml
vendored
@ -13,30 +13,25 @@ on:
|
|||||||
- reopened
|
- reopened
|
||||||
- ready_for_review
|
- ready_for_review
|
||||||
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
approve:
|
approve:
|
||||||
name: Auto approve
|
name: Auto approve
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check if PR author has write access
|
- name: Generate access token
|
||||||
id: check-permission
|
id: generate-token
|
||||||
uses: actions-cool/check-user-permission@v2
|
uses: actions/create-github-app-token@v1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
app-id: ${{ vars.RESTRICTED_ACTIONS_DISPATCH_ID }}
|
||||||
require: write
|
private-key: ${{ secrets.RESTRICTED_ACTIONS_DISPATCH_KEY }}
|
||||||
username: ${{ github.event.pull_request.user.login }}
|
owner: ${{ github.repository_owner }}
|
||||||
#technically this would be fine for dependabot but generally bots don't count as team members
|
repositories: RestrictedActions
|
||||||
check-bot: true
|
|
||||||
|
|
||||||
#TODO: Some way to avoid unnecessary repeated reviews would be nice here
|
- name: Dispatch restricted action
|
||||||
|
uses: peter-evans/repository-dispatch@v3
|
||||||
- name: Approve PR if authorized
|
|
||||||
if: steps.check-permission.outputs.require-result == 'true' && steps.check-permission.outputs.check-result == 'false'
|
|
||||||
uses: juliangruber/approve-pull-request-action@v2
|
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
number: ${{ github.event.pull_request.number }}
|
repository: ${{ github.repository_owner }}/RestrictedActions
|
||||||
|
event-type: auto_approve_collaborator_pr
|
||||||
|
client-payload: '{"repo": "${{ github.repository }}", "pull_request_id": "${{ github.event.pull_request.number }}" }'
|
||||||
|
@ -25,6 +25,7 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
use pocketmine\block\utils\SupportType;
|
use pocketmine\block\utils\SupportType;
|
||||||
use pocketmine\math\AxisAlignedBB;
|
use pocketmine\math\AxisAlignedBB;
|
||||||
|
use pocketmine\math\Vector3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* "Flowable" blocks are destroyed if water flows into the same space as the block. These blocks usually don't have any
|
* "Flowable" blocks are destroyed if water flows into the same space as the block. These blocks usually don't have any
|
||||||
@ -40,6 +41,11 @@ abstract class Flowable extends Transparent{
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function canBePlacedAt(Block $blockReplace, Vector3 $clickVector, int $face, bool $isClickedBlock) : bool{
|
||||||
|
return (!$this->canBeFlowedInto() || !$blockReplace instanceof Liquid) &&
|
||||||
|
parent::canBePlacedAt($blockReplace, $clickVector, $face, $isClickedBlock);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return AxisAlignedBB[]
|
* @return AxisAlignedBB[]
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user