Added config to disable magnet sounds, Fixed effect jar not dropping inv (#144)

* Added config to disable magnet sounds

* version bump

* Fixed effect jar not dropping inv closes #108
This commit is contained in:
Gigabit101 authored and mezz committed 2016-05-02 11:58:03 -07:00
1 parent a2ab168d69
commit 130b7c6836
4 files changed
+11 -3

No files matched your search

@@ -71,8 +71,8 @@ public class BlockEffectJar extends BlockContainer
@Override
public void breakBlock(World world, int x, int y, int z, Block block, int meta)
{
super.breakBlock(world, x, y, z, block, meta);
this.dropInventory(world, x, y, z);
super.breakBlock(world, x, y, z, block, meta);
}
private void dropInventory(World world, int x, int y, int z)
@@ -204,7 +204,8 @@ public class ItemMysteriousMagnet extends Item implements IBauble {
if (world.rand.nextFloat() < 0.2f) {
float pitch = 0.85f - world.rand.nextFloat() * 3f / 10f;
world.playSoundEffect(e.posX, e.posY, e.posZ, "mob.endermen.portal", 0.6f, pitch);
if(!Config.disableMagnetSound)
world.playSoundEffect(e.posX, e.posY, e.posZ, "mob.endermen.portal", 0.6f, pitch);
}
}
}
+7
View File
@@ -66,6 +66,7 @@ import forestry.api.storage.EnumBackpackType;
public class Config
{
public static final String CATEGORY_GENERAL = "general";
public static final String CATEGORY_CLIENT = "client";
public static final String CATEGORY_DEBUG = "debug";
public static final String CATEGORY_MODULES = "modules";
public static final String CATEGORY_BOTANIA = "botaniaPlugin";
@@ -123,6 +124,8 @@ public class Config
public static ItemMoonDial moonDial;
public static ItemMysteriousMagnet magnet;
public static boolean disableMagnetSound;
//----- Liquid Capsules --------------------
public static ItemCapsule magicCapsule;
public static ItemCapsule voidCapsule;
@@ -331,6 +334,10 @@ public class Config
p = configuration.get(CATEGORY_GENERAL, "aromaticLumpSwarmerRate", 95);
p.comment = "Aromatic lump swarmer rate. Final value is X/1000. 0 will disable, values outside of [0,1000] will be clamped to range. Default: 95";
aromaticLumpSwarmerRate = p.getInt();
p = configuration.get(CATEGORY_CLIENT, "disableMagnetSound", false);
p.comment = "set to true to disable the magnet from making noise on item pickup";
disableMagnetSound = p.getBoolean();
}
private void setupEffectJar() {