mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-04 02:52:25 +00:00
Merge branch 'stable' into minor-next
This commit is contained in:
commit
2654fb294b
8
.github/workflows/build-docker-image.yml
vendored
8
.github/workflows/build-docker-image.yml
vendored
@ -53,7 +53,7 @@ jobs:
|
||||
run: echo NAME=$(echo "${GITHUB_REPOSITORY,,}") >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build image for tag
|
||||
uses: docker/build-push-action@v4.1.0
|
||||
uses: docker/build-push-action@v4.1.1
|
||||
with:
|
||||
push: true
|
||||
context: ./pocketmine-mp
|
||||
@ -66,7 +66,7 @@ jobs:
|
||||
|
||||
- name: Build image for major tag
|
||||
if: steps.channel.outputs.CHANNEL == 'stable'
|
||||
uses: docker/build-push-action@v4.1.0
|
||||
uses: docker/build-push-action@v4.1.1
|
||||
with:
|
||||
push: true
|
||||
context: ./pocketmine-mp
|
||||
@ -79,7 +79,7 @@ jobs:
|
||||
|
||||
- name: Build image for minor tag
|
||||
if: steps.channel.outputs.CHANNEL == 'stable'
|
||||
uses: docker/build-push-action@v4.1.0
|
||||
uses: docker/build-push-action@v4.1.1
|
||||
with:
|
||||
push: true
|
||||
context: ./pocketmine-mp
|
||||
@ -92,7 +92,7 @@ jobs:
|
||||
|
||||
- name: Build image for latest tag
|
||||
if: steps.channel.outputs.CHANNEL == 'stable'
|
||||
uses: docker/build-push-action@v4.1.0
|
||||
uses: docker/build-push-action@v4.1.1
|
||||
with:
|
||||
push: true
|
||||
context: ./pocketmine-mp
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 8cb2a2b2181fd42192665985696ea157aa4f731e
|
||||
Subproject commit 2a21c579007a8fd7244f9faad498cd1c8c33004c
|
@ -467,7 +467,8 @@ class Block{
|
||||
/**
|
||||
* Do actions when interacted by Item. Returns if it has done anything
|
||||
*
|
||||
* @param Item[] &$returnedItems Items to be added to the target's inventory (or dropped, if the inventory is full)
|
||||
* @param Vector3 $clickVector Exact position where the click occurred, relative to the block's integer position
|
||||
* @param Item[] &$returnedItems Items to be added to the target's inventory (or dropped, if the inventory is full)
|
||||
*/
|
||||
public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null, array &$returnedItems = []) : bool{
|
||||
return false;
|
||||
|
@ -64,7 +64,7 @@ class CakeWithCandle extends BaseCake{
|
||||
}
|
||||
|
||||
public function getPickedItem(bool $addUserData = false) : Item{
|
||||
return VanillaBlocks::CAKE()->getPickedItem($addUserData);
|
||||
return VanillaBlocks::CAKE()->asItem();
|
||||
}
|
||||
|
||||
public function getResidue() : Block{
|
||||
|
@ -40,6 +40,7 @@ final class BlockStateUpgradeSchemaModelBlockRemap{
|
||||
/**
|
||||
* @var BlockStateUpgradeSchemaModelTag[]|null
|
||||
* @phpstan-var array<string, BlockStateUpgradeSchemaModelTag>|null
|
||||
* @required
|
||||
*/
|
||||
public ?array $newState;
|
||||
|
||||
|
@ -43,7 +43,12 @@ class BlockPlaceEvent extends Event implements Cancellable{
|
||||
protected BlockTransaction $transaction,
|
||||
protected Block $blockAgainst,
|
||||
protected Item $item
|
||||
){}
|
||||
){
|
||||
$world = $this->blockAgainst->getPosition()->getWorld();
|
||||
foreach($this->transaction->getBlocks() as [$x, $y, $z, $block]){
|
||||
$block->position($world, $x, $y, $z);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the player who is placing the block.
|
||||
|
@ -1129,7 +1129,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the gamemode, and if needed, kicks the Player.
|
||||
* Sets the provided gamemode.
|
||||
*/
|
||||
public function setGamemode(GameMode $gm) : bool{
|
||||
if($this->gamemode->equals($gm)){
|
||||
|
@ -2032,6 +2032,12 @@ class World implements ChunkManager{
|
||||
|
||||
if($clickVector === null){
|
||||
$clickVector = new Vector3(0.0, 0.0, 0.0);
|
||||
}else{
|
||||
$clickVector = new Vector3(
|
||||
min(1.0, max(0.0, $clickVector->x)),
|
||||
min(1.0, max(0.0, $clickVector->y)),
|
||||
min(1.0, max(0.0, $clickVector->z))
|
||||
);
|
||||
}
|
||||
|
||||
if(!$this->isInWorld($blockReplace->getPosition()->x, $blockReplace->getPosition()->y, $blockReplace->getPosition()->z)){
|
||||
|
@ -43,6 +43,7 @@ use pocketmine\world\WorldCreationOptions;
|
||||
use Symfony\Component\Filesystem\Path;
|
||||
use function array_map;
|
||||
use function file_put_contents;
|
||||
use function sprintf;
|
||||
use function strlen;
|
||||
use function substr;
|
||||
use function time;
|
||||
@ -154,12 +155,18 @@ class BedrockWorldData extends BaseNbtWorldData{
|
||||
}
|
||||
|
||||
$version = $worldData->getInt(self::TAG_STORAGE_VERSION, Limits::INT32_MAX);
|
||||
if($version === Limits::INT32_MAX){
|
||||
throw new CorruptedWorldException(sprintf("Missing '%s' tag in level.dat", self::TAG_STORAGE_VERSION));
|
||||
}
|
||||
if($version > self::CURRENT_STORAGE_VERSION){
|
||||
throw new UnsupportedWorldFormatException("LevelDB world format version $version is currently unsupported");
|
||||
}
|
||||
//StorageVersion is rarely updated - instead, the game relies on the NetworkVersion tag, which is synced with
|
||||
//the network protocol version for that version.
|
||||
$protocolVersion = $worldData->getInt(self::TAG_NETWORK_VERSION, Limits::INT32_MAX);
|
||||
if($protocolVersion === Limits::INT32_MAX){
|
||||
throw new CorruptedWorldException(sprintf("Missing '%s' tag in level.dat", self::TAG_NETWORK_VERSION));
|
||||
}
|
||||
if($protocolVersion > self::CURRENT_STORAGE_NETWORK_VERSION){
|
||||
throw new UnsupportedWorldFormatException("LevelDB world protocol version $protocolVersion is currently unsupported");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user