diff --git a/changelog.json b/changelog.json index 19821a3..99baa79 100644 --- a/changelog.json +++ b/changelog.json @@ -12,6 +12,6 @@ "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.8": "- Edited the HREF for item skins\n- Added the ability to change the length gas clouds exist through configuration" + "1.4.8": "- Edited the HREF for item skins\n- Added the ability to change the length gas clouds exist through configuration\n- Also added the ability to change the distance the gas can travel" } } \ No newline at end of file diff --git a/changelog.md b/changelog.md index 21c5a58..49324a3 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,7 @@ ##### 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 +- Also added the ability to change the distance the gas can travel ##### Version 1.12.2-1.4.7 - BUILT - Fixed a startup crash on dedicated servers diff --git a/src/main/java/ladysnake/gaspunk/GasPunkConfig.java b/src/main/java/ladysnake/gaspunk/GasPunkConfig.java index 6876592..618c881 100644 --- a/src/main/java/ladysnake/gaspunk/GasPunkConfig.java +++ b/src/main/java/ladysnake/gaspunk/GasPunkConfig.java @@ -22,6 +22,16 @@ 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( + "Default distance that the gas cloud travels. The value appears to be an estimate for the radius in meters. I am not the original developer, so I'm not completely sure." + ) + public static int maxPropagationDistance = 10; + @Config.Comment({ "Sets the lifespan in ticks for gas clouds.", "The clouds themselves look like they take a bit longer to decay,", diff --git a/src/main/java/ladysnake/gaspunk/client/render/entity/LayerBelt.java b/src/main/java/ladysnake/gaspunk/client/render/entity/LayerBelt.java index fb6e93e..61730d8 100644 --- a/src/main/java/ladysnake/gaspunk/client/render/entity/LayerBelt.java +++ b/src/main/java/ladysnake/gaspunk/client/render/entity/LayerBelt.java @@ -5,12 +5,8 @@ import ladysnake.gaspunk.client.model.ModelBandoulier; import ladysnake.gaspunk.init.ModItems; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.entity.RenderLivingBase; -import net.minecraft.client.renderer.entity.layers.LayerArmorBase; import net.minecraft.client.renderer.entity.layers.LayerRenderer; -import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; diff --git a/src/main/java/ladysnake/gaspunk/entity/EntityGasCloud.java b/src/main/java/ladysnake/gaspunk/entity/EntityGasCloud.java index 15b723d..2167aef 100644 --- a/src/main/java/ladysnake/gaspunk/entity/EntityGasCloud.java +++ b/src/main/java/ladysnake/gaspunk/entity/EntityGasCloud.java @@ -30,7 +30,8 @@ public class EntityGasCloud extends Entity implements IEntityAdditionalSpawnData { - public static final int MAX_PROPAGATION_DISTANCE = 10; + static int maxPropDistance = GasPunkConfig.maxPropagationDistance; + public static final int MAX_PROPAGATION_DISTANCE = maxPropDistance; public static final int MAX_PROPAGATION_DISTANCE_SQ = MAX_PROPAGATION_DISTANCE * MAX_PROPAGATION_DISTANCE; private static final DataParameter CLOUD_AGE = EntityDataManager.createKey(EntityGasCloud.class, DataSerializers.VARINT); private static final DataParameter MAX_LIFESPAN = EntityDataManager.createKey(EntityGasCloud.class, DataSerializers.VARINT); diff --git a/src/main/java/ladysnake/gaspunk/network/SpecialRewardMessageHandler.java b/src/main/java/ladysnake/gaspunk/network/SpecialRewardMessageHandler.java index 88a63e9..8526b20 100644 --- a/src/main/java/ladysnake/gaspunk/network/SpecialRewardMessageHandler.java +++ b/src/main/java/ladysnake/gaspunk/network/SpecialRewardMessageHandler.java @@ -1,7 +1,6 @@ package ladysnake.gaspunk.network; import ladysnake.gaspunk.util.SpecialRewardChecker; -import net.minecraftforge.fml.common.FMLCommonHandler; import net.minecraftforge.fml.common.network.simpleimpl.IMessage; import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;