Search in sources :

Example 1 with RavagerEntity

use of net.minecraft.entity.mob.RavagerEntity in project Biome-Makeover by Lemonszz.

the class RavagerChargePhase method onEnterPhase.

@Override
public void onEnterPhase() {
    super.onEnterPhase();
    adjudicator.setState(AdjudicatorState.FIGHTING);
    RavagerEntity ravager = EntityType.RAVAGER.create(world);
    ((LootBlocker) ravager).setLootBlocked(true);
    ravager.updatePositionAndAngles(adjudicator.getX(), adjudicator.getY(), adjudicator.getZ(), adjudicator.yaw, adjudicator.pitch);
    world.spawnEntity(ravager);
    adjudicator.clearArea(ravager);
    adjudicator.startRiding(ravager, true);
    ItemStack stack = new ItemStack(Items.CROSSBOW);
    stack.addEnchantment(Enchantments.MULTISHOT, 3);
    adjudicator.setStackInHand(Hand.MAIN_HAND, stack);
    adjudicator.playSound(BMEffects.ADJUDICATOR_SPELL_GRUNT, 1F, 1F);
}
Also used : LootBlocker(party.lemons.biomemakeover.util.extensions.LootBlocker) RavagerEntity(net.minecraft.entity.mob.RavagerEntity) ItemStack(net.minecraft.item.ItemStack)

Example 2 with RavagerEntity

use of net.minecraft.entity.mob.RavagerEntity in project Biome-Makeover by Lemonszz.

the class RavagerChargePhase method onExitPhase.

@Override
public void onExitPhase() {
    adjudicator.setStackInHand(Hand.MAIN_HAND, ItemStack.EMPTY);
    if (adjudicator.getVehicle() instanceof RavagerEntity) {
        RavagerEntity ravagerEntity = (RavagerEntity) adjudicator.getVehicle();
        adjudicator.stopRiding();
        ravagerEntity.remove();
    }
}
Also used : RavagerEntity(net.minecraft.entity.mob.RavagerEntity)

Aggregations

RavagerEntity (net.minecraft.entity.mob.RavagerEntity)2 ItemStack (net.minecraft.item.ItemStack)1 LootBlocker (party.lemons.biomemakeover.util.extensions.LootBlocker)1