Terrasteel revamp.

This commit is contained in:
Lizbeth Rika committed 2014-11-08 20:40:43 +00:00
1 parent a0e3114874
commit 64b1e725d4
20 files changed
+434 -40

No files matched your search

@@ -40,6 +40,7 @@ public final class ShaderHelper {
public static int doppleganger = 0;
public static int halo = 0;
public static int dopplegangerBar = 0;
public static int terraPlateRune = 0;
public static void initShaders() {
if(!useShaders())
@@ -51,6 +52,7 @@ public final class ShaderHelper {
doppleganger = createProgram(LibResources.SHADER_DOPLLEGANGER_VERT, LibResources.SHADER_DOPLLEGANGER_FRAG);
halo = createProgram(null, LibResources.SHADER_HALO_FRAG);
dopplegangerBar = createProgram(null, LibResources.SHADER_DOPLLEGANGER_BAR_FRAG);
terraPlateRune = createProgram(null, LibResources.SHADER_TERRA_PLATE_RUNE_FRAG);
}
public static void useShader(int shader, ShaderCallback callback) {
@@ -23,8 +23,6 @@ import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntitySkull;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.util.StatCollector;
import net.minecraft.util.StringTranslate;
import net.minecraft.world.World;
import net.minecraft.world.WorldSettings.GameType;
import net.minecraftforge.client.MinecraftForgeClient;
@@ -75,6 +73,7 @@ import vazkii.botania.client.render.tile.RenderTileSkullOverride;
import vazkii.botania.client.render.tile.RenderTileSpawnerClaw;
import vazkii.botania.client.render.tile.RenderTileSpreader;
import vazkii.botania.client.render.tile.RenderTileStarfield;
import vazkii.botania.client.render.tile.RenderTileTerraPlate;
import vazkii.botania.client.render.tile.RenderTileTinyPotato;
import vazkii.botania.common.block.tile.TileAlfPortal;
import vazkii.botania.common.block.tile.TileAltar;
@@ -85,6 +84,7 @@ import vazkii.botania.common.block.tile.TilePylon;
import vazkii.botania.common.block.tile.TileRuneAltar;
import vazkii.botania.common.block.tile.TileSpawnerClaw;
import vazkii.botania.common.block.tile.TileStarfield;
import vazkii.botania.common.block.tile.TileTerraPlate;
import vazkii.botania.common.block.tile.TileTinyPotato;
import vazkii.botania.common.block.tile.mana.TilePool;
import vazkii.botania.common.block.tile.mana.TileSpreader;
@@ -103,9 +103,6 @@ import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.ReflectionHelper;
public class ClientProxy extends CommonProxy {
@@ -168,6 +165,7 @@ public class ClientProxy extends CommonProxy {
ClientRegistry.bindTileEntitySpecialRenderer(TileSpawnerClaw.class, new RenderTileSpawnerClaw());
ClientRegistry.bindTileEntitySpecialRenderer(TileStarfield.class, new RenderTileStarfield());
ClientRegistry.bindTileEntitySpecialRenderer(TileBrewery.class, new RenderTileBrewery());
ClientRegistry.bindTileEntitySpecialRenderer(TileTerraPlate.class, new RenderTileTerraPlate());
if(Loader.instance().getMCVersionString().equals("Minecraft 1.7.10"))
ClientRegistry.bindTileEntitySpecialRenderer(TileEntitySkull.class, new RenderTileSkullOverride());
@@ -114,5 +114,6 @@ public final class LibResources {
public static final String SHADER_DOPLLEGANGER_FRAG = PREFIX_SHADER + "doppleganger.frag";
public static final String SHADER_HALO_FRAG = PREFIX_SHADER + "halo.frag";
public static final String SHADER_DOPLLEGANGER_BAR_FRAG = PREFIX_SHADER + "doppleganger_bar.frag";
public static final String SHADER_TERRA_PLATE_RUNE_FRAG = PREFIX_SHADER + "terra_plate_rune.frag";
}
@@ -0,0 +1,85 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* File Created @ [Nov 8, 2014, 7:20:26 PM (GMT)]
*/
package vazkii.botania.client.render.tile;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import org.lwjgl.opengl.GL11;
import vazkii.botania.client.core.handler.ClientTickHandler;
import vazkii.botania.client.core.helper.ShaderHelper;
import vazkii.botania.common.block.BlockEnchanter;
import vazkii.botania.common.block.BlockTerraPlate;
import vazkii.botania.common.block.tile.TileTerraPlate;
public class RenderTileTerraPlate extends TileEntitySpecialRenderer {
@Override
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float f) {
TileTerraPlate plate = (TileTerraPlate) tileentity;
float max = (float) TileTerraPlate.MAX_MANA / 10F;
float alphaMod = (float) Math.min(max, plate.getCurrentMana()) / max;
GL11.glPushMatrix();
GL11.glTranslated(d0, d1, d2);
GL11.glRotated(90F, 1F, 0F, 0F);
GL11.glTranslatef(0F, 0F, -3F / 16F - 0.001F);
GL11.glEnable(GL11.GL_BLEND);
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
GL11.glColor4f(1F, 1F, 1F, 1F);
GL11.glDisable(GL11.GL_ALPHA_TEST);
float alpha = (float) ((Math.sin((ClientTickHandler.ticksInGame + f) / 8D) + 1D) / 5D + 0.6D) * alphaMod;
if(ShaderHelper.useShaders())
GL11.glColor4f(1F, 1F, 1F, alpha);
else {
int light = 15728880;
int lightmapX = light % 65536;
int lightmapY = light / 65536;
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, lightmapX, lightmapY);
GL11.glColor4f(0.6F + (float) ((Math.cos((ClientTickHandler.ticksInGame + f) / 6D) + 1D) / 5D), 0.1F, 0.9F, alpha);
}
Minecraft.getMinecraft().renderEngine.bindTexture(TextureMap.locationBlocksTexture);
ShaderHelper.useShader(ShaderHelper.terraPlateRune);
renderIcon(0, 0, BlockTerraPlate.overlay, 1, 1, 240);
ShaderHelper.releaseShader();
GL11.glEnable(GL11.GL_ALPHA_TEST);
GL11.glDisable(GL11.GL_BLEND);
GL11.glColor4f(1F, 1F, 1F, 1F);
GL11.glPopMatrix();
}
public void renderIcon(int par1, int par2, IIcon par3Icon, int par4, int par5, int brightness) {
Tessellator tessellator = Tessellator.instance;
tessellator.startDrawingQuads();
tessellator.setBrightness(brightness);
tessellator.addVertexWithUV(par1 + 0, par2 + par5, 0, par3Icon.getMinU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + par5, 0, par3Icon.getMaxU(), par3Icon.getMaxV());
tessellator.addVertexWithUV(par1 + par4, par2 + 0, 0, par3Icon.getMaxU(), par3Icon.getMinV());
tessellator.addVertexWithUV(par1 + 0, par2 + 0, 0, par3Icon.getMinU(), par3Icon.getMinV());
tessellator.draw();
}
}
@@ -0,0 +1,65 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* File Created @ [Nov 8, 2014, 5:25:12 PM (GMT)]
*/
package vazkii.botania.common.block;
import vazkii.botania.client.core.helper.IconHelper;
import vazkii.botania.common.block.tile.TileTerraPlate;
import vazkii.botania.common.lib.LibBlockNames;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;
public class BlockTerraPlate extends BlockModContainer {
public static IIcon overlay;
IIcon[] icons;
protected BlockTerraPlate() {
super(Material.iron);
setBlockBounds(0F, 0F, 0F, 1F, 3F / 16F, 1F);
setHardness(3F);
setResistance(10F);
setStepSound(soundTypeMetal);
setBlockName(LibBlockNames.TERRA_PLATE);
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public boolean isOpaqueCube() {
return false;
}
@Override
public void registerBlockIcons(IIconRegister par1IconRegister) {
icons = new IIcon[4];
for(int i = 0; i < icons.length; i++)
icons[i] = IconHelper.forBlock(par1IconRegister, this, i);
overlay = IconHelper.forBlock(par1IconRegister, this, "Overlay");
}
@Override
public IIcon getIcon(int par1, int par2) {
return icons[Math.min(2, par1)];
}
@Override
public TileEntity createNewTileEntity(World world, int meta) {
return new TileTerraPlate();
}
}
@@ -118,6 +118,7 @@ import vazkii.botania.common.block.tile.TileRuneAltar;
import vazkii.botania.common.block.tile.TileSpawnerClaw;
import vazkii.botania.common.block.tile.TileSpecialFlower;
import vazkii.botania.common.block.tile.TileStarfield;
import vazkii.botania.common.block.tile.TileTerraPlate;
import vazkii.botania.common.block.tile.TileTinyPlanet;
import vazkii.botania.common.block.tile.TileTinyPotato;
import vazkii.botania.common.block.tile.mana.TileDistributor;
@@ -180,6 +181,7 @@ public final class ModBlocks {
public static Block elfGlass;
public static Block brewery;
public static Block manaGlass;
public static Block terraPlate;
public static Block livingwoodStairs;
public static Block livingwoodSlab;
@@ -301,6 +303,7 @@ public final class ModBlocks {
elfGlass = new BlockElfGlass();
brewery = new BlockBrewery();
manaGlass = new BlockManaGlass();
terraPlate = new BlockTerraPlate();
livingwoodStairs = new BlockLivingwoodStairs();
livingwoodSlab = new BlockLivingwoodSlab(false);
@@ -480,6 +483,7 @@ public final class ModBlocks {
registerTile(TileStarfield.class, LibBlockNames.STARFIELD);
registerTile(TileRFGenerator.class, LibBlockNames.RF_GENERATOR);
registerTile(TileBrewery.class, LibBlockNames.BREWERY);
registerTile(TileTerraPlate.class, LibBlockNames.TERRA_PLATE);
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_PUREDAISY, SubTilePureDaisy.class);
BotaniaAPI.registerSubTile(LibBlockNames.SUBTILE_MANASTAR, SubTileManastar.class);
@@ -0,0 +1,221 @@
/**
* This class was created by <Vazkii>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under a
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
*
* File Created @ [Nov 8, 2014, 5:25:32 PM (GMT)]
*/
package vazkii.botania.common.block.tile;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.AxisAlignedBB;
import vazkii.botania.api.mana.IManaPool;
import vazkii.botania.api.mana.spark.ISparkAttachable;
import vazkii.botania.api.mana.spark.ISparkEntity;
import vazkii.botania.api.mana.spark.SparkHelper;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.block.tile.mana.TilePool;
import vazkii.botania.common.item.ModItems;
public class TileTerraPlate extends TileMod implements ISparkAttachable {
public static final int MAX_MANA = TilePool.MAX_MANA / 2;
private static final int[][] LAPIS_BLOCKS = {
{ 1, 0, }, { -1, 0 }, { 0, 1 }, { 0, -1 }
};
private static final int[][] LIVINGROCK_BLOCKS = {
{ 0, 0 }, { 1, 1 }, { 1, -1 }, { -1, 1 }, { -1, -1 }
};
private static final String TAG_MANA = "mana";
int mana;
@Override
public void updateEntity() {
boolean removeMana = true;
if(hasValidPlatform()) {
List<EntityItem> items = getItems();
if(areItemsValid(items)) {
removeMana = false;
ISparkEntity spark = getAttachedSpark();
if(spark != null) {
List<ISparkEntity> sparkEntities = SparkHelper.getSparksAround(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5);
for(ISparkEntity otherSpark : sparkEntities) {
if(spark == otherSpark)
continue;
if(otherSpark.getAttachedTile() != null && otherSpark.getAttachedTile() instanceof IManaPool)
otherSpark.registerTransfer(spark);
}
}
if(mana > 0)
doParticles();
if(mana >= MAX_MANA) {
EntityItem item = items.get(0);
for(EntityItem otherItem : items)
if(otherItem != item)
otherItem.setDead();
else item.setEntityItemStack(new ItemStack(ModItems.manaResource, 1, 4));
item.worldObj.playSoundAtEntity(item, "botania:terrasteelCraft", 1F, 1F);
mana = 0;
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
}
}
}
if(removeMana)
recieveMana(-1000);
}
void doParticles() {
if(worldObj.isRemote) {
int ticks = (int) (100.0 * ((double) getCurrentMana() / (double) MAX_MANA));
int totalSpiritCount = 3;
double tickIncrement = 360D / totalSpiritCount;
int speed = 5;
double wticks = ticks * speed - tickIncrement;
double r = Math.sin((ticks - 100) / 10D) * 2;
double g = Math.sin(wticks * Math.PI / 180 * 0.55);
for(int i = 0; i < totalSpiritCount; i++) {
double x = (int) xCoord + Math.sin(wticks * Math.PI / 180) * r + 0.5;
double y = (int) yCoord + 0.25 + Math.abs(r) * 0.7;
double z = (int) zCoord + Math.cos(wticks * Math.PI / 180) * r + 0.5;
wticks += tickIncrement;
float[] colorsfx = new float[] {
0F, (float) ticks / (float) 100, 1F - (float) ticks / (float) 100
};
Botania.proxy.wispFX(worldObj, x, y, z, colorsfx[0], colorsfx[1], colorsfx[2], 0.85F, (float)g * 0.05F, 0.25F);
Botania.proxy.wispFX(worldObj, x, y, z, colorsfx[0], colorsfx[1], colorsfx[2], (float) Math.random() * 0.1F + 0.1F, (float) (Math.random() - 0.5) * 0.05F, (float) (Math.random() - 0.5) * 0.05F, (float) (Math.random() - 0.5) * 0.05F, 0.9F);
if(ticks == 100)
for(int j = 0; j < 15; j++)
Botania.proxy.wispFX(worldObj, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, colorsfx[0], colorsfx[1], colorsfx[2], (float) Math.random() * 0.15F + 0.15F, (float) (Math.random() - 0.5F) * 0.125F, (float) (Math.random() - 0.5F) * 0.125F, (float) (Math.random() - 0.5F) * 0.125F);
}
}
}
List<EntityItem> getItems() {
return worldObj.getEntitiesWithinAABB(EntityItem.class, AxisAlignedBB.getBoundingBox(xCoord, yCoord, zCoord, xCoord + 1, yCoord + 1, zCoord + 1));
}
boolean areItemsValid(List<EntityItem> items) {
if(items.size() != 3)
return false;
ItemStack ingot = null;
ItemStack pearl = null;
ItemStack diamond = null;
for(EntityItem item : items) {
ItemStack stack = item.getEntityItem();
if(stack.getItem() != ModItems.manaResource || stack.stackSize != 1)
return false;
int meta = stack.getItemDamage();
if(meta == 0)
ingot = stack;
else if(meta == 1)
pearl = stack;
else if(meta == 2)
diamond = stack;
else return false;
}
return ingot != null && pearl != null && diamond != null;
}
boolean hasValidPlatform() {
return checkAll(LAPIS_BLOCKS, Blocks.lapis_block) && checkAll(LIVINGROCK_BLOCKS, ModBlocks.livingrock);
}
boolean checkAll(int[][] positions, Block block) {
for(int i = 0; i < positions.length; i++) {
int[] positions_ = positions[i];
if(!checkPlatform(positions_[0], positions_[1], block))
return false;
}
return true;
}
boolean checkPlatform(int xOff, int zOff, Block block) {
return worldObj.getBlock(xCoord + xOff, yCoord - 1, zOff + zCoord) == block;
}
@Override
public void writeCustomNBT(NBTTagCompound cmp) {
cmp.setInteger(TAG_MANA, mana);
}
@Override
public void readCustomNBT(NBTTagCompound cmp) {
mana = cmp.getInteger(TAG_MANA);
}
@Override
public int getCurrentMana() {
return mana;
}
@Override
public boolean isFull() {
return mana >= MAX_MANA;
}
@Override
public void recieveMana(int mana) {
this.mana = Math.max(0, Math.min(MAX_MANA, this.mana + mana));
}
@Override
public boolean canRecieveManaFromBursts() {
return true;
}
@Override
public boolean canAttachSpark(ItemStack stack) {
return true;
}
@Override
public void attachSpark(ISparkEntity entity) {
// NO-OP
}
@Override
public ISparkEntity getAttachedSpark() {
List<ISparkEntity> sparks = worldObj.getEntitiesWithinAABB(ISparkEntity.class, AxisAlignedBB.getBoundingBox(xCoord, yCoord + 1, zCoord, xCoord + 1, yCoord + 2, zCoord + 1));
if(sparks.size() == 1) {
Entity e = (Entity) sparks.get(0);
return (ISparkEntity) e;
}
return null;
}
@Override
public boolean areIncomingTranfersDone() {
return !areItemsValid(getItems());
}
}
@@ -25,6 +25,8 @@ import cpw.mods.fml.common.gameevent.TickEvent.WorldTickEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
// This is legacy code, it used to be used for the old terrasteel crafting
// mechanic. For the new one check TileTerraPlate
public final class CommonTickHandler {
@SubscribeEvent
@@ -26,6 +26,7 @@ import vazkii.botania.common.block.tile.mana.TilePool;
import vazkii.botania.common.core.helper.ItemNBTHelper;
import vazkii.botania.common.item.ModItems;
// This is legacy code and is no longer used. Check out TileTerraPlate instead.
public final class TerrasteelCraftingHandler {
private static final String TAG_TIME = "Botania-CraftingTime";
@@ -95,8 +95,6 @@ public class CommonProxy {
MinecraftForge.EVENT_BUS.register(new SheddingHandler());
MinecraftForge.EVENT_BUS.register(new SpawnerChangingHandler());
FMLCommonHandler.instance().bus().register(new CommonTickHandler());
FMLInterModComms.sendMessage("ProjectE", "interdictionblacklist", EntityManaBurst.class.getCanonicalName());
if(Botania.bcTriggersLoaded)
@@ -201,6 +201,7 @@ public final class ModCraftingRecipes {
public static IRecipe recipeFlask;
public static IRecipe recipeBrewery;
public static IRecipe recipeBloodPendant;
public static IRecipe recipeTerraPlate;
public static void init() {
// Lexicon Recipe
@@ -1274,6 +1275,18 @@ public final class ModCraftingRecipes {
'D', LibOreDict.MANA_DIAMOND);
recipeBloodPendant = BotaniaAPI.getLatestAddedRecipe();
// Terrestrial Agglomeration Plate Recipe
addOreDictRecipe(new ItemStack(ModBlocks.terraPlate),
"LLL", "0M1", "283",
'L', new ItemStack(Blocks.lapis_block),
'M', new ItemStack(ModBlocks.storage),
'0', LibOreDict.RUNE[0],
'1', LibOreDict.RUNE[1],
'2', LibOreDict.RUNE[2],
'3', LibOreDict.RUNE[3],
'8', LibOreDict.RUNE[8]);
recipeTerraPlate = BotaniaAPI.getLatestAddedRecipe();
// Mana and Terrasteel Block Recipes
addOreDictRecipe(new ItemStack(ModBlocks.storage, 1, 0),
"III", "III", "III",
@@ -237,7 +237,7 @@ public final class LexiconData {
new PageRuneRecipe("13", ModRuneRecipes.recipeLustRune), new PageRuneRecipe("14", ModRuneRecipes.recipeGluttonyRune), new PageRuneRecipe("15", ModRuneRecipes.recipeGreedRune), new PageRuneRecipe("16", ModRuneRecipes.recipeSlothRune), new PageRuneRecipe("17", ModRuneRecipes.recipeWrathRune), new PageRuneRecipe("18", ModRuneRecipes.recipeEnvyRune), new PageRuneRecipe("19", ModRuneRecipes.recipePrideRune));
terrasteel = new BLexiconEntry(LibLexicon.BASICS_TERRASTEEL, categoryBasics);
terrasteel.setLexiconPages(new PageText("0"), new PageTerrasteel("1"));
terrasteel.setLexiconPages(new PageText("0"), new PageCraftingRecipe("1", ModCraftingRecipes.recipeTerraPlate), new PageText("2"), new PageTerrasteel("3"));
if(Botania.thaumcraftLoaded)
new BLexiconEntry("wrap", categoryBasics).setLexiconPages(new PageText("0")); // lel
@@ -33,13 +33,6 @@ public class PageTerrasteel extends PageRecipe {
private static final ResourceLocation terrasteelOverlay = new ResourceLocation(LibResources.GUI_TERRASTEEL_OVERLAY);
int ticksElapsed = 0;
int index = 0;
static final Block[] blocks = new Block[] {
Blocks.iron_block, Blocks.gold_block, Blocks.emerald_block, Blocks.diamond_block, ModBlocks.storage
};
public PageTerrasteel(String unlocalizedName) {
super(unlocalizedName);
}
@@ -47,29 +40,31 @@ public class PageTerrasteel extends PageRecipe {
@Override
@SideOnly(Side.CLIENT)
public void renderRecipe(IGuiLexiconEntry gui, int mx, int my) {
Block block = blocks[index];
Block block1 = ModBlocks.livingrock;
Block block2 = Blocks.lapis_block;
Block block3 = ModBlocks.terraPlate;
GL11.glTranslatef(0F, 0F, -10F);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8, gui.getTop() + 103, new ItemStack(block), false);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8, gui.getTop() + 103, new ItemStack(block1), false);
GL11.glTranslatef(0F, 0F, 5F);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8 + 7, gui.getTop() + 106, new ItemStack(block), false);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8 - 6, gui.getTop() + 106, new ItemStack(block), false);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8 + 7, gui.getTop() + 106, new ItemStack(block2), false);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8 - 6, gui.getTop() + 106, new ItemStack(block2), false);
GL11.glTranslatef(0F, 0F, 5F);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8, gui.getTop() + 110, new ItemStack(block), false);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8 + 14, gui.getTop() + 110, new ItemStack(block), false);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8 - 13, gui.getTop() + 110, new ItemStack(block), false);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8, gui.getTop() + 110, new ItemStack(block1), false);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8 + 14, gui.getTop() + 110, new ItemStack(block1), false);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8 - 13, gui.getTop() + 110, new ItemStack(block1), false);
GL11.glTranslatef(0F, 0F, 5F);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8 - 6, gui.getTop() + 114, new ItemStack(block), false);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8 + 7, gui.getTop() + 114, new ItemStack(block), false);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8 - 6, gui.getTop() + 114, new ItemStack(block2), false);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8 + 7, gui.getTop() + 114, new ItemStack(block2), false);
GL11.glTranslatef(0F, 0F, 5F);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8 + 1, gui.getTop() + 117, new ItemStack(block), false);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8 + 1, gui.getTop() + 117, new ItemStack(block1), false);
GL11.glTranslatef(0F, 0F, 5F);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8, gui.getTop() + 102, new ItemStack(Blocks.beacon), false);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8, gui.getTop() + 102, new ItemStack(block3), false);
GL11.glTranslatef(0F, 0F, -10F);
renderItem(gui, gui.getLeft() + gui.getWidth() / 2 - 8, gui.getTop() + 30, new ItemStack(ModItems.manaResource, 1, 4), false);
@@ -86,18 +81,6 @@ public class PageTerrasteel extends PageRecipe {
GL11.glDisable(GL11.GL_BLEND);
}
@Override
@SideOnly(Side.CLIENT)
public void updateScreen() {
if(ticksElapsed % 20 == 0) {
index++;
if(index == blocks.length)
index = 0;
}
++ticksElapsed;
}
@Override
public void onPageAdded(LexiconEntry entry, int index) {
LexiconRecipeMappings.map(new ItemStack(ModItems.manaResource, 1, 4), entry, index);
@@ -60,6 +60,7 @@ public final class LibBlockNames {
public static final String ELF_GLASS = "elfGlass";
public static final String BREWERY = "brewery";
public static final String MANA_GLASS = "manaGlass";
public static final String TERRA_PLATE = "terraPlate";
public static final String SUBTILE_PUREDAISY = "puredaisy";
public static final String SUBTILE_MANASTAR = "manastar";