if(te instanceof IBeefDebuggableTile) {
String result = ((IBeefDebuggableTile)te).getDebugInfo();
if(result != null && !result.isEmpty()) {
String[] results = result.split("\n");
String initialMessage = String.format("[%s] Beef Debug Tool:", clientOrServer);
player.addChatMessage(new ChatComponentText(initialMessage));
for(String r : results) {
player.addChatMessage(new ChatComponentText(r));
}
return true;
}
}
Block b = world.getBlock(x, y, z);
if(b != null) {
ItemStack blockStack = new ItemStack(b, 1, world.getBlockMetadata(x,y,z));
String oreName = ItemHelper.oreProxy.getOreName(blockStack);
player.addChatMessage(new ChatComponentText(String.format("[%s] Canonical ore name for %s: %s", world.isRemote?"CLIENT":"SERVER", b.getUnlocalizedName(), oreName)));
ArrayList<String> allOreNames = OreDictionaryArbiter.getAllOreNames(blockStack);
if(allOreNames != null) {
player.addChatMessage(new ChatComponentText(String.format("[%s] All ore names (%d):", clientOrServer, allOreNames.size())));
for(String on : allOreNames) {
player.addChatMessage(new ChatComponentText(on));
}
}
else {
player.addChatMessage(new ChatComponentText("getAllOreNames returned null"));
}
}
// Consume clicks by default
return true;