mirror of
https://github.com/GTNewHorizons/Draconic-Evolution.git
synced 2026-11-28 07:55:48 +00:00
27/12/2014
This commit is contained in:
1 parent
84116669c3
commit
fd16b3e600
12 files changed
+146
-10
No files matched your search
@@ -22,7 +22,7 @@ public class ToolHudHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void drawDislocationFocusHUD(RenderGameOverlayEvent.Post event) {
|
||||
public void drawToolHUD(RenderGameOverlayEvent.Post event) {
|
||||
if (event.type == RenderGameOverlayEvent.ElementType.ALL && tooltipDisplayTicks > 0 && !MathHelper.stringNullOrLengthZero(currentTooltip)) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
ScaledResolution var5 = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.brandon3055.draconicevolution.client.interfaces;
|
||||
|
||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.client.interfaces.componentguis.GUIToolConfig;
|
||||
import com.brandon3055.draconicevolution.client.interfaces.manual.GuiManual;
|
||||
import com.brandon3055.draconicevolution.common.container.*;
|
||||
import com.brandon3055.draconicevolution.common.tileentities.*;
|
||||
@@ -23,6 +24,7 @@ public class GuiHandler implements IGuiHandler {
|
||||
public static final int GUIID_MANUAL = 9;
|
||||
public static final int GUIID_DISSENCHANTER = 10;
|
||||
public static final int GUIID_DRACONIC_CHEST = 11;
|
||||
public static final int GUIID_TOOL_CONFIG = 12;
|
||||
public static final int GUIID_CONTAINER_TEMPLATE = 100;
|
||||
|
||||
public GuiHandler() {
|
||||
@@ -152,6 +154,8 @@ public class GuiHandler implements IGuiHandler {
|
||||
return new GUIDraconiumChest(player.inventory, (TileDraconiumChest) containerChest);
|
||||
}
|
||||
break;
|
||||
case GUIID_TOOL_CONFIG:
|
||||
return new GUIToolConfig(player);
|
||||
|
||||
// case GUIID_CONTAINER_TEMPLATE:
|
||||
// TileEntity containerTemp = world.getTileEntity(x, y, z);
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.brandon3055.draconicevolution.client.interfaces.componentguis;
|
||||
|
||||
import com.brandon3055.draconicevolution.client.interfaces.guicomponents.ComponentGUIBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 26/12/2014.
|
||||
*/
|
||||
public class GUIToolConfig extends ComponentGUIBase {
|
||||
|
||||
EntityPlayer player;
|
||||
|
||||
public GUIToolConfig(EntityPlayer player){
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addComponents() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeX() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeY() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
package com.brandon3055.draconicevolution.client.interfaces.guicomponents;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 25/12/2014.
|
||||
*/
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**Base class for guis that use gui components*/
|
||||
public abstract class ComponentGUIBase extends GuiScreen {
|
||||
|
||||
List<GUIComponentBase> guiComponents = new ArrayList<GUIComponentBase>();
|
||||
|
||||
public ComponentGUIBase(){
|
||||
}
|
||||
|
||||
public abstract void addComponents();
|
||||
|
||||
@Override
|
||||
public void drawScreen(int x, int y, float f) {
|
||||
super.drawScreen(x, y, f);
|
||||
for (GUIComponentBase b : guiComponents) b.drawScreen(x, y, f);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int x, int y, int button) {
|
||||
super.mouseClicked(x, y, button);
|
||||
for (GUIComponentBase b : guiComponents) b.mouseClick(x, y, button);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseMovedOrUp(int x, int y, int button) {
|
||||
super.mouseMovedOrUp(x, y, button);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClickMove(int x, int y, int button, long time) {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char keyChar, int keyInt) {
|
||||
super.keyTyped(keyChar, keyInt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateScreen() {
|
||||
for (GUIComponentBase b : guiComponents) b.updateScreen();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesGuiPauseGame() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
}
|
||||
|
||||
public abstract int getSizeX();
|
||||
|
||||
public abstract int getSizeY();
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.brandon3055.draconicevolution.client.interfaces.guicomponents;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 25/12/2014.
|
||||
*/
|
||||
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
/**Base class for gui components*/
|
||||
public class GUIComponentBase extends GuiScreen {
|
||||
|
||||
public boolean componentEnabled = true;
|
||||
|
||||
public void mouseClick(int x, int y, int button){
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+3
-2
@@ -1,6 +1,7 @@
|
||||
package com.brandon3055.draconicevolution.client.interfaces.manual;
|
||||
|
||||
import com.brandon3055.draconicevolution.common.ModBlocks;
|
||||
import com.brandon3055.draconicevolution.common.handler.ConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.utills.ItemNBTHelper;
|
||||
import com.brandon3055.draconicevolution.common.ModItems;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -86,7 +87,7 @@ public class GuiManual extends GuiScreen {
|
||||
pageCollection.addPage(new CraftingInfoPage("ITEM_PAGE."+getNextPageIndex(), pageCollection, mobSoul, ""));
|
||||
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.weatherController), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.sunDial), ""));
|
||||
if (ConfigHandler.disableSunDial != 2) pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.sunDial), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.playerDetector), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.playerDetectorAdvanced), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.grinder, 1, 3), ""));
|
||||
@@ -98,7 +99,7 @@ public class GuiManual extends GuiScreen {
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.draconiumChest), ""));
|
||||
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.particleGenerator), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.xRayBlock), ""));
|
||||
if (ConfigHandler.disableXrayBlock != 2) pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.xRayBlock), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.potentiometer), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.rainSensor), ""));
|
||||
pageCollection.addPage(new CraftingInfoPage("BLOCK_PAGE."+getNextPageIndex(), pageCollection, new ItemStack(ModBlocks.draconiumBlock), ""));
|
||||
|
||||
@@ -13,9 +13,12 @@ import org.lwjgl.input.Keyboard;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class KeyBindings {
|
||||
public static KeyBinding placeItem;
|
||||
public static KeyBinding toolConfig;
|
||||
|
||||
public static void init() {
|
||||
placeItem = new KeyBinding("key.placeItem", Keyboard.KEY_P, References.MODNAME);
|
||||
toolConfig = new KeyBinding("key.toolConfig", Keyboard.KEY_C, References.MODNAME);
|
||||
ClientRegistry.registerKeyBinding(placeItem);
|
||||
ClientRegistry.registerKeyBinding(toolConfig);
|
||||
}
|
||||
}
|
||||
+7
-2
@@ -1,10 +1,11 @@
|
||||
package com.brandon3055.draconicevolution.client.keybinding;
|
||||
|
||||
import com.brandon3055.draconicevolution.DraconicEvolution;
|
||||
import com.brandon3055.draconicevolution.common.network.PlacedItemPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.TeleporterPacket;
|
||||
import com.brandon3055.draconicevolution.client.interfaces.GuiHandler;
|
||||
import com.brandon3055.draconicevolution.common.ModItems;
|
||||
import com.brandon3055.draconicevolution.common.items.tools.ToolHandler;
|
||||
import com.brandon3055.draconicevolution.common.network.PlacedItemPacket;
|
||||
import com.brandon3055.draconicevolution.common.network.TeleporterPacket;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.InputEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -26,6 +27,10 @@ public class KeyInputHandler {
|
||||
@SubscribeEvent
|
||||
public void onKeyInput(InputEvent.KeyInputEvent event) {
|
||||
if(KeyBindings.placeItem.isPressed()) handlePlaceItemKey();
|
||||
if(KeyBindings.toolConfig.isPressed()) {
|
||||
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
|
||||
player.openGui(DraconicEvolution.instance, GuiHandler.GUIID_TOOL_CONFIG, Minecraft.getMinecraft().theWorld, (int)player.posX, (int)player.posY, (int)player.posZ);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+4
-3
@@ -30,7 +30,7 @@ public class RenderTileCustomSpawner extends TileEntitySpecialRenderer
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void renderTile(CustomSpawnerBaseLogic customSpawnerBaseLogic, double x, double y, double z, float p_147517_7_)
|
||||
public void renderTile(CustomSpawnerBaseLogic customSpawnerBaseLogic, double x, double y, double z, float partialTick)
|
||||
{
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
@@ -38,16 +38,17 @@ public class RenderTileCustomSpawner extends TileEntitySpecialRenderer
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
if (customSpawnerBaseLogic.powered) partialTick = 0f;
|
||||
GL11.glPushMatrix();
|
||||
entity.setWorld(customSpawnerBaseLogic.getSpawnerWorld());
|
||||
float f1 = 0.4375F;
|
||||
GL11.glTranslatef(0.0F, 0.4F, 0.0F);
|
||||
GL11.glRotatef((float) (customSpawnerBaseLogic.renderRotation1 + (customSpawnerBaseLogic.renderRotation0 - customSpawnerBaseLogic.renderRotation1) * (double) p_147517_7_) * 10.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef((float) (customSpawnerBaseLogic.renderRotation1 + (customSpawnerBaseLogic.renderRotation0 - customSpawnerBaseLogic.renderRotation1) * (double) partialTick) * 10.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glRotatef(-30.0F, 1.0F, 0.0F, 0.0F);
|
||||
GL11.glTranslatef(0.0F, -0.4F, 0.0F);
|
||||
GL11.glScalef(f1, f1, f1);
|
||||
entity.setLocationAndAngles(x, y, z, 0.0F, 0.0F);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, p_147517_7_);
|
||||
RenderManager.instance.renderEntityWithPosYaw(entity, 0.0D, 0.0D, 0.0D, 0.0F, partialTick);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.brandon3055.draconicevolution.common.lib;
|
||||
public final class References {
|
||||
public static final String MODID = "DraconicEvolution";
|
||||
public static final String MODNAME = "Draconic Evolution";
|
||||
public static final String VERSION = "1.0.0c";
|
||||
public static final String VERSION = "1.0.1-snapshot_0";
|
||||
public static final String MCVERSION = "1.7.10";
|
||||
public static final String CLIENTPROXYLOCATION = "com.brandon3055.draconicevolution.client.ClientProxy";
|
||||
public static final String COMMONPROXYLOCATION = "com.brandon3055.draconicevolution.common.CommonProxy";
|
||||
|
||||
Reference in new issue
Block a user