mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Merge branch 'development' into 1.9.4
* development: Fixed Turbines unable to be formed in other dimensions Bump version to 9.0.2 Fixed Personal Chest crash, bumped default Fuelwood Heater generation, added some null checks to prevent crashes Fixed outputting energy above Integer.MAX_VALUE to other mods, fixed tiered factories not supporting muffling upgrades, fixed boiler valve height interaction Conflicts: src/main/java/mekanism/common/LaserManager.java src/main/java/mekanism/common/Mekanism.java src/main/java/mekanism/common/block/BlockMachine.java src/main/java/mekanism/common/entity/EntityFlame.java src/main/java/mekanism/common/tile/TileEntityBoilerValve.java src/main/java/mekanism/common/tile/TileEntityDigitalMiner.java src/main/java/mekanism/common/tile/TileEntityLaser.java src/main/java/mekanism/common/tile/TileEntityLaserAmplifier.java src/main/java/mekanism/common/tile/TileEntityLaserTractorBeam.java src/main/java/mekanism/common/util/MekanismUtils.java src/main/java/mekanism/generators/common/tile/TileEntityAdvancedSolarGenerator.java
This commit is contained in:
commit
eb7c2d1b78
19 files changed
+38
-41
No files matched your search
@@ -86,9 +86,9 @@ public class Chunk3D
|
||||
}
|
||||
|
||||
@Override
|
||||
public Coord4D clone()
|
||||
public Chunk3D clone()
|
||||
{
|
||||
return new Coord4D(xCoord, zCoord, dimensionId);
|
||||
return new Chunk3D(xCoord, zCoord, dimensionId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -34,21 +34,6 @@ public class Coord4D
|
||||
public int zCoord;
|
||||
|
||||
public int dimensionId;
|
||||
|
||||
/**
|
||||
* Creates a Coord4D WITHOUT a dimensionId. Don't use unless absolutely necessary.
|
||||
* @param x - x coordinate
|
||||
* @param y - y coordinate
|
||||
* @param z - z coordinate
|
||||
*/
|
||||
public Coord4D(int x, int y, int z)
|
||||
{
|
||||
xCoord = x;
|
||||
yCoord = y;
|
||||
zCoord = z;
|
||||
|
||||
dimensionId = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Coord4D from an entity's position, rounded down.
|
||||
|
||||
@@ -64,7 +64,7 @@ public class MekanismConfig
|
||||
public static double energyPerHeat = 1000;
|
||||
public static double maxEnergyPerSteam = 100;
|
||||
public static double superheatingHeatTransfer = 10000;
|
||||
public static double heatPerFuelTick = 1;
|
||||
public static double heatPerFuelTick = 4;
|
||||
}
|
||||
|
||||
public static class client
|
||||
|
||||
@@ -43,7 +43,7 @@ public class GuiSeismicReader extends GuiScreen
|
||||
|
||||
public GuiSeismicReader(World world, Coord4D coord, ItemStack stack)
|
||||
{
|
||||
pos = new Coord4D(coord.xCoord, Math.min(255, coord.yCoord), coord.zCoord);
|
||||
pos = new Coord4D(coord.xCoord, Math.min(255, coord.yCoord), coord.zCoord, worldObj.provider.getDimension());
|
||||
worldObj = world;
|
||||
|
||||
itemStack = stack;
|
||||
|
||||
@@ -260,7 +260,7 @@ public class CommonProxy implements IGuiProvider
|
||||
general.energyPerHeat = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EnergyPerHeat", 1000D).getDouble();
|
||||
general.maxEnergyPerSteam = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "MaxEnergyPerSteam", 100D).getDouble();
|
||||
general.superheatingHeatTransfer = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "SuperheatingHeatTransfer", 10000D).getDouble();
|
||||
general.heatPerFuelTick = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "HeatPerFuelTick", 1D).getDouble();
|
||||
general.heatPerFuelTick = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "HeatPerFuelTick", 4D).getDouble();
|
||||
|
||||
general.blacklistIC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistIC2Power", false).getBoolean();
|
||||
general.blacklistRF = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "BlacklistRFPower", false).getBoolean();
|
||||
|
||||
@@ -160,7 +160,7 @@ import com.mojang.authlib.GameProfile;
|
||||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
@Mod(modid = "Mekanism", name = "Mekanism", version = "9.0.1", guiFactory = "mekanism.client.gui.ConfigGuiFactory",
|
||||
@Mod(modid = "Mekanism", name = "Mekanism", version = "9.0.2", guiFactory = "mekanism.client.gui.ConfigGuiFactory",
|
||||
dependencies = "after:mcmultipart;after:JEI;after:BuildCraft;after:BuildCraftAPI;after:IC2;after:CoFHCore;" +
|
||||
"after:ComputerCraft;after:Galacticraft API;after:MetallurgyCore")
|
||||
public class Mekanism
|
||||
@@ -186,7 +186,7 @@ public class Mekanism
|
||||
public static Configuration configuration;
|
||||
|
||||
/** Mekanism version number */
|
||||
public static Version versionNumber = new Version(9, 0, 1);
|
||||
public static Version versionNumber = new Version(9, 0, 2);
|
||||
|
||||
/** MultiblockManagers for various structrures */
|
||||
public static MultiblockManager<SynchronizedTankData> tankManager = new MultiblockManager<SynchronizedTankData>("dynamicTank");
|
||||
|
||||
@@ -209,4 +209,4 @@ public abstract class EnergyAcceptorWrapper implements IStrictEnergyAcceptor
|
||||
return eu * general.FROM_IC2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -960,6 +960,11 @@ public abstract class BlockMachine extends BlockContainer implements ICTMBlock
|
||||
{
|
||||
MachineType type = MachineType.get(getMachineBlock(), state.getBlock().getMetaFromState(state));
|
||||
|
||||
if(type == null)
|
||||
{
|
||||
return super.getBoundingBox(state, world, pos);
|
||||
}
|
||||
|
||||
switch(type)
|
||||
{
|
||||
case CHARGEPAD:
|
||||
|
||||
@@ -172,7 +172,7 @@ public class BoilerUpdateProtocol extends UpdateProtocol<SynchronizedBoilerData>
|
||||
int steamHeight = (structure.renderLocation.yCoord+structure.volHeight-2)-initDisperser.yCoord;
|
||||
structure.steamVolume = structure.volWidth*structure.volLength*steamHeight;
|
||||
|
||||
structure.upperRenderLocation = new Coord4D(structure.renderLocation.xCoord, initDisperser.yCoord+1, structure.renderLocation.zCoord);
|
||||
structure.upperRenderLocation = new Coord4D(structure.renderLocation.xCoord, initDisperser.yCoord+1, structure.renderLocation.zCoord, pointer.getWorld().provider.getDimension());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package mekanism.common.tile;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.common.SideData;
|
||||
import mekanism.common.Upgrade;
|
||||
import mekanism.common.Tier.FactoryTier;
|
||||
import mekanism.common.block.states.BlockStateMachine;
|
||||
import mekanism.common.tile.component.TileComponentConfig;
|
||||
@@ -33,6 +34,8 @@ public class TileEntityAdvancedFactory extends TileEntityFactory
|
||||
configComponent.setInputConfig(TransmissionType.ENERGY);
|
||||
|
||||
upgradeComponent = new TileComponentUpgrade(this, 0);
|
||||
upgradeComponent.setSupported(Upgrade.MUFFLING);
|
||||
|
||||
ejectorComponent = new TileComponentEjector(this);
|
||||
ejectorComponent.setOutputData(TransmissionType.ITEM, configComponent.getOutputs(TransmissionType.ITEM).get(2));
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl
|
||||
|
||||
if(!worldObj.isRemote)
|
||||
{
|
||||
if(structure != null && structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord)
|
||||
if(structure != null && structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord-1)
|
||||
{
|
||||
if(structure.steamStored != null && structure.steamStored.amount > 0)
|
||||
{
|
||||
@@ -63,7 +63,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl
|
||||
{
|
||||
if((!worldObj.isRemote && structure != null) || (worldObj.isRemote && clientHasStructure))
|
||||
{
|
||||
if(structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord)
|
||||
if(structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord-1)
|
||||
{
|
||||
return new FluidTankInfo[] {steamTank.getInfo()};
|
||||
}
|
||||
@@ -78,7 +78,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl
|
||||
@Override
|
||||
public int fill(EnumFacing from, FluidStack resource, boolean doFill)
|
||||
{
|
||||
if(structure != null && structure.upperRenderLocation != null && getPos().getY() < structure.upperRenderLocation.yCoord)
|
||||
if(structure != null && structure.upperRenderLocation != null && getPos().getY() < structure.upperRenderLocation.yCoord-1)
|
||||
{
|
||||
return waterTank.fill(resource, doFill);
|
||||
}
|
||||
@@ -89,7 +89,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl
|
||||
@Override
|
||||
public FluidStack drain(EnumFacing from, FluidStack resource, boolean doDrain)
|
||||
{
|
||||
if(structure != null && structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord)
|
||||
if(structure != null && structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord-1)
|
||||
{
|
||||
if(structure.steamStored != null)
|
||||
{
|
||||
@@ -106,7 +106,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl
|
||||
@Override
|
||||
public FluidStack drain(EnumFacing from, int maxDrain, boolean doDrain)
|
||||
{
|
||||
if(structure != null && structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord)
|
||||
if(structure != null && structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord-1)
|
||||
{
|
||||
return steamTank.drain(maxDrain, doDrain);
|
||||
}
|
||||
@@ -119,7 +119,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl
|
||||
{
|
||||
if((!worldObj.isRemote && structure != null) || (worldObj.isRemote && clientHasStructure))
|
||||
{
|
||||
return structure.upperRenderLocation != null && getPos().getY() < structure.upperRenderLocation.yCoord;
|
||||
return structure.upperRenderLocation != null && getPos().getY() < structure.upperRenderLocation.yCoord-1;
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -130,7 +130,7 @@ public class TileEntityBoilerValve extends TileEntityBoilerCasing implements IFl
|
||||
{
|
||||
if((!worldObj.isRemote && structure != null) || (worldObj.isRemote && clientHasStructure))
|
||||
{
|
||||
return structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord;
|
||||
return structure.upperRenderLocation != null && getPos().getY() >= structure.upperRenderLocation.yCoord-1;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -3,6 +3,7 @@ package mekanism.common.tile;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.common.SideData;
|
||||
import mekanism.common.Upgrade;
|
||||
import mekanism.common.Tier.FactoryTier;
|
||||
import mekanism.common.block.states.BlockStateMachine;
|
||||
import mekanism.common.tile.component.TileComponentConfig;
|
||||
@@ -33,6 +34,8 @@ public class TileEntityEliteFactory extends TileEntityFactory
|
||||
configComponent.setInputConfig(TransmissionType.ENERGY);
|
||||
|
||||
upgradeComponent = new TileComponentUpgrade(this, 0);
|
||||
upgradeComponent.setSupported(Upgrade.MUFFLING);
|
||||
|
||||
ejectorComponent = new TileComponentEjector(this);
|
||||
ejectorComponent.setOutputData(TransmissionType.ITEM, configComponent.getOutputs(TransmissionType.ITEM).get(2));
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ public class TileEntityPersonalChest extends TileEntityContainerBlock implements
|
||||
else {
|
||||
if(INV == null)
|
||||
{
|
||||
INV = new int[55];
|
||||
INV = new int[54];
|
||||
|
||||
for(int i = 0; i < INV.length; i++)
|
||||
{
|
||||
|
||||
@@ -251,7 +251,8 @@ public final class CableUtils
|
||||
|
||||
if(handler.canConnectEnergy(side.getOpposite()))
|
||||
{
|
||||
int used = handler.receiveEnergy(side.getOpposite(), (int)Math.round(currentSending*general.TO_TE), false);
|
||||
int toSend = Math.min((int)Math.round(currentSending*general.TO_TE), Integer.MAX_VALUE);
|
||||
int used = handler.receiveEnergy(side.getOpposite(), toSend, false);
|
||||
sent += used*general.FROM_TE;
|
||||
}
|
||||
}
|
||||
@@ -260,7 +261,7 @@ public final class CableUtils
|
||||
if(((IEnergySink)tileEntity).acceptsEnergyFrom((TileEntity)from, side.getOpposite()))
|
||||
{
|
||||
double toSend = Math.min(currentSending, EnergyNet.instance.getPowerFromTier(((IEnergySink)tileEntity).getSinkTier())*general.FROM_IC2);
|
||||
toSend = Math.min(toSend, ((IEnergySink)tileEntity).getDemandedEnergy()*general.FROM_IC2);
|
||||
toSend = Math.min(Math.min(toSend, ((IEnergySink)tileEntity).getDemandedEnergy()*general.FROM_IC2), Integer.MAX_VALUE);
|
||||
sent += (toSend - (((IEnergySink)tileEntity).injectEnergy(side.getOpposite(), toSend*general.TO_IC2, 0)*general.FROM_IC2));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class RenderIndustrialTurbine extends TileEntitySpecialRenderer
|
||||
|
||||
public void renderAModelAt(TileEntityTurbineCasing tileEntity, double x, double y, double z, float partialTick, int destroyStage)
|
||||
{
|
||||
if(tileEntity.clientHasStructure && tileEntity.isRendering && tileEntity.structure != null)
|
||||
if(tileEntity.clientHasStructure && tileEntity.isRendering && tileEntity.structure != null && tileEntity.structure.complex != null)
|
||||
{
|
||||
RenderTurbineRotor.internalRender = true;
|
||||
Coord4D coord = tileEntity.structure.complex;
|
||||
|
||||
@@ -43,7 +43,7 @@ import net.minecraftforge.oredict.OreDictionary;
|
||||
import buildcraft.api.fuels.BuildcraftFuelRegistry;
|
||||
import buildcraft.api.fuels.IFuel;
|
||||
|
||||
@Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "9.0.1", dependencies = "required-after:Mekanism", guiFactory = "mekanism.generators.client.gui.GeneratorsGuiFactory")
|
||||
@Mod(modid = "MekanismGenerators", name = "MekanismGenerators", version = "9.0.2", dependencies = "required-after:Mekanism", guiFactory = "mekanism.generators.client.gui.GeneratorsGuiFactory")
|
||||
public class MekanismGenerators implements IModule
|
||||
{
|
||||
@SidedProxy(clientSide = "mekanism.generators.client.GeneratorsClientProxy", serverSide = "mekanism.generators.common.GeneratorsCommonProxy")
|
||||
@@ -53,7 +53,7 @@ public class MekanismGenerators implements IModule
|
||||
public static MekanismGenerators instance;
|
||||
|
||||
/** MekanismGenerators version number */
|
||||
public static Version versionNumber = new Version(9, 0, 1);
|
||||
public static Version versionNumber = new Version(9, 0, 2);
|
||||
|
||||
public static MultiblockManager<SynchronizedTurbineData> turbineManager = new MultiblockManager<SynchronizedTurbineData>("industrialTurbine");
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ public class TurbineUpdateProtocol extends UpdateProtocol<SynchronizedTurbineDat
|
||||
return false;
|
||||
}
|
||||
|
||||
dispersers.remove(new Coord4D(x, complex.yCoord, z));
|
||||
dispersers.remove(new Coord4D(x, complex.yCoord, z, pointer.getWorld().provider.getDimension()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
|
||||
@Mod(modid = "MekanismTools", name = "MekanismTools", version = "9.0.1", dependencies = "required-after:Mekanism", guiFactory = "mekanism.tools.client.gui.ToolsGuiFactory")
|
||||
@Mod(modid = "MekanismTools", name = "MekanismTools", version = "9.0.2", dependencies = "required-after:Mekanism", guiFactory = "mekanism.tools.client.gui.ToolsGuiFactory")
|
||||
public class MekanismTools implements IModule
|
||||
{
|
||||
@SidedProxy(clientSide = "mekanism.tools.client.ToolsClientProxy", serverSide = "mekanism.tools.common.ToolsCommonProxy")
|
||||
@@ -42,7 +42,7 @@ public class MekanismTools implements IModule
|
||||
public static MekanismTools instance;
|
||||
|
||||
/** MekanismTools version number */
|
||||
public static Version versionNumber = new Version(9, 0, 1);
|
||||
public static Version versionNumber = new Version(9, 0, 2);
|
||||
|
||||
//Enums: Tools
|
||||
public static ToolMaterial toolOBSIDIAN;
|
||||
|
||||
Reference in new issue
Block a user