1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-09-01 18:17:55 +00:00

Merge remote-tracking branch 'CC-Tweaked/mc-1.18.x' into mc-1.18.x/stable

This commit is contained in:
Toad-Dev
2022-01-20 15:44:23 -08:00
6 changed files with 36 additions and 14 deletions

View File

@@ -59,7 +59,7 @@ public enum CableModemVariant implements StringRepresentable
@Nonnull
public static CableModemVariant from( Direction facing, boolean modem, boolean peripheral )
{
int state = (modem ? 2 : 0) + (peripheral ? 1 : 0);
int state = (modem ? 1 : 0) + (peripheral ? 2 : 0);
return facing == null ? None : VALUES[1 + 6 * state + facing.get3DDataValue()];
}

View File

@@ -5,6 +5,7 @@
*/
package dan200.computercraft.shared.util;
import com.google.common.io.BaseEncoding;
import dan200.computercraft.ComputerCraft;
import net.minecraft.nbt.*;
@@ -21,6 +22,8 @@ import java.util.Map;
public final class NBTUtil
{
private static final BaseEncoding ENCODING = BaseEncoding.base16().lowerCase();
private NBTUtil() {}
private static Tag toNBTTag( Object object )
@@ -176,7 +179,7 @@ public final class NBTUtil
DataOutput output = new DataOutputStream( new DigestOutputStream( digest ) );
NbtIo.write( tag, output );
byte[] hash = digest.digest();
return encodeHex( hash );
return ENCODING.encode( hash );
}
catch( NoSuchAlgorithmException | IOException e )
{
@@ -185,13 +188,6 @@ public final class NBTUtil
}
}
private static String encodeHex( byte[] bytes )
{
StringBuilder result = new StringBuilder();
for ( byte b : bytes ) result.append( String.format( "%02x", b ) );
return result.toString();
}
private static final class DigestOutputStream extends OutputStream
{
private final MessageDigest digest;

View File

@@ -39,5 +39,25 @@
"chat.computercraft.wired_modem.peripheral_disconnected": "Perifer enhed \"%s\" koblet fra netværk",
"gui.computercraft.tooltip.copy": "Kopier til udklipsholder",
"gui.computercraft.tooltip.computer_id": "Computer-ID: %s",
"gui.computercraft.tooltip.disk_id": "Disk-ID: %s"
"gui.computercraft.tooltip.disk_id": "Disk-ID: %s",
"gui.computercraft.tooltip.turn_on": "Tænd denne computer",
"gui.computercraft.tooltip.turn_off": "Sluk denne computer",
"gui.computercraft.tooltip.terminate.key": "Hold Ctrl+T nede",
"gui.computercraft.tooltip.turn_off.key": "Hold Ctrl+S nede",
"gui.computercraft.tooltip.terminate": "Stop den igangværende kode",
"gui.computercraft.tooltip.turn_on.key": "Hold Ctrl+R nede",
"gui.computercraft.upload.overwrite_button": "Overskriv",
"gui.computercraft.upload.overwrite.detail": "Følgende filer vil blive overskrevet ved upload. Fortsæt?%s",
"gui.computercraft.upload.success": "Upload Lykkedes",
"gui.computercraft.upload.overwrite": "Filer ville blive overskrevet",
"gui.computercraft.upload.failed.out_of_space": "Ikke nok plads på computeren til disse filer.",
"gui.computercraft.upload.failed.computer_off": "Du skal tænde computeren, før du kan uploade filer.",
"gui.computercraft.upload.failed.too_much": "Dine filer er for store til at blive uploadet.",
"gui.computercraft.upload.failed.overwrite_dir": "Kan ikke uploade %s, da der allerede er en mappe med det samme navn.",
"gui.computercraft.upload.success.msg": "%d filer uploadet.",
"gui.computercraft.upload.failed": "Upload Fejlede",
"gui.computercraft.upload.failed.name_too_long": "Filnavne er for lange til at blive uploadet.",
"gui.computercraft.upload.failed.too_many_files": "Kan ikke uploade så mange filer.",
"gui.computercraft.pocket_computer_overlay": "Lommecomputer åben. Tryk ESC for at lukke.",
"itemGroup.computercraft": "ComputerCraft"
}

View File

@@ -1,3 +1,9 @@
# New features in CC: Tweaked 1.100.2
Several bug fixes:
* Fix wired modems swapping the modem/peripheral block state.
* Remove debugging logging line from `turtle.attack`.
# New features in CC: Tweaked 1.100.1
Several bug fixes:

View File

@@ -1,7 +1,7 @@
New features in CC: Tweaked 1.100.1
New features in CC: Tweaked 1.100.2
Several bug fixes:
* Fix `peripheral.hasType` not working with wired modems (Toad-Dev).
* Fix crashes when noisy pocket computer are shutdown.
* Fix wired modems swapping the modem/peripheral block state.
* Remove debugging logging line from `turtle.attack`.
Type "help changelog" to see the full version history.