sounds not working
This commit is contained in:
@@ -9,7 +9,7 @@ import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper;
|
||||
import nmd.primal.core.common.init.ModSounds;
|
||||
import nmd.primal.forgecraft.init.ModSounds;
|
||||
import nmd.primal.forgecraft.init.ModEvents;
|
||||
import nmd.primal.forgecraft.compat.ModDictionary;
|
||||
import nmd.primal.forgecraft.gui.GuiHandler;
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package nmd.primal.forgecraft.api;
|
||||
|
||||
import net.minecraft.util.SoundEvent;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 3/24/17.
|
||||
*/
|
||||
public class ForgecraftSounds {
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -17,6 +17,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.api.ForgecraftSounds;
|
||||
import nmd.primal.forgecraft.init.ModBlocks;
|
||||
import nmd.primal.forgecraft.init.ModSounds;
|
||||
import nmd.primal.forgecraft.tiles.TileBloomery;
|
||||
@@ -72,7 +73,9 @@ public class PistonBellows extends CustomContainerFacing {
|
||||
//System.out.println(state.getValue(PistonBellows.FACING));
|
||||
if(state.getValue(this.ACTIVE) == false) {
|
||||
world.setBlockState(pos, state.withProperty(ACTIVE, true), 2);
|
||||
world.playSound(player, pos, ModSounds.PISTON_BELLOWS, SoundCategory.BLOCKS, 1.0f, 1.0f);
|
||||
//world.playSound(pos, ForgecraftSounds.PISTON_BELLOWS, SoundCategory.BLOCKS, 1.0f, 1.0f);
|
||||
world.playSound((double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), ModSounds.PISTON_BELLOWS, SoundCategory.BLOCKS, 1.0f, 1.0f, true);
|
||||
|
||||
if (state.getValue(PistonBellows.FACING) == EnumFacing.NORTH) {
|
||||
BlockPos tempPos = new BlockPos(pos.getX() + 1, pos.getY(), pos.getZ());
|
||||
if (world.getBlockState(tempPos).getBlock() == ModBlocks.firebox) {
|
||||
|
||||
@@ -3,13 +3,17 @@ package nmd.primal.forgecraft.init;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.SoundEvent;
|
||||
import net.minecraftforge.fml.common.registry.ForgeRegistries;
|
||||
import nmd.primal.core.common.init.ModInfo;
|
||||
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
import nmd.primal.forgecraft.api.ForgecraftSounds;
|
||||
|
||||
/**
|
||||
* Created by mminaie on 3/24/17.
|
||||
*/
|
||||
public class ModSounds {
|
||||
|
||||
public static SoundEvent PISTON_BELLOWS;
|
||||
|
||||
public static void registerSounds()
|
||||
{
|
||||
PISTON_BELLOWS = registerSound("piston_bellows");
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
{
|
||||
"piston_bellows": {
|
||||
"category": "blocks",
|
||||
"sounds": [
|
||||
"forgecraft:piston_bellows"
|
||||
],
|
||||
"subtitle": "forgecraft.subtitle.piston_bellows"
|
||||
"category": "block",
|
||||
"subtitle": "forgecraft.subtitle.piston_bellows",
|
||||
"sounds": [ "forgecraft:piston_bellows" ]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user