Record Class BlockUsePredictionPayload
java.lang.Object
java.lang.Record
com.viaversion.viafabricplus.bedrock.input.BlockUsePredictionPayload
- All Implemented Interfaces:
net.minecraft.network.protocol.common.custom.CustomPacketPayload
public record BlockUsePredictionPayload(net.raphimc.viabedrock.api.model.BlockUsePrediction use, boolean withAirAdmission)
extends Record
implements net.minecraft.network.protocol.common.custom.CustomPacketPayload
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
net.minecraft.network.protocol.common.custom.CustomPacketPayload.FallbackProvider<B>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<T>, net.minecraft.network.protocol.common.custom.CustomPacketPayload.TypeAndCodec<B,T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, BlockUsePredictionPayload> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<BlockUsePredictionPayload> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, BlockUsePredictionPayload> static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<BlockUsePredictionPayload> -
Constructor Summary
ConstructorsConstructorDescriptionBlockUsePredictionPayload(net.raphimc.viabedrock.api.model.BlockUsePrediction use) BlockUsePredictionPayload(net.raphimc.viabedrock.api.model.BlockUsePrediction use, boolean withAirAdmission) Creates an instance of aBlockUsePredictionPayloadrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<BlockUsePredictionPayload> type()net.raphimc.viabedrock.api.model.BlockUsePredictionuse()Returns the value of theuserecord component.booleanReturns the value of thewithAirAdmissionrecord component.
-
Field Details
-
TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<BlockUsePredictionPayload> TYPE -
CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, BlockUsePredictionPayload> CODEC -
AIR_TYPE
public static final net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<BlockUsePredictionPayload> AIR_TYPE -
AIR_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, BlockUsePredictionPayload> AIR_CODEC
-
-
Constructor Details
-
BlockUsePredictionPayload
public BlockUsePredictionPayload(net.raphimc.viabedrock.api.model.BlockUsePrediction use) -
BlockUsePredictionPayload
public BlockUsePredictionPayload(net.raphimc.viabedrock.api.model.BlockUsePrediction use, boolean withAirAdmission) Creates an instance of aBlockUsePredictionPayloadrecord class.- Parameters:
use- the value for theuserecord componentwithAirAdmission- the value for thewithAirAdmissionrecord component
-
-
Method Details
-
type
public net.minecraft.network.protocol.common.custom.CustomPacketPayload.Type<BlockUsePredictionPayload> type()- Specified by:
typein interfacenet.minecraft.network.protocol.common.custom.CustomPacketPayload
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
use
public net.raphimc.viabedrock.api.model.BlockUsePrediction use()Returns the value of theuserecord component.- Returns:
- the value of the
userecord component
-
withAirAdmission
public boolean withAirAdmission()Returns the value of thewithAirAdmissionrecord component.- Returns:
- the value of the
withAirAdmissionrecord component
-