mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Merge branch 'minor-next' of github.com:pmmp/PocketMine-MP into major-next
This commit is contained in:
@ -25,5 +25,7 @@ namespace pocketmine\item;
|
||||
|
||||
class Bowl extends Item{
|
||||
|
||||
//TODO: check fuel
|
||||
public function getFuelTime() : int{
|
||||
return 200;
|
||||
}
|
||||
}
|
||||
|
@ -205,6 +205,7 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->registerBlock("cake", fn() => Blocks::CAKE());
|
||||
$result->registerBlock("cake_block", fn() => Blocks::CAKE());
|
||||
$result->registerBlock("calcite", fn() => Blocks::CALCITE());
|
||||
$result->registerBlock("campfire", fn() => Blocks::CAMPFIRE());
|
||||
$result->registerBlock("candle", fn() => Blocks::CANDLE());
|
||||
$result->registerBlock("carpet", fn() => Blocks::CARPET());
|
||||
$result->registerBlock("carrot_block", fn() => Blocks::CARROTS());
|
||||
@ -239,6 +240,8 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->registerBlock("chiseled_red_sandstone", fn() => Blocks::CHISELED_RED_SANDSTONE());
|
||||
$result->registerBlock("chiseled_sandstone", fn() => Blocks::CHISELED_SANDSTONE());
|
||||
$result->registerBlock("chiseled_stone_bricks", fn() => Blocks::CHISELED_STONE_BRICKS());
|
||||
$result->registerBlock("chiseled_tuff", fn() => Blocks::CHISELED_TUFF());
|
||||
$result->registerBlock("chiseled_tuff_bricks", fn() => Blocks::CHISELED_TUFF_BRICKS());
|
||||
$result->registerBlock("chorus_flower", fn() => Blocks::CHORUS_FLOWER());
|
||||
$result->registerBlock("chorus_plant", fn() => Blocks::CHORUS_PLANT());
|
||||
$result->registerBlock("clay_block", fn() => Blocks::CLAY());
|
||||
@ -897,6 +900,10 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->registerBlock("polished_granite", fn() => Blocks::POLISHED_GRANITE());
|
||||
$result->registerBlock("polished_granite_slab", fn() => Blocks::POLISHED_GRANITE_SLAB());
|
||||
$result->registerBlock("polished_granite_stairs", fn() => Blocks::POLISHED_GRANITE_STAIRS());
|
||||
$result->registerBlock("polished_tuff", fn() => Blocks::POLISHED_TUFF());
|
||||
$result->registerBlock("polished_tuff_slab", fn() => Blocks::POLISHED_TUFF_SLAB());
|
||||
$result->registerBlock("polished_tuff_stairs", fn() => Blocks::POLISHED_TUFF_STAIRS());
|
||||
$result->registerBlock("polished_tuff_wall", fn() => Blocks::POLISHED_TUFF_WALL());
|
||||
$result->registerBlock("poppy", fn() => Blocks::POPPY());
|
||||
$result->registerBlock("portal", fn() => Blocks::NETHER_PORTAL());
|
||||
$result->registerBlock("portal_block", fn() => Blocks::NETHER_PORTAL());
|
||||
@ -1003,6 +1010,7 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->registerBlock("snow", fn() => Blocks::SNOW());
|
||||
$result->registerBlock("snow_block", fn() => Blocks::SNOW());
|
||||
$result->registerBlock("snow_layer", fn() => Blocks::SNOW_LAYER());
|
||||
$result->registerBlock("soul_campfire", fn() => Blocks::SOUL_CAMPFIRE());
|
||||
$result->registerBlock("soul_lantern", fn() => Blocks::SOUL_LANTERN());
|
||||
$result->registerBlock("soul_sand", fn() => Blocks::SOUL_SAND());
|
||||
$result->registerBlock("soul_soil", fn() => Blocks::SOUL_SOIL());
|
||||
@ -1096,6 +1104,13 @@ final class StringToItemParser extends StringToTParser{
|
||||
$result->registerBlock("trunk", fn() => Blocks::OAK_PLANKS());
|
||||
$result->registerBlock("trunk2", fn() => Blocks::ACACIA_LOG()->setStripped(false));
|
||||
$result->registerBlock("tuff", fn() => Blocks::TUFF());
|
||||
$result->registerBlock("tuff_bricks", fn() => Blocks::TUFF_BRICKS());
|
||||
$result->registerBlock("tuff_brick_slab", fn() => Blocks::TUFF_BRICK_SLAB());
|
||||
$result->registerBlock("tuff_brick_stairs", fn() => Blocks::TUFF_BRICK_STAIRS());
|
||||
$result->registerBlock("tuff_brick_wall", fn() => Blocks::TUFF_BRICK_WALL());
|
||||
$result->registerBlock("tuff_slab", fn() => Blocks::TUFF_SLAB());
|
||||
$result->registerBlock("tuff_stairs", fn() => Blocks::TUFF_STAIRS());
|
||||
$result->registerBlock("tuff_wall", fn() => Blocks::TUFF_WALL());
|
||||
$result->registerBlock("twisting_vines", fn() => Blocks::TWISTING_VINES());
|
||||
$result->registerBlock("underwater_tnt", fn() => Blocks::TNT()->setWorksUnderwater(true));
|
||||
$result->registerBlock("underwater_torch", fn() => Blocks::UNDERWATER_TORCH());
|
||||
|
@ -591,12 +591,12 @@ final class VanillaItems{
|
||||
}
|
||||
});
|
||||
self::register("squid_spawn_egg", new class(new IID(Ids::SQUID_SPAWN_EGG), "Squid Spawn Egg") extends SpawnEgg{
|
||||
public function createEntity(World $world, Vector3 $pos, float $yaw, float $pitch) : Entity{
|
||||
protected function createEntity(World $world, Vector3 $pos, float $yaw, float $pitch) : Entity{
|
||||
return new Squid(Location::fromObject($pos, $world, $yaw, $pitch));
|
||||
}
|
||||
});
|
||||
self::register("villager_spawn_egg", new class(new IID(Ids::VILLAGER_SPAWN_EGG), "Villager Spawn Egg") extends SpawnEgg{
|
||||
public function createEntity(World $world, Vector3 $pos, float $yaw, float $pitch) : Entity{
|
||||
protected function createEntity(World $world, Vector3 $pos, float $yaw, float $pitch) : Entity{
|
||||
return new Villager(Location::fromObject($pos, $world, $yaw, $pitch));
|
||||
}
|
||||
});
|
||||
|
@ -56,6 +56,7 @@ final class AvailableEnchantmentRegistry{
|
||||
$this->register(Enchantments::PROJECTILE_PROTECTION(), [Tags::ARMOR], []);
|
||||
$this->register(Enchantments::THORNS(), [Tags::CHESTPLATE], [Tags::HELMET, Tags::LEGGINGS, Tags::BOOTS]);
|
||||
$this->register(Enchantments::RESPIRATION(), [Tags::HELMET], []);
|
||||
$this->register(Enchantments::AQUA_AFFINITY(), [Tags::HELMET], []);
|
||||
$this->register(Enchantments::SHARPNESS(), [Tags::SWORD, Tags::AXE], []);
|
||||
$this->register(Enchantments::KNOCKBACK(), [Tags::SWORD], []);
|
||||
$this->register(Enchantments::FIRE_ASPECT(), [Tags::SWORD], []);
|
||||
|
@ -52,6 +52,7 @@ final class StringToEnchantmentParser extends StringToTParser{
|
||||
$result->register("protection", fn() => VanillaEnchantments::PROTECTION());
|
||||
$result->register("punch", fn() => VanillaEnchantments::PUNCH());
|
||||
$result->register("respiration", fn() => VanillaEnchantments::RESPIRATION());
|
||||
$result->register("aqua_affinity", fn() => VanillaEnchantments::AQUA_AFFINITY());
|
||||
$result->register("sharpness", fn() => VanillaEnchantments::SHARPNESS());
|
||||
$result->register("silk_touch", fn() => VanillaEnchantments::SILK_TOUCH());
|
||||
$result->register("swift_sneak", fn() => VanillaEnchantments::SWIFT_SNEAK());
|
||||
|
@ -33,6 +33,7 @@ use pocketmine\utils\RegistryTrait;
|
||||
* @see build/generate-registry-annotations.php
|
||||
* @generate-registry-docblock
|
||||
*
|
||||
* @method static Enchantment AQUA_AFFINITY()
|
||||
* @method static ProtectionEnchantment BLAST_PROTECTION()
|
||||
* @method static Enchantment EFFICIENCY()
|
||||
* @method static ProtectionEnchantment FEATHER_FALLING()
|
||||
@ -130,6 +131,15 @@ final class VanillaEnchantments{
|
||||
fn(int $level) : int => 10 * $level,
|
||||
30
|
||||
));
|
||||
self::register("AQUA_AFFINITY", new Enchantment(
|
||||
KnownTranslationFactory::enchantment_waterWorker(),
|
||||
Rarity::RARE,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
null,
|
||||
40
|
||||
));
|
||||
|
||||
self::register("SHARPNESS", new SharpnessEnchantment(
|
||||
KnownTranslationFactory::enchantment_damage_all(),
|
||||
|
Reference in New Issue
Block a user