Package mcp.mobius.waila.api
Interface IData
- All Known Implementing Classes:
EnergyData
,FluidData
,FluidData.PlatformDependant
,ItemData
,ProgressData
public interface IData
A typed data for syncing complex data.
Register data types with ICommonRegistrar.dataType(mcp.mobius.waila.api.IData.Type<D>, net.minecraft.network.codec.StreamCodec<? super net.minecraft.network.RegistryFriendlyByteBuf, ? extends D>)
For simple data, consider using raw NBT data instead, as it is easier to do and enough for most purpose.
See mcp.mobius.waila.api.data
for built-in implementations.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <D extends IData>
IData.Type<D> Creates a data type.IData.Type
<? extends IData> type()
Returns the type of the data, should be a constant variable.
-
Method Details
-
createType
Creates a data type.Save the returned value to a static final variable.
- Parameters:
id
- the data id
-
type
IData.Type<? extends IData> type()Returns the type of the data, should be a constant variable.- See Also:
-