diff --git a/Change Log.txt b/Change Log.txt index 62b51193..59237995 100644 --- a/Change Log.txt +++ b/Change Log.txt @@ -1,3 +1,13 @@ +######## 1.0.2-Snapshot 10 ######## +-fixed hover text for stats in the reactor gui showing when the stats page is closed. +-beacons can now pass through energy core. +-fixed bug in old 2D armor models. +-fixed Draconic helm night vision checking light value at your feet resulting wierd behavior like activating when walking on soul sand. +-fixed rounding issue with energy core display so it will show decimals like 23.5M / 1.64B instead of just 23M / 1B. +-fixed a dupe bug in the tool inventory gui +- + + ######## 1.0.2-Snapshot 9 ######## -added config option to adjust the distance between chaos islands. -fixed infused obsidian and draconium blocks wither resistance. @@ -13,10 +23,6 @@ -added hover text to values in the reactor stats page. -fixed some bugs in the reactor code. -fixed a minor bug in the custom spwner blacklist. -- -- -- -- ######## 1.0.2-Snapshot 8-bugfix ######## -fixed crash in information tablet. diff --git a/src/main/java/com/brandon3055/draconicevolution/DraconicEvolution.java b/src/main/java/com/brandon3055/draconicevolution/DraconicEvolution.java index 4ee8b932..23d5fc0d 100644 --- a/src/main/java/com/brandon3055/draconicevolution/DraconicEvolution.java +++ b/src/main/java/com/brandon3055/draconicevolution/DraconicEvolution.java @@ -55,7 +55,7 @@ public class DraconicEvolution { event.getModMetadata().description = "This is a mod originally made for the Tolkiencraft mod pack"; event.getModMetadata().authorList = Arrays.asList("brandon3055"); event.getModMetadata().logoFile = "banner.png"; - event.getModMetadata().url = "http://www.tolkiencraft.com/draconic-evolution/"; + event.getModMetadata().url = "http://www.brandon3055.com/"; event.getModMetadata().version = References.VERSION + "-MC1.7.10"; proxy.preInit(event); @@ -66,8 +66,11 @@ public class DraconicEvolution { public void init(final FMLInitializationEvent event) {if(debug) System.out.println("init()"); - proxy.init(event); + + // === + + // === } @Mod.EventHandler diff --git a/src/main/java/com/brandon3055/draconicevolution/client/gui/GUIUpgradeModifier.java b/src/main/java/com/brandon3055/draconicevolution/client/gui/GUIUpgradeModifier.java new file mode 100644 index 00000000..e9ab3a3c --- /dev/null +++ b/src/main/java/com/brandon3055/draconicevolution/client/gui/GUIUpgradeModifier.java @@ -0,0 +1,254 @@ +package com.brandon3055.draconicevolution.client.gui; + +import com.brandon3055.brandonscore.client.utills.GuiHelper; +import com.brandon3055.draconicevolution.client.handler.ResourceHandler; +import com.brandon3055.draconicevolution.common.ModItems; +import com.brandon3055.draconicevolution.common.container.ContainerUpgradeModifier; +import com.brandon3055.draconicevolution.common.tileentities.TileUpgradeModifier; +import com.brandon3055.draconicevolution.common.utills.IUpgradableItem; +import com.brandon3055.draconicevolution.common.utills.IUpgradableItem.EnumUpgrade; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.client.Minecraft; +import net.minecraft.client.audio.PositionedSoundRecord; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.inventory.GuiContainer; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.StatCollector; +import org.lwjgl.opengl.GL11; + +import java.util.ArrayList; +import java.util.List; + +@SideOnly(Side.CLIENT) +public class GUIUpgradeModifier extends GuiContainer { + + public EntityPlayer player; + private TileUpgradeModifier tile; + private float rotation = 0; + private float rotationSpeed = 0; + private float targetSpeed = 0; + + private boolean inUse = false; + private IUpgradableItem upgradableItem = null; + private ItemStack stack = null; + private List itemUpgrades = new ArrayList(); + private ContainerUpgradeModifier containerEM; + + public GUIUpgradeModifier(InventoryPlayer invPlayer, TileUpgradeModifier tile, ContainerUpgradeModifier containerEM) { + super(containerEM); + this.containerEM = containerEM; + + + xSize = 176; + ySize = 190; + + this.tile = tile; + this.player = invPlayer.player; + } + + + @Override + protected void drawGuiContainerBackgroundLayer(float f, int x, int y) { + GL11.glColor4f(1F, 1F, 1F, 1F); + ResourceHandler.bindResource("textures/gui/UpgradeModifier.png"); + + drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); + + drawTexturedModalRect(guiLeft + 38, guiTop + 6, 3, 106, 100, 50); + drawTexturedModalRect(guiLeft + 38, guiTop + 56, 3, 106, 100, 50); + + GL11.glPushMatrix(); + GL11.glTranslated(guiLeft + 38, guiTop + 6, 0); + GL11.glTranslatef(50, 50, 0); + GL11.glRotatef(rotation + (f * rotationSpeed), 0, 0, 1); + GL11.glTranslatef(-50, -50, 0); + drawTexturedModalRect(0, 0, 38, 6, 100, 100); + GL11.glPopMatrix(); + + if (!inUse)drawSlots(); + else renderUpgrades(x, y); + + } + + @Override + protected void drawGuiContainerForegroundLayer(int x, int y) { + drawCenteredString(fontRendererObj, tile.getBlockType().getLocalizedName(), xSize/2, -9, 0x00FFFF); + + } + + @Override + public void initGui() { + super.initGui(); + + } + + @Override + protected void actionPerformed(GuiButton button) { + + + } + + private int coreSlots = 0; + private int coreTier = 0; + private int usedSlots = 0; + private boolean[] coreInInventory = new boolean[4]; + + @Override + public void updateScreen() { + super.updateScreen(); + if (tile.getStackInSlot(0) != null && tile.getStackInSlot(0).getItem() instanceof IUpgradableItem) + { + stack = tile.getStackInSlot(0); + upgradableItem = (IUpgradableItem) stack.getItem(); + itemUpgrades = upgradableItem.getUpgrades(); + inUse = true; + coreSlots = upgradableItem.getUpgradeCap(); + coreTier = upgradableItem.getMaxTier(); + usedSlots = 0; + coreInInventory[0] = player.inventory.hasItem(ModItems.draconicCore); + coreInInventory[1] = player.inventory.hasItem(ModItems.wyvernCore); + coreInInventory[2] = player.inventory.hasItem(ModItems.awakenedCore); + coreInInventory[3] = player.inventory.hasItem(ModItems.chaoticCore); + + for (EnumUpgrade upgrade : upgradableItem.getUpgrades()) { + for (Integer i : upgrade.getCoresApplied(stack)) usedSlots += i; + } + + } + else inUse = false; + + if (inUse) targetSpeed = 5F; + else targetSpeed = 0F; + + if (rotationSpeed < targetSpeed) rotationSpeed += 0.05F; + else if (rotationSpeed > targetSpeed) rotationSpeed -= 0.05F; + if (targetSpeed == 0 && rotationSpeed < 0) rotationSpeed = 0; + rotation += rotationSpeed; + } + + private void drawSlots() { + ResourceHandler.bindResource("textures/gui/Widgets.png"); + + int xPos = guiLeft + ((xSize - 162) / 2); + int yPos = guiTop + 110; + + for (int y = 0; y < 3; y++) { + for (int x = 0; x < 9; x++) { + drawTexturedModalRect(xPos + x*18, yPos + y*18, 138, 0, 18, 18); + } + } + + for (int x = 0; x < 9; x++) { + drawTexturedModalRect(xPos + x*18, yPos + 56, 138, 0, 18, 18); + } + + drawTexturedModalRect(guiLeft + 79, guiTop + 47, 138, 0, 18, 18); + } + + @Override + protected void mouseClicked(int x, int y, int button) { + super.mouseClicked(x, y, button); + + for (EnumUpgrade upgrade : itemUpgrades) + { + int xIndex = itemUpgrades.indexOf(upgrade); + int spacing = (xSize-6) / itemUpgrades.size(); + int xPos = guiLeft + (xIndex * spacing) + ((spacing - 23) / 2) + 4; + int yPos = guiTop + 90; + + + int[] appliedCores = upgrade.getCoresApplied(tile.getStackInSlot(0)); + + for (int i = 0; i <= coreTier; i++) + { + //Check + buttons + if (/*coreInInventory[i] && */coreSlots > usedSlots && GuiHelper.isInRect(xPos, yPos+33 + i*18, 8, 8, x, y)){ + containerEM.sendObjectToServer(null, upgrade.index, i*2); + Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(ResourceHandler.getResourceWOP("gui.button.press"), 1.0F)); + } + + //Check - buttons + if (appliedCores[i] > -1 && GuiHelper.isInRect(xPos + 16, yPos+33 + i*18, 8, 8, x, y)){ + containerEM.sendObjectToServer(null, upgrade.index, 1 + i*2); + Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.func_147674_a(ResourceHandler.getResourceWOP("gui.button.press"), 1.0F)); + } + } + } + + } + + private void renderUpgrades(int x, int y){ + //First Draw + for (EnumUpgrade upgrade : itemUpgrades) + { + int xIndex = itemUpgrades.indexOf(upgrade); + int spacing = (xSize-6) / itemUpgrades.size(); + int xPos = guiLeft + (xIndex * spacing) + ((spacing - 23) / 2) + 4; + int yPos = guiTop + 90; + + ResourceHandler.bindResource("textures/gui/UpgradeModifier.png"); + + drawTexturedModalRect(xPos, yPos, 0, 190, 24, 24); + drawTexturedModalRect(xPos+3, yPos+3, upgrade.index * 18, 220, 18, 18); + + int[] appliedCores = upgrade.getCoresApplied(tile.getStackInSlot(0)); + + for (int i = 0; i <= coreTier; i++) { + drawTexturedModalRect(xPos+3, yPos+24 + i*18, 24 + i*18, 190, 18, 18); + drawTexturedModalRect(xPos+3, yPos+24 + i*18, 24 + i*18, 190, 18, 18); + + //Draw + buttons + if (coreSlots > usedSlots){ + boolean hovering = GuiHelper.isInRect(xPos, yPos+33 + i*18, 8, 8, x, y); + if (!coreInInventory[i]) drawTexturedModalRect(xPos, yPos+33 + i*18, 24, 208, 8, 8); + else drawTexturedModalRect(xPos, yPos+33 + i*18, 32 + (hovering ? 8 : 0), 208, 8, 8); + } + + //Draw - buttons + if (appliedCores[i] > 0){ + boolean hovering = GuiHelper.isInRect(xPos + 16, yPos+33 + i*18, 8, 8, x, y); + drawTexturedModalRect(xPos + 16, yPos+33 + i*18, 56 + (hovering ? 8 : 0), 208, 8, 8); + } + + + } + for (int i = 0; i <= coreTier; i++) drawCenteredString(fontRendererObj, String.valueOf(appliedCores[i]), xPos + 12, yPos + 29 + i*18, 0xFFFFFF); + } + + //Second Draw + for (EnumUpgrade upgrade : itemUpgrades) + { + int xIndex = itemUpgrades.indexOf(upgrade); + int spacing = (xSize-6) / itemUpgrades.size(); + int xPos = guiLeft + (xIndex * spacing) + ((spacing - 23) / 2) + 4; + int yPos = guiTop + 90; + int[] appliedCores = upgrade.getCoresApplied(tile.getStackInSlot(0)); + + if (GuiHelper.isInRect(xPos, yPos, 24, 24, x, y)){ + List list = new ArrayList(); + list.add(upgrade.getLocalizedName()); + drawHoveringText(list, x, y, fontRendererObj); + } + + for (int i = 0; i <= coreTier; i++) { + //Draw Button Text (add) + if (coreSlots > usedSlots && GuiHelper.isInRect(xPos, yPos+33 + i*18, 8, 8, x, y)) { + List list = new ArrayList(); + if (coreInInventory[i]) list.add(StatCollector.translateToLocal("gui.de.addCore.txt")); + else list.add(StatCollector.translateToLocal("gui.de.noCoresInInventory" + i + ".txt")); + drawHoveringText(list, x, y, fontRendererObj); + } + + //Draw Button Text (remove) + if (appliedCores[i] > 1 && GuiHelper.isInRect(xPos + 16, yPos+33 + i*18, 8, 8, x, y)) { + List list = new ArrayList(); + if (coreInInventory[i]) list.add(StatCollector.translateToLocal("gui.de.removeCore.txt")); + drawHoveringText(list, x, y, fontRendererObj); + } + } + } + } +} diff --git a/src/main/java/com/brandon3055/draconicevolution/client/gui/GuiHandler.java b/src/main/java/com/brandon3055/draconicevolution/client/gui/GuiHandler.java index 2d9c97a4..8a87f074 100644 --- a/src/main/java/com/brandon3055/draconicevolution/client/gui/GuiHandler.java +++ b/src/main/java/com/brandon3055/draconicevolution/client/gui/GuiHandler.java @@ -31,6 +31,7 @@ public class GuiHandler implements IGuiHandler { public static final int GUIID_TOOL_CONFIG = 12; public static final int GUIID_FLOW_GATE = 13; public static final int GUIID_REACTOR = 14; + public static final int GUIID_UPGRADE_MODIFIER = 15; public static final int GUIID_CONTAINER_TEMPLATE = 100; public GuiHandler() { @@ -96,7 +97,12 @@ public class GuiHandler implements IGuiHandler { break; case GUIID_TOOL_CONFIG: return new ContainerAdvTool(player.inventory, new InventoryTool(player, null)); - + case GUIID_UPGRADE_MODIFIER: + TileEntity containerTemp = world.getTileEntity(x, y, z); + if (containerTemp != null && containerTemp instanceof TileUpgradeModifier) { + return new ContainerUpgradeModifier(player.inventory, (TileUpgradeModifier) containerTemp); + } + break; // case GUIID_CONTAINER_TEMPLATE: @@ -178,6 +184,12 @@ public class GuiHandler implements IGuiHandler { return new GUIToolConfig(player, new ContainerAdvTool(player.inventory, new InventoryTool(player, null))); case GUIID_FLOW_GATE: return world.getTileEntity(x, y, z) instanceof TileGate ? new GUIFlowGate((TileGate)world.getTileEntity(x, y, z)) : null; + case GUIID_UPGRADE_MODIFIER: + TileEntity containerTemp = world.getTileEntity(x, y, z); + if (containerTemp != null && containerTemp instanceof TileUpgradeModifier) { + return new GUIUpgradeModifier(player.inventory, (TileUpgradeModifier) containerTemp, new ContainerUpgradeModifier(player.inventory, (TileUpgradeModifier) containerTemp)); + } + break; // case GUIID_CONTAINER_TEMPLATE: // TileEntity containerTemp = world.getTileEntity(x, y, z); diff --git a/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIReactor.java b/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIReactor.java index b8b5089c..6e162650 100644 --- a/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIReactor.java +++ b/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIReactor.java @@ -136,25 +136,24 @@ public class GUIReactor extends GUIBase { text.add(reactor.convertedFuel + " / " + (reactor.convertedFuel + reactor.reactorFuel)); //todo refine or remove drawHoveringText(text, mouseX, mouseY, fontRendererObj); } - else if (GuiHelper.isInRect(53, 15, 140, 18, mouseX-guiLeft, mouseY-guiTop)){ - text.addAll(fontRendererObj.listFormattedStringToWidth(StatCollector.translateToLocal("gui.de.reacTempLoadFactor.txt"), 200)); - drawHoveringText(text, mouseX, mouseY, fontRendererObj); - } - else if (GuiHelper.isInRect(53, 40, 140, 18, mouseX-guiLeft, mouseY-guiTop)){ - text.addAll(fontRendererObj.listFormattedStringToWidth(StatCollector.translateToLocal("gui.de.reacCoreMass.txt"), 200)); - drawHoveringText(text, mouseX, mouseY, fontRendererObj); - } - else if (GuiHelper.isInRect(53, 65, 140, 18, mouseX-guiLeft, mouseY-guiTop)){ - text.addAll(fontRendererObj.listFormattedStringToWidth(StatCollector.translateToLocal("gui.de.reacGenRate.txt"), 200)); - drawHoveringText(text, mouseX, mouseY, fontRendererObj); - } - else if (GuiHelper.isInRect(53, 88, 140, 18, mouseX-guiLeft, mouseY-guiTop)){ - text.addAll(fontRendererObj.listFormattedStringToWidth(StatCollector.translateToLocal("gui.de.reacInputRate.txt"), 200)); - drawHoveringText(text, mouseX, mouseY, fontRendererObj); - } - else if (GuiHelper.isInRect(53, 113, 140, 18, mouseX-guiLeft, mouseY-guiTop)){ - text.addAll(fontRendererObj.listFormattedStringToWidth(StatCollector.translateToLocal("gui.de.reacConversionRate.txt"), 200)); - drawHoveringText(text, mouseX, mouseY, fontRendererObj); + + if (showStats) { + if (GuiHelper.isInRect(53, 15, 140, 18, mouseX - guiLeft, mouseY - guiTop)) { + text.addAll(fontRendererObj.listFormattedStringToWidth(StatCollector.translateToLocal("gui.de.reacTempLoadFactor.txt"), 200)); + drawHoveringText(text, mouseX, mouseY, fontRendererObj); + } else if (GuiHelper.isInRect(53, 40, 140, 18, mouseX - guiLeft, mouseY - guiTop)) { + text.addAll(fontRendererObj.listFormattedStringToWidth(StatCollector.translateToLocal("gui.de.reacCoreMass.txt"), 200)); + drawHoveringText(text, mouseX, mouseY, fontRendererObj); + } else if (GuiHelper.isInRect(53, 65, 140, 18, mouseX - guiLeft, mouseY - guiTop)) { + text.addAll(fontRendererObj.listFormattedStringToWidth(StatCollector.translateToLocal("gui.de.reacGenRate.txt"), 200)); + drawHoveringText(text, mouseX, mouseY, fontRendererObj); + } else if (GuiHelper.isInRect(53, 88, 140, 18, mouseX - guiLeft, mouseY - guiTop)) { + text.addAll(fontRendererObj.listFormattedStringToWidth(StatCollector.translateToLocal("gui.de.reacInputRate.txt"), 200)); + drawHoveringText(text, mouseX, mouseY, fontRendererObj); + } else if (GuiHelper.isInRect(53, 113, 140, 18, mouseX - guiLeft, mouseY - guiTop)) { + text.addAll(fontRendererObj.listFormattedStringToWidth(StatCollector.translateToLocal("gui.de.reacConversionRate.txt"), 200)); + drawHoveringText(text, mouseX, mouseY, fontRendererObj); + } } } diff --git a/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIToolConfig.java b/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIToolConfig.java index cf97737c..7de9555e 100644 --- a/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIToolConfig.java +++ b/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIToolConfig.java @@ -208,4 +208,9 @@ public class GUIToolConfig extends GUIBase { this.editingItem = stack; container.updateInventoryStack(slot); } + + @Override + protected boolean checkHotbarKeys(int p_146983_1_) { + return false; + } } diff --git a/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIToolInventory.java b/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIToolInventory.java index 94fa1650..f34fc059 100644 --- a/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIToolInventory.java +++ b/src/main/java/com/brandon3055/draconicevolution/client/gui/componentguis/GUIToolInventory.java @@ -72,4 +72,9 @@ public class GUIToolInventory extends GUIBase { GL11.glColor3f(1f, 1f, 1f); fontRendererObj.drawString(inventoryName, guiLeft + 5, guiTop + 5, 0x555555); } + + @Override + protected boolean checkHotbarKeys(int p_146983_1_) { + return false; + } } diff --git a/src/main/java/com/brandon3055/draconicevolution/client/handler/ClientEventHandler.java b/src/main/java/com/brandon3055/draconicevolution/client/handler/ClientEventHandler.java index 0bc9148e..68a8bef5 100644 --- a/src/main/java/com/brandon3055/draconicevolution/client/handler/ClientEventHandler.java +++ b/src/main/java/com/brandon3055/draconicevolution/client/handler/ClientEventHandler.java @@ -135,7 +135,7 @@ public class ClientEventHandler { @SubscribeEvent public void renderArmorEvent(RenderPlayerEvent.SetArmorModel event) { - if (ConfigHandler.useOriginal3DArmorModel) return; + if (ConfigHandler.useOriginal3DArmorModel || ConfigHandler.useOldArmorModel) return; if (event.stack != null && (event.stack.getItem() instanceof DraconicArmor || event.stack.getItem() instanceof WyvernArmor)) { ItemArmor itemarmor = (ItemArmor)event.stack.getItem(); diff --git a/src/main/java/com/brandon3055/draconicevolution/client/render/item/RenderBowModel.java b/src/main/java/com/brandon3055/draconicevolution/client/render/item/RenderBowModel.java index 0addebab..302820e6 100644 --- a/src/main/java/com/brandon3055/draconicevolution/client/render/item/RenderBowModel.java +++ b/src/main/java/com/brandon3055/draconicevolution/client/render/item/RenderBowModel.java @@ -129,8 +129,10 @@ public class RenderBowModel implements IItemRenderer GL11.glTranslated(0, 0, 1.5); } else if (type == IItemRenderer.ItemRenderType.ENTITY){ - GL11.glRotatef(-34.5F, 0, 1, 0); - GL11.glTranslated(-1.1, 0, -0.2); + GL11.glScaled(0.8, 0.8, 0.8); + GL11.glTranslated(0.25, 0.7, 0.2); + GL11.glRotatef(130, 0, 0, 1); + GL11.glRotatef(-90, 1, 0, 0); } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/CommonProxy.java b/src/main/java/com/brandon3055/draconicevolution/common/CommonProxy.java index 16a1ea7d..ff5eb9d8 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/CommonProxy.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/CommonProxy.java @@ -159,6 +159,7 @@ public class CommonProxy { GameRegistry.registerTileEntity(TileReactorStabilizer.class, References.RESOURCESPREFIX + "TileReactorStabilizer"); GameRegistry.registerTileEntity(TileReactorEnergyInjector.class, References.RESOURCESPREFIX + "TileReactorEnergyInjector"); GameRegistry.registerTileEntity(TileChaosShard.class, References.RESOURCESPREFIX + "TileChaosShard"); + GameRegistry.registerTileEntity(TileUpgradeModifier.class, References.RESOURCESPREFIX + "TileEnhancementModifier"); if (DraconicEvolution.debug) { GameRegistry.registerTileEntity(TileTestBlock.class, References.RESOURCESPREFIX + "TileTestBlock"); GameRegistry.registerTileEntity(TileContainerTemplate.class, References.RESOURCESPREFIX + "TileContainerTemplate"); diff --git a/src/main/java/com/brandon3055/draconicevolution/common/ModBlocks.java b/src/main/java/com/brandon3055/draconicevolution/common/ModBlocks.java index ebffc5d3..b8302df2 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/ModBlocks.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/ModBlocks.java @@ -48,6 +48,7 @@ public class ModBlocks { public static BlockDE reactorStabilizer; public static BlockDE reactorEnergyInjector; public static BlockDE chaosCrystal; + public static BlockDE enhancementModifier; public static Block safetyFlame; public static Block chaosShardAtmos = new ChaosShardAtmos().setBlockName(References.RESOURCESPREFIX+"chaosShardAtmos").setBlockTextureName(References.RESOURCESPREFIX+"transparency"); @@ -88,6 +89,7 @@ public class ModBlocks { reactorStabilizer = new ReactorStabilizer(); reactorEnergyInjector = new ReactorEnergyInjector(); chaosCrystal = new ChaosCrystal(); + enhancementModifier = new UpgradeModifier(); longRangeDislocator = new LongRangeDislocator(); diff --git a/src/main/java/com/brandon3055/draconicevolution/common/blocks/machine/UpgradeModifier.java b/src/main/java/com/brandon3055/draconicevolution/common/blocks/machine/UpgradeModifier.java new file mode 100644 index 00000000..fe24c2b7 --- /dev/null +++ b/src/main/java/com/brandon3055/draconicevolution/common/blocks/machine/UpgradeModifier.java @@ -0,0 +1,95 @@ +package com.brandon3055.draconicevolution.common.blocks.machine; + +import com.brandon3055.draconicevolution.DraconicEvolution; +import com.brandon3055.draconicevolution.client.gui.GuiHandler; +import com.brandon3055.draconicevolution.common.ModBlocks; +import com.brandon3055.draconicevolution.common.blocks.BlockCustomDrop; +import com.brandon3055.draconicevolution.common.tileentities.TileUpgradeModifier; +import cpw.mods.fml.common.network.internal.FMLNetworkHandler; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockAccess; +import net.minecraft.world.World; +import net.minecraftforge.common.util.ForgeDirection; + +import java.util.List; + +/** + * Created by brandon3055 on 23/12/2015. + */ +public class UpgradeModifier extends BlockCustomDrop { + public UpgradeModifier() { + super(Material.iron); + this.setBlockName("upgradeModifier"); + this.setCreativeTab(DraconicEvolution.tabBlocksItems); + this.setStepSound(soundTypeStone); + this.setBlockBounds(0f, 0f, 0f, 1f, 0.375f, 1f); + ModBlocks.register(this); + } + + @SideOnly(Side.CLIENT) + @Override + public void registerBlockIcons(IIconRegister iconRegister) { +// blockIcon = iconRegister.registerIcon(References.RESOURCESPREFIX + "machine_side"); + } + + @Override + public TileEntity createNewTileEntity(World world, int meta) { + return new TileUpgradeModifier(); + } + + @Override + public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float prx, float pry, float prz) { + if (!world.isRemote) { + FMLNetworkHandler.openGui(player, DraconicEvolution.instance, GuiHandler.GUIID_UPGRADE_MODIFIER, world, x, y, z); + } + world.markBlockForUpdate(x, y, z); + return true; + } + + @SideOnly(Side.CLIENT) + @Override + public int getRenderType() { + return -1; + } + + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + + @Override + protected boolean dropInventory() { + return true; + } + + @Override + protected boolean hasCustomDropps() { + return false; + } + + @Override + protected void getCustomTileEntityDrops(TileEntity te, List droppes) { + + } + + @Override + public boolean shouldSideBeRendered(IBlockAccess access, int x, int y, int z, int side) { + return false; + } + + @Override + public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side) { + return true; + } +} \ No newline at end of file diff --git a/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/EnergyStorageCore.java b/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/EnergyStorageCore.java index 59d45cb3..e7f040d2 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/EnergyStorageCore.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/EnergyStorageCore.java @@ -48,6 +48,16 @@ public class EnergyStorageCore extends BlockDE implements IHudDisplayBlock{ blockIcon = iconRegister.registerIcon(References.RESOURCESPREFIX + "energy_storage_core"); } + @Override + public boolean isOpaqueCube() { + return false; + } + + @Override + public boolean renderAsNormalBlock() { + return false; + } + @Override public boolean hasTileEntity(int metadata) { return true; diff --git a/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/InvisibleMultiblock.java b/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/InvisibleMultiblock.java index 7b7e33b3..4b8a6111 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/InvisibleMultiblock.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/blocks/multiblock/InvisibleMultiblock.java @@ -1,5 +1,7 @@ package com.brandon3055.draconicevolution.common.blocks.multiblock; +import com.brandon3055.brandonscore.common.utills.InfoHelper; +import com.brandon3055.brandonscore.common.utills.Utills; import com.brandon3055.draconicevolution.common.ModBlocks; import com.brandon3055.draconicevolution.common.blocks.BlockDE; import com.brandon3055.draconicevolution.common.lib.References; @@ -8,9 +10,7 @@ import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.Til import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileEnergyStorageCore; import com.brandon3055.draconicevolution.common.tileentities.multiblocktiles.TileInvisibleMultiblock; import com.brandon3055.draconicevolution.common.utills.IHudDisplayBlock; -import com.brandon3055.brandonscore.common.utills.InfoHelper; import com.brandon3055.draconicevolution.common.utills.LogHelper; -import com.brandon3055.brandonscore.common.utills.Utills; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; diff --git a/src/main/java/com/brandon3055/draconicevolution/common/container/ContainerDataSync.java b/src/main/java/com/brandon3055/draconicevolution/common/container/ContainerDataSync.java index 35f92c00..10537de2 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/container/ContainerDataSync.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/container/ContainerDataSync.java @@ -15,6 +15,8 @@ import net.minecraft.inventory.Container; /**This class is for syncing values to bug for ICrafting*/ public abstract class ContainerDataSync extends Container { + //TODO WTF? Was i sleep coding when i wrote this? In 1.8 re write this as a common container class for all mod containers and use a dedicated sender/receiver method for each data type i want to send (Unless i think of something better between now and then) + /** * Sends two ints to the client-side Container. Normally the first int identifies which variable to update, and the second contains the new * value. diff --git a/src/main/java/com/brandon3055/draconicevolution/common/container/ContainerUpgradeModifier.java b/src/main/java/com/brandon3055/draconicevolution/common/container/ContainerUpgradeModifier.java new file mode 100644 index 00000000..16d0c46e --- /dev/null +++ b/src/main/java/com/brandon3055/draconicevolution/common/container/ContainerUpgradeModifier.java @@ -0,0 +1,165 @@ +package com.brandon3055.draconicevolution.common.container; + +import com.brandon3055.draconicevolution.common.ModItems; +import com.brandon3055.draconicevolution.common.tileentities.TileUpgradeModifier; +import com.brandon3055.draconicevolution.common.utills.IUpgradableItem; +import com.brandon3055.draconicevolution.common.utills.IUpgradableItem.EnumUpgrade; +import net.minecraft.entity.item.EntityItem; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.InventoryPlayer; +import net.minecraft.inventory.ICrafting; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Slot; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class ContainerUpgradeModifier extends ContainerDataSync +{ + private static final Item[] CORES_INDEX = {ModItems.draconicCore, ModItems.wyvernCore, ModItems.awakenedCore, ModItems.chaoticCore}; + private TileUpgradeModifier tile; + private EntityPlayer player; + private boolean slotsActive = true; + + public ContainerUpgradeModifier(InventoryPlayer invPlayer, TileUpgradeModifier tile) { + this.tile = tile; + this.player = invPlayer.player; + + for (int x = 0; x < 9; x++) { + addSlotToContainer(new Slot(invPlayer, x, 8 + 18 * x, 167)); + } + + for (int y = 0; y < 3; y++) { + for (int x = 0; x < 9; x++) { + addSlotToContainer(new Slot(invPlayer, x + y * 9 + 9, 8 + 18 * x, 111 + y * 18)); + } + } + + addSlotToContainer(new SlotUpgradable(tile, 0, 80, 48)); + + } + + @Override + public void detectAndSendChanges() { + super.detectAndSendChanges(); + for (int i = 0; i < this.crafters.size(); ++i) + { + ICrafting icrafting = (ICrafting)this.crafters.get(i); + icrafting.sendProgressBarUpdate(this, 0, 0); + } + updateSlotState(); + } + + @Override + public void updateProgressBar(int index, int value) { + super.updateProgressBar(index, value); + if (index == 0) updateSlotState(); + } + + private void updateSlotState(){ + if (tile.getStackInSlot(0) != null && slotsActive) { + for (Object o : inventorySlots) { + if (o instanceof Slot && !(o instanceof SlotUpgradable)) ((Slot)o).xDisplayPosition += 1000; + } + slotsActive = false; + } + else if (tile.getStackInSlot(0) == null && !slotsActive) { + for (Object o : inventorySlots) { + if (o instanceof Slot && !(o instanceof SlotUpgradable)) ((Slot)o).xDisplayPosition -= 1000; + } + slotsActive = true; + } + } + + @Override + public boolean canInteractWith(EntityPlayer player) + { + return tile.isUseableByPlayer(player); + } + + @Override + public ItemStack transferStackInSlot(EntityPlayer player, int i) + { +// Slot slot = getSlot(i); +// +// if (slot != null && slot.getHasStack()) +// { +// ItemStack stack = slot.getStack(); +// ItemStack result = stack.copy(); +// +// if (i >= 36){ +// if (!mergeItemStack(stack, 0, 36, false)){ +// return null; +// } +// }else if (!isStackValidForInventory(stack, 0) || !mergeItemStack(stack, 36, 36 + tile.getSizeInventory(), false)){ +// return null; +// } +// +// if (stack.stackSize == 0) { +// slot.putStack(null); +// }else{ +// slot.onSlotChanged(); +// } +// +// slot.onPickupFromSlot(player, stack); +// +// return result; +// } + + return null; + } + + private boolean isStackValidForInventory(ItemStack stack, int slot){ + return true; + } + + + @Override + public void receiveSyncData(int index, int value) { + EnumUpgrade upgrade = EnumUpgrade.getUpgradeByIndex(index); + int coreTier = value/2; + boolean addCore = value % 2 == 0; + ItemStack stack = tile.getStackInSlot(0); + if (upgrade == null || stack == null || !(stack.getItem() instanceof IUpgradableItem) || coreTier < 0 || coreTier > 3 || (upgrade.getCoresApplied(stack)[coreTier] <= 0 && !addCore)) return; + handleCoreTransaction(upgrade, coreTier, addCore, (IUpgradableItem)stack.getItem(), stack); + } + + + private void handleCoreTransaction(EnumUpgrade upgrade, int coreTier, boolean addCoreElseRemove, IUpgradableItem upgradableItem, ItemStack stack) { + int coreSlots = upgradableItem.getUpgradeCap(); + int totalCores = 0; + int[] coresApplied = upgrade.getCoresApplied(stack); + for (EnumUpgrade u : upgradableItem.getUpgrades()) totalCores += u.getCoresApplied(stack)[coreTier]; + + if (addCoreElseRemove) + { + if (!player.inventory.hasItem(CORES_INDEX[coreTier]) || totalCores >= coreSlots) return; + coresApplied[coreTier]++; + player.inventory.consumeInventoryItem(CORES_INDEX[coreTier]); + upgrade.setCoresApplied(stack, coresApplied); + } + else + { + if (coresApplied[coreTier] <= 0) return; + coresApplied[coreTier]--; + upgrade.setCoresApplied(stack, coresApplied); + if (!player.inventory.addItemStackToInventory(new ItemStack(CORES_INDEX[coreTier]))) { + EntityItem entityItem = new EntityItem(player.worldObj, player.posX, player.posY, player.posZ, new ItemStack(CORES_INDEX[coreTier])); + if (!player.worldObj.isRemote) player.worldObj.spawnEntityInWorld(entityItem); + } + } + } + + public static class SlotUpgradable extends Slot { + + public SlotUpgradable(IInventory inventory1, int slot, int x, int y) { + super(inventory1, slot, x, y); + } + + @Override + public boolean isItemValid(ItemStack stack) { + return stack != null && stack.getItem() instanceof IUpgradableItem; + } + } +} + + diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/Nugget.java b/src/main/java/com/brandon3055/draconicevolution/common/items/Nugget.java index 4cf5cfc0..a955cac6 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/Nugget.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/Nugget.java @@ -1,5 +1,6 @@ package com.brandon3055.draconicevolution.common.items; +import com.brandon3055.draconicevolution.DraconicEvolution; import com.brandon3055.draconicevolution.common.ModItems; import com.brandon3055.draconicevolution.common.lib.References; import net.minecraft.client.renderer.texture.IIconRegister; @@ -20,6 +21,7 @@ public class Nugget extends ItemDE { public Nugget() { this.setUnlocalizedName("nugget"); this.setHasSubtypes(true); + this.setCreativeTab(DraconicEvolution.tabBlocksItems); ModItems.register(this); } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/Tclogo.java b/src/main/java/com/brandon3055/draconicevolution/common/items/Tclogo.java index 855ecf59..6c6bbddf 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/Tclogo.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/Tclogo.java @@ -17,6 +17,8 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; +import java.io.File; +import java.io.FileWriter; import java.util.List; public class Tclogo extends ItemDE { @@ -142,6 +144,19 @@ public class Tclogo extends ItemDE { LogHelper.info("45622".hashCode()); + File file = new File("C:/Users/Brandon/Desktop/0to"+String.valueOf(Integer.MAX_VALUE)+".txt"); + + try { + FileWriter writer = new FileWriter(file); + for (int i = 0; i < Integer.MAX_VALUE; i++) writer.write(i+","); + writer.close(); + LogHelper.info("Done"); + } + catch (Exception e) { + e.printStackTrace(); + } + + int xCoord = 0; int yCoord = 0; int zCoord = 0; diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/armor/DraconicArmor.java b/src/main/java/com/brandon3055/draconicevolution/common/items/armor/DraconicArmor.java index 0381ff12..0a1018b7 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/armor/DraconicArmor.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/armor/DraconicArmor.java @@ -187,7 +187,7 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IEnergyCo if (stack.getItem() == ModItems.draconicHelm) { if (world.isRemote) return; if (this.getEnergyStored(stack) >= 5000 && clearNegativeEffects(player)) this.extractEnergy(stack, 5000, false); - if (player.worldObj.getBlockLightValue((int)Math.floor(player.posX), (int) player.posY, (int)Math.floor(player.posZ)) < 5 && ItemNBTHelper.getBoolean(stack, "ArmorNVActive", false)) + if (player.worldObj.getBlockLightValue((int)Math.floor(player.posX), (int) player.posY + 1, (int)Math.floor(player.posZ)) < 5 && ItemNBTHelper.getBoolean(stack, "ArmorNVActive", false)) { player.addPotionEffect(new PotionEffect(16, 419, 0, true)); } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicAxe.java b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicAxe.java index 174d0318..e7abc0c3 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicAxe.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicAxe.java @@ -69,6 +69,16 @@ public class DraconicAxe extends MiningTool implements IInventoryTool, IRenderTw return super.onBlockStartBreak(stack, x, y, z, player); } + @Override + public int getUpgradeCap() { + return References.MAX_DRACONIC_UPGRADES; + } + + @Override + public int getMaxTier() { + return 2; + } + // @Override // public boolean onBlockStartBreak(ItemStack stack, int X, int Y, int Z, EntityPlayer player) { // World world = player.worldObj; diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicDistructionStaff.java b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicDistructionStaff.java index 88901736..381e4e31 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicDistructionStaff.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicDistructionStaff.java @@ -1,5 +1,6 @@ package com.brandon3055.draconicevolution.common.items.tools; +import com.brandon3055.brandonscore.common.utills.ItemNBTHelper; import com.brandon3055.draconicevolution.client.render.IRenderTweak; import com.brandon3055.draconicevolution.common.ModItems; import com.brandon3055.draconicevolution.common.items.tools.baseclasses.MiningTool; @@ -8,7 +9,6 @@ import com.brandon3055.draconicevolution.common.lib.References; import com.brandon3055.draconicevolution.common.lib.Strings; import com.brandon3055.draconicevolution.common.utills.IInventoryTool; import com.brandon3055.draconicevolution.common.utills.ItemConfigField; -import com.brandon3055.brandonscore.common.utills.ItemNBTHelper; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.Block; @@ -115,4 +115,23 @@ public class DraconicDistructionStaff extends MiningTool implements IInventoryTo GL11.glTranslated(0, 0.4, 0); } } + + @Override + public int getUpgradeCap() { + return References.MAX_STAFF_UPGRADES; + } + + @Override + public int getMaxTier() { + return 3; + } + + @Override + public List getUpgrades() { + List list = super.getUpgrades(); + list.add(EnumUpgrade.ATTACK_AOE); + list.add(EnumUpgrade.ATTACK_DAMAGE); + + return list; + } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicHoe.java b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicHoe.java index 14899820..dff2b7b6 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicHoe.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicHoe.java @@ -9,6 +9,7 @@ import com.brandon3055.draconicevolution.common.lib.References; import com.brandon3055.draconicevolution.common.lib.Strings; import com.brandon3055.brandonscore.common.utills.InfoHelper; import com.brandon3055.brandonscore.common.utills.ItemNBTHelper; +import com.brandon3055.draconicevolution.common.utills.IUpgradableItem; import cpw.mods.fml.common.eventhandler.Event.Result; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; @@ -31,9 +32,10 @@ import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.entity.player.UseHoeEvent; import org.lwjgl.opengl.GL11; +import java.util.ArrayList; import java.util.List; -public class DraconicHoe extends ItemHoe implements IEnergyContainerItem, IRenderTweak { +public class DraconicHoe extends ItemHoe implements IEnergyContainerItem, IRenderTweak, IUpgradableItem { protected int capacity = References.DRACONICCAPACITY; protected int maxReceive = References.DRACONICTRANSFER; @@ -254,4 +256,20 @@ public class DraconicHoe extends ItemHoe implements IEnergyContainerItem, IRende GL11.glTranslated(0.35, -0.4, -1); } } + + + @Override + public List getUpgrades() { + return new ArrayList(){{add(EnumUpgrade.RF_CAPACITY); add(EnumUpgrade.DIG_AOE);}}; + } + + @Override + public int getUpgradeCap() { + return References.MAX_DRACONIC_UPGRADES; + } + + @Override + public int getMaxTier() { + return 2; + } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicPickaxe.java b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicPickaxe.java index c13499de..588112f2 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicPickaxe.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicPickaxe.java @@ -73,6 +73,15 @@ public class DraconicPickaxe extends MiningTool implements IInventoryTool, IRend } } + @Override + public int getUpgradeCap() { + return References.MAX_DRACONIC_UPGRADES; + } + + @Override + public int getMaxTier() { + return 2; + } // @Override // public boolean isItemTool(ItemStack p_77616_1_) { diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicShovel.java b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicShovel.java index 7ef67677..103e3706 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicShovel.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/DraconicShovel.java @@ -80,6 +80,15 @@ public class DraconicShovel extends MiningTool implements IInventoryTool, IRende } } + @Override + public int getUpgradeCap() { + return References.MAX_DRACONIC_UPGRADES; + } + + @Override + public int getMaxTier() { + return 2; + } // @Override // public boolean isItemTool(ItemStack p_77616_1_) { diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/WyvernPickaxe.java b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/WyvernPickaxe.java index cc5c4d72..dcdfc61f 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/WyvernPickaxe.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/WyvernPickaxe.java @@ -72,7 +72,15 @@ public class WyvernPickaxe extends MiningTool implements IInventoryTool, IRender } } + @Override + public int getUpgradeCap() { + return References.MAX_WYVERN_UPGRADES; + } + @Override + public int getMaxTier() { + return 1; + } // @Override // public boolean isItemTool(ItemStack p_77616_1_) { diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/WyvernShovel.java b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/WyvernShovel.java index 35e3e279..8d6518eb 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/WyvernShovel.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/WyvernShovel.java @@ -74,6 +74,15 @@ public class WyvernShovel extends MiningTool implements IInventoryTool, IRenderT } } + @Override + public int getUpgradeCap() { + return References.MAX_WYVERN_UPGRADES; + } + + @Override + public int getMaxTier() { + return 1; + } // @Override diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/baseclasses/MiningTool.java b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/baseclasses/MiningTool.java index 958c2eeb..dd16f4ff 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/baseclasses/MiningTool.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/baseclasses/MiningTool.java @@ -1,8 +1,9 @@ package com.brandon3055.draconicevolution.common.items.tools.baseclasses; +import com.brandon3055.brandonscore.common.utills.ItemNBTHelper; import com.brandon3055.draconicevolution.common.handler.ConfigHandler; import com.brandon3055.draconicevolution.common.lib.References; -import com.brandon3055.brandonscore.common.utills.ItemNBTHelper; +import com.brandon3055.draconicevolution.common.utills.IUpgradableItem; import net.minecraft.block.Block; import net.minecraft.block.material.MaterialLiquid; import net.minecraft.client.Minecraft; @@ -24,6 +25,7 @@ import net.minecraft.world.World; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.event.world.BlockEvent; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -31,7 +33,7 @@ import java.util.Map; /** * Created by Brandon on 2/01/2015. */ -public abstract class MiningTool extends ToolBase {//todo add custom information to sub classes, Update documentation and add doc for hud +public abstract class MiningTool extends ToolBase implements IUpgradableItem {//todo add custom information to sub classes, Update documentation and add doc for hud public MiningTool(ToolMaterial material) { @@ -275,6 +277,16 @@ public abstract class MiningTool extends ToolBase {//todo add custom information Minecraft.getMinecraft().getNetHandler().addToSendQueue(new C07PacketPlayerDigging(2, x,y,z, Minecraft.getMinecraft().objectMouseOver.sideHit)); } } + + @Override + public List getUpgrades() { + return new ArrayList(){{ + add(EnumUpgrade.DIG_SPEED); + add(EnumUpgrade.DIG_AOE); + add(EnumUpgrade.DIG_DEPTH); + add(EnumUpgrade.RF_CAPACITY); + }}; + } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/baseclasses/ToolHandler.java b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/baseclasses/ToolHandler.java index d39bee44..1347fb20 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/tools/baseclasses/ToolHandler.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/tools/baseclasses/ToolHandler.java @@ -143,6 +143,11 @@ public class ToolHandler { public static void damageEntityBasedOnHealth(Entity entity, EntityPlayer player, float dmgMult) { ItemStack stack = player.getCurrentEquippedItem(); + if (stack == null || !(stack.getItem() instanceof IEnergyContainerItem)){ + LogHelper.error("[ToolHandler.java:147] WTF? I don't get it... Player "+player.getCommandSenderName()+" whacked something with a DE weapon but that they are not holding? Ok someone is messing with my shit..."); + return; + } + float baseAttack = getDamageAgainstEntity(stack, entity); if (entity instanceof EntityLivingBase) diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/DraconicBow.java b/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/DraconicBow.java index 0e49c739..b5704f7c 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/DraconicBow.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/DraconicBow.java @@ -8,6 +8,7 @@ import com.brandon3055.draconicevolution.common.entity.EntityPersistentItem; import com.brandon3055.draconicevolution.common.lib.References; import com.brandon3055.draconicevolution.common.lib.Strings; import com.brandon3055.draconicevolution.common.utills.IInventoryTool; +import com.brandon3055.draconicevolution.common.utills.IUpgradableItem; import com.brandon3055.draconicevolution.common.utills.ItemConfigField; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; @@ -31,7 +32,7 @@ import net.minecraftforge.event.entity.player.ArrowNockEvent; import java.util.ArrayList; import java.util.List; -public class DraconicBow extends ItemBow implements IInventoryTool +public class DraconicBow extends ItemBow implements IInventoryTool, IUpgradableItem { public static final String[] bowPullIconNameArray = new String[] { "pulling_0", "pulling_1", "pulling_2" }; @SideOnly(Side.CLIENT) @@ -242,4 +243,24 @@ public class DraconicBow extends ItemBow implements IInventoryTool public List getFields(ItemStack stack, int slot) { return new ArrayList(); } + + @Override + public List getUpgrades() { + return new ArrayList(){{ + add(EnumUpgrade.DRAW_SPEED); + add(EnumUpgrade.ARROW_SPEED); + add(EnumUpgrade.ARROW_DAMAGE); + add(EnumUpgrade.RF_CAPACITY); + }}; + } + + @Override + public int getUpgradeCap() { + return References.MAX_DRACONIC_UPGRADES; + } + + @Override + public int getMaxTier() { + return 2; + } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/DraconicSword.java b/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/DraconicSword.java index 33e27dca..3bc8744b 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/DraconicSword.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/DraconicSword.java @@ -10,6 +10,7 @@ import com.brandon3055.draconicevolution.common.lib.References; import com.brandon3055.draconicevolution.common.lib.Strings; import com.brandon3055.draconicevolution.common.utills.IInventoryTool; import com.brandon3055.brandonscore.common.utills.InfoHelper; +import com.brandon3055.draconicevolution.common.utills.IUpgradableItem; import com.brandon3055.draconicevolution.common.utills.ItemConfigField; import com.brandon3055.brandonscore.common.utills.ItemNBTHelper; import com.google.common.collect.Multimap; @@ -36,7 +37,7 @@ import org.lwjgl.opengl.GL11; import java.util.ArrayList; import java.util.List; -public class DraconicSword extends ItemSword implements IEnergyContainerItem, IInventoryTool, IRenderTweak { +public class DraconicSword extends ItemSword implements IEnergyContainerItem, IInventoryTool, IRenderTweak, IUpgradableItem { protected int capacity = References.DRACONICCAPACITY; protected int maxReceive = References.DRACONICTRANSFER; protected int maxExtract = References.DRACONICTRANSFER * 50; @@ -220,4 +221,23 @@ public class DraconicSword extends ItemSword implements IEnergyContainerItem, II GL11.glTranslated(-0.8, 0, 0); } } + + @Override + public List getUpgrades() { + return new ArrayList(){{ + add(EnumUpgrade.RF_CAPACITY); + add(EnumUpgrade.ATTACK_AOE); + add(EnumUpgrade.ATTACK_DAMAGE); + }}; + } + + @Override + public int getUpgradeCap() { + return References.MAX_DRACONIC_UPGRADES; + } + + @Override + public int getMaxTier() { + return 2; + } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/WyvernBow.java b/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/WyvernBow.java index df16f457..33bf0ea3 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/WyvernBow.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/WyvernBow.java @@ -8,6 +8,7 @@ import com.brandon3055.draconicevolution.common.entity.EntityPersistentItem; import com.brandon3055.draconicevolution.common.lib.References; import com.brandon3055.draconicevolution.common.lib.Strings; import com.brandon3055.draconicevolution.common.utills.IInventoryTool; +import com.brandon3055.draconicevolution.common.utills.IUpgradableItem; import com.brandon3055.draconicevolution.common.utills.ItemConfigField; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.relauncher.Side; @@ -31,7 +32,7 @@ import net.minecraftforge.event.entity.player.ArrowNockEvent; import java.util.ArrayList; import java.util.List; -public class WyvernBow extends ItemBow implements IInventoryTool { +public class WyvernBow extends ItemBow implements IInventoryTool, IUpgradableItem { public static final String[] bowPullIconNameArray = new String[] { "pulling_0", "pulling_1", "pulling_2" }; @SideOnly(Side.CLIENT) @@ -209,5 +210,24 @@ public class WyvernBow extends ItemBow implements IInventoryTool { return new ArrayList(); } + @Override + public List getUpgrades() { + return new ArrayList(){{ + add(EnumUpgrade.DRAW_SPEED); + add(EnumUpgrade.ARROW_SPEED); + add(EnumUpgrade.ARROW_DAMAGE); + add(EnumUpgrade.RF_CAPACITY); + }}; + } + + @Override + public int getUpgradeCap() { + return References.MAX_WYVERN_UPGRADES; + } + + @Override + public int getMaxTier() { + return 1; + } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/WyvernSword.java b/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/WyvernSword.java index b5e36e4b..c1341b5d 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/WyvernSword.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/items/weapons/WyvernSword.java @@ -11,6 +11,7 @@ import com.brandon3055.draconicevolution.common.items.tools.baseclasses.ToolHand import com.brandon3055.draconicevolution.common.lib.References; import com.brandon3055.draconicevolution.common.lib.Strings; import com.brandon3055.draconicevolution.common.utills.IInventoryTool; +import com.brandon3055.draconicevolution.common.utills.IUpgradableItem; import com.brandon3055.draconicevolution.common.utills.ItemConfigField; import com.google.common.collect.Multimap; import cpw.mods.fml.common.registry.GameRegistry; @@ -37,7 +38,7 @@ import org.lwjgl.opengl.GL11; import java.util.ArrayList; import java.util.List; -public class WyvernSword extends ItemSword implements IEnergyContainerItem, IInventoryTool, IRenderTweak { +public class WyvernSword extends ItemSword implements IEnergyContainerItem, IInventoryTool, IRenderTweak, IUpgradableItem{ protected int capacity = References.WYVERNCAPACITY; protected int maxReceive = References.WYVERNTRANSFER; @@ -227,5 +228,24 @@ public class WyvernSword extends ItemSword implements IEnergyContainerItem, IInv GL11.glTranslated(0.2, 0, -0.8); } } + + @Override + public List getUpgrades() { + return new ArrayList(){{ + add(EnumUpgrade.RF_CAPACITY); + add(EnumUpgrade.ATTACK_AOE); + add(EnumUpgrade.ATTACK_DAMAGE); + }}; + } + + @Override + public int getUpgradeCap() { + return References.MAX_WYVERN_UPGRADES; + } + + @Override + public int getMaxTier() { + return 1; + } } diff --git a/src/main/java/com/brandon3055/draconicevolution/common/lib/References.java b/src/main/java/com/brandon3055/draconicevolution/common/lib/References.java index e4af011c..8f6ae7c3 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/lib/References.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/lib/References.java @@ -19,6 +19,10 @@ public final class References { public static final int ENERGYPERBLOCK = 80; public static final int ENERGYPERATTACK = 250; + public static final int MAX_WYVERN_UPGRADES = 3; + public static final int MAX_DRACONIC_UPGRADES = 6; + public static final int MAX_STAFF_UPGRADES = 12; + //======================Render IDs========================// public static int idTeleporterStand = -1; public static int idPortal = -1; diff --git a/src/main/java/com/brandon3055/draconicevolution/common/lib/VersionHandler.java b/src/main/java/com/brandon3055/draconicevolution/common/lib/VersionHandler.java index 9230131a..7a1f0abc 100644 --- a/src/main/java/com/brandon3055/draconicevolution/common/lib/VersionHandler.java +++ b/src/main/java/com/brandon3055/draconicevolution/common/lib/VersionHandler.java @@ -11,3 +11,5 @@ public class VersionHandler public static final String FULL_VERSION = VERSION + (SNAPSHOT > 0 ? "-snapshot_" + SNAPSHOT : ""); } + + diff --git a/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TileUpgradeModifier.java b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TileUpgradeModifier.java new file mode 100644 index 00000000..361c9de0 --- /dev/null +++ b/src/main/java/com/brandon3055/draconicevolution/common/tileentities/TileUpgradeModifier.java @@ -0,0 +1,163 @@ +package com.brandon3055.draconicevolution.common.tileentities; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.inventory.ISidedInventory; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; +import net.minecraft.network.play.server.S35PacketUpdateTileEntity; +import net.minecraft.tileentity.TileEntity; + +/** + * Created by brandon3055 on 23/12/2015. + */ +public class TileUpgradeModifier extends TileEntity implements ISidedInventory { + ItemStack[] items = new ItemStack[1]; + + //==============================================LOGIC=======================================================// + + @Override + public void updateEntity() { + + } + + + //==========================================SYNCHRONIZATION==================================================// + + @Override + public Packet getDescriptionPacket() { + NBTTagCompound tagCompound = new NBTTagCompound(); + this.writeToNBT(tagCompound); + return new S35PacketUpdateTileEntity(this.xCoord, this.yCoord, this.zCoord, 1, tagCompound); + } + + @Override + public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) { + readFromNBT(pkt.func_148857_g()); + } + + //==============================================INVENTORY====================================================// + + @Override + public int getSizeInventory() { + return items.length; + } + + @Override + public ItemStack getStackInSlot(int i) { + return items[i]; + } + + @Override + public ItemStack decrStackSize(int i, int count) { + ItemStack itemstack = getStackInSlot(i); + + if (itemstack != null) { + if (itemstack.stackSize <= count) { + setInventorySlotContents(i, null); + } else { + itemstack = itemstack.splitStack(count); + if (itemstack.stackSize == 0) { + setInventorySlotContents(i, null); + } + } + } + return itemstack; + } + + @Override + public ItemStack getStackInSlotOnClosing(int i) { + ItemStack item = getStackInSlot(i); + if (item != null) setInventorySlotContents(i, null); + return item; + } + + @Override + public void setInventorySlotContents(int i, ItemStack itemstack) { + items[i] = itemstack; + if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) { + itemstack.stackSize = getInventoryStackLimit(); + } + } + + @Override + public String getInventoryName() { + return ""; + } + + @Override + public boolean hasCustomInventoryName() { + return false; + } + + @Override + public int getInventoryStackLimit() { + return 64; + } + + @Override + public boolean isUseableByPlayer(EntityPlayer player) { + return player.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.4) < 64; + } + + @Override + public void openInventory() {} + + @Override + public void closeInventory() {} + + @Override + public boolean isItemValidForSlot(int i, ItemStack itemstack) { + return true; + } + + @Override + public int[] getAccessibleSlotsFromSide(int var1) { + return new int[] {0}; + } + + @Override + public boolean canInsertItem(int slot, ItemStack item, int side) { + return true; + } + + @Override + public boolean canExtractItem(int slot, ItemStack item, int side) { + return true; + } + + //===========================================================================================================// + + @Override + public void writeToNBT(NBTTagCompound compound) + { + NBTTagCompound[] tag = new NBTTagCompound[items.length]; + + for (int i = 0; i < items.length; i++) + { + tag[i] = new NBTTagCompound(); + + if (items[i] != null) + { + tag[i] = items[i].writeToNBT(tag[i]); + } + + compound.setTag("Item" + i, tag[i]); + } + super.writeToNBT(compound); + } + + @Override + public void readFromNBT(NBTTagCompound compound) + { + NBTTagCompound[] tag = new NBTTagCompound[items.length]; + + for (int i = 0; i < items.length; i++) + { + tag[i] = compound.getCompoundTag("Item" + i); + items[i] = ItemStack.loadItemStackFromNBT(tag[i]); + } + super.readFromNBT(compound); + } +} \ No newline at end of file diff --git a/src/main/java/com/brandon3055/draconicevolution/common/utills/IUpgradableItem.java b/src/main/java/com/brandon3055/draconicevolution/common/utills/IUpgradableItem.java new file mode 100644 index 00000000..c922e72a --- /dev/null +++ b/src/main/java/com/brandon3055/draconicevolution/common/utills/IUpgradableItem.java @@ -0,0 +1,91 @@ +package com.brandon3055.draconicevolution.common.utills; + +import com.brandon3055.brandonscore.common.utills.ItemNBTHelper; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.util.StatCollector; + +import java.util.List; + +/** + * Created by brandon3055 on 23/12/2015. + */ +public interface IUpgradableItem { + + /**@return a list of upgrades for this item.*/ + public List getUpgrades(); + + /**@return the maximum number of upgrades for this item*/ + public int getUpgradeCap(); + + /**@return the max upgrade tier allowed for this item + * 0 = Draconic Core + * 1 = Wyvern Core + * 2 = Awakened Core + * 3 = Chaotic Core*/ + public int getMaxTier(); + + public static enum EnumUpgrade { + RF_CAPACITY(0, "RFCapacity"), + DIG_SPEED(1, "DigSpeed"), + DIG_AOE(2, "DigAOE"), + DIG_DEPTH(3, "DigDepth"), + ATTACK_DAMAGE(4, "AttackDamage"), + ATTACK_AOE(5, "AttackAOE"), + ARROW_DAMAGE(6, "ArrowDamage"), + DRAW_SPEED(7, "DrawSpeed"), + ARROW_SPEED(8, "ArrowSpeed"), + SHIELD_CAPACITY(9, "ShieldCapacity"), + SHIELD_RECOVERY(10, "ShieldRecovery"), + MOVE_SPEED(11, "MoveSpeed"), + JUMP_BOOST(12, "JumpBoost"); + + public int index; + public String name; + private final String COMPOUND_NAME = "Upgrades"; + + private EnumUpgrade(int index, String name) { + this.index = index; + this.name = name; + } + + /**Get the number of cores applied to this upgrade + * @return an int[4] containing the number of cores that have been applied + * in order from index 0 which is the number od draconic cores to index 3 which is the number of chaotic cores + * with wyvern and awakened in between*/ + public int[] getCoresApplied(ItemStack stack){ + if (stack == null) return new int[] {0, 0, 0, 0}; + NBTTagCompound compound = ItemNBTHelper.getCompound(stack); + if (!compound.hasKey(COMPOUND_NAME)) return new int[] {0, 0, 0, 0}; + NBTTagCompound upgrades = compound.getCompoundTag(COMPOUND_NAME); + if (upgrades.hasKey(name) && upgrades.getIntArray(name).length == 4) return upgrades.getIntArray(name); + return new int[] {0, 0, 0, 0}; + } + + /**Sets the number of each core type applied + * takes an ItemStack and an int[4]*/ + public void setCoresApplied(ItemStack stack, int[] cores){ + if (cores.length != 4){ + LogHelper.error("[EnumUpgrade] Error applying upgrades to stack."); + return; + } + + NBTTagCompound compound = ItemNBTHelper.getCompound(stack); + NBTTagCompound upgrades; + if (compound.hasKey(COMPOUND_NAME)) upgrades = compound.getCompoundTag(COMPOUND_NAME); + else upgrades = new NBTTagCompound(); + upgrades.setIntArray(name, cores); + compound.setTag(COMPOUND_NAME, upgrades); + } + + public String getLocalizedName() { return StatCollector.translateToLocal("gui.de."+name+".txt"); } + + public static EnumUpgrade getUpgradeByIndex(int index) { + for (EnumUpgrade upgrade : EnumUpgrade.values()) { + if (upgrade.index == index) return upgrade; + } + return null; + } + + } +} diff --git a/src/main/resources/assets/draconicevolution/lang/en_US.lang b/src/main/resources/assets/draconicevolution/lang/en_US.lang index 5dbac38f..b5113a87 100644 --- a/src/main/resources/assets/draconicevolution/lang/en_US.lang +++ b/src/main/resources/assets/draconicevolution/lang/en_US.lang @@ -34,6 +34,7 @@ tile.draconicevolution:reactorCore.name=Draconic Reactor Core tile.draconicevolution:reactorStabilizer.name=Reactor Stabilizer tile.draconicevolution:reactorEnergyInjector.name=Reactor Energy Injector tile.draconicevolution:chaosCrystal.name=Chaos Crystal +tile.draconicevolution:upgradeModifier.name=Upgrade Modifier tile.draconicevolution:energyCrystal0.name=Energy Relay tile.draconicevolution:energyCrystal1.name=Advanced Energy Relay @@ -103,7 +104,8 @@ item.draconicevolution:chaosShard.name=Chaos Shard item.draconicevolution:chaosFragment0.name=Tiny Chaos Fragment item.draconicevolution:chaosFragment1.name=Small Chaos Fragment item.draconicevolution:chaosFragment2.name=Large Chaos Fragment - +item.draconicevolution:nugget.draconium.name=Draconium Nugget +item.draconicevolution:nugget.awakened.name=Awakened Draconium Nugget //Item Groups ---------------------------------------------------------------------------------------------------------------------------------------- @@ -147,6 +149,7 @@ msg.dislocatorNoGround.txt=Error world not found msg.range.txt=Range: msg.energyStorageCoreUTA.txt=Unable to activate (Invalid Configuration) msg.SpawnDragonToFarFrom00.txt=[ERROR] to far from 0,0 +msg.SpawnDragonMustBeInTheEnd.txt=You must perform this ritual in the End dimension! msg.wrongKey.txt=This key dose not fit this lock msg.cKeyStoneType0.txt=Permanent Activation (Consume Key) msg.cKeyStoneType1.txt=Button Activation @@ -388,7 +391,7 @@ item.draconicevolution:wyvernLeggs.lore=2You feel even stronger and faster now\n item.draconicevolution:wyvernBoots.lore=2You learn to improve the boots\nDraconium seems to have given you greater\nagility item.draconicevolution:draconicPickaxe.lore=2Great care and research has\nallowed you to mine even larger areas -item.draconicevolution:draconicAxe.lore=2After lot’s of trial and error\nyou can now feel an entire tree with one try +item.draconicevolution:draconicAxe.lore=2After lots of trial and error\nyou can now feel an entire tree with one try item.draconicevolution:draconicShovel.lore=2Even more efficient\nyou can dig an even larger area item.draconicevolution:draconicHoe.lore=2Draconium even improves farming\nentire areas can be tilled and placed in a single click item.draconicevolution:draconicSword.lore=2Wyvern was good, but draconic weapons\nare even more powerful and hit more enemies @@ -507,7 +510,26 @@ gui.de.reacCoreMass.txt=This show the total amount of mass within the reactor in gui.de.reacGenRate.txt=This is the current RF/t being generated by the reactor. gui.de.reacInputRate.txt=This is the exact RF/t input required to maintain the current field strength. As field strength increases this will increase exponentially. gui.de.reacConversionRate.txt=This is how fast the reactor is currently using fuel. As the reactor saturation increases this will go down. +gui.de.noCoresInInventory0.txt=You have no Draconic Cores in your inventory +gui.de.noCoresInInventory1.txt=You have no Wyvern Cores in your inventory +gui.de.noCoresInInventory2.txt=You have no Awakened Cores in your inventory +gui.de.noCoresInInventory3.txt=You have no Chaotic Cores in your inventory +gui.de.addCore.txt=Add Core +gui.de.removeCore.txt=Remove Core +gui.de.RFCapacity.txt=RF Capacity +gui.de.DigSpeed.txt=Dig Speed +gui.de.DigAOE.txt=Dig A.O.E +gui.de.DigDepth.txt=Dig Depth +gui.de.AttackDamage.txt=Attack Damage +gui.de.AttackAOE.txt=Attack A.O.E +gui.de.ArrowDamage.txt=Arrow Damage +gui.de.DrawSpeed.txt=Draw Speed +gui.de.ArrowSpeed.txt=Arrow Speed +gui.de.ShieldCapacity.txt=Shield Capacity +gui.de.ShieldRecovery.txt=Shield Recovery +gui.de.MoveSpeed.txt=Move Speed +gui.de.JumpBoost.txt=Jump Boost //Potions ---------------------------------------------------------------------------------------------------------------------------------------- potion.de.effect.txt=Effect diff --git a/src/main/resources/assets/draconicevolution/textures/gui/UpgradeModifier.png b/src/main/resources/assets/draconicevolution/textures/gui/UpgradeModifier.png new file mode 100644 index 00000000..7bc4e975 Binary files /dev/null and b/src/main/resources/assets/draconicevolution/textures/gui/UpgradeModifier.png differ diff --git a/src/main/resources/assets/draconicevolution/textures/items/chaosCore.png b/src/main/resources/assets/draconicevolution/textures/items/chaosCore.png deleted file mode 100644 index eb787e8b..00000000 Binary files a/src/main/resources/assets/draconicevolution/textures/items/chaosCore.png and /dev/null differ