Jump to content

<FIXED LIKE A BEAST>1.7.10 Registering a entity is not working.


Recommended Posts

Ok I do know why it's not working, the problem is I don't know how to fix it, at the moment im learning java but im still figuring things out so yeah. thnx.

 

package com.OlympiansMod.entity;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;

import com.OlympiansMod.Main.MainRegistry;

import cpw.mods.fml.common.registry.EntityRegistry;

public class MEntity {
public static void MainRegistry(){

}
public static void registerEntity(){
	createEntity(EntityGreekFire.class, "GreekFire");
	createEntity(EntityBullet.class, "Bullet");
}
public static void createEntity(Class entityClass, String entityName){

	EntityRegistry.registerModEntity(entityClass, entityName, 5, MainRegistry.modInstance, 1, 80, true);


}
}

 

is there a different public static void function that I can use if there is I don't know it. I do know that you cant register an entity to the same entity Registry string but the public static void doesn't give me the write stuff I need to writ a better line of code. sorry if this makes no sense  :P. if u cant help ill figure it out thanks anyway though.

Im serious don't look at it!!

Link to comment
Share on other sites

I'm saying this code

public static void createEntity(Class entityClass, String entityName){

 

doesn't support these args for multiple registrys

EntityRegistry.registerModEntity(EntityGreekFire.class, entityName, 5, MainRegistry.modInstance, 1, 80, true);

 

Am I wrong

 

here's my main mod class

 

package com.OlympiansMod.Main;

import net.minecraft.client.renderer.entity.RenderSnowball;

import com.OlympiansMod.Block.ModBlocks;
import com.OlympiansMod.Item.ModItems;
import com.OlympiansMod.creativetabs.MCreativeTabs;
import com.OlympiansMod.entity.EntityGreekFire;
import com.OlympiansMod.entity.MEntity;
import com.OlympiansMod.lib.Refstrings;
import com.OlympiansMod.world.MWorld;

import cpw.mods.fml.client.registry.RenderingRegistry;
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.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;

@Mod(modid = Refstrings.MODID , name = Refstrings.NAME , version = Refstrings.VERSION)
public class MainRegistry {

@SidedProxy(clientSide = Refstrings.CLIENTSIDE , serverSide = Refstrings.SERVERSIDE)
public static ServerProxy proxy;

@Instance
public static MainRegistry modInstance;

@EventHandler
public static void PreLoad(FMLPreInitializationEvent PreEvent) {
	MCreativeTabs.initialiseTabs();
	ModBlocks.MainRegistry();
	MEntity.MainRegistry();
	ModItems.MainRegistry();
	MWorld.MainRegistry();
        CraftingManager.mainRegistry(); 
              

}
@EventHandler
public static void Load(FMLInitializationEvent event) {
	 proxy.registerRenderInfo(); 

}
@EventHandler
public static void PostLoad(FMLPostInitializationEvent PostEvent) {

}

}

Im serious don't look at it!!

Link to comment
Share on other sites

the entity will not register or render, because I need args to support what I want for individual entitys

You really have a lack of programming knowledge. This has nothing to do with Java, but programming in general. If you need new arguments in a method you created, you modify the method to support those new arguments. Is your code after all.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

nobody ever said it had anything to do with java, what i'm lacking is the knowledge of what functions and arguments exist in minecraft coding the whole time i'm coding i'm using shortcuts provided by minecraft to make everything work, you are correct i'm not programming no one every said I was programming, i'm coding and modding and I came here to learn how to do it, I know the basics but I do not know most of the functions created by minecraft, and im trying not to waste my time looking through the runtime environment to find them, now I would like to know if I will receive any help at all on this situation other than "go figure it out" im learning how to use java for coding, not programming.

Im serious don't look at it!!

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.



×
×
  • Create New...

Important Information

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