generated from tilera/1710mod
parent
cba867fa46
commit
544da3b713
|
@ -45,6 +45,7 @@ dependencies {
|
|||
implementation "codechicken:NotEnoughItems:1.7.10-1.0.5.120:dev"
|
||||
implementation "codechicken:CodeChickenCore:1.7.10-1.0.7.48:dev"
|
||||
implementation 'dan200:ComputerCraft:1.75:deobf'
|
||||
implementation "mcp.mobius.waila:Waila:1.5.10_1.7.10:dev"
|
||||
}
|
||||
|
||||
processResources {
|
||||
|
@ -92,4 +93,4 @@ publishing {
|
|||
mavenLocal()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,17 +5,18 @@ import com.eloraam.redpower.compat.ComputercraftInterop;
|
|||
import com.eloraam.redpower.compat.ItemMachineCompat;
|
||||
import com.eloraam.redpower.compat.RenderBlueEngine;
|
||||
import com.eloraam.redpower.compat.TileBlueEngine;
|
||||
import com.eloraam.redpower.core.CoreLib;
|
||||
import com.eloraam.redpower.compat.Waila;
|
||||
import com.eloraam.redpower.core.CraftLib;
|
||||
import com.eloraam.redpower.core.ItemParts;
|
||||
import com.eloraam.redpower.core.RenderLib;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
@ -32,101 +33,134 @@ import cpw.mods.fml.relauncher.SideOnly;
|
|||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@Mod(
|
||||
modid = "RedPowerCompat",
|
||||
name = "RedPower Compat",
|
||||
version = "2.0pr6",
|
||||
dependencies = "required-after:RedPowerBase;required-after:RedPowerMachine;required-after:RedPowerWorld;after:IC2;after:Waila"
|
||||
modid = "RedPowerCompat",
|
||||
name = "RedPower Compat",
|
||||
version = RedPowerBase.VERSION,
|
||||
dependencies
|
||||
= "required-after:RedPowerBase;required-after:RedPowerMachine;required-after:RedPowerWorld;after:IC2;after:Waila"
|
||||
)
|
||||
public class RedPowerCompat implements IGuiHandler {
|
||||
@Instance("RedPowerCompat")
|
||||
public static RedPowerCompat instance;
|
||||
public static BlockMachineCompat blockMachineCompat;
|
||||
public static ItemParts itemCompatParts;
|
||||
public static ItemStack itemGearBrass;
|
||||
public static ItemStack itemDenseTungstenPlate;
|
||||
static boolean ic2reworked;
|
||||
static boolean waila;
|
||||
@Instance("RedPowerCompat")
|
||||
public static RedPowerCompat instance;
|
||||
public static BlockMachineCompat blockMachineCompat;
|
||||
public static ItemParts itemCompatParts;
|
||||
public static ItemStack itemGearBrass;
|
||||
public static ItemStack itemDenseTungstenPlate;
|
||||
static boolean ic2reworked;
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
for(ModContainer modContainer : Loader.instance().getActiveModList()) {
|
||||
if (modContainer.getName().equalsIgnoreCase("Industrial Craft Reworked")) {
|
||||
ic2reworked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
for (ModContainer modContainer : Loader.instance().getActiveModList()) {
|
||||
if (modContainer.getName().equalsIgnoreCase("Industrial Craft Reworked")) {
|
||||
ic2reworked = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
waila = Loader.isModLoaded("Waila");
|
||||
}
|
||||
@EventHandler
|
||||
public void load(FMLInitializationEvent event) {
|
||||
this.setupBlocks();
|
||||
if (event.getSide().isClient()) {
|
||||
this.registerRenderers();
|
||||
}
|
||||
if (Loader.isModLoaded("ComputerCraft")) {
|
||||
ComputercraftInterop.initInterop();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void load(FMLInitializationEvent event) {
|
||||
this.setupBlocks();
|
||||
if (event.getSide().isClient()) {
|
||||
this.registerRenderers();
|
||||
}
|
||||
if (Loader.isModLoaded("ComputerCraft")) {
|
||||
ComputercraftInterop.initInterop();
|
||||
}
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(instance, instance);
|
||||
}
|
||||
if (Loader.isModLoaded("Waila")) {
|
||||
FMLInterModComms.sendMessage(
|
||||
"Waila", "register", Waila.class.getName() + ".register"
|
||||
);
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
}
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(instance, instance);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerRenderers() {
|
||||
RenderLib.setRenderer(blockMachineCompat, 0, RenderBlueEngine::new);
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileBlueEngine.class, new RenderBlueEngine(blockMachineCompat));
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerRenderers() {
|
||||
RenderLib.setRenderer(blockMachineCompat, 0, RenderBlueEngine::new);
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(
|
||||
TileBlueEngine.class, new RenderBlueEngine(blockMachineCompat)
|
||||
);
|
||||
}
|
||||
|
||||
private void setupBlocks() {
|
||||
GameRegistry.registerTileEntity(TileBlueEngine.class, "RPBTEngine");
|
||||
blockMachineCompat = new BlockMachineCompat();
|
||||
GameRegistry.registerBlock(blockMachineCompat, ItemMachineCompat.class, "compat");
|
||||
blockMachineCompat.setBlockName(0, "rpbtengine");
|
||||
blockMachineCompat.addTileEntityMapping(0, TileBlueEngine::new);
|
||||
itemCompatParts = new ItemParts();
|
||||
itemCompatParts.addItem(0, "rpcompat:gear", "item.rpbgear");
|
||||
itemCompatParts.addItem(1, "rpcompat:densePlateTungsten", "item.densePlateTungsten");
|
||||
itemCompatParts.setCreativeTab(CreativeTabs.tabMaterials);
|
||||
GameRegistry.registerItem(itemCompatParts, "parts");
|
||||
itemGearBrass = new ItemStack(itemCompatParts, 1, 0);
|
||||
itemDenseTungstenPlate = new ItemStack(itemCompatParts, 1, 1);
|
||||
CraftLib.addOreRecipe(new ItemStack(itemCompatParts, 1, 0), " B ", "BIB", " B ", 'B', "ingotBrass", 'I', new ItemStack(RedPowerBase.blockMicro, 1, 5649));
|
||||
CraftLib.addOreRecipe(
|
||||
new ItemStack(blockMachineCompat, 1, 0), "BBB", " G ", "ZMZ", 'B', "ingotBrass", 'G', Blocks.glass, 'Z', itemGearBrass, 'M', RedPowerBase.itemMotor
|
||||
);
|
||||
//TODO: IC2 Classic compat
|
||||
/*if (ic2reworked) {
|
||||
TileEntityRotary.addRecipe(new ItemStack(RedPowerWorld.blockOres, 1, 6), new ItemStack(RedPowerBase.itemResource, 2, 8));
|
||||
TileEntityMacerator.addRecipe(new ItemStack(RedPowerWorld.blockOres, 1, 3), new ItemStack(RedPowerBase.itemResource, 2, 9));
|
||||
TileEntityRotary.addRecipe(RedPowerBase.itemIngotTungsten, new ItemStack(RedPowerBase.itemResource, 1, 8));
|
||||
TileEntitySingularity.addRecipe(CoreLib.copyStack(RedPowerBase.itemIngotTungsten, 8), itemDenseTungstenPlate);
|
||||
ICraftingRecipeManager advRecipes = Recipes.advRecipes;
|
||||
advRecipes.addRecipe(RedPowerBase.itemRuby, new Object[]{" MM", "MMM", "MM ", 'M', Ic2Items.matter, true});
|
||||
advRecipes.addRecipe(RedPowerBase.itemSapphire, new Object[]{"MM ", "MMM", " MM", 'M', Ic2Items.matter, true});
|
||||
advRecipes.addRecipe(RedPowerBase.itemGreenSapphire, new Object[]{" MM", "MMM", " MM", 'M', Ic2Items.matter, true});
|
||||
advRecipes.addRecipe(RedPowerBase.itemNikolite, new Object[]{"MMM", " M ", 'M', Ic2Items.matter, true});
|
||||
advRecipes.addRecipe(RedPowerBase.itemDustSilver, new Object[]{" M", " MM", " M", 'M', Ic2Items.matter, true});
|
||||
advRecipes.addRecipe(RedPowerBase.itemDustTungsten, new Object[]{"MMM", "MDM", "MMM", 'M', Ic2Items.matter, 'D', Items.diamond, true});
|
||||
advRecipes.addRecipe(RedPowerWorld.itemMarble, new Object[]{"M ", " ", " ", 'M', Ic2Items.matter, true});
|
||||
advRecipes.addRecipe(RedPowerWorld.itemBasalt, new Object[]{" M", " ", " ", 'M', Ic2Items.matter, true});
|
||||
}*/
|
||||
private void setupBlocks() {
|
||||
GameRegistry.registerTileEntity(TileBlueEngine.class, "RPBTEngine");
|
||||
blockMachineCompat = new BlockMachineCompat();
|
||||
GameRegistry.registerBlock(blockMachineCompat, ItemMachineCompat.class, "compat");
|
||||
blockMachineCompat.setBlockName(0, "rpbtengine");
|
||||
blockMachineCompat.addTileEntityMapping(0, TileBlueEngine::new);
|
||||
itemCompatParts = new ItemParts();
|
||||
itemCompatParts.addItem(0, "rpcompat:gear", "item.rpbgear");
|
||||
itemCompatParts.addItem(
|
||||
1, "rpcompat:densePlateTungsten", "item.densePlateTungsten"
|
||||
);
|
||||
itemCompatParts.setCreativeTab(CreativeTabs.tabMaterials);
|
||||
GameRegistry.registerItem(itemCompatParts, "parts");
|
||||
itemGearBrass = new ItemStack(itemCompatParts, 1, 0);
|
||||
itemDenseTungstenPlate = new ItemStack(itemCompatParts, 1, 1);
|
||||
CraftLib.addOreRecipe(
|
||||
new ItemStack(itemCompatParts, 1, 0),
|
||||
" B ",
|
||||
"BIB",
|
||||
" B ",
|
||||
'B',
|
||||
"ingotBrass",
|
||||
'I',
|
||||
new ItemStack(RedPowerBase.blockMicro, 1, 5649)
|
||||
);
|
||||
CraftLib.addOreRecipe(
|
||||
new ItemStack(blockMachineCompat, 1, 0),
|
||||
"BBB",
|
||||
" G ",
|
||||
"ZMZ",
|
||||
'B',
|
||||
"ingotBrass",
|
||||
'G',
|
||||
Blocks.glass,
|
||||
'Z',
|
||||
itemGearBrass,
|
||||
'M',
|
||||
RedPowerBase.itemMotor
|
||||
);
|
||||
//TODO: IC2 Classic compat
|
||||
/*if (ic2reworked) {
|
||||
TileEntityRotary.addRecipe(new ItemStack(RedPowerWorld.blockOres, 1, 6), new
|
||||
ItemStack(RedPowerBase.itemResource, 2, 8)); TileEntityMacerator.addRecipe(new
|
||||
ItemStack(RedPowerWorld.blockOres, 1, 3), new ItemStack(RedPowerBase.itemResource,
|
||||
2, 9)); TileEntityRotary.addRecipe(RedPowerBase.itemIngotTungsten, new
|
||||
ItemStack(RedPowerBase.itemResource, 1, 8));
|
||||
TileEntitySingularity.addRecipe(CoreLib.copyStack(RedPowerBase.itemIngotTungsten,
|
||||
8), itemDenseTungstenPlate); ICraftingRecipeManager advRecipes =
|
||||
Recipes.advRecipes; advRecipes.addRecipe(RedPowerBase.itemRuby, new Object[]{"
|
||||
MM", "MMM", "MM ", 'M', Ic2Items.matter, true});
|
||||
advRecipes.addRecipe(RedPowerBase.itemSapphire, new Object[]{"MM ", "MMM", "
|
||||
MM", 'M', Ic2Items.matter, true});
|
||||
advRecipes.addRecipe(RedPowerBase.itemGreenSapphire, new Object[]{" MM", "MMM",
|
||||
" MM", 'M', Ic2Items.matter, true});
|
||||
advRecipes.addRecipe(RedPowerBase.itemNikolite, new Object[]{"MMM", " M ", 'M',
|
||||
Ic2Items.matter, true}); advRecipes.addRecipe(RedPowerBase.itemDustSilver, new
|
||||
Object[]{" M", " MM", " M", 'M', Ic2Items.matter, true});
|
||||
advRecipes.addRecipe(RedPowerBase.itemDustTungsten, new Object[]{"MMM", "MDM",
|
||||
"MMM", 'M', Ic2Items.matter, 'D', Items.diamond, true});
|
||||
advRecipes.addRecipe(RedPowerWorld.itemMarble, new Object[]{"M ", " ", " ",
|
||||
'M', Ic2Items.matter, true}); advRecipes.addRecipe(RedPowerWorld.itemBasalt, new
|
||||
Object[]{" M", " ", " ", 'M', Ic2Items.matter, true});
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
||||
public Object
|
||||
getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
public Object
|
||||
getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
package com.eloraam.redpower;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.eloraam.redpower.core.BaseConnectableAdaptor;
|
||||
import com.eloraam.redpower.core.Config;
|
||||
import com.eloraam.redpower.core.CoreEvents;
|
||||
import com.eloraam.redpower.core.CoreLib;
|
||||
import com.eloraam.redpower.core.CoverRecipe;
|
||||
import com.eloraam.redpower.core.IRedPowerConnectableAdaptor;
|
||||
import com.eloraam.redpower.core.PacketHandler;
|
||||
import com.eloraam.redpower.core.BaseConnectableAdaptor;
|
||||
import com.eloraam.redpower.core.RenderHighlight;
|
||||
import com.eloraam.redpower.core.RenderSimpleCovered;
|
||||
import com.eloraam.redpower.core.TileCovered;
|
||||
|
@ -23,10 +27,6 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
|||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.inventory.ICrafting;
|
||||
|
@ -37,79 +37,75 @@ import net.minecraftforge.client.event.TextureStitchEvent.Pre;
|
|||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
@Mod(
|
||||
modid = "RedPowerCore",
|
||||
name = "RedPower Core",
|
||||
version = "2.0pr6"
|
||||
)
|
||||
@Mod(modid = "RedPowerCore", name = "RedPower Core", version = RedPowerBase.VERSION)
|
||||
public class RedPowerCore {
|
||||
@Instance("RedPowerCore")
|
||||
public static RedPowerCore instance;
|
||||
public static PacketHandler packetHandler = new PacketHandler();
|
||||
public static int customBlockModel = -1;
|
||||
public static int nullBlockModel = -1;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon missing;
|
||||
public static List<IRedPowerConnectableAdaptor> redPowerAdaptors = new ArrayList<>();
|
||||
@Instance("RedPowerCore")
|
||||
public static RedPowerCore instance;
|
||||
public static PacketHandler packetHandler = new PacketHandler();
|
||||
public static int customBlockModel = -1;
|
||||
public static int nullBlockModel = -1;
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static IIcon missing;
|
||||
public static List<IRedPowerConnectableAdaptor> redPowerAdaptors = new ArrayList<>();
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
Config.loadConfig();
|
||||
CoreLib.readOres();
|
||||
MinecraftForge.EVENT_BUS.register(new CoreEvents());
|
||||
if (FMLCommonHandler.instance().getSide().isClient()) {
|
||||
MinecraftForge.EVENT_BUS.register(instance);
|
||||
}
|
||||
redPowerAdaptors = new ArrayList<>();
|
||||
redPowerAdaptors.add(new BaseConnectableAdaptor());
|
||||
}
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
Config.loadConfig();
|
||||
CoreLib.readOres();
|
||||
MinecraftForge.EVENT_BUS.register(new CoreEvents());
|
||||
if (FMLCommonHandler.instance().getSide().isClient()) {
|
||||
MinecraftForge.EVENT_BUS.register(instance);
|
||||
}
|
||||
redPowerAdaptors = new ArrayList<>();
|
||||
redPowerAdaptors.add(new BaseConnectableAdaptor());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void load(FMLInitializationEvent event) {
|
||||
packetHandler.init();
|
||||
if (FMLCommonHandler.instance().getSide().isClient()) {
|
||||
this.setupRenderers();
|
||||
}
|
||||
@EventHandler
|
||||
public void load(FMLInitializationEvent event) {
|
||||
packetHandler.init();
|
||||
if (FMLCommonHandler.instance().getSide().isClient()) {
|
||||
this.setupRenderers();
|
||||
}
|
||||
|
||||
CraftingManager.getInstance().getRecipeList().add(new CoverRecipe());
|
||||
}
|
||||
CraftingManager.getInstance().getRecipeList().add(new CoverRecipe());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
Config.saveConfig();
|
||||
}
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
Config.saveConfig();
|
||||
}
|
||||
|
||||
public static File getSaveDir(World world) {
|
||||
return DimensionManager.getCurrentSaveRootDirectory();
|
||||
}
|
||||
public static File getSaveDir(World world) {
|
||||
return DimensionManager.getCurrentSaveRootDirectory();
|
||||
}
|
||||
|
||||
public static void sendPacketToServer(IMessage msg) {
|
||||
packetHandler.sendToServer(msg);
|
||||
}
|
||||
public static void sendPacketToServer(IMessage msg) {
|
||||
packetHandler.sendToServer(msg);
|
||||
}
|
||||
|
||||
public static void sendPacketToCrafting(ICrafting icr, IMessage msg) {
|
||||
if (icr instanceof EntityPlayerMP) {
|
||||
EntityPlayerMP player = (EntityPlayerMP)icr;
|
||||
packetHandler.sendTo(msg, player);
|
||||
}
|
||||
public static void sendPacketToCrafting(ICrafting icr, IMessage msg) {
|
||||
if (icr instanceof EntityPlayerMP) {
|
||||
EntityPlayerMP player = (EntityPlayerMP) icr;
|
||||
packetHandler.sendTo(msg, player);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setupRenderers() {
|
||||
customBlockModel = RenderingRegistry.getNextAvailableRenderId();
|
||||
nullBlockModel = RenderingRegistry.getNextAvailableRenderId();
|
||||
MinecraftForge.EVENT_BUS.register(new RenderHighlight());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(
|
||||
TileCovered.class, new RenderSimpleCovered()
|
||||
);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void setupRenderers() {
|
||||
customBlockModel = RenderingRegistry.getNextAvailableRenderId();
|
||||
nullBlockModel = RenderingRegistry.getNextAvailableRenderId();
|
||||
MinecraftForge.EVENT_BUS.register(new RenderHighlight());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileCovered.class, new RenderSimpleCovered());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void onTextureStitch(Pre evt) {
|
||||
TextureMap map = evt.map;
|
||||
if (map.getTextureType() == 0) {
|
||||
missing = map.registerIcon("rpcore:missing");
|
||||
}
|
||||
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void onTextureStitch(Pre evt) {
|
||||
TextureMap map = evt.map;
|
||||
if (map.getTextureType() == 0) {
|
||||
missing = map.registerIcon("rpcore:missing");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
package com.eloraam.redpower.compat;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.eloraam.redpower.core.TileCoverable;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class Waila implements IWailaDataProvider {
|
||||
public static void register(final IWailaRegistrar registrar) {
|
||||
FMLCommonHandler.instance().getFMLLogger().info(
|
||||
"[RedPower Compat] registering waila plugin"
|
||||
);
|
||||
registrar.registerStackProvider(new Waila(), TileCoverable.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack
|
||||
getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
TileCoverable te = (TileCoverable) accessor.getTileEntity();
|
||||
return te.getPickBlock(accessor.getPosition(), accessor.getPlayer());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(
|
||||
ItemStack itemStack,
|
||||
List<String> currenttip,
|
||||
IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(
|
||||
ItemStack itemStack,
|
||||
List<String> currenttip,
|
||||
IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(
|
||||
ItemStack itemStack,
|
||||
List<String> currenttip,
|
||||
IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTData(
|
||||
EntityPlayerMP player,
|
||||
TileEntity te,
|
||||
NBTTagCompound tag,
|
||||
World world,
|
||||
int x,
|
||||
int y,
|
||||
int z
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue