mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-24 22:04:49 +00:00
Merge branch '1.8.9' of github.com:aidancbrady/Mekanism into 1.8.9
This commit is contained in:
commit
d51aa1bb44
759 files changed
+4994
-10570
No files matched your search
@@ -1,41 +1,62 @@
|
||||
package codechicken.core.launch;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
import net.minecraftforge.fml.common.versioning.ComparableVersion;
|
||||
import net.minecraftforge.fml.relauncher.FMLInjectionData;
|
||||
import net.minecraftforge.fml.relauncher.FMLLaunchHandler;
|
||||
import net.minecraftforge.fml.relauncher.IFMLCallHook;
|
||||
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
|
||||
import net.minecraft.launchwrapper.LaunchClassLoader;
|
||||
import sun.misc.URLClassPath;
|
||||
import sun.net.util.URLUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.event.HyperlinkEvent;
|
||||
import javax.swing.event.HyperlinkListener;
|
||||
import java.awt.*;
|
||||
import java.awt.Desktop;
|
||||
import java.awt.Dialog.ModalityType;
|
||||
import java.awt.Dimension;
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.awt.event.WindowAdapter;
|
||||
import java.awt.event.WindowEvent;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.io.*;
|
||||
import java.io.Closeable;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.InterruptedIOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.net.URLConnection;
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.PatternSyntaxException;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
import javax.swing.Box;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JEditorPane;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JProgressBar;
|
||||
import javax.swing.WindowConstants;
|
||||
import javax.swing.event.HyperlinkEvent;
|
||||
import javax.swing.event.HyperlinkListener;
|
||||
|
||||
import net.minecraft.launchwrapper.LaunchClassLoader;
|
||||
import net.minecraftforge.fml.common.versioning.ComparableVersion;
|
||||
import net.minecraftforge.fml.relauncher.FMLInjectionData;
|
||||
import net.minecraftforge.fml.relauncher.FMLLaunchHandler;
|
||||
import net.minecraftforge.fml.relauncher.IFMLCallHook;
|
||||
import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin;
|
||||
import sun.misc.URLClassPath;
|
||||
import sun.net.util.URLUtil;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParser;
|
||||
|
||||
/**
|
||||
* For autodownloading stuff.
|
||||
* This is really unoriginal, mostly ripped off FML, credits to cpw.
|
||||
|
||||
@@ -3,5 +3,5 @@
|
||||
package cofh.api.energy;
|
||||
|
||||
import net.minecraftforge.fml.common.API;
|
||||
|
||||
import cofh.api.CoFHAPIProps;
|
||||
|
||||
@@ -5,6 +5,6 @@
|
||||
@API(apiVersion = CoFHAPIProps.VERSION, owner = "CoFHAPI", provides = "CoFHAPI|item")
|
||||
package cofh.api.item;
|
||||
|
||||
import cofh.api.CoFHAPIProps;
|
||||
import net.minecraftforge.fml.common.API;
|
||||
import cofh.api.CoFHAPIProps;
|
||||
|
||||
@@ -3,3 +3,4 @@
|
||||
package cofh.api;
|
||||
|
||||
import net.minecraftforge.fml.common.API;
|
||||
|
||||
@@ -50,8 +50,8 @@ public class Chunk3D
|
||||
*/
|
||||
public Chunk3D(Coord4D coord)
|
||||
{
|
||||
xCoord = coord.getX() >> 4;
|
||||
zCoord = coord.getZ() >> 4;
|
||||
xCoord = coord.xCoord >> 4;
|
||||
zCoord = coord.zCoord >> 4;
|
||||
|
||||
dimensionId = coord.dimensionId;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3i;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
@@ -28,8 +27,11 @@ import net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
* @author aidancbrady
|
||||
*
|
||||
*/
|
||||
public class Coord4D extends BlockPos
|
||||
public class Coord4D
|
||||
{
|
||||
public int xCoord;
|
||||
public int yCoord;
|
||||
public int zCoord;
|
||||
|
||||
public int dimensionId;
|
||||
|
||||
@@ -41,25 +43,22 @@ public class Coord4D extends BlockPos
|
||||
*/
|
||||
public Coord4D(int x, int y, int z)
|
||||
{
|
||||
super(x, y, z);
|
||||
xCoord = x;
|
||||
yCoord = y;
|
||||
zCoord = z;
|
||||
|
||||
dimensionId = 0;
|
||||
}
|
||||
|
||||
public Coord4D(double x, double y, double z)
|
||||
{
|
||||
super(x, y, z);
|
||||
|
||||
dimensionId = 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a Coord4D from an entity's position, rounded down.
|
||||
* @param entity - entity to create the Coord4D from
|
||||
*/
|
||||
public Coord4D(Entity entity)
|
||||
{
|
||||
super(entity);
|
||||
xCoord = (int)entity.posX;
|
||||
yCoord = (int)entity.posY;
|
||||
zCoord = (int)entity.posZ;
|
||||
|
||||
dimensionId = entity.worldObj.provider.getDimensionId();
|
||||
}
|
||||
@@ -71,48 +70,44 @@ public class Coord4D extends BlockPos
|
||||
* @param z - z coordinate
|
||||
* @param dimension - dimension ID
|
||||
*/
|
||||
public Coord4D(int x, int y, int z, int dimension)
|
||||
{
|
||||
super(x, y, z);
|
||||
|
||||
dimensionId = dimension;
|
||||
}
|
||||
|
||||
public Coord4D(double x, double y, double z, int dimension)
|
||||
{
|
||||
super(x, y, z);
|
||||
xCoord = MathHelper.floor_double(x);
|
||||
yCoord = MathHelper.floor_double(y);
|
||||
zCoord = MathHelper.floor_double(z);
|
||||
|
||||
dimensionId = dimension;
|
||||
}
|
||||
|
||||
public Coord4D(Vec3i pos)
|
||||
|
||||
public Coord4D(BlockPos pos, World world)
|
||||
{
|
||||
this(pos, 0);
|
||||
this(pos.getX(), pos.getY(), pos.getZ(), world.provider.getDimensionId());
|
||||
}
|
||||
|
||||
public Coord4D(Vec3i pos, int dimension)
|
||||
public Coord4D(MovingObjectPosition mop, World world)
|
||||
{
|
||||
this(pos.getX(), pos.getY(), pos.getZ());
|
||||
|
||||
dimensionId = dimension;
|
||||
}
|
||||
|
||||
|
||||
public Coord4D(MovingObjectPosition mop)
|
||||
{
|
||||
super(mop.getBlockPos());
|
||||
|
||||
dimensionId = 0;
|
||||
this(mop.getBlockPos(), world);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the metadata of the block representing this Coord4D.
|
||||
* Gets the state of the block representing this Coord4D.
|
||||
* @param world - world this Coord4D is in
|
||||
* @return the metadata of this Coord4D's block
|
||||
* @return the state of this Coord4D's block
|
||||
*/
|
||||
public IBlockState getBlockState(IBlockAccess world)
|
||||
{
|
||||
return world.getBlockState(this);
|
||||
return world.getBlockState(getPos());
|
||||
}
|
||||
|
||||
public int getBlockMeta(IBlockAccess world)
|
||||
{
|
||||
IBlockState state = getBlockState(world);
|
||||
return state == null ? 0 : state.getBlock().getMetaFromState(state);
|
||||
}
|
||||
|
||||
public BlockPos getPos()
|
||||
{
|
||||
return new BlockPos(xCoord, yCoord, zCoord);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,7 +122,7 @@ public class Coord4D extends BlockPos
|
||||
return null;
|
||||
}
|
||||
|
||||
return world.getTileEntity(this);
|
||||
return world.getTileEntity(getPos());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,13 +137,7 @@ public class Coord4D extends BlockPos
|
||||
return null;
|
||||
}
|
||||
|
||||
return world.getBlockState(this).getBlock();
|
||||
}
|
||||
|
||||
public int getBlockMeta(IBlockAccess world)
|
||||
{
|
||||
IBlockState state = getBlockState(world);
|
||||
return state == null ? 0 : state.getBlock().getMetaFromState(state);
|
||||
return getBlockState(world).getBlock();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -158,9 +147,9 @@ public class Coord4D extends BlockPos
|
||||
*/
|
||||
public NBTTagCompound write(NBTTagCompound nbtTags)
|
||||
{
|
||||
nbtTags.setInteger("x", getX());
|
||||
nbtTags.setInteger("y", getY());
|
||||
nbtTags.setInteger("z", getZ());
|
||||
nbtTags.setInteger("x", xCoord);
|
||||
nbtTags.setInteger("y", yCoord);
|
||||
nbtTags.setInteger("z", zCoord);
|
||||
nbtTags.setInteger("dimensionId", dimensionId);
|
||||
|
||||
return nbtTags;
|
||||
@@ -170,11 +159,11 @@ public class Coord4D extends BlockPos
|
||||
* Writes this Coord4D's data to an ArrayList for packet transfer.
|
||||
* @param data - the ArrayList to add the data to
|
||||
*/
|
||||
public void write(ArrayList<Object> data)
|
||||
public void write(ArrayList data)
|
||||
{
|
||||
data.add(getX());
|
||||
data.add(getY());
|
||||
data.add(getZ());
|
||||
data.add(xCoord);
|
||||
data.add(yCoord);
|
||||
data.add(zCoord);
|
||||
data.add(dimensionId);
|
||||
}
|
||||
|
||||
@@ -184,7 +173,9 @@ public class Coord4D extends BlockPos
|
||||
*/
|
||||
public void write(ByteBuf dataStream)
|
||||
{
|
||||
dataStream.writeLong(toLong());
|
||||
dataStream.writeInt(xCoord);
|
||||
dataStream.writeInt(yCoord);
|
||||
dataStream.writeInt(zCoord);
|
||||
dataStream.writeInt(dimensionId);
|
||||
}
|
||||
|
||||
@@ -195,42 +186,47 @@ public class Coord4D extends BlockPos
|
||||
* @param z - z value to translate
|
||||
* @return translated Coord4D
|
||||
*/
|
||||
public Coord4D add(int x, int y, int z)
|
||||
public Coord4D translate(int x, int y, int z)
|
||||
{
|
||||
return x == 0 && y == 0 && z == 0 ? this : new Coord4D(this.getX() + x, this.getY() + y, this.getZ() + z, dimensionId);
|
||||
return new Coord4D(xCoord+x, yCoord+y, zCoord+z, dimensionId);
|
||||
}
|
||||
|
||||
public Coord4D add(double x, double y, double z)
|
||||
{
|
||||
return x == 0.0D && y == 0.0D && z == 0.0D ? this : new Coord4D((double)this.getX() + x, (double)this.getY() + y, (double)this.getZ() + z, dimensionId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Translates this Coord4D by the defined Coord4D's coordinates, regardless of dimension.
|
||||
* @param coord - coordinates to translate by
|
||||
* @return translated Coord4D
|
||||
*/
|
||||
public Coord4D add(Vec3i coord)
|
||||
public Coord4D translate(Coord4D coord)
|
||||
{
|
||||
return add(coord.getX(), coord.getY(), coord.getZ());
|
||||
return translate(coord.xCoord, coord.yCoord, coord.zCoord);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offset this BlockPos 1 block in the given direction
|
||||
* Creates and returns a new Coord4D translated to the defined offsets of the side.
|
||||
* @param side - side to translate this Coord4D to
|
||||
* @return translated Coord4D
|
||||
*/
|
||||
public Coord4D offset(EnumFacing facing)
|
||||
public Coord4D offset(EnumFacing side)
|
||||
{
|
||||
return this.offset(facing, 1);
|
||||
return offset(side, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* Offsets this BlockPos n blocks in the given direction
|
||||
* Creates and returns a new Coord4D translated to the defined offsets of the side by the defined amount.
|
||||
* @param side - side to translate this Coord4D to
|
||||
* @param amount - how far to translate this Coord4D
|
||||
* @return translated Coord4D
|
||||
*/
|
||||
public Coord4D offset(EnumFacing facing, int n)
|
||||
public Coord4D offset(EnumFacing side, int amount)
|
||||
{
|
||||
return (facing == null || n == 0) ? this : new Coord4D(this.getX() + facing.getFrontOffsetX() * n, this.getY() + facing.getFrontOffsetY() * n, this.getZ() + facing.getFrontOffsetZ() * n);
|
||||
if(side == null || amount == 0)
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
return new Coord4D(xCoord+(side.getFrontOffsetX()*amount), yCoord+(side.getFrontOffsetY()*amount), zCoord+(side.getFrontOffsetZ()*amount), dimensionId);
|
||||
}
|
||||
|
||||
|
||||
public ItemStack getStack(IBlockAccess world)
|
||||
{
|
||||
IBlockState state = getBlockState(world);
|
||||
@@ -239,7 +235,7 @@ public class Coord4D extends BlockPos
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
return new ItemStack(state.getBlock(), 1, state.getBlock().getMetaFromState(state));
|
||||
}
|
||||
|
||||
@@ -250,8 +246,7 @@ public class Coord4D extends BlockPos
|
||||
*/
|
||||
public static Coord4D get(TileEntity tileEntity)
|
||||
{
|
||||
BlockPos pos = tileEntity.getPos();
|
||||
return new Coord4D(pos.getX(), pos.getY(), pos.getZ(), tileEntity.getWorld().provider.getDimensionId());
|
||||
return new Coord4D(tileEntity.getPos(), tileEntity.getWorld());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -271,17 +266,18 @@ public class Coord4D extends BlockPos
|
||||
*/
|
||||
public static Coord4D read(ByteBuf dataStream)
|
||||
{
|
||||
return new Coord4D(BlockPos.fromLong(dataStream.readLong()), dataStream.readInt());
|
||||
return new Coord4D(dataStream.readInt(), dataStream.readInt(), dataStream.readInt(), dataStream.readInt());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates and returns a new Coord4D with values representing the difference between the defined Coord4D
|
||||
* @param vec - the Coord4D to subtract from this
|
||||
* @param other - the Coord4D to subtract from this
|
||||
* @return a Coord4D representing the distance between the defined Coord4D
|
||||
*/
|
||||
public Coord4D difference(Vec3i vec)
|
||||
public Coord4D difference(Coord4D other)
|
||||
{
|
||||
return vec.getX() == 0 && vec.getY() == 0 && vec.getZ() == 0 ? this : new Coord4D(this.getX() - vec.getX(), this.getY() - vec.getY(), this.getZ() - vec.getZ()); }
|
||||
return new Coord4D(xCoord-other.xCoord, yCoord-other.yCoord, zCoord-other.zCoord, dimensionId);
|
||||
}
|
||||
|
||||
/**
|
||||
* A method used to find the EnumFacing represented by the distance of the defined Coord4D. Most likely won't have many
|
||||
@@ -295,7 +291,7 @@ public class Coord4D extends BlockPos
|
||||
|
||||
for(EnumFacing side : EnumFacing.VALUES)
|
||||
{
|
||||
if(side.getDirectionVec().equals(diff))
|
||||
if(side.getFrontOffsetX() == diff.xCoord && side.getFrontOffsetY() == diff.yCoord && side.getFrontOffsetZ() == diff.zCoord)
|
||||
{
|
||||
return side;
|
||||
}
|
||||
@@ -309,11 +305,11 @@ public class Coord4D extends BlockPos
|
||||
* @param obj - the Coord4D to find the distance to
|
||||
* @return the distance to the defined Coord4D
|
||||
*/
|
||||
public int distanceTo(Vec3i obj)
|
||||
public int distanceTo(Coord4D obj)
|
||||
{
|
||||
int subX = getX() - obj.getX();
|
||||
int subY = getY() - obj.getY();
|
||||
int subZ = getZ() - obj.getZ();
|
||||
int subX = xCoord - obj.xCoord;
|
||||
int subY = yCoord - obj.yCoord;
|
||||
int subZ = zCoord - obj.zCoord;
|
||||
return (int)MathHelper.sqrt_double(subX * subX + subY * subY + subZ * subZ);
|
||||
}
|
||||
|
||||
@@ -325,7 +321,7 @@ public class Coord4D extends BlockPos
|
||||
*/
|
||||
public boolean sideVisible(EnumFacing side, IBlockAccess world)
|
||||
{
|
||||
return world.isAirBlock(offset(side));
|
||||
return world.isAirBlock(step(side).getPos());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -335,7 +331,17 @@ public class Coord4D extends BlockPos
|
||||
*/
|
||||
public TargetPoint getTargetPoint(double range)
|
||||
{
|
||||
return new TargetPoint(dimensionId, getX(), getY(), getZ(), range);
|
||||
return new TargetPoint(dimensionId, xCoord, yCoord, zCoord, range);
|
||||
}
|
||||
|
||||
/**
|
||||
* Steps this Coord4D in the defined side's offset without creating a new value.
|
||||
* @param side - side to step towards
|
||||
* @return this Coord4D
|
||||
*/
|
||||
public Coord4D step(EnumFacing side)
|
||||
{
|
||||
return translate(side.getFrontOffsetX(), side.getFrontOffsetY(), side.getFrontOffsetZ());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -345,7 +351,7 @@ public class Coord4D extends BlockPos
|
||||
*/
|
||||
public boolean exists(World world)
|
||||
{
|
||||
return world.getChunkProvider() == null || world.getChunkProvider().chunkExists(getX() >> 4, getZ() >> 4);
|
||||
return world.getChunkProvider() == null || world.getChunkProvider().chunkExists(xCoord >> 4, zCoord >> 4);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -355,7 +361,7 @@ public class Coord4D extends BlockPos
|
||||
*/
|
||||
public Chunk getChunk(World world)
|
||||
{
|
||||
return world.getChunkFromBlockCoords(this);
|
||||
return world.getChunkFromBlockCoords(getPos());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -374,7 +380,7 @@ public class Coord4D extends BlockPos
|
||||
*/
|
||||
public boolean isAirBlock(IBlockAccess world)
|
||||
{
|
||||
return world.isAirBlock(this);
|
||||
return world.isAirBlock(getPos());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -384,7 +390,7 @@ public class Coord4D extends BlockPos
|
||||
*/
|
||||
public boolean isReplaceable(World world)
|
||||
{
|
||||
return getBlock(world).isReplaceable(world, this);
|
||||
return getBlock(world).isReplaceable(world, getPos());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -393,42 +399,39 @@ public class Coord4D extends BlockPos
|
||||
*/
|
||||
public AxisAlignedBB getBoundingBox()
|
||||
{
|
||||
return new AxisAlignedBB(this, add(1,1,1));
|
||||
return AxisAlignedBB.fromBounds(xCoord, yCoord, zCoord, xCoord+1, yCoord+1, zCoord+1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Coord4D clone()
|
||||
{
|
||||
return new Coord4D(getX(), getY(), getZ(), dimensionId);
|
||||
return new Coord4D(xCoord, yCoord, zCoord, dimensionId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "[Coord4D: " + getX() + ", " + getY() + ", " + getZ() + ", dim=" + dimensionId + "]";
|
||||
return "[Coord4D: " + xCoord + ", " + yCoord + ", " + zCoord + ", dim=" + dimensionId + "]";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
return obj instanceof Vec3i &&
|
||||
(
|
||||
((Vec3i)obj).getX() == getX() &&
|
||||
((Vec3i)obj).getY() == getY() &&
|
||||
((Vec3i)obj).getZ() == getZ()
|
||||
) && !(obj instanceof Coord4D && ((Coord4D)obj).dimensionId != dimensionId);
|
||||
return obj instanceof Coord4D &&
|
||||
((Coord4D)obj).xCoord == xCoord &&
|
||||
((Coord4D)obj).yCoord == yCoord &&
|
||||
((Coord4D)obj).zCoord == zCoord &&
|
||||
((Coord4D)obj).dimensionId == dimensionId;
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
int code = 1;
|
||||
code = 31 * code + getX();
|
||||
code = 31 * code + getY();
|
||||
code = 31 * code + getZ();
|
||||
code = 31 * code + xCoord;
|
||||
code = 31 * code + yCoord;
|
||||
code = 31 * code + zCoord;
|
||||
code = 31 * code + dimensionId;
|
||||
return code;
|
||||
}
|
||||
*/
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package mekanism.common;
|
||||
package mekanism.api;
|
||||
|
||||
public final class ObfuscatedNames
|
||||
{
|
||||
@@ -27,6 +27,11 @@ public class Pos3D extends Vec3
|
||||
{
|
||||
super(vec.xCoord, vec.yCoord, vec.zCoord);
|
||||
}
|
||||
|
||||
public Pos3D(Coord4D coord)
|
||||
{
|
||||
super(coord.xCoord, coord.yCoord, coord.zCoord);
|
||||
}
|
||||
|
||||
public Pos3D(Vec3i vec)
|
||||
{
|
||||
|
||||
@@ -40,13 +40,13 @@ public class Range4D
|
||||
|
||||
public Range4D(Coord4D coord)
|
||||
{
|
||||
xMin = coord.getX();
|
||||
yMin = coord.getY();
|
||||
zMin = coord.getZ();
|
||||
xMin = coord.xCoord;
|
||||
yMin = coord.yCoord;
|
||||
zMin = coord.zCoord;
|
||||
|
||||
xMax = coord.getX()+1;
|
||||
yMax = coord.getY()+1;
|
||||
zMax = coord.getZ()+1;
|
||||
xMax = coord.xCoord+1;
|
||||
yMax = coord.yCoord+1;
|
||||
zMax = coord.zCoord+1;
|
||||
|
||||
dimensionId = coord.dimensionId;
|
||||
}
|
||||
|
||||
@@ -35,9 +35,10 @@ public class Gas
|
||||
* Creates a new Gas object with a defined name or key value.
|
||||
* @param s - name or key to associate this Gas with
|
||||
*/
|
||||
public Gas(String s)
|
||||
public Gas(String s, String icon)
|
||||
{
|
||||
unlocalizedName = name = s;
|
||||
iconLocation = new ResourceLocation(icon);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -144,9 +145,8 @@ public class Gas
|
||||
* @param i - IIcon to associate with this Gas
|
||||
* @return this Gas object
|
||||
*/
|
||||
public Gas setIcon(TextureMap map, String location)
|
||||
public Gas updateIcon(TextureMap map)
|
||||
{
|
||||
iconLocation = new ResourceLocation(location);
|
||||
sprite = map.registerSprite(iconLocation);
|
||||
from_fluid = false;
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import mekanism.api.Coord4D;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.common.capabilities.Capabilities;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
|
||||
@@ -9,7 +9,7 @@ public class OreGas extends Gas
|
||||
|
||||
public OreGas(String s, String name)
|
||||
{
|
||||
super(s);
|
||||
super(s, "mekanism:blocks/liquid/Liquid" + (s.contains("clean") ? "Clean" : "") + "Ore");
|
||||
|
||||
oreName = name;
|
||||
}
|
||||
|
||||
@@ -248,23 +248,23 @@ public abstract class DynamicNetwork<A, N extends DynamicNetwork<A, N>> implemen
|
||||
IGridTransmitter<A, N> initTransmitter = transmitters.iterator().next();
|
||||
Coord4D initCoord = initTransmitter.coord();
|
||||
|
||||
int minX = initCoord.getX();
|
||||
int minY = initCoord.getY();
|
||||
int minZ = initCoord.getZ();
|
||||
int maxX = initCoord.getX();
|
||||
int maxY = initCoord.getY();
|
||||
int maxZ = initCoord.getZ();
|
||||
int minX = initCoord.xCoord;
|
||||
int minY = initCoord.yCoord;
|
||||
int minZ = initCoord.zCoord;
|
||||
int maxX = initCoord.xCoord;
|
||||
int maxY = initCoord.yCoord;
|
||||
int maxZ = initCoord.zCoord;
|
||||
|
||||
for(IGridTransmitter transmitter : transmitters)
|
||||
{
|
||||
Coord4D coord = transmitter.coord();
|
||||
|
||||
if(coord.getX() < minX) minX = coord.getX();
|
||||
if(coord.getY() < minY) minY = coord.getY();
|
||||
if(coord.getZ() < minZ) minZ = coord.getZ();
|
||||
if(coord.getX() > maxX) maxX = coord.getX();
|
||||
if(coord.getY() > maxY) maxY = coord.getY();
|
||||
if(coord.getX() > maxZ) maxZ = coord.getZ();
|
||||
if(coord.xCoord < minX) minX = coord.xCoord;
|
||||
if(coord.yCoord < minY) minY = coord.yCoord;
|
||||
if(coord.zCoord < minZ) minZ = coord.zCoord;
|
||||
if(coord.xCoord > maxX) maxX = coord.xCoord;
|
||||
if(coord.yCoord > maxY) maxY = coord.yCoord;
|
||||
if(coord.xCoord > maxZ) maxZ = coord.zCoord;
|
||||
}
|
||||
|
||||
return new Range4D(minX, minY, minZ, maxX, maxY, maxZ, initTransmitter.world().provider.getDimensionId());
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
package mekanism.api.util;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public final class ReflectionUtils
|
||||
{
|
||||
/**
|
||||
* Retrieves a private value from a defined class and field.
|
||||
* @param obj - the Object to retrieve the value from, null if static
|
||||
* @param c - Class to retrieve field value from
|
||||
* @param fields - possible names of field to iterate through
|
||||
* @return value as an Object, cast as necessary
|
||||
*/
|
||||
public static Object getPrivateValue(Object obj, Class c, String[] fields)
|
||||
{
|
||||
for(String field : fields)
|
||||
{
|
||||
try {
|
||||
Field f = c.getDeclaredField(field);
|
||||
f.setAccessible(true);
|
||||
return f.get(obj);
|
||||
} catch(Exception e) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a private value from a defined class and field to a new value.
|
||||
* @param obj - the Object to perform the operation on, null if static
|
||||
* @param value - value to set the field to
|
||||
* @param c - Class the operation will be performed on
|
||||
* @param fields - possible names of field to iterate through
|
||||
*/
|
||||
public static void setPrivateValue(Object obj, Object value, Class c, String[] fields)
|
||||
{
|
||||
for(String field : fields)
|
||||
{
|
||||
try {
|
||||
Field f = c.getDeclaredField(field);
|
||||
f.setAccessible(true);
|
||||
f.set(obj, value);
|
||||
} catch(Exception e) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves a private method from a class, sets it as accessible, and returns it.
|
||||
* @param c - Class the method is located in
|
||||
* @param methods - possible names of the method to iterate through
|
||||
* @param params - the Types inserted as parameters into the method
|
||||
* @return private method
|
||||
*/
|
||||
public static Method getPrivateMethod(Class c, String[] methods, Class... params)
|
||||
{
|
||||
for(String method : methods)
|
||||
{
|
||||
try {
|
||||
Method m = c.getDeclaredMethod(method, params);
|
||||
m.setAccessible(true);
|
||||
return m;
|
||||
} catch(Exception e) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,6 @@ import java.net.InetSocketAddress;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.client.voice.VoiceClient;
|
||||
import mekanism.common.Mekanism;
|
||||
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.network.FMLNetworkEvent.ClientConnectedToServerEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
package mekanism.client;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.MekanismConfig.client;
|
||||
import mekanism.api.MekanismConfig.general;
|
||||
import mekanism.api.Pos3D;
|
||||
@@ -66,51 +70,55 @@ import mekanism.client.gui.GuiTransporterConfig;
|
||||
import mekanism.client.gui.GuiUpgradeManagement;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.client.render.RenderTickHandler;
|
||||
import mekanism.client.render.ctm.TextureStitcher;
|
||||
import mekanism.client.render.ctm.CTMRegistry;
|
||||
import mekanism.client.render.entity.RenderBalloon;
|
||||
import mekanism.client.render.entity.RenderFlame;
|
||||
import mekanism.client.render.entity.RenderObsidianTNTPrimed;
|
||||
import mekanism.client.render.entity.RenderRobit;
|
||||
import mekanism.client.render.item.CustomItemModelFactory;
|
||||
import mekanism.client.render.tileentity.RenderBin;
|
||||
import mekanism.client.render.tileentity.RenderChargepad;
|
||||
import mekanism.client.render.tileentity.RenderChemicalCrystallizer;
|
||||
import mekanism.client.render.tileentity.RenderChemicalDissolutionChamber;
|
||||
import mekanism.client.render.tileentity.RenderChemicalInfuser;
|
||||
import mekanism.client.render.tileentity.RenderChemicalOxidizer;
|
||||
import mekanism.client.render.tileentity.RenderChemicalWasher;
|
||||
import mekanism.client.render.tileentity.RenderConfigurableMachine;
|
||||
import mekanism.client.render.tileentity.RenderDigitalMiner;
|
||||
import mekanism.client.render.tileentity.RenderDynamicTank;
|
||||
import mekanism.client.render.tileentity.RenderElectricPump;
|
||||
import mekanism.client.render.tileentity.RenderElectrolyticSeparator;
|
||||
import mekanism.client.render.tileentity.RenderEnergyCube;
|
||||
import mekanism.client.render.tileentity.RenderFluidTank;
|
||||
import mekanism.client.render.tileentity.RenderFluidicPlenisher;
|
||||
import mekanism.client.render.tileentity.RenderGasTank;
|
||||
import mekanism.client.render.tileentity.RenderLaserAmplifier;
|
||||
import mekanism.client.render.tileentity.RenderLaserTractorBeam;
|
||||
import mekanism.client.render.tileentity.RenderLogisticalSorter;
|
||||
import mekanism.client.render.tileentity.RenderPersonalChest;
|
||||
import mekanism.client.render.tileentity.RenderPressurizedReactionChamber;
|
||||
import mekanism.client.render.tileentity.RenderQuantumEntangloporter;
|
||||
import mekanism.client.render.tileentity.RenderResistiveHeater;
|
||||
import mekanism.client.render.tileentity.RenderSecurityDesk;
|
||||
import mekanism.client.render.tileentity.RenderSeismicVibrator;
|
||||
import mekanism.client.render.tileentity.RenderSolarNeutronActivator;
|
||||
import mekanism.client.render.tileentity.RenderTeleporter;
|
||||
import mekanism.client.render.tileentity.RenderThermalEvaporationController;
|
||||
import mekanism.client.render.tileentity.RenderThermoelectricBoiler;
|
||||
import mekanism.common.CommonProxy;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.MekanismBlocks;
|
||||
import mekanism.common.MekanismItems;
|
||||
import mekanism.common.Tier.BaseTier;
|
||||
import mekanism.common.Tier.GasTankTier;
|
||||
import mekanism.common.base.IFactory.RecipeType;
|
||||
import mekanism.common.base.ISideConfiguration;
|
||||
import mekanism.common.base.IUpgradeTile;
|
||||
import mekanism.common.block.states.BlockStateBasic.BasicBlockType;
|
||||
import mekanism.common.block.states.BlockStateMachine.MachineType;
|
||||
import mekanism.common.block.states.BlockStateOre.EnumOreType;
|
||||
import mekanism.common.entity.EntityBabySkeleton;
|
||||
import mekanism.common.entity.EntityBalloon;
|
||||
import mekanism.common.entity.EntityFlame;
|
||||
import mekanism.common.entity.EntityObsidianTNT;
|
||||
import mekanism.common.entity.EntityRobit;
|
||||
import mekanism.common.inventory.InventoryPersonalChest;
|
||||
import mekanism.common.item.ItemBlockBasic;
|
||||
import mekanism.common.item.ItemBlockGasTank;
|
||||
import mekanism.common.item.ItemBlockMachine;
|
||||
import mekanism.common.item.ItemCraftingFormula;
|
||||
import mekanism.common.item.ItemPortableTeleporter;
|
||||
import mekanism.common.item.ItemSeismicReader;
|
||||
@@ -149,9 +157,6 @@ import mekanism.common.tile.TileEntityFormulaicAssemblicator;
|
||||
import mekanism.common.tile.TileEntityFuelwoodHeater;
|
||||
import mekanism.common.tile.TileEntityGasTank;
|
||||
import mekanism.common.tile.TileEntityInductionCasing;
|
||||
import mekanism.common.tile.TileEntityInductionCell;
|
||||
import mekanism.common.tile.TileEntityInductionPort;
|
||||
import mekanism.common.tile.TileEntityInductionProvider;
|
||||
import mekanism.common.tile.TileEntityLaserAmplifier;
|
||||
import mekanism.common.tile.TileEntityLaserTractorBeam;
|
||||
import mekanism.common.tile.TileEntityLogisticalSorter;
|
||||
@@ -169,7 +174,6 @@ import mekanism.common.tile.TileEntityRotaryCondensentrator;
|
||||
import mekanism.common.tile.TileEntitySecurityDesk;
|
||||
import mekanism.common.tile.TileEntitySeismicVibrator;
|
||||
import mekanism.common.tile.TileEntitySolarNeutronActivator;
|
||||
import mekanism.common.tile.TileEntityStructuralGlass;
|
||||
import mekanism.common.tile.TileEntityTeleporter;
|
||||
import mekanism.common.tile.TileEntityThermalEvaporationController;
|
||||
import net.minecraft.client.Minecraft;
|
||||
@@ -179,6 +183,7 @@ import net.minecraft.client.renderer.ItemMeshDefinition;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.RenderSkeleton;
|
||||
import net.minecraft.client.resources.model.IBakedModel;
|
||||
import net.minecraft.client.resources.model.ModelBakery;
|
||||
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||
import net.minecraft.entity.monster.EntitySkeleton;
|
||||
@@ -189,7 +194,9 @@ import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.ModelBakeEvent;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.client.model.obj.OBJLoader;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
@@ -198,10 +205,11 @@ import net.minecraftforge.fml.client.registry.ClientRegistry;
|
||||
import net.minecraftforge.fml.client.registry.IRenderFactory;
|
||||
import net.minecraftforge.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import scala.actors.threadpool.Arrays;
|
||||
|
||||
/**
|
||||
* Client proxy for the Mekanism mod.
|
||||
@@ -212,6 +220,12 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
public class ClientProxy extends CommonProxy
|
||||
{
|
||||
public static Map<String, ModelResourceLocation> machineResources = new HashMap<String, ModelResourceLocation>();
|
||||
public static Map<String, ModelResourceLocation> basicResources = new HashMap<String, ModelResourceLocation>();
|
||||
|
||||
public static final String[] CUSTOM_RENDERS = new String[] {"fluid_tank", "bin_basic", "bin_advanced", "bin_elite", "bin_ultimate",
|
||||
"Jetpack", "FreeRunners", "AtomicDisassembler", "ScubaTank", "GasMask", "ArmoredJetpack", "Flamethrower", "personal_chest",
|
||||
"solar_neutron_activator", "chemical_dissolution_chamber", "chemical_crystallizer", "seismic_vibrator", "security_desk",
|
||||
"quantum_entangloporter", "resistive_heater", "EnergyCube", "digital_miner"};
|
||||
|
||||
@Override
|
||||
public void loadConfiguration()
|
||||
@@ -237,14 +251,6 @@ public class ClientProxy extends CommonProxy
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public int getArmorIndex(String string)
|
||||
{
|
||||
return RenderingRegistry.addNewArmourRendererPrefix(string);
|
||||
}
|
||||
*/
|
||||
|
||||
@Override
|
||||
public void openPersonalChest(EntityPlayer entityplayer, int id, int windowId, boolean isBlock, BlockPos pos)
|
||||
{
|
||||
@@ -282,90 +288,39 @@ public class ClientProxy extends CommonProxy
|
||||
ClientRegistry.registerTileEntity(TileEntityEliteFactory.class, "UltimateSmeltingFactory", new RenderConfigurableMachine<TileEntityEliteFactory>());
|
||||
ClientRegistry.registerTileEntity(TileEntityPurificationChamber.class, "PurificationChamber", new RenderConfigurableMachine<TileEntityPurificationChamber>());
|
||||
ClientRegistry.registerTileEntity(TileEntityEnergizedSmelter.class, "EnergizedSmelter", new RenderConfigurableMachine<TileEntityEnergizedSmelter>());
|
||||
//ClientRegistry.registerTileEntity(TileEntityMetallurgicInfuser.class, "MetallurgicInfuser", new RenderMetallurgicInfuser());
|
||||
//ClientRegistry.registerTileEntity(TileEntityObsidianTNT.class, "ObsidianTNT", new RenderObsidianTNT());
|
||||
ClientRegistry.registerTileEntity(TileEntityMetallurgicInfuser.class, "MetallurgicInfuser", new RenderConfigurableMachine<TileEntityMetallurgicInfuser>());
|
||||
ClientRegistry.registerTileEntity(TileEntityGasTank.class, "GasTank", new RenderGasTank());
|
||||
ClientRegistry.registerTileEntity(TileEntityEnergyCube.class, "EnergyCube", new RenderEnergyCube());
|
||||
ClientRegistry.registerTileEntity(TileEntityElectricPump.class, "ElectricPump", new RenderElectricPump());
|
||||
ClientRegistry.registerTileEntity(TileEntityPersonalChest.class, "ElectricChest", new RenderPersonalChest()); //TODO rename
|
||||
ClientRegistry.registerTileEntity(TileEntityPersonalChest.class, "PersonalChest", new RenderPersonalChest());
|
||||
ClientRegistry.registerTileEntity(TileEntityDynamicTank.class, "DynamicTank", new RenderDynamicTank());
|
||||
ClientRegistry.registerTileEntity(TileEntityDynamicValve.class, "DynamicValve", new RenderDynamicTank());
|
||||
ClientRegistry.registerTileEntity(TileEntityChargepad.class, "Chargepad", new RenderChargepad());
|
||||
ClientRegistry.registerTileEntity(TileEntityLogisticalSorter.class, "LogisticalSorter", new RenderLogisticalSorter());
|
||||
ClientRegistry.registerTileEntity(TileEntityBin.class, "Bin", new RenderBin());
|
||||
ClientRegistry.registerTileEntity(TileEntityDigitalMiner.class, "DigitalMiner", new RenderDigitalMiner());
|
||||
GameRegistry.registerTileEntity(TileEntityRotaryCondensentrator.class, "RotaryCondensentrator");
|
||||
ClientRegistry.registerTileEntity(TileEntityTeleporter.class, "MekanismTeleporter", new RenderTeleporter());
|
||||
ClientRegistry.registerTileEntity(TileEntityChemicalOxidizer.class, "ChemicalOxidizer", new RenderChemicalOxidizer());
|
||||
ClientRegistry.registerTileEntity(TileEntityChemicalInfuser.class, "ChemicalInfuser", new RenderChemicalInfuser());
|
||||
ClientRegistry.registerTileEntity(TileEntityChemicalInjectionChamber.class, "ChemicalInjectionChamber", new RenderConfigurableMachine<TileEntityChemicalInjectionChamber>());
|
||||
ClientRegistry.registerTileEntity(TileEntityElectrolyticSeparator.class, "ElectrolyticSeparator", new RenderElectrolyticSeparator());
|
||||
ClientRegistry.registerTileEntity(TileEntityThermalEvaporationController.class, "SalinationController", new RenderThermalEvaporationController()); //TODO rename
|
||||
ClientRegistry.registerTileEntity(TileEntityThermalEvaporationController.class, "ThermalEvaporationController", new RenderThermalEvaporationController());
|
||||
ClientRegistry.registerTileEntity(TileEntityPrecisionSawmill.class, "PrecisionSawmill", new RenderConfigurableMachine<TileEntityPrecisionSawmill>());
|
||||
ClientRegistry.registerTileEntity(TileEntityChemicalDissolutionChamber.class, "ChemicalDissolutionChamber", new RenderChemicalDissolutionChamber());
|
||||
ClientRegistry.registerTileEntity(TileEntityChemicalWasher.class, "ChemicalWasher", new RenderChemicalWasher());
|
||||
ClientRegistry.registerTileEntity(TileEntityChemicalCrystallizer.class, "ChemicalCrystallizer", new RenderChemicalCrystallizer());
|
||||
ClientRegistry.registerTileEntity(TileEntitySeismicVibrator.class, "SeismicVibrator", new RenderSeismicVibrator());
|
||||
ClientRegistry.registerTileEntity(TileEntityPRC.class, "PressurizedReactionChamber", new RenderPressurizedReactionChamber());
|
||||
ClientRegistry.registerTileEntity(TileEntityFluidTank.class, "PortableTank", new RenderFluidTank()); //TODO rename
|
||||
ClientRegistry.registerTileEntity(TileEntityPRC.class, "PressurizedReactionChamber", new RenderConfigurableMachine<TileEntityPRC>());
|
||||
ClientRegistry.registerTileEntity(TileEntityFluidTank.class, "FluidTank", new RenderFluidTank());
|
||||
ClientRegistry.registerTileEntity(TileEntityFluidicPlenisher.class, "FluidicPlenisher", new RenderFluidicPlenisher());
|
||||
//ClientRegistry.registerTileEntity(TileEntityLaser.class, "Laser", new RenderLaser());
|
||||
ClientRegistry.registerTileEntity(TileEntityLaserAmplifier.class, "LaserAmplifier", new RenderLaserAmplifier());
|
||||
ClientRegistry.registerTileEntity(TileEntityLaserTractorBeam.class, "LaserTractorBeam", new RenderLaserTractorBeam());
|
||||
GameRegistry.registerTileEntity(TileEntitySolarNeutronActivator.class, "SolarNeutronActivator");
|
||||
GameRegistry.registerTileEntity(TileEntityAmbientAccumulator.class, "AmbientAccumulator");
|
||||
GameRegistry.registerTileEntity(TileEntityInductionCasing.class, "InductionCasing");
|
||||
GameRegistry.registerTileEntity(TileEntityInductionPort.class, "InductionPort");
|
||||
GameRegistry.registerTileEntity(TileEntityInductionCell.class, "InductionCell");
|
||||
GameRegistry.registerTileEntity(TileEntityInductionProvider.class, "InductionProvider");
|
||||
GameRegistry.registerTileEntity(TileEntityOredictionificator.class, "Oredictionificator");
|
||||
GameRegistry.registerTileEntity(TileEntityStructuralGlass.class, "StructuralGlass");
|
||||
ClientRegistry.registerTileEntity(TileEntitySolarNeutronActivator.class, "SolarNeutronActivator", new RenderSolarNeutronActivator());
|
||||
ClientRegistry.registerTileEntity(TileEntityFormulaicAssemblicator.class, "FormulaicAssemblicator", new RenderConfigurableMachine());
|
||||
ClientRegistry.registerTileEntity(TileEntityResistiveHeater.class, "ResistiveHeater", new RenderResistiveHeater());
|
||||
ClientRegistry.registerTileEntity(TileEntityBoilerCasing.class, "BoilerCasing", new RenderThermoelectricBoiler());
|
||||
ClientRegistry.registerTileEntity(TileEntityBoilerValve.class, "BoilerValve", new RenderThermoelectricBoiler());
|
||||
ClientRegistry.registerTileEntity(TileEntitySecurityDesk.class, "SecurityDesk", new RenderSecurityDesk());
|
||||
ClientRegistry.registerTileEntity(TileEntityQuantumEntangloporter.class, "QuantumEntangloporter", new RenderQuantumEntangloporter());
|
||||
GameRegistry.registerTileEntity(TileEntityFuelwoodHeater.class, "FuelwoodHeater");
|
||||
ClientRegistry.registerTileEntity(TileEntityChemicalDissolutionChamber.class, "ChemicalDissolutionChamber", new RenderChemicalDissolutionChamber());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerRenderInformation()
|
||||
public void registerItemRenders()
|
||||
{
|
||||
//TODO RenderPartTransmitter.init();
|
||||
//TODO RenderGlowPanel.init();
|
||||
|
||||
//Register item handler
|
||||
//TODO ItemRenderingHandler handler = new ItemRenderingHandler();
|
||||
|
||||
/*TODO
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.EnergyCube), handler);
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.MachineBlock), handler);
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.MachineBlock2), handler);
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.MachineBlock3), handler);
|
||||
MinecraftForgeClient.registerItemRenderer(MekanismItems.Robit, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(MekanismItems.WalkieTalkie, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.GasTank), handler);
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.ObsidianTNT), handler);
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.BasicBlock), handler);
|
||||
MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(MekanismBlocks.BasicBlock2), handler);
|
||||
MinecraftForgeClient.registerItemRenderer(MekanismItems.Jetpack, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(MekanismItems.ArmoredJetpack, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(MekanismItems.PartTransmitter, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(MekanismItems.GasMask, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(MekanismItems.ScubaTank, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(MekanismItems.Balloon, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(MekanismItems.FreeRunners, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(MekanismItems.AtomicDisassembler, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(MekanismItems.GlowPanel, handler);
|
||||
MinecraftForgeClient.registerItemRenderer(MekanismItems.Flamethrower, handler);
|
||||
|
||||
//Register block handlers
|
||||
RenderingRegistry.registerBlockHandler(new MachineRenderingHandler());
|
||||
RenderingRegistry.registerBlockHandler(new BasicRenderingHandler());
|
||||
RenderingRegistry.registerBlockHandler(new PlasticRenderingHandler());
|
||||
RenderingRegistry.registerBlockHandler(new CTMRenderingHandler());
|
||||
*/
|
||||
// registerItemRender(MekanismItems.PartTransmitter);
|
||||
registerItemRender(MekanismItems.ElectricBow);
|
||||
registerItemRender(MekanismItems.Dust);
|
||||
@@ -422,17 +377,249 @@ public class ClientProxy extends CommonProxy
|
||||
|
||||
ModelBakery.registerItemVariants(MekanismItems.WalkieTalkie, ItemWalkieTalkie.OFF_MODEL);
|
||||
|
||||
for(int i = 0; i <= 9; i++)
|
||||
for(int i = 1; i <= 9; i++)
|
||||
{
|
||||
ModelBakery.registerItemVariants(MekanismItems.WalkieTalkie, ItemWalkieTalkie.getModel(i));
|
||||
}
|
||||
|
||||
ModelBakery.registerItemVariants(MekanismItems.CraftingFormula, ItemCraftingFormula.MODEL,
|
||||
ItemCraftingFormula.INVALID_MODEL, ItemCraftingFormula.ENCODED_MODEL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockRenders()
|
||||
{
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.ObsidianTNT), 0, new ModelResourceLocation("mekanism:ObsidianTNT", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.SaltBlock), 0, new ModelResourceLocation("mekanism:SaltBlock", "inventory"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.CardboardBox), 0, new ModelResourceLocation("mekanism:CardboardBox", "storage=false"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.CardboardBox), 1, new ModelResourceLocation("mekanism:CardboardBox", "storage=true"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.EnergyCube), 0, new ModelResourceLocation("mekanism:EnergyCube", "inventory"));
|
||||
|
||||
for(MachineType type : MachineType.values())
|
||||
{
|
||||
if(!type.isValidMachine())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
List<ModelResourceLocation> modelsToAdd = new ArrayList<ModelResourceLocation>();
|
||||
String resource = "mekanism:" + type.getName();
|
||||
RecipeType recipePointer = null;
|
||||
|
||||
if(type == MachineType.BASIC_FACTORY || type == MachineType.ADVANCED_FACTORY || type == MachineType.ELITE_FACTORY)
|
||||
{
|
||||
recipePointer = RecipeType.values()[0];
|
||||
resource = "mekanism:" + type.getName() + "_" + recipePointer.getName();
|
||||
}
|
||||
|
||||
while(true)
|
||||
{
|
||||
if(machineResources.get(resource) == null)
|
||||
{
|
||||
List<String> entries = new ArrayList<String>();
|
||||
|
||||
if(type.hasActiveTexture())
|
||||
{
|
||||
entries.add("active=false");
|
||||
}
|
||||
|
||||
if(type.hasRotations())
|
||||
{
|
||||
entries.add("facing=north");
|
||||
}
|
||||
|
||||
String properties = new String();
|
||||
|
||||
for(int i = 0; i < entries.size(); i++)
|
||||
{
|
||||
properties += entries.get(i);
|
||||
|
||||
if(i < entries.size()-1)
|
||||
{
|
||||
properties += ",";
|
||||
}
|
||||
}
|
||||
|
||||
if(Arrays.asList(CUSTOM_RENDERS).contains(type.getName()))
|
||||
{
|
||||
properties = "inventory";
|
||||
}
|
||||
|
||||
ModelResourceLocation model = new ModelResourceLocation(resource, properties);
|
||||
|
||||
machineResources.put(resource, model);
|
||||
modelsToAdd.add(model);
|
||||
|
||||
if(type == MachineType.BASIC_FACTORY || type == MachineType.ADVANCED_FACTORY || type == MachineType.ELITE_FACTORY)
|
||||
{
|
||||
if(recipePointer.ordinal() < RecipeType.values().length-1)
|
||||
{
|
||||
recipePointer = RecipeType.values()[recipePointer.ordinal()+1];
|
||||
resource = "mekanism:" + type.getName() + "_" + recipePointer.getName();
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
ModelLoader.registerItemVariants(Item.getItemFromBlock(type.typeBlock.getBlock()), modelsToAdd.toArray(new ModelResourceLocation[] {}));
|
||||
}
|
||||
|
||||
for(BasicBlockType type : BasicBlockType.values())
|
||||
{
|
||||
List<ModelResourceLocation> modelsToAdd = new ArrayList<ModelResourceLocation>();
|
||||
String resource = "mekanism:" + type.getName();
|
||||
BaseTier tierPointer = null;
|
||||
|
||||
if(type.tiers)
|
||||
{
|
||||
tierPointer = BaseTier.values()[0];
|
||||
resource = "mekanism:" + type.getName() + "_" + tierPointer.getName();
|
||||
}
|
||||
|
||||
while(true)
|
||||
{
|
||||
if(basicResources.get(resource) == null)
|
||||
{
|
||||
List<String> entries = new ArrayList<String>();
|
||||
|
||||
if(type.hasActiveTexture())
|
||||
{
|
||||
entries.add("active=false");
|
||||
}
|
||||
|
||||
if(type.hasRotations() || type == BasicBlockType.THERMAL_EVAPORATION_CONTROLLER)
|
||||
{
|
||||
entries.add("facing=north");
|
||||
}
|
||||
|
||||
String properties = new String();
|
||||
|
||||
for(int i = 0; i < entries.size(); i++)
|
||||
{
|
||||
properties += entries.get(i);
|
||||
|
||||
if(i < entries.size()-1)
|
||||
{
|
||||
properties += ",";
|
||||
}
|
||||
}
|
||||
|
||||
if(type == BasicBlockType.BIN || Arrays.asList(CUSTOM_RENDERS).contains(type.getName()))
|
||||
{
|
||||
properties = "inventory";
|
||||
}
|
||||
|
||||
ModelResourceLocation model = new ModelResourceLocation(resource, properties);
|
||||
|
||||
basicResources.put(resource, model);
|
||||
modelsToAdd.add(model);
|
||||
|
||||
if(type.tiers)
|
||||
{
|
||||
if(tierPointer.ordinal() < BaseTier.values().length-1)
|
||||
{
|
||||
tierPointer = BaseTier.values()[tierPointer.ordinal()+1];
|
||||
|
||||
if(tierPointer.isObtainable())
|
||||
{
|
||||
resource = "mekanism:" + type.getName() + "_" + tierPointer.getName();
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
ModelLoader.registerItemVariants(Item.getItemFromBlock(type.blockType.getBlock()), modelsToAdd.toArray(new ModelResourceLocation[] {}));
|
||||
}
|
||||
|
||||
for(EnumColor color : EnumColor.DYES)
|
||||
{
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.PlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=plastic"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.SlickPlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=slick"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.GlowPlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=glow"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.ReinforcedPlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=reinforced"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.RoadPlasticBlock), color.getMetaValue(), new ModelResourceLocation("mekanism:plastic_block", "type=road"));
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.PlasticFence), color.getMetaValue(), new ModelResourceLocation("mekanism:PlasticFence", "inventory"));
|
||||
}
|
||||
|
||||
for(EnumOreType ore : EnumOreType.values())
|
||||
{
|
||||
ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(MekanismBlocks.OreBlock), ore.ordinal(), new ModelResourceLocation("mekanism:OreBlock", "type=" + ore.getName()));
|
||||
}
|
||||
|
||||
ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.GasTank), new ItemMeshDefinition() {
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(ItemStack stack)
|
||||
{
|
||||
GasTankTier tier = GasTankTier.values()[((ItemBlockGasTank)stack.getItem()).getBaseTier(stack).ordinal()];
|
||||
ResourceLocation baseLocation = new ResourceLocation("mekanism", "GasTank");
|
||||
|
||||
return new ModelResourceLocation(baseLocation, "facing=north,tier="+tier);
|
||||
}
|
||||
});
|
||||
|
||||
ItemMeshDefinition machineMesher = new ItemMeshDefinition() {
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(ItemStack stack)
|
||||
{
|
||||
MachineType type = MachineType.get(stack);
|
||||
|
||||
if(type != null)
|
||||
{
|
||||
String resource = "mekanism:" + type.getName();
|
||||
|
||||
if(type == MachineType.BASIC_FACTORY || type == MachineType.ADVANCED_FACTORY || type == MachineType.ELITE_FACTORY)
|
||||
{
|
||||
RecipeType recipe = RecipeType.values()[((ItemBlockMachine)stack.getItem()).getRecipeType(stack)];
|
||||
resource = "mekanism:" + type.getName() + "_" + recipe.getName();
|
||||
}
|
||||
|
||||
return machineResources.get(resource);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.MachineBlock), machineMesher);
|
||||
ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.MachineBlock2), machineMesher);
|
||||
ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.MachineBlock3), machineMesher);
|
||||
|
||||
ItemMeshDefinition basicMesher = new ItemMeshDefinition() {
|
||||
@Override
|
||||
public ModelResourceLocation getModelLocation(ItemStack stack)
|
||||
{
|
||||
BasicBlockType type = BasicBlockType.get(stack);
|
||||
|
||||
if(type != null)
|
||||
{
|
||||
String resource = "mekanism:" + type.getName();
|
||||
|
||||
if(type.tiers)
|
||||
{
|
||||
BaseTier tier = ((ItemBlockBasic)stack.getItem()).getBaseTier(stack);
|
||||
resource = "mekanism:" + type.getName() + "_" + tier.getName();
|
||||
}
|
||||
|
||||
return basicResources.get(resource);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.BasicBlock), basicMesher);
|
||||
ModelLoader.setCustomMeshDefinition(Item.getItemFromBlock(MekanismBlocks.BasicBlock2), basicMesher);
|
||||
|
||||
OBJLoader.instance.addDomain("mekanism");
|
||||
|
||||
Mekanism.logger.info("Render registrations complete.");
|
||||
}
|
||||
|
||||
public void registerItemRender(Item item)
|
||||
@@ -609,7 +796,7 @@ public class ClientProxy extends CommonProxy
|
||||
{
|
||||
if(Minecraft.getMinecraft().theWorld != null)
|
||||
{
|
||||
Minecraft.getMinecraft().effectRenderer.addBlockHitEffects(coord, mop);
|
||||
Minecraft.getMinecraft().effectRenderer.addBlockHitEffects(coord.getPos(), mop);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -645,13 +832,29 @@ public class ClientProxy extends CommonProxy
|
||||
|
||||
HolidayManager.init();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onModelBake(ModelBakeEvent event) throws IOException
|
||||
{
|
||||
for(String s : CUSTOM_RENDERS)
|
||||
{
|
||||
ModelResourceLocation model = new ModelResourceLocation("mekanism:" + s, "inventory");
|
||||
Object obj = event.modelRegistry.getObject(model);
|
||||
|
||||
if(obj instanceof IBakedModel)
|
||||
{
|
||||
event.modelRegistry.putObject(model, new CustomItemModelFactory((IBakedModel)obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void preInit()
|
||||
{
|
||||
MekanismRenderer.init();
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new TextureStitcher());
|
||||
MinecraftForge.EVENT_BUS.register(new CTMRegistry());
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
|
||||
//Register entity rendering handlers
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityObsidianTNT.class, new IRenderFactory<EntityObsidianTNT>() {
|
||||
|
||||
@@ -14,12 +14,13 @@ import java.util.Set;
|
||||
|
||||
import mekanism.api.IClientTicker;
|
||||
import mekanism.api.MekanismConfig.client;
|
||||
import mekanism.api.ObfuscatedNames;
|
||||
import mekanism.api.gas.GasStack;
|
||||
import mekanism.api.util.ReflectionUtils;
|
||||
import mekanism.client.sound.SoundHandler;
|
||||
import mekanism.common.CommonPlayerTickHandler;
|
||||
import mekanism.common.KeySync;
|
||||
import mekanism.common.Mekanism;
|
||||
import mekanism.common.ObfuscatedNames;
|
||||
import mekanism.common.item.ItemFlamethrower;
|
||||
import mekanism.common.item.ItemFreeRunners;
|
||||
import mekanism.common.item.ItemGasMask;
|
||||
@@ -390,13 +391,13 @@ public class ClientTickHandler
|
||||
public static void setCape(AbstractClientPlayer player, ResourceLocation cape)
|
||||
{
|
||||
try {
|
||||
Method m = MekanismUtils.getPrivateMethod(AbstractClientPlayer.class, ObfuscatedNames.AbstractClientPlayer_getPlayerInfo);
|
||||
Method m = ReflectionUtils.getPrivateMethod(AbstractClientPlayer.class, ObfuscatedNames.AbstractClientPlayer_getPlayerInfo);
|
||||
Object obj = m.invoke(player);
|
||||
|
||||
if(obj instanceof NetworkPlayerInfo)
|
||||
{
|
||||
NetworkPlayerInfo info = (NetworkPlayerInfo)obj;
|
||||
MekanismUtils.setPrivateValue(info, cape, NetworkPlayerInfo.class, ObfuscatedNames.NetworkPlayerInfo_locationCape);
|
||||
ReflectionUtils.setPrivateValue(info, cape, NetworkPlayerInfo.class, ObfuscatedNames.NetworkPlayerInfo_locationCape);
|
||||
}
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
@@ -52,12 +52,12 @@ public class SparkleAnimation
|
||||
{
|
||||
for(int i = 0; i < 6; i++)
|
||||
{
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, coord.getX() + random.nextDouble(), coord.getY() + -.01, coord.getZ() + random.nextDouble(), 0, 0, 0);
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, coord.getX() + random.nextDouble(), coord.getY() + 1.01, coord.getZ() + random.nextDouble(), 0, 0, 0);
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, coord.getX() + random.nextDouble(), coord.getY() + random.nextDouble(), coord.getZ() + -.01, 0, 0, 0);
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, coord.getX() + random.nextDouble(), coord.getY() + random.nextDouble(), coord.getZ() + 1.01, 0, 0, 0);
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, coord.getX() + -.01, coord.getY() + random.nextDouble(), coord.getZ() + random.nextDouble(), 0, 0, 0);
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, coord.getX() + 1.01, coord.getY() + random.nextDouble(), coord.getZ() + random.nextDouble(), 0, 0, 0);
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, coord.xCoord + random.nextDouble(), coord.yCoord + -.01, coord.zCoord + random.nextDouble(), 0, 0, 0);
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, coord.xCoord + random.nextDouble(), coord.yCoord + 1.01, coord.zCoord + random.nextDouble(), 0, 0, 0);
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, coord.xCoord + random.nextDouble(), coord.yCoord + random.nextDouble(), coord.zCoord + -.01, 0, 0, 0);
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, coord.xCoord + random.nextDouble(), coord.yCoord + random.nextDouble(), coord.zCoord + 1.01, 0, 0, 0);
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, coord.xCoord + -.01, coord.yCoord + random.nextDouble(), coord.zCoord + random.nextDouble(), 0, 0, 0);
|
||||
world.spawnParticle(EnumParticleTypes.REDSTONE, coord.xCoord + 1.01, coord.yCoord + random.nextDouble(), coord.zCoord + random.nextDouble(), 0, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,20 +4,18 @@ import mekanism.api.Pos3D;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.particle.EntityFX;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.renderer.vertex.VertexFormat;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class EntityLaser extends EntityFX
|
||||
{
|
||||
@@ -42,7 +40,7 @@ public class EntityLaser extends EntityFX
|
||||
{
|
||||
worldRendererIn.finishDrawing();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_POLYGON_BIT + GL11.GL_ENABLE_BIT);
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
MekanismRenderer.glowOn();
|
||||
@@ -52,7 +50,7 @@ public class EntityLaser extends EntityFX
|
||||
float newY = (float)(this.prevPosY + (this.posY - this.prevPosY) * (double)partialTicks - interpPosY);
|
||||
float newZ = (float)(this.prevPosZ + (this.posZ - this.prevPosZ) * (double)partialTicks - interpPosZ);
|
||||
|
||||
GL11.glTranslatef(newX, newY, newZ);
|
||||
GlStateManager.translate(newX, newY, newZ);
|
||||
|
||||
switch(direction)
|
||||
{
|
||||
@@ -62,14 +60,15 @@ public class EntityLaser extends EntityFX
|
||||
break;
|
||||
case WEST:
|
||||
case EAST:
|
||||
GL11.glRotated(90, 0, 0, 1);
|
||||
GlStateManager.rotate(90, 0, 0, 1);
|
||||
break;
|
||||
case NORTH:
|
||||
case SOUTH:
|
||||
GL11.glRotated(90, 1, 0, 0);
|
||||
GlStateManager.rotate(90, 1, 0, 0);
|
||||
break;
|
||||
}
|
||||
GL11.glRotated(45, 0, 1, 0);
|
||||
|
||||
GlStateManager.rotate(45, 0, 1, 0);
|
||||
worldRendererIn.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
worldRendererIn.pos(-particleScale, -length/2, 0).tex(0, 0).color(particleRed, particleGreen, particleBlue, particleAlpha).endVertex();
|
||||
worldRendererIn.pos(-particleScale, length/2, 0).tex(0, 1).color(particleRed, particleGreen, particleBlue, particleAlpha).endVertex();
|
||||
@@ -77,7 +76,7 @@ public class EntityLaser extends EntityFX
|
||||
worldRendererIn.pos(particleScale, -length/2, 0).tex(1, 0).color(particleRed, particleGreen, particleBlue, particleAlpha).endVertex();
|
||||
worldRendererIn.finishDrawing();
|
||||
|
||||
GL11.glRotated(90, 0, 1, 0);
|
||||
GlStateManager.rotate(90, 0, 1, 0);
|
||||
worldRendererIn.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
worldRendererIn.pos(-particleScale, -length/2, 0).tex(0, 0).color(particleRed, particleGreen, particleBlue, particleAlpha).endVertex();
|
||||
worldRendererIn.pos(-particleScale, length/2, 0).tex(0, 1).color(particleRed, particleGreen, particleBlue, particleAlpha).endVertex();
|
||||
@@ -87,7 +86,7 @@ public class EntityLaser extends EntityFX
|
||||
|
||||
MekanismRenderer.glowOff();
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(MekanismRenderer.getBlocksTexture());
|
||||
worldRendererIn.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
|
||||
@@ -24,12 +24,11 @@ import mekanism.common.tile.TileEntityAdvancedElectricMachine;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiAdvancedElectricMachine extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -19,12 +19,11 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiBoilerStats extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -22,12 +22,11 @@ import mekanism.common.tile.TileEntityChanceMachine;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiChanceMachine extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -30,16 +30,16 @@ import mekanism.common.tile.TileEntityChemicalCrystallizer;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiChemicalCrystallizer extends GuiMekanism
|
||||
{
|
||||
@@ -127,11 +127,11 @@ public class GuiChemicalCrystallizer extends GuiMekanism
|
||||
if(renderStack != null)
|
||||
{
|
||||
try {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(renderStack, 131, 14);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ import mekanism.api.util.ListUtils;
|
||||
import mekanism.client.gui.element.GuiElement.IInfoHandler;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo;
|
||||
import mekanism.client.gui.element.GuiGasGauge;
|
||||
import mekanism.client.gui.element.GuiSecurityTab;
|
||||
import mekanism.client.gui.element.GuiGasGauge.IGasInfoHandler;
|
||||
import mekanism.client.gui.element.GuiGauge;
|
||||
import mekanism.client.gui.element.GuiProgress;
|
||||
import mekanism.client.gui.element.GuiProgress.IProgressInfoHandler;
|
||||
import mekanism.client.gui.element.GuiProgress.ProgressBar;
|
||||
import mekanism.client.gui.element.GuiRedstoneControl;
|
||||
import mekanism.client.gui.element.GuiSecurityTab;
|
||||
import mekanism.client.gui.element.GuiSlot;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotOverlay;
|
||||
import mekanism.client.gui.element.GuiSlot.SlotType;
|
||||
@@ -24,12 +24,11 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiChemicalDissolutionChamber extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -24,12 +24,11 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiChemicalInfuser extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -24,12 +24,11 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiChemicalOxidizer extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -29,12 +29,11 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiChemicalWasher extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -8,16 +8,16 @@ import mekanism.common.inventory.container.ContainerDictionary;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiDictionary extends GuiMekanism
|
||||
{
|
||||
@@ -43,11 +43,11 @@ public class GuiDictionary extends GuiMekanism
|
||||
|
||||
if(itemType != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(itemType, 6, 6);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
super.drawGuiContainerForegroundLayer(mouseX, mouseY);
|
||||
@@ -67,7 +67,7 @@ public class GuiDictionary extends GuiMekanism
|
||||
|
||||
if(xAxis >= 6 && xAxis <= 22 && yAxis >= 6 && yAxis <= 22)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
|
||||
@@ -77,7 +77,7 @@ public class GuiDictionary extends GuiMekanism
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
super.drawGuiContainerBackgroundLayer(partialTick, mouseX, mouseY);
|
||||
|
||||
@@ -5,7 +5,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.Coord4D;
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.api.util.ListUtils;
|
||||
import mekanism.client.gui.element.GuiElement.IInfoHandler;
|
||||
import mekanism.client.gui.element.GuiEnergyInfo;
|
||||
@@ -30,14 +29,14 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiDigitalMiner extends GuiMekanism
|
||||
{
|
||||
@@ -183,7 +182,7 @@ public class GuiDigitalMiner extends GuiMekanism
|
||||
|
||||
if(tileEntity.missingStack != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
@@ -194,7 +193,7 @@ public class GuiDigitalMiner extends GuiMekanism
|
||||
itemRender.renderItemAndEffectIntoGUI(tileEntity.missingStack, 144, 27);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
else {
|
||||
mc.getTextureManager().bindTexture(MekanismUtils.getResource(ResourceType.GUI_ELEMENT, "GuiSlot.png"));
|
||||
|
||||
@@ -29,16 +29,16 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiDigitalMinerConfig extends GuiMekanism
|
||||
{
|
||||
@@ -464,11 +464,11 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
||||
|
||||
if(itemFilter.itemType != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(itemFilter.itemType, 59, yStart + 3);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.itemFilter"), 78, yStart + 2, 0x404040);
|
||||
@@ -485,11 +485,11 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
||||
if(oreDictStacks.get(filter).renderStack != null)
|
||||
{
|
||||
try {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(oreDictStacks.get(filter).renderStack, 59, yStart + 3);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
@@ -501,11 +501,11 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
||||
|
||||
if(itemFilter.materialItem != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(itemFilter.materialItem, 59, yStart + 3);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.materialFilter"), 78, yStart + 2, 0x404040);
|
||||
@@ -522,11 +522,11 @@ public class GuiDigitalMinerConfig extends GuiMekanism
|
||||
if(modIDStacks.get(filter).renderStack != null)
|
||||
{
|
||||
try {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(modIDStacks.get(filter).renderStack, 59, yStart + 3);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -11,12 +11,11 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiDynamicTank extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -22,12 +22,11 @@ import mekanism.common.tile.TileEntityElectricMachine;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiElectricMachine extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -23,12 +23,11 @@ import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiElectricPump extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package mekanism.client.gui;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -34,13 +35,11 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import java.io.IOException;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiElectrolyticSeparator extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -21,12 +21,11 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiEnergyCube extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -26,17 +26,15 @@ import mekanism.common.network.PacketTileEntity.TileEntityMessage;
|
||||
import mekanism.common.tile.TileEntityFactory;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiFactory extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -14,12 +14,11 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiFluidTank extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -23,12 +23,11 @@ import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiFluidicPlenisher extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -27,16 +27,16 @@ import mekanism.common.tile.TileEntityFormulaicAssemblicator;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiFormulaicAssemblicator extends GuiMekanism
|
||||
{
|
||||
@@ -200,7 +200,7 @@ public class GuiFormulaicAssemblicator extends GuiMekanism
|
||||
if(stack != null)
|
||||
{
|
||||
Slot slot = (Slot)inventorySlots.inventorySlots.get(i+20);
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
if(slot.getStack() == null || !slot.getStack().isItemEqual(stack))
|
||||
{
|
||||
@@ -213,7 +213,7 @@ public class GuiFormulaicAssemblicator extends GuiMekanism
|
||||
itemRender.renderItemAndEffectIntoGUI(stack, guiWidth + slot.xDisplayPosition, guiHeight + slot.yDisplayPosition);
|
||||
MekanismRenderer.blendOff();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,12 +17,11 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiFuelwoodHeater extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -20,12 +20,11 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiGasTank extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -14,12 +14,11 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiInductionMatrix extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -19,15 +19,14 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiLaserAmplifier extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -30,17 +30,17 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.input.Mouse;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiLogisticalSorter extends GuiMekanism
|
||||
{
|
||||
@@ -470,11 +470,11 @@ public class GuiLogisticalSorter extends GuiMekanism
|
||||
|
||||
if(itemFilter.itemType != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(itemFilter.itemType, 59, yStart + 3);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.itemFilter"), 78, yStart + 2, 0x404040);
|
||||
@@ -492,11 +492,11 @@ public class GuiLogisticalSorter extends GuiMekanism
|
||||
if(oreDictStacks.get(filter).renderStack != null)
|
||||
{
|
||||
try {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(oreDictStacks.get(filter).renderStack, 59, yStart + 3);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
} catch(final Exception e) {}
|
||||
}
|
||||
|
||||
@@ -509,11 +509,11 @@ public class GuiLogisticalSorter extends GuiMekanism
|
||||
|
||||
if(itemFilter.materialItem != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(itemFilter.materialItem, 59, yStart + 3);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.materialFilter"), 78, yStart + 2, 0x404040);
|
||||
@@ -531,11 +531,11 @@ public class GuiLogisticalSorter extends GuiMekanism
|
||||
if(modIDStacks.get(filter).renderStack != null)
|
||||
{
|
||||
try {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(modIDStacks.get(filter).renderStack, 59, yStart + 3);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
} catch(final Exception e) {}
|
||||
}
|
||||
|
||||
@@ -566,7 +566,7 @@ public class GuiLogisticalSorter extends GuiMekanism
|
||||
|
||||
if(tileEntity.color != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
@@ -575,7 +575,7 @@ public class GuiLogisticalSorter extends GuiMekanism
|
||||
//TODO itemRender.renderIcon(13, 137, MekanismRenderer.getColorIcon(tileEntity.color), 16, 16);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
// Draw tooltips for buttons
|
||||
|
||||
@@ -14,12 +14,11 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiMFilterSelect extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -18,17 +18,17 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiMItemStackFilter extends GuiMekanism
|
||||
{
|
||||
@@ -128,20 +128,20 @@ public class GuiMItemStackFilter extends GuiMekanism
|
||||
|
||||
if(filter.itemType != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(filter.itemType, 12, 19);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(filter.replaceStack != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(filter.replaceStack, 149, 19);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(xAxis >= 148 && xAxis <= 162 && yAxis >= 45 && yAxis <= 59)
|
||||
@@ -211,7 +211,7 @@ public class GuiMItemStackFilter extends GuiMekanism
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 28 && yAxis >= 19 && yAxis <= 35)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
|
||||
@@ -221,12 +221,12 @@ public class GuiMItemStackFilter extends GuiMekanism
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(xAxis >= 149 && xAxis <= 165 && yAxis >= 19 && yAxis <= 35)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
@@ -236,7 +236,7 @@ public class GuiMItemStackFilter extends GuiMekanism
|
||||
drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433);
|
||||
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,17 +18,17 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiMMaterialFilter extends GuiMekanism
|
||||
{
|
||||
@@ -128,20 +128,20 @@ public class GuiMMaterialFilter extends GuiMekanism
|
||||
|
||||
if(filter.materialItem != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(filter.materialItem, 12, 19);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(filter.replaceStack != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(filter.replaceStack, 149, 19);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(xAxis >= 148 && xAxis <= 162 && yAxis >= 45 && yAxis <= 59)
|
||||
@@ -198,7 +198,7 @@ public class GuiMMaterialFilter extends GuiMekanism
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 28 && yAxis >= 19 && yAxis <= 35)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
|
||||
@@ -208,12 +208,12 @@ public class GuiMMaterialFilter extends GuiMekanism
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(xAxis >= 149 && xAxis <= 165 && yAxis >= 19 && yAxis <= 35)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
@@ -223,7 +223,7 @@ public class GuiMMaterialFilter extends GuiMekanism
|
||||
drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433);
|
||||
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,17 +22,17 @@ import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiMModIDFilter extends GuiMekanism
|
||||
{
|
||||
@@ -168,21 +168,21 @@ public class GuiMModIDFilter extends GuiMekanism
|
||||
if(renderStack != null)
|
||||
{
|
||||
try {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(renderStack, 12, 19);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
if(filter.replaceStack != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(filter.replaceStack, 149, 19);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(xAxis >= 148 && xAxis <= 162 && yAxis >= 45 && yAxis <= 59)
|
||||
@@ -233,7 +233,7 @@ public class GuiMModIDFilter extends GuiMekanism
|
||||
|
||||
if(xAxis >= 149 && xAxis <= 165 && yAxis >= 19 && yAxis <= 35)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
@@ -243,7 +243,7 @@ public class GuiMModIDFilter extends GuiMekanism
|
||||
drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433);
|
||||
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
modIDText.drawTextBox();
|
||||
|
||||
@@ -22,17 +22,17 @@ import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiMOreDictFilter extends GuiMekanism
|
||||
{
|
||||
@@ -168,21 +168,21 @@ public class GuiMOreDictFilter extends GuiMekanism
|
||||
if(renderStack != null)
|
||||
{
|
||||
try {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(renderStack, 12, 19);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
if(filter.replaceStack != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(filter.replaceStack, 149, 19);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(xAxis >= 148 && xAxis <= 162 && yAxis >= 45 && yAxis <= 59)
|
||||
@@ -233,7 +233,7 @@ public class GuiMOreDictFilter extends GuiMekanism
|
||||
|
||||
if(xAxis >= 149 && xAxis <= 165 && yAxis >= 19 && yAxis <= 35)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glPushAttrib(GL11.GL_LIGHTING_BIT);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
@@ -243,7 +243,7 @@ public class GuiMOreDictFilter extends GuiMekanism
|
||||
drawGradientRect(x, y, x + 16, y + 16, -2130706433, -2130706433);
|
||||
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
oreDictText.drawTextBox();
|
||||
|
||||
@@ -18,12 +18,11 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiMatrixStats extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package mekanism.client.gui;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -14,10 +13,12 @@ import mekanism.common.item.ItemConfigurator;
|
||||
import mekanism.common.tile.TileEntityContainerBlock;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.inventory.Container;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public abstract class GuiMekanism extends GuiContainer implements IGuiWrapper
|
||||
@@ -65,12 +66,12 @@ public abstract class GuiMekanism extends GuiContainer implements IGuiWrapper
|
||||
float reverse = 1/scale;
|
||||
float yAdd = 4-(scale*8)/2F;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GlStateManager.scale(scale, scale, scale);
|
||||
fontRendererObj.drawString(text, (int)(x*reverse), (int)((y*reverse)+yAdd), color);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,12 +30,11 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiMetallurgicInfuser extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -26,15 +26,15 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiOredictionificator extends GuiMekanism
|
||||
{
|
||||
@@ -132,11 +132,11 @@ public class GuiOredictionificator extends GuiMekanism
|
||||
|
||||
if(stack != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(stack, 13, yStart + 3);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.filter"), 32, yStart + 2, 0x404040);
|
||||
|
||||
@@ -17,16 +17,16 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiOredictionificatorFilter extends GuiMekanism
|
||||
{
|
||||
@@ -149,11 +149,11 @@ public class GuiOredictionificatorFilter extends GuiMekanism
|
||||
if(renderStack != null)
|
||||
{
|
||||
try {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(renderStack, 45, 19);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,12 +30,11 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiPRC extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -8,12 +8,11 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiPersonalChest extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -25,13 +25,12 @@ import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiQuantumEntangloporter extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -28,13 +28,12 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiResistiveHeater extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -12,12 +12,11 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiRobitCrafting extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -12,12 +12,11 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiRobitInventory extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -14,13 +14,12 @@ import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiRobitMain extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package mekanism.client.gui;
|
||||
|
||||
import io.netty.buffer.Unpooled;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
@@ -22,15 +24,12 @@ import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.network.play.client.C17PacketCustomPayload;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import io.netty.buffer.Unpooled;
|
||||
import org.apache.commons.io.Charsets;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiRobitRepair extends GuiMekanism implements ICrafting
|
||||
{
|
||||
|
||||
@@ -33,12 +33,11 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiRotaryCondensentrator extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -22,13 +22,12 @@ import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiSecurityDesk extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -10,18 +10,18 @@ import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.util.Rectangle;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiSeismicReader extends GuiScreen
|
||||
{
|
||||
@@ -43,7 +43,7 @@ public class GuiSeismicReader extends GuiScreen
|
||||
|
||||
public GuiSeismicReader(World world, Coord4D coord, ItemStack stack)
|
||||
{
|
||||
pos = new Coord4D(coord.getX(), Math.min(255, coord.getY()), coord.getZ());
|
||||
pos = new Coord4D(coord.xCoord, Math.min(255, coord.yCoord), coord.zCoord);
|
||||
worldObj = world;
|
||||
|
||||
itemStack = stack;
|
||||
@@ -91,17 +91,17 @@ public class GuiSeismicReader extends GuiScreen
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
// Fix the overlapping if > 100
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(guiWidth + 48, guiHeight + 87, 0);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(guiWidth + 48, guiHeight + 87, 0);
|
||||
|
||||
if(currentLayer >= 100)
|
||||
{
|
||||
GL11.glTranslatef(0, 1, 0);
|
||||
GL11.glScalef(0.7f, 0.7f, 0.7f);
|
||||
GlStateManager.translate(0, 1, 0);
|
||||
GlStateManager.scale(0.7f, 0.7f, 0.7f);
|
||||
}
|
||||
|
||||
fontRendererObj.drawString(String.format("%s", currentLayer), 0, 0, 0xAFAFAF);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
// Render the item stacks
|
||||
for(int i = 0; i < 9; i++)
|
||||
@@ -118,22 +118,22 @@ public class GuiSeismicReader extends GuiScreen
|
||||
continue;
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(centralX - 2, centralY - i * 16 + (22 * 2), 0);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(centralX - 2, centralY - i * 16 + (22 * 2), 0);
|
||||
|
||||
if(i < 4)
|
||||
{
|
||||
GL11.glTranslatef(0.2f, 2.5f, 0);
|
||||
GlStateManager.translate(0.2f, 2.5f, 0);
|
||||
}
|
||||
|
||||
if(i != 4)
|
||||
{
|
||||
GL11.glTranslatef(1.5f, 0, 0);
|
||||
GL11.glScalef(0.8f, 0.8f, 0.8f);
|
||||
GlStateManager.translate(1.5f, 0, 0);
|
||||
GlStateManager.scale(0.8f, 0.8f, 0.8f);
|
||||
}
|
||||
|
||||
itemRender.renderItemAndEffectIntoGUI(stack, 0, 0);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,23 +158,23 @@ public class GuiSeismicReader extends GuiScreen
|
||||
|
||||
renderScale = lengthX > 53 ? 53f / lengthX : 1.0f;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(guiWidth + 72, guiHeight + 16, 0);
|
||||
GL11.glScalef(renderScale, renderScale, renderScale);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(guiWidth + 72, guiHeight + 16, 0);
|
||||
GlStateManager.scale(renderScale, renderScale, renderScale);
|
||||
fontRendererObj.drawString(capitalised, 0, 0, 0x919191);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
if(tooltip.intersects(new Rectangle(mouseX, mouseY, 1, 1)))
|
||||
{
|
||||
mc.renderEngine.bindTexture(MekanismUtils.getResource(ResourceType.GUI_ELEMENT, "GuiTooltips.png"));
|
||||
int fontLengthX = fontRendererObj.getStringWidth(capitalised) + 5;
|
||||
int renderX = mouseX + 10, renderY = mouseY - 5;
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
drawTexturedModalRect(renderX, renderY, 0, 0, fontLengthX, 16);
|
||||
drawTexturedModalRect(renderX + fontLengthX, renderY, 0, 16, 2, 16);
|
||||
fontRendererObj.drawString(capitalised, renderX + 4, renderY + 4, 0x919191);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,11 +193,11 @@ public class GuiSeismicReader extends GuiScreen
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(guiWidth + 72, guiHeight + 26, 0);
|
||||
GL11.glScalef(0.70f, 0.70f, 0.70f);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(guiWidth + 72, guiHeight + 26, 0);
|
||||
GlStateManager.scale(0.70f, 0.70f, 0.70f);
|
||||
fontRendererObj.drawString(LangUtils.localize("gui.abundancy") + ": " + frequency, 0, 0, 0x919191);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
super.drawScreen(mouseX, mouseY, partialTick);
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ public class GuiSeismicReader extends GuiScreen
|
||||
|
||||
public void calculate()
|
||||
{
|
||||
for(BlockPos p = new BlockPos(pos.getX(), 0, pos.getZ()); p.getY() < pos.getY(); p = p.up())
|
||||
for(BlockPos p = new BlockPos(pos.zCoord, 0, pos.zCoord); p.getY() < pos.yCoord; p = p.up())
|
||||
{
|
||||
IBlockState state = worldObj.getBlockState(p);
|
||||
Block block = state.getBlock();
|
||||
|
||||
@@ -18,12 +18,11 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiSeismicVibrator extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -27,13 +27,12 @@ import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiSideConfiguration extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -18,12 +18,11 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiSolarNeutronActivator extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -14,12 +14,11 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiTFilterSelect extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -20,16 +20,16 @@ import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.common.util.TransporterUtils;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiTItemStackFilter extends GuiMekanism
|
||||
{
|
||||
@@ -183,16 +183,16 @@ public class GuiTItemStackFilter extends GuiMekanism
|
||||
|
||||
if(filter.itemType != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(filter.itemType, 12, 19);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(filter.color != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
@@ -201,7 +201,7 @@ public class GuiTItemStackFilter extends GuiMekanism
|
||||
//TODO itemRender.renderIcon(12, 44, MekanismRenderer.getColorIcon(filter.color), 16, 16);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60)
|
||||
@@ -270,7 +270,7 @@ public class GuiTItemStackFilter extends GuiMekanism
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 28 && yAxis >= 19 && yAxis <= 35)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
|
||||
@@ -280,7 +280,7 @@ public class GuiTItemStackFilter extends GuiMekanism
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,18 +20,18 @@ import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.common.util.TransporterUtils;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiTMaterialFilter extends GuiMekanism
|
||||
{
|
||||
@@ -131,16 +131,16 @@ public class GuiTMaterialFilter extends GuiMekanism
|
||||
|
||||
if(filter.materialItem != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(filter.materialItem, 12, 19);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(filter.color != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
@@ -149,7 +149,7 @@ public class GuiTMaterialFilter extends GuiMekanism
|
||||
//TODO itemRender.renderIcon(12, 44, MekanismRenderer.getColorIcon(filter.color), 16, 16);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60)
|
||||
@@ -204,7 +204,7 @@ public class GuiTMaterialFilter extends GuiMekanism
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 28 && yAxis >= 19 && yAxis <= 35)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
|
||||
@@ -214,7 +214,7 @@ public class GuiTMaterialFilter extends GuiMekanism
|
||||
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,16 +23,16 @@ import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.common.util.TransporterUtils;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiTModIDFilter extends GuiMekanism
|
||||
{
|
||||
@@ -168,17 +168,17 @@ public class GuiTModIDFilter extends GuiMekanism
|
||||
if(renderStack != null)
|
||||
{
|
||||
try {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(renderStack, 12, 19);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
if(filter.color != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
@@ -187,7 +187,7 @@ public class GuiTModIDFilter extends GuiMekanism
|
||||
//TODO itemRender.renderIcon(12, 44, MekanismRenderer.getColorIcon(filter.color), 16, 16);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60)
|
||||
|
||||
@@ -23,16 +23,16 @@ import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import mekanism.common.util.TransporterUtils;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiTOreDictFilter extends GuiMekanism
|
||||
{
|
||||
@@ -168,17 +168,17 @@ public class GuiTOreDictFilter extends GuiMekanism
|
||||
if(renderStack != null)
|
||||
{
|
||||
try {
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(renderStack, 12, 19);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
} catch(Exception e) {}
|
||||
}
|
||||
|
||||
if(filter.color != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
@@ -187,7 +187,7 @@ public class GuiTOreDictFilter extends GuiMekanism
|
||||
//TODO itemRender.renderIcon(12, 44, MekanismRenderer.getColorIcon(filter.color), 16, 16);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
if(xAxis >= 12 && xAxis <= 28 && yAxis >= 44 && yAxis <= 60)
|
||||
|
||||
@@ -33,13 +33,12 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiTeleporter extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -18,12 +18,11 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fluids.FluidTank;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiThermalEvaporationController extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -21,12 +21,11 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiThermoelectricBoiler extends GuiMekanism
|
||||
{
|
||||
|
||||
@@ -21,17 +21,17 @@ import mekanism.common.tile.component.TileComponentConfig;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiTransporterConfig extends GuiMekanism
|
||||
{
|
||||
@@ -135,7 +135,7 @@ public class GuiTransporterConfig extends GuiMekanism
|
||||
|
||||
if(configurable.getEjector().getOutputColor() != null)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
@@ -144,7 +144,7 @@ public class GuiTransporterConfig extends GuiMekanism
|
||||
//TODO itemRender.renderIcon(122, 49, MekanismRenderer.getColorIcon(configurable.getEjector().getOutputColor()), 16, 16);
|
||||
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
for(int i = 0; i < slotPosMap.size(); i++)
|
||||
|
||||
@@ -16,14 +16,14 @@ import mekanism.common.network.PacketSimpleGui.SimpleGuiMessage;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiUpgradeManagement extends GuiMekanism
|
||||
{
|
||||
@@ -136,20 +136,20 @@ public class GuiUpgradeManagement extends GuiMekanism
|
||||
|
||||
private void renderText(String text, int x, int y, float size, boolean scale)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(size, size, size);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(size, size, size);
|
||||
fontRendererObj.drawString(text, scale ? (int)((1F/size)*x) : x, scale ? (int)((1F/size)*y) : y, 0x00CD00);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
private void renderUpgrade(Upgrade type, int x, int y, float size, boolean scale)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(size, size, size);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(size, size, size);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
itemRender.renderItemAndEffectIntoGUI(type.getStack(), scale ? (int)((1F/size)*x) : x, scale ? (int)((1F/size)*y) : y);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -8,7 +8,6 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -2,19 +2,19 @@ package mekanism.client.gui.element;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mekanism.api.ObfuscatedNames;
|
||||
import mekanism.api.util.ReflectionUtils;
|
||||
import mekanism.client.gui.IGuiWrapper;
|
||||
import mekanism.common.ObfuscatedNames;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public abstract class GuiElement
|
||||
{
|
||||
@@ -48,8 +48,8 @@ public abstract class GuiElement
|
||||
if(guiObj instanceof GuiContainer)
|
||||
{
|
||||
try {
|
||||
int size = (Integer)MekanismUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_xSize);
|
||||
MekanismUtils.setPrivateValue(guiObj, size + xSize, GuiContainer.class, ObfuscatedNames.GuiContainer_xSize);
|
||||
int size = (Integer)ReflectionUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_xSize);
|
||||
ReflectionUtils.setPrivateValue(guiObj, size + xSize, GuiContainer.class, ObfuscatedNames.GuiContainer_xSize);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -61,8 +61,8 @@ public abstract class GuiElement
|
||||
if(guiObj instanceof GuiContainer)
|
||||
{
|
||||
try {
|
||||
int size = (Integer)MekanismUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_ySize);
|
||||
MekanismUtils.setPrivateValue(guiObj, size + ySize, GuiContainer.class, ObfuscatedNames.GuiContainer_ySize);
|
||||
int size = (Integer)ReflectionUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_ySize);
|
||||
ReflectionUtils.setPrivateValue(guiObj, size + ySize, GuiContainer.class, ObfuscatedNames.GuiContainer_ySize);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -74,9 +74,9 @@ public abstract class GuiElement
|
||||
if(guiObj instanceof GuiContainer)
|
||||
{
|
||||
try {
|
||||
int left = (Integer)MekanismUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft);
|
||||
int left = (Integer)ReflectionUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft);
|
||||
System.out.println(left + " " + guiLeft);
|
||||
MekanismUtils.setPrivateValue(guiObj, left + guiLeft, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft);
|
||||
ReflectionUtils.setPrivateValue(guiObj, left + guiLeft, GuiContainer.class, ObfuscatedNames.GuiContainer_guiLeft);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -88,8 +88,8 @@ public abstract class GuiElement
|
||||
if(guiObj instanceof GuiContainer)
|
||||
{
|
||||
try {
|
||||
int top = (Integer)MekanismUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop);
|
||||
MekanismUtils.setPrivateValue(guiObj, top + guiTop, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop);
|
||||
int top = (Integer)ReflectionUtils.getPrivateValue(guiObj, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop);
|
||||
ReflectionUtils.setPrivateValue(guiObj, top + guiTop, GuiContainer.class, ObfuscatedNames.GuiContainer_guiTop);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
@@ -109,12 +109,12 @@ public abstract class GuiElement
|
||||
float reverse = 1/scale;
|
||||
float yAdd = 4-(scale*8)/2F;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
GlStateManager.scale(scale, scale, scale);
|
||||
getFontRenderer().drawString(text, (int)(x*reverse), (int)((y*reverse)+yAdd), color);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import mekanism.client.gui.IGuiWrapper;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import mekanism.common.base.ITankManager;
|
||||
import mekanism.common.item.ItemGaugeDropper;
|
||||
import mekanism.common.network.PacketDropperUse.DropperUseMessage;
|
||||
import mekanism.common.util.LangUtils;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@@ -13,7 +13,6 @@ import mekanism.common.base.ITankManager;
|
||||
import mekanism.common.item.ItemGaugeDropper;
|
||||
import mekanism.common.network.PacketDropperUse.DropperUseMessage;
|
||||
import mekanism.common.util.LangUtils;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@@ -10,7 +10,6 @@ import mekanism.common.base.ISideConfiguration;
|
||||
import mekanism.common.item.ItemConfigurator;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@@ -8,12 +8,11 @@ import mekanism.client.render.MekanismRenderer;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiGraph extends GuiElement
|
||||
{
|
||||
|
||||
@@ -10,7 +10,6 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ package mekanism.client.gui.element;
|
||||
import static java.lang.Math.min;
|
||||
import mekanism.api.transmitters.TransmissionType;
|
||||
import mekanism.client.gui.IGuiWrapper;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@ import mekanism.client.gui.IGuiWrapper;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@ import mekanism.client.gui.IGuiWrapper;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -7,13 +7,11 @@ import mekanism.client.gui.IGuiWrapper;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiScrollList extends GuiElement
|
||||
{
|
||||
|
||||
@@ -12,7 +12,6 @@ import mekanism.common.util.LangUtils;
|
||||
import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package mekanism.client.model;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -240,7 +241,7 @@ public class ModelArmoredJetpack extends ModelBase
|
||||
Packdoodad3.render(size);
|
||||
Bottomthruster.render(size);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
MekanismRenderer.blendOn();
|
||||
MekanismRenderer.glowOn();
|
||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||
@@ -249,11 +250,11 @@ public class ModelArmoredJetpack extends ModelBase
|
||||
WingbladeL.render(size);
|
||||
WingbladeR.render(size);
|
||||
|
||||
GL11.glColor4f(1, 1, 1, 1);
|
||||
MekanismRenderer.resetColor();
|
||||
GL11.glDisable(GL11.GL_CULL_FACE);
|
||||
MekanismRenderer.glowOff();
|
||||
MekanismRenderer.blendOff();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
MekanismRenderer.glowOn();
|
||||
light1.render(size);
|
||||
@@ -261,8 +262,8 @@ public class ModelArmoredJetpack extends ModelBase
|
||||
light3.render(size);
|
||||
Packcore.render(size);
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.0F, 0.0F, -0.0625F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(0.0F, 0.0F, -0.0625F);
|
||||
|
||||
Rightlight.render(size);
|
||||
Leftlight.render(size);
|
||||
@@ -275,7 +276,7 @@ public class ModelArmoredJetpack extends ModelBase
|
||||
Rightguardbot.render(size);
|
||||
Leftguardbot.render(size);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
|
||||
@@ -3,6 +3,7 @@ package mekanism.client.model;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@@ -130,7 +131,7 @@ public class ModelAtomicDisassembler extends ModelBase
|
||||
|
||||
public void render(float size)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
MekanismRenderer.glowOn();
|
||||
|
||||
Shape3.render(size);
|
||||
@@ -140,7 +141,7 @@ public class ModelAtomicDisassembler extends ModelBase
|
||||
Shape14.render(size);
|
||||
|
||||
MekanismRenderer.glowOff();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
Shape1.render(size);
|
||||
Shape2.render(size);
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package mekanism.client.model;
|
||||
|
||||
import mekanism.api.EnumColor;
|
||||
import mekanism.client.render.MekanismRenderer;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelBalloon extends ModelBase
|
||||
{
|
||||
@@ -57,23 +58,23 @@ public class ModelBalloon extends ModelBase
|
||||
|
||||
public void render(float size, EnumColor color)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
GL11.glColor3f(color.getColor(0), color.getColor(1), color.getColor(2));
|
||||
GL11.glScalef(1.5F, 1.5F, 1.5F);
|
||||
GL11.glTranslatef(0, -0.07F, 0);
|
||||
GlStateManager.scale(1.5F, 1.5F, 1.5F);
|
||||
GlStateManager.translate(0, -0.07F, 0);
|
||||
|
||||
Balloon2.render(size);
|
||||
Balloon1.render(size);
|
||||
Balloon3.render(size);
|
||||
Balloonnub.render(size);
|
||||
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
GL11.glPopMatrix();
|
||||
MekanismRenderer.resetColor();
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.2F, 1, 0.2F);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(0.2F, 1, 0.2F);
|
||||
String.render(size);
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
|
||||
@@ -5,14 +5,14 @@ import mekanism.common.util.MekanismUtils;
|
||||
import mekanism.common.util.MekanismUtils.ResourceType;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelChargepad extends ModelBase
|
||||
{
|
||||
@@ -77,21 +77,21 @@ public class ModelChargepad extends ModelBase
|
||||
|
||||
public void render(float size, TextureManager manager)
|
||||
{
|
||||
GL11.glPushMatrix();
|
||||
GlStateManager.pushMatrix();
|
||||
MekanismRenderer.blendOn();
|
||||
|
||||
doRender(size);
|
||||
|
||||
manager.bindTexture(OVERLAY);
|
||||
GL11.glScalef(1.001F, 1.001F, 1.001F);
|
||||
GL11.glTranslatef(0, -0.0011F, 0);
|
||||
GlStateManager.scale(1.001F, 1.001F, 1.001F);
|
||||
GlStateManager.translate(0, -0.0011F, 0);
|
||||
MekanismRenderer.glowOn();
|
||||
|
||||
doRender(size);
|
||||
|
||||
MekanismRenderer.glowOff();
|
||||
MekanismRenderer.blendOff();
|
||||
GL11.glPopMatrix();
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
|
||||
private void doRender(float size)
|
||||
|
||||
@@ -1,268 +0,0 @@
|
||||
package mekanism.client.model;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class ModelChemicalInfuser extends ModelBase
|
||||
{
|
||||
ModelRenderer base;
|
||||
ModelRenderer tank2;
|
||||
ModelRenderer portRight;
|
||||
ModelRenderer portBack;
|
||||
ModelRenderer portLeft;
|
||||
ModelRenderer tank1;
|
||||
ModelRenderer portFront;
|
||||
ModelRenderer tank3;
|
||||
ModelRenderer pipeAngle2;
|
||||
ModelRenderer connectorAngle;
|
||||
ModelRenderer pipe2;
|
||||
ModelRenderer connector;
|
||||
ModelRenderer compressor;
|
||||
ModelRenderer tube10;
|
||||
ModelRenderer tube8;
|
||||
ModelRenderer tube9;
|
||||
ModelRenderer tube7;
|
||||
ModelRenderer tube6;
|
||||
ModelRenderer tube5;
|
||||
ModelRenderer tube4;
|
||||
ModelRenderer tube3;
|
||||
ModelRenderer tube2;
|
||||
ModelRenderer tube1;
|
||||
ModelRenderer pipe1;
|
||||
ModelRenderer pipeAngle1;
|
||||
ModelRenderer exhaust4;
|
||||
ModelRenderer exhaust3;
|
||||
ModelRenderer exhaust2;
|
||||
ModelRenderer exhaust1;
|
||||
|
||||
public ModelChemicalInfuser()
|
||||
{
|
||||
textureWidth = 128;
|
||||
textureHeight = 64;
|
||||
|
||||
base = new ModelRenderer(this, 0, 0);
|
||||
base.addBox(0F, 0F, 0F, 16, 5, 16);
|
||||
base.setRotationPoint(-8F, 19F, -8F);
|
||||
base.setTextureSize(128, 64);
|
||||
base.mirror = true;
|
||||
setRotation(base, 0F, 0F, 0F);
|
||||
tank2 = new ModelRenderer(this, 0, 21);
|
||||
tank2.mirror = true;
|
||||
tank2.addBox(0F, 0F, 0F, 6, 11, 6);
|
||||
tank2.setRotationPoint(1F, 8F, 1F);
|
||||
tank2.setTextureSize(128, 64);
|
||||
setRotation(tank2, 0F, 0F, 0F);
|
||||
portRight = new ModelRenderer(this, 0, 38);
|
||||
portRight.addBox(0F, 0F, 0F, 1, 8, 8);
|
||||
portRight.setRotationPoint(7.01F, 12F, -4F);
|
||||
portRight.setTextureSize(128, 64);
|
||||
portRight.mirror = true;
|
||||
setRotation(portRight, 0F, 0F, 0F);
|
||||
portBack = new ModelRenderer(this, 0, 54);
|
||||
portBack.addBox(0F, 0F, 0F, 8, 8, 1);
|
||||
portBack.setRotationPoint(-4F, 12F, 7.01F);
|
||||
portBack.setTextureSize(128, 64);
|
||||
portBack.mirror = true;
|
||||
setRotation(portBack, 0F, 0F, 0F);
|
||||
portLeft = new ModelRenderer(this, 0, 38);
|
||||
portLeft.addBox(0F, 0F, 0F, 1, 8, 8);
|
||||
portLeft.setRotationPoint(-8.01F, 12F, -4F);
|
||||
portLeft.setTextureSize(128, 64);
|
||||
portLeft.mirror = true;
|
||||
setRotation(portLeft, 0F, 0F, 0F);
|
||||
tank1 = new ModelRenderer(this, 0, 21);
|
||||
tank1.addBox(0F, 0F, 0F, 6, 11, 6);
|
||||
tank1.setRotationPoint(-7F, 8F, 1F);
|
||||
tank1.setTextureSize(128, 64);
|
||||
tank1.mirror = true;
|
||||
setRotation(tank1, 0F, 0F, 0F);
|
||||
portFront = new ModelRenderer(this, 18, 38);
|
||||
portFront.addBox(0F, 0F, 0F, 8, 8, 1);
|
||||
portFront.setRotationPoint(-4F, 12F, -8.01F);
|
||||
portFront.setTextureSize(128, 64);
|
||||
portFront.mirror = true;
|
||||
setRotation(portFront, 0F, 0F, 0F);
|
||||
tank3 = new ModelRenderer(this, 24, 21);
|
||||
tank3.addBox(0F, 0F, 0F, 12, 7, 7);
|
||||
tank3.setRotationPoint(-6F, 12F, -7F);
|
||||
tank3.setTextureSize(128, 64);
|
||||
tank3.mirror = true;
|
||||
setRotation(tank3, 0F, 0F, 0F);
|
||||
pipeAngle2 = new ModelRenderer(this, 18, 55);
|
||||
pipeAngle2.addBox(-5F, 0F, 0F, 5, 6, 3);
|
||||
pipeAngle2.setRotationPoint(5F, 13.01F, -2F);
|
||||
pipeAngle2.setTextureSize(128, 64);
|
||||
pipeAngle2.mirror = true;
|
||||
//TODO
|
||||
setRotation(pipeAngle2, 0F, 0.7853982F, 0F);
|
||||
connectorAngle = new ModelRenderer(this, 40, 45);
|
||||
connectorAngle.addBox(0F, 0F, 0F, 2, 8, 2);
|
||||
connectorAngle.setRotationPoint(-1F, 13F, 5F);
|
||||
connectorAngle.setTextureSize(128, 64);
|
||||
connectorAngle.mirror = true;
|
||||
//TODO
|
||||
setRotation(connectorAngle, -0.4886922F, 0F, 0F);
|
||||
pipe2 = new ModelRenderer(this, 40, 35);
|
||||
pipe2.addBox(0F, 0F, 0F, 1, 6, 4);
|
||||
pipe2.setRotationPoint(6F, 13F, -3F);
|
||||
pipe2.setTextureSize(128, 64);
|
||||
pipe2.mirror = true;
|
||||
setRotation(pipe2, 0F, 0F, 0F);
|
||||
connector = new ModelRenderer(this, 50, 35);
|
||||
connector.addBox(0F, 0F, 0F, 2, 6, 2);
|
||||
connector.setRotationPoint(-1F, 13F, 5F);
|
||||
connector.setTextureSize(128, 64);
|
||||
connector.mirror = true;
|
||||
setRotation(connector, 0F, 0F, 0F);
|
||||
compressor = new ModelRenderer(this, 18, 49);
|
||||
compressor.addBox(0F, 0F, 0F, 6, 3, 3);
|
||||
compressor.setRotationPoint(-3F, 8.5F, -2.5F);
|
||||
compressor.setTextureSize(128, 64);
|
||||
compressor.mirror = true;
|
||||
setRotation(compressor, 0F, 0F, 0F);
|
||||
tube10 = new ModelRenderer(this, 0, 14);
|
||||
tube10.addBox(0F, 0F, 0F, 2, 1, 1);
|
||||
tube10.setRotationPoint(-1F, 9F, 5F);
|
||||
tube10.setTextureSize(128, 64);
|
||||
tube10.mirror = true;
|
||||
setRotation(tube10, 0F, 0F, 0F);
|
||||
tube8 = new ModelRenderer(this, 0, 2);
|
||||
tube8.addBox(0F, 0F, 0F, 1, 1, 2);
|
||||
tube8.setRotationPoint(4F, 9.5F, -0.5F);
|
||||
tube8.setTextureSize(128, 64);
|
||||
tube8.mirror = true;
|
||||
setRotation(tube8, 0F, 0F, 0F);
|
||||
tube9 = new ModelRenderer(this, 0, 14);
|
||||
tube9.addBox(0F, 0F, 0F, 2, 1, 1);
|
||||
tube9.setRotationPoint(-1F, 9F, 2F);
|
||||
tube9.setTextureSize(128, 64);
|
||||
tube9.mirror = true;
|
||||
setRotation(tube9, 0F, 0F, 0F);
|
||||
tube7 = new ModelRenderer(this, 0, 0);
|
||||
tube7.addBox(0F, 0F, 0F, 2, 1, 1);
|
||||
tube7.setRotationPoint(3F, 9.5F, -1.5F);
|
||||
tube7.setTextureSize(128, 64);
|
||||
tube7.mirror = true;
|
||||
setRotation(tube7, 0F, 0F, 0F);
|
||||
tube6 = new ModelRenderer(this, 12, 13);
|
||||
tube6.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
tube6.setRotationPoint(1F, 10.5F, -4F);
|
||||
tube6.setTextureSize(128, 64);
|
||||
tube6.mirror = true;
|
||||
setRotation(tube6, 0F, 0F, 0F);
|
||||
tube5 = new ModelRenderer(this, 0, 2);
|
||||
tube5.addBox(0F, 0F, 0F, 1, 1, 2);
|
||||
tube5.setRotationPoint(1F, 9.5F, -4F);
|
||||
tube5.setTextureSize(128, 64);
|
||||
tube5.mirror = true;
|
||||
setRotation(tube5, 0F, 0F, 0F);
|
||||
tube4 = new ModelRenderer(this, 0, 2);
|
||||
tube4.addBox(0F, 0F, 0F, 1, 1, 2);
|
||||
tube4.setRotationPoint(-2F, 9.5F, -4F);
|
||||
tube4.setTextureSize(128, 64);
|
||||
tube4.mirror = true;
|
||||
setRotation(tube4, 0F, 0F, 0F);
|
||||
tube3 = new ModelRenderer(this, 12, 13);
|
||||
tube3.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
tube3.setRotationPoint(-2F, 10.5F, -4F);
|
||||
tube3.setTextureSize(128, 64);
|
||||
tube3.mirror = true;
|
||||
setRotation(tube3, 0F, 0F, 0F);
|
||||
tube2 = new ModelRenderer(this, 0, 0);
|
||||
tube2.addBox(0F, 0F, 0F, 2, 1, 1);
|
||||
tube2.setRotationPoint(-5F, 9.5F, -1.5F);
|
||||
tube2.setTextureSize(128, 64);
|
||||
tube2.mirror = true;
|
||||
setRotation(tube2, 0F, 0F, 0F);
|
||||
tube1 = new ModelRenderer(this, 0, 2);
|
||||
tube1.addBox(0F, 0F, 0F, 1, 1, 2);
|
||||
tube1.setRotationPoint(-5F, 9.5F, -0.5F);
|
||||
tube1.setTextureSize(128, 64);
|
||||
tube1.mirror = true;
|
||||
setRotation(tube1, 0F, 0F, 0F);
|
||||
pipe1 = new ModelRenderer(this, 40, 35);
|
||||
pipe1.addBox(0F, 0F, 0F, 1, 6, 4);
|
||||
pipe1.setRotationPoint(-7F, 13F, -3F);
|
||||
pipe1.setTextureSize(128, 64);
|
||||
pipe1.mirror = true;
|
||||
setRotation(pipe1, 0F, 0F, 0F);
|
||||
pipeAngle1 = new ModelRenderer(this, 18, 55);
|
||||
pipeAngle1.addBox(0F, 0F, 0F, 5, 6, 3);
|
||||
pipeAngle1.setRotationPoint(-5F, 13.01F, -2F);
|
||||
pipeAngle1.setTextureSize(128, 64);
|
||||
pipeAngle1.mirror = true;
|
||||
//TODO
|
||||
setRotation(pipeAngle1, 0F, -0.7853982F, 0F);
|
||||
exhaust4 = new ModelRenderer(this, 0, 9);
|
||||
exhaust4.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
exhaust4.setRotationPoint(-1.33F, 11.5F, -6.2F);
|
||||
exhaust4.setTextureSize(128, 64);
|
||||
exhaust4.mirror = true;
|
||||
//TODO
|
||||
setRotation(exhaust4, 0.3490659F, 0F, 0F);
|
||||
exhaust3 = new ModelRenderer(this, 0, 9);
|
||||
exhaust3.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
exhaust3.setRotationPoint(-3F, 11.5F, -6.2F);
|
||||
exhaust3.setTextureSize(128, 64);
|
||||
exhaust3.mirror = true;
|
||||
//TODO
|
||||
setRotation(exhaust3, 0.3490659F, 0F, 0F);
|
||||
exhaust2 = new ModelRenderer(this, 0, 9);
|
||||
exhaust2.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
exhaust2.setRotationPoint(2F, 11.5F, -6.2F);
|
||||
exhaust2.setTextureSize(128, 64);
|
||||
exhaust2.mirror = true;
|
||||
//TODO
|
||||
setRotation(exhaust2, 0.3490659F, 0F, 0F);
|
||||
exhaust1 = new ModelRenderer(this, 0, 9);
|
||||
exhaust1.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
exhaust1.setRotationPoint(0.33F, 11.5F, -6.2F);
|
||||
exhaust1.setTextureSize(128, 64);
|
||||
exhaust1.mirror = true;
|
||||
//TODO
|
||||
setRotation(exhaust1, 0.3490659F, 0F, 0F);
|
||||
}
|
||||
|
||||
public void render(float size)
|
||||
{
|
||||
base.render(size);
|
||||
tank2.render(size);
|
||||
portRight.render(size);
|
||||
portBack.render(size);
|
||||
portLeft.render(size);
|
||||
tank1.render(size);
|
||||
portFront.render(size);
|
||||
tank3.render(size);
|
||||
pipeAngle2.render(size);
|
||||
connectorAngle.render(size);
|
||||
pipe2.render(size);
|
||||
connector.render(size);
|
||||
compressor.render(size);
|
||||
tube10.render(size);
|
||||
tube8.render(size);
|
||||
tube9.render(size);
|
||||
tube7.render(size);
|
||||
tube6.render(size);
|
||||
tube5.render(size);
|
||||
tube4.render(size);
|
||||
tube3.render(size);
|
||||
tube2.render(size);
|
||||
tube1.render(size);
|
||||
pipe1.render(size);
|
||||
pipeAngle1.render(size);
|
||||
exhaust4.render(size);
|
||||
exhaust3.render(size);
|
||||
exhaust2.render(size);
|
||||
exhaust1.render(size);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
Loaded 100 of 759 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user