Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CloseInventory class not working #1190

Open
NightScythe1 opened this issue Mar 8, 2023 · 0 comments
Open

CloseInventory class not working #1190

NightScythe1 opened this issue Mar 8, 2023 · 0 comments

Comments

@NightScythe1
Copy link
Member

The 'CloseInventory' class doesn't seem to be working. The 'checktrigger' for 'right_click' and 'interact' also do not seem to trigger when opening containers, GUIs, etc.
Video here to show the spell below in action
This spell is designed to be a 'scrying' spell, but is supposed to stop & cancel if the player interacts with anything and closes the inventory on a constant repeat. It works if the player tries to attack or interact with a normal block, but they can still open containers & inventory.

scry:
  creator: NightScythe1
  creator_id: 22e0650d-d3f2-4bbc-afef-02bd3b1407ec
  name: Scry
  description: |-
    §7Spy on a target in
    §7the same dimension as
    §7you. §cWARNING!§7 Must
    §7have an empty inventory
    §7except for scrying item.
  icon: spyglass
  cancel_effects: true
  actions:
    cast:
    - class: PlayEffects
      effect: scry
    - class: PlayerSelect
      cross_world: false
      actions:
        - class: Parallel
          actions:
            - class: ChangeContext
              target_caster: true
              target_self: true
              target: self
              actions:
                - class: StashWand
                  return_on_finish: true
                - class: ClearInventory
                - class: Vanish
                - class: SpawnEntity
                  invulnerable: true
                  type: armor_stand
                  set_target: true
                  disguise_target: self
                  disguise:
                    type: player
                - class: PlayEffects
                  effect: scry_target
                - class: Interval
                  duration: 20000
                  actions:
                    - class: Command
                      command: clear @p
                      console: true
                    - class: InventoryClose
                    - class: Disarm
                      keep_in_inventory: true
                    - class: CheckTrigger
                      trigger: drop
                      actions:
                        - class: Teleport
                        - class: Stop
                    - class: CheckTrigger
                      trigger: block
                      actions:
                        - class: Teleport
                        - class: Stop
                    - class: CheckTrigger
                      trigger: interact
                      actions:
                        - class: Teleport
                        - class: Stop
                    - class: CheckTrigger
                      trigger: death
                      actions:
                        - class: Teleport
                        - class: Stop
                    - class: CheckTrigger
                      trigger: damage_dealt
                      actions:
                        - class: Teleport
                        - class: Stop
                    - class: CheckTrigger
                      trigger: damage
                      actions:
                        - class: Teleport
                        - class: Stop
                    - class: CheckTrigger
                      trigger: left_click
                      actions:
                        - class: Teleport
                        - class: Stop
                    - class: CheckTrigger
                      trigger: right_click
                      actions:
                        - class: Teleport
                        - class: Stop
                - class: Teleport
            - class: Interval
              duration: 20000
              actions:
                - class: ChangeContext
                  target_caster: true
                  actions:
                    - class: Velocity
                      speed: 0
                    - class: PotionEffect
                      duration: 250
                      effects_particles: false
                      add_effects:
                        levitation: 255
                        weakness: 10
                        slow_digging: 10
                        invisibility: 0
            - class: Teleport
  parameters:
    undo: 10
    target: none
    target_armor_stand: true
    target_invisible: true
    target_self: false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant