diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/container/IEnhancedContainer.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/container/IEnhancedContainer.kt index 30509ab3a..24ca9c248 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/container/IEnhancedContainer.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/container/IEnhancedContainer.kt @@ -23,11 +23,15 @@ import java.util.function.Predicate * and actual implementations of this interface are likely to provide efficient method implementations in place of derived/emulated ones. */ interface IEnhancedContainer : IContainer, RecipeInput, Iterable, StackedContentsCompatible { - // provide non-ambiguous "get" operator + // provide non-ambiguous get and set operators operator fun get(slot: Int): ItemStack { return getItem(slot) } + operator fun set(slot: Int, value: ItemStack) { + setItem(slot, value) + } + fun containerSlot(slot: Int): IContainerSlot { return IContainerSlot.Simple(slot, this) }