mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
configurable fluid traits
This commit is contained in:
parent
07c0fc0d86
commit
2a01d7f2fb
@ -123,6 +123,7 @@ public class PollutionHandler {
|
||||
|
||||
try {
|
||||
File pollutionFile = new File(dirPath, fileName);
|
||||
if(!pollutionFile.getParentFile().exists()) pollutionFile.getParentFile().mkdirs();
|
||||
if(!pollutionFile.exists()) pollutionFile.createNewFile();
|
||||
NBTTagCompound data = perWorld.get(world).writeToNBT();
|
||||
CompressedStreamTools.writeCompressed(data, new FileOutputStream(pollutionFile));
|
||||
|
||||
@ -48,7 +48,7 @@ public class FluidType {
|
||||
public double compression = DEFAULT_COMPRESSION;
|
||||
|
||||
public HashMap<Class, Object> containers = new HashMap();
|
||||
private HashMap<Class<? extends FluidTrait>, FluidTrait> traits = new HashMap();
|
||||
public HashMap<Class<? extends FluidTrait>, FluidTrait> traits = new HashMap();
|
||||
//public List<EnumFluidTrait> enumTraits = new ArrayList();
|
||||
|
||||
private ResourceLocation texture;
|
||||
|
||||
@ -1,12 +1,22 @@
|
||||
package com.hbm.inventory.fluid;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.inventory.fluid.trait.*;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.*;
|
||||
import com.hbm.lib.ModDamageSource;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.potion.HbmPotion;
|
||||
import com.hbm.inventory.fluid.trait.FT_Combustible.FuelGrade;
|
||||
import com.hbm.inventory.fluid.trait.FT_Coolable.CoolingType;
|
||||
@ -20,6 +30,8 @@ import net.minecraft.potion.PotionEffect;
|
||||
|
||||
public class Fluids {
|
||||
|
||||
public static final Gson gson = new Gson();
|
||||
|
||||
public static FluidType NONE;
|
||||
public static FluidType WATER;
|
||||
public static FluidType STEAM;
|
||||
@ -562,6 +574,73 @@ public class Fluids {
|
||||
|
||||
registerCalculatedFuel(SYNGAS, (coalHeat * (1000 /* bucket */ / 100 /* mB per coal */) * flammabilityLow * demandLow * complexityChemplant) * 1.5, 1.25, FuelGrade.GAS); //same as coal oil, +50% bonus
|
||||
registerCalculatedFuel(OXYHYDROGEN, 5_000, 3, FuelGrade.GAS); // whatever
|
||||
|
||||
File folder = MainRegistry.configHbmDir;
|
||||
|
||||
File config = new File(folder.getAbsolutePath() + File.separatorChar + "hbmFluids.json");
|
||||
File template = new File(folder.getAbsolutePath() + File.separatorChar + "_hbmFluids.json");
|
||||
|
||||
if(!config.exists()) {
|
||||
writeDefault(template);
|
||||
} else {
|
||||
readConfig(config);
|
||||
}
|
||||
}
|
||||
|
||||
private static void writeDefault(File file) {
|
||||
|
||||
try {
|
||||
JsonWriter writer = new JsonWriter(new FileWriter(file));
|
||||
writer.setIndent(" ");
|
||||
writer.beginObject();
|
||||
|
||||
for(FluidType type : metaOrder) {
|
||||
writer.name(type.getUnlocalizedName()).beginObject();
|
||||
|
||||
for(Entry<Class<? extends FluidTrait>, FluidTrait> entry : type.traits.entrySet()) {
|
||||
writer.name(FluidTrait.traitNameMap.inverse().get(entry.getKey())).beginObject();
|
||||
entry.getValue().serializeJSON(writer);
|
||||
writer.endObject();
|
||||
}
|
||||
|
||||
writer.endObject();
|
||||
}
|
||||
|
||||
writer.endObject();
|
||||
writer.close();
|
||||
} catch(IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static void readConfig(File config) {
|
||||
|
||||
try {
|
||||
JsonObject json = gson.fromJson(new FileReader(config), JsonObject.class);
|
||||
|
||||
for(FluidType type : metaOrder) {
|
||||
|
||||
JsonElement element = json.get(type.getUnlocalizedName());
|
||||
if(element != null) {
|
||||
type.traits.clear();
|
||||
JsonObject obj = element.getAsJsonObject();
|
||||
|
||||
for(Entry<String, JsonElement> entry : obj.entrySet()) {
|
||||
Class<? extends FluidTrait> traitClass = FluidTrait.traitNameMap.get(entry.getKey());
|
||||
try {
|
||||
FluidTrait trait = traitClass.newInstance();
|
||||
trait.deserializeJSON(entry.getValue().getAsJsonObject());
|
||||
type.addTraits(trait);
|
||||
} catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} catch(Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
private static void registerCalculatedFuel(FluidType type, double base, double combustMult, FuelGrade grade) {
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
package com.hbm.inventory.fluid.trait;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -11,6 +14,8 @@ public class FT_Combustible extends FluidTrait {
|
||||
protected FuelGrade fuelGrade;
|
||||
protected long combustionEnergy;
|
||||
|
||||
public FT_Combustible() { }
|
||||
|
||||
public FT_Combustible(FuelGrade grade, long energy) {
|
||||
this.fuelGrade = grade;
|
||||
this.combustionEnergy = energy;
|
||||
@ -53,4 +58,16 @@ public class FT_Combustible extends FluidTrait {
|
||||
return this.grade;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serializeJSON(JsonWriter writer) throws IOException {
|
||||
writer.name("energy").value(combustionEnergy);
|
||||
writer.name("grade").value(fuelGrade.name());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserializeJSON(JsonObject obj) {
|
||||
this.combustionEnergy = obj.get("energy").getAsLong();
|
||||
this.fuelGrade = FuelGrade.valueOf(obj.get("grade").getAsString());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,9 +1,14 @@
|
||||
package com.hbm.inventory.fluid.trait;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
@ -11,10 +16,12 @@ public class FT_Coolable extends FluidTrait {
|
||||
|
||||
protected HashMap<CoolingType, Double> efficiency = new HashMap();
|
||||
|
||||
public final FluidType coolsTo;
|
||||
public FluidType coolsTo;
|
||||
public int amountReq;
|
||||
public int amountProduced;
|
||||
public final int heatEnergy;
|
||||
public int heatEnergy;
|
||||
|
||||
public FT_Coolable() { }
|
||||
|
||||
public FT_Coolable(FluidType type, int req, int prod, int heat) {
|
||||
this.coolsTo = type;
|
||||
@ -56,4 +63,28 @@ public class FT_Coolable extends FluidTrait {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serializeJSON(JsonWriter writer) throws IOException {
|
||||
writer.name("coolsTo").value(this.coolsTo.getUnlocalizedName());
|
||||
writer.name("amountReq").value(this.amountReq);
|
||||
writer.name("amountProd").value(this.amountProduced);
|
||||
writer.name("heatEnergy").value(this.heatEnergy);
|
||||
|
||||
for(Entry<CoolingType, Double> entry : this.efficiency.entrySet()) {
|
||||
writer.name(entry.getKey().name()).value(entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserializeJSON(JsonObject obj) {
|
||||
this.coolsTo = Fluids.fromName(obj.get("coolsTo").getAsString());
|
||||
this.amountReq = obj.get("amountReq").getAsInt();
|
||||
this.amountProduced = obj.get("amountProd").getAsInt();
|
||||
this.heatEnergy = obj.get("heatEnergy").getAsInt();
|
||||
|
||||
for(CoolingType type : CoolingType.values()) {
|
||||
if(obj.has(type.name())) efficiency.put(type, obj.get(type.name()).getAsDouble());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
package com.hbm.inventory.fluid.trait;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
public class FT_Corrosive extends FluidTrait {
|
||||
@ -9,6 +13,8 @@ public class FT_Corrosive extends FluidTrait {
|
||||
/* 0-100 */
|
||||
private int rating;
|
||||
|
||||
public FT_Corrosive() { }
|
||||
|
||||
public FT_Corrosive(int rating) {
|
||||
this.rating = rating;
|
||||
}
|
||||
@ -29,4 +35,14 @@ public class FT_Corrosive extends FluidTrait {
|
||||
else
|
||||
info.add(EnumChatFormatting.YELLOW + "[Corrosive]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serializeJSON(JsonWriter writer) throws IOException {
|
||||
writer.name("rating").value(rating);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserializeJSON(JsonObject obj) {
|
||||
this.rating = obj.get("rating").getAsInt();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
package com.hbm.inventory.fluid.trait;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
@ -11,6 +14,8 @@ public class FT_Flammable extends FluidTrait {
|
||||
/** How much heat energy (usually translates into HE 1:1) 1000mB hold */
|
||||
private long energy;
|
||||
|
||||
public FT_Flammable() { }
|
||||
|
||||
public FT_Flammable(long energy) {
|
||||
this.energy = energy;
|
||||
}
|
||||
@ -28,4 +33,14 @@ public class FT_Flammable extends FluidTrait {
|
||||
if(energy > 0)
|
||||
info.add(EnumChatFormatting.YELLOW + "Provides " + EnumChatFormatting.RED + "" + BobMathUtil.getShortNumber(energy) + "TU " + EnumChatFormatting.YELLOW + "per bucket");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serializeJSON(JsonWriter writer) throws IOException {
|
||||
writer.name("energy").value(energy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserializeJSON(JsonObject obj) {
|
||||
this.energy = obj.get("energy").getAsLong();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,18 @@
|
||||
package com.hbm.inventory.fluid.trait;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.inventory.fluid.FluidType;
|
||||
import com.hbm.inventory.fluid.Fluids;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class FT_Heatable extends FluidTrait {
|
||||
|
||||
@ -71,4 +77,45 @@ public class FT_Heatable extends FluidTrait {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serializeJSON(JsonWriter writer) throws IOException {
|
||||
|
||||
writer.name("steps").beginArray();
|
||||
|
||||
for(HeatingStep step : steps) {
|
||||
writer.beginObject();
|
||||
writer.name("typeProduced").value(step.typeProduced.getUnlocalizedName());
|
||||
writer.name("amountReq").value(step.amountReq);
|
||||
writer.name("amountProd").value(step.amountProduced);
|
||||
writer.name("heatReq").value(step.heatReq);
|
||||
writer.endObject();
|
||||
}
|
||||
|
||||
writer.endArray();
|
||||
|
||||
for(Entry<HeatingType, Double> entry : this.efficiency.entrySet()) {
|
||||
writer.name(entry.getKey().name()).value(entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserializeJSON(JsonObject obj) {
|
||||
|
||||
JsonArray steps = obj.get("steps").getAsJsonArray();
|
||||
|
||||
for(int i = 0; i < steps.size(); i++) {
|
||||
JsonObject step = steps.get(i).getAsJsonObject();
|
||||
this.steps.add(new HeatingStep(
|
||||
step.get("amountReq").getAsInt(),
|
||||
step.get("heatReq").getAsInt(),
|
||||
Fluids.fromName(step.get("typeProduced").getAsString()),
|
||||
step.get("amountProd").getAsInt()
|
||||
));
|
||||
}
|
||||
|
||||
for(HeatingType type : HeatingType.values()) {
|
||||
if(obj.has(type.name())) efficiency.put(type, obj.get(type.name()).getAsDouble());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
package com.hbm.inventory.fluid.trait;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
@Deprecated //use FT_Toxin instead
|
||||
@ -10,6 +14,8 @@ public class FT_Poison extends FluidTrait {
|
||||
protected boolean withering = false;
|
||||
protected int level = 0;
|
||||
|
||||
public FT_Poison() { }
|
||||
|
||||
public FT_Poison(boolean withering, int level) {
|
||||
this.withering = withering;
|
||||
this.level = level;
|
||||
@ -27,4 +33,14 @@ public class FT_Poison extends FluidTrait {
|
||||
public void addInfoHidden(List<String> info) {
|
||||
info.add(EnumChatFormatting.GREEN + "[Toxic Fumes]");
|
||||
}
|
||||
|
||||
@Override public void serializeJSON(JsonWriter writer) throws IOException {
|
||||
writer.name("level").value(this.level);
|
||||
writer.name("withering").value(this.withering);
|
||||
}
|
||||
|
||||
@Override public void deserializeJSON(JsonObject obj) {
|
||||
this.level = obj.get("level").getAsInt();
|
||||
this.withering = obj.get("withering").getAsBoolean();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,8 +1,12 @@
|
||||
package com.hbm.inventory.fluid.trait;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.util.ArmorRegistry;
|
||||
import com.hbm.util.ArmorUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
@ -132,4 +136,76 @@ public class FT_Toxin extends FluidTrait {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void serializeJSON(JsonWriter writer) throws IOException {
|
||||
|
||||
writer.name("entries").beginArray();
|
||||
|
||||
for(ToxinEntry entry : entries) {
|
||||
writer.beginObject();
|
||||
|
||||
if(entry instanceof ToxinDirectDamage) {
|
||||
ToxinDirectDamage e = (ToxinDirectDamage) entry;
|
||||
writer.name("type").value("directdamage");
|
||||
writer.name("amount").value(e.amount);
|
||||
writer.name("source").value(e.damage.damageType);
|
||||
writer.name("delay").value(e.delay);
|
||||
writer.name("hazmat").value(e.fullBody);
|
||||
writer.name("masktype").value(e.clazz.name());
|
||||
}
|
||||
if(entry instanceof ToxinEffects) {
|
||||
ToxinEffects e = (ToxinEffects) entry;
|
||||
writer.name("type").value("effects");
|
||||
writer.name("effects").beginArray();
|
||||
writer.setIndent("");
|
||||
for(PotionEffect effect : e.effects) {
|
||||
writer.beginArray();
|
||||
writer.value(effect.getPotionID()).value(effect.getDuration()).value(effect.getAmplifier()).value(effect.getIsAmbient());
|
||||
writer.endArray();
|
||||
}
|
||||
writer.endArray();
|
||||
writer.setIndent(" ");
|
||||
writer.name("hazmat").value(e.fullBody);
|
||||
writer.name("masktype").value(e.clazz.name());
|
||||
}
|
||||
|
||||
writer.endObject();
|
||||
}
|
||||
|
||||
writer.endArray();
|
||||
}
|
||||
|
||||
@Override public void deserializeJSON(JsonObject obj) {
|
||||
JsonArray array = obj.get("entries").getAsJsonArray();
|
||||
|
||||
for(int i = 0; i < array.size(); i++) {
|
||||
JsonObject entry = array.get(i).getAsJsonObject();
|
||||
String name = entry.get("type").getAsString();
|
||||
|
||||
if(name.equals("directdamage")) {
|
||||
ToxinDirectDamage e = new ToxinDirectDamage(
|
||||
new DamageSource(entry.get("source").getAsString()),
|
||||
entry.get("amount").getAsFloat(),
|
||||
entry.get("delay").getAsInt(),
|
||||
HazardClass.valueOf(entry.get("masktype").getAsString()),
|
||||
entry.get("hazmat").getAsBoolean()
|
||||
);
|
||||
this.entries.add(e);
|
||||
}
|
||||
|
||||
if(name.equals("effects")) {
|
||||
ToxinEffects e = new ToxinEffects(
|
||||
HazardClass.valueOf(entry.get("masktype").getAsString()),
|
||||
entry.get("hazmat").getAsBoolean()
|
||||
);
|
||||
JsonArray effects = entry.get("effects").getAsJsonArray();
|
||||
for(int j = 0; j < effects.size(); j++) {
|
||||
JsonArray effect = effects.get(j).getAsJsonArray();
|
||||
PotionEffect potion = new PotionEffect(effect.get(0).getAsInt(), effect.get(1).getAsInt(), effect.get(2).getAsInt(), effect.get(3).getAsBoolean());
|
||||
e.effects.add(potion);
|
||||
}
|
||||
this.entries.add(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
package com.hbm.inventory.fluid.trait;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
|
||||
@ -12,6 +15,8 @@ public class FT_VentRadiation extends FluidTrait {
|
||||
|
||||
float radPerMB = 0;
|
||||
|
||||
public FT_VentRadiation() { }
|
||||
|
||||
public FT_VentRadiation(float rad) {
|
||||
this.radPerMB = rad;
|
||||
}
|
||||
@ -29,4 +34,14 @@ public class FT_VentRadiation extends FluidTrait {
|
||||
public void addInfo(List<String> info) {
|
||||
info.add(EnumChatFormatting.YELLOW + "[Radioactive]");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void serializeJSON(JsonWriter writer) throws IOException {
|
||||
writer.name("radiation").value(radPerMB);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserializeJSON(JsonObject obj) {
|
||||
this.radPerMB = obj.get("radiation").getAsFloat();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,41 @@
|
||||
package com.hbm.inventory.fluid.trait;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.collect.HashBiMap;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||
import com.hbm.inventory.fluid.trait.FluidTraitSimple.*;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public abstract class FluidTrait {
|
||||
|
||||
public static HashBiMap<String, Class<? extends FluidTrait>> traitNameMap = HashBiMap.create();
|
||||
|
||||
static {
|
||||
traitNameMap.put("combustible", FT_Combustible.class); // x
|
||||
traitNameMap.put("coolable", FT_Coolable.class); // x
|
||||
traitNameMap.put("corrosive", FT_Corrosive.class); // x
|
||||
traitNameMap.put("flammable", FT_Flammable.class); // x
|
||||
traitNameMap.put("heatable", FT_Heatable.class); // x
|
||||
traitNameMap.put("poison", FT_Poison.class); // x
|
||||
traitNameMap.put("toxin", FT_Toxin.class); // x
|
||||
traitNameMap.put("ventradiation", FT_VentRadiation.class); // x
|
||||
|
||||
traitNameMap.put("gaseous", FT_Gaseous.class);
|
||||
traitNameMap.put("gaseous_art", FT_Gaseous_ART.class);
|
||||
traitNameMap.put("liquid", FT_Liquid.class);
|
||||
traitNameMap.put("viscous", FT_Viscous.class);
|
||||
traitNameMap.put("plasma", FT_Plasma.class);
|
||||
traitNameMap.put("amat", FT_Amat.class);
|
||||
traitNameMap.put("leadcontainer", FT_LeadContainer.class);
|
||||
traitNameMap.put("delicious", FT_Delicious.class);
|
||||
traitNameMap.put("noid", FT_NoID.class);
|
||||
traitNameMap.put("nocontainer", FT_NoContainer.class);
|
||||
}
|
||||
|
||||
/** Important information that should always be displayed */
|
||||
public void addInfo(List<String> info) { }
|
||||
@ -14,4 +43,7 @@ public abstract class FluidTrait {
|
||||
public void addInfoHidden(List<String> info) { }
|
||||
|
||||
public void onFluidRelease(World world, int x, int y, int z, FluidTank tank, int overflowAmount) { }
|
||||
|
||||
public void serializeJSON(JsonWriter writer) throws IOException { }
|
||||
public void deserializeJSON(JsonObject obj) { }
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user