Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added data terminal which serves as an in-game guide.
- Loading branch information
Showing
27 changed files
with
197 additions
and
5 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
package com.droog71.prospect.gui; | ||
|
||
import net.minecraft.client.gui.GuiButton; | ||
import net.minecraft.client.gui.GuiScreen; | ||
import net.minecraft.client.renderer.GlStateManager; | ||
import net.minecraft.util.ResourceLocation; | ||
import net.minecraftforge.fml.relauncher.Side; | ||
import net.minecraftforge.fml.relauncher.SideOnly; | ||
|
||
@SideOnly(Side.CLIENT) | ||
public class DataTerminalGUI extends GuiScreen | ||
{ | ||
private int index; | ||
private float zoom = 1; | ||
|
||
private static final ResourceLocation[] pages = | ||
{ | ||
new ResourceLocation("prospect:textures/gui/data_terminal_intro_1.png"), | ||
new ResourceLocation("prospect:textures/gui/data_terminal_intro_2.png"), | ||
new ResourceLocation("prospect:textures/gui/data_terminal_spores_1.png"), | ||
new ResourceLocation("prospect:textures/gui/data_terminal_spores_2.png"), | ||
new ResourceLocation("prospect:textures/gui/data_terminal_spores_3.png"), | ||
new ResourceLocation("prospect:textures/gui/data_terminal_igc_1.png"), | ||
new ResourceLocation("prospect:textures/gui/data_terminal_igc_2.png"), | ||
new ResourceLocation("prospect:textures/gui/data_terminal_igc_3.png"), | ||
new ResourceLocation("prospect:textures/gui/data_terminal_machines.png"), | ||
new ResourceLocation("prospect:textures/gui/data_terminal_schematics.png"), | ||
new ResourceLocation("prospect:textures/gui/data_terminal_solar.png"), | ||
new ResourceLocation("prospect:textures/gui/data_terminal_zero_point_reactor.png"), | ||
new ResourceLocation("prospect:textures/gui/data_terminal_transformers.png"), | ||
new ResourceLocation("prospect:textures/gui/data_terminal_conduits.png"), | ||
new ResourceLocation("prospect:textures/gui/data_terminal_conveyor_tubes.png") | ||
}; | ||
|
||
public DataTerminalGUI() | ||
{ | ||
|
||
} | ||
|
||
public void drawScreen(int mouseX, int mouseY, float partialTicks) | ||
{ | ||
drawImage(); | ||
super.drawScreen(mouseX, mouseY, partialTicks); | ||
} | ||
|
||
public void initGui() | ||
{ | ||
super.initGui(); | ||
this.buttonList.add(new GuiButton(0, width - 200, (int)(height * 0.75f), "Zoom")); | ||
this.buttonList.add(new GuiButton(1, width - 200, (int)(height * 0.8f), "Next")); | ||
this.buttonList.add(new GuiButton(2, width - 200, (int)(height * 0.85f), "Previous")); | ||
this.buttonList.add(new GuiButton(3, width - 200, (int)(height * 0.9f), "Close")); | ||
} | ||
|
||
public void drawImage() | ||
{ | ||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); | ||
mc.getTextureManager().bindTexture(pages[index]); | ||
int size = (int) (height * zoom); | ||
int offset = (int) ((zoom - 1) * height); | ||
int height_offset = zoom == 1 ? 0 : (int) ((offset / 2) * -1); | ||
drawModalRectWithCustomSizedTexture((size / 2) - (size / 2), height_offset, 0, 0, size, size, size, size); | ||
} | ||
|
||
protected void actionPerformed(GuiButton button) | ||
{ | ||
if (button.id == 0) | ||
{ | ||
zoom = zoom < 2 ? zoom + 0.25f : 1; | ||
} | ||
else if (button.id == 1) | ||
{ | ||
if (index < pages.length - 1) | ||
{ | ||
index++; | ||
} | ||
else | ||
{ | ||
index = 0; | ||
} | ||
} | ||
else if (button.id == 2) | ||
{ | ||
if (index > 0) | ||
{ | ||
index--; | ||
} | ||
else | ||
{ | ||
index = pages.length - 1; | ||
} | ||
} | ||
else | ||
{ | ||
this.mc.displayGuiScreen((GuiScreen)null); | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package com.droog71.prospect.items; | ||
|
||
import com.droog71.prospect.Prospect; | ||
import net.minecraft.entity.player.EntityPlayer; | ||
import net.minecraft.item.EnumAction; | ||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.ActionResult; | ||
import net.minecraft.util.EnumActionResult; | ||
import net.minecraft.util.EnumHand; | ||
import net.minecraft.world.World; | ||
|
||
public class DataTerminal extends ProspectItem | ||
{ | ||
public DataTerminal(String name) | ||
{ | ||
super(name); | ||
} | ||
|
||
@Override | ||
public EnumAction getItemUseAction(ItemStack stack) | ||
{ | ||
return EnumAction.NONE; | ||
} | ||
|
||
@Override | ||
public ActionResult<ItemStack> onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand handIn) | ||
{ | ||
ItemStack itemstack = playerIn.getHeldItem(handIn); | ||
playerIn.openGui(Prospect.instance, 9, worldIn, (int)playerIn.posX, (int)playerIn.posY, (int)playerIn.posZ); | ||
return new ActionResult<ItemStack>(EnumActionResult.PASS, itemstack); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
item.data_terminal.name=Data Terminal | ||
item.gem.name=Gem | ||
item.credit.name=IGC | ||
item.circuit.name=Circuit | ||
|
19 changes: 19 additions & 0 deletions
19
main/resources/assets/prospect/models/item/data_terminal.json
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,19 @@ | ||
{ | ||
"parent": "item/generated", | ||
"textures": { | ||
"layer0": "prospect:items/data_terminal" | ||
}, | ||
|
||
"display": { | ||
"thirdperson": { | ||
"rotation": [-90,0,0], | ||
"translation": [0,1,-3], | ||
"scale": [0.55,0.55,0.55] | ||
}, | ||
"firstperson": { | ||
"rotation": [0,-135,25], | ||
"translation": [0,4,2], | ||
"scale": [1.7,1.7,1.7] | ||
} | ||
} | ||
} |
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,24 @@ | ||
{ | ||
"type": "forge:ore_shaped", | ||
"pattern": [ | ||
"AAA", | ||
"CGC", | ||
"ACA" ], | ||
"key": { | ||
"A": { | ||
"item": "prospect:aluminum_plate" | ||
}, | ||
"G": { | ||
"item": "minecraft:glass" | ||
}, | ||
"C": { | ||
"item": "prospect:circuit" | ||
} | ||
}, | ||
"result": { | ||
"item": "prospect:data_terminal", | ||
"data": 0 | ||
} | ||
} | ||
|
||
|
Binary file added
BIN
+134 KB
main/resources/assets/prospect/textures/gui/data_terminal_conduits.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+237 KB
main/resources/assets/prospect/textures/gui/data_terminal_conveyor_tubes.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+231 KB
main/resources/assets/prospect/textures/gui/data_terminal_machines.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+201 KB
main/resources/assets/prospect/textures/gui/data_terminal_schematics.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+288 KB
main/resources/assets/prospect/textures/gui/data_terminal_spores_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+127 KB
main/resources/assets/prospect/textures/gui/data_terminal_spores_2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+217 KB
main/resources/assets/prospect/textures/gui/data_terminal_spores_3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+184 KB
main/resources/assets/prospect/textures/gui/data_terminal_transformers.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+201 KB
main/resources/assets/prospect/textures/gui/data_terminal_zero_point_reactor.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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