mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Fix all warnings & Trim (#2226)
* Fix AutoFishing crash * Fix all warnings * Remove DotNetZip. * Fix the usage of HttpClient.
This commit is contained in:
parent
4aa6c1c99f
commit
1d52d1eadd
227 changed files with 2201 additions and 43564 deletions
|
|
@ -1,8 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using MinecraftClient.Mapping;
|
||||
|
||||
namespace MinecraftClient.Commands
|
||||
|
|
@ -13,11 +10,11 @@ namespace MinecraftClient.Commands
|
|||
public override string CmdUsage { get { return "look <x y z|yaw pitch|up|down|east|west|north|south>"; } }
|
||||
public override string CmdDesc { get { return "cmd.look.desc"; } }
|
||||
|
||||
public override string Run(McClient handler, string command, Dictionary<string, object> localVars)
|
||||
public override string Run(McClient handler, string command, Dictionary<string, object>? localVars)
|
||||
{
|
||||
if (handler.GetTerrainEnabled())
|
||||
{
|
||||
string[] args = getArgs(command);
|
||||
string[] args = GetArgs(command);
|
||||
if (args.Length == 0)
|
||||
{
|
||||
const double maxDistance = 8.0;
|
||||
|
|
@ -33,7 +30,7 @@ namespace MinecraftClient.Commands
|
|||
}
|
||||
else if (args.Length == 1)
|
||||
{
|
||||
string dirStr = getArg(command).Trim().ToLower();
|
||||
string dirStr = GetArg(command).Trim().ToLower();
|
||||
Direction direction;
|
||||
switch (dirStr)
|
||||
{
|
||||
|
|
@ -53,8 +50,8 @@ namespace MinecraftClient.Commands
|
|||
{
|
||||
try
|
||||
{
|
||||
float yaw = Single.Parse(args[0]);
|
||||
float pitch = Single.Parse(args[1]);
|
||||
float yaw = float.Parse(args[0]);
|
||||
float pitch = float.Parse(args[1]);
|
||||
|
||||
handler.UpdateLocation(handler.GetCurrentLocation(), yaw, pitch);
|
||||
return Translations.Get("cmd.look.at", yaw.ToString("0.00"), pitch.ToString("0.00"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue