All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.minestom.server.item.component.MapPostProcessing Maven / Gradle / Ivy

There is a newer version: 7320437640
Show newest version
package net.minestom.server.item.component;

import net.minestom.server.network.NetworkBuffer;
import org.jetbrains.annotations.NotNull;

public enum MapPostProcessing {
    LOCK,
    SCALE;
    private static final MapPostProcessing[] VALUES = values();

    public static final NetworkBuffer.Type NETWORK_TYPE = new NetworkBuffer.Type<>() {
        @Override
        public void write(@NotNull NetworkBuffer buffer, MapPostProcessing value) {
            buffer.write(NetworkBuffer.VAR_INT, value.ordinal());
        }

        @Override
        public MapPostProcessing read(@NotNull NetworkBuffer buffer) {
            return VALUES[buffer.read(NetworkBuffer.VAR_INT)];
        }
    };
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy