use of net.minecraft.world.entity.raid.Raider in project Supplementaries by MehVahdJukaar.
the class RedMerchantEntity method registerGoals.
@Override
protected void registerGoals() {
this.goalSelector.addGoal(0, new FloatGoal(this));
this.goalSelector.addGoal(2, new EquipAndRangeAttackGoal(this, 0.35D, 60, 10, 20, 15, new ItemStack(ModRegistry.BOMB_ITEM.get())));
this.targetSelector.addGoal(1, new NearestAttackableTargetGoal<>(this, Mob.class, 8, true, false, (mob) -> (mob instanceof Raider || mob instanceof Zombie || mob instanceof Zoglin)));
this.goalSelector.addGoal(3, new TradeWithPlayerGoal(this));
this.goalSelector.addGoal(3, new LookAtTradingPlayerGoal(this));
this.goalSelector.addGoal(3, new AvoidEntityGoal<>(this, Zombie.class, 6.0F, 0.5D, 0.5D));
this.goalSelector.addGoal(3, new AvoidEntityGoal<>(this, Vex.class, 8.0F, 0.5D, 0.5D));
this.goalSelector.addGoal(3, new AvoidEntityGoal<>(this, Creeper.class, 8.0F, 0.5D, 0.5D));
this.goalSelector.addGoal(3, new AvoidEntityGoal<>(this, Raider.class, 11.0F, 0.5D, 0.5D));
this.goalSelector.addGoal(3, new AvoidEntityGoal<>(this, Zoglin.class, 8.0F, 0.5D, 0.5D));
this.goalSelector.addGoal(4, new ShowWaresGoal(this, 400, 1600));
this.goalSelector.addGoal(4, new RedMerchantEntity.MoveToGoal(this, 2.0D, 0.35D));
this.goalSelector.addGoal(5, new MoveTowardsRestrictionGoal(this, 0.35D));
this.goalSelector.addGoal(8, new WaterAvoidingRandomStrollGoal(this, 0.35D));
// this.goalSelector.addGoal(9, new LookAtWithoutMovingGoal(this, PlayerEntity.class, 3.0F, 1.0F));
this.goalSelector.addGoal(10, new LookAtPlayerGoal(this, Mob.class, 8.0F));
}
use of net.minecraft.world.entity.raid.Raider in project Mohist by MohistMC.
the class CraftEventFactory method callRaidSpawnWaveEvent.
public static void callRaidSpawnWaveEvent(Raid raid, Raider leader, List<Raider> raiders) {
org.bukkit.entity.Raider craftLeader = (CraftRaider) leader.getBukkitEntity();
List<org.bukkit.entity.Raider> craftRaiders = new ArrayList<>();
for (Raider entityRaider : raiders) {
craftRaiders.add((org.bukkit.entity.Raider) entityRaider.getBukkitEntity());
}
RaidSpawnWaveEvent event = new RaidSpawnWaveEvent(new CraftRaid(raid), raid.getLevel().getWorld(), craftLeader, craftRaiders);
Bukkit.getPluginManager().callEvent(event);
}
Aggregations