Posts by err

    Hi,
    I wanted to create a mod with IC2 integration but not dependency. I've tried this:


    Java
    package addedcompat.integration;
    import java.util.logging.Level;
    import ic2.api.item.Items;import net.minecraft.block.Block;import net.minecraft.item.Item;import net.minecraft.item.ItemStack;import net.minecraft.item.crafting.CraftingManager;import net.minecraftforge.oredict.ShapedOreRecipe;import net.minecraftforge.oredict.ShapelessOreRecipe;import addedcompat.common.AddedCompat;import addedcompat.common.CraftingManagerTable;import addedcompat.common.LogHelper;import cpw.mods.fml.common.Loader;
    public class IC2Integration  {	public static void isIC2Installed() {		if(Loader.isModLoaded("IC2")) {			try {				LogHelper.log(Level.INFO, "IC2 integration initialised");				ItemStack energyCrystal = Items.getItem("energyCrystal");				ItemStack lapotronCrystal = Items.getItem("lapotronCrystal");				ItemStack advancedCircuit = Items.getItem("advancedCircuit");				ItemStack lapiDust = Items.getItem("lapiDust");				ItemStack bronzeIngot = Items.getItem("bronzeIngot");
    				CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe((energyCrystal), new Object[] {						"RRR",						"RSR",						"RRR", Character.valueOf('R'), Item.redstone, Character.valueOf('S'), new ItemStack(AddedCompat.metaItemCompat,1,0)					}));										CraftingManager.getInstance().getRecipeList().add(new ShapedOreRecipe((lapotronCrystal), new Object[] {						"LAL",						"LRL",						"LAL", Character.valueOf('R'), new ItemStack(AddedCompat.metaItemCompat,1,1), Character.valueOf('A'), advancedCircuit, Character.valueOf('L'), lapiDust 					}));										CraftingManagerTable.getInstance().getRecipeList().add(new ShapelessOreRecipe((bronzeIngot), new Object[] {						Block.cobblestone, Item.ingotIron					}));										CraftingManagerTable.getInstance().getRecipeList().add(new ShapelessOreRecipe(new ItemStack(Item.ingotIron), new Object[] {							Block.cobblestone, bronzeIngot					}));			 }			catch(Exception e) {				LogHelper.log(Level.INFO, "IC2 integration not initialised");				e.printStackTrace(System.err);                        }			}else{		}	}}



    This doesn't seem to work.


    Thanks!

    Hi, I constantly crash with this error message:


    ---- Minecraft Crash Report ----
    // Who set us up the TNT?


    Time: 11/3/13 10:41 AM
    Description: Exception in world tick


    java.lang.NullPointerException
    at paulscode.sound.SoundSystem.stop(SoundSystem.java:1188)
    at ic2.core.audio.AudioSourceClient.stop(AudioSourceClient.java:110)
    at ic2.core.block.machine.tileentity.TileEntityStandardMachine.onNetworkEvent(TileEntityStandardMachine.java:290)
    at ic2.core.network.NetworkManagerClient.onPacketData(NetworkManagerClient.java:231)
    at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:255)
    at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:245)
    at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:84)
    at net.minecraft.client.multiplayer.NetClientHandler.func_72501_a(NetClientHandler.java:1647)
    at net.minecraft.network.packet.Packet250CustomPayload.func_73279_a(SourceFile:61)
    at net.minecraft.network.TcpConnection.func_74428_b(TcpConnection.java:462)
    at net.minecraft.client.multiplayer.NetClientHandler.func_72551_d(NetClientHandler.java:281)
    at net.minecraft.client.multiplayer.WorldClient.func_72835_b(WorldClient.java:99)
    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1928)
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:908)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:836)
    at net.minecraft.client.main.Main.main(SourceFile:101)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:18)



    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------


    -- Head --
    Stacktrace:
    at paulscode.sound.SoundSystem.stop(SoundSystem.java:1188)
    at ic2.core.audio.AudioSourceClient.stop(AudioSourceClient.java:110)
    at ic2.core.block.machine.tileentity.TileEntityStandardMachine.onNetworkEvent(TileEntityStandardMachine.java:290)
    at ic2.core.network.NetworkManagerClient.onPacketData(NetworkManagerClient.java:231)
    at cpw.mods.fml.common.network.NetworkRegistry.handlePacket(NetworkRegistry.java:255)
    at cpw.mods.fml.common.network.NetworkRegistry.handleCustomPacket(NetworkRegistry.java:245)
    at cpw.mods.fml.common.network.FMLNetworkHandler.handlePacket250Packet(FMLNetworkHandler.java:84)
    at net.minecraft.client.multiplayer.NetClientHandler.func_72501_a(NetClientHandler.java:1647)
    at net.minecraft.network.packet.Packet250CustomPayload.func_73279_a(SourceFile:61)
    at net.minecraft.network.TcpConnection.func_74428_b(TcpConnection.java:462)
    at net.minecraft.client.multiplayer.NetClientHandler.func_72551_d(NetClientHandler.java:281)


    -- Affected level --
    Details:
    Level name: MpServer
    All players: 2 total; [EntityClientPlayerMP['SkylordJoel'/435796, l='MpServer', x=471.71, y=79.62, z=-14.71], EntityOtherPlayerMP['big_fat_bunny'/434963, l='MpServer', x=462.15, y=64.00, z=-77.24]]
    Chunk stats: MultiplayerChunkCache: 420
    Level seed: 0
    Level generator: ID 00 - default, ver 1. Features enabled: false
    Level generator options:
    Level spawn location: World: (184,64,256), Chunk: (at 8,4,0 in 11,16; contains blocks 176,0,256 to 191,255,271), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    Level time: 2258762 game time, 48585 day time
    Level dimension: 0
    Level storage version: 0x00000 - Unknown?
    Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
    Forced entities: 53 total; [EntityOtherPlayerMP['big_fat_bunny'/434963, l='MpServer', x=462.15, y=64.00, z=-77.24], EntityBat['Bat'/481898, l='MpServer', x=420.32, y=31.46, z=36.89], EntityLocomotiveSteam['entity.Railcraft.railcraft.cart.loco.steam.name'/434966, l='MpServer', x=472.50, y=64.50, z=-26.59], EntityCartBasic['entity.Railcraft.railcraft.cart.basic.name'/434965, l='MpServer', x=472.50, y=64.50, z=-24.94], DaggerEntity['entity.TConstruct.Dagger.name'/434964, l='MpServer', x=474.25, y=77.00, z=-17.16], EntityBat['Bat'/481916, l='MpServer', x=465.69, y=44.36, z=17.16], EntityBat['Bat'/481918, l='MpServer', x=437.82, y=46.33, z=40.92], EntityBat['Bat'/480907, l='MpServer', x=473.19, y=37.97, z=2.03], EntityChicken['Chicken'/435032, l='MpServer', x=398.41, y=68.00, z=15.41], EntityBat['Bat'/471672, l='MpServer', x=428.11, y=19.10, z=33.28], EntitySheep['Sheep'/435021, l='MpServer', x=395.47, y=63.00, z=-74.47], EntitySheep['Sheep'/435071, l='MpServer', x=436.53, y=63.00, z=20.06], EntityClientPlayerMP['SkylordJoel'/435796, l='MpServer', x=471.71, y=79.62, z=-14.71], EntityBat['Bat'/479409, l='MpServer', x=422.53, y=35.68, z=19.25], EntityCow['Cow'/435052, l='MpServer', x=427.09, y=64.00, z=-72.50], EntityCow['Cow'/435053, l='MpServer', x=432.66, y=64.00, z=-70.31], EntityCow['Cow'/435054, l='MpServer', x=429.55, y=64.00, z=-69.61], EntityOtherPlayerMP['big_fat_bunny'/434963, l='MpServer', x=462.15, y=64.00, z=-77.24], EntitySheep['Sheep'/435090, l='MpServer', x=465.88, y=70.00, z=58.88], EntitySheep['Sheep'/435091, l='MpServer', x=462.94, y=71.00, z=51.97], EntitySquid['Squid'/435099, l='MpServer', x=491.35, y=59.41, z=-6.90], EntitySquid['Squid'/435100, l='MpServer', x=489.86, y=59.06, z=-5.95], EntitySquid['Squid'/435101, l='MpServer', x=491.39, y=59.00, z=-6.83], EntityHorse['Horse'/435075, l='MpServer', x=454.19, y=64.00, z=-74.72], EntityBat['Bat'/480809, l='MpServer', x=418.02, y=16.00, z=13.51], EntityHorse['Horse'/435076, l='MpServer', x=452.56, y=64.00, z=-73.03], EntitySheep['Sheep'/435082, l='MpServer', x=456.90, y=62.92, z=4.47], EntitySheep['Sheep'/435124, l='MpServer', x=514.72, y=63.00, z=-72.19], EntityPig['Pig'/435125, l='MpServer', x=527.03, y=62.32, z=-56.03], EntityMinecartChest['entity.MinecartChest.name'/435126, l='MpServer', x=518.50, y=17.34, z=-24.53], EntityPig['Pig'/435127, l='MpServer', x=524.16, y=63.00, z=-21.53], EntityMinecartChest['entity.MinecartChest.name'/435135, l='MpServer', x=524.50, y=19.34, z=20.63], EntitySheep['Sheep'/435108, l='MpServer', x=510.63, y=63.00, z=-52.16], EntitySheep['Sheep'/435112, l='MpServer', x=501.75, y=63.00, z=-42.53], EntitySheep['Sheep'/435115, l='MpServer', x=499.66, y=72.00, z=-0.47], EntitySheep['Sheep'/435114, l='MpServer', x=497.50, y=64.00, z=-0.34], EntitySheep['Sheep'/435117, l='MpServer', x=502.53, y=71.00, z=20.66], EntitySheep['Sheep'/435119, l='MpServer', x=506.53, y=70.00, z=42.78], EntitySheep['Sheep'/435118, l='MpServer', x=501.50, y=63.00, z=39.78], EntitySheep['Sheep'/435149, l='MpServer', x=538.53, y=65.00, z=-42.16], EntityPig['Pig'/435148, l='MpServer', x=532.97, y=66.00, z=-66.91], EntitySheep['Sheep'/435146, l='MpServer', x=532.66, y=65.00, z=-94.44], EntityBat['Bat'/478140, l='MpServer', x=401.31, y=22.13, z=-58.90], EntityBat['Bat'/478139, l='MpServer', x=398.13, y=20.00, z=-46.33], EntitySquid['Squid'/481101, l='MpServer', x=524.03, y=57.00, z=-36.78], EntityBat['Bat'/478138, l='MpServer', x=401.50, y=22.10, z=-56.09], EntitySquid['Squid'/481102, l='MpServer', x=527.59, y=57.34, z=-31.75], EntityLeashKnot['entity.LeashKnot.name'/435193, l='MpServer', x=454.50, y=64.50, z=-73.50], EntitySquid['Squid'/481094, l='MpServer', x=434.50, y=60.38, z=11.28], EntityLeashKnot['entity.LeashKnot.name'/435194, l='MpServer', x=454.50, y=64.50, z=-72.50], EntitySquid['Squid'/481095, l='MpServer', x=436.50, y=60.34, z=9.81], EntityMinecartChest['entity.MinecartChest.name'/435168, l='MpServer', x=545.50, y=24.50, z=18.50], EntitySquid['Squid'/481104, l='MpServer', x=523.72, y=58.06, z=-34.50]]
    Retry entities: 0 total; []
    Server brand: fml,forge
    Server type: Non-integrated multiplayer server
    Stacktrace:
    at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:440)
    at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1941)
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:908)
    at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:836)
    at net.minecraft.client.main.Main.main(SourceFile:101)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:18)


    -- Affected level --
    Details:
    Level name: MpServer


    Thanks!

    Ahh, so that's how to do it. So what does tier mean (I assume the maxbufferpower is the internal energy storage)? So if I wanted it to be on par with IC2's basic machine tier what would I do?

    Hi,
    I am working on an addition to SkylordJoel's mod which improves compatibility. I wanted to add an electric version of one of his machines, the slicer. So how would I do this, would I just add 'IEnergySink' to the list of imports in the TileEntity? Thanks.