Class ListScratchClass<TYPE,BUFFER extends io.netty.buffer.ByteBuf>
java.lang.Object
com.petrolpark.core.scratch.classes.GenericScratchClass<List<TYPE>,TYPE,ExpressionArgument<IScratchEnvironment,List<TYPE>>>
com.petrolpark.core.scratch.classes.ListScratchClass<TYPE,BUFFER>
- All Implemented Interfaces:
IScratchClass<List<TYPE>,ExpressionArgument<IScratchEnvironment, List<TYPE>>>
- Direct Known Subclasses:
ListScratchClass.ListByteBufScratchClass,ListScratchClass.ListFriendlyByteBufScratchClass,ListScratchClass.ListRegistryFriendlyByteBufScratchClass
public abstract sealed class ListScratchClass<TYPE,BUFFER extends io.netty.buffer.ByteBuf>
extends GenericScratchClass<List<TYPE>,TYPE,ExpressionArgument<IScratchEnvironment,List<TYPE>>>
permits ListScratchClass.ListByteBufScratchClass<TYPE>, ListScratchClass.ListFriendlyByteBufScratchClass<TYPE>, ListScratchClass.ListRegistryFriendlyByteBufScratchClass<TYPE>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final classNested classes/interfaces inherited from interface com.petrolpark.core.scratch.classes.IScratchClass
IScratchClass.Caster<FROM_TYPE,TO_TYPE> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ListScratchClass<?, ?>> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, ListScratchClass<?, ?>> Fields inherited from class com.petrolpark.core.scratch.classes.GenericScratchClass
genericScratchClassFields inherited from interface com.petrolpark.core.scratch.classes.IScratchClass
TYPED_CODEC -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedListScratchClass(ISyncedScratchClass<TYPE, ?> genericScratchClass, net.minecraft.network.codec.StreamCodec<BUFFER, List<TYPE>> streamCodec) -
Method Summary
Modifier and TypeMethodDescription<TO_TYPE> Optional<IScratchClass.Caster<List<TYPE>, TO_TYPE>> cast(IScratchClass<TO_TYPE, ?> toClass) codec()static final <TYPE> ListScratchClass<TYPE, ?> create(IScratchClass<TYPE, ?> scratchClass) booleanfallback()getType()Methods inherited from class com.petrolpark.core.scratch.classes.GenericScratchClass
getGenericScratchClassMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.petrolpark.core.scratch.classes.IScratchClass
asSynced, streamCodec
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,ListScratchClass<?, STREAM_CODEC?>> -
codec
-
streamCodec
-
-
Constructor Details
-
ListScratchClass
protected ListScratchClass(ISyncedScratchClass<TYPE, ?> genericScratchClass, net.minecraft.network.codec.StreamCodec<BUFFER, List<TYPE>> streamCodec)
-
-
Method Details
-
create
-
fallback
-
codec
-
createDefaultParameter
public ExpressionArgument.ExpressionParameter<IScratchEnvironment,List<TYPE>> createDefaultParameter(String key) -
cast
public <TO_TYPE> Optional<IScratchClass.Caster<List<TYPE>,TO_TYPE>> cast(IScratchClass<TO_TYPE, ?> toClass) -
getType
-
equals
-