Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ on:
push:
branches:
- '*'
- '!multiprotocol'

pull_request:
branches:
- '*'
- '!multiprotocol'

permissions:
contents: read
Expand Down Expand Up @@ -37,7 +36,7 @@ jobs:
run: composer make-server

- name: Archive generated Phar file
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: BetterAltay
path: BetterAltay.phar
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@
<br>
This is a fork of <a href="https://github.com/pmmp/PocketMine-MP/tree/3.28.0">PocketMine-MP</a> and <a href="https://github.com/unresolved3169/Altay">Altay</a>.
<br><br>
<i>This fork was created due to the inactivity of Altay and currently supports Minecraft: Bedrock Edition v1.21.41</i>
<i>This fork was created due to the inactivity of Altay and currently supports Minecraft: Bedrock Edition v1.21.50</i>
<br><br>
</p>

<p align="center">
<a href="https://discord.gg/spquK3Q66W">
<img src="https://img.shields.io/discord/930544524655202317?color=5865F2&logo=discord&logoColor=white" alt="Discord">
</a>
<a href="https://www.minecraft.net/de-de/article/-minecraft-1-21-40-bedrock-changelog">
<img src="https://img.shields.io/badge/Minecraft_1.21.40-blue?style=flat-square" alt="Minecraft">
<a href="https://www.minecraft.net/en-us/article/minecraft-1-21-50-bedrock-changelog">
<img src="https://img.shields.io/badge/Minecraft_1.21.50-blue?style=flat-square" alt="Minecraft">
</a>
<a href="https://github.com/Mojang/bedrock-protocol-docs">
<img src="https://img.shields.io/badge/protocol-748-yellow?style=flat-square" alt="Protocol">
<img src="https://img.shields.io/badge/protocol-766-yellow?style=flat-square" alt="Protocol">
</a>
<a href="https://github.com/Benedikt05/BetterAltay/releases">
<img src="https://img.shields.io/github/v/release/Benedikt05/BetterAltay?color=green&label=Latest%20Release&logo=github" alt="Latest Release">
Expand Down
2 changes: 1 addition & 1 deletion src/pocketmine/VersionInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@

const NAME = "BetterAltay";
const BASE_VERSION = "3.28.0"; //Don't change this anymore. Change the FORK_VERSION instead.
const FORK_VERSION = "1.26.0";
const FORK_VERSION = "1.27.0";
const IS_DEVELOPMENT_BUILD = false;
const BUILD_CHANNEL = "master";
5 changes: 5 additions & 0 deletions src/pocketmine/level/particle/Particle.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ abstract class Particle extends Vector3{
public const TYPE_VAULT_CONNECTION = 90;
public const TYPE_WIND_EXPLOSION = 91;
public const TYPE_WOLF_ARMOR_CRACK = 92;
public const TYPE_OMINOUS_ITEM_SPAWNER = 93;
public const TYPE_CREAKING_CRUMBLE = 94;
public const TYPE_PALE_OAK_LEAVES = 95;
public const TYPE_EYEBLOSSOM_OPEN = 96;
public const TYPE_EYEBLOSSOM_CLOSE = 97;

/**
* @return DataPacket|DataPacket[]
Expand Down
79 changes: 77 additions & 2 deletions src/pocketmine/network/mcpe/protocol/LevelSoundEventPacket.php
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ class LevelSoundEventPacket extends DataPacket{
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_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;
Expand Down Expand Up @@ -386,7 +386,82 @@ class LevelSoundEventPacket extends DataPacket{
public const SOUND_SNIFFER_EGG_HATCHED = 467;
public const SOUND_WAXED_SIGN_INTERACT_FAIL = 468;
public const SOUND_RECORD_RELIC = 469;
public const SOUND_UNDEFINED = 470;
public const SOUND_NOTE_BASS = 470;
public const SOUND_PUMPKIN_CARVE = 471;
public const SOUND_MOB_HUSK_CONVERT_TO_ZOMBIE = 472;
public const SOUND_MOB_PIG_DEATH = 473;
public const SOUND_MOB_HOGLIN_CONVERTED_TO_ZOMBIFIED = 474;
public const SOUND_AMBIENT_UNDERWATER_ENTER = 475;
public const SOUND_AMBIENT_UNDERWATER_EXIT = 476;
public const SOUND_BOTTLE_FILL = 477;
public const SOUND_BOTTLE_EMPTY = 478;
public const SOUND_CRAFTER_CRAFT = 479;
public const SOUND_CRAFTER_FAIL = 480;
public const SOUND_BLOCK_DECORATED_POT_INSERT = 481;
public const SOUND_BLOCK_DECORATED_POT_INSERT_FAIL = 482;
public const SOUND_CRAFTER_DISABLE_SLOT = 483;
public const SOUND_TRIAL_SPAWNER_OPEN_SHUTTER = 484;
public const SOUND_TRIAL_SPAWNER_EJECT_ITEM = 485;
public const SOUND_TRIAL_SPAWNER_DETECT_PLAYER = 486;
public const SOUND_TRIAL_SPAWNER_SPAWN_MOB = 487;
public const SOUND_TRIAL_SPAWNER_CLOSE_SHUTTER = 488;
public const SOUND_TRIAL_SPAWNER_AMBIENT = 489;
public const SOUND_BLOCK_COPPER_BULB_TURN_ON = 490;
public const SOUND_BLOCK_COPPER_BULB_TURN_OFF = 491;
public const SOUND_AMBIENT_IN_AIR = 492;
public const SOUND_BREEZE_WIND_CHARGE_BURST = 493;
public const SOUND_IMITATE_BREEZE = 494;
public const SOUND_MOB_ARMADILLO_BRUSH = 495;
public const SOUND_MOB_ARMADILLO_SCUTE_DROP = 496;
public const SOUND_ARMOR_EQUIP_WOLF = 497;
public const SOUND_ARMOR_UNEQUIP_WOLF = 498;
public const SOUND_REFLECT = 499;
public const SOUND_VAULT_OPEN_SHUTTER = 500;
public const SOUND_VAULT_CLOSE_SHUTTER = 501;
public const SOUND_VAULT_EJECT_ITEM = 502;
public const SOUND_VAULT_INSERT_ITEM = 503;
public const SOUND_VAULT_INSERT_ITEM_FAIL = 504;
public const SOUND_VAULT_AMBIENT = 505;
public const SOUND_VAULT_ACTIVATE = 506;
public const SOUND_VAULT_DEACTIVATE = 507;
public const SOUND_HURT_REDUCED = 508;
public const SOUND_WIND_CHARGE_BURST = 509;
public const SOUND_IMITATE_BOGGED = 510;
public const SOUND_ARMOR_CRACK_WOLF = 511;
public const SOUND_ARMOR_BREAK_WOLF = 512;
public const SOUND_ARMOR_REPAIR_WOLF = 513;
public const SOUND_MACE_SMASH_AIR = 514;
public const SOUND_MACE_SMASH_GROUND = 515;
public const SOUND_TRIAL_SPAWNER_CHARGE_ACTIVATE = 516;
public const SOUND_TRIAL_SPAWNER_AMBIENT_OMINOUS = 517;
public const SOUND_OMINOUS_ITEM_SPAWNER_SPAWN_ITEM = 518;
public const SOUND_OMINOUS_BOTTLE_END_USE = 519;
public const SOUND_MACE_HEAVY_SMASH_GROUND = 520;
public const SOUND_OMINOUS_ITEM_SPAWNER_SPAWN_ITEM_BEGIN = 521;
public const SOUND_APPLY_EFFECT_BAD_OMEN = 523;
public const SOUND_APPLY_EFFECT_RAID_OMEN = 524;
public const SOUND_APPLY_EFFECT_TRIAL_OMEN = 525;
public const SOUND_OMINOUS_ITEM_SPAWNER_ABOUT_TO_SPAWN_ITEM = 526;
public const SOUND_RECORD_CREATOR = 527;
public const SOUND_RECORD_CREATOR_MUSIC_BOX = 528;
public const SOUND_RECORD_PRECIPICE = 529;
public const SOUND_VAULT_REJECT_REWARDED_PLAYER = 530;
public const SOUND_IMITATE_DROWNED = 531;
public const IMITATE_CREAKING = 532;
public const SOUND_BUNDLE_INSERT_FAIL = 533;
public const SOUND_SPONGE_ABSORB = 534;

public const SOUND_BLOCK_CREAKING_HEART_TRAIL = 536;
public const SOUND_CREAKING_HEART_SPAWN = 537;
public const SOUND_ACTIVATE = 538;
public const SOUND_DEACTIVATE = 539;
public const SOUND_FREEZE = 540;
public const SOUND_UNFREEZE = 541;
public const SOUND_OPEN = 542;
public const SOUND_OPEN_LONG = 543;
public const SOUND_CLOSE = 544;
public const SOUND_CLOSE_LONG = 545;
public const SOUND_UNDEFINED = 546;

public static function create(int $sound, ?Vector3 $pos, int $extraData = -1, string $entityType = ":", bool $isBabyMob = false) : self{
$result = new self;
Expand Down
4 changes: 2 additions & 2 deletions src/pocketmine/network/mcpe/protocol/ProtocolInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ interface ProtocolInfo{
*/

/** Actual Minecraft: PE protocol version */
public const CURRENT_PROTOCOL = 748;
public const CURRENT_PROTOCOL = 766;
/** Current Minecraft PE version reported by the server. This is usually the earliest currently supported version. */
public const MINECRAFT_VERSION = 'v' . self::MINECRAFT_VERSION_NETWORK;
/** Version number sent to clients in ping responses. */
public const MINECRAFT_VERSION_NETWORK = '1.21.40';
public const MINECRAFT_VERSION_NETWORK = '1.21.50';

public const LOGIN_PACKET = 0x01;
public const PLAY_STATUS_PACKET = 0x02;
Expand Down
12 changes: 10 additions & 2 deletions src/pocketmine/network/mcpe/protocol/ResourcePacksInfoPacket.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

use pocketmine\network\mcpe\NetworkSession;
use pocketmine\resourcepacks\ResourcePack;
use pocketmine\utils\UUID;
use function count;

class ResourcePacksInfoPacket extends DataPacket{
Expand All @@ -35,17 +36,21 @@ class ResourcePacksInfoPacket extends DataPacket{
public bool $mustAccept = false; //if true, forces client to choose between accepting packs or being disconnected
public bool $hasAddonPacks = false;
public bool $hasScripts = false; //if true, causes disconnect for any platform that doesn't support scripts yet
public ?UUID $worldTemplateUUID = null;
public string $worldTemplateVersion = "";
/** @var ResourcePack[] */
public array $resourcePackEntries = [];

protected function decodePayload() : void{
$this->mustAccept = $this->getBool();
$this->hasAddonPacks = $this->getBool();
$this->hasScripts = $this->getBool();
$this->worldTemplateUUID = $this->getUUID();
$this->worldTemplateVersion = $this->getString();

$resourcePackCount = $this->getLShort();
while($resourcePackCount-- > 0){
$this->getString();
$this->getUUID();
$this->getString();
$this->getLLong();
$this->getString();
Expand All @@ -62,9 +67,12 @@ protected function encodePayload() : void{
$this->putBool($this->mustAccept);
$this->putBool($this->hasAddonPacks);
$this->putBool($this->hasScripts);
$this->putUUID($this->worldTemplateUUID ??= new UUID());
$this->putString($this->worldTemplateVersion);

$this->putLShort(count($this->resourcePackEntries));
foreach($this->resourcePackEntries as $entry){
$this->putString($entry->getPackId());
$this->putUUID(UUID::fromString($entry->getPackId()));
$this->putString($entry->getPackVersion());
$this->putLLong($entry->getPackSize());
$this->putString(""); //TODO: encryption key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,21 @@

final class ItemStackResponseSlotInfo{

/** @var int */
private $slot;
/** @var int */
private $hotbarSlot;
/** @var int */
private $count;
/** @var int */
private $itemStackId;
/** @var string */
private $customName;
/** @var int */
private $durabilityCorrection;
private int $slot;
private int $hotbarSlot;
private int $count;
private int $itemStackId;
private string $customName;
private string $filteredCustomName;
private int $durabilityCorrection;

public function __construct(int $slot, int $hotbarSlot, int $count, int $itemStackId, string $customName, int $durabilityCorrection){
public function __construct(int $slot, int $hotbarSlot, int $count, int $itemStackId, string $customName, string $filteredCustomName, int $durabilityCorrection){
$this->slot = $slot;
$this->hotbarSlot = $hotbarSlot;
$this->count = $count;
$this->itemStackId = $itemStackId;
$this->customName = $customName;
$this->filteredCustomName = $filteredCustomName;
$this->durabilityCorrection = $durabilityCorrection;
}

Expand All @@ -67,8 +63,9 @@ public static function read(NetworkBinaryStream $in) : self{
$count = $in->getByte();
$itemStackId = $in->readGenericTypeNetworkId();
$customName = $in->getString();
$filteredCustomName = $in->getString();
$durabilityCorrection = $in->getVarInt();
return new self($slot, $hotbarSlot, $count, $itemStackId, $customName, $durabilityCorrection);
return new self($slot, $hotbarSlot, $count, $itemStackId, $customName, $filteredCustomName, $durabilityCorrection);
}

public function write(NetworkBinaryStream $out) : void{
Expand All @@ -77,6 +74,7 @@ public function write(NetworkBinaryStream $out) : void{
$out->putByte($this->count);
$out->writeGenericTypeNetworkId($this->itemStackId);
$out->putString($this->customName);
$out->putString($this->filteredCustomName);
$out->putVarInt($this->durabilityCorrection);
}
}
Binary file modified src/pocketmine/resources/vanilla/biome_definitions.nbt
Binary file not shown.
Loading
Loading