Skip to content

Commit

Permalink
Add biomass sounds
Browse files Browse the repository at this point in the history
  • Loading branch information
IcarussOne committed Jul 5, 2024
1 parent 99d2e68 commit b984a37
Show file tree
Hide file tree
Showing 18 changed files with 28 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/main/java/mod/emt/harkenscythe/blocks/HSBiomassCrop.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;

@SuppressWarnings("deprecation")
public class HSBiomassCrop extends BlockBush
{
public static final PropertyInteger AGE = PropertyInteger.create("age", 0, 3);
Expand All @@ -29,7 +28,7 @@ public HSBiomassCrop()
{
super(Material.PLANTS, MapColor.RED);
setDefaultState(blockState.getBaseState().withProperty(AGE, 0));
setSoundType(HSSoundTypes.BIOMASS);
setSoundType(HSSoundTypes.BIOMASS_PLANT);
setTickRandomly(true);
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/mod/emt/harkenscythe/blocks/HSBlockCreep.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import javax.annotation.Nullable;
import mod.emt.harkenscythe.init.HSBlocks;
import mod.emt.harkenscythe.init.HSItems;
import mod.emt.harkenscythe.init.HSSoundTypes;
import net.minecraft.advancements.CriteriaTriggers;
import net.minecraft.block.Block;
import net.minecraft.block.SoundType;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
Expand Down Expand Up @@ -38,7 +38,7 @@ public HSBlockCreep()
super(Material.GRASS, MapColor.RED);
this.setHardness(0.6F);
this.setHarvestLevel("shovel", 0);
this.setSoundType(SoundType.PLANT);
this.setSoundType(HSSoundTypes.BIOMASS);
this.setTickRandomly(true);
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/mod/emt/harkenscythe/init/HSBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public static void onRegisterBlocksEvent(@Nonnull final RegistryEvent.Register<B
// BLOCKS
registry.registerAll
(
HSRegistry.setup(new HSBlockMaterial(Material.ROCK, MapColor.NETHERRACK, 5.0F, 5.0F, SoundType.STONE), "biomass_block").setCreativeTab(HarkenScythe.TAB),
HSRegistry.setup(new HSBlockMaterial(Material.ROCK, MapColor.NETHERRACK, 5.0F, 5.0F, HSSoundTypes.BIOMASS), "biomass_block").setCreativeTab(HarkenScythe.TAB),
HSRegistry.setup(new HSBlockMaterial(Material.IRON, MapColor.DIAMOND, 5.0F, 10.0F, SoundType.METAL), "livingmetal_block").setCreativeTab(HarkenScythe.TAB),
HSRegistry.setup(new HSSpectralGlass(false), "spectral_glass").setCreativeTab(HarkenScythe.TAB),
HSRegistry.setup(new HSSpectralGlass(true), "spectral_glass_inverted").setCreativeTab(HarkenScythe.TAB),
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/mod/emt/harkenscythe/init/HSSoundEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
public class HSSoundEvents
{
public static final SoundEvent BLOCK_BLOOD_ALTAR_ENCHANT = new SoundEvent(new ResourceLocation(HarkenScythe.MOD_ID, "block.soul_altar.enchant"));
public static final SoundEvent BLOCK_BIOMASS_BREAK = new SoundEvent(new ResourceLocation(HarkenScythe.MOD_ID, "block.biomass.break"));
public static final SoundEvent BLOCK_BIOMASS_HARVEST = new SoundEvent(new ResourceLocation(HarkenScythe.MOD_ID, "block.biomass.harvest"));
public static final SoundEvent BLOCK_BIOMASS_STEP = new SoundEvent(new ResourceLocation(HarkenScythe.MOD_ID, "block.biomass.step"));
public static final SoundEvent BLOCK_SOUL_ALTAR_ENCHANT = new SoundEvent(new ResourceLocation(HarkenScythe.MOD_ID, "block.blood_altar.enchant"));
public static final SoundEvent ITEM_ATHAME_CREATE = new SoundEvent(new ResourceLocation(HarkenScythe.MOD_ID, "item.athame.create"));
public static final SoundEvent ITEM_CREEP_BALL_USE = new SoundEvent(new ResourceLocation(HarkenScythe.MOD_ID, "item.creep_ball.use"));
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/mod/emt/harkenscythe/init/HSSoundTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@

public class HSSoundTypes
{
public static final SoundType BIOMASS = new SoundType(1.0F, 1.0F, HSSoundEvents.BLOCK_BIOMASS_HARVEST, HSSoundEvents.BLOCK_BIOMASS_HARVEST, HSSoundEvents.BLOCK_BIOMASS_HARVEST, HSSoundEvents.BLOCK_BIOMASS_HARVEST, HSSoundEvents.BLOCK_BIOMASS_HARVEST);
public static final SoundType BIOMASS = new SoundType(1.0F, 1.0F, HSSoundEvents.BLOCK_BIOMASS_BREAK, HSSoundEvents.BLOCK_BIOMASS_STEP, HSSoundEvents.BLOCK_BIOMASS_BREAK, HSSoundEvents.BLOCK_BIOMASS_HARVEST, HSSoundEvents.BLOCK_BIOMASS_STEP);
public static final SoundType BIOMASS_PLANT = new SoundType(1.0F, 1.0F, HSSoundEvents.BLOCK_BIOMASS_HARVEST, HSSoundEvents.BLOCK_BIOMASS_HARVEST, HSSoundEvents.BLOCK_BIOMASS_HARVEST, HSSoundEvents.BLOCK_BIOMASS_HARVEST, HSSoundEvents.BLOCK_BIOMASS_HARVEST);
}
20 changes: 20 additions & 0 deletions src/main/resources/assets/harkenscythe/sounds.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,30 @@
{
"block.biomass.break": {
"sounds": [
"harkenscythe:blocks/biomass/break1",
"harkenscythe:blocks/biomass/break2",
"harkenscythe:blocks/biomass/break3",
"harkenscythe:blocks/biomass/break4",
"harkenscythe:blocks/biomass/break5",
"harkenscythe:blocks/biomass/break6"
]
},
"block.biomass.harvest": {
"sounds": [
"harkenscythe:biomass_harvest1",
"harkenscythe:biomass_harvest2"
]
},
"block.biomass.step": {
"sounds": [
"harkenscythe:blocks/biomass/step1",
"harkenscythe:blocks/biomass/step2",
"harkenscythe:blocks/biomass/step3",
"harkenscythe:blocks/biomass/step4",
"harkenscythe:blocks/biomass/step5",
"harkenscythe:blocks/biomass/step6"
]
},
"block.blood_altar.enchant": {
"sounds": [
"harkenscythe:enchant_soul"
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit b984a37

Please sign in to comment.