mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 05:33:00 +00:00 
			
		
		
		
	Merge branch 'mc-1.17.x' into mc-1.18.x
This commit is contained in:
		| @@ -18,7 +18,7 @@ representable value. | |||||||
| 
 | 
 | ||||||
| This representation of sound - a long, uniformally sampled list of amplitudes is referred to as [Pulse-code | This representation of sound - a long, uniformally sampled list of amplitudes is referred to as [Pulse-code | ||||||
| Modulation][PCM] (PCM). PCM can be thought of as the "standard" audio format, as it's incredibly easy to work with. For | Modulation][PCM] (PCM). PCM can be thought of as the "standard" audio format, as it's incredibly easy to work with. For | ||||||
| instance, to mix two pieces of audio together, you can just samples from the two tracks together and take the average. | instance, to mix two pieces of audio together, you can just add samples from the two tracks together and take the average. | ||||||
| 
 | 
 | ||||||
| CC: Tweaked's speakers also work with PCM audio. It plays back 48,000 samples a second, where each sample is an integer | CC: Tweaked's speakers also work with PCM audio. It plays back 48,000 samples a second, where each sample is an integer | ||||||
| between -128 and 127. This is more commonly referred to as 48kHz and an 8-bit resolution. | between -128 and 127. This is more commonly referred to as 48kHz and an 8-bit resolution. | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| org.gradle.jvmargs=-Xmx3G | org.gradle.jvmargs=-Xmx3G | ||||||
|  |  | ||||||
| # Mod properties | # Mod properties | ||||||
| mod_version=1.100.1 | mod_version=1.100.2 | ||||||
|  |  | ||||||
| # Minecraft properties (update mods.toml when changing) | # Minecraft properties (update mods.toml when changing) | ||||||
| mc_version=1.18.1 | mc_version=1.18.1 | ||||||
|   | |||||||
| @@ -59,7 +59,7 @@ public enum CableModemVariant implements StringRepresentable | |||||||
|     @Nonnull |     @Nonnull | ||||||
|     public static CableModemVariant from( Direction facing, boolean modem, boolean peripheral ) |     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()]; |         return facing == null ? None : VALUES[1 + 6 * state + facing.get3DDataValue()]; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|   | |||||||
| @@ -5,9 +5,9 @@ | |||||||
|  */ |  */ | ||||||
| package dan200.computercraft.shared.util; | package dan200.computercraft.shared.util; | ||||||
| 
 | 
 | ||||||
|  | import com.google.common.io.BaseEncoding; | ||||||
| import dan200.computercraft.ComputerCraft; | import dan200.computercraft.ComputerCraft; | ||||||
| import net.minecraft.nbt.*; | import net.minecraft.nbt.*; | ||||||
| import org.apache.commons.codec.binary.Hex; |  | ||||||
| 
 | 
 | ||||||
| import javax.annotation.Nonnull; | import javax.annotation.Nonnull; | ||||||
| import javax.annotation.Nullable; | import javax.annotation.Nullable; | ||||||
| @@ -22,6 +22,8 @@ import java.util.Map; | |||||||
| 
 | 
 | ||||||
| public final class NBTUtil | public final class NBTUtil | ||||||
| { | { | ||||||
|  |     private static final BaseEncoding ENCODING = BaseEncoding.base16().lowerCase(); | ||||||
|  | 
 | ||||||
|     private NBTUtil() {} |     private NBTUtil() {} | ||||||
| 
 | 
 | ||||||
|     private static Tag toNBTTag( Object object ) |     private static Tag toNBTTag( Object object ) | ||||||
| @@ -177,7 +179,7 @@ public final class NBTUtil | |||||||
|             DataOutput output = new DataOutputStream( new DigestOutputStream( digest ) ); |             DataOutput output = new DataOutputStream( new DigestOutputStream( digest ) ); | ||||||
|             NbtIo.write( tag, output ); |             NbtIo.write( tag, output ); | ||||||
|             byte[] hash = digest.digest(); |             byte[] hash = digest.digest(); | ||||||
|             return new String( Hex.encodeHex( hash ) ); |             return ENCODING.encode( hash ); | ||||||
|         } |         } | ||||||
|         catch( NoSuchAlgorithmException | IOException e ) |         catch( NoSuchAlgorithmException | IOException e ) | ||||||
|         { |         { | ||||||
|   | |||||||
| @@ -39,5 +39,25 @@ | |||||||
|     "chat.computercraft.wired_modem.peripheral_disconnected": "Perifer enhed \"%s\" koblet fra netværk", |     "chat.computercraft.wired_modem.peripheral_disconnected": "Perifer enhed \"%s\" koblet fra netværk", | ||||||
|     "gui.computercraft.tooltip.copy": "Kopier til udklipsholder", |     "gui.computercraft.tooltip.copy": "Kopier til udklipsholder", | ||||||
|     "gui.computercraft.tooltip.computer_id": "Computer-ID: %s", |     "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" | ||||||
| } | } | ||||||
|   | |||||||
| @@ -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 | # New features in CC: Tweaked 1.100.1 | ||||||
| 
 | 
 | ||||||
| Several bug fixes: | Several bug fixes: | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| New features in CC: Tweaked 1.100.1 | New features in CC: Tweaked 1.100.2 | ||||||
| 
 | 
 | ||||||
| Several bug fixes: | Several bug fixes: | ||||||
| * Fix `peripheral.hasType` not working with wired modems (Toad-Dev). | * Fix wired modems swapping the modem/peripheral block state. | ||||||
| * Fix crashes when noisy pocket computer are shutdown. | * Remove debugging logging line from `turtle.attack`. | ||||||
| 
 | 
 | ||||||
| Type "help changelog" to see the full version history. | Type "help changelog" to see the full version history. | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Jonathan Coates
					Jonathan Coates