Skip to content

Commit

Permalink
slight adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
2piradians committed Sep 2, 2017
1 parent 1daeac9 commit 176b906
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 30 deletions.
2 changes: 1 addition & 1 deletion src/main/java/twopiradians/minewatch/common/Minewatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import twopiradians.minewatch.common.command.CommandMinewatch;
import twopiradians.minewatch.creativetab.MinewatchTab;

@Mod(modid = Minewatch.MODID, version = Minewatch.VERSION, name = Minewatch.MODNAME, guiFactory = "twopiradians.minewatch.client.gui.config.GuiFactory", updateJSON = "https://raw.githubusercontent.com/2piradians/Minewatch/1.11.2/update.json")
@Mod(modid = Minewatch.MODID, version = Minewatch.VERSION, name = Minewatch.MODNAME, guiFactory = "twopiradians.minewatch.client.gui.config.GuiFactory", updateJSON = "https://raw.githubusercontent.com/2piradians/Minewatch/1.12.2/update.json")
public class Minewatch
{
public static final String MODNAME = "Minewatch";
Expand Down
23 changes: 0 additions & 23 deletions src/main/java/twopiradians/minewatch/common/config/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ public static void syncConfig() {
if (durabilityWeaponsProp.getString().equals(DURABILITY_OPTIONS[i]))
Config.durabilityOptionWeapons = i;

Config.updateDurability();

for (EnumHero hero : EnumHero.values()) {
Property heroTextureProp = config.get(Config.CATEGORY_HERO_TEXTURES, hero.name+" Texture", hero.textureCredits[0], "Textures for "+hero.name+"'s armor", hero.textureCredits);
for (int i=0; i<hero.textureCredits.length; ++i)
Expand All @@ -82,25 +80,4 @@ public void onConfigChanged(final ConfigChangedEvent.OnConfigChangedEvent event)
config.save();
}
}

/**Update armor/weapon durabilities according to config options*/
public static void updateDurability() {
/*// update durabilities
for (EnumHero hero : EnumHero.values()) {
for (ItemMWArmor item : new ItemMWArmor[] {hero.helmet, hero.chestplate, hero.leggings, hero.boots}) {
if (item != null) {
if (Config.durabilityOptionArmors == 0 || Config.durabilityOptionArmors == 1)
item.setMaxDamage(item.getArmorMaterial().getDurability(item.armorType));
else if (Config.durabilityOptionArmors == 2)
item.setMaxDamage(0);
}
}
if (hero.weapon != null) {
if (Config.durabilityOptionWeapons == 0 || Config.durabilityOptionWeapons == 1)
hero.weapon.setMaxDamage(100);
else if (Config.durabilityOptionWeapons == 2)
hero.weapon.setMaxDamage(0);
}
}*/
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public static void renderOverlay(RenderGameOverlayEvent.Post event) {

double scale = 1d*Config.guiScale;
GlStateManager.scale(1*scale, 4*scale, 1);
GlStateManager.translate((int) (event.getResolution().getScaledWidth()/scale)-125+scale*20, ((int)event.getResolution().getScaledHeight()/scale/4)-18+scale*3, 0);
GlStateManager.translate((int) (event.getResolution().getScaledWidth()/scale)-125, ((int)event.getResolution().getScaledHeight()/scale/4)-18+scale*3, 0);
Minecraft.getMinecraft().getTextureManager().bindTexture(new ResourceLocation(Minewatch.MODID, "textures/gui/ability_overlay.png"));
int index = weapon.hero.playersUsingAlt.containsKey(player.getPersistentID()) && weapon.hero.playersUsingAlt.get(player.getPersistentID()) &&
weapon.hero.hasAltWeapon ? weapon.hero.altWeaponIndex : weapon.hero.overlayIndex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ public static void preInit () {

genji_shuriken_single = registerItem(new ItemGenjiShuriken(), "genji_shuriken_single", false, true);
((ItemGenjiShuriken)genji_shuriken_single).hero = EnumHero.GENJI;

Config.updateDurability();
}

private static Item registerItem(Item item, String unlocalizedName, boolean addToTab, boolean usesObjModel) {
Expand Down
4 changes: 3 additions & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Model Credits:
-Tracer Pistol Low poly | Tracer Overwatch Gun by Franz Perez is licensed under CC Attribution
-Hanzo Bow: Hanzo Bow by backer is licensed under CC Attribution
-Hanzo Arrow: Overwatch - Hanzo's Arrow by beyondmatter is licensed under CC Attribution
-McCree Pistol and Soldier Rifle by Rexx Art
-McCree Pistol, Soldier Rifle, Widowmaker Rifle, Bastion Recon and Turret by Rexx Art

Armor Texture Credits:
-Tracer, Genji, Hanzo, and Bastion textures: Ringoster, https://www.planetminecraft.com/member/ringoster/
Expand All @@ -27,6 +27,8 @@ Armor Texture Credits:
-Ana texture: Drzzter, https://www.planetminecraft.com/member/drzzter/
-McCree texture: PlantyBox, https://www.planetminecraft.com/member/plantybox/
-Mei texture: mareridt, https://www.planetminecraft.com/member/mareridt/
-Widowmaker texture: sir-connor, https://www.planetminecraft.com/member/sir-connor/

",
"logoFile": "logo.png",
"screenshots": [],
Expand Down
4 changes: 2 additions & 2 deletions update.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"homepage": "https://minecraft.curseforge.com/projects/minewatch/files",
"promos": {
"1.11.2-latest": "3.1",
"1.11.2-recommended": "3.1"
"1.11.2-latest": "3.2",
"1.11.2-recommended": "3.2"
}
}

0 comments on commit 176b906

Please sign in to comment.