Skip to content

Wisps cannot access owner's offhand or place blocks from owner's inventory #200

@Robotgiggle

Description

@Robotgiggle

Minecraft version

1.20.1

Hex Casting version

0.11.3

Hexal version

0.3.1

Issue description

PlayerBasedCastEnv overrides the getUsableStacks(), getPrimaryStacks(), and replaceItem() methods to allow access to the inventory and offhand of the associated player. However, despite the fact that wisps cannot function without an associated player, WispCastEnv does not do this and instead just overrides all three methods to do nothing.

This means that wisps are unable to place blocks from their caster's inventory or do anything that would require an item in the offhand (reading/writing iota storage items, crafting phials or casting items, internalizing pigments, etc), even if their caster is holding the proper item.

Image

Given that wisps do not function without an owner present, I see no reason why all three of these methods should not behave exactly as they do in PlayerBasedCastEnv, allowing the wisp to place items from its owner's inventory and interact with its owner's offhand.

Steps to reproduce

(inventory access)

  1. Have something placeable in your hotbar
  2. Attempt to cast Place Block (or Place Block II) from a wisp
  3. Observe that it fails due to not finding any placeable items

(offhand access)

  1. Have a focus in your offhand
  2. Attempt to cast Scribe's Gambit from a wisp
  3. Observe that it fails due to not having a valid item to write to

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions