-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'local-1.7/master-MC1.7.10' into master-…
…MC1.12
- Loading branch information
Showing
17 changed files
with
534 additions
and
111 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,12 @@ | ||
## New features | ||
|
||
* [#3533] Added support for observing the contents of fluid container items. | ||
* [1.12.2] Ported some CoFH Core, Ender IO and Railcraft drivers and wrench support. | ||
* Added Railcraft Anchor/Worldspike driver (repo-alt). | ||
* Added Spanish translation (sanmofe). | ||
|
||
## Fixes/improvements | ||
|
||
* [#3620] Fixed OC 1.8.0+ regression involving API arguments and numbers. | ||
* [#3013] Fixed rare server-side deadlock when sending disk activity update packets. | ||
* Fixed bugs in internal wcwidth() implementation and updated it to cover Unicode 12. | ||
* [1.7.10] Fixed the Database upgrade's documentation not showing up in NEI. | ||
* Fixed server->client synchronization for some types of GPU bitblt operations. | ||
* Fixed string.gmatch not supporting the "init" argument on Lua 5.4. | ||
* Tweaks to server->client networking code: | ||
* Added support for configuring the maximum packet distance for effects, sounds, and all client packets. | ||
* Improved the method of synchronizing tile entity updates with the client. | ||
* Robot light colors are now sent to all observers of the tile entity, preventing a potential (rare) glitch. | ||
* Update GNU Unifont to 15.0.05. | ||
|
||
## OpenOS fixes/improvements | ||
|
||
* [#3371] Fix minor bug in rm.lua. | ||
* Fix "ls -l" command on Lua 5.4. | ||
* General minor improvements to the codebase. | ||
* Reworked Internet Card filtering rules. | ||
* Implemented a new, more powerful system and improved default configuration. | ||
* Internet Card rules are now stored in the "internet.filteringRules" configuration key. | ||
* The old keys ("internet.whitelist", "internet.blacklist") are no longer used; an automatic migration is done upon upgrading the mod. | ||
* [#3635] ArrayIndexOutOfBoundsException when using servers with 3 network cards | ||
* [#3634] Internet card selector update logic erroneously drops non-ready keys | ||
|
||
## List of contributors | ||
|
||
asie, ds84182, Possseidon, repo-alt, sanmofe | ||
asie, Fingercomp |
26 changes: 26 additions & 0 deletions
26
src/main/java/com/typesafe/config/impl/OpenComputersConfigCommentManipulationHook.java
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.typesafe.config.impl; | ||
|
||
import com.typesafe.config.Config; | ||
import com.typesafe.config.ConfigValue; | ||
|
||
import java.util.List; | ||
|
||
public final class OpenComputersConfigCommentManipulationHook { | ||
private OpenComputersConfigCommentManipulationHook() { | ||
|
||
} | ||
|
||
public static Config setComments(Config config, String path, List<String> comments) { | ||
return config.withValue(path, setComments(config.getValue(path), comments)); | ||
} | ||
|
||
public static ConfigValue setComments(ConfigValue value, List<String> comments) { | ||
if (value.origin() instanceof SimpleConfigOrigin && value instanceof AbstractConfigValue) { | ||
return ((AbstractConfigValue) value).withOrigin( | ||
((SimpleConfigOrigin) value.origin()).setComments(comments) | ||
); | ||
} else { | ||
return value; | ||
} | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
|
||
package li.cil.oc.util; | ||
|
||
import com.google.common.net.InetAddresses; | ||
|
||
import java.net.InetAddress; | ||
|
||
// Originally by SquidDev | ||
public final class InetAddressRange { | ||
private final byte[] min; | ||
private final byte[] max; | ||
|
||
InetAddressRange(byte[] min, byte[] max) { | ||
this.min = min; | ||
this.max = max; | ||
} | ||
|
||
public boolean matches(InetAddress address) { | ||
byte[] entry = address.getAddress(); | ||
if (entry.length != min.length) return false; | ||
|
||
for (int i = 0; i < entry.length; i++) { | ||
int value = 0xFF & entry[i]; | ||
if (value < (0xFF & min[i]) || value > (0xFF & max[i])) return false; | ||
} | ||
|
||
return true; | ||
} | ||
|
||
public static InetAddressRange parse(String addressStr, String prefixSizeStr) { | ||
int prefixSize; | ||
try { | ||
prefixSize = Integer.parseInt(prefixSizeStr); | ||
} catch (NumberFormatException e) { | ||
throw new IllegalArgumentException(String.format("Malformed address range entry '%s': Cannot extract size of CIDR mask from '%s'.", | ||
addressStr + '/' + prefixSizeStr, prefixSizeStr)); | ||
} | ||
|
||
InetAddress address; | ||
try { | ||
address = InetAddresses.forString(addressStr); | ||
} catch (IllegalArgumentException e) { | ||
throw new IllegalArgumentException(String.format("Malformed address range entry '%s': Cannot extract IP address from '%s'.", | ||
addressStr + '/' + prefixSizeStr, addressStr)); | ||
} | ||
|
||
// Mask the bytes of the IP address. | ||
byte[] minBytes = address.getAddress(), maxBytes = address.getAddress(); | ||
int size = prefixSize; | ||
for (int i = 0; i < minBytes.length; i++) { | ||
if (size <= 0) { | ||
minBytes[i] = (byte) 0; | ||
maxBytes[i] = (byte) 0xFF; | ||
} else if (size < 8) { | ||
minBytes[i] = (byte) (minBytes[i] & 0xFF << (8 - size)); | ||
maxBytes[i] = (byte) (maxBytes[i] | ~(0xFF << (8 - size))); | ||
} | ||
|
||
size -= 8; | ||
} | ||
|
||
return new InetAddressRange(minBytes, maxBytes); | ||
} | ||
} |
This file contains 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
2 changes: 1 addition & 1 deletion
2
src/main/resources/assets/opencomputers/loot/openos/lib/core/boot.lua
This file contains 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
This file contains 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
Oops, something went wrong.