Dear lord its been awhile since I've done rendering
7
src/main/java/com/pahimar/ee3/alchemy/Symbols.java
Normal file
|
@ -0,0 +1,7 @@
|
|||
package com.pahimar.ee3.alchemy;
|
||||
|
||||
public class Symbols
|
||||
{
|
||||
private static final String SYMBOL_TEXTURE_LOCATION = "textures/array/";
|
||||
public static final Symbol CIRCLE = new Symbol(SYMBOL_TEXTURE_LOCATION + "transBaseCircle.png", 1f);
|
||||
}
|
|
@ -1,9 +1,14 @@
|
|||
package com.pahimar.ee3.client.renderer.tileentity;
|
||||
|
||||
import com.pahimar.ee3.alchemy.Symbol;
|
||||
import com.pahimar.ee3.tileentity.TileEntityAlchemyArray;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TileEntityRendererAlchemyArray extends TileEntitySpecialRenderer
|
||||
|
@ -11,6 +16,55 @@ public class TileEntityRendererAlchemyArray extends TileEntitySpecialRenderer
|
|||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float tick)
|
||||
{
|
||||
if (tileEntity instanceof TileEntityAlchemyArray)
|
||||
{
|
||||
TileEntityAlchemyArray tileEntityAlchemyArray = (TileEntityAlchemyArray) tileEntity;
|
||||
ForgeDirection direction = null;
|
||||
|
||||
if (tileEntityAlchemyArray.getWorldObj() != null)
|
||||
{
|
||||
direction = tileEntityAlchemyArray.getOrientation();
|
||||
}
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
GL11.glTranslatef((float) x, (float) y + 1.0F, (float) z + 1.0F);
|
||||
GL11.glScalef(1.0F, -1.0F, -1.0F);
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
short angle = 0;
|
||||
|
||||
if (direction != null)
|
||||
{
|
||||
if (direction == ForgeDirection.NORTH)
|
||||
{
|
||||
angle = 180;
|
||||
}
|
||||
else if (direction == ForgeDirection.SOUTH)
|
||||
{
|
||||
angle = 0;
|
||||
}
|
||||
else if (direction == ForgeDirection.WEST)
|
||||
{
|
||||
angle = 90;
|
||||
}
|
||||
else if (direction == ForgeDirection.EAST)
|
||||
{
|
||||
angle = -90;
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glRotatef(angle, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
|
||||
for (Symbol symbol : tileEntityAlchemyArray.getAlchemySymbols())
|
||||
{
|
||||
this.bindTexture(symbol.getTexture());
|
||||
}
|
||||
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,24 @@
|
|||
package com.pahimar.ee3.tileentity;
|
||||
|
||||
import com.pahimar.ee3.alchemy.Symbol;
|
||||
import com.pahimar.ee3.alchemy.Symbols;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class TileEntityAlchemyArray extends TileEntityEE
|
||||
{
|
||||
private List<Symbol> alchemySymbols;
|
||||
|
||||
public TileEntityAlchemyArray()
|
||||
{
|
||||
super();
|
||||
alchemySymbols = new ArrayList<Symbol>(Arrays.asList(Symbols.CIRCLE));
|
||||
}
|
||||
|
||||
public List<Symbol> getAlchemySymbols()
|
||||
{
|
||||
return alchemySymbols;
|
||||
}
|
||||
}
|
||||
|
|
BIN
src/main/resources/assets/ee3/textures/array/transBaseCircle.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
src/main/resources/assets/ee3/textures/array/transCircle.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
src/main/resources/assets/ee3/textures/array/transDot.png
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
src/main/resources/assets/ee3/textures/array/transHeptagon.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
src/main/resources/assets/ee3/textures/array/transHexagon.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
src/main/resources/assets/ee3/textures/array/transLine.png
Normal file
After Width: | Height: | Size: 3 KiB |
BIN
src/main/resources/assets/ee3/textures/array/transOctagon.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
src/main/resources/assets/ee3/textures/array/transPentagon.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
src/main/resources/assets/ee3/textures/array/transSquare.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
src/main/resources/assets/ee3/textures/array/transTriangle.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
src/main/resources/assets/ee3/textures/gui/alchemicalBook.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
src/main/resources/assets/ee3/textures/gui/starterBook.png
Normal file
After Width: | Height: | Size: 60 KiB |
After Width: | Height: | Size: 4.5 KiB |
After Width: | Height: | Size: 5 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 4.4 KiB |
After Width: | Height: | Size: 4.7 KiB |