mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-22 21:09:43 +00:00
31 lines
974 B
Java
31 lines
974 B
Java
package com.glodblock.github.util;
|
|
|
|
import net.minecraft.nbt.NBTTagCompound;
|
|
import net.minecraftforge.common.util.Constants.NBT;
|
|
|
|
import com.glodblock.github.inventory.IDualHost;
|
|
|
|
public final class DualHostSettings {
|
|
|
|
private static final String FLUID_CONFIG_KEY = "fluidConfig";
|
|
|
|
private DualHostSettings() {}
|
|
|
|
public static void uploadSettings(IDualHost host, NBTTagCompound compound) {
|
|
if (compound.hasKey(FLUID_CONFIG_KEY, NBT.TAG_COMPOUND)) {
|
|
host.getDualityFluid().readConfigFromNBT(compound, FLUID_CONFIG_KEY);
|
|
host.getConfig();
|
|
}
|
|
}
|
|
|
|
public static void downloadSettings(IDualHost host, NBTTagCompound output) {
|
|
host.getDualityFluid().writeConfigToNBT(output, FLUID_CONFIG_KEY);
|
|
}
|
|
|
|
public static void copySettings(IDualHost target, IDualHost source) {
|
|
NBTTagCompound data = new NBTTagCompound();
|
|
downloadSettings(source, data);
|
|
uploadSettings(target, data);
|
|
}
|
|
}
|