Skip to content

Commit

Permalink
Fix #1202 Greenhouse doors, glass and sprinkler should use glass brea…
Browse files Browse the repository at this point in the history
…king sound
  • Loading branch information
Nedelosk committed May 24, 2016
1 parent 69cf513 commit 33051d0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/java/forestry/greenhouse/blocks/BlockGreenhouse.java
Expand Up @@ -17,6 +17,7 @@
import java.util.Map;

import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyEnum;
Expand Down Expand Up @@ -101,6 +102,15 @@ public static Map<BlockGreenhouseType, BlockGreenhouse> create() {
public BlockGreenhouseType getGreenhouseType() {
return type;
}

@Nonnull
@Override
public SoundType getSoundType() {
if(type == BlockGreenhouseType.SPRINKLER || type == BlockGreenhouseType.GLASS){
return SoundType.GLASS;
}
return super.getSoundType();
}
};
}
blockMap.put(type, block);
Expand Down
Expand Up @@ -15,6 +15,7 @@

import net.minecraft.block.Block;
import net.minecraft.block.BlockDoor;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.EnumPushReaction;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.properties.PropertyDirection;
Expand Down Expand Up @@ -60,6 +61,7 @@ public class BlockGreenhouseDoor extends BlockGreenhouse implements IStateMapper
protected static final AxisAlignedBB EAST_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.1875D, 1.0D, 1.0D);

public BlockGreenhouseDoor() {
setSoundType(SoundType.GLASS);
setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(OPEN, false).withProperty(HINGE, BlockDoor.EnumHingePosition.LEFT).withProperty(POWERED, false).withProperty(HALF, BlockDoor.EnumDoorHalf.LOWER));
}

Expand Down

0 comments on commit 33051d0

Please sign in to comment.