diff --git a/src/main/java/com/pahimar/ee3/alchemy/Symbols.java b/src/main/java/com/pahimar/ee3/alchemy/Symbols.java new file mode 100644 index 00000000..4accc5a3 --- /dev/null +++ b/src/main/java/com/pahimar/ee3/alchemy/Symbols.java @@ -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); +} diff --git a/src/main/java/com/pahimar/ee3/client/renderer/tileentity/TileEntityRendererAlchemyArray.java b/src/main/java/com/pahimar/ee3/client/renderer/tileentity/TileEntityRendererAlchemyArray.java index c9a2bc41..14834e9a 100644 --- a/src/main/java/com/pahimar/ee3/client/renderer/tileentity/TileEntityRendererAlchemyArray.java +++ b/src/main/java/com/pahimar/ee3/client/renderer/tileentity/TileEntityRendererAlchemyArray.java @@ -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); + } } } diff --git a/src/main/java/com/pahimar/ee3/tileentity/TileEntityAlchemyArray.java b/src/main/java/com/pahimar/ee3/tileentity/TileEntityAlchemyArray.java index b1ce8ab5..0960766a 100644 --- a/src/main/java/com/pahimar/ee3/tileentity/TileEntityAlchemyArray.java +++ b/src/main/java/com/pahimar/ee3/tileentity/TileEntityAlchemyArray.java @@ -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 alchemySymbols; + + public TileEntityAlchemyArray() + { + super(); + alchemySymbols = new ArrayList(Arrays.asList(Symbols.CIRCLE)); + } + + public List getAlchemySymbols() + { + return alchemySymbols; + } } diff --git a/src/main/resources/assets/ee3/textures/array/transBaseCircle.png b/src/main/resources/assets/ee3/textures/array/transBaseCircle.png new file mode 100644 index 00000000..84cf1687 Binary files /dev/null and b/src/main/resources/assets/ee3/textures/array/transBaseCircle.png differ diff --git a/src/main/resources/assets/ee3/textures/array/transCircle.png b/src/main/resources/assets/ee3/textures/array/transCircle.png new file mode 100644 index 00000000..7d247aa0 Binary files /dev/null and b/src/main/resources/assets/ee3/textures/array/transCircle.png differ diff --git a/src/main/resources/assets/ee3/textures/array/transDot.png b/src/main/resources/assets/ee3/textures/array/transDot.png new file mode 100644 index 00000000..f5c5bb48 Binary files /dev/null and b/src/main/resources/assets/ee3/textures/array/transDot.png differ diff --git a/src/main/resources/assets/ee3/textures/array/transHeptagon.png b/src/main/resources/assets/ee3/textures/array/transHeptagon.png new file mode 100644 index 00000000..d6b4afb8 Binary files /dev/null and b/src/main/resources/assets/ee3/textures/array/transHeptagon.png differ diff --git a/src/main/resources/assets/ee3/textures/array/transHexagon.png b/src/main/resources/assets/ee3/textures/array/transHexagon.png new file mode 100644 index 00000000..a1cfb0a4 Binary files /dev/null and b/src/main/resources/assets/ee3/textures/array/transHexagon.png differ diff --git a/src/main/resources/assets/ee3/textures/array/transLine.png b/src/main/resources/assets/ee3/textures/array/transLine.png new file mode 100644 index 00000000..582c2830 Binary files /dev/null and b/src/main/resources/assets/ee3/textures/array/transLine.png differ diff --git a/src/main/resources/assets/ee3/textures/array/transOctagon.png b/src/main/resources/assets/ee3/textures/array/transOctagon.png new file mode 100644 index 00000000..2d96c61c Binary files /dev/null and b/src/main/resources/assets/ee3/textures/array/transOctagon.png differ diff --git a/src/main/resources/assets/ee3/textures/array/transPentagon.png b/src/main/resources/assets/ee3/textures/array/transPentagon.png new file mode 100644 index 00000000..3837492e Binary files /dev/null and b/src/main/resources/assets/ee3/textures/array/transPentagon.png differ diff --git a/src/main/resources/assets/ee3/textures/array/transSquare.png b/src/main/resources/assets/ee3/textures/array/transSquare.png new file mode 100644 index 00000000..8382ced6 Binary files /dev/null and b/src/main/resources/assets/ee3/textures/array/transSquare.png differ diff --git a/src/main/resources/assets/ee3/textures/array/transTriangle.png b/src/main/resources/assets/ee3/textures/array/transTriangle.png new file mode 100644 index 00000000..2dee8d99 Binary files /dev/null and b/src/main/resources/assets/ee3/textures/array/transTriangle.png differ diff --git a/src/main/resources/assets/ee3/textures/gui/alchemicalBook.png b/src/main/resources/assets/ee3/textures/gui/alchemicalBook.png new file mode 100644 index 00000000..78c589ca Binary files /dev/null and b/src/main/resources/assets/ee3/textures/gui/alchemicalBook.png differ diff --git a/src/main/resources/assets/ee3/textures/gui/starterBook.png b/src/main/resources/assets/ee3/textures/gui/starterBook.png new file mode 100644 index 00000000..932a2274 Binary files /dev/null and b/src/main/resources/assets/ee3/textures/gui/starterBook.png differ diff --git a/src/main/resources/assets/ee3/textures/items/itemArmorAmorphousBoots.png b/src/main/resources/assets/ee3/textures/items/itemArmorAmorphousBoots.png new file mode 100644 index 00000000..fde11bb4 Binary files /dev/null and b/src/main/resources/assets/ee3/textures/items/itemArmorAmorphousBoots.png differ diff --git a/src/main/resources/assets/ee3/textures/items/itemArmorAmorphousChest.png b/src/main/resources/assets/ee3/textures/items/itemArmorAmorphousChest.png new file mode 100644 index 00000000..5d77bb08 Binary files /dev/null and b/src/main/resources/assets/ee3/textures/items/itemArmorAmorphousChest.png differ diff --git a/src/main/resources/assets/ee3/textures/items/itemArmorAmorphousLegs.png b/src/main/resources/assets/ee3/textures/items/itemArmorAmorphousLegs.png new file mode 100644 index 00000000..017bd637 Binary files /dev/null and b/src/main/resources/assets/ee3/textures/items/itemArmorAmorphousLegs.png differ diff --git a/src/main/resources/assets/ee3/textures/items/itemArmorTemporalLegs.png b/src/main/resources/assets/ee3/textures/items/itemArmorTemporalLegs.png new file mode 100644 index 00000000..78a504ab Binary files /dev/null and b/src/main/resources/assets/ee3/textures/items/itemArmorTemporalLegs.png differ diff --git a/src/main/resources/assets/ee3/textures/items/itemTemporalHelm.png b/src/main/resources/assets/ee3/textures/items/itemTemporalHelm.png new file mode 100644 index 00000000..6505a00b Binary files /dev/null and b/src/main/resources/assets/ee3/textures/items/itemTemporalHelm.png differ