public abstract class ModDimension extends ForgeRegistryEntry<ModDimension>
delegate| Constructor and Description |
|---|
ModDimension() |
| Modifier and Type | Method and Description |
|---|---|
abstract java.util.function.BiFunction<World,DimensionType,? extends Dimension> |
getFactory() |
void |
read(PacketBuffer buffer,
boolean network)
Deserialize any necessary data, this is called both when saving the world on the server.
|
static ModDimension |
withFactory(java.util.function.BiFunction<World,DimensionType,? extends Dimension> factory)
Convenience method for generating a ModDimension with a specific factory but no extra
data handling behaviour.
|
void |
write(PacketBuffer buffer,
boolean network)
Serialize any necessary data, this is called both when saving the world on the server.
|
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNamepublic abstract java.util.function.BiFunction<World,DimensionType,? extends Dimension> getFactory()
public void write(PacketBuffer buffer, boolean network)
buffer - The data buffer to write to.network - true when sent over the network, so you can only data needed by the client.public void read(PacketBuffer buffer, boolean network)
buffer - The data buffer to write to.network - true when sent over the network, so you can only data needed by the client.public static ModDimension withFactory(java.util.function.BiFunction<World,DimensionType,? extends Dimension> factory)
factory - Factory for creating Dimension instances from DimType and World.