mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-20 20:12:30 +00:00
Merge branch 'development' into v8
Conflicts: build.properties src/main/java/mekanism/api/gas/GasNetwork.java src/main/java/mekanism/api/transmitters/DynamicNetwork.java src/main/java/mekanism/client/ClientTickHandler.java src/main/java/mekanism/common/EnergyNetwork.java src/main/java/mekanism/common/FluidNetwork.java src/main/java/mekanism/common/Mekanism.java src/main/java/mekanism/common/recipe/RecipeHandler.java src/main/java/mekanism/generators/common/GeneratorsCommonProxy.java src/main/java/mekanism/generators/common/MekanismGenerators.java src/main/java/mekanism/generators/common/block/BlockGenerator.java
This commit is contained in:
commit
50f7df5f98
31 files changed
+143
-150
No files matched your search
@@ -53,6 +53,8 @@ public class MekanismConfig
|
||||
public static boolean oldTransmitterRender = false;
|
||||
public static boolean replaceSoundsWhenResuming = true;
|
||||
public static boolean renderCTM = true;
|
||||
public static boolean enableAmbientLighting;
|
||||
public static int ambientLightingLevel;
|
||||
}
|
||||
|
||||
public static class usage
|
||||
|
||||
@@ -202,10 +202,14 @@ public class ClientProxy extends CommonProxy
|
||||
client.oldTransmitterRender = Mekanism.configuration.get("client", "OldTransmitterRender", false).getBoolean();
|
||||
client.replaceSoundsWhenResuming = Mekanism.configuration.get("client", "ReplaceSoundsWhenResuming", true,
|
||||
"If true, will reduce lagging between player sounds. Setting to false will reduce GC load").getBoolean();
|
||||
client.renderCTM = Mekanism.configuration.get("client", "Use CTM Renderer", true).getBoolean();
|
||||
client.renderCTM = Mekanism.configuration.get("client", "CTMRenderer", true).getBoolean();
|
||||
client.enableAmbientLighting = Mekanism.configuration.get("client", "EnableAmbientLighting", true).getBoolean(true);
|
||||
client.ambientLightingLevel = Mekanism.configuration.get("client", "AmbientLightingLevel", 15).getInt(15);
|
||||
|
||||
if(Mekanism.configuration.hasChanged())
|
||||
{
|
||||
Mekanism.configuration.save();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -70,7 +70,7 @@ public class MekanismRenderer
|
||||
{
|
||||
for(EnumColor color : EnumColor.values())
|
||||
{
|
||||
colors[color.ordinal()] = event.map.registerIcon("mekanism:overlay/Overlay" + color.getLocalizedName().replace(" ", ""));
|
||||
colors[color.ordinal()] = event.map.registerIcon("mekanism:overlay/overlay_" + color.unlocalizedName);
|
||||
}
|
||||
|
||||
energyIcon = event.map.registerIcon("mekanism:LiquidEnergy");
|
||||
|
||||
@@ -104,66 +104,67 @@ public class RenderTickHandler
|
||||
font.drawStringWithShadow("Oxygen: " + scubaTank.getStored(stack), 1, y - 11, 0x404040);
|
||||
}
|
||||
}
|
||||
|
||||
Set<String> copy = (Set)((HashSet)Mekanism.jetpackOn).clone();
|
||||
|
||||
for(String s : copy)
|
||||
|
||||
synchronized(Mekanism.jetpackOn)
|
||||
{
|
||||
EntityPlayer p = mc.theWorld.getPlayerEntityByName(s);
|
||||
|
||||
if(p == null)
|
||||
for(String s : Mekanism.jetpackOn)
|
||||
{
|
||||
continue;
|
||||
EntityPlayer p = mc.theWorld.getPlayerEntityByName(s);
|
||||
|
||||
if(p == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Pos3D playerPos = new Pos3D(p);
|
||||
|
||||
if(p != mc.thePlayer)
|
||||
{
|
||||
playerPos.translate(0, 1.7, 0);
|
||||
}
|
||||
|
||||
float random = (rand.nextFloat() - 0.5F) * 0.1F;
|
||||
|
||||
Pos3D vLeft = new Pos3D();
|
||||
vLeft.xPos -= 0.43;
|
||||
vLeft.yPos -= 0.55;
|
||||
vLeft.zPos -= 0.54;
|
||||
vLeft.rotateYaw(p.renderYawOffset);
|
||||
|
||||
Pos3D vRight = new Pos3D();
|
||||
vRight.xPos += 0.43;
|
||||
vRight.yPos -= 0.55;
|
||||
vRight.zPos -= 0.54;
|
||||
vRight.rotateYaw(p.renderYawOffset);
|
||||
|
||||
Pos3D vCenter = new Pos3D();
|
||||
vCenter.xPos = (rand.nextFloat() - 0.5F) * 0.4F;
|
||||
vCenter.yPos -= 0.86;
|
||||
vCenter.zPos -= 0.30;
|
||||
vCenter.rotateYaw(p.renderYawOffset);
|
||||
|
||||
Pos3D rLeft = vLeft.clone().scale(random);
|
||||
Pos3D rRight = vRight.clone().scale(random);
|
||||
|
||||
Pos3D mLeft = vLeft.clone().scale(0.2).translate(new Pos3D(p.motionX, p.motionY, p.motionZ));
|
||||
Pos3D mRight = vRight.clone().scale(0.2).translate(new Pos3D(p.motionX, p.motionY, p.motionZ));
|
||||
Pos3D mCenter = vCenter.clone().scale(0.2).translate(new Pos3D(p.motionX, p.motionY, p.motionZ));
|
||||
|
||||
mLeft.translate(rLeft);
|
||||
mRight.translate(rRight);
|
||||
|
||||
Pos3D v = playerPos.clone().translate(vLeft);
|
||||
spawnAndSetParticle("flame", world, v.xPos, v.yPos, v.zPos, mLeft.xPos, mLeft.yPos, mLeft.zPos);
|
||||
spawnAndSetParticle("smoke", world, v.xPos, v.yPos, v.zPos, mLeft.xPos, mLeft.yPos, mLeft.zPos);
|
||||
|
||||
v = playerPos.clone().translate(vRight);
|
||||
spawnAndSetParticle("flame", world, v.xPos, v.yPos, v.zPos, mRight.xPos, mRight.yPos, mRight.zPos);
|
||||
spawnAndSetParticle("smoke", world, v.xPos, v.yPos, v.zPos, mRight.xPos, mRight.yPos, mRight.zPos);
|
||||
|
||||
v = playerPos.clone().translate(vCenter);
|
||||
spawnAndSetParticle("flame", world, v.xPos, v.yPos, v.zPos, mCenter.xPos, mCenter.yPos, mCenter.zPos);
|
||||
spawnAndSetParticle("smoke", world, v.xPos, v.yPos, v.zPos, mCenter.xPos, mCenter.yPos, mCenter.zPos);
|
||||
}
|
||||
|
||||
Pos3D playerPos = new Pos3D(p);
|
||||
|
||||
if(p != mc.thePlayer)
|
||||
{
|
||||
playerPos.translate(0, 1.7, 0);
|
||||
}
|
||||
|
||||
float random = (rand.nextFloat()-0.5F)*0.1F;
|
||||
|
||||
Pos3D vLeft = new Pos3D();
|
||||
vLeft.xPos -= 0.43;
|
||||
vLeft.yPos -= 0.55;
|
||||
vLeft.zPos -= 0.54;
|
||||
vLeft.rotateYaw(p.renderYawOffset);
|
||||
|
||||
Pos3D vRight = new Pos3D();
|
||||
vRight.xPos += 0.43;
|
||||
vRight.yPos -= 0.55;
|
||||
vRight.zPos -= 0.54;
|
||||
vRight.rotateYaw(p.renderYawOffset);
|
||||
|
||||
Pos3D vCenter = new Pos3D();
|
||||
vCenter.xPos = (rand.nextFloat()-0.5F)*0.4F;
|
||||
vCenter.yPos -= 0.86;
|
||||
vCenter.zPos -= 0.30;
|
||||
vCenter.rotateYaw(p.renderYawOffset);
|
||||
|
||||
Pos3D rLeft = vLeft.clone().scale(random);
|
||||
Pos3D rRight = vRight.clone().scale(random);
|
||||
|
||||
Pos3D mLeft = vLeft.clone().scale(0.2).translate(new Pos3D(p.motionX, p.motionY, p.motionZ));
|
||||
Pos3D mRight = vRight.clone().scale(0.2).translate(new Pos3D(p.motionX, p.motionY, p.motionZ));
|
||||
Pos3D mCenter = vCenter.clone().scale(0.2).translate(new Pos3D(p.motionX, p.motionY, p.motionZ));
|
||||
|
||||
mLeft.translate(rLeft);
|
||||
mRight.translate(rRight);
|
||||
|
||||
Pos3D v = playerPos.clone().translate(vLeft);
|
||||
spawnAndSetParticle("flame", world, v.xPos, v.yPos, v.zPos, mLeft.xPos, mLeft.yPos, mLeft.zPos);
|
||||
spawnAndSetParticle("smoke", world, v.xPos, v.yPos, v.zPos, mLeft.xPos, mLeft.yPos, mLeft.zPos);
|
||||
|
||||
v = playerPos.clone().translate(vRight);
|
||||
spawnAndSetParticle("flame", world, v.xPos, v.yPos, v.zPos, mRight.xPos, mRight.yPos, mRight.zPos);
|
||||
spawnAndSetParticle("smoke", world, v.xPos, v.yPos, v.zPos, mRight.xPos, mRight.yPos, mRight.zPos);
|
||||
|
||||
v = playerPos.clone().translate(vCenter);
|
||||
spawnAndSetParticle("flame", world, v.xPos, v.yPos, v.zPos, mCenter.xPos, mCenter.yPos, mCenter.zPos);
|
||||
spawnAndSetParticle("smoke", world, v.xPos, v.yPos, v.zPos, mCenter.xPos, mCenter.yPos, mCenter.zPos);
|
||||
}
|
||||
|
||||
if(world.getWorldTime() % 4 == 0)
|
||||
|
||||
@@ -336,13 +336,16 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
|
||||
@Override
|
||||
public int getLightValue(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
|
||||
if(client.machineEffects && tileEntity instanceof IActiveState)
|
||||
if(client.enableAmbientLighting)
|
||||
{
|
||||
if(((IActiveState)tileEntity).getActive() && ((IActiveState)tileEntity).lightUpdate())
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
|
||||
if(tileEntity instanceof IActiveState)
|
||||
{
|
||||
return 15;
|
||||
if(((IActiveState)tileEntity).getActive() && ((IActiveState)tileEntity).lightUpdate())
|
||||
{
|
||||
return client.ambientLightingLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -434,8 +437,8 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
|
||||
if(side == tileEntity.facing)
|
||||
{
|
||||
return MekanismUtils.isActive(world, x, y, z) ? icons[meta][1] : icons[meta][0];
|
||||
} else
|
||||
{
|
||||
}
|
||||
else {
|
||||
return icons[meta][2];
|
||||
}
|
||||
case 5:
|
||||
@@ -444,11 +447,12 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
|
||||
if(side == tileEntity.facing)
|
||||
{
|
||||
return icons[meta][0];
|
||||
} else if(side == 0 || side == 1)
|
||||
}
|
||||
else if(side == 0 || side == 1)
|
||||
{
|
||||
return icons[meta][2];
|
||||
} else
|
||||
{
|
||||
}
|
||||
else {
|
||||
return icons[meta][1];
|
||||
}
|
||||
default:
|
||||
@@ -462,8 +466,8 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
|
||||
if(side == tileEntity.facing)
|
||||
{
|
||||
return MekanismUtils.isActive(world, x, y, z) ? icons[meta][1] : icons[meta][0];
|
||||
} else
|
||||
{
|
||||
}
|
||||
else {
|
||||
return icons[meta][2];
|
||||
}
|
||||
default:
|
||||
@@ -517,6 +521,7 @@ public class BlockMachine extends BlockContainer implements ISpecialBounds, IPer
|
||||
itemMachine.setPrevScale(filled, 1);
|
||||
list.add(filled);
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
list.add(new ItemStack(item, 1, type.meta));
|
||||
|
||||
@@ -92,10 +92,13 @@ public class PacketJetpackData implements IMessageHandler<JetpackDataMessage, IM
|
||||
else if(packetType == JetpackPacket.FULL)
|
||||
{
|
||||
dataStream.writeInt(Mekanism.jetpackOn.size());
|
||||
|
||||
for(String username : Mekanism.jetpackOn)
|
||||
|
||||
synchronized(Mekanism.jetpackOn)
|
||||
{
|
||||
PacketHandler.writeString(dataStream, username);
|
||||
for (String username : Mekanism.jetpackOn)
|
||||
{
|
||||
PacketHandler.writeString(dataStream, username);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,10 +81,13 @@ public class PacketScubaTankData implements IMessageHandler<ScubaTankDataMessage
|
||||
else if(packetType == ScubaTankPacket.FULL)
|
||||
{
|
||||
dataStream.writeInt(Mekanism.gasmaskOn.size());
|
||||
|
||||
for(String name : Mekanism.gasmaskOn)
|
||||
|
||||
synchronized(Mekanism.gasmaskOn)
|
||||
{
|
||||
PacketHandler.writeString(dataStream, name);
|
||||
for (String name : Mekanism.gasmaskOn)
|
||||
{
|
||||
PacketHandler.writeString(dataStream, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mekanism.generators.client;
|
||||
|
||||
import mekanism.api.MekanismConfig.client;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.generators.client.gui.GuiBioGenerator;
|
||||
import mekanism.generators.client.gui.GuiGasGenerator;
|
||||
@@ -27,7 +28,6 @@ import mekanism.generators.common.tile.TileEntitySolarGenerator;
|
||||
import mekanism.generators.common.tile.TileEntityWindTurbine;
|
||||
import mekanism.generators.common.tile.reactor.TileEntityReactorController;
|
||||
import mekanism.generators.common.tile.reactor.TileEntityReactorNeutronCapture;
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -54,18 +54,6 @@ public class GeneratorsClientProxy extends GeneratorsCommonProxy
|
||||
ClientRegistry.registerTileEntity(TileEntityReactorController.class, "ReactorController", new RenderReactor());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void loadConfiguration()
|
||||
{
|
||||
super.loadConfiguration();
|
||||
|
||||
MekanismGeneratorsClient.enableAmbientLighting = Mekanism.configuration.get("generation", "EnableAmbientLighting", true).getBoolean(true);
|
||||
MekanismGeneratorsClient.ambientLightingLevel = Mekanism.configuration.get("generation", "AmbientLightingLevel", 15, "", 0, 15).getInt(15);
|
||||
|
||||
if(Mekanism.configuration.hasChanged())
|
||||
Mekanism.configuration.save();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerRenderInformation()
|
||||
{
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
package mekanism.generators.client;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import mekanism.generators.common.MekanismGenerators;
|
||||
|
||||
public class MekanismGeneratorsClient extends MekanismGenerators
|
||||
{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
//General Configuration
|
||||
public static boolean enableAmbientLighting;
|
||||
public static int ambientLightingLevel;
|
||||
|
||||
}
|
||||
@@ -78,6 +78,7 @@ public class GeneratorsCommonProxy
|
||||
generators.heatGenerationLava = Mekanism.configuration.get("generation", "HeatGenerationLava", 5D).getDouble(5D);
|
||||
generators.heatGenerationNether = Mekanism.configuration.get("generation", "HeatGenerationNether", 100D).getDouble(100D);
|
||||
generators.solarGeneration = Mekanism.configuration.get("generation", "SolarGeneration", 50D).getDouble(50D);
|
||||
|
||||
loadWindConfiguration();
|
||||
|
||||
if(Mekanism.configuration.hasChanged())
|
||||
|
||||
@@ -3,6 +3,7 @@ package mekanism.generators.common.block;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import mekanism.api.MekanismConfig.client;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.energy.IEnergizedItem;
|
||||
import mekanism.common.ItemAttacher;
|
||||
@@ -17,7 +18,6 @@ import mekanism.common.tile.TileEntityBasicBlock;
|
||||
import mekanism.common.tile.TileEntityElectricBlock;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.generators.client.GeneratorsClientProxy;
|
||||
import mekanism.generators.client.MekanismGeneratorsClient;
|
||||
import mekanism.generators.common.GeneratorsBlocks;
|
||||
import mekanism.generators.common.MekanismGenerators;
|
||||
import mekanism.generators.common.tile.TileEntityAdvancedSolarGenerator;
|
||||
@@ -137,7 +137,7 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IP
|
||||
@Override
|
||||
public int getLightValue(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
if(MekanismGeneratorsClient.enableAmbientLighting)
|
||||
if(client.enableAmbientLighting)
|
||||
{
|
||||
TileEntity tileEntity = world.getTileEntity(x, y, z);
|
||||
|
||||
@@ -145,7 +145,7 @@ public class BlockGenerator extends BlockContainer implements ISpecialBounds, IP
|
||||
{
|
||||
if(((IActiveState)tileEntity).getActive() && ((IActiveState)tileEntity).lightUpdate())
|
||||
{
|
||||
return MekanismGeneratorsClient.ambientLightingLevel;
|
||||
return client.ambientLightingLevel;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user