mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-18 11:19:28 +00:00
Fix #723 Alveary does not form using Oredictionary name slabWood
This commit is contained in:
1 parent
c90ea75fde
commit
19602bcd47
8 files changed
+76
-58
No files matched your search
@@ -33,7 +33,6 @@ import forestry.api.farming.Farmables;
|
||||
import forestry.api.farming.IFarmable;
|
||||
import forestry.core.circuits.Circuit;
|
||||
import forestry.core.circuits.CircuitLayout;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.core.config.ForestryItem;
|
||||
@@ -193,21 +192,20 @@ public class PluginFarming extends ForestryPlugin {
|
||||
|
||||
if (message.key.equals("add-farmable-sapling")) {
|
||||
String[] tokens = message.getStringValue().split("@");
|
||||
String errormsg = String.format("Received an invalid 'add-farmable-sapling' request '%s' from mod %s", message.getStringValue(),
|
||||
message.getSender());
|
||||
String errormsg = getInvalidIMCMessageText(message);
|
||||
if (tokens.length != 2) {
|
||||
Proxies.log.info(errormsg + ".");
|
||||
Proxies.log.warning(errormsg);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!Farmables.farmables.containsKey(tokens[0])) {
|
||||
Proxies.log.info("%s for non-existent farm %s.", errormsg, tokens[0]);
|
||||
Proxies.log.warning("%s For non-existent farm %s.", errormsg, tokens[0]);
|
||||
return true;
|
||||
}
|
||||
|
||||
String[] items = tokens[1].split("[\\.]+");
|
||||
if (items.length != 2 && items.length != 4) {
|
||||
Proxies.log.info("%s for farm '%s': id definitions did not match.", errormsg, tokens[0]);
|
||||
Proxies.log.warning("%s For farm '%s': id definitions did not match.", errormsg, tokens[0]);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -230,27 +228,27 @@ public class PluginFarming extends ForestryPlugin {
|
||||
new ItemStack(windfall, 1, Integer.parseInt(items[3]))));
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
Proxies.log.info("%s for farm '%s': ", errormsg, tokens[0], ex.getMessage());
|
||||
Proxies.log.warning("%s for farm '%s': %s", errormsg, tokens[0], ex.getMessage());
|
||||
}
|
||||
return true;
|
||||
|
||||
} else if (message.key.equals("add-farmable-crop")) {
|
||||
|
||||
String[] tokens = message.getStringValue().split("@");
|
||||
String errormsg = String.format("Received an invalid 'add-farmable-crop' request '%s' from mod %s", message.getStringValue(), message.getSender());
|
||||
String errormsg = getInvalidIMCMessageText(message);
|
||||
if (tokens.length != 2) {
|
||||
Proxies.log.info(errormsg + ".");
|
||||
Proxies.log.warning(errormsg);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!Farmables.farmables.containsKey(tokens[0])) {
|
||||
Proxies.log.info("%s for non-existent farm %s.", errormsg, tokens[0]);
|
||||
Proxies.log.warning("%s For non-existent farm %s.", errormsg, tokens[0]);
|
||||
return true;
|
||||
}
|
||||
|
||||
String[] items = tokens[1].split("[\\.]+");
|
||||
if (items.length != 4) {
|
||||
Proxies.log.info("%s for farm '%s': id definitions did not match.", errormsg, tokens[0]);
|
||||
Proxies.log.warning("%s For farm '%s': id definitions did not match.", errormsg, tokens[0]);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -269,7 +267,7 @@ public class PluginFarming extends ForestryPlugin {
|
||||
crop,
|
||||
Integer.parseInt(items[3])));
|
||||
} catch (Exception ex) {
|
||||
Proxies.log.info("%s for farm '%s': ", errormsg, tokens[0], ex.getMessage());
|
||||
Proxies.log.warning("%s for farm '%s': %s", errormsg, tokens[0], ex.getMessage());
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in new issue
Block a user