Jump to content

ke_do

Members
  • Posts

    3
  • Joined

  • Last visited

ke_do's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hello everyone. I am a beginner modder, and I want to make a custom entity with glowing texture. I tried to make that by this code int lightLevel = LightTexture.FULL_BRIGHT; vertexConsumer.vertex(matrix, x, y, z).color(1.0F, 1.0F, 1.0F, 0.0F).uv(0, 0).overlayCoords(OverlayTexture.NO_OVERLAY).uv2(lightLevel).normal(normal.x(), normal.y(), normal.z()).endVertex(); but, it didn't work, my entity had just normal texture... and I also tried attaching a glowing block to my entity but the result wasn't what I wanted. I want to make it like the entity in this video, src = What should I do? Thank you for listening.
  2. public class FireDot extends MobEffect { public FireDot() { super(MobEffectCategory.HARMFUL, 0x660990); getLogger().info("Test Log 999994 "); } @Override public void applyEffectTick(LivingEntity entity, int amplifier) { if (entity instanceof LivingEntity) { entity.hurt(entity.damageSources().inFire(), 0.1F + amplifier); getLogger().info("Test Log 22333 : ") } } public boolean isDurationEffectTick(int duration, int amplifier) { int tickInterval = 2; return duration % tickInterval == 0; } } this is my custom MobEffect public class ModEffects { public static final DeferredRegister<MobEffect> MOB_EFFECTS = DeferredRegister.create(ForgeRegistries.MOB_EFFECTS, DoJiJoJu.MODID); public static final RegistryObject<MobEffect> FIRE_DOT = MOB_EFFECTS.register("fire_dot", FireDot::new); public static void register(IEventBus eventBus) {MOB_EFFECTS.register(eventBus);} } and I registed in Registry ModEffects.register(modEventBus); in my Main Class ((LivingEntity) this.target).addEffect(new MobEffectInstance(ModEffects.FIRE_DOT.get(), 100, 1)); getLogger().info("Test Log 888884 " + ModEffects.FIRE_DOT.get()); I add the Effect by this way and the `Log 888884` was printed but other Logs wasn't printed. The effect of MobEffectCategory.HARMFUL, 0x660990 was visible. but the hurt code wasn't work why It doesn't work? I tested in Creative mode and solo play Thank you
×
×
  • Create New...

Important Information

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