mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 23:03:01 +00:00
Merge pull request #158 from Thorfusion/Performance-Boost
Server Performance boost
This commit is contained in:
9 files changed
+80
-38
No files matched your search
+1
-1
@@ -1,2 +1,2 @@
|
||||
1.7.10:9.10.34:(22/22/24) FIXES for EVERYONE!
|
||||
1.7.10:9.10.35:(22/22/22) Server Performance boost!
|
||||
1.12.2:9.12.8:(22/22/22) FIXES for EVERYONE!
|
||||
@@ -67,6 +67,7 @@ Mekanism CE also has two dependencies that it requires, as a modpack creator DO
|
||||
| FEATURE: [Configurable radius digitalminer](https://github.com/Thorfusion/Mekanism-Community-Edition/issues/55) | :x: | :heavy_check_mark: |
|
||||
| FEATURE: [Whitelist dimension's for windmill](https://github.com/Thorfusion/Mekanism-Community-Edition/issues/16) | :x: | :heavy_check_mark: |
|
||||
| FEATURE: [Immersive Deuterium](https://github.com/Thorfusion/Mekanism-Community-Edition/pull/94) | :x: | :heavy_check_mark: |
|
||||
| PERFORMANCE: [Fix Infinite Heat Transfers](https://github.com/Thorfusion/Mekanism-Community-Edition/pull/158) | :x: | :heavy_check_mark: |
|
||||
| NEW FEATURES, BUGFIXES & MORE! | :x: | :heavy_check_mark: |
|
||||
|
||||
### Full changelog
|
||||
@@ -152,6 +153,7 @@ Note that changes not by the mekanism ce team has been added by us from their re
|
||||
+ Fixes CMEs crashes in https://github.com/Thorfusion/Mekanism-Community-Edition/pull/141
|
||||
+ Plat Compat Shenanigans in https://github.com/Thorfusion/Mekanism-Community-Edition/pull/142
|
||||
+ Patch Personal Chest dupe in https://github.com/Thorfusion/Mekanism-Community-Edition/pull/143
|
||||
+ Fixed lag with in heat transferring devices https://github.com/Thorfusion/Mekanism-Community-Edition/pull/158
|
||||
|
||||
#### leytilera
|
||||
+ universal cable connection to IC2
|
||||
|
||||
+2
-2
@@ -4,5 +4,5 @@ FMP_version=1.2.0.345
|
||||
CCLIB_version=1.1.3.141
|
||||
NEI_version=1.0.5.120
|
||||
CCC_version=1.0.7.48
|
||||
mod_version=9.10.34
|
||||
alt_version=9, 10, 34
|
||||
mod_version=9.10.35
|
||||
alt_version=9, 10, 35
|
||||
@@ -142,9 +142,14 @@ public class SynchronizedBoilerData extends SynchronizedData<SynchronizedBoilerD
|
||||
@Override
|
||||
public double applyTemperatureChange()
|
||||
{
|
||||
temperature += heatToAbsorb / locations.size();
|
||||
if (heatToAbsorb < 0) { // Heat subtraction
|
||||
double newTemperature = temperature + (heatToAbsorb / locations.size());
|
||||
temperature = newTemperature >= 0.01 ? newTemperature : 0.0;
|
||||
} else {
|
||||
temperature += heatToAbsorb / locations.size();
|
||||
}
|
||||
heatToAbsorb = 0;
|
||||
|
||||
|
||||
return temperature;
|
||||
}
|
||||
|
||||
|
||||
@@ -215,7 +215,12 @@ public class PartThermodynamicConductor extends PartTransmitter<IHeatTransfer, H
|
||||
@Override
|
||||
public double applyTemperatureChange()
|
||||
{
|
||||
temperature += tier.inverseHeatCapacity * heatToAbsorb;
|
||||
if (heatToAbsorb < 0) { // Heat subtraction
|
||||
double newTemperature = temperature + (tier.inverseHeatCapacity * heatToAbsorb);
|
||||
temperature = newTemperature >= 0.01 ? newTemperature : 0.0;
|
||||
} else {
|
||||
temperature += tier.inverseHeatCapacity * heatToAbsorb;
|
||||
}
|
||||
heatToAbsorb = 0;
|
||||
|
||||
if(Math.abs(temperature - clientTemperature) > (temperature / 100))
|
||||
|
||||
@@ -25,11 +25,13 @@ public class TileEntityFuelwoodHeater extends TileEntityContainerBlock implement
|
||||
{
|
||||
public double temperature;
|
||||
public double heatToAbsorb = 0;
|
||||
|
||||
|
||||
public int burnTime;
|
||||
public int maxBurnTime;
|
||||
|
||||
/** Whether or not this machine is in it's active state. */
|
||||
public ItemStack nonBurnable;
|
||||
|
||||
|
||||
/** Whether this machine is in its active state. */
|
||||
public boolean isActive;
|
||||
|
||||
/** The client's current active state. */
|
||||
@@ -73,44 +75,51 @@ public class TileEntityFuelwoodHeater extends TileEntityContainerBlock implement
|
||||
Mekanism.packetHandler.sendToReceivers(new TileEntityMessage(Coord4D.get(this), getNetworkedData(new ArrayList())), new Range4D(Coord4D.get(this)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
boolean burning = false;
|
||||
|
||||
|
||||
if(burnTime > 0)
|
||||
{
|
||||
burnTime--;
|
||||
burning = true;
|
||||
}
|
||||
else {
|
||||
if(inventory[0] != null)
|
||||
{
|
||||
maxBurnTime = burnTime = TileEntityFurnace.getItemBurnTime(inventory[0])/2;
|
||||
|
||||
if(burnTime > 0)
|
||||
{
|
||||
inventory[0].stackSize--;
|
||||
|
||||
if(inventory[0].stackSize == 0)
|
||||
{
|
||||
inventory[0] = inventory[0].getItem().getContainerItem(inventory[0]);
|
||||
if (inventory[0] != null && inventory[0] != nonBurnable) {
|
||||
int fuelTime = TileEntityFurnace.getItemBurnTime(inventory[0]);
|
||||
|
||||
if (fuelTime > 0) {
|
||||
nonBurnable = null;
|
||||
maxBurnTime = burnTime = fuelTime / 2;
|
||||
|
||||
if (burnTime > 0) {
|
||||
inventory[0].stackSize--;
|
||||
|
||||
if (inventory[0].stackSize == 0) {
|
||||
inventory[0] = inventory[0].getItem().getContainerItem(inventory[0]);
|
||||
}
|
||||
|
||||
burning = true;
|
||||
}
|
||||
|
||||
burning = true;
|
||||
} else {
|
||||
nonBurnable = inventory[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(burning)
|
||||
{
|
||||
heatToAbsorb += general.heatPerFuelTick;
|
||||
setActive(true);
|
||||
} else if (isActive) {
|
||||
setActive(false);
|
||||
}
|
||||
|
||||
if (burning || temperature > 0) {
|
||||
double[] loss = simulateHeat();
|
||||
applyTemperatureChange();
|
||||
lastEnvironmentLoss = loss[1];
|
||||
}
|
||||
|
||||
double[] loss = simulateHeat();
|
||||
applyTemperatureChange();
|
||||
|
||||
lastEnvironmentLoss = loss[1];
|
||||
|
||||
setActive(burning);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +260,12 @@ public class TileEntityFuelwoodHeater extends TileEntityContainerBlock implement
|
||||
@Override
|
||||
public double applyTemperatureChange()
|
||||
{
|
||||
temperature += heatToAbsorb;
|
||||
if (heatToAbsorb < 0) { // Heat subtraction
|
||||
double newTemperature = temperature + heatToAbsorb;
|
||||
temperature = newTemperature >= 0.01 ? newTemperature : 0.0;
|
||||
} else {
|
||||
temperature += heatToAbsorb;
|
||||
}
|
||||
heatToAbsorb = 0;
|
||||
|
||||
return temperature;
|
||||
|
||||
@@ -610,7 +610,12 @@ public class TileEntityQuantumEntangloporter extends TileEntityElectricBlock imp
|
||||
{
|
||||
if(hasFrequency())
|
||||
{
|
||||
frequency.temperature += heatToAbsorb;
|
||||
if (heatToAbsorb < 0) { // Heat subtraction
|
||||
double newTemperature = frequency.temperature + heatToAbsorb;
|
||||
frequency.temperature = newTemperature >= 0.01 ? newTemperature : 0.0;
|
||||
} else {
|
||||
frequency.temperature += heatToAbsorb;
|
||||
}
|
||||
}
|
||||
|
||||
heatToAbsorb = 0;
|
||||
|
||||
@@ -241,11 +241,16 @@ public class TileEntityResistiveHeater extends TileEntityNoisyElectricBlock impl
|
||||
}
|
||||
|
||||
@Override
|
||||
public double applyTemperatureChange()
|
||||
public double applyTemperatureChange()
|
||||
{
|
||||
temperature += heatToAbsorb;
|
||||
if (heatToAbsorb < 0) { // Heat subtraction
|
||||
double newTemperature = temperature + heatToAbsorb;
|
||||
temperature = newTemperature >= 0.01 ? newTemperature : 0.0;
|
||||
} else {
|
||||
temperature += heatToAbsorb;
|
||||
}
|
||||
heatToAbsorb = 0;
|
||||
|
||||
|
||||
return temperature;
|
||||
}
|
||||
|
||||
|
||||
@@ -437,7 +437,13 @@ public class TileEntityHeatGenerator extends TileEntityGenerator implements IFlu
|
||||
@Override
|
||||
public double applyTemperatureChange()
|
||||
{
|
||||
temperature += invHeatCapacity * heatToAbsorb;
|
||||
if (heatToAbsorb < 0) { // Heat subtraction
|
||||
double newTemperature = temperature + (invHeatCapacity * heatToAbsorb);
|
||||
temperature = newTemperature >= 0.01 ? newTemperature : 0.0;
|
||||
} else {
|
||||
temperature += invHeatCapacity * heatToAbsorb;
|
||||
}
|
||||
|
||||
heatToAbsorb = 0;
|
||||
return temperature;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user