diff --git a/1.11/gradle.properties b/1.11/gradle.properties index d9cfd788..964d682a 100644 --- a/1.11/gradle.properties +++ b/1.11/gradle.properties @@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx3G mod_group=nmd.primal.forgecraft mod_name=ForgeCraft -mod_version=1.1.2 +mod_version=1.1.5 forge_version=13.20.0.2226 mcp_mappings=snapshot_20161220 mc_version=1.11.2 diff --git a/1.11/src/main/java/nmd/primal/forgecraft/ForgeCraft.java b/1.11/src/main/java/nmd/primal/forgecraft/ForgeCraft.java index 8eb8c8ef..a5503be3 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/ForgeCraft.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/ForgeCraft.java @@ -9,6 +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.ModEvents; import nmd.primal.forgecraft.compat.ModDictionary; import nmd.primal.forgecraft.gui.GuiHandler; @@ -50,7 +51,7 @@ public class ForgeCraft ModItems.register(); ModTiles.registerTileEntities(); - + ModSounds.registerSounds(); ModEvents.registerCommonEvents(); //ModEvents.registerClientEvents(); // ModItems.registerRenders(); diff --git a/1.11/src/main/java/nmd/primal/forgecraft/ModInfo.java b/1.11/src/main/java/nmd/primal/forgecraft/ModInfo.java index fa3ba403..9dd9a086 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/ModInfo.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/ModInfo.java @@ -18,7 +18,7 @@ public class ModInfo { public static final String MOD_NAME = "Kitsu's ForgeCraft"; //public static final String MOD_PREFIX = MOD_ID + ":"; public static final String MOD_CHANNEL = MOD_ID; - public static final String MOD_VERSION = "1.1.2"; + public static final String MOD_VERSION = "1.1.5"; public static final String MC_VERSIONS = "[1.11.0, 1.12.0)"; public static final String DEPENDENCIES = "required-after:forge@[13.20.0.2226,);" + "after:primal;"; diff --git a/1.11/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java b/1.11/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java index 38498d51..e98efa4e 100644 --- a/1.11/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java +++ b/1.11/src/main/java/nmd/primal/forgecraft/blocks/PistonBellows.java @@ -9,10 +9,7 @@ import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.EnumBlockRenderType; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.EnumHand; -import net.minecraft.util.EnumParticleTypes; +import net.minecraft.util.*; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; @@ -21,6 +18,7 @@ import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; import nmd.primal.forgecraft.ModInfo; import nmd.primal.forgecraft.init.ModBlocks; +import nmd.primal.forgecraft.init.ModSounds; import nmd.primal.forgecraft.tiles.TileBloomery; import nmd.primal.forgecraft.tiles.TileForge; import nmd.primal.forgecraft.tiles.TilePistonBellows; @@ -74,6 +72,7 @@ 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); 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) { diff --git a/1.11/src/main/java/nmd/primal/forgecraft/init/ModSounds.java b/1.11/src/main/java/nmd/primal/forgecraft/init/ModSounds.java new file mode 100644 index 00000000..f381c7e3 --- /dev/null +++ b/1.11/src/main/java/nmd/primal/forgecraft/init/ModSounds.java @@ -0,0 +1,27 @@ +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; + +/** + * Created by mminaie on 3/24/17. + */ +public class ModSounds { + public static SoundEvent PISTON_BELLOWS; + public static void registerSounds() + { + PISTON_BELLOWS = registerSound("piston_bellows"); + } + + private static SoundEvent registerSound(String name) + { + ResourceLocation location = new ResourceLocation(ModInfo.MOD_ID, name); + SoundEvent sound = new SoundEvent(location); + sound.setRegistryName(location); + ForgeRegistries.SOUND_EVENTS.register(sound); + return sound; + } + +} diff --git a/1.11/src/main/resources/assets/forgecraft/sounds.json b/1.11/src/main/resources/assets/forgecraft/sounds.json index 28e96766..07c3ab98 100644 --- a/1.11/src/main/resources/assets/forgecraft/sounds.json +++ b/1.11/src/main/resources/assets/forgecraft/sounds.json @@ -1,6 +1,6 @@ { "piston_bellows": { - "category": "player", + "category": "blocks", "sounds": [ "forgecraft:piston_bellows" ], diff --git a/1.11/src/main/resources/assets/forgecraft/sounds/piston_bellows.ogg b/1.11/src/main/resources/assets/forgecraft/sounds/piston_bellows.ogg new file mode 100644 index 00000000..31da025f Binary files /dev/null and b/1.11/src/main/resources/assets/forgecraft/sounds/piston_bellows.ogg differ diff --git a/1.11/src/main/resources/mcmod.info b/1.11/src/main/resources/mcmod.info index 74ab18a8..cebd9c70 100644 --- a/1.11/src/main/resources/mcmod.info +++ b/1.11/src/main/resources/mcmod.info @@ -2,7 +2,7 @@ "modid": "forgecraft", "name": "Kitsu's Forgecraft", "description": "Forged with sweat and blood", - "version": "1.1.2", + "version": "1.1.5", "mcversion": "1.11.2", "url": "", "updateUrl": "",