mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-22 04:52:15 +00:00
make books testable -- UNTESTED
This commit is contained in:
1 parent
631995a450
commit
98f463fc6a
3 files changed
+42
-5
No files matched your search
@@ -1,5 +1,7 @@
|
||||
package mantle;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.core.config.LoggerConfig;
|
||||
@@ -8,6 +10,7 @@ import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
@@ -15,6 +18,7 @@ import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import static mantle.lib.CoreRepo.*;
|
||||
import mantle.common.MProxyCommon;
|
||||
import mantle.items.Manual;
|
||||
import mantle.lib.CoreConfig;
|
||||
import mantle.lib.environment.EnvironmentChecks;
|
||||
|
||||
@@ -35,7 +39,7 @@ public class Mantle
|
||||
/* Proxies for sides, used for graphics processing */
|
||||
@SidedProxy(clientSide = "mantle.client.MProxyClient", serverSide = "mantle.common.MProxyCommon")
|
||||
public static MProxyCommon proxy;
|
||||
|
||||
public static Item mantleBook;
|
||||
/**
|
||||
* FML preinitialisation handler
|
||||
*
|
||||
@@ -60,6 +64,9 @@ public class Mantle
|
||||
proxy.registerRenderer();
|
||||
proxy.readManuals();
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);
|
||||
mantleBook = new Manual();
|
||||
GameRegistry.registerItem(mantleBook, "mantleBook");
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -20,13 +20,13 @@ public class Manual extends CraftingItem
|
||||
|
||||
public Manual()
|
||||
{
|
||||
super(name, textureName, "", "mantle", null);
|
||||
setUnlocalizedName("tconstruct.manual");
|
||||
super(name, textureName, "", "mantle", CreativeTabs.tabMisc);
|
||||
setUnlocalizedName("mantle.manual");
|
||||
}
|
||||
public Manual(String[] name, String[] textureName, String folder, String modTexturePrefix, CreativeTabs tab)
|
||||
{
|
||||
super(name, textureName, "", "mantle", null);
|
||||
setUnlocalizedName("tconstruct.manual");
|
||||
super(name, textureName, "", "mantle", tab);
|
||||
setUnlocalizedName("mantle.manual");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package mantle.lib;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class TabTools extends CreativeTabs
|
||||
{
|
||||
ItemStack display;
|
||||
|
||||
public TabTools(String label)
|
||||
{
|
||||
super(label);
|
||||
}
|
||||
|
||||
public void init (ItemStack stack)
|
||||
{
|
||||
display = stack;
|
||||
}
|
||||
|
||||
public ItemStack getIconItemStack ()
|
||||
{
|
||||
return display;
|
||||
}
|
||||
|
||||
public Item getTabIconItem ()
|
||||
{
|
||||
return display.getItem();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user