Package net.minecraft.screen
Interface ScreenHandlerContext
public interface ScreenHandlerContext
Screen handler contexts allow screen handlers to interact with the
logical server's world safely.
-
Field Summary
Fields Modifier and Type Field Description static ScreenHandlerContext
EMPTY
The dummy screen handler context for clientside screen handlers. -
Method Summary
Modifier and Type Method Description static ScreenHandlerContext
create(World world, BlockPos pos)
Returns an active screen handler context.default void
run(BiConsumer<World,BlockPos> function)
<T> Optional<T>
run(BiFunction<World,BlockPos,T> function)
default <T> T
run(BiFunction<World,BlockPos,T> function, T defaultValue)
-
Field Details
-
EMPTY
The dummy screen handler context for clientside screen handlers.
-
-
Method Details
-
create
Returns an active screen handler context. Used on the logical server. -
run
-
run
-
run
-