Jump to content

projectmayhem1983

Members
  • Posts

    9
  • Joined

  • Last visited

Everything posted by projectmayhem1983

  1. When setting up which biomes your custom entities can spawn in, what all biomes does the Biomes.DEFAULT cover?
  2. I guess that is what I am confused about then. I was trying to call the method in my RegistryHandler , but it was saying it was undefined. No worries though, like I said, it works now. I've got a few java books I'm reading though, I learn best hands on though, so I been reading during my breaks at work, then working on this mod on my off days to try and get some hands on experience with what I've read. Just sometimes, like this, I just don't comprehend why it was giving me an error.
  3. The rest of the file does something with the array. I have just one last question though, why isn't the new code I used above considered a method? Is it because of the stuff inside the parentheses? public static void registerEntities(final RegistryEvent.Register<EntityEntry> event) The old method I was using had nothing. public static void registerEntities() Sorry if this is a really noob question, just wanting to understand what made it not a valid method so I don't have to ask these questions in the future.
  4. Also, thank you for the help and references so far. Having fully functional mods to look at helps a lot. Seems to be a lot of different ways you can approach doing things, which makes it a little confusing for a new person. EDIT - Tested it out after deleting the RegistryHandler entry, and the mob spawned at night, so that works, but the spawn egg vanished, so gotta work on that now. Thank again for your help!
  5. Looking at the second example you linked, and I think it helped a lot. The only problem I have now, is in my RegistryHandler file, this part comes up as an error.... public static void preInitRegistries() { EntityInit.registerEntities(); <-----Error here. The method resisterEntities is undefined for the type EntityInit RenderHandler.registerEntityRenders(); } Probably something simple that I'm not understanding as a novice. But in my EntityInit file, I have this... @SubscribeEvent public static void registerEntities(final RegistryEvent.Register<EntityEntry> event) { final EntityEntry[] entries = { createBuilder("inferno_skeleton") .entity(EntityInfernoSkeleton.class) .tracker(80, 3, true) .build() } Do I just need to get rid of the Entity.registerEntities() in my RegistryHandler? Or do I still need it there?
  6. Ahhh, think I understand the part you are talking about now, its in my EntityInit file. package com.projectmayhem1983.skeletonmod.init; import com.projectmayhem1983.skeletonmod.Main; import com.projectmayhem1983.skeletonmod.util.Reference; import com.projectmayhem1983.skeletonmod.entity.EntityInfernoSkeleton; import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; import net.minecraftforge.fml.common.registry.EntityRegistry; public class EntityInit { public static void registerEntities() { registerEntity("infernoskeleton", EntityInfernoSkeleton.class, Reference.ENTITY_INFERNO, 50, 16777215, 8519680); } public static void registerEntity(String name, Class<? extends Entity> entity, int id, int range, int color1, int color2) { EntityRegistry.registerModEntity(new ResourceLocation(Reference.MOD_ID + ":" + name), entity, name, id, Main.instance, range, 1, true, color1, color2); } } This is the part you were asking about, right?
  7. I have this in my RegistryHandler.java file public static void preInitRegistries() { EntityInit.registerEntities(); RenderHandler.registerEntityRenders(); } Assuming that is what you are referring to. I'm 100% new to all this, trying to use it as a way to learn java, while also reading books. My actual EntityInfernoSkeleton.java file is pretty much a copy/pasted version of EntitySkeleton, but removed the burning in sunlight. Is there a good tutorial series , not on youtube , that I should look at?
  8. I was following a youtube tutorial series, and it went over custom entities, but never touched on how to make them spawn naturally in the world. Can anyone help me with this? Everything works as far as the attacks, spawning from the custom egg and the loot tables.
×
×
  • Create New...

Important Information

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