Jump to content

[1.10.2] /summon guru.FireOrb to /summon guru:fire_orb [1.11]


gurujive

Recommended Posts

I have done everything except for one thing.

When I go in game my /summon command looks like this:

 

/summon guru.guru:fire_orb

 

instead of:

/summon guru:fire_orb

 

Here is the code associated:

package guru.tbe.init;

import guru.tbe.Guru;
import guru.tbe.Reference;
import guru.tbe.entity.EntityAirOrb;
import guru.tbe.entity.EntityCreativeOrb;
import guru.tbe.entity.EntityWaterOrb;
import guru.tbe.entity.EntityEarthOrb;
import guru.tbe.entity.EntityInvisibleOrb;
import guru.tbe.entity.EntityFireOrb;
import guru.tbe.entity.EntityNetherOrb;
import net.minecraftforge.fml.common.registry.EntityRegistry;

public class GuruEntities
{
private static int id = 0;

public static void registerEntities()
{
	register(EntityAirOrb.class, "air_orb");
	register(EntityWaterOrb.class, "water_orb");
	register(EntityEarthOrb.class, "earth_orb");
	register(EntityFireOrb.class, "fire_orb");
	register(EntityNetherOrb.class, "nether_orb");
	register(EntityInvisibleOrb.class, "invisible_orb");
	register(EntityCreativeOrb.class, "creative_orb");
}	
private static void register(Class cls, String name)
{
	EntityRegistry.registerModEntity(cls,Reference.MOD_ID + ":" + name, id++, Guru.getInstance(), 128, 148, true);
}
}

 

How do I fix this line to where it displays guru:fire_orb instead of guru.guru:fire_orb?

EntityRegistry.registerModEntity(cls,Reference.MOD_ID + ":" + name, id++, Guru.getInstance(), 128, 148, true);

 

 

Link to comment
Share on other sites

You have a  lang file I presume. Try localizing the name passed in currently to the command aka guru.guru:fire_orb

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

guru.guru:fire_orb=guru:fire_orb though it might not work I am looking into how the summon command grabs entities by name.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

This is what I have that works:

EntityRegistry.registerModEntity(cls, name, id++, Guru.getInstance(), 128, 148, true);

 

if i change the id++ to id then all my entities look and act like air orbs when thrown... :|

 

It summons all my different entities like so:

guru.blah_orb

Link to comment
Share on other sites

First thing is first WHAT? Who said anything about id? And you don't need to add your mod id when registering. Search your workspace for guru. and see what comes up.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

This forum makes me wanna slam my head into my keyboard very hard every time I get on it.

 

Why?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

my mod id is guru.

 

my lang looks like this:

itemGroup.the_basic_elements=The Basic Elements
item.air_orb.name=Air Orb
item.earth_orb.name=Earth Orb
item.fire_orb.name=Fire Orb
item.water_orb.name=Water Orb
item.nether_orb.name=Nether Orb
item.invisible_orb.name=Invisible Orb
item.creative_orb.name=Creative Orb

Link to comment
Share on other sites

EntityRegistry.registerModEntity

always registers your entity with the name

"<modid>.<name>"

, where

<modid>

is your mod ID and

<name>

is the name you specified.

 

There's currently no way to use the

"<modid>:<name>"

format used by the new snapshots.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

Ok, so this is something that if it does change will most likely be implemented on its own, the way I have things.

 

Thanks Choonster,

 

looks like I'm as updated and matching as possible then... :)

Matched it up to the original mc src as much as I possibly could.

 

Good to know, mission complete.

Link to comment
Share on other sites

So will forge 1.11 have a :?

 

or will it have a .?

 

 

M.M .... if its changing to : then I'll have to erase a bunch of .

 

What would be really handy is if there was a 1.10.2 unrecommended that had this implemented so I would not have to erase a bunch of .s and replace them with :S

 

Idk... What's going on with this... >.<?

Mannn.....

Link to comment
Share on other sites

There's currently no way to use the

"<modid>:<name>"

format used by the new snapshots.

You could ask them if it will change and I agree that they should if it doesn't cause problems, because it looks better.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.