Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/java/openblocks/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
public class Config {

@OnLineModifiable

@ConfigProperty(category = "luggage", name = "playWalkingSound", comment = "Should luggage play its walking sound")
public static boolean luggagePlayWalkingSound = true;

@ConfigProperty(
category = "luggage",
name = "collectItems",
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/openblocks/common/entity/EntityLuggage.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import cpw.mods.fml.common.registry.IEntityAdditionalSpawnData;
import io.netty.buffer.ByteBuf;
import openblocks.Config;
import openblocks.OpenBlocks;
import openblocks.OpenBlocksGuiHandler;
import openblocks.common.entity.ai.EntityAICollectItem;
Expand Down Expand Up @@ -194,7 +195,8 @@ public boolean canConsumeStackPartially(ItemStack stack) {

@Override
protected void func_145780_a(int x, int y, int z, Block block) {
playSound("openblocks:luggage.walk", 0.3F, 0.7F + (worldObj.rand.nextFloat() * 0.5f));
if (Config.luggagePlayWalkingSound)
playSound("openblocks:luggage.walk", 0.3F, 0.7F + (worldObj.rand.nextFloat() * 0.5f));
}

public void storeItemTag(NBTTagCompound itemTag) {
Expand Down
Loading