diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
index f5d4692..4863b06 100644
--- a/.idea/jarRepositories.xml
+++ b/.idea/jarRepositories.xml
@@ -26,5 +26,10 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules/TranslationMod.main.iml b/.idea/modules/TranslationMod.main.iml
index 75c1dd5..cfe7f5e 100644
--- a/.idea/modules/TranslationMod.main.iml
+++ b/.idea/modules/TranslationMod.main.iml
@@ -13,7 +13,7 @@
-
+
@@ -26,8 +26,8 @@
-
-
+
+
@@ -37,13 +37,13 @@
-
+
-
+
diff --git a/.idea/modules/TranslationMod.test.iml b/.idea/modules/TranslationMod.test.iml
index f1b304e..a9b304a 100644
--- a/.idea/modules/TranslationMod.test.iml
+++ b/.idea/modules/TranslationMod.test.iml
@@ -13,7 +13,7 @@
-
+
@@ -27,8 +27,8 @@
-
-
+
+
@@ -38,13 +38,13 @@
-
+
-
+
diff --git a/gradle.properties b/gradle.properties
index d20ce4d..e383077 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -18,7 +18,7 @@
minecraft_version=1.16.5
forge_version=1.16.5-36.0.42
mappings_channel=snapshot
-mappings_version=20201028-1.16.3
+mappings_version=20210309-1.16.5
mod_version=6.0
# suppress inspection "UnusedProperty"
mod_id=translationmod
diff --git a/src/main/java/com/ringosham/translationmod/client/BaiduClient.java b/src/main/java/com/ringosham/translationmod/client/BaiduClient.java
index dec25a6..97aae3f 100644
--- a/src/main/java/com/ringosham/translationmod/client/BaiduClient.java
+++ b/src/main/java/com/ringosham/translationmod/client/BaiduClient.java
@@ -69,7 +69,7 @@ public RequestResult translate(String message, Language from, Language to) {
//Signature
//Must use unencoded message for signature
queryParam.put("sign", sign(ConfigManager.config.baiduAppId.get(), message, salt, ConfigManager.config.baiduKey.get()));
- Response response = POST(queryParam, "application/x-www-form-urlencoded");
+ Response response = sendRequest("POST", queryParam, "application/x-www-form-urlencoded");
if (response.getResponseCode() == 200) {
//Baidu does not follow standard REST response codes at all. It's 200 regardless of success or failure
//This is utterly retarded
diff --git a/src/main/java/com/ringosham/translationmod/client/GoogleClient.java b/src/main/java/com/ringosham/translationmod/client/GoogleClient.java
index cf5a859..b7df855 100644
--- a/src/main/java/com/ringosham/translationmod/client/GoogleClient.java
+++ b/src/main/java/com/ringosham/translationmod/client/GoogleClient.java
@@ -58,7 +58,7 @@ public RequestResult translate(String message, Language from, Language to) {
queryParam.put("dt", "t");
queryParam.put("q", encodedMessage);
try {
- Response response = POST(queryParam, "application/json");
+ Response response = sendRequest("GET", queryParam, "application/json");
//Usually Google would just return 429 if they deny access, but just in case it gives any other HTTP error codes
if (response.getResponseCode() != 200) {
accessDenied = true;
diff --git a/src/main/java/com/ringosham/translationmod/client/GooglePaidClient.java b/src/main/java/com/ringosham/translationmod/client/GooglePaidClient.java
index 26060e3..b036c1a 100644
--- a/src/main/java/com/ringosham/translationmod/client/GooglePaidClient.java
+++ b/src/main/java/com/ringosham/translationmod/client/GooglePaidClient.java
@@ -71,7 +71,7 @@ public RequestResult translate(String message, Language from, Language to) {
if (from != LangManager.getInstance().getAutoLang()) {
queryParam.put("source", from.getGoogleCode());
}
- Response response = POST(queryParam, "application/json");
+ Response response = sendRequest("GET", queryParam, "application/json");
String responseString = response.getEntity();
Gson gson = new Gson();
if (response.getResponseCode() == 200) {
diff --git a/src/main/java/com/ringosham/translationmod/client/RESTClient.java b/src/main/java/com/ringosham/translationmod/client/RESTClient.java
index 203bbd6..b12ba50 100644
--- a/src/main/java/com/ringosham/translationmod/client/RESTClient.java
+++ b/src/main/java/com/ringosham/translationmod/client/RESTClient.java
@@ -49,7 +49,7 @@ public RequestResult translateAuto(String message, Language to) {
public abstract RequestResult translate(String message, Language from, Language to);
- protected Response POST(Map queryParams, String contentType) {
+ protected Response sendRequest(String method, Map queryParams, String contentType) {
StringBuilder requestUrl = new StringBuilder(baseUrl);
boolean firstParam = true;
for (String key : queryParams.keySet()) {
diff --git a/src/main/resources/Changelog.txt b/src/main/resources/Changelog.txt
index 9793222..7be573e 100644
--- a/src/main/resources/Changelog.txt
+++ b/src/main/resources/Changelog.txt
@@ -108,5 +108,7 @@
- RMV: Yandex translations. They've proofed to be quite unreliable and since they removed the free option. There's no reason to keep using it.
5.1.1 - FIX: Translation client encoding problem (#1)
- FIX: Wrongly reading acacia buttons as acacia wall signs (#2)
- 6.0 - ADD: Baidu translation. For people from North Korea and "other countries"
- - FIX: Translator crash due to previously failed translation
\ No newline at end of file
+ 6.0 - ADD: Baidu translation. For people from North Korea and "other countries" (#8)
+ - FIX: Translator crash due to previously failed translation (#11)
+ - FIX: Failed to get chat log from regex screen (#10)
+ - FIX: Google translate API call error (#14)
\ No newline at end of file