mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fix AutoDig
This commit is contained in:
parent
d7471e3741
commit
e954801a0d
5 changed files with 55 additions and 24 deletions
|
|
@ -33,7 +33,7 @@ namespace MinecraftClient.ChatBots
|
|||
[TomlInlineComment("$config.ChatBot.AutoDig.Mode$")]
|
||||
public ModeType Mode = ModeType.lookat;
|
||||
|
||||
[TomlInlineComment("$config.ChatBot.AutoDig.Locations$")]
|
||||
[TomlPrecedingComment("$config.ChatBot.AutoDig.Locations$")]
|
||||
public Coordination[] Locations = new Coordination[] { new(123.5, 64, 234.5), new(124.5, 63, 235.5) };
|
||||
|
||||
[TomlInlineComment("$config.ChatBot.AutoDig.Location_Order$")]
|
||||
|
|
|
|||
|
|
@ -749,10 +749,13 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
// Teleport confirm packet
|
||||
SendPacket(PacketTypesOut.TeleportConfirm, dataTypes.GetVarInt(teleportID));
|
||||
if (Config.Main.Advanced.TemporaryFixBadpacket)
|
||||
{
|
||||
SendLocationUpdate(location, true, yaw, pitch, true);
|
||||
if (teleportID == 1)
|
||||
SendLocationUpdate(location, true, yaw, pitch, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
handler.UpdateLocation(location, yaw, pitch);
|
||||
|
|
@ -2550,7 +2553,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
/// <returns>True if the location update was successfully sent</returns>
|
||||
public bool SendLocationUpdate(Location location, bool onGround, float? yaw, float? pitch)
|
||||
{
|
||||
return SendLocationUpdate(location, onGround, yaw, pitch, false);
|
||||
return SendLocationUpdate(location, onGround, yaw, pitch, true);
|
||||
}
|
||||
|
||||
public bool SendLocationUpdate(Location location, bool onGround, float? yaw = null, float? pitch = null, bool forceUpdate = false)
|
||||
|
|
@ -2560,6 +2563,8 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
byte[] yawpitch = Array.Empty<byte>();
|
||||
PacketTypesOut packetType = PacketTypesOut.PlayerPosition;
|
||||
|
||||
if (Config.Main.Advanced.TemporaryFixBadpacket)
|
||||
{
|
||||
if (yaw.HasValue && pitch.HasValue && (forceUpdate || yaw.Value != LastYaw || pitch.Value != LastPitch))
|
||||
{
|
||||
yawpitch = dataTypes.ConcatBytes(dataTypes.GetFloat(yaw.Value), dataTypes.GetFloat(pitch.Value));
|
||||
|
|
@ -2567,6 +2572,17 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
|
||||
LastYaw = yaw.Value; LastPitch = pitch.Value;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (yaw.HasValue && pitch.HasValue)
|
||||
{
|
||||
yawpitch = dataTypes.ConcatBytes(dataTypes.GetFloat(yaw.Value), dataTypes.GetFloat(pitch.Value));
|
||||
packetType = PacketTypesOut.PlayerPositionAndRotation;
|
||||
|
||||
LastYaw = yaw.Value; LastPitch = pitch.Value;
|
||||
}
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5649,6 +5649,15 @@ namespace MinecraftClient {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Temporary fix for Badpacket issue on some servers..
|
||||
/// </summary>
|
||||
internal static string config_Main_Advanced_temporary_fix_badpacket {
|
||||
get {
|
||||
return ResourceManager.GetString("config.Main.Advanced.temporary_fix_badpacket", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Use "none", "bit_4", "bit_8" or "bit_24". This can be checked by opening the debug log..
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -60,45 +60,45 @@
|
|||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0"/>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string"/>
|
||||
<xsd:attribute name="type" type="xsd:string"/>
|
||||
<xsd:attribute name="mimetype" type="xsd:string"/>
|
||||
<xsd:attribute ref="xml:space"/>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string"/>
|
||||
<xsd:attribute name="name" type="xsd:string"/>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/>
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
|
||||
<xsd:attribute ref="xml:space"/>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
|
|
@ -2669,4 +2669,7 @@ Logging in...</value>
|
|||
<data name="mcc.backup_old_config" xml:space="preserve">
|
||||
<value>The old MinecraftClient.ini has been backed up as {0}</value>
|
||||
</data>
|
||||
<data name="config.Main.Advanced.temporary_fix_badpacket" xml:space="preserve">
|
||||
<value>Temporary fix for Badpacket issue on some servers.</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
@ -508,6 +508,9 @@ namespace MinecraftClient
|
|||
[TomlInlineComment("$config.Main.Advanced.movement_speed$")]
|
||||
public int MovementSpeed = 2;
|
||||
|
||||
[TomlInlineComment("$config.Main.Advanced.temporary_fix_badpacket$")]
|
||||
public bool TemporaryFixBadpacket = false;
|
||||
|
||||
[TomlInlineComment("$config.Main.Advanced.inventory_handling$")]
|
||||
public bool InventoryHandling = false;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue