Jump to content

[1.6.4]Tile entities not working at all?


antflga

Recommended Posts

I've tried about 50 methods to try and create my tile entity, NONE of them have worked, and every tutorial I saw/read absolutely sucked. I need some help with this, i have a techne model and this class.

 

package antflga.antinium.src.tileentities;

import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.EntityLiving;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import antflga.antinium.src.AntiniumMain;
import antflga.antinium.src.Strings;
import antflga.antinium.src.blocks.BlockIds;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class AntiniumConduitBlock extends BlockContainer{
public static Block AntiniumConduit;

public static void Init(){
   AntiniumConduit = new AntiniumConduitBlock(BlockIds.AntiniumConduit);
   LanguageRegistry.addName(AntiniumConduit, "Antinium Conduit");
   GameRegistry.registerBlock(AntiniumConduit, AntiniumMain.modid + Strings.AntiniumConduitName);
}

       public AntiniumConduitBlock(int id)
       {
             super(id, Material.rock);
             this.setCreativeTab(AntiniumMain.antinium);
             setUnlocalizedName("AntiniumConduit");
             setHardness(2.0F);
             setResistance(2.0F);
             MinecraftForge.setBlockHarvestLevel(AntiniumConduit, "pickaxe", 2);
       }
       @SideOnly(Side.CLIENT)
       public void registerIcons(IconRegister par1IconRegister)
    {
        this.blockIcon = par1IconRegister.registerIcon(AntiniumMain.modid + ":" + (this.getUnlocalizedName().substring(5)));
    }
	public int getRenderType()
	{
	return -2;
	}
	public boolean isOpaqueCube()
	{
	return false;
	}
	public boolean renderAsNormalBlock()
	{
	return false;
	}

	public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
	{
	int rotation = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 2.5D) & 3;
	world.setBlock(i, j, k, rotation - 1);
	}

	public TileEntity createNewTileEntity(World par1World)
	{
	return new AntiniumConduitTileEntity();
	}
}

Link to comment
Share on other sites

https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/block/BlockSpikes.java

 

You're probably creating the entity, but not getting the model to render, which is not a "TE is not working" it's a "you didn't register your renderers."

 

https://github.com/Draco18s/Artifacts/blob/master/draco18s/artifacts/client/ClientProxy.java

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Wait, seriously, that one class is all you have?

 

Dude, you need a main mod file, a block class, a tile entity class, the render class (which implies a common and client proxy), and the techne model class.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Are you calling Init()?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Here is all that code.

 

Base class

 
package antflga.antinium.src;

import net.minecraft.creativetab.CreativeTabs;
import antflga.antinium.src.blocks.AntiniumBlock;
import antflga.antinium.src.blocks.BlockAntiniumOre;
import antflga.antinium.src.items.AntiniumIngot;
import antflga.antinium.src.proxies.ClientProxy;
import antflga.antinium.src.tileentities.AntiniumConduitBlock;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid = AntiniumMain.modid, name = "The Antinium Mod", version = "0.0.1")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class AntiniumMain{

@SidedProxy(clientSide="antflga.antinium.src.proxies.ClientProxy", serverSide="antflga.antinium.src.proxies.CommonProxy")
public static ClientProxy proxy = new ClientProxy();

public static CreativeTabs AntiniumCreativeTab = new AntiniumCreativeTab(CreativeTabs.getNextID(), "Antinium mod items");

@Instance("Antinium")
public static AntiniumMain instance;

    @EventHandler
   	public static void Init(FMLInitializationEvent event){
    	LanguageRegistry.instance().addStringLocalization("itemGroup.", "Antinium", "en_US");
   		BlockAntiniumOre.Init();
   		AntiniumConduitBlock.Init();
   		AntiniumBlock.Init();
   		AntiniumIngot.Init();
   		Recipies.Init();
   		GameRegistry.registerWorldGenerator(new WorldGenerator());
   		
   		proxy.registerRenderers();
    }
    
public static final String modid = "antflga_antinium";
}

 

Here is the tile entity class, nothing is in it.

package antflga.antinium.src.tileentities;

import net.minecraft.tileentity.TileEntity;

public class EntityConduit extends TileEntity{

}

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.