Implement walking sounds
These sounds change depending on what kind of block you're walking in. Still to come: sound effects for mining and placing blocks
This commit is contained in:
parent
8f6e577550
commit
a361703746
@ -17,6 +17,7 @@ namespace TrueCraft.API.Logic
|
||||
byte LightOpacity { get; }
|
||||
bool DiffuseSkyLight { get; }
|
||||
bool Flammable { get; }
|
||||
SoundEffectClass SoundEffect { get; }
|
||||
ToolMaterial EffectiveToolMaterials { get; }
|
||||
ToolType EffectiveTools { get; }
|
||||
string DisplayName { get; }
|
||||
|
17
TrueCraft.API/Logic/SoundEffectClass.cs
Normal file
17
TrueCraft.API/Logic/SoundEffectClass.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
|
||||
namespace TrueCraft.API.Logic
|
||||
{
|
||||
public enum SoundEffectClass
|
||||
{
|
||||
None,
|
||||
Cloth,
|
||||
Grass,
|
||||
Gravel,
|
||||
Sand,
|
||||
Snow,
|
||||
Stone,
|
||||
Wood,
|
||||
Glass
|
||||
}
|
||||
}
|
@ -40,7 +40,7 @@
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="YamlDotNet">
|
||||
<HintPath>..\packages\YamlDotNet.3.6.1\lib\net35\YamlDotNet.dll</HintPath>
|
||||
<HintPath>..\packages\YamlDotNet.3.7.0\lib\net35\YamlDotNet.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -122,6 +122,7 @@
|
||||
<Compile Include="Physics\IPhysicsEngine.cs" />
|
||||
<Compile Include="Physics\IPhysicsEntity.cs" />
|
||||
<Compile Include="Physics\IAABBEntity.cs" />
|
||||
<Compile Include="Logic\SoundEffectClass.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup />
|
||||
@ -131,11 +132,11 @@
|
||||
<Name>fNbt</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="AI\" />
|
||||
<Folder Include="Physics\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="YamlDotNet" version="3.6.1" targetFramework="net45" />
|
||||
<package id="YamlDotNet" version="3.7.0" targetFramework="net45" />
|
||||
</packages>
|
@ -5,6 +5,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using TrueCraft.Core;
|
||||
using Microsoft.Xna.Framework.Content;
|
||||
using NVorbis;
|
||||
|
||||
namespace TrueCraft.Client
|
||||
{
|
||||
@ -25,21 +26,47 @@ namespace TrueCraft.Client
|
||||
{
|
||||
string[][] packs = new[]
|
||||
{
|
||||
// TODO: step sound effects for cloth, sand, gravel, snow, wood
|
||||
new[]
|
||||
{
|
||||
"grass",
|
||||
"footstep_dirt_0.wav",
|
||||
"footstep_dirt_1.wav",
|
||||
"footstep_dirt_2.wav",
|
||||
"footstep.cloth",
|
||||
"default_sand_footstep.1.ogg", "default_sand_footstep.2.ogg" // TODO: Cloth sound effects
|
||||
},
|
||||
new[]
|
||||
{
|
||||
"stone",
|
||||
"footstep_stone_0.wav",
|
||||
"footstep_stone_1.wav",
|
||||
"footstep_stone_2.wav",
|
||||
"footstep.grass",
|
||||
"default_grass_footstep.1.ogg", "default_grass_footstep.2.ogg", "default_grass_footstep.3.ogg"
|
||||
},
|
||||
new[]
|
||||
{
|
||||
"footstep.gravel",
|
||||
"default_gravel_footstep.1.ogg", "default_gravel_footstep.2.ogg", "default_gravel_footstep.3.ogg",
|
||||
"default_gravel_footstep.4.ogg"
|
||||
},
|
||||
new[]
|
||||
{
|
||||
"footstep.sand",
|
||||
"default_sand_footstep.1.ogg", "default_sand_footstep.2.ogg"
|
||||
},
|
||||
new[]
|
||||
{
|
||||
"footstep.snow",
|
||||
"default_snow_footstep.1.ogg", "default_snow_footstep.2.ogg", "default_snow_footstep.3.ogg"
|
||||
},
|
||||
new[]
|
||||
{
|
||||
"footstep.stone",
|
||||
"default_hard_footstep.1.ogg", "default_hard_footstep.2.ogg", "default_hard_footstep.3.ogg"
|
||||
},
|
||||
new[]
|
||||
{
|
||||
"footstep.wood",
|
||||
"default_wood_footstep.1.ogg", "default_wood_footstep.2.ogg"
|
||||
},
|
||||
new[]
|
||||
{
|
||||
"footstep.glass",
|
||||
"default_glass_footstep.ogg"
|
||||
}
|
||||
};
|
||||
foreach (var pack in packs)
|
||||
{
|
||||
@ -48,22 +75,46 @@ namespace TrueCraft.Client
|
||||
}
|
||||
}
|
||||
|
||||
private SoundEffect LoadOgg(Stream stream)
|
||||
{
|
||||
using (var reader = new VorbisReader(stream, false))
|
||||
{
|
||||
float[] _buffer = new float[reader.TotalSamples];
|
||||
byte[] buffer = new byte[reader.TotalSamples * 2];
|
||||
reader.ReadSamples(_buffer, 0, _buffer.Length);
|
||||
for (int i = 0; i < _buffer.Length; i++)
|
||||
{
|
||||
short val = (short)Math.Max(Math.Min(short.MaxValue * _buffer[i], short.MaxValue), short.MinValue);
|
||||
var decoded = BitConverter.GetBytes(val);
|
||||
buffer[i * 2] = decoded[0];
|
||||
buffer[i * 2 + 1] = decoded[1];
|
||||
}
|
||||
return new SoundEffect(buffer, reader.SampleRate, reader.Channels == 1 ? AudioChannels.Mono : AudioChannels.Stereo);
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadAudioPack(string pack, string[] filenames)
|
||||
{
|
||||
var effects = new SoundEffect[filenames.Length];
|
||||
for (int i = 0; i < filenames.Length; i++)
|
||||
{
|
||||
using (var f = File.OpenRead(Path.Combine("Content", "Audio", filenames[i])))
|
||||
effects[i] = SoundEffect.FromStream(f);
|
||||
{
|
||||
if (filenames[i].EndsWith(".wav"))
|
||||
effects[i] = SoundEffect.FromStream(f);
|
||||
else if (filenames[i].EndsWith(".ogg"))
|
||||
effects[i] = LoadOgg(f);
|
||||
}
|
||||
}
|
||||
AudioPacks[pack] = effects;
|
||||
}
|
||||
|
||||
public void PlayPack(string pack)
|
||||
public void PlayPack(string pack, float volume = 1.0f)
|
||||
{
|
||||
var i = MathHelper.Random.Next(0, AudioPacks[pack].Length);
|
||||
i = 0;
|
||||
AudioPacks[pack][i].Play();
|
||||
var instance = AudioPacks[pack][i].CreateInstance();
|
||||
instance.Volume = volume * EffectVolume;
|
||||
instance.Play();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1 @@
|
||||
Dirt and Stone footsteps CC-BY-SA from http://www.littlerobotsoundfactory.com/
|
||||
Snow footsteps CC-BY-SA & public domain from http://freesound.org/people/iujhu/
|
||||
Wood footsteps CC-BY-SA from http://www.ronaldvanwonderen.com/ and http://freesound.org/people/wildweasel/
|
||||
Cloth footsteps CC-0/public domain from http://freesound.org/people/Yuval/
|
||||
The footstep and mining/placement sound effects were sourced from Minetest under CC-BY-SA: https://github.com/minetest/minetest_game
|
BIN
TrueCraft.Client/Content/Audio/default_break_glass.1.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_break_glass.1.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_break_glass.2.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_break_glass.2.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_break_glass.3.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_break_glass.3.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_cool_lava.1.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_cool_lava.1.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_cool_lava.2.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_cool_lava.2.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_cool_lava.3.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_cool_lava.3.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_dig_choppy.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_dig_choppy.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_dig_cracky.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_dig_cracky.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_dig_crumbly.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_dig_crumbly.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_dig_dig_immediate.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_dig_dig_immediate.ogg
Normal file
Binary file not shown.
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_dirt_footstep.1.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_dirt_footstep.1.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_dirt_footstep.2.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_dirt_footstep.2.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_dug_node.1.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_dug_node.1.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_dug_node.2.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_dug_node.2.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_glass_footstep.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_glass_footstep.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_grass_footstep.1.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_grass_footstep.1.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_grass_footstep.2.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_grass_footstep.2.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_grass_footstep.3.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_grass_footstep.3.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_gravel_footstep.1.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_gravel_footstep.1.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_gravel_footstep.2.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_gravel_footstep.2.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_gravel_footstep.3.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_gravel_footstep.3.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_gravel_footstep.4.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_gravel_footstep.4.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_hard_footstep.1.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_hard_footstep.1.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_hard_footstep.2.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_hard_footstep.2.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_hard_footstep.3.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_hard_footstep.3.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_place_node.1.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_place_node.1.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_place_node.2.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_place_node.2.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_place_node.3.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_place_node.3.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_place_node_hard.1.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_place_node_hard.1.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_place_node_hard.2.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_place_node_hard.2.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_sand_footstep.1.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_sand_footstep.1.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_sand_footstep.2.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_sand_footstep.2.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_snow_footstep.1.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_snow_footstep.1.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_snow_footstep.2.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_snow_footstep.2.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_snow_footstep.3.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_snow_footstep.3.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_wood_footstep.1.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_wood_footstep.1.ogg
Normal file
Binary file not shown.
BIN
TrueCraft.Client/Content/Audio/default_wood_footstep.2.ogg
Normal file
BIN
TrueCraft.Client/Content/Audio/default_wood_footstep.2.ogg
Normal file
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.
@ -8,6 +8,8 @@ using XVector3 = Microsoft.Xna.Framework.Vector3;
|
||||
using TrueCraft.API;
|
||||
using TrueCraft.Core.Logic;
|
||||
using TrueCraft.Core.Networking.Packets;
|
||||
using TrueCraft.Core.Logic.Blocks;
|
||||
using TrueCraft.API.Logic;
|
||||
|
||||
namespace TrueCraft.Client.Modules
|
||||
{
|
||||
@ -266,6 +268,19 @@ namespace TrueCraft.Client.Modules
|
||||
return false;
|
||||
}
|
||||
|
||||
private void PlayFootstep()
|
||||
{
|
||||
var coords = (Coordinates3D)Game.Client.BoundingBox.Min.Floor();
|
||||
var target = Game.Client.World.GetBlockID(coords);
|
||||
if (target == AirBlock.BlockID)
|
||||
target = Game.Client.World.GetBlockID(coords + Coordinates3D.Down);
|
||||
var provider = Game.BlockRepository.GetBlockProvider(target);
|
||||
if (provider.SoundEffect == SoundEffectClass.None)
|
||||
return;
|
||||
var effect = string.Format("footstep.{0}", Enum.GetName(typeof(SoundEffectClass), provider.SoundEffect).ToLower());
|
||||
Game.Audio.PlayPack(effect, 0.1f);
|
||||
}
|
||||
|
||||
public override void Update(GameTime gameTime)
|
||||
{
|
||||
var delta = Delta;
|
||||
@ -331,12 +346,13 @@ namespace TrueCraft.Client.Modules
|
||||
lookAt.X *= (float)(gameTime.ElapsedGameTime.TotalSeconds * 4.3717);
|
||||
lookAt.Z *= (float)(gameTime.ElapsedGameTime.TotalSeconds * 4.3717);
|
||||
|
||||
var bobbing = Game.Bobbing;
|
||||
Game.Bobbing += Math.Max(Math.Abs(lookAt.X), Math.Abs(lookAt.Z));
|
||||
|
||||
Game.Client.Velocity = new TVector3(lookAt.X, Game.Client.Velocity.Y, lookAt.Z);
|
||||
|
||||
if ((int)Game.Bobbing % 2 == 0)
|
||||
Game.Audio.PlayPack("grass");
|
||||
if ((int)bobbing % 2 == 0 && (int)Game.Bobbing % 2 != 0)
|
||||
PlayFootstep();
|
||||
}
|
||||
else
|
||||
Game.Client.Velocity *= new TVector3(0, 1, 0);
|
||||
|
@ -76,6 +76,9 @@
|
||||
<Reference Include="MonoGame.Framework">
|
||||
<HintPath>..\packages\MonoGame.Framework.Linux.3.4.0.459\lib\net40\MonoGame.Framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NVorbis">
|
||||
<HintPath>..\packages\NVorbis.0.8.4.0\lib\NVorbis.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Input\KeyboardEventArgs.cs" />
|
||||
@ -246,22 +249,118 @@
|
||||
<Content Include="Content\Audio\credits.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\footstep_dirt_0.wav">
|
||||
<Content Include="Content\Audio\default_break_glass.1.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\footstep_dirt_1.wav">
|
||||
<Content Include="Content\Audio\default_break_glass.2.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\footstep_dirt_2.wav">
|
||||
<Content Include="Content\Audio\default_break_glass.3.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\footstep_stone_0.wav">
|
||||
<Content Include="Content\Audio\default_cool_lava.1.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\footstep_stone_1.wav">
|
||||
<Content Include="Content\Audio\default_cool_lava.2.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\footstep_stone_2.wav">
|
||||
<Content Include="Content\Audio\default_cool_lava.3.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_dig_choppy.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_dig_cracky.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_dig_crumbly.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_dig_dig_immediate.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_dig_oddly_breakable_by_hand.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_dirt_footstep.1.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_dirt_footstep.2.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_dug_node.1.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_dug_node.2.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_glass_footstep.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_grass_footstep.1.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_grass_footstep.2.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_grass_footstep.3.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_gravel_footstep.1.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_gravel_footstep.2.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_gravel_footstep.3.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_gravel_footstep.4.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_hard_footstep.1.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_hard_footstep.2.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_hard_footstep.3.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_place_node.1.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_place_node.2.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_place_node.3.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_place_node_hard.1.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_place_node_hard.2.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_sand_footstep.1.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_sand_footstep.2.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_snow_footstep.1.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_snow_footstep.2.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_snow_footstep.3.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_wood_footstep.1.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Content\Audio\default_wood_footstep.2.ogg">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
@ -358,7 +358,7 @@ namespace TrueCraft.Client
|
||||
|
||||
private void UpdateCamera()
|
||||
{
|
||||
const double bobbingMultiplier = 0.015;
|
||||
const double bobbingMultiplier = 0.05;
|
||||
|
||||
var bobbing = Bobbing * 1.5;
|
||||
var xbob = Math.Cos(bobbing + Math.PI / 2) * bobbingMultiplier;
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MonoGame.Framework.Linux" version="3.4.0.459" targetFramework="net45" userInstalled="true" />
|
||||
<package id="MonoGame.Framework.WindowsGL" version="3.4.0.459" targetFramework="net45" userInstalled="true" />
|
||||
<package id="MonoGame.Framework.MacOS" version="3.4.0.459" targetFramework="net45" userInstalled="true" />
|
||||
</packages>
|
||||
<package id="MonoGame.Framework.WindowsGL" version="3.4.0.459" targetFramework="net45" userInstalled="true" />
|
||||
<package id="NVorbis" version="0.8.4.0" targetFramework="net45" />
|
||||
</packages>
|
@ -204,6 +204,8 @@ namespace TrueCraft.Core.Logic
|
||||
return Coordinates3D.Zero;
|
||||
}
|
||||
|
||||
public virtual SoundEffectClass SoundEffect { get { return SoundEffectClass.Stone; } }
|
||||
|
||||
/// <summary>
|
||||
/// The maximum amount that can be in a single stack of this block.
|
||||
/// </summary>
|
||||
|
@ -22,6 +22,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override BoundingBox? BoundingBox { get { return null; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.None;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(0, 0);
|
||||
|
@ -39,6 +39,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Bed"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(6, 8);
|
||||
|
@ -19,6 +19,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Bookshelf"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Flammable { get { return true; } }
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
|
@ -30,6 +30,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Cactus"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Cloth;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(6, 4);
|
||||
|
@ -23,6 +23,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Cake"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Cloth;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(9, 7);
|
||||
|
@ -27,6 +27,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Chest"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(10, 1);
|
||||
|
@ -20,6 +20,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Clay"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Gravel;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(8, 4);
|
||||
|
@ -21,6 +21,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Crafting Table"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool BlockRightClicked(BlockDescriptor descriptor, BlockFace face, IWorld world, IRemoteClient user)
|
||||
{
|
||||
var window = new CraftingBenchWindow(user.Server.CraftingRepository, (InventoryWindow)user.Inventory);
|
||||
|
@ -24,6 +24,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Crops"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Grass;
|
||||
}
|
||||
}
|
||||
|
||||
public override BoundingBox? BoundingBox { get { return null; } }
|
||||
|
||||
public override BoundingBox? InteractiveBoundingBox
|
||||
|
@ -20,6 +20,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Flower"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Grass;
|
||||
}
|
||||
}
|
||||
|
||||
public override BoundingBox? BoundingBox { get { return null; } }
|
||||
|
||||
public override BoundingBox? InteractiveBoundingBox
|
||||
|
@ -20,6 +20,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Dead Bush"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Grass;
|
||||
}
|
||||
}
|
||||
|
||||
public override BoundingBox? BoundingBox { get { return null; } }
|
||||
|
||||
public override BoundingBox? InteractiveBoundingBox
|
||||
|
@ -17,6 +17,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Dirt"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Gravel;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(2, 0);
|
||||
|
@ -44,6 +44,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Wooden Door"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(1, 6);
|
||||
|
@ -30,12 +30,20 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override byte Luminance { get { return 0; } }
|
||||
|
||||
public override bool Opaque { get { return true; } } // TODO: Distinguish between opaque and instantly destroyable
|
||||
public override bool Opaque { get { return true; } }
|
||||
|
||||
public override byte LightOpacity { get { return 255; } }
|
||||
|
||||
public override string DisplayName { get { return "Farmland"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Gravel;
|
||||
}
|
||||
}
|
||||
|
||||
protected override ItemStack[] GetDrop(BlockDescriptor descriptor, ItemStack item)
|
||||
{
|
||||
return new[] { new ItemStack(DirtBlock.BlockID) };
|
||||
|
@ -23,6 +23,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Fence"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(4, 0);
|
||||
|
@ -26,6 +26,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Fire"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood; // Yeah, this is what Minecraft actually uses here
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(15, 1);
|
||||
|
@ -22,6 +22,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override byte LightOpacity { get { return 0; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Glass;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(1, 3);
|
||||
|
@ -21,6 +21,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Glowstone"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Glass;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(9, 6);
|
||||
|
@ -46,6 +46,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Grass"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Grass;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(0, 0);
|
||||
|
@ -23,6 +23,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Gravel"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Gravel;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(3, 1);
|
||||
|
@ -24,6 +24,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Ice"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Glass;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(3, 4);
|
||||
|
@ -24,6 +24,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Jack 'o' Lantern"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(6, 6);
|
||||
|
@ -34,6 +34,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Ladder"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override BoundingBox? BoundingBox { get { return null; } }
|
||||
|
||||
public override BoundingBox? InteractiveBoundingBox
|
||||
|
@ -28,6 +28,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override bool Flammable { get { return true; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Grass;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(4, 3);
|
||||
|
@ -21,6 +21,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Lever"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(0, 6);
|
||||
|
@ -19,6 +19,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Locked Chest"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(10, 1);
|
||||
|
@ -9,6 +9,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
public override double BlastResistance { get { return 0; } }
|
||||
|
||||
public override double Hardness { get { return 0; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Grass;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BrownMushroomBlock : MushroomBlock
|
||||
|
@ -19,6 +19,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Portal"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Glass;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(14, 0);
|
||||
|
@ -23,6 +23,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Wooden Pressure Plate"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack[,] Pattern
|
||||
{
|
||||
get
|
||||
|
@ -20,6 +20,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Pumpkin"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(6, 6);
|
||||
|
@ -19,6 +19,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Redstone Repeater"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(6, 0);
|
||||
|
@ -21,6 +21,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Redstone Torch"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(3, 6);
|
||||
|
@ -20,6 +20,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Rose"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Grass;
|
||||
}
|
||||
}
|
||||
|
||||
public override BoundingBox? BoundingBox { get { return null; } }
|
||||
|
||||
public override BoundingBox? InteractiveBoundingBox
|
||||
|
@ -22,6 +22,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Sand"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Sand;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(2, 1);
|
||||
|
@ -30,6 +30,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Stone Slab"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood; // TODO: Deal with metadata god dammit
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(6, 0);
|
||||
@ -134,6 +142,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Double Stone Slab"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(6, 0);
|
||||
|
@ -19,6 +19,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Snow Block"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Snow;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(2, 4);
|
||||
@ -73,6 +81,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override BoundingBox? BoundingBox { get { return null; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Snow;
|
||||
}
|
||||
}
|
||||
|
||||
public override BoundingBox? InteractiveBoundingBox
|
||||
{
|
||||
get
|
||||
|
@ -17,6 +17,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Soul Sand"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Sand;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(8, 6);
|
||||
|
@ -17,6 +17,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Sponge"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Grass;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(0, 3);
|
||||
|
@ -69,6 +69,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override bool Flammable { get { return true; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public ItemStack[,] Pattern
|
||||
{
|
||||
get
|
||||
|
@ -28,6 +28,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Sugar cane"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Grass;
|
||||
}
|
||||
}
|
||||
|
||||
public override BoundingBox? BoundingBox
|
||||
{
|
||||
get
|
||||
|
@ -19,6 +19,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "TNT"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Grass;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(8, 0);
|
||||
|
@ -28,6 +28,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Tall Grass"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Grass;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Flammable { get { return true; } }
|
||||
|
||||
public override BoundingBox? BoundingBox { get { return null; } }
|
||||
|
@ -35,6 +35,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Torch"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override BoundingBox? BoundingBox { get { return null; } }
|
||||
|
||||
public override void BlockPlaced(BlockDescriptor descriptor, BlockFace face, IWorld world, IRemoteClient user)
|
||||
|
@ -37,6 +37,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Trapdoor"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override Tuple<int, int> GetTextureMap(byte metadata)
|
||||
{
|
||||
return new Tuple<int, int>(4, 5);
|
||||
|
@ -25,6 +25,14 @@ namespace TrueCraft.Core.Logic.Blocks
|
||||
|
||||
public override string DisplayName { get { return "Sign"; } }
|
||||
|
||||
public override SoundEffectClass SoundEffect
|
||||
{
|
||||
get
|
||||
{
|
||||
return SoundEffectClass.Wood;
|
||||
}
|
||||
}
|
||||
|
||||
public override BoundingBox? BoundingBox { get { return null; } }
|
||||
|
||||
public override BoundingBox? InteractiveBoundingBox
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user