Posted February 22, 201312 yr When i try to create a Tile Entity in my block class it gives the following error: The method createNewTileEntity(World) of type SoulMagnetBlock must override or implement a supertype method This is my code: @Override public TileEntity createNewTileEntity(World world) { return new TileEntitySoulMagnetBlock(); } Thanks for any help! PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
February 22, 201312 yr Author Sorry but i cant move the old thread. It is giving out the same error PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
February 23, 201312 yr 2 things A: The problem could be your tile entity, please show its code B: remember to do GameRegistry.registerTileEnitiy in your mod file, otherwise nbt saving won't work "you seem to be THE best modder I've seen imo." ~spynathan ლ(́◉◞౪◟◉‵ლ
February 23, 201312 yr Author Yes, I registered the Tile Entity but it is not actually being called. It behaves like the Method doesn't exist. Here is the full code of my Block class: package busti2000.technica; import busti2000.technica.entity.tileEntity.*; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.RenderBlocks; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; public class SoulMagnetBlock extends Block { public SoulMagnetBlock (int id, int texture, Material material) { super(id, texture, material); setHardness(0.5F); setCreativeTab(CreativeTabs.tabBlock); setBlockName("SoulMagnetBlock"); } public boolean isOpaqueCube() { return false; } public boolean renderAsNormalBlock() { return false; } @Override public TileEntity createNewTileEntity(World world) { return new TileEntitySoulMagnetBlock(); } } And the Basemod: package busti2000.technica; import busti2000.technica.entity.tileEntity.TileEntitySoulMagnetBlock; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.Mod.Instance; import cpw.mods.fml.common.Mod.PostInit; import cpw.mods.fml.common.Mod.PreInit; import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPostInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraftforge.common.Configuration; import net.minecraftforge.common.MinecraftForge; @Mod(modid="b2000technica", name="Technica 1.0", version="1.0.0") @NetworkMod(clientSideRequired=true, serverSideRequired=true) public class Basemod { @Instance("Basemod") public static Basemod instance; public static int IronStickID; public static int RedIronCoilID; public static int SoulMagnetBlockID; public static Item IronStick; public static Item RedIronCoil; public static Block SoulMagnetBlock; @SidedProxy(clientSide="busti2000.technica.client.ClientProxy", serverSide="busti2000.technica.CommonProxy") public static CommonProxy proxy; @PreInit public void preInit(FMLPreInitializationEvent event) { Configuration config = new Configuration(event.getSuggestedConfigurationFile()); config.load(); IronStickID = config.getItem("Item Ids","Iron Stick ID", 10000).getInt(); RedIronCoilID = config.getItem("Item Ids","Red Iron Coil ID", 10001).getInt(); SoulMagnetBlockID = config.getBlock("Block Ids", "Soul Magnet", 1000).getInt(); config.save(); } @Init public void load(FMLInitializationEvent event) { proxy.registerRenderers(); IronStick = (new IronStick(IronStickID)); RedIronCoil = (new RedIronCoil(RedIronCoilID)); SoulMagnetBlock = (new SoulMagnetBlock(SoulMagnetBlockID, 1, Material.iron)); Register(); } public void Register(){ LanguageRegistry.addName(IronStick, "Iron Stick"); GameRegistry.addRecipe(new ItemStack(IronStick, 4), "x", "x", 'x', Item.ingotIron); LanguageRegistry.addName(RedIronCoil, "Red Iron Coil"); GameRegistry.addRecipe(new ItemStack(RedIronCoil), " x ", "yzy", " x ", 'x', Item.ingotIron, 'y', Item.redstone, 'z', IronStick); LanguageRegistry.addName(SoulMagnetBlock, "Soul Magnet"); GameRegistry.registerBlock(SoulMagnetBlock, "SoulMagnetBlock"); MinecraftForge.setBlockHarvestLevel(SoulMagnetBlock, "pickaxe", 2); GameRegistry.registerTileEntity(TileEntitySoulMagnetBlock.class, "TileEntitySoulMagnetBlock"); } } PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
February 23, 201312 yr Author Now i know what i made wrong createNewTileEntity PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.