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);
}
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();
}
}
Aggregations