mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
Merge branch 'stable' into minor-next
This commit is contained in:
commit
a5985dcf7d
22
.github/workflows/update-updater-api.yml
vendored
22
.github/workflows/update-updater-api.yml
vendored
@ -25,13 +25,25 @@ jobs:
|
||||
- name: Download new release information
|
||||
run: curl -f -L ${{ github.server_url }}/${{ github.repository }}/releases/download/${{ steps.tag-name.outputs.TAG_NAME }}/build_info.json -o new_build_info.json
|
||||
|
||||
- name: Detect channel
|
||||
- name: Detect channels
|
||||
id: channel
|
||||
run: echo CHANNEL=$(jq -r '.channel' new_build_info.json) >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Copy release information
|
||||
run: |
|
||||
cp new_build_info.json channels/${{ steps.channel.outputs.CHANNEL }}.json
|
||||
CHANNEL=$(jq -r '.channel' new_build_info.json)
|
||||
VERSION=${{ steps.tag-name.outputs.TAG_NAME }}
|
||||
echo CHANNEL=$CHANNEL >> $GITHUB_OUTPUT
|
||||
if [ "$CHANNEL" == "stable" ]; then
|
||||
echo MAJOR=$(echo $VERSION | cut -d. -f1) >> $GITHUB_OUTPUT
|
||||
echo MINOR=$(echo $VERSION | cut -d. -f1-2) >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo MAJOR=$(echo $VERSION | cut -d. -f1)-$CHANNEL >> $GITHUB_OUTPUT
|
||||
echo MINOR=$(echo $VERSION | cut -d. -f1-2)-$CHANNEL >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Update channel info
|
||||
run: |
|
||||
cp new_build_info.json "channels/${{ steps.channel.outputs.CHANNEL }}.json"
|
||||
cp new_build_info.json "channels/${{ steps.channel.outputs.MAJOR }}.json"
|
||||
cp new_build_info.json "channels/${{ steps.channel.outputs.MINOR }}.json"
|
||||
rm new_build_info.json
|
||||
|
||||
- name: Commit changes
|
||||
|
@ -38,7 +38,6 @@ use function is_string;
|
||||
use function max;
|
||||
use function preg_match;
|
||||
use function preg_replace;
|
||||
use function sleep;
|
||||
use function sprintf;
|
||||
use function str_pad;
|
||||
use function strlen;
|
||||
@ -160,9 +159,6 @@ function main() : void{
|
||||
replaceVersion($versionInfoPath, $nextVer->getBaseVersion(), true, $channel);
|
||||
systemWrapper('git add "' . $versionInfoPath . '"', "failed to stage changes for post-release commit");
|
||||
systemWrapper('git commit -m "' . $nextVer->getBaseVersion() . ' is next" --include "' . $versionInfoPath . '"', "failed to create post-release commit");
|
||||
echo "pushing changes in 5 seconds\n";
|
||||
sleep(5);
|
||||
systemWrapper('git push origin HEAD ' . $currentVer->getBaseVersion(), "failed to push changes to remote");
|
||||
}
|
||||
|
||||
main();
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 71b9f9d2d7b3ee45d9475803b96c080f5f22f373
|
||||
Subproject commit a464454d1ed946baabd32a02ddcf66361374b99c
|
@ -34,7 +34,7 @@ class RedMushroomBlock extends Opaque{
|
||||
protected MushroomBlockType $mushroomBlockType;
|
||||
|
||||
public function __construct(BlockIdentifier $idInfo, string $name, BlockBreakInfo $breakInfo){
|
||||
$this->mushroomBlockType = MushroomBlockType::PORES();
|
||||
$this->mushroomBlockType = MushroomBlockType::ALL_CAP();
|
||||
parent::__construct($idInfo, $name, $breakInfo);
|
||||
}
|
||||
|
||||
@ -42,6 +42,11 @@ class RedMushroomBlock extends Opaque{
|
||||
return MushroomBlockTypeIdMap::getInstance()->toId($this->mushroomBlockType);
|
||||
}
|
||||
|
||||
protected function writeStateToItemMeta() : int{
|
||||
//these blocks always drop as all-cap, but may exist in other forms in the inventory (particularly creative)
|
||||
return BlockLegacyMetadata::MUSHROOM_BLOCK_ALL_CAP;
|
||||
}
|
||||
|
||||
public function readStateFromData(int $id, int $stateMeta) : void{
|
||||
$type = MushroomBlockTypeIdMap::getInstance()->fromId($stateMeta);
|
||||
if($type === null){
|
||||
|
Loading…
x
Reference in New Issue
Block a user