예제 #1
0
 private void makeSwarm(PlayerInteractEvent e, EntityPlayer player, IBeeHousing tile) {
   if (tile.getBeekeepingLogic() != null
       && tile.getBeeInventory() != null
       && tile.getBeekeepingLogic().canDoBeeFX()) {
     IBee member = BeeManager.beeRoot.getMember(tile.getBeeInventory().getQueen());
     if (member != null) {
       SwarmBehavior behavior = getSwarmBehavior(player);
       if (behavior != null) {
         if (behavior.entity != null) {
           behavior.entity.setDead();
         }
         Controller controller = Nanomachines.getController(player);
         if (controller != null) {
           controller.changeBuffer(-10);
         }
         behavior.spawnNewEntity(
             e.x + 0.5,
             e.y + 0.5,
             e.z + 0.5,
             member.getGenome().getPrimary().getIconColour(0),
             member.getGenome().getTolerantFlyer());
         swingItem(player);
       }
     }
   }
 }
예제 #2
0
  @Override
  public ItemStack getPrincess(World world, int x, int y, int z, int fortune) {
    IBee bee = createBee(world);
    if (world.rand.nextFloat() < ignobleShare) {
      bee.setIsNatural(false);
    }

    return PluginApiculture.beeInterface.getMemberStack(bee, EnumBeeType.PRINCESS.ordinal());
  }