Skip to content

Clunky accessing of dispense method on an instance of EquippableDispenserBehavior #4217

@O7410

Description

@O7410

net.minecraft.block.dispenser.EquippableDispenserBehavior has a static method dispense(BlockPointer, ItemStack) that returns a boolean
EquippableDispenserBehavior extends ItemDispenserBehavior which has a non static method dispense(BlockPointer, ItemStack) that returns an ItemStack
you can use both methods
EquippableDispenserBehavior.dispense(...) -> static one
((ItemDispenserBehavior) equippableDispenserBehavior).dispense(...) -> non static one
but... it's a bit weird that you have to cast to a superclass just to use the method
I think the static method in EquippableDispenserBehavior should be renamed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions