1
0
forked from xjboss/KCauldronX

增加KC材料输出开关判断

This commit is contained in:
聪聪 2017-06-27 14:28:50 +08:00
parent 256f099706
commit cdd20299e5

View File

@ -34,7 +34,7 @@
+ Item item = itemRegistry.getRaw(id); + Item item = itemRegistry.getRaw(id);
+ // inject item materials into Bukkit for FML + // inject item materials into Bukkit for FML
+ org.bukkit.Material material = org.bukkit.Material.addMaterial(id, itemRegistry.getNameForObject(item), false); + org.bukkit.Material material = org.bukkit.Material.addMaterial(id, itemRegistry.getNameForObject(item), false);
+ if (material != null) + if (material != null && net.minecraft.server.MinecraftServer.kcauldronConfig.loggingMaterialInjection.getValue())
+ { + {
+ FMLLog.info("Injected new Forge item material %s with ID %d.", material.name(), material.getId()); + FMLLog.info("Injected new Forge item material %s with ID %d.", material.name(), material.getId());
+ } + }
@ -59,7 +59,7 @@
+ Block block = blockRegistry.getRaw(id); + Block block = blockRegistry.getRaw(id);
+ // inject block materials into Bukkit for FML + // inject block materials into Bukkit for FML
+ org.bukkit.Material material = org.bukkit.Material.addMaterial(id, blockRegistry.getNameForObject(block), true); + org.bukkit.Material material = org.bukkit.Material.addMaterial(id, blockRegistry.getNameForObject(block), true);
+ if (material != null) + if (material != null && net.minecraft.server.MinecraftServer.kcauldronConfig.loggingMaterialInjection.getValue())
+ { + {
+ FMLLog.info("Injected new Forge block material %s with ID %d.", material.name(), material.getId()); + FMLLog.info("Injected new Forge block material %s with ID %d.", material.name(), material.getId());
+ } + }