Skip to content

Commit

Permalink
fix: Broken scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
PeyaPeyaPeyang committed Mar 7, 2024
1 parent 09dbd0d commit a9aac57
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ public InputBoard getInputBoard(ScenarioType type)
InputBoard board = super.getInputBoard(type)
.registerAll(IN_CAUSE, IN_AMOUNT, IN_MODIFIERS);
if (type == ScenarioType.ACTION_EXECUTE)
board.requirePresent(IN_AMOUNT)
.validator(in -> !in.isPresent(IN_CAUSE), "Use entity_damage_by_entity or entity_damage_by_block action instead");

board.requirePresent(IN_AMOUNT);
return board;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ scenario:
- type: execute
action: block
with:
actor: Actor001
block:
location:
x: 0
Expand All @@ -27,7 +26,6 @@ scenario:
- type: require
action: block
with:
actor: Actor001
block:
location:
x: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ scenario:
- type: execute
action: block
with:
actor: Actor001
block:
location:
x: 0
Expand All @@ -27,7 +26,6 @@ scenario:
- type: require
action: block
with:
actor: Actor001
block:
location:
x: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ scenario:
damager:
name: Actor01
- type: expect
action: entity_damage
action: entity_damage_by_entity
with:
target: "@e[type=minecraft:parrot,tag=810snpi]"
damager:
name: Actor01
timeout: 20

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ scenario:
type: minecraft:stone
amount: 10
- type: expect
action: entity_damage
action: entity_pickup_item
with:
target: "@e[type=minecraft:villager,tag=810snpi]"
item:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ scenario:
type: minecraft:stone
amount: 10
- type: expect
action: entity_damage
action: entity_pickup_item
timeout: 20

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ scenario:
type: minecraft:stone
amount: 10
- type: expect
action: entity_damage
action: entity_pickup_item
with:
target: ${scenario.scenario.0.output.target}
item:
Expand All @@ -32,8 +32,11 @@ scenario:
action: entity_pickup_item
with:
target: ${scenario.scenario.1.output.target}
item:
type: minecraft:stone
amount: 10
- type: expect
action: entity_damage
action: entity_pickup_item
with:
target: "@e[type=minecraft:villager,tag=810snpi]"
item:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ scenario:
type: minecraft:stone
amount: 10
- type: expect
action: entity_damage
action: entity_pickup_item
with:
target: "@e[type=minecraft:villager,tag=810snpi]"
remaining: 9
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
- type: execute
action: projectile_launch
with:
entity:
target:
type: minecraft:arrow
tags:
- 810snpi
Expand All @@ -22,7 +22,7 @@ on:
- type: manual_dispatch
before:
- type: execute
action: projectile_launch
target: projectile_launch
with:
entity:
type: minecraft:arrow
Expand All @@ -48,13 +48,5 @@ scenario:
tags:
- 810snpi
eventOnly: true
- type: expect
action: projectile_hit
with:
target: "@e[type=minecraft:arrow,tag=810snpi]"
hitEntity:
type: minecraft:villager
tags:
- 810snpi
timeout: 20
timeout: 20

Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ scenario:
- type: execute
action: projectile_launch
with:
entity:
target:
type: minecraft:arrow
# noinspection YAMLSchemaValidation
shooter:
Expand All @@ -47,7 +47,7 @@ scenario:
- type: expect
action: projectile_launch
with:
entity:
target:
type: minecraft:arrow
# noinspection YAMLSchemaValidation
shooter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ scenario:
- type: execute
action: projectile_launch
with:
entity:
target:
type: minecraft:arrow
# noinspection YAMLSchemaValidation
shooter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ scenario:
- type: execute
action: projectile_launch
with:
entity:
target:
type: minecraft:arrow
# noinspection YAMLSchemaValidation
shooter:
name: Actor01
- type: expect
action: projectile_launch
with:
entity:
target:
type: minecraft:arrow
# noinspection YAMLSchemaValidation
shooter:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ context:

scenario:
- type: execute
action: player_advancement
action: player_level_change
with:
target: Actor001
advancement: minecraft:nether/distract_piglin
level: 10
- type: expect
action: player_advancement
action: player_level_change
with:
target: Actor001
advancement: minecraft:nether/distract_piglin
timeout: 20
level: 10
oldLevel: 0
- type: require
action: player_advancement
action: player_level_change
with:
target: Actor001
advancement: minecraft:nether/distract_piglin
level: 0
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ scenario:
action: broadcast
with:
message: "Hello world!"
permissions:
- "scenamatica.actions.server.broadcast"
permission: "scenamatica.actions.server.broadcast"
- type: expect
action: broadcast
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ scenario:
action: world_border_changed
with:
size: 20
center:
x: 1
y: 0
z: 3
sizeOld: 200
- type: require
action: world_border
Expand Down

0 comments on commit a9aac57

Please sign in to comment.