mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Merge branch 'stable'
This commit is contained in:
commit
95eb70a924
81
.github/workflows/main.yml
vendored
81
.github/workflows/main.yml
vendored
@ -180,3 +180,84 @@ jobs:
|
||||
|
||||
- name: Run integration tests
|
||||
run: ./tests/travis.sh -t4
|
||||
|
||||
preprocessor:
|
||||
name: Preprocessor tests
|
||||
needs: build-php
|
||||
runs-on: ${{ matrix.image }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
image: [ubuntu-20.04]
|
||||
php: [7.3.27, 7.4.16]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Restore PHP build cache
|
||||
id: php-build-cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: "./bin"
|
||||
key: "php-build-generic-${{ matrix.php }}-${{ matrix.image }}-${{ hashFiles('./tests/gh-actions/build.sh') }}"
|
||||
|
||||
- name: Kill build on PHP build cache miss (should never happen)
|
||||
if: steps.php-build-cache.outputs.cache-hit != 'true'
|
||||
run: exit 1
|
||||
|
||||
- name: Install cached PHP's dependencies
|
||||
if: steps.php-build-cache.outputs.cache-hit == 'true'
|
||||
run: chmod +x ./bin/php7/install-dependencies.sh && ./bin/php7/install-dependencies.sh
|
||||
|
||||
- name: Prefix PHP to PATH
|
||||
run: echo "$(pwd)/bin/php7/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Install Composer
|
||||
run: curl -sS https://getcomposer.org/installer | php
|
||||
|
||||
- name: Restore Composer package cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cache/composer/files
|
||||
~/.cache/composer/vcs
|
||||
key: "composer-v2-cache-${{ matrix.php }}-${{ hashFiles('./composer.lock') }}"
|
||||
restore-keys: |
|
||||
composer-v2-cache-
|
||||
|
||||
- name: Install Composer dependencies
|
||||
run: php composer.phar install --no-dev --prefer-dist --no-interaction
|
||||
|
||||
- name: Run preprocessor
|
||||
run: |
|
||||
PM_PREPROCESSOR_PATH="$GITHUB_WORKSPACE/build/preprocessor"
|
||||
php "$PM_PREPROCESSOR_PATH/PreProcessor.php" --path=src --multisize || (echo "Preprocessor exited with code $?" && exit 1)
|
||||
|
||||
#dump the diff of preprocessor replacements to a patch in case it has bugs
|
||||
git diff > preprocessor_diff.patch
|
||||
|
||||
VENDOR_PM="$GITHUB_WORKSPACE/vendor"
|
||||
VENDOR_PM_BACKUP="$GITHUB_WORKSPACE/vendor-before-preprocess"
|
||||
cp -r "$VENDOR_PM" "$VENDOR_PM_BACKUP"
|
||||
for f in $(ls $VENDOR_PM/pocketmine); do
|
||||
echo "Processing directory \"$f\"..."
|
||||
php "$PM_PREPROCESSOR_PATH/PreProcessor.php" --path="$VENDOR_PM/pocketmine/$f" --multisize || (echo "Preprocessor exited with code $?" && exit 1)
|
||||
echo "Checking for changes in \"$f\"..."
|
||||
DIFF=$(git diff --no-index "$VENDOR_PM_BACKUP/pocketmine/$f" "$VENDOR_PM/pocketmine/$f" || true)
|
||||
if [ "$DIFF" != "" ]; then
|
||||
PATCH="$GITHUB_WORKSPACE/preprocessor_diff_$f.patch"
|
||||
echo "$DIFF" > "$PATCH"
|
||||
echo "Generated patch file \"$PATCH\""
|
||||
else
|
||||
echo "No diff generated for \"$f\" (preprocessor made no changes)"
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Upload preprocessor diffs
|
||||
uses: actions/upload-artifact@v2
|
||||
if: always()
|
||||
with:
|
||||
name: preprocessor_diffs_${{ matrix.php }}_${{ matrix.image }}
|
||||
path: ${{ github.workspace }}/preprocessor_diff*.patch
|
||||
|
@ -255,7 +255,7 @@ class LevelSoundEventPacket extends DataPacket implements ClientboundPacket, Gar
|
||||
public const SOUND_BLOCK_TURTLE_EGG_BREAK = 224;
|
||||
public const SOUND_BLOCK_TURTLE_EGG_CRACK = 225;
|
||||
public const SOUND_BLOCK_TURTLE_EGG_HATCH = 226;
|
||||
|
||||
public const SOUND_LAY_EGG = 227;
|
||||
public const SOUND_BLOCK_TURTLE_EGG_ATTACK = 228;
|
||||
public const SOUND_BEACON_ACTIVATE = 229;
|
||||
public const SOUND_BEACON_AMBIENT = 230;
|
||||
@ -309,7 +309,56 @@ class LevelSoundEventPacket extends DataPacket implements ClientboundPacket, Gar
|
||||
public const SOUND_BLOCK_SMOKER_SMOKE = 278;
|
||||
public const SOUND_BLOCK_BLASTFURNACE_FIRE_CRACKLE = 279;
|
||||
public const SOUND_BLOCK_SMITHING_TABLE_USE = 280;
|
||||
public const SOUND_UNDEFINED = 281;
|
||||
public const SOUND_SCREECH = 281;
|
||||
public const SOUND_SLEEP = 282;
|
||||
public const SOUND_BLOCK_FURNACE_LIT = 283;
|
||||
public const SOUND_CONVERT_MOOSHROOM = 284;
|
||||
public const SOUND_MILK_SUSPICIOUSLY = 285;
|
||||
public const SOUND_CELEBRATE = 286;
|
||||
public const SOUND_JUMP_PREVENT = 287;
|
||||
public const SOUND_AMBIENT_POLLINATE = 288;
|
||||
public const SOUND_BLOCK_BEEHIVE_DRIP = 289;
|
||||
public const SOUND_BLOCK_BEEHIVE_ENTER = 290;
|
||||
public const SOUND_BLOCK_BEEHIVE_EXIT = 291;
|
||||
public const SOUND_BLOCK_BEEHIVE_WORK = 292;
|
||||
public const SOUND_BLOCK_BEEHIVE_SHEAR = 293;
|
||||
public const SOUND_DRINK_HONEY = 294;
|
||||
public const SOUND_AMBIENT_CAVE = 295;
|
||||
public const SOUND_RETREAT = 296;
|
||||
public const SOUND_CONVERTED_TO_ZOMBIFIED = 297;
|
||||
public const SOUND_ADMIRE = 298;
|
||||
public const SOUND_STEP_LAVA = 299;
|
||||
public const SOUND_TEMPT = 300;
|
||||
public const SOUND_PANIC = 301;
|
||||
public const SOUND_ANGRY = 302;
|
||||
public const SOUND_AMBIENT_WARPED_FOREST_MOOD = 303;
|
||||
public const SOUND_AMBIENT_SOULSAND_VALLEY_MOOD = 304;
|
||||
public const SOUND_AMBIENT_NETHER_WASTES_MOOD = 305;
|
||||
public const SOUND_RESPAWN_ANCHOR_BASALT_DELTAS_MOOD = 306;
|
||||
public const SOUND_AMBIENT_CRIMSON_FOREST_MOOD = 307;
|
||||
public const SOUND_RESPAWN_ANCHOR_CHARGE = 308;
|
||||
public const SOUND_RESPAWN_ANCHOR_DEPLETE = 309;
|
||||
public const SOUND_RESPAWN_ANCHOR_SET_SPAWN = 310;
|
||||
public const SOUND_RESPAWN_ANCHOR_AMBIENT = 311;
|
||||
public const SOUND_PARTICLE_SOUL_ESCAPE_QUIET = 312;
|
||||
public const SOUND_PARTICLE_SOUL_ESCAPE_LOUD = 313;
|
||||
public const SOUND_RECORD_PIGSTEP = 314;
|
||||
public const SOUND_LODESTONE_COMPASS_LINK_COMPASS_TO_LODESTONE = 315;
|
||||
public const SOUND_SMITHING_TABLE_USE = 316;
|
||||
public const SOUND_ARMOR_EQUIP_NETHERITE = 317;
|
||||
public const SOUND_AMBIENT_WARPED_FOREST_LOOP = 318;
|
||||
public const SOUND_AMBIENT_SOULSAND_VALLEY_LOOP = 319;
|
||||
public const SOUND_AMBIENT_NETHER_WASTES_LOOP = 320;
|
||||
public const SOUND_AMBIENT_BASALT_DELTAS_LOOP = 321;
|
||||
public const SOUND_AMBIENT_CRIMSON_FOREST_LOOP = 322;
|
||||
public const SOUND_AMBIENT_WARPED_FOREST_ADDITIONS = 323;
|
||||
public const SOUND_AMBIENT_SOULSAND_VALLEY_ADDITIONS = 324;
|
||||
public const SOUND_AMBIENT_NETHER_WASTES_ADDITIONS = 325;
|
||||
public const SOUND_AMBIENT_BASALT_DELTAS_ADDITIONS = 326;
|
||||
public const SOUND_AMBIENT_CRIMSON_FOREST_ADDITIONS = 327;
|
||||
public const SOUND_BUCKET_FILL_POWDER_SNOW = 328;
|
||||
public const SOUND_BUCKET_EMPTY_POWDER_SNOW = 329;
|
||||
public const SOUND_UNDEFINED = 330;
|
||||
|
||||
public static function create(int $sound, ?Vector3 $pos, int $extraData = -1, string $entityType = ":", bool $isBabyMob = false) : self{
|
||||
$result = new self;
|
||||
|
Loading…
x
Reference in New Issue
Block a user