diff --git a/.gitignore b/.gitignore index 560ff2f..ed72c4f 100644 --- a/.gitignore +++ b/.gitignore @@ -16,8 +16,11 @@ out # gradle build .gradle +logs # other eclipse run classes +.vscode/ +keystore.jks \ No newline at end of file diff --git a/build.gradle b/build.gradle index 3a171c0..c33338b 100644 --- a/build.gradle +++ b/build.gradle @@ -188,21 +188,25 @@ jar { } } + task signJar(type: SignJar, dependsOn: reobfJar) { if (canJarBeSigned()) { - keyStore = project.keyStore - alias = project.keyStoreAlias - storePass = project.keyStorePass - keyPass = project.keyStoreKeyPass + keyStore = project.findProperty("keyStore") + alias = project.findProperty("keyStoreAlias") + storePass = project.findProperty("keyStorePass") + keyPass = project.findProperty("keyStoreKeyPass") inputFile = jar.archivePath outputFile = jar.archivePath } } + + boolean canJarBeSigned() { return project.hasProperty('keyStore') } + artifacts { archives apiJar archives sourceJar @@ -212,5 +216,5 @@ artifacts { // Runs this task automatically when build is ran. build.dependsOn signJar -apply from: 'update_json.gradle' -build.finalizedBy updateJson \ No newline at end of file +//apply from: 'update_json.gradle' +//build.finalizedBy updateJson \ No newline at end of file diff --git a/changelog.json b/changelog.json index a4cc3c3..19821a3 100644 --- a/changelog.json +++ b/changelog.json @@ -1,8 +1,8 @@ { - "homepage": null, + "homepage": "https://github.com/Ladysnake/Gaspunk", "promos": { - "1.12.2-latest": "1.4.7", - "1.12.2-recommended": "1.4.7" + "1.12.2-latest": "1.4.8", + "1.12.2-recommended": "1.4.8" }, "1.12.2": { "1.4.1": "Now requires forge 1.12.2-14.23.3.2669 or later\nAdded a few API features\n- added a way for add-ons to bypass a gas' checks when running its effect\n- exposed a few classes\nAlso now packages Ladylib as a contained dependency instead of shading the code like a caveman", @@ -11,6 +11,7 @@ "1.4.4": "Removed an unlocalized tooltip line on candyfloss grenades and tubes.", "1.4.5": "Update the contained library", "1.4.6": "- Disabled candyfloss ore recipe when candyworld is not installed, fixes loading crash with Immersive Engineering\n- Gas loading errors are now more descriptive and don't crash. Check your logs if you make custom gases !", - "1.4.7": "- Fixed a startup crash on dedicated servers" + "1.4.7": "- Fixed a startup crash on dedicated servers", + "1.4.8": "- Edited the HREF for item skins\n- Added the ability to change the length gas clouds exist through configuration" } } \ No newline at end of file diff --git a/changelog.md b/changelog.md index 3fd80ac..21c5a58 100644 --- a/changelog.md +++ b/changelog.md @@ -1,20 +1,24 @@ -#####Version 1.12.2-1.4.7 - BUILT +##### Version 1.12.2-1.4.8 - BUILT +- Edited the HREF for item skins +- Added the ability to change the length gas clouds exist through configuration + +##### Version 1.12.2-1.4.7 - BUILT - Fixed a startup crash on dedicated servers -#####Version 1.12.2-1.4.6 - BUILT +##### Version 1.12.2-1.4.6 - BUILT - Disabled candyfloss ore recipe when candyworld is not installed, fixes loading crash with Immersive Engineering - Gas loading errors are now more descriptive and don't crash. Check your logs if you make custom gases ! -#####Version 1.12.2-1.4.5 - BUILT +##### Version 1.12.2-1.4.5 - BUILT Update the contained library -#####Version 1.12.2-1.4.4 - BUILT +##### Version 1.12.2-1.4.4 - BUILT Removed an unlocalized tooltip line on candyfloss grenades and tubes. -#####Version 1.12.2-1.4.3 - BUILT +##### Version 1.12.2-1.4.3 - BUILT Fix a crash when Need to Breathe is not installed -#####Version 1.12.2-1.4.2 - BUILT +##### Version 1.12.2-1.4.2 - BUILT Additions / Changes: - Candyfloss clouds now are a lot more nutritious ! They aren't as easily breathable though. @@ -26,7 +30,7 @@ Api changes: Also check out UpcraftLP's new add-on, Gaspunk Inhaler ! -#####Version 1.12.2-1.4.1 - BUILT +##### Version 1.12.2-1.4.1 - BUILT Now requires forge 1.12.2-14.23.3.2669 or later @@ -37,7 +41,7 @@ Added a few API features Also now packages Ladylib as a contained dependency instead of shading the code like a caveman -#####Version 1.12.2-1.4 - BUILT +##### Version 1.12.2-1.4 - BUILT Additions / changes : - Gas agents are now defined through json files diff --git a/gradle.properties b/gradle.properties index eb8b1f1..3d698ae 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ modGroup=ladysnake -modVersion=1.4.7 +modVersion=1.4.8 modBaseName=gaspunk mc_version=1.12.2 forgeVersion=1.12.2-14.23.4.2738 diff --git a/src/main/java/ladysnake/gaspunk/GasPunkConfig.java b/src/main/java/ladysnake/gaspunk/GasPunkConfig.java index 87cc4f9..6876592 100644 --- a/src/main/java/ladysnake/gaspunk/GasPunkConfig.java +++ b/src/main/java/ladysnake/gaspunk/GasPunkConfig.java @@ -2,10 +2,16 @@ import net.minecraftforge.common.config.Config; import net.minecraftforge.common.config.ConfigManager; +import net.minecraftforge.common.config.Config.RequiresMcRestart; import net.minecraftforge.fml.client.event.ConfigChangedEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +/** + * Main configuration section + * @author Pyrofab + * @author sschr15 (a bit) + */ @Config(modid = GasPunk.MOD_ID, name = GasPunk.MOD_ID + "/" + GasPunk.MOD_ID) @Mod.EventBusSubscriber(modid = GasPunk.MOD_ID) public class GasPunkConfig { @@ -16,6 +22,13 @@ public class GasPunkConfig { @Config.Comment("Makes ash require smelting nether wart instead of rotten flesh") public static boolean alternativeAshRecipe = false; + @Config.Comment({ + "Sets the lifespan in ticks for gas clouds.", + "The clouds themselves look like they take a bit longer to decay,", + "but the effects no longer happen after this amount." + }) + public static int gasLifespan = 600; + @Config.Comment({ "The items which ID's are added here will be considered as gas masks when breathing gas", "You can specify entire armor sets by separating items with \"&\" in a single entry. Using \"*\" instead of an item id will match anything.", diff --git a/src/main/java/ladysnake/gaspunk/item/ItemGrenade.java b/src/main/java/ladysnake/gaspunk/item/ItemGrenade.java index a4fd531..efb0096 100644 --- a/src/main/java/ladysnake/gaspunk/item/ItemGrenade.java +++ b/src/main/java/ladysnake/gaspunk/item/ItemGrenade.java @@ -2,6 +2,7 @@ import ladylib.misc.ItemUtil; import ladysnake.gaspunk.GasPunk; +import ladysnake.gaspunk.GasPunkConfig; import ladysnake.gaspunk.api.IGas; import ladysnake.gaspunk.api.customization.IHasSkin; import ladysnake.gaspunk.entity.EntityGasCloud; @@ -88,7 +89,8 @@ public EntityGasCloud explode(WorldServer worldIn, Vec3d pos, ItemStack stack) { worldIn.spawnParticle(EnumParticleTypes.SMOKE_LARGE, pos.x, pos.y, pos.z, 20, 0.5, 0.5, 0.5, 0.2); EntityGasCloud cloud = new EntityGasCloud(worldIn, getContainedGas(stack)); cloud.setPosition(pos.x, pos.y, pos.z); - cloud.setMaxLifespan(600); + int lifespan = GasPunkConfig.gasLifespan; + cloud.setMaxLifespan(lifespan); worldIn.spawnEntity(cloud); return cloud; } diff --git a/src/main/java/ladysnake/gaspunk/network/EventHandlerNetwork.java b/src/main/java/ladysnake/gaspunk/network/EventHandlerNetwork.java index 604863c..9b60f90 100644 --- a/src/main/java/ladysnake/gaspunk/network/EventHandlerNetwork.java +++ b/src/main/java/ladysnake/gaspunk/network/EventHandlerNetwork.java @@ -3,8 +3,6 @@ import ladysnake.gaspunk.GasPunk; import ladysnake.gaspunk.util.SpecialRewardChecker; import net.minecraft.client.Minecraft; -import net.minecraftforge.common.config.Config; -import net.minecraftforge.common.config.ConfigManager; import net.minecraftforge.fml.client.event.ConfigChangedEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; diff --git a/src/main/java/ladysnake/gaspunk/sickness/SicknessTearGas.java b/src/main/java/ladysnake/gaspunk/sickness/SicknessTearGas.java index c9d872a..567a9dd 100644 --- a/src/main/java/ladysnake/gaspunk/sickness/SicknessTearGas.java +++ b/src/main/java/ladysnake/gaspunk/sickness/SicknessTearGas.java @@ -27,30 +27,31 @@ public class SicknessTearGas extends SicknessGas { // private static final UUID TEAR_SLOWNESS_ID = UUID.fromString("6372ad90-c462-4223-8638-898c1166f824"); // private static final AttributeModifier TEAR_SLOWNESS = new AttributeModifier(TEAR_SLOWNESS_ID, "Tear gas slowness penalty", -0.1D, 2); -// + public SicknessTearGas() { super(0.001f); } -// -// @Override -// public boolean performEffect(EntityLivingBase carrier, SicknessEffect effect) { -// if (effect.getTicksSinceBeginning() == 0) { -// if (!carrier.world.isRemote) { -// IAttributeInstance attribute = carrier.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED); -// if (attribute.getModifier(TEAR_SLOWNESS_ID) == null) -// attribute.applyModifier(TEAR_SLOWNESS); -// return true; -// } -// } -// return super.performEffect(carrier, effect); -// } -// -// @Override -// public void onCured(SicknessEffect sicknessEffect, EntityLivingBase carrier) { -// if (!carrier.world.isRemote) { -// carrier.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).removeModifier(TEAR_SLOWNESS_ID); -// } -// } +/* + @Override + public boolean performEffect(EntityLivingBase carrier, SicknessEffect effect) { + if (effect.getTicksSinceBeginning() == 0) { + if (!carrier.world.isRemote) { + IAttributeInstance attribute = carrier.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED); + if (attribute.getModifier(TEAR_SLOWNESS_ID) == null) + attribute.applyModifier(TEAR_SLOWNESS); + return true; + } + } + return super.performEffect(carrier, effect); + } + + @Override + public void onCured(SicknessEffect sicknessEffect, EntityLivingBase carrier) { + if (!carrier.world.isRemote) { + carrier.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).removeModifier(TEAR_SLOWNESS_ID); + } + } +*/ @Override public boolean isSynchronized() { diff --git a/src/main/java/ladysnake/gaspunk/util/SpecialRewardChecker.java b/src/main/java/ladysnake/gaspunk/util/SpecialRewardChecker.java index 6f05800..849c492 100644 --- a/src/main/java/ladysnake/gaspunk/util/SpecialRewardChecker.java +++ b/src/main/java/ladysnake/gaspunk/util/SpecialRewardChecker.java @@ -80,7 +80,7 @@ public static GrenadeSkins getSelectedSkin(EntityPlayer player) { public static void retrieveSpecialRewards() { try { Gson GSON = new Gson(); - URLConnection rewardPage = new URL("https://ladysnake.glitch.me/gaspunk/users").openConnection(); + URLConnection rewardPage = new URL("https://github.com/Ladysnake/ModWinder/raw/master/gaspunkusers.json").openConnection(); rewardPage.connect(); BufferedReader in = new BufferedReader(new InputStreamReader(rewardPage.getInputStream())); String inputLine; diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 987e322..ae50706 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -9,7 +9,8 @@ "updateUrl": "", "authorList": [ "Pyrofab", - "CobraDarkPoney" + "CobraDarkPoney", + "sschr15" ], "credits": "", "logoFile": "",