This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2016-09-20 18:59:59,577 DEBUG MiNET.Client.MiNetClient - Command JSON: | |
{ | |
"ability": { | |
"versions": [ | |
{ | |
"description": "commands.ability.description", | |
"overloads": { | |
"default": { | |
"input": { | |
"parameters": [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Result: 1 | |
Items { | |
TemplateId: "BADGE_BATTLE_ATTACK_WON" | |
Badge { | |
BadgeType: BADGE_BATTLE_ATTACK_WON | |
BadgeRanks: 4 | |
Targets: "\nd\350\007" | |
} | |
} | |
Items { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Hologram : Mob | |
{ | |
public UUID Uuid { get; private set; } | |
public string Name { get; private set; } | |
public bool Silent { get; set; } | |
public bool HideNameTag { get; set; } | |
public bool NoAi { get; set; } | |
public Hologram(Level level) : base(63, level) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CountDownTimer | |
{ | |
private Stopwatch _startTimer; | |
private TimeSpan _delay; | |
private long _currentTick; | |
private readonly int _skipTicks; | |
private readonly Action<TimeSpan> _tickAction; | |
private readonly Action _endAction; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var clientKey = CreateEcDiffieHellmanPublicKey("MHYwEAYHKoZIzj0CAQYFK4EEACIDYgAEDEKneqEvcqUqqFMM1HM1A4zWjJC+I8Y+aKzG5dl+6wNOHHQ4NmG2PEXRJYhujyodFH+wO0dEr4GM1WoaWog8xsYQ6mQJAC0eVpBM96spUB1eMN56+BwlJ4H3Qx4TAvAs"); | |
private ECDiffieHellmanPublicKey CreateEcDiffieHellmanPublicKey(string clientPubKeyString) | |
{ | |
byte[] clientPublicKeyBlob = Base64Url.Decode(clientPubKeyString); | |
clientPublicKeyBlob = FixPublicKey(clientPublicKeyBlob.Skip(23).ToArray()); | |
ECDiffieHellmanPublicKey clientKey = ECDiffieHellmanCngPublicKey.FromByteArray(clientPublicKeyBlob, CngKeyBlobFormat.EccPublicBlob); | |
return clientKey; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TextEntity : Entity | |
{ | |
public TextEntity(Level level, string text, Vector3 pos) : base(64, level) | |
{ | |
NameTag = text; | |
KnownPosition = new PlayerLocation(pos); | |
HealthManager = new NoDamageHealthManager(this); | |
} | |
public override void OnTick() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#DO NOT REMOVE THIS LINE - MiNET Config | |
#WorldProvider=anvil | |
WorldProvider=flat | |
ViewDistance=250 | |
#PCWorldFolder=D:\Downloads\KingsLanding1\KingsLanding1 | |
#PCWaterOffset=30 | |
#PCWorldFolder=D:\Development\Worlds\MiniGames\Capture the flag | |
#PCWorldFolder=D:\Development\Worlds\MiniGames\Castle Wars | |
#PCWorldFolder=D:\Development\Worlds\MiniGames\King of the hill |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Threading.Tasks; | |
using MiNET; | |
using MiNET.BlockEntities; | |
using MiNET.Blocks; | |
using MiNET.Utils; | |
using MiNET.Worlds; | |
namespace TestPlugin.MobHunt | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Plugin] | |
public class PlayerLoginPlugin | |
{ | |
private static readonly ILog Log = LogManager.GetLogger(typeof (PlayerLoginPlugin)); | |
[PacketHandler] | |
public Package OnLogin(McpeLogin packet, Player newPlayer) | |
{ | |
Log.InfoFormat("Player {0} connected from {1}", newPlayer.Username, newPlayer.EndPoint.Address); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Reflection; | |
using System.Runtime.Serialization; | |
using System.Runtime.Serialization.Json; | |
using System.Xml.Serialization; | |
using log4net; | |
using MiNET.Plugins; |