Package net.minecraft.util
Class ActionResult<T>
- java.lang.Object
-
- net.minecraft.util.ActionResult<T>
-
public class ActionResult<T> extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private T
object
private ActionResultType
result
-
Constructor Summary
Constructors Constructor Description ActionResult(ActionResultType p_i46821_1_, T p_i46821_2_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> ActionResult<T>
consume(T p_226249_0_)
static <T> ActionResult<T>
fail(T p_226251_0_)
T
getObject()
ActionResultType
getResult()
static <T> ActionResult<T>
pass(T p_226250_0_)
static <T> ActionResult<T>
sidedSuccess(T p_233538_0_, boolean p_233538_1_)
static <T> ActionResult<T>
success(T p_226248_0_)
-
-
-
Field Detail
-
result
private final ActionResultType result
-
object
private final T object
-
-
Constructor Detail
-
ActionResult
public ActionResult(ActionResultType p_i46821_1_, T p_i46821_2_)
-
-
Method Detail
-
getResult
public ActionResultType getResult()
-
getObject
public T getObject()
-
success
public static <T> ActionResult<T> success(T p_226248_0_)
-
consume
public static <T> ActionResult<T> consume(T p_226249_0_)
-
pass
public static <T> ActionResult<T> pass(T p_226250_0_)
-
fail
public static <T> ActionResult<T> fail(T p_226251_0_)
-
sidedSuccess
public static <T> ActionResult<T> sidedSuccess(T p_233538_0_, boolean p_233538_1_)
-
-