mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
v5.5.6 Beta #7
*No lighting updates for any form of transmitter. *Code cleanup
This commit is contained in:
1 parent
d7566428d5
commit
21571f8a65
6 files changed
+14
-50
No files matched your search
@@ -2,10 +2,8 @@ package mekanism.client;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.MekanismUtils;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.ITickHandler;
|
||||
import cpw.mods.fml.common.TickType;
|
||||
|
||||
@@ -94,6 +94,11 @@ public class RenderMechanicalPipe extends TileEntitySpecialRenderer
|
||||
{
|
||||
push();
|
||||
|
||||
if(tileEntity.refLiquid.itemID == Block.lavaStill.blockID)
|
||||
{
|
||||
MekanismRenderer.glowOn();
|
||||
}
|
||||
|
||||
bindTextureByName(tileEntity.refLiquid.getTextureSheet());
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
|
||||
@@ -109,6 +114,11 @@ public class RenderMechanicalPipe extends TileEntitySpecialRenderer
|
||||
int[] displayList = getListAndRender(ForgeDirection.UNKNOWN, tileEntity.refLiquid, tileEntity.worldObj);
|
||||
GL11.glCallList(displayList[Math.max(3, (int)((float)tileEntity.liquidScale*(stages-1)))]);
|
||||
|
||||
if(tileEntity.refLiquid.itemID == Block.lavaStill.blockID)
|
||||
{
|
||||
MekanismRenderer.glowOff();
|
||||
}
|
||||
|
||||
pop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import java.util.HashMap;
|
||||
|
||||
import mekanism.client.MekanismRenderer.Model3D;
|
||||
import mekanism.common.CableUtils;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.TileEntityUniversalCable;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
@@ -98,6 +97,7 @@ public class RenderUniversalCable extends TileEntitySpecialRenderer
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(2896);
|
||||
MekanismRenderer.glowOn();
|
||||
|
||||
bindTextureByName("/mods/mekanism/textures/items/LiquidEnergy.png");
|
||||
GL11.glTranslatef((float)x, (float)y, (float)z);
|
||||
@@ -114,6 +114,7 @@ public class RenderUniversalCable extends TileEntitySpecialRenderer
|
||||
int[] displayList = getListAndRender(ForgeDirection.UNKNOWN, tileEntity.worldObj);
|
||||
GL11.glCallList(displayList[Math.max(3, (int)((float)tileEntity.energyScale*(stages-1)))]);
|
||||
|
||||
MekanismRenderer.glowOff();
|
||||
GL11.glEnable(2896);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -3,9 +3,6 @@ package mekanism.common;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import mekanism.api.GasTransmission;
|
||||
import mekanism.api.ITubeConnection;
|
||||
import mekanism.client.ClientProxy;
|
||||
@@ -17,10 +14,11 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ITankContainer;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockTransmitter extends Block
|
||||
{
|
||||
@@ -52,31 +50,6 @@ public class BlockTransmitter extends Block
|
||||
return i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
TileEntity tileEntity = world.getBlockTileEntity(x, y, z);
|
||||
|
||||
if(tileEntity instanceof TileEntityMechanicalPipe)
|
||||
{
|
||||
TileEntityMechanicalPipe mechanicalPipe = (TileEntityMechanicalPipe)tileEntity;
|
||||
|
||||
if(mechanicalPipe.refLiquid != null)
|
||||
{
|
||||
if(mechanicalPipe.refLiquid.itemID == Block.lavaStill.blockID)
|
||||
{
|
||||
return (int)(mechanicalPipe.liquidScale*15F);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(tileEntity instanceof TileEntityUniversalCable)
|
||||
{
|
||||
return (int)(((TileEntityUniversalCable)tileEntity).energyScale*15F);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
|
||||
@@ -35,9 +35,6 @@ public class TileEntityMechanicalPipe extends TileEntity implements IMechanicalP
|
||||
/** The scale (0F -> 1F) of this pipe's liquid level. */
|
||||
public float liquidScale;
|
||||
|
||||
/** Previous scale for this pipe's liquid level. */
|
||||
public float prevScale;
|
||||
|
||||
@Override
|
||||
public boolean canTransferLiquids(TileEntity fromTile)
|
||||
{
|
||||
@@ -63,12 +60,6 @@ public class TileEntityMechanicalPipe extends TileEntity implements IMechanicalP
|
||||
{
|
||||
if(worldObj.isRemote)
|
||||
{
|
||||
if(Math.abs((liquidScale-prevScale)*15F) >= 1)
|
||||
{
|
||||
worldObj.updateAllLightTypes(xCoord, yCoord, zCoord);
|
||||
prevScale = liquidScale;
|
||||
}
|
||||
|
||||
if(liquidScale > 0)
|
||||
{
|
||||
liquidScale -= .01;
|
||||
|
||||
@@ -23,9 +23,6 @@ public class TileEntityUniversalCable extends TileEntity implements IUniversalCa
|
||||
/** The scale of the energy (0F -> 1F) currently inside this cable. */
|
||||
public float energyScale;
|
||||
|
||||
/** This cable's previous energy scale state. */
|
||||
public float prevScale;
|
||||
|
||||
public TileEntityUniversalCable()
|
||||
{
|
||||
if(PowerFramework.currentFramework != null)
|
||||
@@ -40,12 +37,6 @@ public class TileEntityUniversalCable extends TileEntity implements IUniversalCa
|
||||
{
|
||||
if(worldObj.isRemote)
|
||||
{
|
||||
if(Math.abs((energyScale-prevScale)*15F) >= 1)
|
||||
{
|
||||
worldObj.updateAllLightTypes(xCoord, yCoord, zCoord);
|
||||
prevScale = energyScale;
|
||||
}
|
||||
|
||||
if(energyScale > 0)
|
||||
{
|
||||
energyScale -= .01;
|
||||
|
||||
Reference in new issue
Block a user