us.myles.ViaVersion.api.remapper.ValueCreator Java Examples

The following examples show how to use us.myles.ViaVersion.api.remapper.ValueCreator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PacketWrapper.java    From ViaVersion with MIT License 2 votes vote down vote up
/**
 * Create a new packet with values.
 *
 * @param packetID The ID of the new packet
 * @param init     A ValueCreator to write to the packet.
 * @return The newly created packet wrapper
 * @throws Exception If it failed to write the values from the ValueCreator.
 */
public PacketWrapper create(int packetID, ValueCreator init) throws Exception {
    PacketWrapper wrapper = create(packetID);
    init.write(wrapper);
    return wrapper;
}