mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 11:49:14 +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
@@ -26,6 +26,7 @@ import forestry.core.interfaces.IPickupHandler;
|
||||
import forestry.core.interfaces.IResupplyHandler;
|
||||
import forestry.core.interfaces.ISaveEventHandler;
|
||||
import forestry.core.network.IPacketHandler;
|
||||
import forestry.core.proxy.Proxies;
|
||||
|
||||
public abstract class ForestryPlugin {
|
||||
|
||||
@@ -60,6 +61,26 @@ public abstract class ForestryPlugin {
|
||||
return false;
|
||||
}
|
||||
|
||||
protected static String getInvalidIMCMessageText(IMCMessage message) {
|
||||
final Object messageValue;
|
||||
if (message.isItemStackMessage()) {
|
||||
messageValue = message.getItemStackValue().toString();
|
||||
} else if (message.isNBTMessage()) {
|
||||
messageValue = message.getNBTValue();
|
||||
} else if (message.isStringMessage()) {
|
||||
messageValue = message.getStringValue();
|
||||
} else {
|
||||
messageValue = "";
|
||||
}
|
||||
|
||||
return String.format("Received an invalid '%s' request '%s' from mod '%s'. Please contact the author and report this issue.", message.key, messageValue, message.getSender());
|
||||
}
|
||||
|
||||
protected static void logInvalidIMCMessage(IMCMessage message) {
|
||||
String invalidIMCMessageText = getInvalidIMCMessageText(message);
|
||||
Proxies.log.warning(invalidIMCMessageText);
|
||||
}
|
||||
|
||||
public IGuiHandler getGuiHandler() {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user