From 0ee6b29461edc29f653db21ecac8de35572d15f8 Mon Sep 17 00:00:00 2001 From: bconlon Date: Mon, 4 Jan 2021 08:29:40 -0800 Subject: [PATCH] 1.1.2.1 Hotfix. --- README.md | 2 +- build.gradle | 2 +- .../com/gildedgames/the_aether/Aether.java | 2 +- .../gildedgames/the_aether/AetherConfig.java | 51 +++++++++++++++++++ .../entities/hostile/EntityAechorPlant.java | 3 +- .../entities/hostile/EntityCockatrice.java | 3 +- .../entities/hostile/EntityWhirlwind.java | 3 +- .../entities/hostile/EntityZephyr.java | 3 +- .../entities/passive/EntityAerwhale.java | 3 +- .../entities/passive/EntitySheepuff.java | 6 +++ .../passive/mountable/EntityAerbunny.java | 6 +++ .../passive/mountable/EntityFlyingCow.java | 6 +++ .../entities/passive/mountable/EntityMoa.java | 6 +++ .../passive/mountable/EntityPhyg.java | 6 +++ .../passive/mountable/EntitySwet.java | 3 +- src/main/resources/mcmod.info | 2 +- 16 files changed, 97 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 20d9213..5232b26 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ We use Curseforge to publish **stable builds** of the Aether for Minecraft. You ## :bug: Report bugs or other issues If you're running into bugs or other problems, feel free to open an issue on our [issue tracker](https://gitea.gildedgames.com/GildedGames/The-Aether/issues). When doing so, we ask that you provide the following information: -- The exact version of the Aether you are running, such as `1.7.10-1.1.2`, and the version of Forge you are using, such as `10.13.4.1558`. Please do not state "the latest stable release" or "latest Forge". +- The exact version of the Aether you are running, such as `1.7.10-1.1.2.1`, and the version of Forge you are using, such as `10.13.4.1558`. Please do not state "the latest stable release" or "latest Forge". - If your issue is a bug or otherwise unexpected behavior, state what you expected to happen. - If your issue is a crash, attach the latest client or server log and the complete crash report as a file. - If your issue only occurs with other mods/plugins installed, list the exact mod/plugin versions installed. diff --git a/build.gradle b/build.gradle index 911a9de..2dd51d5 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ buildscript { apply plugin: 'forge' -version = "1.7.10-v1.1.2" +version = "1.7.10-v1.1.2.1" group= "com.gildedgames.the_aether" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "aether" diff --git a/src/main/java/com/gildedgames/the_aether/Aether.java b/src/main/java/com/gildedgames/the_aether/Aether.java index 6ade3bc..901e2ee 100644 --- a/src/main/java/com/gildedgames/the_aether/Aether.java +++ b/src/main/java/com/gildedgames/the_aether/Aether.java @@ -22,7 +22,7 @@ import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; -@Mod(modid = Aether.MOD_ID, version = "v1.1.2") +@Mod(modid = Aether.MOD_ID, version = "v1.1.2.1") public class Aether { public static final String MOD_ID = "aether_legacy"; diff --git a/src/main/java/com/gildedgames/the_aether/AetherConfig.java b/src/main/java/com/gildedgames/the_aether/AetherConfig.java index 788da7e..893cf3a 100644 --- a/src/main/java/com/gildedgames/the_aether/AetherConfig.java +++ b/src/main/java/com/gildedgames/the_aether/AetherConfig.java @@ -35,6 +35,10 @@ public class AetherConfig { private static boolean disable_eternal_day; + private static int phyg_spawnrate, flyingcow_spawnrate, sheepuff_spawnrate, aerbunny_spawnrate, moa_spawnrate, aerwhale_spawnrate; + + private static int zephyr_spawnrate, cockatrice_spawnrate, swet_spawnrate, aechorplant_spawnrate, whirlwind_spawnrate; + public static void init(File location) { File newFile = new File(location + "/aether" + "/AetherI.cfg"); @@ -84,6 +88,19 @@ public class AetherConfig { disable_eternal_day = config.get("Misc", "Disables eternal day making time cycle in the Aether without having to kill the Sun Spirit. This is mainly intended for use in modpacks.", false).getBoolean(false); + //Spawnrates + phyg_spawnrate = config.get("Spawnrates", "Phyg Spawnrate. 1 is always, higher numbers decrease chances.", 1).getInt(1); + flyingcow_spawnrate = config.get("Spawnrates", "Flying Cow Spawnrate. 1 is always, higher numbers decrease chances.", 1).getInt(1); + sheepuff_spawnrate = config.get("Spawnrates", "Sheepuff Spawnrate. 1 is always, higher numbers decrease chances.", 1).getInt(1); + aerbunny_spawnrate = config.get("Spawnrates", "Aerbunny Spawnrate. 1 is always, higher numbers decrease chances.", 1).getInt(1); + moa_spawnrate = config.get("Spawnrates", "Moa Spawnrate. 1 is always, higher numbers decrease chances.", 1).getInt(1); + aerwhale_spawnrate = config.get("Spawnrates", "Aerwhale Spawnrate. 1 is always, higher numbers decrease chances.", 1).getInt(1); + zephyr_spawnrate = config.get("Spawnrates", "Zephyr Spawnrate. 1 is always, higher numbers decrease chances.", 65).getInt(65); + cockatrice_spawnrate = config.get("Spawnrates", "Cockatrice Spawnrate. 1 is always, higher numbers decrease chances.", 45).getInt(45); + swet_spawnrate = config.get("Spawnrates", "Swet Spawnrate. 1 is always, higher numbers decrease chances.", 40).getInt(40); + aechorplant_spawnrate = config.get("Spawnrates", "Aechor Plant Spawnrate. 1 is always, higher numbers decrease chances.", 55).getInt(55); + whirlwind_spawnrate = config.get("Spawnrates", "Whirlwind Spawnrate. 1 is always, higher numbers decrease chances.", 55).getInt(55); + config.save(); } @@ -182,4 +199,38 @@ public class AetherConfig { public static boolean allowSeasonalChristmas() { return seasonal_christmas; } + + public static int getPhygSpawnrate() { + return phyg_spawnrate; + } + public static int getFlyingCowSpawnrate() { + return flyingcow_spawnrate; + } + public static int getSheepuffSpawnrate() { + return sheepuff_spawnrate; + } + public static int getAerbunnySpawnrate() { + return aerbunny_spawnrate; + } + public static int getMoaSpawnrate() { + return moa_spawnrate; + } + public static int getAerwhaleSpawnrate() { + return aerwhale_spawnrate; + } + public static int getZephyrSpawnrate() { + return zephyr_spawnrate; + } + public static int getCockatriceSpawnrate() { + return cockatrice_spawnrate; + } + public static int getSwetSpawnrate() { + return swet_spawnrate; + } + public static int getAechorPlantSpawnrate() { + return aechorplant_spawnrate; + } + public static int getWhirlwindSpawnrate() { + return whirlwind_spawnrate; + } } \ No newline at end of file diff --git a/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityAechorPlant.java b/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityAechorPlant.java index 84af665..21f8da7 100644 --- a/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityAechorPlant.java +++ b/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityAechorPlant.java @@ -1,5 +1,6 @@ package com.gildedgames.the_aether.entities.hostile; +import com.gildedgames.the_aether.AetherConfig; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityAgeable; import net.minecraft.entity.SharedMonsterAttributes; @@ -52,7 +53,7 @@ public class EntityAechorPlant extends EntityAetherAnimal { @Override public boolean getCanSpawnHere() { - return this.rand.nextInt(15) == 0 && super.getCanSpawnHere(); + return this.rand.nextInt(AetherConfig.getAechorPlantSpawnrate()) == 0 && super.getCanSpawnHere(); } @Override diff --git a/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityCockatrice.java b/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityCockatrice.java index 2ec2085..97ac4b3 100644 --- a/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityCockatrice.java +++ b/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityCockatrice.java @@ -1,5 +1,6 @@ package com.gildedgames.the_aether.entities.hostile; +import com.gildedgames.the_aether.AetherConfig; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.*; @@ -48,7 +49,7 @@ public class EntityCockatrice extends EntityMob { @Override public boolean getCanSpawnHere() { - return this.rand.nextInt(5) == 0 && super.getCanSpawnHere(); + return this.rand.nextInt(AetherConfig.getCockatriceSpawnrate()) == 0 && super.getCanSpawnHere(); } @Override diff --git a/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityWhirlwind.java b/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityWhirlwind.java index b70b774..0658cc2 100644 --- a/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityWhirlwind.java +++ b/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityWhirlwind.java @@ -3,6 +3,7 @@ package com.gildedgames.the_aether.entities.hostile; import java.util.ArrayList; import java.util.List; +import com.gildedgames.the_aether.AetherConfig; import net.minecraft.block.BlockLeaves; import net.minecraft.entity.Entity; import net.minecraft.entity.SharedMonsterAttributes; @@ -345,7 +346,7 @@ public class EntityWhirlwind extends EntityMob { int j = MathHelper.floor_double(this.boundingBox.minY); int k = MathHelper.floor_double(this.posZ); - return this.rand.nextInt(15) == 0 && this.worldObj.getBlock(i, j - 1, k) == BlocksAether.aether_grass && this.worldObj.getBlockLightValue(i, j, k) > 8 && this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty() && !this.worldObj.isAnyLiquid(this.boundingBox); + return this.rand.nextInt(AetherConfig.getWhirlwindSpawnrate()) == 0 && this.worldObj.getBlock(i, j - 1, k) == BlocksAether.aether_grass && this.worldObj.getBlockLightValue(i, j, k) > 8 && this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty() && !this.worldObj.isAnyLiquid(this.boundingBox); } public EntityPlayer findClosestPlayer() { diff --git a/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityZephyr.java b/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityZephyr.java index 7e26aed..58ba4e6 100644 --- a/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityZephyr.java +++ b/src/main/java/com/gildedgames/the_aether/entities/hostile/EntityZephyr.java @@ -1,5 +1,6 @@ package com.gildedgames.the_aether.entities.hostile; +import com.gildedgames.the_aether.AetherConfig; import com.gildedgames.the_aether.entities.projectile.EntityZephyrSnowball; import net.minecraft.entity.EntityFlying; import net.minecraft.entity.monster.IMob; @@ -40,7 +41,7 @@ public class EntityZephyr extends EntityFlying implements IMob { int j = MathHelper.floor_double(this.boundingBox.minY); int k = MathHelper.floor_double(this.posZ); - return this.worldObj.getBlock(i, j - 1, k) == BlocksAether.aether_grass && this.rand.nextInt(50) == 0 && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.getBlockLightValue(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY), MathHelper.floor_double(this.posZ)) > 8 && super.getCanSpawnHere(); + return this.worldObj.getBlock(i, j - 1, k) == BlocksAether.aether_grass && this.rand.nextInt(AetherConfig.getZephyrSpawnrate()) == 0 && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.getBlockLightValue(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY), MathHelper.floor_double(this.posZ)) > 8 && super.getCanSpawnHere(); } @Override diff --git a/src/main/java/com/gildedgames/the_aether/entities/passive/EntityAerwhale.java b/src/main/java/com/gildedgames/the_aether/entities/passive/EntityAerwhale.java index e04a7e9..6529497 100644 --- a/src/main/java/com/gildedgames/the_aether/entities/passive/EntityAerwhale.java +++ b/src/main/java/com/gildedgames/the_aether/entities/passive/EntityAerwhale.java @@ -1,5 +1,6 @@ package com.gildedgames.the_aether.entities.passive; +import com.gildedgames.the_aether.AetherConfig; import com.gildedgames.the_aether.entities.ai.aerwhale.AerwhaleAITravelCourse; import com.gildedgames.the_aether.entities.ai.aerwhale.AerwhaleAIUnstuck; import net.minecraft.entity.EntityFlying; @@ -56,7 +57,7 @@ public class EntityAerwhale extends EntityFlying { int j = MathHelper.floor_double(this.boundingBox.minY); int k = MathHelper.floor_double(this.posZ); - return this.worldObj.getBlock(i, j - 1, k) == BlocksAether.aether_grass && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.getBlockLightValue(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY), MathHelper.floor_double(this.posZ)) > 8 && super.getCanSpawnHere(); + return this.rand.nextInt(AetherConfig.getAerwhaleSpawnrate()) == 0 && this.worldObj.getBlock(i, j - 1, k) == BlocksAether.aether_grass && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).size() == 0 && !this.worldObj.isAnyLiquid(this.boundingBox) && this.worldObj.getBlockLightValue(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.boundingBox.minY), MathHelper.floor_double(this.posZ)) > 8 && super.getCanSpawnHere(); } @Override diff --git a/src/main/java/com/gildedgames/the_aether/entities/passive/EntitySheepuff.java b/src/main/java/com/gildedgames/the_aether/entities/passive/EntitySheepuff.java index 3725b13..360d756 100644 --- a/src/main/java/com/gildedgames/the_aether/entities/passive/EntitySheepuff.java +++ b/src/main/java/com/gildedgames/the_aether/entities/passive/EntitySheepuff.java @@ -2,6 +2,7 @@ package com.gildedgames.the_aether.entities.passive; import java.util.Random; +import com.gildedgames.the_aether.AetherConfig; import com.gildedgames.the_aether.items.ItemsAether; import net.minecraft.block.Block; import net.minecraft.entity.EntityAgeable; @@ -81,6 +82,11 @@ public class EntitySheepuff extends EntityAetherAnimal { this.dataWatcher.addObject(18, (byte) 0); } + @Override + public boolean getCanSpawnHere() { + return this.rand.nextInt(AetherConfig.getSheepuffSpawnrate()) == 0 && super.getCanSpawnHere(); + } + @Override protected void dropFewItems(boolean var1, int ammount) { if (!this.getSheared()) { diff --git a/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityAerbunny.java b/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityAerbunny.java index 6a8f9fa..376a536 100644 --- a/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityAerbunny.java +++ b/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityAerbunny.java @@ -1,5 +1,6 @@ package com.gildedgames.the_aether.entities.passive.mountable; +import com.gildedgames.the_aether.AetherConfig; import com.gildedgames.the_aether.entities.passive.EntityAetherAnimal; import io.netty.buffer.ByteBuf; import net.minecraft.entity.EntityAgeable; @@ -58,6 +59,11 @@ public class EntityAerbunny extends EntityAetherAnimal implements IEntityAdditio return 0.4D; } + @Override + public boolean getCanSpawnHere() { + return this.rand.nextInt(AetherConfig.getAerbunnySpawnrate()) == 0 && super.getCanSpawnHere(); + } + @Override protected void jump() { this.spawnExplosionParticle(); diff --git a/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityFlyingCow.java b/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityFlyingCow.java index 8d954d3..496d6f3 100644 --- a/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityFlyingCow.java +++ b/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityFlyingCow.java @@ -1,5 +1,6 @@ package com.gildedgames.the_aether.entities.passive.mountable; +import com.gildedgames.the_aether.AetherConfig; import com.gildedgames.the_aether.items.ItemsAether; import net.minecraft.block.Block; import net.minecraft.entity.EntityAgeable; @@ -58,6 +59,11 @@ public class EntityFlyingCow extends EntitySaddleMount { this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.20000000298023224D); } + @Override + public boolean getCanSpawnHere() { + return this.rand.nextInt(AetherConfig.getFlyingCowSpawnrate()) == 0 && super.getCanSpawnHere(); + } + @Override public void onUpdate() { super.onUpdate(); diff --git a/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityMoa.java b/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityMoa.java index be6361d..212f45a 100644 --- a/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityMoa.java +++ b/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityMoa.java @@ -1,5 +1,6 @@ package com.gildedgames.the_aether.entities.passive.mountable; +import com.gildedgames.the_aether.AetherConfig; import com.gildedgames.the_aether.api.AetherAPI; import com.gildedgames.the_aether.api.moa.AetherMoaType; import net.minecraft.block.Block; @@ -94,6 +95,11 @@ public class EntityMoa extends EntitySaddleMount { this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(35.0D); } + @Override + public boolean getCanSpawnHere() { + return this.rand.nextInt(AetherConfig.getMoaSpawnrate()) == 0 && super.getCanSpawnHere(); + } + public boolean isSitting() { return this.dataWatcher.getWatchableObjectByte(25) == (byte) 1; } diff --git a/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityPhyg.java b/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityPhyg.java index 37004aa..7a8c844 100644 --- a/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityPhyg.java +++ b/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntityPhyg.java @@ -1,5 +1,6 @@ package com.gildedgames.the_aether.entities.passive.mountable; +import com.gildedgames.the_aether.AetherConfig; import com.gildedgames.the_aether.items.ItemsAether; import net.minecraft.block.Block; import net.minecraft.entity.EntityAgeable; @@ -56,6 +57,11 @@ public class EntityPhyg extends EntitySaddleMount { this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.25D); } + @Override + public boolean getCanSpawnHere() { + return this.rand.nextInt(AetherConfig.getPhygSpawnrate()) == 0 && super.getCanSpawnHere(); + } + @Override public void onUpdate() { super.onUpdate(); diff --git a/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntitySwet.java b/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntitySwet.java index b9e60ff..3315423 100644 --- a/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntitySwet.java +++ b/src/main/java/com/gildedgames/the_aether/entities/passive/mountable/EntitySwet.java @@ -1,5 +1,6 @@ package com.gildedgames.the_aether.entities.passive.mountable; +import com.gildedgames.the_aether.AetherConfig; import com.gildedgames.the_aether.api.AetherAPI; import com.gildedgames.the_aether.api.player.IPlayerAether; import com.gildedgames.the_aether.blocks.BlocksAether; @@ -498,7 +499,7 @@ public class EntitySwet extends EntityMountable @Override public boolean getCanSpawnHere() { - return this.rand.nextInt(10) == 0 && super.getCanSpawnHere(); + return this.rand.nextInt(AetherConfig.getSwetSpawnrate()) == 0 && super.getCanSpawnHere(); } @Override diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index 1e4853b..ef23ce0 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -3,7 +3,7 @@ "modid": "aether_legacy", "name": "The Aether", "description": "Gilded Games presents the original Aether mod! Up to date for modern Minecraft versions and fully compatible with multiplayer! The Aether is a dimension high in the sky comprised of floating islands! Ascend through a Glowstone portal and begin a new survival adventure packed with new ores, mythical creatures and perilous Dungeons!", - "version": "v1.1.2", + "version": "v1.1.2.1", "mcversion": "1.7.10", "url": "https://www.curseforge.com/minecraft/mc-mods/the-aether", "updateUrl": "",