<commit_before>package info.u_team.u_team_core.intern.network;

import java.util.*;
import java.util.function.Supplier;

import info.u_team.u_team_core.container.*;
import net.minecraft.client.Minecraft;
import net.minecraft.inventory.container.Container;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.NonNullList;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.network.NetworkEvent.Context;

public class FluidSetAllContainerMessage {
	
	private final int id;
	private List<FluidStack> stacks;
	
	public FluidSetAllContainerMessage(int id, List<FluidStack> stacks) {
		this.id = id;
		this.stacks = stacks;
	}
	
	public static void encode(FluidSetAllContainerMessage message, PacketBuffer sendBuffer) {
		sendBuffer.writeByte(message.id);
		sendBuffer.writeShort(message.stacks.size());
		for (FluidStack stack : message.stacks) {
			sendBuffer.writeFluidStack(stack);
		}
	}
	
	public static FluidSetAllContainerMessage decode(PacketBuffer sendBuffer) {
		final int id = sendBuffer.readByte();
		final int size = sendBuffer.readShort();
		final List<FluidStack> stacks = NonNullList.withSize(size, FluidStack.EMPTY);
		for (int index = 0; index < size; index++) {
			stacks.set(index, sendBuffer.readFluidStack());
		}
		return new FluidSetAllContainerMessage(id, stacks);<commit_msg>Add final to variables in fluid set all container message<commit_after>package info.u_team.u_team_core.intern.network;

import java.util.*;
import java.util.function.Supplier;

import info.u_team.u_team_core.container.*;
import net.minecraft.client.Minecraft;
import net.minecraft.inventory.container.Container;
import net.minecraft.network.PacketBuffer;
import net.minecraft.util.NonNullList;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fml.network.NetworkEvent.Context;

public class FluidSetAllContainerMessage {
	
	private final int id;
	private final List<FluidStack> stacks;
	
	public FluidSetAllContainerMessage(int id, List<FluidStack> stacks) {
		this.id = id;
		this.stacks = stacks;
	}
	
	public static void encode(FluidSetAllContainerMessage message, PacketBuffer sendBuffer) {
		sendBuffer.writeByte(message.id);
		sendBuffer.writeShort(message.stacks.size());
		for (FluidStack stack : message.stacks) {
			sendBuffer.writeFluidStack(stack);
		}
	}
	
	public static FluidSetAllContainerMessage decode(PacketBuffer sendBuffer) {
		final int id = sendBuffer.readByte();
		final int size = sendBuffer.readShort();
		final List<FluidStack> stacks = NonNullList.withSize(size, FluidStack.EMPTY);
		for (int index = 0; index < size; index++) {
			stacks.set(index, sendBuffer.readFluidStack());
		}
		return new FluidSetAllContainerMessage(id, stacks);
{'fraction_non_alphanumeric': 0.10205580029368576, 'fraction_numerical': 0.0007342143906020558, 'mean_word_length': 5.695331695331696, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2409008', 'n_tokens_mistral': 895, 'n_tokens_neox': 844, 'n_words': 177}