Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9825953

Browse filesBrowse files
committed
few sound fixes
1 parent 3e22b59 commit 9825953
Copy full SHA for 9825953

9 files changed

+16-7Lines changed: 16 additions & 7 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/MiNET/MiNET.Console/minet.zip‎

Copy file name to clipboard
-1 Bytes
Binary file not shown.
Collapse file

‎src/MiNET/MiNET/Blocks/Chest.cs‎

Copy file name to clipboardExpand all lines: src/MiNET/MiNET/Blocks/Chest.cs
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
using MiNET.Items;
2828
using MiNET.Utils.Vectors;
2929
using MiNET.Worlds;
30-
using System;
3130
using System.Numerics;
3231

3332
namespace MiNET.Blocks
Collapse file

‎src/MiNET/MiNET/Blocks/ChestBase.cs‎

Copy file name to clipboardExpand all lines: src/MiNET/MiNET/Blocks/ChestBase.cs
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
using System.Numerics;
2727
using log4net;
28-
using MiNET.BlockEntities;
2928
using MiNET.Utils.Vectors;
3029
using MiNET.Worlds;
3130

@@ -56,7 +55,13 @@ public override bool Interact(Level world, Player player, BlockCoordinates block
5655
{
5756
Log.Debug($"Opening chest inventory at {blockCoordinates}");
5857
player.OpenInventory(blockCoordinates);
59-
58+
if (this is Chest || this is TrappedChest)
59+
{
60+
world.BroadcastSound(blockCoordinates, LevelSoundEventType.ChestOpen);
61+
}else if (this is EnderChest)
62+
{
63+
world.BroadcastSound(blockCoordinates, LevelSoundEventType.EnderchestOpen);
64+
}
6065
return true;
6166
}
6267
}
Collapse file

‎src/MiNET/MiNET/Blocks/ShulkerBox.cs‎

Copy file name to clipboardExpand all lines: src/MiNET/MiNET/Blocks/ShulkerBox.cs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public override bool PlaceBlock(Level world, Player player, BlockCoordinates blo
5959
public override bool Interact(Level world, Player player, BlockCoordinates blockCoordinates, BlockFace face, Vector3 faceCoord)
6060
{
6161
player.OpenInventory(blockCoordinates);
62+
world.BroadcastSound(blockCoordinates, LevelSoundEventType.ShulkerboxOpen);
6263

6364
return true;
6465
}
Collapse file

‎src/MiNET/MiNET/Blocks/UndyedShulkerBox.cs‎

Copy file name to clipboardExpand all lines: src/MiNET/MiNET/Blocks/UndyedShulkerBox.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626
using System.Numerics;
2727
using MiNET.BlockEntities;
28-
using MiNET.Items;
2928
using MiNET.Utils.Vectors;
3029
using MiNET.Worlds;
3130

@@ -57,6 +56,7 @@ public override bool PlaceBlock(Level world, Player player, BlockCoordinates blo
5756
public override bool Interact(Level world, Player player, BlockCoordinates blockCoordinates, BlockFace face, Vector3 faceCoord)
5857
{
5958
player.OpenInventory(blockCoordinates);
59+
world.BroadcastSound(blockCoordinates, LevelSoundEventType.ShulkerboxOpen);
6060

6161
return true;
6262
}
Collapse file

‎src/MiNET/MiNET/Entities/World/PrimedTnt.cs‎

Copy file name to clipboardExpand all lines: src/MiNET/MiNET/Entities/World/PrimedTnt.cs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ private void Explode()
120120
new Explosion(Level,
121121
new BlockCoordinates((int) Math.Floor(KnownPosition.X), (int) Math.Floor(KnownPosition.Y), (int) Math.Floor(KnownPosition.Z)), 4, Fire)
122122
.Explode();
123+
Level.BroadcastSound(KnownPosition.ToVector3(), LevelSoundEventType.Explode);
123124
}
124125
}
125126
}
Collapse file

‎src/MiNET/MiNET/Items/ItemFlintAndSteel.cs‎

Copy file name to clipboardExpand all lines: src/MiNET/MiNET/Items/ItemFlintAndSteel.cs
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
using MiNET.Blocks;
3232
using MiNET.Entities;
3333
using MiNET.Entities.World;
34-
using MiNET.Utils;
34+
using MiNET.Sounds;
3535
using MiNET.Utils.Vectors;
3636
using MiNET.Worlds;
3737

@@ -53,9 +53,12 @@ public ItemFlintAndSteel() : base("minecraft:flint_and_steel", 259)
5353
public override void PlaceBlock(Level world, Player player, BlockCoordinates blockCoordinates, BlockFace face, Vector3 faceCoords)
5454
{
5555
var block = world.GetBlock(blockCoordinates);
56+
world.BroadcastSound(blockCoordinates, LevelSoundEventType.Ignite);
5657
if (block is Tnt)
5758
{
5859
world.SetAir(block.Coordinates);
60+
var sound = new Sound((short) LevelEventType.SoundFuse, blockCoordinates);
61+
sound.Spawn(world);
5962
new PrimedTnt(world)
6063
{
6164
KnownPosition = new PlayerLocation
Collapse file

‎src/MiNET/MiNET/LoginMessageHandler.cs‎

Copy file name to clipboardExpand all lines: src/MiNET/MiNET/LoginMessageHandler.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public void Disconnect(string reason, bool sendDisconnect = true)
7676

7777
public virtual void HandleMcpeRequestNetworkSettings(McpeRequestNetworkSettings message)
7878
{
79-
Log.Warn(message.protocolVersion);
79+
//Log.Warn(message.protocolVersion);
8080
//_playerInfo.ProtocolVersion = message.protocolVersion;
8181
/*if (_playerInfo.ProtocolVersion < McpeProtocolInfo.ProtocolVersion || _playerInfo.ProtocolVersion > 65535)
8282
{
Collapse file

‎src/MiNET/MiNET/Net/RakNet/Datagram.cs‎

Copy file name to clipboardExpand all lines: src/MiNET/MiNET/Net/RakNet/Datagram.cs
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ public static IEnumerable<Datagram> CreateDatagrams(List<Packet> messages, int m
260260

261261
public static IEnumerable<Datagram> CreateDatagrams(Packet message, int mtuSize, RakSession session)
262262
{
263-
Log.Warn($"CreateDatagrams single message");
263+
//Log.Warn($"CreateDatagrams single message");
264264
Datagram datagram = CreateObject();
265265

266266
List<MessagePart> messageParts = CreateMessageParts(message, mtuSize, session);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.