This repository has been archived by the owner on Apr 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Committing (you guessed it) a whack of stuff
- Loading branch information
Showing
50 changed files
with
690 additions
and
187 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# | ||
#Sat Dec 28 00:14:08 EST 2013 | ||
minecraft_version = 1.7.10 | ||
forge_version = 10.13.0.1183 | ||
forge_version = 10.13.0.1186 | ||
mod_version = 0.2 |
67 changes: 67 additions & 0 deletions
67
src/main/java/com/pahimar/ee3/block/BlockAugmentationTable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
package com.pahimar.ee3.block; | ||
|
||
import com.pahimar.ee3.EquivalentExchange3; | ||
import com.pahimar.ee3.reference.GuiId; | ||
import com.pahimar.ee3.reference.Names; | ||
import com.pahimar.ee3.reference.RenderIds; | ||
import com.pahimar.ee3.tileentity.TileEntityAugmentationTable; | ||
import net.minecraft.block.ITileEntityProvider; | ||
import net.minecraft.block.material.Material; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.tileentity.TileEntity; | ||
import net.minecraft.world.World; | ||
|
||
public class BlockAugmentationTable extends BlockEE implements ITileEntityProvider | ||
{ | ||
public BlockAugmentationTable() | ||
{ | ||
super(Material.rock); | ||
this.setHardness(2.0f); | ||
this.setBlockName(Names.Blocks.AUGMENTATION_TABLE); | ||
} | ||
|
||
@Override | ||
public TileEntity createNewTileEntity(World world, int metaData) | ||
{ | ||
return new TileEntityAugmentationTable(); | ||
} | ||
|
||
@Override | ||
public boolean renderAsNormalBlock() | ||
{ | ||
return false; | ||
} | ||
|
||
@Override | ||
public boolean isOpaqueCube() | ||
{ | ||
return false; | ||
} | ||
|
||
@Override | ||
public int getRenderType() | ||
{ | ||
return RenderIds.augmentationTable; | ||
} | ||
|
||
@Override | ||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9) | ||
{ | ||
if (player.isSneaking()) | ||
{ | ||
return false; | ||
} | ||
else | ||
{ | ||
if (!world.isRemote) | ||
{ | ||
if (world.getTileEntity(x, y, z) instanceof TileEntityAugmentationTable) | ||
{ | ||
player.openGui(EquivalentExchange3.instance, GuiId.AUGMENTATION_TABLE.ordinal(), world, x, y, z); | ||
} | ||
} | ||
|
||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
src/main/java/com/pahimar/ee3/client/gui/inventory/GuiAugmentationTable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package com.pahimar.ee3.client.gui.inventory; | ||
|
||
import com.pahimar.ee3.inventory.ContainerAugmentationTable; | ||
import com.pahimar.ee3.reference.Names; | ||
import com.pahimar.ee3.reference.Textures; | ||
import com.pahimar.ee3.tileentity.TileEntityAugmentationTable; | ||
import cpw.mods.fml.relauncher.Side; | ||
import cpw.mods.fml.relauncher.SideOnly; | ||
import net.minecraft.client.gui.inventory.GuiContainer; | ||
import net.minecraft.entity.player.InventoryPlayer; | ||
import net.minecraft.util.StatCollector; | ||
import org.lwjgl.opengl.GL11; | ||
|
||
@SideOnly(Side.CLIENT) | ||
public class GuiAugmentationTable extends GuiContainer | ||
{ | ||
private TileEntityAugmentationTable tileEntityAugmentationTable; | ||
|
||
public GuiAugmentationTable(InventoryPlayer inventoryPlayer, TileEntityAugmentationTable tileEntityAugmentationTable) | ||
{ | ||
super(new ContainerAugmentationTable(inventoryPlayer, tileEntityAugmentationTable)); | ||
this.tileEntityAugmentationTable = tileEntityAugmentationTable; | ||
xSize = 176; | ||
ySize = 187; | ||
} | ||
|
||
@Override | ||
protected void drawGuiContainerForegroundLayer(int x, int y) | ||
{ | ||
String containerName = StatCollector.translateToLocal(tileEntityAugmentationTable.getInventoryName()); | ||
fontRendererObj.drawString(containerName, xSize / 2 - fontRendererObj.getStringWidth(containerName) / 2, 6, 4210752); | ||
fontRendererObj.drawString(StatCollector.translateToLocal(Names.Containers.VANILLA_INVENTORY), 8, ySize - 104, 4210752); | ||
} | ||
|
||
@Override | ||
protected void drawGuiContainerBackgroundLayer(float var1, int var2, int var3) | ||
{ | ||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); | ||
|
||
this.mc.getTextureManager().bindTexture(Textures.Gui.AUGMENTATION_TABLE); | ||
|
||
int xStart = (width - xSize) / 2; | ||
int yStart = (height - ySize) / 2; | ||
this.drawTexturedModalRect(xStart, yStart, 0, 0, xSize, ySize); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.