Package net.minecraft.item.consume
Record Class ConsumeEffect.Type<T extends ConsumeEffect>
java.lang.Object
java.lang.Record
net.minecraft.item.consume.ConsumeEffect.Type<T>
- Record Components:
codec-streamCodec-
- Enclosing interface:
ConsumeEffect
public static record ConsumeEffect.Type<T extends ConsumeEffect>(com.mojang.serialization.MapCodec<T extends ConsumeEffect> codec, PacketCodec<RegistryByteBuf,T extends ConsumeEffect> streamCodec)
extends Record
- Mappings:
Namespace Name named net/minecraft/item/consume/ConsumeEffect$Typeintermediary net/minecraft/class_10134$class_10135official ddy$anamed codecintermediary comp_3096official fnamed streamCodecintermediary comp_3097official g
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ConsumeEffect.Type<ApplyEffectsConsumeEffect> static final ConsumeEffect.Type<ClearAllEffectsConsumeEffect> private final com.mojang.serialization.MapCodec<T> The field for thecodecrecord component.static final ConsumeEffect.Type<PlaySoundConsumeEffect> static final ConsumeEffect.Type<RemoveEffectsConsumeEffect> private final PacketCodec<RegistryByteBuf, T> The field for thestreamCodecrecord component.static final ConsumeEffect.Type<TeleportRandomlyConsumeEffect> -
Constructor Summary
ConstructorsConstructorDescriptionType(com.mojang.serialization.MapCodec<T> mapCodec, PacketCodec<RegistryByteBuf, T> packetCodec) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<T> codec()Returns the value of thecodecrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.private static <T extends ConsumeEffect>
ConsumeEffect.Type<T> register(String id, com.mojang.serialization.MapCodec<T> codec, PacketCodec<RegistryByteBuf, T> packetCodec) Returns the value of thestreamCodecrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
codec
The field for thecodecrecord component. -
streamCodec
The field for thestreamCodecrecord component. -
APPLY_EFFECTS
- Mappings:
Namespace Name Mixin selector named APPLY_EFFECTSLnet/minecraft/item/consume/ConsumeEffect$Type;APPLY_EFFECTS:Lnet/minecraft/item/consume/ConsumeEffect$Type;intermediary field_53810Lnet/minecraft/class_10134$class_10135;field_53810:Lnet/minecraft/class_10134$class_10135;official aLddy$a;a:Lddy$a;
-
REMOVE_EFFECTS
- Mappings:
Namespace Name Mixin selector named REMOVE_EFFECTSLnet/minecraft/item/consume/ConsumeEffect$Type;REMOVE_EFFECTS:Lnet/minecraft/item/consume/ConsumeEffect$Type;intermediary field_53811Lnet/minecraft/class_10134$class_10135;field_53811:Lnet/minecraft/class_10134$class_10135;official bLddy$a;b:Lddy$a;
-
CLEAR_ALL_EFFECTS
- Mappings:
Namespace Name Mixin selector named CLEAR_ALL_EFFECTSLnet/minecraft/item/consume/ConsumeEffect$Type;CLEAR_ALL_EFFECTS:Lnet/minecraft/item/consume/ConsumeEffect$Type;intermediary field_53812Lnet/minecraft/class_10134$class_10135;field_53812:Lnet/minecraft/class_10134$class_10135;official cLddy$a;c:Lddy$a;
-
TELEPORT_RANDOMLY
- Mappings:
Namespace Name Mixin selector named TELEPORT_RANDOMLYLnet/minecraft/item/consume/ConsumeEffect$Type;TELEPORT_RANDOMLY:Lnet/minecraft/item/consume/ConsumeEffect$Type;intermediary field_53813Lnet/minecraft/class_10134$class_10135;field_53813:Lnet/minecraft/class_10134$class_10135;official dLddy$a;d:Lddy$a;
-
PLAY_SOUND
- Mappings:
Namespace Name Mixin selector named PLAY_SOUNDLnet/minecraft/item/consume/ConsumeEffect$Type;PLAY_SOUND:Lnet/minecraft/item/consume/ConsumeEffect$Type;intermediary field_53814Lnet/minecraft/class_10134$class_10135;field_53814:Lnet/minecraft/class_10134$class_10135;official eLddy$a;e:Lddy$a;
-
-
Constructor Details
-
Type
public Type(com.mojang.serialization.MapCodec<T> mapCodec, PacketCodec<RegistryByteBuf, T> packetCodec)
-
-
Method Details
-
register
private static <T extends ConsumeEffect> ConsumeEffect.Type<T> register(String id, com.mojang.serialization.MapCodec<T> codec, PacketCodec<RegistryByteBuf, T> packetCodec) - Mappings:
Namespace Name Mixin selector named registerLnet/minecraft/item/consume/ConsumeEffect$Type;register(Ljava/lang/String;Lcom/mojang/serialization/MapCodec;Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/item/consume/ConsumeEffect$Type;intermediary method_62867Lnet/minecraft/class_10134$class_10135;method_62867(Ljava/lang/String;Lcom/mojang/serialization/MapCodec;Lnet/minecraft/class_9139;)Lnet/minecraft/class_10134$class_10135;official aLddy$a;a(Ljava/lang/String;Lcom/mojang/serialization/MapCodec;Lze;)Lddy$a;
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
codec
Returns the value of thecodecrecord component.- Returns:
- the value of the
codecrecord component
-
streamCodec
Returns the value of thestreamCodecrecord component.- Returns:
- the value of the
streamCodecrecord component
-