ScriptAPI v1.20.30 の主な変更点
-
モジュールバージョンの更新
- @minecraft/server:
1.6.0-beta
- @minecraft/server:
1.5.0
- @minecraft/server:
-
PlayerBreakBlockBeforeイベント追加
-
PlayerPlaceBlockBeforeイベント追加
石を壊した時イベントをキャンセルする例:
1world.beforeEvents.playerBreakBlock.subscribe(event => { 2 if (event.block.typeId === 'minecraft:stone') { 3 event.cancel = true; 4 } 5});
-
BlockBreakAfterEvent → PlayerBreakBlockAfterEvent
-
BlockPlaceAfterEvent → PlayerPlaceBlockAfterEvent
-
ProjectileHitイベント削除
- 代わりに ProjectileHitBlock, ProjectileHitEntityイベントが追加
-
EntityEquipmentComponent → EntityEquippableComponent
- 新コンポーネントID:
minecraft:equippable
- 新コンポーネントID:
-
EquipmentSlotの値が先頭大文字になった
- ex:
EquipmentSlot.chest
→EquipmentSlot.Chest
,"chest"
→"Chest"
- ex:
-
Entity.isSleeping追加
-
Entity.remove() 追加: エンティティを即時デスポーンさせる
-
Player.isEmoting 追加
-
Dimension.heightRange 追加
-
setLoreでアイテムのLore(説明文)に入れられる文字数が制限された
- 20行x50文字が最大
-
Block.isSolid(), .isLiquid(), .isAir() がメソッドからプロパティに変更された
- ex:
block.isAir()
→block.isAir
- ex:
-
アイテム系イベントの
source
に常にPlayerが入るようになった
test.jsworld.scoreboard.getObjective('obj').addScore(entity, 10); // スコアを10追加
- MinecraftEntityTypes削除
- MinecraftItemTypes削除
- MinecraftBlockTypes削除
Edit on Github