Jump to content

Recommended Posts

Posted

So, when I spawn my custom entity, I can't see it. That's about it. Here's my source code (along with texture files and such): http://github.com/33kingkiller/Final-Smash-Mod

"All that is gold does not glitter,

    Not all those who wander are lost;

    The old that is strong does not wither,

    Deep roots are not reached by the frost.

 

    From the ashes a fire shall be woken,

    A light from the shadows shall spring;

    Renewed shall be blade that was broken,

    The crownless again shall be king." - J.R.R Tolkien

Posted

I have changed EntitySmashRegistry.java to look like this:

 

 

package am.dx._33kingkiller_hub.entity;

 

import net.minecraft.entity.EntityList;

import net.minecraftforge.fml.common.registry.EntityRegistry;

import am.dx._33kingkiller_hub.entity.passive.EntitySmashCube;

import am.dx._33kingkiller_hub.main.Smash;

 

public class EntitySmashRegistry {

 

//Referred to by Smash.java.

public static void EntityRegistry() {

RegisterEntity();

}

 

//Registers entities to eggs.

public static void RegisterEntity() {

CreateEntity(EntitySmashCube.class, "SmashCube", 0x4800FF, 0xFFB600);

}

//Creates/tracks entities.

@SuppressWarnings("unchecked")

public static void CreateEntity(@SuppressWarnings("rawtypes") Class entityClass, String entityName, int solidColour, int spotColour) {

int entityID = 27;

 

EntityRegistry.registerModEntity(entityClass, entityName, entityID, Smash.modInstance, 64, 1, true);

 

CreateEgg(entityID, solidColour, spotColour);

}

 

//Creates entity eggs.

@SuppressWarnings("unchecked")

public static void CreateEgg(int randomID, int solidColour, int spotColour) {

EntityList.entityEggs.put(Integer.valueOf(randomID), new EntityList.EntityEggInfo(randomID, solidColour, spotColour));

}

 

}

 

 

 

Now I get "[14:43:56] [server thread/WARN]: Skipping Entity with id SmashCube" in the console, and the in-game egg is just called "Spawn". The egg no longer does anything. Any idea why?

"All that is gold does not glitter,

    Not all those who wander are lost;

    The old that is strong does not wither,

    Deep roots are not reached by the frost.

 

    From the ashes a fire shall be woken,

    A light from the shadows shall spring;

    Renewed shall be blade that was broken,

    The crownless again shall be king." - J.R.R Tolkien

Posted

So how can I go about custom spawn eggs?

"All that is gold does not glitter,

    Not all those who wander are lost;

    The old that is strong does not wither,

    Deep roots are not reached by the frost.

 

    From the ashes a fire shall be woken,

    A light from the shadows shall spring;

    Renewed shall be blade that was broken,

    The crownless again shall be king." - J.R.R Tolkien

Posted

You cannot use the vanilla spawn eggs for your own entity.

 

You cannot use create egg anymore? Huh That sucks.

So how can I go about custom spawn eggs?

 

My best bet is that you have to make it yourself (which isn't that hard really)

Posted

I have changed EntitySmashRegistry.java to this now:

 

 

package am.dx._33kingkiller_hub.entity;

 

import net.minecraft.entity.EntityList;

import net.minecraftforge.fml.common.registry.EntityRegistry;

import am.dx._33kingkiller_hub.entity.passive.EntitySmashCube;

import am.dx._33kingkiller_hub.main.Smash;

 

public class EntitySmashRegistry {

 

//Referred to by the Smash.java.

public static void EntityRegistry() {

RegisterEntity();

}

 

//Registers entities to eggs.

public static void RegisterEntity() {

CreateEntity(EntitySmashCube.class, "SmashCube", 0x4800FF, 0xFFB600, 27);

}

//Creates/tracks entities.

@SuppressWarnings("unchecked")

public static void CreateEntity(@SuppressWarnings("rawtypes") Class entityClass, String entityName, int solidColour, int spotColour, int entityID) {

EntityRegistry.registerModEntity(entityClass, entityName, entityID, Smash.modInstance, 64, 1, true);

 

CreateEgg(entityClass, entityName, entityID, solidColour, spotColour);

}

 

//Creates entity eggs.

@SuppressWarnings("rawtypes")

public static void CreateEgg(Class entityClass, String entityName, int entityID, int solidColour, int spotColour) {

EntityList.addMapping(entityClass, entityName, entityID, solidColour, spotColour);

}

 

}

 

 

I can spawn the entity again, but it is still invisible. I guess it's "back to square one," as they say.

"All that is gold does not glitter,

    Not all those who wander are lost;

    The old that is strong does not wither,

    Deep roots are not reached by the frost.

 

    From the ashes a fire shall be woken,

    A light from the shadows shall spring;

    Renewed shall be blade that was broken,

    The crownless again shall be king." - J.R.R Tolkien

Posted

Okay, I have found this: https://github.com/MinecraftForge/MinecraftForge/issues/1703. This seems to further explain what you mean by, "don't use global ids." I should be able to take it from here, but I will get back to you if I have any further issues.

"All that is gold does not glitter,

    Not all those who wander are lost;

    The old that is strong does not wither,

    Deep roots are not reached by the frost.

 

    From the ashes a fire shall be woken,

    A light from the shadows shall spring;

    Renewed shall be blade that was broken,

    The crownless again shall be king." - J.R.R Tolkien

Posted

Okay, so my problem had nothing to do with global IDs at all (although I won't be using them in the future). It turns out that I added an extra Entity variable to the "render" method in "ModelSmashCube.java." Thanks for your help, topic closed.

"All that is gold does not glitter,

    Not all those who wander are lost;

    The old that is strong does not wither,

    Deep roots are not reached by the frost.

 

    From the ashes a fire shall be woken,

    A light from the shadows shall spring;

    Renewed shall be blade that was broken,

    The crownless again shall be king." - J.R.R Tolkien

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I tried do download the essential mod to my mod pack but i didnt work. I paly on 1.21 and it should work. I use neoforge for my modding. The weird things is my friend somehow added the mod to his modpack and many others that I somehow can´t. Is there anything i can do? 
    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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