mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-18 03:15:24 +00:00
add in some helpers methods to blockutils, log4j2 stuff
This commit is contained in:
1 parent
e07dc82fff
commit
e9d42fe2b2
2 files changed
+10
No files matched your search
@@ -1,6 +1,8 @@
|
||||
package mantle;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.core.config.LoggerConfig;
|
||||
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
@@ -43,6 +45,9 @@ public class Mantle
|
||||
public void preInit (FMLPreInitializationEvent evt)
|
||||
{
|
||||
//logger.setParent(FMLCommonHandler.instance().getFMLLogger());
|
||||
LoggerConfig fmlConf = new LoggerConfig(FMLCommonHandler.instance().getFMLLogger().getName(), Level.ALL, true);
|
||||
LoggerConfig modConf = new LoggerConfig(logger.getName(), Level.ALL, true);
|
||||
modConf.setParent(fmlConf);
|
||||
|
||||
CoreConfig.loadConfiguration(new net.minecraftforge.common.config.Configuration(evt.getSuggestedConfigurationFile()));
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package mantle.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class BlockUtils
|
||||
{
|
||||
@@ -9,5 +10,9 @@ public class BlockUtils
|
||||
{
|
||||
return Block.func_149634_a(item);
|
||||
}
|
||||
public static Block getBlockFromItemStack (ItemStack itemStack)
|
||||
{
|
||||
return getBlockFromItem(itemStack.getItem());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user