mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Merge branch 'v9' into 1.8.9
This commit is contained in:
commit
ac39b6fabe
78 files changed
+1059
-905
No files matched your search
@@ -495,6 +495,77 @@ public final class Tier
|
||||
}
|
||||
}
|
||||
|
||||
public static enum ConductorTier
|
||||
{
|
||||
BASIC(5, 1, 0, new ColourRGBA(0.2, 0.2, 0.2, 1), TransmitterType.THERMODYNAMIC_CONDUCTOR_BASIC),
|
||||
ADVANCED(5, 1, 0, new ColourRGBA(0.2, 0.2, 0.2, 1), TransmitterType.THERMODYNAMIC_CONDUCTOR_ADVANCED),
|
||||
ELITE(5, 1, 0, new ColourRGBA(0.2, 0.2, 0.2, 1), TransmitterType.THERMODYNAMIC_CONDUCTOR_ELITE),
|
||||
ULTIMATE(5, 1, 0, new ColourRGBA(0.2, 0.2, 0.2, 1), TransmitterType.THERMODYNAMIC_CONDUCTOR_ULTIMATE);
|
||||
|
||||
public BaseTier getBaseTier()
|
||||
{
|
||||
return BaseTier.values()[ordinal()];
|
||||
}
|
||||
|
||||
public double inverseConduction;
|
||||
private double baseConduction;
|
||||
|
||||
public double inverseHeatCapacity;
|
||||
private double baseHeatCapacity;
|
||||
|
||||
public double inverseConductionInsulation;
|
||||
private double baseConductionInsulation;
|
||||
|
||||
public ColourRGBA baseColour;
|
||||
|
||||
public TransmitterType type;
|
||||
|
||||
private ConductorTier(double inversek, double inverseC, double insulationInversek, ColourRGBA colour, TransmitterType transmitterType)
|
||||
{
|
||||
baseConduction = inverseConduction = inversek;
|
||||
baseHeatCapacity = inverseHeatCapacity = inverseC;
|
||||
baseConductionInsulation = inverseConductionInsulation = insulationInversek;
|
||||
|
||||
baseColour = colour;
|
||||
|
||||
type = transmitterType;
|
||||
}
|
||||
|
||||
protected void loadConfig()
|
||||
{
|
||||
inverseConduction = Mekanism.configuration.get("tier", getBaseTier().getName() + "ConductorInverseConduction", baseConduction).getDouble();
|
||||
inverseHeatCapacity = Mekanism.configuration.get("tier", getBaseTier().getName() + "ConductorHeatCapacity", baseHeatCapacity).getDouble();
|
||||
inverseConductionInsulation = Mekanism.configuration.get("tier", getBaseTier().getName() + "ConductorConductionInsulation", baseConductionInsulation).getDouble();
|
||||
}
|
||||
|
||||
protected void readConfig(ByteBuf dataStream)
|
||||
{
|
||||
inverseConduction = dataStream.readDouble();
|
||||
inverseHeatCapacity = dataStream.readDouble();
|
||||
inverseConductionInsulation = dataStream.readDouble();
|
||||
}
|
||||
|
||||
protected void writeConfig(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeDouble(inverseConduction);
|
||||
dataStream.writeDouble(inverseHeatCapacity);
|
||||
dataStream.writeDouble(inverseConductionInsulation);
|
||||
}
|
||||
|
||||
public static ConductorTier get(BaseTier tier)
|
||||
{
|
||||
for(ConductorTier transmitter : values())
|
||||
{
|
||||
if(transmitter.getBaseTier() == tier)
|
||||
{
|
||||
return transmitter;
|
||||
}
|
||||
}
|
||||
|
||||
return BASIC;
|
||||
}
|
||||
}
|
||||
|
||||
public static void loadConfig()
|
||||
{
|
||||
for(CableTier tier : CableTier.values())
|
||||
@@ -531,6 +602,11 @@ public final class Tier
|
||||
{
|
||||
tier.loadConfig();
|
||||
}
|
||||
|
||||
for(ConductorTier tier : ConductorTier.values())
|
||||
{
|
||||
tier.loadConfig();
|
||||
}
|
||||
}
|
||||
|
||||
public static void readConfig(ByteBuf dataStream)
|
||||
@@ -569,6 +645,11 @@ public final class Tier
|
||||
{
|
||||
tier.readConfig(dataStream);
|
||||
}
|
||||
|
||||
for(ConductorTier tier : ConductorTier.values())
|
||||
{
|
||||
tier.readConfig(dataStream);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
@@ -611,6 +692,11 @@ public final class Tier
|
||||
{
|
||||
tier.writeConfig(dataStream);
|
||||
}
|
||||
|
||||
for(ConductorTier tier : ConductorTier.values())
|
||||
{
|
||||
tier.writeConfig(dataStream);
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user