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$Type- intermediary - net/minecraft/class_10134$class_10135- official - dac$a- named - codec- intermediary - comp_3096- official - f- named - streamCodec- intermediary - comp_3097- official - g
- 
Field SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionType(com.mojang.serialization.MapCodec<T> mapCodec, PacketCodec<RegistryByteBuf, T> packetCodec) 
- 
Method SummaryModifier 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- 
codecThe field for thecodecrecord component.
- 
streamCodecThe field for thestreamCodecrecord component.
- 
APPLY_EFFECTS- Mappings:
- Namespace - Name - Mixin selector - named - APPLY_EFFECTS- Lnet/minecraft/item/consume/ConsumeEffect$Type;APPLY_EFFECTS:Lnet/minecraft/item/consume/ConsumeEffect$Type;- intermediary - field_53810- Lnet/minecraft/class_10134$class_10135;field_53810:Lnet/minecraft/class_10134$class_10135;- official - a- Ldac$a;a:Ldac$a;
 
- 
REMOVE_EFFECTS- Mappings:
- Namespace - Name - Mixin selector - named - REMOVE_EFFECTS- Lnet/minecraft/item/consume/ConsumeEffect$Type;REMOVE_EFFECTS:Lnet/minecraft/item/consume/ConsumeEffect$Type;- intermediary - field_53811- Lnet/minecraft/class_10134$class_10135;field_53811:Lnet/minecraft/class_10134$class_10135;- official - b- Ldac$a;b:Ldac$a;
 
- 
CLEAR_ALL_EFFECTS- Mappings:
- Namespace - Name - Mixin selector - named - CLEAR_ALL_EFFECTS- Lnet/minecraft/item/consume/ConsumeEffect$Type;CLEAR_ALL_EFFECTS:Lnet/minecraft/item/consume/ConsumeEffect$Type;- intermediary - field_53812- Lnet/minecraft/class_10134$class_10135;field_53812:Lnet/minecraft/class_10134$class_10135;- official - c- Ldac$a;c:Ldac$a;
 
- 
TELEPORT_RANDOMLY- Mappings:
- Namespace - Name - Mixin selector - named - TELEPORT_RANDOMLY- Lnet/minecraft/item/consume/ConsumeEffect$Type;TELEPORT_RANDOMLY:Lnet/minecraft/item/consume/ConsumeEffect$Type;- intermediary - field_53813- Lnet/minecraft/class_10134$class_10135;field_53813:Lnet/minecraft/class_10134$class_10135;- official - d- Ldac$a;d:Ldac$a;
 
- 
PLAY_SOUND- Mappings:
- Namespace - Name - Mixin selector - named - PLAY_SOUND- Lnet/minecraft/item/consume/ConsumeEffect$Type;PLAY_SOUND:Lnet/minecraft/item/consume/ConsumeEffect$Type;- intermediary - field_53814- Lnet/minecraft/class_10134$class_10135;field_53814:Lnet/minecraft/class_10134$class_10135;- official - e- Ldac$a;e:Ldac$a;
 
 
- 
- 
Constructor Details- 
Typepublic Type(com.mojang.serialization.MapCodec<T> mapCodec, PacketCodec<RegistryByteBuf, T> packetCodec) 
 
- 
- 
Method Details- 
registerprivate 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 - register- Lnet/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_62867- Lnet/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 - a- Ldac$a;a(Ljava/lang/String;Lcom/mojang/serialization/MapCodec;Lyn;)Ldac$a;
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
codecReturns the value of thecodecrecord component.- Returns:
- the value of the codecrecord component
 
- 
streamCodecReturns the value of thestreamCodecrecord component.- Returns:
- the value of the streamCodecrecord component
 
 
-