-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
197 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#> plane-data:b-17g/b-17g-position | ||
# | ||
# plane-seatの位置を調整する | ||
# | ||
# @input | ||
# executer @e[tag=plane-root] | ||
# | ||
# @within plane:position/position | ||
|
||
#seatの位置修正 | ||
execute at @s[tag=has-rider] run tp @e[tag=plane-seat,tag=target-parts,distance=..32] ^ ^1.5 ^-5 | ||
execute at @s[tag=!has-rider] run tp @e[tag=plane-seat,tag=target-parts,distance=..32] ^ ^ ^6.5 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#> plane-data:b-17g/b-17g | ||
# | ||
# @within | ||
# plane:** | ||
# weapon:** | ||
#declare tag b17g-hitbox | ||
#declare tag b17g-body | ||
|
||
#> public | ||
# @public | ||
#declare tag b17g | ||
|
||
#> private | ||
# @private | ||
#declare tag plane-rightwing #右主翼を示す | ||
#declare tag plane-leftwing #左主翼を示す | ||
#declare tag plane-tail #機体後部を示す | ||
#declare tag plane-init #初期化処理中のエンティティであることを示す | ||
|
||
#機体召喚 | ||
summon armor_stand ~ ~ ~ {Invisible:1b,NoGravity:0b,Tags:[b17g,plane-init,plane-root,plane,entity-nohit,need-calc-offset,delay-rotation,tier3,bomber],DisabledSlots:256} | ||
summon armor_stand ~ ~ ~ {Invisible:1b,NoGravity:0b,Tags:[b17g,plane-init,plane,entity-nohit,plane-seat],Passengers:[{id:"donkey",Attributes:[{Name:"generic.max_health",Base:20d}],Invulnerable:1b,DeathLootTable:"minecraft:entities/bat",SaddleItem:{id:"minecraft:saddle",Count:1b},Tame:1b,NoAI:1b,Silent:1b,ChestedHorse:1b,ActiveEffects:[{Id:14b,Amplifier:0b,Duration:1000000,ShowParticles:0b}],Tags:[b17g,plane-init,plane,plane-seat,entity-nohit]}],DisabledSlots:256} | ||
summon armor_stand ~ ~ ~ {Tags:["plane-body","b17g",plane-init,plane,has-model,model-changeable,plane-parts,entity-nohit],NoGravity:1b,Invisible:1b,HandItems:[{id:"minecraft:diamond_sword",Count:1b,tag:{CustomModelData:150,Unbreakable:1b}},{}],Pose:{LeftArm:[0f,0f,0f],RightArm:[0f,0f,0f]},DisabledSlots:256} | ||
summon armor_stand ~ ~ ~ {Tags:["plane-tail","b17g",plane-init,plane,has-model,model-changeable,plane-parts,entity-nohit],NoGravity:1b,Invisible:1b,HandItems:[{id:"minecraft:diamond_sword",Count:1b,tag:{CustomModelData:153,Unbreakable:1b}},{}],Pose:{LeftArm:[0f,0f,0f],RightArm:[0f,0f,0f]},DisabledSlots:256} | ||
summon armor_stand ~ ~ ~ {Tags:["plane-rightwing","b17g",plane-init,plane,has-model,model-changeable,has-offset,plane-parts,entity-nohit],NoGravity:1b,Invisible:1b,HandItems:[{id:"minecraft:diamond_sword",Count:1b,tag:{CustomModelData:156,Unbreakable:1b}},{}],Pose:{LeftArm:[0f,0f,0f],RightArm:[0f,0f,0f]},DisabledSlots:256} | ||
summon armor_stand ~ ~ ~ {Tags:["plane-leftwing","b17g",plane-init,plane,has-model,model-changeable,has-offset,plane-parts,entity-nohit],NoGravity:1b,Invisible:1b,HandItems:[{id:"minecraft:diamond_sword",Count:1b,tag:{CustomModelData:159,Unbreakable:1b}},{}],Pose:{LeftArm:[0f,0f,0f],RightArm:[0f,0f,0f]},DisabledSlots:256} | ||
|
||
#hitbox召喚 | ||
summon armor_stand ~ ~ ~ {Tags:["b17g",plane-init,plane,plane-hitbox,body,offset-base],NoGravity:1b,Invisible:1b,Marker:1b,Health:80f,Attributes:[{Name:"generic.max_health",Base:80d}]} | ||
summon armor_stand ~ ~ ~ {Tags:["b17g",plane-init,plane,has-offset,plane-hitbox,engine-r,engine,offset-base],NoGravity:1b,Invisible:1b,Marker:1b,Health:60f,Attributes:[{Name:"generic.max_health",Base:60d}]} | ||
summon armor_stand ~ ~ ~ {Tags:["b17g",plane-init,plane,has-offset,plane-hitbox,engine-l,engine,offset-base],NoGravity:1b,Invisible:1b,Marker:1b,Health:60f,Attributes:[{Name:"generic.max_health",Base:60d}]} | ||
summon armor_stand ~ ~ ~ {Tags:["b17g",plane-init,plane,has-offset,plane-hitbox,aileron-r,aileron,offset-base],NoGravity:1b,Invisible:1b,Marker:1b,Health:70f,Attributes:[{Name:"generic.max_health",Base:70d}]} | ||
summon armor_stand ~ ~ ~ {Tags:["b17g",plane-init,plane,has-offset,plane-hitbox,aileron-l,aileron,offset-base],NoGravity:1b,Invisible:1b,Marker:1b,Health:70f,Attributes:[{Name:"generic.max_health",Base:70d}]} | ||
summon armor_stand ~ ~ ~ {Tags:["b17g",plane-init,plane,has-offset,plane-hitbox,elevator-r,elevetor,offset-base],NoGravity:1b,Invisible:1b,Marker:1b,Health:60f,Attributes:[{Name:"generic.max_health",Base:60d}]} | ||
summon armor_stand ~ ~ ~ {Tags:["b17g",plane-init,plane,has-offset,plane-hitbox,elevator-l,elevetor,offset-base],NoGravity:1b,Invisible:1b,Marker:1b,Health:60f,Attributes:[{Name:"generic.max_health",Base:60d}]} | ||
summon armor_stand ~ ~ ~ {Tags:["b17g",plane-init,plane,has-offset,plane-hitbox,radder,offset-base],NoGravity:1b,Invisible:1b,Marker:1b,Health:70f,Attributes:[{Name:"generic.max_health",Base:70d}]} | ||
summon armor_stand ~ ~ ~ {Tags:["b17g",plane-init,plane,has-offset,plane-hitbox,cockpit,offset-base],NoGravity:1b,Invisible:1b,Marker:1b,Health:1024f,Attributes:[{Name:"generic.max_health",Base:1024d}]} | ||
|
||
#ID付与 | ||
execute as @e[tag=plane-init,tag=plane-root,distance=..1,limit=1] at @s run function plane:summon/set-plane-id | ||
|
||
#ohmydat呼び出し | ||
execute as @e[tag=plane-init,tag=plane-root,distance=..1] run function oh_my_dat:please | ||
|
||
#飛行機データのストレージ設定 | ||
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].plane-data set from storage voxel-planes:plane b17g.plane-data | ||
|
||
#飛行スコアセット | ||
data remove storage voxel-planes:input input | ||
data modify storage voxel-planes:input input set from storage voxel-planes:plane b17g.plane-data | ||
execute as @e[tag=plane-init,tag=plane-root,distance=..1] run function plane-data:util/set-plane-score | ||
execute as @e[tag=plane-init,tag=plane-hitbox,distance=..1] run function plane-data:util/set-hitbox-data | ||
execute as @e[tag=plane-init,tag=has-model,tag=has-offset,distance=..1] run function plane-data:util/set-model-offset | ||
execute as @e[type=donkey,tag=plane-init,distance=..1] run function plane-data:util/set-plane-maxhp | ||
|
||
#武器データセット | ||
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].weapon set value {current-weapon-index:0} | ||
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].weapon.weapon-list set value [] | ||
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].weapon.weapon-list append from storage voxel-planes:weapon b17g.base.bomb | ||
|
||
#プレイヤーと同じAngYにする | ||
schedule function plane:summon/util/delay-rotation 2 | ||
|
||
#処理終了 | ||
tag @e[tag=plane-init,distance=..1] remove plane-init |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#入力 entity:ki21-root pos:@s | ||
#処理 ki21をアイテム化 | ||
|
||
#アイテムをsummon | ||
loot spawn ~ ~ ~ loot plane-data:ki-49 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#> plane-data:b-17g/b17g-equip | ||
# | ||
# 装備の変更処理 | ||
# @input | ||
# executer @e[tag=plane-root] | ||
# | ||
# @within function plane:equip/equip-manager | ||
|
||
#> private | ||
# @private | ||
#declare score_holder #500kg #500kg爆弾アイテムを装備していることを示す | ||
#declare score_holder #kill-weapon #現在装備中の爆弾を消すべきであるとのフラグ | ||
#declare score_holder #remove-500kg #800kg爆弾を外したことを示す | ||
#declare score_holder #remove-250kg #250kg爆弾を外したことを示す | ||
|
||
#装備品チェック | ||
execute store success score #500kg vp.reg1 if entity @e[type=minecraft:donkey,tag=target-parts,nbt={Items:[{tag:{item-type:500kg-bomb}}]},distance=..30] | ||
|
||
#ストレージリセット | ||
data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].weapon.weapon-list[{data:{type:bomb}}] set from storage voxel-planes:weapon b17g.base.bomb | ||
|
||
#weapon-listに武器データアペンド | ||
execute if score #500kg vp.reg1 matches 1.. run data remove storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].weapon.weapon-list[{data:{type:bomb}}].data.bombs[{kind:250kg}] | ||
execute if score #500kg vp.reg1 matches 1.. run data modify storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].weapon.weapon-list[{data:{type:bomb}}].data.bombs append from storage voxel-planes:weapon b17g.additional.500kg[] | ||
|
||
#弾数変更 | ||
execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].weapon.weapon-list[{data:{type:bomb}}].data.current-ammunition int 1 run data get storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].weapon.weapon-list[{data:{type:bomb}}].data.bombs | ||
execute store result storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].weapon.weapon-list[{data:{type:bomb}}].data.max-ammunition int 1 run data get storage oh_my_dat: _[-4][-4][-4][-4][-4][-4][-4][-4].weapon.weapon-list[{data:{type:bomb}}].data.bombs | ||
|
||
#不要爆弾削除 | ||
execute unless score #500kg vp.reg1 matches 1.. if entity @e[tag=target-parts,tag=500kg,tag=normal,distance=..32] run kill @e[tag=target-parts,tag=plane-bomb] | ||
execute if score #500kg vp.reg1 matches 1.. if entity @e[tag=target-parts,tag=250kg,tag=normal,distance=..32] run kill @e[tag=target-parts,tag=plane-bomb] | ||
|
||
#ステータス変更 | ||
#装備に応じて右記ステータス変更:最高速度 巡航速度 旋回力 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#> plane-data:b-17g/b17g-storage | ||
# | ||
# @within function constructor:addstorage | ||
|
||
data modify storage voxel-planes:weapon b17g set value {base:{},additional:{}} | ||
data modify storage voxel-planes:plane b17g set value {} | ||
|
||
#飛行機データセット | ||
data modify storage voxel-planes:plane b17g.plane-data.plane-type set value fighter | ||
data modify storage voxel-planes:plane b17g.plane-data.tier set value 3 | ||
data modify storage voxel-planes:plane b17g.plane-data.flight-model.weight set value 9680 | ||
data modify storage voxel-planes:plane b17g.plane-data.flight-model.speed set value {max-speed:492f,cruise-speed:350f,climb-rate:6.1f,stall-speed:175f} | ||
data modify storage voxel-planes:plane b17g.plane-data.flight-model.engine set value {type:recipro,horse-power:1520f,number:2} | ||
data modify storage voxel-planes:plane b17g.plane-data.flight-model.turn-rate set value {pitch:25f,yaw:19f,roll:18f} | ||
data modify storage voxel-planes:plane b17g.plane-data.flight-model.energy-loss-rate set value 0.6 | ||
data modify storage voxel-planes:plane b17g.plane-data.model-data.body set value {parking-cmd:150,rolling-cmd:151,flying-cmd:152} | ||
data modify storage voxel-planes:plane b17g.plane-data.model-data.tail set value {parking-cmd:153,rolling-cmd:153,flying-cmd:154} | ||
data modify storage voxel-planes:plane b17g.plane-data.model-data.rightwing set value {parking-cmd:155,rolling-cmd:156,flying-cmd:156,offset:[-3.1d,0d,0d]} | ||
data modify storage voxel-planes:plane b17g.plane-data.model-data.leftwing set value {parking-cmd:158,rolling-cmd:159,flying-cmd:159,offset:[3.1d,0d,0d]} | ||
data modify storage voxel-planes:plane b17g.plane-data.model-data.landing-pitch set value -7.0 | ||
data modify storage voxel-planes:plane b17g.plane-data.hp set value {engine:60d,body:80d,aileron:70d,elevetor:60d,radder:70d} | ||
data modify storage voxel-planes:plane b17g.plane-data.hitbox set value {} | ||
data modify storage voxel-planes:plane b17g.plane-data.hitbox merge value {engine-r:{offset:[-2.6d,0.25d,6.3d]},engine-l:{offset:[2.6d,0.25d,6.3d]}} | ||
data modify storage voxel-planes:plane b17g.plane-data.hitbox merge value {aileron-r:{offset:[-7.4d,0.8d,3.2d]},aileron-l:{offset:[7.4d,0.8d,3.2d]}} | ||
data modify storage voxel-planes:plane b17g.plane-data.hitbox merge value {elevator-r:{offset:[-2.3d,0.6d,-5.7d]},elevator-l:{offset:[2.3d,0.6d,-5.7d]}} | ||
data modify storage voxel-planes:plane b17g.plane-data.hitbox merge value {radder:{offset:[0d,2.4d,-5.8d]}} | ||
data modify storage voxel-planes:plane b17g.plane-data.hitbox merge value {cockpit:{offset:[0d,1.1d,6.6d]}} | ||
|
||
#デフォルト爆弾データセット | ||
data modify storage voxel-planes:weapon b17g.base.bomb.data set value {name:bomb,type:bomb,max-ammunition:4,current-ammunition:4,max-reload:600,current-reload:0,bombs:[]} | ||
data modify storage voxel-planes:weapon b17g.base.bomb.data.bombs append value {kind:250kg,type:normal,offset:[-0.5d,0d,4d],damage:1250,weight:250,cmd:77} | ||
data modify storage voxel-planes:weapon b17g.base.bomb.data.bombs append value {kind:250kg,type:normal,offset:[0.5d,0d,4d],damage:1250,weight:250,cmd:77} | ||
data modify storage voxel-planes:weapon b17g.base.bomb.data.bombs append value {kind:250kg,type:normal,offset:[-0.5d,0d,2d],damage:1250,weight:250,cmd:77} | ||
data modify storage voxel-planes:weapon b17g.base.bomb.data.bombs append value {kind:250kg,type:normal,offset:[0.5d,0d,2d],damage:1250,weight:250,cmd:77} | ||
data modify storage voxel-planes:weapon b17g.additional.500kg set value [{kind:500kg,type:normal,offset:[0d,0d,1d],damage:2500,weight:500,cmd:118}] | ||
data modify storage voxel-planes:weapon b17g.additional.500kg append value {kind:500kg,type:normal,offset:[0d,0d,4d],damage:2500,weight:500,cmd:118} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"pools": [ | ||
{ | ||
"rolls": 1, | ||
"entries": [ | ||
{ | ||
"type": "item", | ||
"name": "minecraft:bat_spawn_egg", | ||
"weight": 1, | ||
"functions": [ | ||
{ | ||
"function":"set_name", | ||
"name":{"text":"B-17G Flying Fortress"} | ||
}, | ||
{ | ||
"function":"set_lore", | ||
"lore":[ | ||
{"translate":"爆撃機","color":"green","bold":true}, | ||
{"translate":" 武装"}, | ||
{"translate":" 250kg爆弾×4","color":"blue"} | ||
] | ||
}, | ||
{ | ||
"function": "minecraft:set_nbt", | ||
"tag":"{item-type:b-17g,tier:3,CustomModelData:14,CanPlaceOn:[\"minecraft:stone\",\"minecraft:grass_path\"],HideFlags:18,EntityTag:{Silent:1b,Tags:[b17g-spawner,plane-spawner],ActiveEffects:[{Id:14b,Amplifier:1b,Duration:100,ShowParticles:0b}]}}" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters