mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-21 04:22:26 +00:00
Fix weird blending issue with Dynamic Glass, gave Seismic Vibrator an on texture
This commit is contained in:
1 parent
99c1f44db5
commit
cf1469c7da
6 files changed
+38
-22
No files matched your search
@@ -24,7 +24,17 @@ public class BasicRenderingHandler implements ISimpleBlockRenderingHandler
|
||||
|
||||
if(block == Mekanism.BasicBlock || block == Mekanism.BasicBlock2)
|
||||
{
|
||||
if(block == Mekanism.BasicBlock && metadata == 10)
|
||||
{
|
||||
MekanismRenderer.blendOn();
|
||||
}
|
||||
|
||||
MekanismRenderer.renderItem(renderer, metadata, block);
|
||||
|
||||
if(block == Mekanism.BasicBlock && metadata == 10)
|
||||
{
|
||||
MekanismRenderer.blendOff();
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package mekanism.client.render.tileentity;
|
||||
|
||||
import mekanism.client.model.ModelSeismicVibrator;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.tile.TileEntitySeismicVibrator;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
@@ -28,7 +29,7 @@ public class RenderSeismicVibrator extends TileEntitySpecialRenderer
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)x + 0.5F, (float)y + 1.5F, (float)z + 0.5F);
|
||||
|
||||
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "SeismicVibrator.png"));
|
||||
bindTexture(MekanismUtils.getResource(ResourceType.RENDER, "SeismicVibrator" + (tileEntity.isActive ? "On" : "") + ".png"));
|
||||
|
||||
switch(tileEntity.facing)
|
||||
{
|
||||
@@ -38,20 +39,23 @@ public class RenderSeismicVibrator extends TileEntitySpecialRenderer
|
||||
case 5: GL11.glRotatef(270, 0.0F, 1.0F, 0.0F); break;
|
||||
}
|
||||
|
||||
float rate = 0.01F;
|
||||
|
||||
if(!tileEntity.getActive() && tileEntity.clientPiston > 0)
|
||||
if(!Mekanism.proxy.isPaused())
|
||||
{
|
||||
if(tileEntity.clientPiston < 1)
|
||||
{
|
||||
tileEntity.clientPiston = 1 + (1-tileEntity.clientPiston);
|
||||
}
|
||||
float rate = 0.01F;
|
||||
|
||||
tileEntity.clientPiston = Math.min(2, tileEntity.clientPiston+rate)%2;
|
||||
}
|
||||
else if(tileEntity.getActive())
|
||||
{
|
||||
tileEntity.clientPiston = Math.min(2, tileEntity.clientPiston+rate)%2;
|
||||
if(!tileEntity.getActive() && tileEntity.clientPiston > 0)
|
||||
{
|
||||
if(tileEntity.clientPiston < 1)
|
||||
{
|
||||
tileEntity.clientPiston = 1 + (1-tileEntity.clientPiston);
|
||||
}
|
||||
|
||||
tileEntity.clientPiston = Math.min(2, tileEntity.clientPiston+rate)%2;
|
||||
}
|
||||
else if(tileEntity.getActive())
|
||||
{
|
||||
tileEntity.clientPiston = Math.min(2, tileEntity.clientPiston+rate)%2;
|
||||
}
|
||||
}
|
||||
|
||||
float actualRate = tileEntity.clientPiston < 1 ? tileEntity.clientPiston : 2-tileEntity.clientPiston;
|
||||
|
||||
@@ -23,10 +23,10 @@ public class ConnectedTextureRenderer
|
||||
|
||||
public Map<Integer, IIcon> glassMap = new HashMap<Integer, IIcon>();
|
||||
|
||||
public ConnectedTextureRenderer(String title, Block block, int meta)
|
||||
public ConnectedTextureRenderer(String title, Block b, int meta)
|
||||
{
|
||||
iconTitle = title;
|
||||
this.block = block;
|
||||
block = b;
|
||||
metadata = meta;
|
||||
}
|
||||
|
||||
@@ -111,10 +111,10 @@ public class ConnectedTextureRenderer
|
||||
|
||||
private boolean canConnect(IBlockAccess access, Coord4D obj, int side, int face)
|
||||
{
|
||||
Coord4D block = obj.getFromSide(ForgeDirection.getOrientation(side));
|
||||
Coord4D blockabove = obj.getFromSide(ForgeDirection.getOrientation(face));
|
||||
Coord4D coord = obj.getFromSide(ForgeDirection.getOrientation(side));
|
||||
Coord4D coordAbove = obj.getFromSide(ForgeDirection.getOrientation(face));
|
||||
|
||||
return (block.getBlock(access) == this.block && block.getMetadata(access) == metadata) && (blockabove.getBlock(access) != this.block || blockabove.getMetadata(access) != metadata);
|
||||
return (coord.getBlock(access) == block && coord.getMetadata(access) == metadata) && (coordAbove.getBlock(access) != block || coordAbove.getMetadata(access) != metadata);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -150,7 +150,7 @@ import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
/**
|
||||
* Mekanism - the mod that doesn't have a category.
|
||||
* Mekanism - a Minecraft mod
|
||||
* @author AidanBrady
|
||||
*
|
||||
*/
|
||||
@@ -339,7 +339,7 @@ public class Mekanism
|
||||
public static double fluidicPlenisherUsage;
|
||||
|
||||
/**
|
||||
* Adds all in-game crafting and smelting recipes.
|
||||
* Adds all in-game crafting, smelting and machine recipes.
|
||||
*/
|
||||
public void addRecipes()
|
||||
{
|
||||
|
||||
@@ -159,12 +159,14 @@ public final class MekanismUtils
|
||||
return "null";
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the donator list by retrieving the most recent information from a foreign document.
|
||||
*/
|
||||
public static void updateDonators()
|
||||
{
|
||||
Mekanism.donators.clear();
|
||||
List<String> text = getHTML("http://dl.dropbox.com/u/90411166/Donators/Mekanism.txt");
|
||||
|
||||
for(String s : text)
|
||||
for(String s : getHTML("http://dl.dropbox.com/u/90411166/Donators/Mekanism.txt"))
|
||||
{
|
||||
Mekanism.donators.add(s);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user