Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ian Battistoni

Members
  • Joined

  • Last visited

Everything posted by Ian Battistoni

  1. I'm creating a mod but it doesn't recognize EntityJoinWorldEvent in 1.20 package com.lunaroom.illagernew.init; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.ai.goal.target.NearestAttackableTargetGoal; import net.minecraft.world.entity.monster.Pillager; import net.minecraft.world.entity.monster.Zombie; import net.minecraft.world.entity.ai.goal.target.HurtByTargetGoal; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; @Mod.EventBusSubscriber(modid = "illagernew") public class Illagermodify { @SubscribeEvent public static void onEntityJoinWorld(EntityJoinWorldEvent event) { if (event.getEntity() instanceof Pillager) { Pillager pillager = (Pillager) event.getEntity(); // Agrega una tarea para atacar a los Zombies. pillager.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(pillager, Zombie.class, true)); // Agrega una tarea para atacar a los jugadores y aldeanos. pillager.targetSelector.addGoal(4, new NearestAttackableTargetGoal<>(pillager, LivingEntity.class, 10, true, false, entity -> entity instanceof LivingEntity && !(entity instanceof Pillager))); // Agrega una tarea para responder al ser atacado. pillager.targetSelector.addGoal(1, new HurtByTargetGoal(pillager)); } } }
  2. How can I create a weapon mod with custom animations? For example a spear that has a hit animation where it hits from bottom to top and not like the sword that is from top to bottom.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.