Skip to content
This repository has been archived by the owner on Oct 26, 2024. It is now read-only.

Commit

Permalink
バグ修正、一部イベントの名前空間変更
Browse files Browse the repository at this point in the history
  • Loading branch information
gensokyo-kenken committed Jan 6, 2024
1 parent 50a9a1b commit 5f99bc4
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 33 deletions.
8 changes: 4 additions & 4 deletions TCMB(B)/animation_controllers/tcmb_item_controller.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"run":{
"on_entry":[
"/execute as @p at @s run scriptevent tcmb_mobile_item:notch_power",
"/execute as @p at @s run scriptevent tcmb_mobile_items:notch_power",
"@s delete"
]
}
Expand All @@ -25,7 +25,7 @@
},
"run":{
"on_entry":[
"/execute as @p at @s run scriptevent tcmb_mobile_item:notch_neutral",
"/execute as @p at @s run scriptevent tcmb_mobile_items:notch_neutral",
"@s delete"
]
}
Expand All @@ -40,7 +40,7 @@
},
"run":{
"on_entry":[
"/execute as @p at @s run scriptevent tcmb_mobile_item:notch_break",
"/execute as @p at @s run scriptevent tcmb_mobile_items:notch_break",
"@s delete"
]
}
Expand All @@ -55,7 +55,7 @@
},
"run":{
"on_entry":[
"/execute as @p at @s run scriptevent tcmb_mobile_item:notch_eb",
"/execute as @p at @s run scriptevent tcmb_mobile_items:notch_eb",
"@s delete"
]
}
Expand Down
24 changes: 12 additions & 12 deletions TCMB(B)/animations/tcmb_animation.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"loop": true,
"timeline": {
"0.0": [
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb:speed down",
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb_minecart_engine:speed down",
"/function train_connect",
"/playanimation @e[tag=body,r=1] eb eb 32767",
"@s tasc_remove",
Expand All @@ -22,7 +22,7 @@
"loop": true,
"timeline": {
"0.0": [
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb:speed down",
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb_minecart_engine:speed down",
"/function train_connect",
"/playanimation @e[tag=body,r=1] b7 b7 32767"
]
Expand All @@ -33,7 +33,7 @@
"loop": true,
"timeline": {
"0.0": [
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb:speed down",
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb_minecart_engine:speed down",
"/function train_connect",
"/playanimation @e[tag=body,r=1] b6 b6 32767"
]
Expand All @@ -44,7 +44,7 @@
"loop": true,
"timeline": {
"0.0": [
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb:speed down",
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb_minecart_engine:speed down",
"/function train_connect",
"/playanimation @e[tag=body,r=1] b5 b5 32767"
]
Expand All @@ -55,7 +55,7 @@
"loop": true,
"timeline": {
"0.0": [
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb:speed down",
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb_minecart_engine:speed down",
"/function train_connect",
"/playanimation @e[tag=body,r=1] b4 b4 32767"
]
Expand All @@ -66,7 +66,7 @@
"loop": true,
"timeline": {
"0.0": [
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb:speed down",
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb_minecart_engine:speed down",
"/function train_connect",
"/playanimation @e[tag=body,r=1] b3 b3 32767"
]
Expand All @@ -77,7 +77,7 @@
"loop": true,
"timeline": {
"0.0": [
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb:speed down",
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb_minecart_engine:speed down",
"/function train_connect",
"/playanimation @e[tag=body,r=1] b2 b2 32767"
]
Expand All @@ -88,7 +88,7 @@
"loop": true,
"timeline": {
"0.0": [
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb:speed down",
"/execute if entity @s[tag=!tc_child] run scriptevent tcmb_minecart_engine:speed down",
"/function train_connect",
"/playanimation @e[tag=body,r=1] b1 b1 32767"
]
Expand All @@ -109,7 +109,7 @@
"loop": true,
"timeline": {
"0.0": [
"/scriptevent tcmb:speed up",
"/scriptevent tcmb_minecart_engine:speed up",
"/playanimation @e[tag=body,r=1] p1 p1 32767"
]
}
Expand All @@ -119,7 +119,7 @@
"loop": true,
"timeline": {
"0.0": [
"/scriptevent tcmb:speed up",
"/scriptevent tcmb_minecart_engine:speed up",
"/playanimation @e[tag=body,r=1] p2 p2 32767"
]
}
Expand All @@ -129,7 +129,7 @@
"loop": true,
"timeline": {
"0.0": [
"/scriptevent tcmb:speed up",
"/scriptevent tcmb_minecart_engine:speed up",
"/playanimation @e[tag=body,r=1] p3 p3 32767"
]
}
Expand All @@ -139,7 +139,7 @@
"loop": true,
"timeline": {
"0.0": [
"/scriptevent tcmb:speed up",
"/scriptevent tcmb_minecart_engine:speed up",
"/playanimation @e[tag=body,r=1] p4 p4 32767"
]
}
Expand Down
2 changes: 1 addition & 1 deletion TCMB(B)/functions/speed_down.mcfunction
Original file line number Diff line number Diff line change
@@ -1 +1 @@
scriptevent tcmb:speed down
scriptevent tcmb_minecart_engine:speed down
2 changes: 1 addition & 1 deletion TCMB(B)/functions/speed_up.mcfunction
Original file line number Diff line number Diff line change
@@ -1 +1 @@
scriptevent tcmb:speed up
scriptevent tcmb_minecart_engine:speed up
2 changes: 1 addition & 1 deletion TCMB(B)/scripts/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ system.afterEvents.scriptEventReceive.subscribe(ev => {
player.runCommandAsync('scriptevent tcmb:work_control ' + JSON.stringify(work_req));
}
break;
case 'tcmb:speed':
case 'tcmb_minecart_engine:speed':
{
if (ev.sourceType != 'Entity')
return;
Expand Down
28 changes: 15 additions & 13 deletions TCMB(B)/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -735,20 +735,22 @@ system.afterEvents.scriptEventReceive.subscribe((event) => {
evdata.send();
}
break;
case "tcmb_mobile_items:notch_break": {
if (working.has(event.sourceEntity.id)) {
train = working.get(event.sourceEntity.id);
isworking = true;
}
else {
train = dimension.getEntities(event_train_query)[0];
isworking = false;
case "tcmb_mobile_items:notch_break":
{
if (working.has(event.sourceEntity.id)) {
train = working.get(event.sourceEntity.id);
isworking = true;
}
else {
train = dimension.getEntities(event_train_query)[0];
isworking = false;
}
if (typeof train == "undefined")
return;
let evdata = new Event('notchBefore', { operation: 'break' }, train, player, isworking);
evdata.send();
}
if (typeof train == "undefined")
return;
let evdata = new Event('notchBefore', { operation: 'break' }, train, player, isworking);
evdata.send();
}
break;
case "tcmb_mobile_items:notch_eb":
{
if (working.has(event.sourceEntity.id)) {
Expand Down
4 changes: 4 additions & 0 deletions TCMB(R)/texts/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ item.tcmb:notch_power.name=Acceleration(P)
item.tcmb:notch_neutral.name=Coasting(N)
item.tcmb:notch_break.name=Deceleration(B)
item.tcmb:notch_eb.name=Emergency Brake(EB)
item.spawn_egg.entity.tcmb:notch_power.name=Acceleration(P)
item.spawn_egg.entity.tcmb:notch_neutral.name=Coasting(N)
item.spawn_egg.entity.tcmb:notch_break.name=Deceleration(B)
item.spawn_egg.entity.tcmb:notch_eb.name=Emergency Brake(EB)
item.tcmb:delete_train.name=Delete the car
item.tcmb:ride.name=Ride
item.tcmb:direction.name=Reversal of direction
Expand Down
4 changes: 4 additions & 0 deletions TCMB(R)/texts/ja_JP.lang
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ item.tcmb:notch_power.name=加速(P)
item.tcmb:notch_neutral.name=切(N)
item.tcmb:notch_break.name=減速(B)
item.tcmb:notch_eb.name=非常ブレーキ(EB)
item.spawn_egg.entity.tcmb:notch_power.name=加速(P)
item.spawn_egg.entity.tcmb:notch_neutral.name=切(N)
item.spawn_egg.entity.tcmb:notch_break.name=減速(B)
item.spawn_egg.entity.tcmb:notch_eb.name=非常ブレーキ(EB)
item.tcmb:delete_train.name=車両を消す
item.tcmb:ride.name=乗車
item.tcmb:direction.name=進行方向反転
Expand Down
2 changes: 1 addition & 1 deletion ts/engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ system.afterEvents.scriptEventReceive.subscribe( ev =>{

}
break;
case 'tcmb:speed':{
case 'tcmb_minecart_engine:speed':{
if(ev.sourceType != 'Entity') return;
if(ev.sourceEntity.typeId != 'tcmb:tcmb_car') return;
if(!ev.sourceEntity.isValid()) return;
Expand Down
1 change: 1 addition & 0 deletions ts/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -660,6 +660,7 @@ system.afterEvents.scriptEventReceive.subscribe((event)=>{
let evdata = new Event('notchBefore', {operation: 'break'}, train, player, isworking);
evdata.send();
}
break;
case "tcmb_mobile_items:notch_eb":{
if(working.has(event.sourceEntity.id)){
train = working.get(event.sourceEntity.id);
Expand Down

0 comments on commit 5f99bc4

Please sign in to comment.