Jump to content

ModCrafting

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by ModCrafting

  1. Ok now it crashed because entityrenderer is null, I expected it because I don't know what files I could need to make a model for a lightning, or how to grab vanilla one.
  2. Oh wow ok, but sending null to that last one was causing me a crash 😧 thanks a lot i'll test all of that
  3. Btw, what should I be sending to EntityType.Builder#build(String pId), don't know what that ID is for. This is the link to the repo: https://github.com/AylanJ123/lightning-mobs
  4. I'm starting with modding and I'm having a hard time spawning a lightning. Don't know if I'm doing something wrong here. I tried with a class extending from LightningBolt first, but can't spawn a vanilla one neither. public static void SpawnLightning(Level level) { level.addFreshEntity(EntityType.LIGHTNING_BOLT.create(level)); //level.addFreshEntity(Registry.UNSTABLE_LIGHTNING.get().create(level)); } Is this supposed to be done differently? Also, my console is getting spammed with [Render thread/ERROR] [minecraft/Util]: Entity lightningmobs:unstable_lightning has no attributes Dunno why or how to fix it. This is how I am registering this. public static final RegistryObject<EntityType<UnstableLightning>> UNSTABLE_LIGHTNING = ENTITIES.register( "unstable_lightning", (Supplier<? extends EntityType<UnstableLightning>>) () -> { EntityType.Builder<UnstableLightning> builder = EntityType.Builder.of(UnstableLightning::new, MobCategory.AMBIENT); EntityType<UnstableLightning> type = builder.build(new ResourceLocation(LMobs.MODID + ":unstable_lightning").toString()); return type; } );
×
×
  • Create New...

Important Information

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